/* ==========================================================================
   EZFast — new design system (light + dark)
   --------------------------------------------------------------------------
   Token values are lifted verbatim from the design handoff README. The two
   themes are a strict 1:1 swap, so every screen is built once against these
   custom properties and never against a literal colour.

   Theme selection:
     - default                     -> light
     - [data-theme="dark"]         -> dark, forced
     - prefers-color-scheme: dark  -> dark, unless [data-theme="light"] forces light

   This file is loaded only by _EzLayout.cshtml, so nothing here can reach the
   screens that still use the old layout.
   ========================================================================== */

:root {
    color-scheme: light;

    /* Surfaces */
    --paper: #FAF7F0;
    --surface: #FFFFFF;
    --surface-muted: #F4F0E6;
    --ink-band: #14201A;

    /* Text */
    --ink: #14201A;
    --ink-2: #4A564E;
    --ink-3: #5A6459;
    --ink-strong: #3C4A42;
    --ink-faint: #606A5E;

    /* Lines */
    --line: #E3DED2;
    --line-soft: #EDE8DC;
    --field-line: #D8D2C4;
    --chip: #F0EDE3;

    /* Brand green */
    --accent: #019644;
    --accent-btn: #017A38;
    --accent-ink: #016B31;
    --accent-soft: #6FD9A0;
    --accent-tint: #EEF5F0;
    --accent-tint-2: #F6FAF7;
    --accent-tint-3: #F2FAF5;
    --accent-tint-line: #BFE3CE;
    --accent-tint-ink: #1E4634;

    /* Brand yellow */
    --sun: #FDD913;
    --sun-panel: #FEF7D4;
    --sun-panel-line: #F0DE8E;

    /* Fixed in both themes */
    --on-sun: #14201A;
    --on-accent: #FFFFFF;
    --band-heading: #EFEADD;
    --band-body: #B9C6BC;
    --band-utility: #D9E3DB;

    /* Inside the dark band: hairline around the state links, and its quiet label
       text. The line lifts in dark mode because the band itself lifts. */
    --band-line: #2A3A30;
    --band-muted: #9FB3A5;

    /* Disabled control */
    --disabled-bg: #EDE8DC;
    --disabled-ink: #6B7670;

    /* Fixed in both themes: the eligibility wizard's progress rail. Verified
       byte-identical between the light and dark handoff files, so unlike the
       rest of the page it is never swapped by theme. */
    --rail-bg: #0E3B24;
    --rail-border: #24573B;
    --rail-track: #2C5E42;
    --rail-track-done: var(--sun);
    --rail-ink: #FFFFFF;
    --rail-ink-soft: #BFD9C8;
    --rail-ink-faint: #8FB9A0;
    --rail-ink-locked: #3B6E52;
    --rail-current-ring: rgba(255, 255, 255, 0.14);

    /* Elevation */
    --shadow-card: 0 18px 44px -32px rgba(20, 32, 26, 0.4);
    --shadow-card-lg: 0 20px 50px -34px rgba(20, 32, 26, 0.45);

    /* Type */
    --display: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    --script: 'Caveat', cursive;

    /* Rhythm */
    --gutter: clamp(18px, 5vw, 64px);
    --section-y: clamp(44px, 7vw, 64px);
    --page-max: 1280px;

    /* Logo swapped per theme */
    --logo-lockup: url('/images/newdesign/logo-lockup-duo.png');
}

/* Dark — forced by attribute. */
:root[data-theme="dark"] {
    color-scheme: dark;
    --paper: #0F1714;
    --surface: #1A2621;
    --surface-muted: #16211C;
    --ink-band: #1C2A23;
    --ink: #EDF2EE;
    --ink-2: #AEBCB2;
    --ink-3: #94A399;
    --ink-strong: #C3D0C7;
    --ink-faint: #8FA095;
    --line: #2A3A31;
    --line-soft: #243129;
    --field-line: #33443A;
    --chip: #22302A;
    --band-line: #33443A;
    --accent: #019644;
    --accent-btn: #05A94E;
    --accent-ink: #5FD48E;
    --accent-tint: #14291E;
    --accent-tint-2: #12251B;
    --accent-tint-3: #14291E;
    --accent-tint-line: #2E5A41;
    --accent-tint-ink: #8FE3B2;
    --sun-panel: #2A2408;
    --sun-panel-line: #5A4E10;
    --disabled-bg: #243129;
    --disabled-ink: #8FA095;
    --shadow-card: 0 18px 44px -32px rgba(0, 0, 0, 0.7);
    --shadow-card-lg: 0 20px 50px -34px rgba(0, 0, 0, 0.7);
    --logo-lockup: url('/images/newdesign/logo-lockup-duo-white.png');
}

/* Dark — followed from the operating system, unless light is forced. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --paper: #0F1714;
        --surface: #1A2621;
        --surface-muted: #16211C;
        --ink-band: #1C2A23;
        --ink: #EDF2EE;
        --ink-2: #AEBCB2;
        --ink-3: #94A399;
        --ink-strong: #C3D0C7;
        --ink-faint: #8FA095;
        --line: #2A3A31;
        --line-soft: #243129;
        --field-line: #33443A;
        --chip: #22302A;
        --band-line: #33443A;
        --accent: #019644;
        --accent-btn: #05A94E;
        --accent-ink: #5FD48E;
        --accent-tint: #14291E;
        --accent-tint-2: #12251B;
        --accent-tint-3: #14291E;
        --accent-tint-line: #2E5A41;
        --accent-tint-ink: #8FE3B2;
        --sun-panel: #2A2408;
        --sun-panel-line: #5A4E10;
        --disabled-bg: #243129;
        --disabled-ink: #8FA095;
        --shadow-card: 0 18px 44px -32px rgba(0, 0, 0, 0.7);
        --shadow-card-lg: 0 20px 50px -34px rgba(0, 0, 0, 0.7);
        --logo-lockup: url('/images/newdesign/logo-lockup-duo-white.png');
    }
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

.ez-page {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--display);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.ez-page *,
.ez-page *::before,
.ez-page *::after {
    box-sizing: border-box;
}

.ez-page h1,
.ez-page h2,
.ez-page h3,
.ez-page h4 {
    font-family: var(--display);
    color: var(--ink);
    letter-spacing: -0.025em;
    line-height: 1.12;
    text-wrap: pretty;
    margin: 0;
}

.ez-page h1 {
    letter-spacing: -0.03em;
    line-height: 1.05;
    font-weight: 700;
    font-size: clamp(32px, 4.2vw, 58px);
}

.ez-page h2 {
    font-weight: 700;
    font-size: clamp(26px, 3.2vw, 42px);
}

.ez-page p {
    margin: 0;
}

.ez-page a:not(.btn):not(.ez-btn) {
    color: var(--accent-ink);
    text-decoration: none;
}

.ez-page a:hover {
    opacity: 0.75;
}

.ez-page img {
    max-width: 100%;
}

.ez-page input,
.ez-page select,
.ez-page textarea,
.ez-page button {
    font-family: inherit;
}

.ez-page ::selection {
    background: #C9E3D2;
    color: #14201A;
}

.ez-page a:focus-visible,
.ez-page input:focus-visible,
.ez-page select:focus-visible,
.ez-page textarea:focus-visible,
.ez-page button:focus-visible,
.ez-page summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.ez-page input:focus-visible {
    outline-offset: 1px;
}

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */

.ez-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.ez-main {
    flex: 1 1 auto;
}

.ez-section {
    padding: var(--section-y) var(--gutter);
}

.ez-wrap {
    width: 100%;
    max-width: var(--page-max);
    margin: 0 auto;
}

.ez-band {
    background: var(--ink-band);
}

.ez-band h1,
.ez-band h2,
.ez-band h3 {
    color: var(--band-heading);
}

.ez-band p,
.ez-band li {
    color: var(--band-body);
}

.ez-muted-band {
    background: var(--surface-muted);
}

.ez-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.ez-grid-wide {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}

/* --------------------------------------------------------------------------
   Type helpers
   -------------------------------------------------------------------------- */

.ez-kicker {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.ez-lead {
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink-2);
    max-width: 46ch;
    text-wrap: pretty;
}

.ez-body {
    font-size: 15px;
    line-height: 1.65;
    color: var(--ink-2);
    max-width: 62ch;
}

.ez-meta {
    font-size: 13px;
    color: var(--ink-3);
}

.ez-script {
    font-family: var(--script);
    font-weight: 700;
    color: var(--accent-ink);
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.ez-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: clamp(24px, 4vw, 38px);
}

.ez-card-sm {
    border-radius: 14px;
    padding: 18px 20px;
}

/* Post card. Shared by the blog index, the related-posts strip at the foot of
   an article and the journal strip on the home page, so it lives here rather
   than in any one page stylesheet. */
/* Qualified with .ez-page because `.ez-page a` sets the accent colour and
   outranks a bare single class, which would tint the whole card. */
.ez-page a.ez-related {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    color: var(--ink);
}

/* The photograph sits flush across the card, so it has to opt out of the
   flex-start alignment its siblings use. Reserving the ratio up front keeps the
   card from jumping as the lazy image arrives. */
.ez-related-media {
    display: block;
    align-self: stretch;
    aspect-ratio: 16 / 10;
    border-radius: 11px;
    overflow: hidden;
    background: var(--surface-muted);
}

.ez-related-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ez-related-meta {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--accent-ink);
}

.ez-page a.ez-related:hover {
    opacity: 1;
    border-color: var(--accent-tint-line);
}

.ez-related-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.ez-related-sub {
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--ink-2);
}

.ez-chip-tag {
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink-strong);
    border-radius: 7px;
    padding: 5px 11px;
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: 0.12em;
}

.ez-empty {
    border: 1px dashed var(--line);
    border-radius: 14px;
    padding: 40px 24px;
    text-align: center;
    color: var(--ink-3);
}

.ez-card-raised {
    box-shadow: var(--shadow-card);
}

.ez-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--chip);
    color: var(--ink-strong);
    border-radius: 10px;
}

.ez-tint {
    background: var(--accent-tint);
    border: 1px solid var(--accent-tint-line);
    color: var(--accent-tint-ink);
}

.ez-notice-sun {
    background: var(--sun-panel);
    border: 1px solid var(--sun-panel-line);
    border-radius: 11px;
    padding: 13px 15px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink-strong);
}

/* --------------------------------------------------------------------------
   Buttons — every CTA is a pill
   -------------------------------------------------------------------------- */

.ez-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 999px;
    border: none;
    padding: 15px 24px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    text-align: center;
    transition: opacity .15s ease;
    text-decoration: none;
}

.ez-btn:hover {
    opacity: 0.9;
}

.ez-page .ez-btn-primary {
    background: var(--accent-btn);
    color: var(--on-accent);
    border: 1.5px solid var(--accent-ink);
    padding: 13.5px 22.5px;
}

.ez-page .ez-btn-primary:hover {
    color: var(--on-accent);
}

.ez-page .ez-btn-secondary {
    background: transparent;
    border: 1.5px solid var(--accent-ink);
    color: var(--accent-ink);
    padding: 13.5px 22.5px;
}

.ez-page .ez-btn-sun {
    background: var(--sun);
    color: var(--on-sun);
}

.ez-page .ez-btn-sun:hover {
    color: var(--on-sun);
}

.ez-page .ez-btn-ghost {
    background: var(--surface);
    border: 1.5px solid var(--field-line);
    color: var(--ink);
    padding: 13.5px 22.5px;
}

.ez-btn-sm {
    padding: 9px 18px;
    font-size: 14px;
}

.ez-btn-lg {
    padding: 16px 26px;
    font-size: 17px;
}

.ez-btn-block {
    width: 100%;
}

.ez-btn[disabled],
.ez-btn[aria-disabled="true"] {
    background: var(--disabled-bg);
    border-color: var(--disabled-bg);
    color: var(--disabled-ink);
    cursor: not-allowed;
    opacity: 1;
}

.ez-link-btn {
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    color: var(--accent-ink);
    font-size: 13px;
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.ez-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.ez-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-strong);
}

.ez-label.required::after {
    content: "*";
    color: var(--danger-ink, #B3261E);
}

.ez-label-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: baseline;
}

/* 16px font-size is deliberate: anything smaller makes iOS zoom on focus. */
.ez-input,
.ez-select,
.ez-textarea {
    width: 100%;
    border: 1px solid var(--field-line);
    border-radius: 10px;
    padding: 14px 15px;
    font-size: 16px;
    color: var(--ink);
    background: var(--paper);
}

.ez-textarea {
    resize: vertical;
    min-height: 96px;
    line-height: 1.55;
}

.ez-input-affix {
    position: relative;
    display: block;
}

.ez-input-affix .ez-input {
    padding-right: 78px;
}

.ez-input-affix .ez-link-btn {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 10px;
}

.ez-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    font-size: 14px;
    color: var(--ink-strong);
}

.ez-checkbox-box {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    background: var(--surface);
    color: transparent;
    border: 1.5px solid var(--field-line);
}

.ez-checkbox[aria-checked="true"] .ez-checkbox-box {
    background: var(--accent-btn);
    border: 1px solid var(--accent-btn);
    color: var(--on-accent);
}

.ez-hint {
    font-size: 13px;
    line-height: 1.5;
    color: var(--ink-3);
}

/* Components below set their own display, which beats the browser rule for
   [hidden]. This keeps the attribute meaning what it says. */
[hidden] {
    display: none !important;
}

.ez-error {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    border-radius: 11px;
    padding: 13px 15px;
    font-size: 14px;
    line-height: 1.5;
    background: var(--sun-panel);
    border: 1px solid var(--sun-panel-line);
    color: var(--ink-strong);
}

/* --------------------------------------------------------------------------
   Header / footer shell
   -------------------------------------------------------------------------- */

.ez-header {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 28px;
    justify-content: space-between;
    align-items: center;
    padding: 16px var(--gutter);
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}

.ez-header-sticky {
    position: sticky;
    top: 0;
    z-index: 20;
}

/* One <img> per theme; CSS decides which one is visible so the markup stays
   theme-agnostic. */
.ez-logo {
    height: 42px;
    width: auto;
    display: block;
}

.ez-logo-dark {
    display: none;
}

:root[data-theme="dark"] .ez-logo-light {
    display: none;
}

:root[data-theme="dark"] .ez-logo-dark {
    display: block;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .ez-logo-light {
        display: none;
    }

    :root:not([data-theme="light"]) .ez-logo-dark {
        display: block;
    }
}

.ez-header-side {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    align-items: center;
    font-size: 14px;
    color: var(--ink-2);
}

.ez-footer {
    border-top: 1px solid var(--line);
    background: var(--surface-muted);
    padding: clamp(40px, 6vw, 48px) var(--gutter) 40px;
    font-size: 13px;
    color: var(--ink-3);
}

.ez-footer-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 36px 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--line);
}

.ez-footer-brand,
.ez-footer-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.ez-footer-logo {
    height: 42px;
}

.ez-footer-blurb {
    font-size: 15px;
    line-height: 1.65;
    color: var(--ink-2);
    max-width: 34ch;
}

.ez-footer-contact {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 15px;
    color: var(--ink-2);
}

.ez-footer-head {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.ez-footer-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
    font-size: 15px;
    color: var(--ink-strong);
}

.ez-footer-social {
    display: flex;
    gap: 10px;
}

.ez-footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--field-line);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--accent-ink);
}

/* Brand icons, the same artwork as the production site's footer: no ring around them. */
.ez-footer-social {
    gap: 14px;
    align-items: center;
}

.ez-footer-social a {
    width: auto;
    height: auto;
    border: 0;
    background: none;
    border-radius: 50%;
    transition: transform .15s ease;
}

.ez-footer-social a:hover {
    transform: translateY(-2px);
}

.ez-footer-social a:focus-visible {
    outline: 2px solid var(--accent-ink);
    outline-offset: 3px;
}

.ez-footer-social a img {
    display: block;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: contain;
}

/* The X mark is a black disc: on the dark footer it flips to a white disc so it stays visible. */
:root[data-theme="dark"] .ez-footer-social a[aria-label="X"] img {
    filter: invert(1);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .ez-footer-social a[aria-label="X"] img {
        filter: invert(1);
    }
}

.ez-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 32px;
    justify-content: space-between;
    padding-top: 24px;
    font-size: 14px;
}

.ez-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
}

/* --------------------------------------------------------------------------
   Utility
   -------------------------------------------------------------------------- */

.ez-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ez-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px;
}

.ez-between {
    justify-content: space-between;
}

.ez-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--ink-3);
    font-size: 13px;
}

.ez-divider::before,
.ez-divider::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: var(--line);
}

.ez-min0 {
    min-width: 0;
}

.ez-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --------------------------------------------------------------------------
   Site header — utility bar, nav, theme switch, mobile menu
   -------------------------------------------------------------------------- */

.ez-utility {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    justify-content: space-between;
    align-items: center;
    padding: 10px var(--gutter);
    background: var(--ink-band);
    color: var(--band-utility);
    font-size: 13px;
}

/* Matches the specificity of the site-wide `.ez-page a:not(.btn):not(.ez-btn)`
   rule, which otherwise wins and paints these links ink green on the dark strip. */
.ez-page .ez-utility a:not(.btn):not(.ez-btn) {
    color: var(--band-utility);
}

.ez-utility-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    align-items: center;
}

.ez-header-site {
    gap: 16px 32px;
}

.ez-header-site .ez-logo {
    height: 46px;
}

.ez-nav-wrap {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: flex-end;
    flex: 1 1 auto;
}

.ez-nav {
    display: flex;
    gap: 22px;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
}

.ez-nav a {
    color: var(--ink-strong);
}

.ez-nav-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ez-nav-btn {
    padding: 11px 20px;
    font-size: 15px;
}

.ez-page .ez-btn-primary.ez-nav-btn {
    padding: 12px 22px;
}

.ez-theme-toggle {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--field-line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink-strong);
    cursor: pointer;
    padding: 0;
}

/* The icon shows the theme you would switch TO. */
.ez-theme-icon-sun {
    display: none;
}

:root[data-theme="dark"] .ez-theme-icon-sun {
    display: block;
}

:root[data-theme="dark"] .ez-theme-icon-moon {
    display: none;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .ez-theme-icon-sun {
        display: block;
    }

    :root:not([data-theme="light"]) .ez-theme-icon-moon {
        display: none;
    }
}

.ez-burger {
    display: none;
    width: 46px;
    height: 46px;
    border: 1px solid var(--field-line);
    border-radius: 10px;
    background: var(--surface);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    padding: 0;
}

.ez-burger span {
    width: 20px;
    height: 2px;
    background: var(--ink);
    display: block;
}

.ez-mobile-menu {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
    margin-top: 4px;
}

.ez-mobile-menu[hidden] {
    display: none;
}

.ez-mobile-menu > a:not(.ez-btn) {
    padding: 14px 2px;
    font-size: 17px;
    font-weight: 600;
    color: var(--ink);
    border-bottom: 1px solid var(--line-soft);
}

/* The one JS-free breakpoint the home design calls for. */
@media (max-width: 1239px) {
    .ez-header-site .ez-nav-wrap {
        display: none;
    }

    .ez-header-site .ez-burger {
        display: flex;
    }

    .ez-utility-desktop {
        display: none;
    }
}

@media (min-width: 1240px) {
    .ez-mobile-menu {
        display: none;
    }
}

.ez-mobile-theme {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 2px 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink-strong);
    border-bottom: 1px solid var(--line-soft);
}

/* ---------------------------------------------------------------------------
   Apply Now form (Views/Shared/_EzApplyNow.cshtml)

   Lives here rather than in a page stylesheet because the partial is meant to
   drop into any page on the new layout, not just an article sidebar.
   --------------------------------------------------------------------------- */
.ez-apply-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 18px 44px -34px rgba(20, 32, 26, 0.45);
}

.ez-apply-head {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ez-apply-title {
    font-family: var(--display);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.2;
}

.ez-apply-sub,
.ez-apply-foot {
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink-2);
}

.ez-apply-foot {
    font-size: 13px;
    text-align: center;
}

/* First and last name share a row until the card gets narrow. */
.ez-field-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr));
    gap: 12px;
}

.ez-field-error {
    font-size: 13px;
    line-height: 1.4;
    color: var(--danger-ink, #B3261E);
}

.ez-input.ez-input-invalid,
.ez-select.ez-input-invalid {
    border-color: var(--danger-ink, #B3261E);
}

.ez-consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--ink-2);
    cursor: pointer;
}

.ez-consent input {
    /* Nudged down so the box lines up with the first line of text rather than
       the top of its line box. */
    margin-top: 2px;
    width: 17px;
    height: 17px;
    accent-color: var(--accent-btn);
    flex: none;
}

.ez-apply-card button[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Sign-up confirmation. Rendered server-side after the post redirects back, so
   it needs no JavaScript to appear — only to dismiss. */
.ez-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(10, 18, 14, 0.55);
}

.ez-modal {
    width: min(100%, 420px);
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 28px 26px;
    box-shadow: 0 30px 70px -40px rgba(10, 18, 14, 0.8);
}

.ez-modal-title {
    margin: 0;
    font-family: var(--display);
    font-size: 22px;
    line-height: 1.25;
}

.ez-modal-body {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink-2);
}

/* ---- Signed-in account control (header + mobile menu) ---- */
.ez-account { position: relative; }
.ez-account-btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 5px 16px 5px 5px; border-radius: 999px;
    border: 1px solid var(--field-line); background: var(--surface);
    color: var(--ink-strong); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.ez-account-avatar {
    width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent-ink, #0a7a45); color: #fff; font-weight: 700; font-size: 14px;
}
.ez-account-menu {
    position: absolute; right: 0; top: calc(100% + 8px); min-width: 190px; z-index: 60;
    padding: 6px; border-radius: 14px; border: 1px solid var(--line);
    background: var(--surface); box-shadow: var(--shadow-card-lg);
}
.ez-account-menu[hidden] { display: none; }
.ez-account-menu form { margin: 0; }
.ez-account-menu a, .ez-account-menu button {
    display: block; width: 100%; text-align: left; padding: 10px 12px; border: 0; border-radius: 10px;
    background: none; color: var(--ink-strong); font: inherit; font-size: 15px; cursor: pointer;
}
.ez-account-menu a:hover, .ez-account-menu button:hover { background: var(--surface-muted); }
.ez-account-menu .ez-account-logout { color: var(--danger-ink, #B3261E); }
.ez-account-role { padding: 8px 12px 6px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; opacity: .6; }
.ez-account-stacked { margin-top: 8px; }
.ez-account-stacked .ez-account-menu { position: static; box-shadow: none; margin-top: 6px; }

/* Account button: same height as the .ez-nav-btn pills beside it */
.ez-page .ez-account-btn {
    height: 46px; padding: 3px 22px 3px 3px; gap: 12px; font-size: 16px; white-space: nowrap;
}
.ez-page .ez-account-avatar {
    flex: 0 0 40px; width: 40px; height: 40px; min-width: 40px; max-width: 40px; border-radius: 50%; object-fit: cover;
}

/* Account pill, sized to the approved design */
.ez-page .ez-nav-actions { gap: 16px; }
.ez-page .ez-account-btn {
    height: 62px; padding: 5px 30px 5px 5px; gap: 16px; font-size: 21px; font-weight: 600; letter-spacing: -0.01em;
    background: color-mix(in srgb, var(--surface) 70%, transparent); border-color: var(--line);
}
.ez-page .ez-account-avatar {
    flex: 0 0 52px; width: 52px; height: 52px; min-width: 52px; max-width: 52px; font-size: 20px;
}
.ez-page .ez-account-stacked .ez-account-btn { width: 100%; }

/* Account pill: same border as the secondary (Log in / Register) button */
.ez-page .ez-account-btn {
    border: 1.5px solid var(--accent-ink);
    background: transparent;
}

/* Account pill: same height and type size as the neighbouring .ez-nav-btn buttons */
.ez-page .ez-nav-actions { gap: 10px; }
.ez-page .ez-account-btn {
    height: 44px; padding: 4px 20px 4px 4px; gap: 10px; font-size: 15px; font-weight: 600; letter-spacing: 0;
}
.ez-page .ez-account-avatar {
    flex: 0 0 36px; width: 36px; height: 36px; min-width: 36px; max-width: 36px; font-size: 14px;
}

/* Account pill: matches the Log in / Register button (accent border + accent text), at the large size */
.ez-page .ez-account-btn,
.ez-page .ez-portal-user-btn {
    height: 76px; padding: 7px 24px 7px 7px; gap: 14px; box-sizing: border-box;
    border: 1.5px solid var(--accent-ink); background: transparent;
    color: var(--accent-ink); font-size: 22px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2;
}
.ez-page .ez-portal-user-btn { display: inline-flex; align-items: center; }
.ez-page .ez-account-avatar,
.ez-page .ez-portal-avatar {
    flex: 0 0 62px; width: 62px; height: 62px; min-width: 62px; max-width: 62px; font-size: 24px;
    border-radius: 50%; object-fit: cover;
}
.ez-page .ez-account-name,
.ez-page .ez-portal-user-name { font-size: 22px; font-weight: 600; color: var(--accent-ink); max-width: 220px; }
/* Header buttons share one height so the row lines up */
.ez-page .ez-nav-btn, .ez-page .ez-btn-primary.ez-nav-btn { height: 62px; padding-top: 0; padding-bottom: 0; font-size: 18px; }

/* One header-button height everywhere: matches the admin "Download list" button (40px, 14px type) */
.ez-page .ez-nav-btn,
.ez-page .ez-btn-primary.ez-nav-btn,
.ez-page .ez-btn-sm,
.ez-page .ez-account-btn,
.ez-page .ez-portal-user-btn {
    box-sizing: border-box; height: 40px; min-height: 40px; padding-top: 0; padding-bottom: 0;
    font-size: 14px; font-weight: 700; line-height: 1.2; letter-spacing: 0;
}
.ez-page .ez-nav-btn { padding-left: 20px; padding-right: 20px; }
.ez-page .ez-account-btn,
.ez-page .ez-portal-user-btn { padding: 3px 18px 3px 3px; gap: 10px; }
.ez-page .ez-account-avatar,
.ez-page .ez-portal-avatar {
    flex: 0 0 32px; width: 32px; height: 32px; min-width: 32px; max-width: 32px; font-size: 13px;
}
.ez-page .ez-account-name,
.ez-page .ez-portal-user-name { font-size: 14px; font-weight: 700; max-width: 180px; }

/* Header picture must stay inside the pill: beat the legacy #uploadedProfileImageTopHeader rule */
.ez-page .ez-account-btn,
.ez-page .ez-portal-user-btn { overflow: hidden; }
.ez-page .ez-account-avatar,
.ez-page .ez-portal-avatar,
.ez-page #uploadedProfileImageTopHeader {
    box-sizing: border-box;
    flex: 0 0 32px !important; width: 32px !important; height: 32px !important;
    min-width: 32px !important; max-width: 32px !important; min-height: 32px !important; max-height: 32px !important;
    margin: 0 !important; border-radius: 50% !important; object-fit: cover !important; object-position: center !important;
}

/* FINAL: the signed-in button, Log in / Register and Check eligibility are all exactly 40px tall */
.ez-page .ez-nav-btn,
.ez-page .ez-btn-primary.ez-nav-btn,
.ez-page .ez-account-btn,
.ez-page .ez-portal-user-btn {
    box-sizing: border-box !important;
    height: 40px !important; min-height: 40px !important; max-height: 40px !important;
    line-height: 1.2 !important;
    font-size: 14px !important; font-weight: 700 !important;
}
.ez-page .ez-account-name,
.ez-page .ez-portal-user-name { font-size: 14px !important; font-weight: 700 !important; line-height: 1.2 !important; }

/* FINAL v2: Check eligibility, Log in / Register and the signed-in button share one 44px height */
.ez-page .ez-nav-btn,
.ez-page .ez-btn-primary.ez-nav-btn,
.ez-page .ez-account-btn,
.ez-page .ez-portal-user-btn {
    box-sizing: border-box !important;
    height: 44px !important; min-height: 44px !important; max-height: 44px !important;
    font-size: 15px !important; font-weight: 700 !important; line-height: 1.2 !important;
}
.ez-page .ez-account-btn,
.ez-page .ez-portal-user-btn { padding: 3px 24px 3px 3px !important; gap: 12px !important; align-items: center !important; }
.ez-page .ez-account-avatar,
.ez-page .ez-portal-avatar,
.ez-page #uploadedProfileImageTopHeader {
    flex: 0 0 36px !important; width: 36px !important; height: 36px !important;
    min-width: 36px !important; max-width: 36px !important; min-height: 36px !important; max-height: 36px !important;
}
.ez-page .ez-account-name,
.ez-page .ez-portal-user-name { font-size: 15px !important; font-weight: 700 !important; }

/* FINAL v3: same width as the Check eligibility / Log in buttons, not just the same height */
.ez-page .ez-account-btn,
.ez-page .ez-portal-user-btn {
    min-width: 160px !important;
    justify-content: center !important;
}

/* FINAL v4: picture and name sit at the left of the button */
.ez-page .ez-account-btn,
.ez-page .ez-portal-user-btn {
    justify-content: flex-start !important;
    text-align: left !important;
}


/* FINAL v5: the signed-in button fits the first name (min about 4 characters), capped at 160px.
   A longer name is cut with an ellipsis; the button never stretches past the cap. */
.ez-page .ez-account-btn,
.ez-page .ez-portal-user-btn {
    width: auto !important;
    min-width: 0 !important;
    max-width: 160px !important;
    padding-right: 18px !important;
    flex: 0 0 auto;
}

.ez-page .ez-account-name,
.ez-page .ez-portal-user-name {
    display: block;
    flex: 0 1 auto;
    min-width: 4ch !important;
    max-width: 100% !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ez-page .ez-account-stacked .ez-account-btn {
    width: auto !important;
}


/* --------------------------------------------------------------------------
   Legal pages (Privacy policy): one readable column in the site's type and colours.
   -------------------------------------------------------------------------- */

.ez-legal-page {
    padding: var(--section-y) var(--gutter);
}

.ez-legal-header,
.ez-legal-data {
    width: 100%;
    max-width: 840px;
    margin-left: auto;
    margin-right: auto;
}

.ez-legal-header {
    padding-bottom: 20px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--line);
}

.ez-legal-header h1 {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.ez-legal-data {
    text-align: left;
    font-size: 16px;
    line-height: 1.7;
    color: var(--ink-2);
}

.ez-legal-data p {
    margin: 0 0 16px;
}

.ez-legal-data h2 {
    margin: 36px 0 12px;
    font-size: clamp(19px, 2.4vw, 22px);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0;
    color: var(--ink);
}

.ez-legal-data h5 {
    margin: 26px 0 10px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--ink-strong);
}

.ez-legal-data strong {
    font-weight: 700;
    color: var(--ink-strong);
}

.ez-legal-data ul {
    margin: 0 0 18px;
    padding-left: 24px;
}

.ez-legal-data li {
    list-style: disc;
    margin-bottom: 10px;
}

.ez-legal-data li ul {
    margin: 10px 0 0;
}

.ez-legal-data li ul li {
    list-style: circle;
}

.ez-legal-data a {
    color: var(--accent-ink);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Terms and conditions use h3 / h4 for their sections and sub-sections. */
.ez-legal-data h3 {
    margin: 34px 0 12px;
    font-size: clamp(19px, 2.4vw, 22px);
    font-weight: 700;
    line-height: 1.3;
    color: var(--ink);
}

.ez-legal-data h4 {
    margin: 26px 0 10px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--ink-strong);
}
