/* ==========================================================================
   Fintech Digital Banking - Public Site Design System
   Scope: public/marketing pages (site.html) and the sign-in / sign-up flow
   (auth_base.html). Shares its tokens with app.css so the site and the
   signed-in app read as one product. Admin still uses style.css via
   layout.html.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens (kept in step with app.css)
   -------------------------------------------------------------------------- */
:root {
    /* Surfaces */
    --site-bg:           #FFFFFF;
    --surface:           #FFFFFF;
    --surface-sunken:    #F7F8FA;
    --surface-hover:     #F4F6F8;

    /* Borders */
    --border:            #E4E7EC;
    --border-strong:     #D0D5DD;

    /* Text */
    --text:              #101828;
    --text-muted:        #667085;
    --text-subtle:       #6B7688;
    --text-on-accent:    #FFFFFF;

    /* Brand */
    --accent:            #0A737B;
    --accent-hover:      #096A72;
    --accent-active:     #07575E;
    --accent-subtle:     #E6F4F5;
    --navy:              #14325C;
    --navy-deep:         #0E2748;

    /* On-navy text scale - measured against --navy, not the page. */
    --on-dark:           #FFFFFF;
    --on-dark-muted:     #C3D2E6;
    --on-dark-subtle:    #A9BDD8;
    --on-dark-border:    rgba(255, 255, 255, 0.14);
    --on-dark-accent:    #7FE7DA;

    /* Semantic */
    --positive:          #067647;
    --positive-subtle:   #ECFDF3;
    --negative:          #B42318;
    --negative-subtle:   #FEF3F2;
    --warning:           #B54708;
    --warning-subtle:    #FFFAEB;
    --info:              #175CD3;
    --info-subtle:       #EFF8FF;

    /* Accent tints - paired bg/fg, every pair clears 4.5:1. */
    --tint-teal-bg:      #E6F4F5;   --tint-teal-fg:   #0A737B;
    --tint-blue-bg:      #EFF8FF;   --tint-blue-fg:   #175CD3;
    --tint-violet-bg:    #F4F3FF;   --tint-violet-fg: #5925DC;
    --tint-green-bg:     #ECFDF3;   --tint-green-fg:  #067647;
    --tint-amber-bg:     #FFFAEB;   --tint-amber-fg:  #B54708;
    --tint-rose-bg:      #FFF1F3;   --tint-rose-fg:   #C01048;
    --tint-cyan-bg:      #ECFDFF;   --tint-cyan-fg:   #0E7090;
    --tint-indigo-bg:    #EEF4FF;   --tint-indigo-fg: #3538CD;

    --focus-ring:        0 0 0 3px rgba(12, 136, 145, 0.24);

    --shadow-xs:         0 1px 2px rgba(16, 24, 40, 0.05);
    --shadow-sm:         0 1px 3px rgba(16, 24, 40, 0.10), 0 1px 2px rgba(16, 24, 40, 0.06);
    --shadow-md:         0 4px 8px -2px rgba(16, 24, 40, 0.10), 0 2px 4px -2px rgba(16, 24, 40, 0.06);
    --shadow-lg:         0 12px 16px -4px rgba(16, 24, 40, 0.08), 0 4px 6px -2px rgba(16, 24, 40, 0.03);
    --shadow-xl:         0 20px 24px -4px rgba(16, 24, 40, 0.10), 0 8px 8px -4px rgba(16, 24, 40, 0.04);

    --radius-sm:         8px;
    --radius:            12px;
    --radius-lg:         16px;
    --radius-xl:         24px;
    --radius-pill:       999px;

    --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
    --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px;
    --sp-16: 64px; --sp-20: 80px; --sp-24: 96px;

    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-num:  "Inter", ui-monospace, "SF Mono", monospace;

    --header-h:          68px;
    --container:         1180px;
    --container-narrow:  760px;

    --transition:        150ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------------------------------------------------
   2. Reset / base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    /* Anchor targets (#personal, #loans...) land below the sticky header. */
    scroll-padding-top: calc(var(--header-h) + var(--sp-6));
}

body.site-body {
    margin: 0;
    background: var(--site-bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
body.site-body.menu-open { overflow: hidden; }

.site-body h1, .site-body h2, .site-body h3, .site-body h4 {
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
}
.site-body p { margin: 0; }
.site-body img { max-width: 100%; display: block; }

a { text-decoration: none; color: inherit; }
.site-body a:not([class]) { color: var(--accent); }
.site-body a:not([class]):hover { color: var(--accent-hover); text-decoration: underline; }

.site-body :focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: var(--radius-sm);
}

.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

.skip-link {
    position: absolute;
    left: var(--sp-4); top: -60px;
    z-index: 100;
    padding: var(--sp-2) var(--sp-4);
    border-radius: var(--radius-sm);
    background: var(--navy);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}
.skip-link:focus { top: var(--sp-3); }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--sp-6);
}
.container-narrow { max-width: var(--container-narrow); }

/* --------------------------------------------------------------------------
   3. Header
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.site-header.is-scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-xs); }

.header-inner {
    display: flex;
    align-items: center;
    gap: var(--sp-8);
    height: var(--header-h);
}

.brand { display: flex; align-items: center; gap: var(--sp-3); flex-shrink: 0; }
.brand img {
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    object-fit: contain;
    background: #fff;
}
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; color: var(--navy); }
.brand-sub { font-size: 12px; color: var(--text-muted); line-height: 1.15; }

.site-nav { display: flex; align-items: center; gap: var(--sp-1); }
.site-nav-link {
    position: relative;
    padding: var(--sp-2) var(--sp-3);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-muted);
    transition: color var(--transition), background var(--transition);
}
.site-nav-link:hover { color: var(--text); background: var(--surface-hover); }
.site-nav-link.is-active { color: var(--accent); }
.site-nav-link.is-active::after {
    content: "";
    position: absolute;
    left: var(--sp-3); right: var(--sp-3); bottom: -2px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
}

.header-actions { display: flex; align-items: center; gap: var(--sp-2); margin-left: auto; }

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    margin-left: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 20px;
    cursor: pointer;
}

/* Mobile drawer - only rendered visible under the nav breakpoint. */
.mobile-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    z-index: 49;
    padding: var(--sp-4) var(--sp-6) var(--sp-6);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}
.mobile-nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-3) 0;
    border-bottom: 1px solid var(--border);
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
}
.mobile-nav-link.is-active { color: var(--accent); }
.mobile-nav-link .bi { color: var(--text-subtle); font-size: 14px; }
.mobile-nav-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); margin-top: var(--sp-5); }

.nav-backdrop {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    z-index: 48;
    background: rgba(16, 24, 40, 0.35);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
}
.nav-backdrop.is-open { opacity: 1; visibility: visible; }

/* Flash messages under the header. */
.flash-stack { padding-top: var(--sp-4); }

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    height: 42px;
    padding: 0 var(--sp-5);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
}
.btn .bi { font-size: 16px; }
.btn-sm { height: 36px; padding: 0 var(--sp-4); font-size: 14px; }
.btn-lg { height: 50px; padding: 0 var(--sp-6); font-size: 16px; }
.btn-block { width: 100%; }

.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--text-on-accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-primary:active { background: var(--accent-active); }

.btn-secondary { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-secondary:hover { background: var(--surface-hover); }

.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--surface-hover); color: var(--text); }

/* On navy / gradient panels. */
.btn-light { background: #FFFFFF; border-color: #FFFFFF; color: var(--navy); }
.btn-light:hover { background: #EEF3F9; border-color: #EEF3F9; color: var(--navy); }
.btn-outline-light { background: transparent; border-color: rgba(255, 255, 255, 0.4); color: #FFFFFF; }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.10); border-color: #FFFFFF; color: #FFFFFF; }

.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
}
.link-arrow .bi { transition: transform var(--transition); }
.link-arrow:hover { color: var(--accent-hover); }
.link-arrow:hover .bi { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   5. Sections
   -------------------------------------------------------------------------- */
.section { padding: var(--sp-24) 0; }
.section-sm { padding: var(--sp-16) 0; }
.section-flush-top { padding-top: 0; }
.section-sunken { background: var(--surface-sunken); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head { max-width: 640px; margin-bottom: var(--sp-12); }
.section-head.is-center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    margin-bottom: var(--sp-3);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
}
.section-title { font-size: 36px; line-height: 1.2; }
.section-lead { margin-top: var(--sp-4); font-size: 18px; color: var(--text-muted); }

.grid { display: grid; gap: var(--sp-6); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* --------------------------------------------------------------------------
   6. Hero
   The same teal-to-navy run as the dashboard balance card, so the first
   thing a visitor sees is the colour of the product they'll be using.
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    overflow: hidden;
    padding: var(--sp-20) 0 var(--sp-24);
    background: linear-gradient(135deg, #0A737B 0%, #075C64 34%, #0B3F55 68%, #14325C 100%);
    color: var(--on-dark);
}
.hero::before {
    /* Fine grid texture - reads as "financial" without resorting to orbs. */
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 70%);
    mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 70%);
    pointer-events: none;
}
.hero > .container { position: relative; z-index: 1; }

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: var(--sp-16);
    align-items: center;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    padding: 6px var(--sp-3);
    border: 1px solid var(--on-dark-border);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.08);
    font-size: 13px;
    font-weight: 500;
    color: var(--on-dark);
}
.hero-badge .bi { color: var(--on-dark-accent); }
.hero-title {
    margin-top: var(--sp-5) !important;
    font-size: 54px;
    line-height: 1.08;
    letter-spacing: -0.035em !important;
    color: #FFFFFF !important;
}
.hero-title em { font-style: normal; color: var(--on-dark-accent); }
.hero-lead {
    margin-top: var(--sp-5) !important;
    max-width: 540px;
    font-size: 19px;
    line-height: 1.55;
    color: #DAEAEB;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-8); }

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-10);
    margin-top: var(--sp-12);
    padding-top: var(--sp-6);
    border-top: 1px solid var(--on-dark-border);
}
.hero-stat-value { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; color: #FFFFFF; line-height: 1.1; }
.hero-stat-label { margin-top: var(--sp-1); font-size: 14px; color: #CFE3E5; }

/* Compact page hero for inner pages. */
.page-hero { padding: var(--sp-16) 0 var(--sp-16); }
.page-hero .hero-title { font-size: 44px; }
.page-hero-center { text-align: center; }
.page-hero-center .hero-lead { margin-left: auto; margin-right: auto; }
.page-hero-center .hero-actions,
.page-hero-center .hero-chips { justify-content: center; }

.hero-chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-6); }
.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    padding: 7px var(--sp-4);
    border: 1px solid var(--on-dark-border);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.06);
    font-size: 14px;
    font-weight: 500;
    color: #FFFFFF;
    transition: background var(--transition), border-color var(--transition);
}
a.hero-chip:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.35); }
.hero-chip .bi { color: var(--on-dark-accent); }

/* ---- Product preview (the dashboard, drawn in CSS) ---- */
.preview { position: relative; }
.preview-window {
    position: relative;
    padding: var(--sp-5);
    border-radius: var(--radius-lg);
    background: #F7F8FA;
    box-shadow: 0 32px 64px -16px rgba(4, 20, 38, 0.55), 0 0 0 1px rgba(255,255,255,0.10);
    color: var(--text);
}
.preview-balance {
    padding: var(--sp-5);
    border-radius: var(--radius);
    background: linear-gradient(135deg, #0A737B 0%, #075C64 48%, #0B3F55 100%);
    color: #FFFFFF;
}
.preview-label { font-size: 12px; font-weight: 500; color: #DAEAEB; }
.preview-amount { margin-top: var(--sp-1); font-size: 30px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.preview-trend { display: inline-flex; align-items: center; gap: 6px; margin-top: var(--sp-2); font-size: 12px; color: #FFFFFF; }
.preview-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); margin-top: var(--sp-3); }
.preview-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: var(--sp-3) var(--sp-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #FFFFFF;
    font-size: 12px;
    font-weight: 500;
}
.preview-action .bi { font-size: 16px; color: var(--accent); }
.preview-list { margin-top: var(--sp-3); border: 1px solid var(--border); border-radius: var(--radius-sm); background: #FFFFFF; }
.preview-row { display: flex; align-items: center; gap: var(--sp-3); padding: 10px var(--sp-3); }
.preview-row + .preview-row { border-top: 1px solid var(--border); }
.preview-row-main { flex: 1; min-width: 0; }
.preview-row-title { font-size: 13px; font-weight: 600; }
.preview-row-sub { font-size: 11px; color: var(--text-muted); }
.preview-row-amt { font-size: 13px; font-weight: 600; }
.preview-row-amt.is-in { color: var(--positive); }

.preview-float {
    position: absolute;
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    border-radius: var(--radius);
    background: #FFFFFF;
    box-shadow: var(--shadow-xl);
    color: var(--text);
    font-size: 13px;
}
.preview-float strong { display: block; font-size: 13px; font-weight: 600; }
.preview-float span { font-size: 12px; color: var(--text-muted); }
.preview-float.is-top { top: -18px; right: -22px; }
.preview-float.is-bottom { bottom: -22px; left: -28px; }

/* --------------------------------------------------------------------------
   7. Trust strip
   -------------------------------------------------------------------------- */
.trust-strip { border-bottom: 1px solid var(--border); background: var(--surface); }
.trust-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}
.trust-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-3);
    padding: var(--sp-6) var(--sp-4);
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
}
.trust-item + .trust-item { border-left: 1px solid var(--border); }
.trust-item .bi { font-size: 20px; color: var(--accent); }

/* --------------------------------------------------------------------------
   8. Cards
   -------------------------------------------------------------------------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
}
.card-pad { padding: var(--sp-8); }
.card-pad-sm { padding: var(--sp-6); }
.card-heading { font-size: 22px; }
.card-sub { margin-top: var(--sp-2) !important; margin-bottom: var(--sp-6) !important; color: var(--text-muted); }

.icon-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px; height: 48px;
    border-radius: var(--radius);
    font-size: 22px;
    flex-shrink: 0;
}
.icon-chip-sm { width: 36px; height: 36px; border-radius: var(--radius-sm); font-size: 17px; }

.feature-card {
    padding: var(--sp-8);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.feature-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feature-card h3 { margin-top: var(--sp-5); font-size: 19px; }
.feature-card p { margin-top: var(--sp-2); font-size: 15px; color: var(--text-muted); }
.feature-card.is-featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-md); }
.feature-card .link-arrow { margin-top: var(--sp-5); }

/* Compact feature row: icon beside text. */
.feature-row { display: flex; gap: var(--sp-4); align-items: flex-start; }
.feature-row h3 { font-size: 17px; }
.feature-row p { margin-top: var(--sp-1); font-size: 15px; color: var(--text-muted); }

/* ---- Steps ---- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-6); counter-reset: step; }
.step {
    position: relative;
    padding: var(--sp-8);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: var(--radius-pill);
    background: var(--navy);
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 700;
}
.step h3 { margin-top: var(--sp-5); font-size: 19px; }
.step p { margin-top: var(--sp-2); color: var(--text-muted); font-size: 15px; }
/* Connector between steps on wide screens. */
.step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: calc(var(--sp-8) + 20px);
    right: calc(-1 * var(--sp-6));
    width: var(--sp-6);
    height: 2px;
    background: var(--border-strong);
}

/* ---- Service cards (image on top) ---- */
.service-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: box-shadow var(--transition), transform var(--transition);
}
.service-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.service-card-img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-sunken); }
.service-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease; }
.service-card:hover .service-card-img img { transform: scale(1.04); }
.service-card-body { display: flex; flex-direction: column; flex: 1; padding: var(--sp-6); }
.service-card-body h3 { font-size: 18px; }
.service-card-body p { margin-top: var(--sp-2); flex: 1; font-size: 15px; color: var(--text-muted); }
.service-card-body .link-arrow { margin-top: var(--sp-4); }

/* ---- Service detail (services page, alternating) ---- */
.service-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--sp-16);
    align-items: center;
    padding: var(--sp-16) 0;
}
.service-detail + .service-detail { border-top: 1px solid var(--border); }
.service-detail.is-reverse .service-detail-media { order: 2; }
.service-detail-media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-xl);
    background: var(--surface-sunken);
    box-shadow: var(--shadow-lg);
}
.service-detail-media img { width: 100%; height: 100%; object-fit: cover; }
.service-detail-media .icon-chip {
    position: absolute;
    left: var(--sp-5); bottom: var(--sp-5);
    box-shadow: var(--shadow-md);
}
.service-detail h2 { margin-top: var(--sp-4); font-size: 32px; line-height: 1.2; }
.service-detail-lead { margin-top: var(--sp-4); font-size: 17px; color: var(--text-muted); }
.service-detail .btn { margin-top: var(--sp-8); }

.check-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sp-3) var(--sp-6);
    list-style: none;
    margin: var(--sp-6) 0 0;
    padding: 0;
}
.check-list li { display: flex; align-items: flex-start; gap: var(--sp-2); font-size: 15px; color: var(--text); }
.check-list .bi { margin-top: 3px; color: var(--positive); flex-shrink: 0; }
.check-list.is-single { grid-template-columns: minmax(0, 1fr); }

.callout {
    display: flex;
    gap: var(--sp-3);
    margin-top: var(--sp-6);
    padding: var(--sp-4) var(--sp-5);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: var(--accent-subtle);
    font-size: 15px;
    color: #0B4F55;
}
.callout .bi { color: var(--accent); margin-top: 2px; flex-shrink: 0; }

/* ---- Split (text + image) ---- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-16); align-items: center; }
.split-media { position: relative; }
.split-media img { width: 100%; border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); }
.split-badge {
    position: absolute;
    right: -16px; bottom: -20px;
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-5);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-xl);
    font-size: 14px;
    font-weight: 600;
}
.prose-lead { font-size: 19px; line-height: 1.6; color: var(--text); }
.prose-body { margin-top: var(--sp-4) !important; font-size: 16px; color: var(--text-muted); }

/* ---- Quote / purpose band ---- */
.statement {
    position: relative;
    overflow: hidden;
    padding: var(--sp-16) var(--sp-12);
    border-radius: var(--radius-xl);
    background: var(--navy);
    color: #FFFFFF;
    text-align: center;
}
.statement::before {
    content: "";
    position: absolute;
    top: -40%; right: -10%;
    width: 480px; height: 480px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(127, 231, 218, 0.16) 0%, rgba(127, 231, 218, 0) 70%);
    pointer-events: none;
}
.statement > * { position: relative; }
.statement .eyebrow { color: var(--on-dark-accent); }
.statement-text {
    max-width: 780px;
    margin: 0 auto !important;
    font-size: 26px;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: -0.01em;
    color: #FFFFFF;
}

/* ---- Mission / vision ---- */
.mv-card { padding: var(--sp-10); border-radius: var(--radius-xl); border: 1px solid var(--border); background: var(--surface); }
.mv-card h3 { margin-top: var(--sp-5); font-size: 24px; }
.mv-card p { margin-top: var(--sp-3); font-size: 17px; color: var(--text-muted); }

/* ---- Timeline ---- */
.timeline { position: relative; list-style: none; margin: 0 auto; padding: 0; max-width: 760px; }
.timeline::before {
    content: "";
    position: absolute;
    top: 8px; bottom: 8px; left: 23px;
    width: 2px;
    background: var(--border);
}
.timeline-item { position: relative; display: flex; gap: var(--sp-6); padding-bottom: var(--sp-10); }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-marker {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px; height: 48px;
    border-radius: var(--radius-pill);
    background: var(--surface);
    border: 2px solid var(--accent);
    color: var(--accent);
    font-size: 18px;
    flex-shrink: 0;
}
.timeline-year {
    display: inline-block;
    padding: 2px var(--sp-3);
    border-radius: var(--radius-pill);
    background: var(--accent-subtle);
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
}
.timeline-body h3 { margin-top: var(--sp-2); font-size: 19px; }
.timeline-body p { margin-top: var(--sp-1); color: var(--text-muted); }

/* ---- Team ---- */
.team-card { padding: var(--sp-8); text-align: center; }
.team-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px; height: 88px;
    border-radius: var(--radius-pill);
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.team-card h3 { margin-top: var(--sp-5); font-size: 18px; }
.team-role { margin-top: var(--sp-1) !important; font-size: 14px; font-weight: 600; color: var(--accent); }
.team-bio { margin-top: var(--sp-2) !important; font-size: 14px; color: var(--text-muted); }

/* ---- Stats band ---- */
.stats-band {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, #075C64 0%, #0B3F55 55%, #14325C 100%);
    color: #FFFFFF;
    overflow: hidden;
}
.stats-band-item { padding: var(--sp-10) var(--sp-8); }
.stats-band-item + .stats-band-item { border-left: 1px solid rgba(255, 255, 255, 0.14); }
.stats-band-value { font-size: 40px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.stats-band-label { margin-top: var(--sp-2); font-size: 15px; color: #CFE3E5; }

/* ---- Testimonials ---- */
.quote-card { margin: 0; display: flex; flex-direction: column; padding: var(--sp-8); }
.quote-stars { display: flex; gap: 2px; color: #F5A524; font-size: 15px; }
.quote-text { flex: 1; margin-left: 0; margin-right: 0; margin-bottom: 0; margin-top: var(--sp-4) !important; font-size: 17px; line-height: 1.6; color: var(--text); }
.quote-author { display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-6); padding-top: var(--sp-5); border-top: 1px solid var(--border); }
.quote-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px; height: 42px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 600;
}
.quote-name { font-size: 15px; font-weight: 600; }
.quote-role { font-size: 13px; color: var(--text-muted); }

/* --------------------------------------------------------------------------
   9. FAQ
   -------------------------------------------------------------------------- */
.faq-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.faq-item[open] { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.faq-item > summary {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    padding: var(--sp-5) var(--sp-6);
    list-style: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary:hover { color: var(--accent); }
.faq-q { flex: 1; min-width: 0; }
.faq-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    border-radius: var(--radius-pill);
    background: var(--surface-sunken);
    color: var(--text-muted);
    font-size: 13px;
    flex-shrink: 0;
    transition: transform var(--transition), background var(--transition), color var(--transition);
}
.faq-item[open] .faq-chevron { transform: rotate(180deg); background: var(--accent-subtle); color: var(--accent); }
.faq-a { padding: 0 var(--sp-6) var(--sp-6); color: var(--text-muted); font-size: 15px; line-height: 1.7; }
.faq-item .icon-chip-sm { margin-left: calc(-1 * var(--sp-1)); }
.faq-item > .faq-a { padding-left: calc(var(--sp-6) + 36px + var(--sp-4) - var(--sp-1)); }

.faq-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--sp-10); align-items: start; }
.faq-aside { position: sticky; top: calc(var(--header-h) + var(--sp-6)); display: flex; flex-direction: column; gap: var(--sp-4); }

.faq-toolbar { display: flex; flex-direction: column; gap: var(--sp-4); margin-bottom: var(--sp-6); }
.search { position: relative; }
.search > .bi {
    position: absolute;
    left: var(--sp-4);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-subtle);
    font-size: 17px;
    pointer-events: none;
}
.search .input { height: 52px; padding-left: 46px; font-size: 16px; }
.search-clear {
    position: absolute;
    right: var(--sp-3);
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    border: none;
    border-radius: var(--radius-pill);
    background: var(--surface-sunken);
    color: var(--text-muted);
    cursor: pointer;
}
.search-clear:hover { background: var(--surface-hover); color: var(--text); }

.filter-chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    padding: 7px var(--sp-4);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-pill);
    background: var(--surface);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.filter-chip:hover { color: var(--text); border-color: var(--text-subtle); }
.filter-chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #FFFFFF; }
.filter-count {
    min-width: 20px;
    padding: 0 6px;
    border-radius: var(--radius-pill);
    background: var(--surface-sunken);
    font-size: 12px;
    font-weight: 600;
    line-height: 20px;
    text-align: center;
    color: var(--text-muted);
}
.filter-chip[aria-pressed="true"] .filter-count { background: rgba(255, 255, 255, 0.16); color: #FFFFFF; }
.result-count { font-size: 14px; color: var(--text-muted); }

.is-filtered-out { display: none !important; }

/* --------------------------------------------------------------------------
   10. Forms
   -------------------------------------------------------------------------- */
.field { margin-bottom: var(--sp-5); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
.label { display: block; margin-bottom: var(--sp-2); font-size: 14px; font-weight: 500; color: var(--text); }
.input, .textarea, .select {
    width: 100%;
    padding: 11px var(--sp-4);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-family: inherit;
    font-size: 15px;
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.input::placeholder, .textarea::placeholder { color: var(--text-subtle); }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
.textarea { min-height: 140px; resize: vertical; }
.hint { margin-top: var(--sp-3); display: flex; gap: var(--sp-2); font-size: 13px; color: var(--text-muted); }
.hint .bi { color: var(--text-subtle); margin-top: 2px; }

/* ---- Contact info list ---- */
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-item { display: flex; gap: var(--sp-4); padding: var(--sp-5) 0; }
.contact-item + .contact-item { border-top: 1px solid var(--border); }
.contact-item h3 { font-size: 15px; }
.contact-item-value { margin-top: 2px !important; font-size: 15px; font-weight: 500; color: var(--text); word-break: break-word; }
.contact-item-note { margin-top: 2px !important; font-size: 13px; color: var(--text-muted); }

.contact-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--sp-10); align-items: start; }

.map-frame {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    background: var(--surface-sunken);
}
.map-frame iframe { display: block; width: 100%; height: 420px; border: 0; }

/* ---- Notices (flash messages) ---- */
.notice {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-3);
    padding: var(--sp-4);
    margin-bottom: var(--sp-3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    font-size: 14px;
}
.notice-icon { font-size: 16px; line-height: 22px; flex-shrink: 0; }
.notice-body { flex: 1; min-width: 0; }
.notice-close { border: none; background: transparent; cursor: pointer; color: var(--text-subtle); padding: 2px; line-height: 1; }
.notice-close:hover { color: var(--text); }
.notice-success { background: var(--positive-subtle); border-color: #ABEFC6; }
.notice-success .notice-icon { color: var(--positive); }
.notice-danger  { background: var(--negative-subtle); border-color: #FECDCA; }
.notice-danger .notice-icon { color: var(--negative); }
.notice-warning { background: var(--warning-subtle); border-color: #FEDF89; }
.notice-warning .notice-icon { color: var(--warning); }
.notice-info    { background: var(--info-subtle); border-color: #B2DDFF; }
.notice-info .notice-icon { color: var(--info); }

/* ---- Empty state ---- */
.empty { padding: var(--sp-12) var(--sp-6); text-align: center; border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px; height: 48px;
    margin-bottom: var(--sp-3);
    border-radius: var(--radius-pill);
    background: var(--surface-sunken);
    color: var(--text-subtle);
    font-size: 20px;
}
.empty-title { font-size: 16px; font-weight: 600; }
.empty-text { margin-top: var(--sp-1); font-size: 14px; color: var(--text-muted); }

/* --------------------------------------------------------------------------
   11. Legal documents
   -------------------------------------------------------------------------- */
.legal-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--sp-12); align-items: start; }
.legal-toc { position: sticky; top: calc(var(--header-h) + var(--sp-6)); }
.legal-toc-title { margin-bottom: var(--sp-3); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.legal-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.legal-toc a {
    display: block;
    margin-left: -1px;
    padding: 6px var(--sp-4);
    border-left: 2px solid transparent;
    font-size: 14px;
    color: var(--text-muted);
    transition: color var(--transition), border-color var(--transition);
}
.legal-toc a:hover { color: var(--text); }
.legal-toc a.is-active { color: var(--accent); border-left-color: var(--accent); font-weight: 500; }

.legal { max-width: 720px; font-size: 16px; line-height: 1.75; color: #344054; }
.legal section + section { margin-top: var(--sp-10); }
.legal h2 { font-size: 22px; line-height: 1.3; color: var(--text); }
.legal h2 .legal-num { color: var(--text-subtle); font-weight: 500; margin-right: var(--sp-2); }
.legal p { margin-top: var(--sp-3); }
.legal ul { margin: var(--sp-3) 0 0; padding-left: var(--sp-6); }
.legal li { margin-top: var(--sp-2); }
.legal li::marker { color: var(--accent); }
.legal strong { color: var(--text); font-weight: 600; }
.legal-meta {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    margin-top: var(--sp-4);
    padding: 6px var(--sp-3);
    border: 1px solid var(--on-dark-border);
    border-radius: var(--radius-pill);
    font-size: 13px;
    color: #DAEAEB;
}
.legal-contact { margin-top: var(--sp-4); padding: var(--sp-5) var(--sp-6); border-radius: var(--radius); background: var(--surface-sunken); border: 1px solid var(--border); }
.legal-contact p { margin: 0; display: flex; align-items: center; gap: var(--sp-3); }
.legal-contact p + p { margin-top: var(--sp-2); }
.legal-contact .bi { color: var(--accent); }

/* --------------------------------------------------------------------------
   12. CTA band
   -------------------------------------------------------------------------- */
.cta-band {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-8);
    padding: var(--sp-12) var(--sp-12);
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, #0A737B 0%, #075C64 40%, #0B3F55 75%, #14325C 100%);
    color: #FFFFFF;
}
.cta-band::after {
    content: "";
    position: absolute;
    top: -60%; right: -8%;
    width: 420px; height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 70%);
    pointer-events: none;
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { font-size: 32px; line-height: 1.2; color: #FFFFFF; }
.cta-band p { margin-top: var(--sp-3); font-size: 17px; color: #DAEAEB; }
.cta-band-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); flex-shrink: 0; }

/* Small help card (FAQ sidebar, services). */
.help-card { padding: var(--sp-6); border-radius: var(--radius-lg); background: var(--navy); color: #FFFFFF; }
.help-card h3 { margin-top: var(--sp-4); font-size: 18px; color: #FFFFFF; }
.help-card p { margin-top: var(--sp-2); font-size: 14px; color: var(--on-dark-muted); }
.help-card .btn { margin-top: var(--sp-5); }
.help-card .icon-chip { background: rgba(127, 231, 218, 0.14); color: var(--on-dark-accent); }

.link-list { list-style: none; margin: 0; padding: 0; }
.link-list a {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-3) 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    transition: color var(--transition);
}
.link-list li + li a { border-top: 1px solid var(--border); }
.link-list a:hover { color: var(--accent); }
.link-list .bi { color: var(--text-subtle); }
.link-list .bi-arrow-right { margin-left: auto; font-size: 13px; }
.card-title-sm { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--sp-2) !important; }

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.site-footer {
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
    color: var(--on-dark-muted);
    font-size: 15px;
}
.footer-top {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)) minmax(0, 1.3fr);
    gap: var(--sp-10);
    padding: var(--sp-16) 0 var(--sp-12);
}
.footer-brand .brand-name { color: #FFFFFF; }
.footer-brand .brand-sub { color: var(--on-dark-subtle); }
.footer-brand .brand img { border-color: transparent; }
.footer-about { margin-top: var(--sp-4) !important; max-width: 320px; line-height: 1.6; }
.footer-heading { margin-bottom: var(--sp-4) !important; font-size: 13px !important; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #FFFFFF !important; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li + li { margin-top: var(--sp-3); }
/* .site-body prefix: must out-rank the prose-link rule, which would
   otherwise paint these teal on the navy. */
.site-body .footer-links a { color: var(--on-dark-muted); text-decoration: none; transition: color var(--transition); }
.site-body .footer-links a:hover { color: #FFFFFF; }
.footer-contact li { display: flex; align-items: flex-start; gap: var(--sp-3); min-width: 0; }
.footer-contact li > :last-child { min-width: 0; overflow-wrap: anywhere; }
.footer-contact .bi { margin-top: 3px; color: var(--on-dark-accent); }

.social { display: flex; gap: var(--sp-2); margin-top: var(--sp-6); }
.site-body .social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border: 1px solid var(--on-dark-border);
    border-radius: var(--radius-pill);
    color: #FFFFFF;
    transition: background var(--transition), border-color var(--transition);
}
.site-body .social a:hover { background: rgba(255, 255, 255, 0.10); border-color: rgba(255, 255, 255, 0.35); }

.newsletter { display: flex; gap: var(--sp-2); margin-top: var(--sp-4); }
.newsletter .input {
    flex: 1;
    min-width: 0;
    border-color: var(--on-dark-border);
    background: rgba(255, 255, 255, 0.06);
    color: #FFFFFF;
}
.newsletter .input::placeholder { color: var(--on-dark-subtle); }
.newsletter .input:focus { border-color: var(--on-dark-accent); }
.newsletter-msg { margin-top: var(--sp-3) !important; font-size: 14px; }
.newsletter-msg.is-success { color: #6EE7B7; }
.newsletter-msg.is-error { color: #FECDCA; }

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    padding: var(--sp-6) 0;
    border-top: 1px solid var(--on-dark-border);
    font-size: 14px;
    color: var(--on-dark-subtle);
}
.footer-bottom-links { display: flex; gap: var(--sp-6); }
.site-body .footer-bottom-links a { color: var(--on-dark-subtle); text-decoration: none; }
.site-body .footer-bottom-links a:hover { color: #FFFFFF; }

/* --------------------------------------------------------------------------
   13b. Auth pages (templates extending auth_base.html)
   Split screen: brand panel left, form right. The panel drops away on
   narrow screens and a compact brand bar takes its place.
   -------------------------------------------------------------------------- */
.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    min-height: 100vh;
}

.auth-panel {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: var(--sp-10) var(--sp-12);
    overflow: hidden;
    background: linear-gradient(160deg, #0A737B 0%, #075C64 30%, #0B3F55 65%, #14325C 100%);
    color: var(--on-dark);
}
.auth-panel::before {
    /* Same grid texture as the site hero. */
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse at 30% 60%, #000 0%, transparent 75%);
    mask-image: radial-gradient(ellipse at 30% 60%, #000 0%, transparent 75%);
    pointer-events: none;
}
.auth-panel > * { position: relative; z-index: 1; }
.auth-panel .brand-name { color: #FFFFFF; }
.auth-panel .brand-sub { color: var(--on-dark-subtle); }
.auth-panel .brand img { border-color: transparent; }

.auth-panel-body { margin: auto 0; padding: var(--sp-10) 0; max-width: 440px; }
.auth-panel-title {
    font-size: 36px !important;
    line-height: 1.15;
    letter-spacing: -0.03em !important;
    color: #FFFFFF !important;
}
.auth-panel-title em { font-style: normal; color: var(--on-dark-accent); }
.auth-panel-text { margin-top: var(--sp-4) !important; font-size: 17px; line-height: 1.6; color: #DAEAEB; }

.auth-points { list-style: none; margin: var(--sp-8) 0 0; padding: 0; }
.auth-point { display: flex; align-items: flex-start; gap: var(--sp-3); font-size: 15px; color: #FFFFFF; }
.auth-point + .auth-point { margin-top: var(--sp-4); }
.auth-point .bi {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    border-radius: var(--radius-pill);
    background: rgba(127, 231, 218, 0.14);
    color: var(--on-dark-accent);
    font-size: 14px;
    flex-shrink: 0;
}
.auth-point span { padding-top: 3px; }

.auth-panel-foot { font-size: 13px; color: var(--on-dark-subtle); }
.site-body .auth-panel-foot a { color: var(--on-dark-muted); }
.site-body .auth-panel-foot a:hover { color: #FFFFFF; }

/* ---- Form column ---- */
.auth-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: var(--sp-6) var(--sp-12);
    background: var(--surface);
}
.auth-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    min-height: 44px;
}
.auth-topbar .brand { display: none; }
.auth-back {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    transition: color var(--transition);
}
.auth-back:hover { color: var(--text); }
.auth-topbar-alt { margin-left: auto; font-size: 14px; color: var(--text-muted); }
.auth-topbar-alt a { font-weight: 600; }

.auth-content {
    width: 100%;
    max-width: 440px;
    margin: auto;
    padding: var(--sp-10) 0;
}
.auth-content.is-wide { max-width: 600px; }

.auth-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px; height: 52px;
    margin-bottom: var(--sp-5);
    border-radius: var(--radius);
    background: var(--accent-subtle);
    color: var(--accent);
    font-size: 24px;
}
.auth-title { font-size: 30px; line-height: 1.2; letter-spacing: -0.025em; }
.auth-sub { margin-top: var(--sp-2) !important; font-size: 16px; color: var(--text-muted); }
.auth-sub strong { color: var(--text); font-weight: 600; word-break: break-all; }
.auth-form { margin-top: var(--sp-8); }
.auth-content .flash-stack { padding-top: 0; margin-top: var(--sp-6); }
.auth-content .flash-stack + .auth-form { margin-top: var(--sp-5); }

/* Field with leading icon + inline error. */
.input-icon { position: relative; }
.input-icon > .bi {
    position: absolute;
    left: var(--sp-4);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-subtle);
    font-size: 16px;
    pointer-events: none;
}
.input-icon.has-icon > .input, .input-icon.has-icon > .select,
.input-icon.has-icon > .textarea { padding-left: 44px; }
.input-icon.is-textarea > .bi { top: 14px; transform: none; }
.input-icon.has-toggle > .input { padding-right: 48px; }
.pw-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-subtle);
    font-size: 16px;
    cursor: pointer;
}
.pw-toggle:hover { color: var(--text); background: var(--surface-hover); }

.auth-form .input, .auth-form .select { height: 46px; }
.auth-form .textarea { min-height: 88px; }
.select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23667085' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
}
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); }
.label-row .label { margin-bottom: var(--sp-2); }
.label-link { font-size: 13px; font-weight: 500; }
.field-hint { margin-top: var(--sp-2) !important; font-size: 13px; color: var(--text-muted); }
.field-error {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: var(--sp-2) !important;
    font-size: 13px;
    color: var(--negative);
}
.field-error .bi { margin-top: 2px; }
.input.has-error, .select.has-error, .textarea.has-error { border-color: var(--negative); }
.input.has-error:focus, .select.has-error:focus, .textarea.has-error:focus { box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.16); }

/* Grouped sections on the long registration form. */
.form-section + .form-section { margin-top: var(--sp-6); padding-top: var(--sp-6); border-top: 1px solid var(--border); }
.form-section-title {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    margin-bottom: var(--sp-4) !important;
    font-size: 12px !important;
    font-weight: 600;
    letter-spacing: 0.06em !important;
    text-transform: uppercase;
    color: var(--text-muted) !important;
}
.form-section-title .step-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px; height: 20px;
    border-radius: var(--radius-pill);
    background: var(--navy);
    color: #fff;
    font-size: 11px;
    letter-spacing: 0;
}
.field-row-3 { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 0.8fr); gap: var(--sp-4); }

/* Checkbox rows. */
.check {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-3);
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
}
.check input[type="checkbox"] {
    width: 18px; height: 18px;
    margin: 2px 0 0;
    accent-color: var(--accent);
    flex-shrink: 0;
    cursor: pointer;
}
.auth-options { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-5); }

/* Password strength (client-side hint only; the server enforces the rule). */
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: var(--sp-2); }
.pw-meter span { height: 4px; border-radius: 2px; background: var(--border); transition: background var(--transition); }
.pw-meter[data-score="1"] span:nth-child(-n+1) { background: var(--negative); }
.pw-meter[data-score="2"] span:nth-child(-n+2) { background: var(--warning); }
.pw-meter[data-score="3"] span:nth-child(-n+3) { background: #0E7090; }
.pw-meter[data-score="4"] span { background: var(--positive); }
.pw-meter-label { margin-top: 6px !important; font-size: 12px; color: var(--text-muted); }

/* One-time code input. */
.code-input {
    height: 64px !important;
    font-family: var(--font-num);
    font-variant-numeric: tabular-nums;
    font-size: 28px !important;
    font-weight: 600;
    letter-spacing: 0.5em;
    text-align: center;
    padding-left: calc(var(--sp-4) + 0.5em) !important;
}
.code-input::placeholder { letter-spacing: 0.5em; color: var(--border-strong); }

.recaptcha { margin-bottom: var(--sp-5); min-height: 78px; }
.recaptcha > div { max-width: 100%; }

.auth-submit .bi-arrow-repeat { display: none; }
.auth-submit.is-loading .bi-arrow-repeat { display: inline-block; animation: spin 0.8s linear infinite; }
.auth-submit.is-loading .bi-arrow-right { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.auth-divider {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    margin: var(--sp-6) 0;
    font-size: 13px;
    color: var(--text-subtle);
}
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.auth-alt { margin-top: var(--sp-6) !important; font-size: 14px; color: var(--text-muted); text-align: center; }
.auth-alt a { font-weight: 600; }
.auth-help {
    display: flex;
    gap: var(--sp-3);
    margin-top: var(--sp-6);
    padding: var(--sp-4);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-sunken);
    font-size: 14px;
    color: var(--text-muted);
}
.auth-help .bi { color: var(--accent); font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.auth-help strong { color: var(--text); font-weight: 600; }

/* Collapsible helper (e.g. resend verification code on sign-in). */
.auth-disclosure { display: block; }
.auth-disclosure > summary { display: flex; gap: var(--sp-3); list-style: none; cursor: pointer; }
.auth-disclosure > summary::-webkit-details-marker { display: none; }
.auth-disclosure > summary::after { content: "\F282"; font-family: "bootstrap-icons"; margin-left: auto; color: var(--text-subtle); transition: transform var(--transition); }
.auth-disclosure[open] > summary::after { transform: rotate(180deg); }
.auth-inline-form { display: flex; gap: var(--sp-2); margin-top: var(--sp-4); }
.auth-inline-form .input { flex: 1; min-width: 0; height: 42px; }

/* Progress for the password-reset flow (email -> code -> new password). */
.auth-steps { display: flex; gap: var(--sp-2); margin-bottom: var(--sp-6); list-style: none; padding: 0; }
.auth-steps li { flex: 1; }
.auth-steps .bar { display: block; height: 4px; border-radius: 2px; background: var(--border); }
.auth-steps li.is-done .bar, .auth-steps li.is-current .bar { background: var(--accent); }
.auth-steps .cap { display: block; margin-top: 6px; font-size: 12px; color: var(--text-subtle); }
.auth-steps li.is-current .cap { color: var(--text); font-weight: 500; }

.auth-foot { padding-top: var(--sp-4); font-size: 13px; color: var(--text-subtle); text-align: center; }
.site-body .auth-foot a { color: var(--text-muted); text-decoration: none; }
.site-body .auth-foot a:hover { color: var(--text); }
.auth-foot .sep { margin: 0 var(--sp-2); }

@media (max-width: 1080px) {
    .auth-panel { padding: var(--sp-8); }
    .auth-main { padding: var(--sp-6) var(--sp-8); }
}

@media (max-width: 900px) {
    .auth-shell { grid-template-columns: minmax(0, 1fr); }
    .auth-panel { display: none; }
    .auth-topbar { padding-bottom: var(--sp-4); border-bottom: 1px solid var(--border); }
    .auth-topbar .brand { display: flex; }
    .auth-back span { display: none; }
    .auth-content { margin: 0 auto; padding-top: var(--sp-8); }
}

@media (max-width: 600px) {
    .auth-main { padding: var(--sp-4); }
    .auth-title { font-size: 26px; }
    .field-row-3 { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .auth-topbar-alt { display: none; }
    .recaptcha { transform: scale(0.92); transform-origin: 0 0; }
}

/* --------------------------------------------------------------------------
   14. Utilities
   -------------------------------------------------------------------------- */
.tint-teal   { background: var(--tint-teal-bg);   color: var(--tint-teal-fg); }
.tint-blue   { background: var(--tint-blue-bg);   color: var(--tint-blue-fg); }
.tint-violet { background: var(--tint-violet-bg); color: var(--tint-violet-fg); }
.tint-green  { background: var(--tint-green-bg);  color: var(--tint-green-fg); }
.tint-amber  { background: var(--tint-amber-bg);  color: var(--tint-amber-fg); }
.tint-rose   { background: var(--tint-rose-bg);   color: var(--tint-rose-fg); }
.tint-cyan   { background: var(--tint-cyan-bg);   color: var(--tint-cyan-fg); }
.tint-indigo { background: var(--tint-indigo-bg); color: var(--tint-indigo-fg); }

.u-mt-4 { margin-top: var(--sp-4); }
.u-mt-6 { margin-top: var(--sp-6); }
.u-mt-8 { margin-top: var(--sp-8); }
.u-mt-12 { margin-top: var(--sp-12); }
.u-center { text-align: center; }
.u-muted { color: var(--text-muted); }

.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;
}

/* --------------------------------------------------------------------------
   15. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
    .hero-title { font-size: 46px; }
    .hero-grid { gap: var(--sp-10); }
    .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats-band-item:nth-child(3) { border-left: none; }
    .stats-band-item:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, 0.14); }
    .faq-layout { grid-template-columns: minmax(0, 1fr); }
    .faq-aside { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .site-nav, .header-actions { display: none; }
    .nav-toggle { display: inline-flex; }

    .section { padding: var(--sp-16) 0; }
    .section-title { font-size: 30px; }
    .hero { padding: var(--sp-12) 0 var(--sp-16); }
    .hero-grid { grid-template-columns: minmax(0, 1fr); }
    .preview { max-width: 460px; margin: var(--sp-4) auto 0; }
    .preview-float.is-top { right: -8px; }
    .preview-float.is-bottom { left: -8px; }

    .grid-3, .steps { grid-template-columns: minmax(0, 1fr); }
    .step:not(:last-child)::after { display: none; }
    .trust-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .trust-item:nth-child(3) { border-left: none; }
    .trust-item:nth-child(n+3) { border-top: 1px solid var(--border); }

    .split, .service-detail { grid-template-columns: minmax(0, 1fr); gap: var(--sp-8); }
    .service-detail.is-reverse .service-detail-media { order: 0; }
    .split-badge { right: 12px; }

    .cta-band { flex-direction: column; align-items: flex-start; padding: var(--sp-10) var(--sp-8); }
    .legal-layout, .contact-layout { grid-template-columns: minmax(0, 1fr); }
    .legal-toc { display: none; }
}

@media (max-width: 600px) {
    .container { padding: 0 var(--sp-4); }
    .section { padding: var(--sp-12) 0; }
    .section-head { margin-bottom: var(--sp-8); }
    .section-title { font-size: 26px; }
    .section-lead { font-size: 16px; }

    .hero-title, .page-hero .hero-title { font-size: 34px; }
    .hero-lead { font-size: 17px; }
    .hero-actions .btn { flex: 1 1 100%; }
    .hero-stats { gap: var(--sp-6); }
    .hero-stat-value { font-size: 22px; }
    .preview-float { display: none; }
    .page-hero { padding: var(--sp-10) 0 var(--sp-12); }

    .grid-2, .grid-4, .field-row, .check-list { grid-template-columns: minmax(0, 1fr); }
    .trust-list { grid-template-columns: minmax(0, 1fr); }
    .trust-item { justify-content: flex-start; padding: var(--sp-4) 0; }
    .trust-item + .trust-item { border-left: none; border-top: 1px solid var(--border); }

    .feature-card, .step, .card-pad, .quote-card, .team-card { padding: var(--sp-6); }
    .mv-card { padding: var(--sp-6); }
    .statement { padding: var(--sp-10) var(--sp-5); }
    .statement-text { font-size: 20px; }
    .stats-band { grid-template-columns: minmax(0, 1fr); }
    .stats-band-item { padding: var(--sp-6); }
    .stats-band-item + .stats-band-item { border-left: none; border-top: 1px solid rgba(255, 255, 255, 0.14); }
    .stats-band-value { font-size: 32px; }
    .cta-band { padding: var(--sp-8) var(--sp-5); }
    .cta-band h2 { font-size: 26px; }
    .cta-band-actions, .cta-band-actions .btn { width: 100%; }
    .service-detail h2 { font-size: 26px; }

    .faq-item > summary { padding: var(--sp-4); font-size: 15px; gap: var(--sp-3); }
    .faq-item > .faq-a { padding: 0 var(--sp-4) var(--sp-4); }
    .faq-aside { grid-template-columns: minmax(0, 1fr); }

    .footer-top { grid-template-columns: minmax(0, 1fr); gap: var(--sp-8); padding: var(--sp-12) 0 var(--sp-8); }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
    .map-frame iframe { height: 320px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

@media print {
    .site-header, .site-footer, .mobile-nav, .nav-backdrop, .legal-toc { display: none !important; }
    .hero { background: #fff !important; color: var(--text) !important; padding: 0 0 var(--sp-6); }
    .hero::before { display: none; }
    .hero-title, .hero-lead, .legal-meta { color: var(--text) !important; }
    .legal-layout { grid-template-columns: 1fr; }
}
