/* ==========================================================================
   White Card Practice Test — Design System
   "Hi-vis construction, premium"  ·  Rebuilt in design review
   Charcoal + hi-vis yellow · clean spacing · clear hierarchy
   All existing class/id hooks preserved so JS + markup keep working.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

/* ---- Design tokens ------------------------------------------------------ */
:root {
    /* Brand */
    --hv:        #FFD400;   /* hi-vis yellow */
    --hv-deep:   #F2C200;   /* hover */
    --hv-soft:   #FFF6CC;   /* tints / wash */
    --ink:       #16181D;   /* charcoal near-black */
    --ink-2:     #23262E;   /* raised dark surface */
    --ink-3:     #353A45;

    /* Neutrals */
    --bg:        #EEF0F3;   /* page */
    --surface:   #FFFFFF;   /* cards */
    --surface-2: #F7F8FA;   /* subtle panels */
    --line:      #E2E5EA;   /* borders */
    --line-2:    #D4D8DF;
    --text:      #1B1E24;   /* body text */
    --muted:     #677082;   /* secondary text */
    --muted-2:   #8A93A3;

    /* Status */
    --green:     #1B873F;
    --green-bg:  #E7F5EC;
    --red:       #C92A2A;
    --red-bg:    #FBEAEA;

    /* Shape */
    --r-sm: 10px;
    --r:    14px;
    --r-lg: 20px;
    --r-pill: 999px;

    /* Elevation */
    --sh-sm: 0 1px 2px rgba(16,18,24,.06), 0 1px 3px rgba(16,18,24,.05);
    --sh:    0 4px 14px rgba(16,18,24,.08);
    --sh-md: 0 10px 30px rgba(16,18,24,.10);
    --sh-lg: 0 22px 50px rgba(16,18,24,.16);

    /* Layout */
    --maxw: 900px;
    --gut: 22px;

    /* Type */
    --ff: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --ff-display: 'Space Grotesk', var(--ff);
}

/* ---- Reset -------------------------------------------------------------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    font-family: var(--ff);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-color: var(--hv-deep); text-underline-offset: 3px; }

:target { scroll-margin-top: 120px; }

::selection { background: var(--hv); color: var(--ink); }

.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--gut);
}

/* ---- Headings ----------------------------------------------------------- */
h1, h2, h3, h4,
.font-display { color: var(--ink); line-height: 1.18; letter-spacing: -0.02em; font-weight: 700; font-family: var(--ff-display); }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.6vw, 2rem); }
h3 { font-size: 1.2rem; }
p { color: var(--text); }

/* ==========================================================================
   HEADER (premium · hi-vis accent)
   ========================================================================== */
body > header.site-header {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fb 55%, var(--surface-2) 100%);
    color: var(--ink);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: none;
    box-shadow:
        0 4px 22px rgba(16, 18, 24, 0.07),
        inset 4px 0 0 var(--ink),
        inset 8px 0 0 var(--hv);
}
@supports (backdrop-filter: blur(12px)) {
    body > header.site-header {
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 249, 251, 0.95) 55%, rgba(247, 248, 250, 0.92) 100%);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }
}
/* Soft hi-vis glow + mesh (decorative) */
body > header.site-header::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 4px;
    pointer-events: none;
    z-index: 0;
    background:
        linear-gradient(118deg, rgba(255, 212, 0, 0.14) 0%, transparent 38%),
        radial-gradient(ellipse 90% 80% at 100% -30%, rgba(255, 212, 0, 0.16), transparent 50%),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 11px,
            rgba(16, 18, 24, 0.018) 11px,
            rgba(16, 18, 24, 0.018) 12px
        );
}
body > header.site-header::after {
    content: "";
    display: block;
    position: relative;
    z-index: 1;
    height: 4px;
    background-image: repeating-linear-gradient(
        -45deg, var(--hv) 0, var(--hv) 12px, var(--ink) 12px, var(--ink) 24px);
}
body > header.site-header > .container {
    position: relative;
    z-index: 1;
    max-width: min(1280px, 100%);
}

.site-header__top {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px 12px;
    padding: 14px 0 12px;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}
.site-brand:hover { text-decoration: none; }
.site-brand__mark {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, var(--ink) 0%, var(--ink-3) 100%);
    color: var(--hv);
    font-family: var(--ff-display);
    font-weight: 700;
    font-size: .85rem;
    border-radius: 12px;
    border: 2px solid var(--hv);
    box-shadow:
        0 3px 10px rgba(16, 18, 24, 0.18),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}
.site-brand:hover .site-brand__mark {
    box-shadow:
        0 4px 14px rgba(255, 212, 0, 0.35),
        0 3px 10px rgba(16, 18, 24, 0.2);
}
.site-brand__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.site-brand__title {
    font-family: var(--ff-display);
    font-weight: 700;
    font-size: clamp(1rem, 0.9rem + 0.5vw, 1.2rem);
    color: var(--ink);
    line-height: 1.15;
}
.site-brand__tagline {
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.secondary-nav {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 2px;
    min-width: 0;
}
.nav-link {
    font-family: var(--ff-display);
    color: var(--muted);
    font-size: .74rem;
    font-weight: 600;
    padding: 7px 9px;
    border-radius: 8px;
    border: 1px solid transparent;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.nav-link:hover {
    background: var(--hv-soft);
    color: var(--ink);
    text-decoration: none;
    border-color: rgba(255, 212, 0, 0.45);
}
.nav-link[aria-current="page"] {
    background: var(--ink);
    color: var(--hv);
    box-shadow: 0 2px 8px rgba(16, 18, 24, 0.15);
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--ink);
    font-family: var(--ff-display);
    font-weight: 700;
    font-size: .82rem;
    padding: 9px 16px;
    border-radius: var(--r-pill);
    cursor: pointer;
    transition: all 0.15s ease;
}
.nav-toggle:hover {
    background: var(--hv);
    border-color: var(--hv-deep);
}

.font-resize-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.font-resize-toolbar__label {
    font-family: var(--ff-display);
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted-2);
    white-space: nowrap;
}
.font-resize-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    font-weight: 800;
    font-size: .78rem;
    cursor: pointer;
    transition: all 0.15s ease;
}
.font-resize-btn:hover {
    background: var(--hv);
    border-color: var(--hv-deep);
}

.site-header__states-wrap {
    display: flex;
    align-items: center;
    gap: 12px 16px;
    padding: 9px 0 12px;
    border-top: 1px solid rgba(16, 18, 24, 0.08);
    background: linear-gradient(
        90deg,
        rgba(255, 246, 204, 0.55) 0%,
        rgba(247, 248, 250, 0.9) 22%,
        rgba(247, 248, 250, 0.95) 100%
    );
}
.site-header__tools {
    margin-left: auto;
    padding: 4px 0 4px 12px;
    border-left: 1px solid var(--line-2);
    background: rgba(255, 255, 255, 0.65);
    border-radius: var(--r-sm);
}
.state-selector {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.state-selector::-webkit-scrollbar { display: none; }
.state-selector::before {
    content: "States";
    font-family: var(--ff-display);
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted-2);
    margin-right: 4px;
}
.state-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 13px;
    font-size: .78rem;
    font-weight: 700;
    font-family: var(--ff-display);
    color: var(--text);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    box-shadow: 0 1px 2px rgba(16, 18, 24, 0.05);
    transition: all 0.15s ease;
}
@media (hover: hover) {
    .state-link:hover {
        background: var(--hv);
        border-color: var(--hv-deep);
        color: var(--ink);
        text-decoration: none;
    }
}
.state-link:active {
    background: var(--hv);
    border-color: var(--hv-deep);
    color: var(--ink);
    text-decoration: none;
}
.state-link[aria-current="page"] {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--hv);
}

.home-nav-btn {
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--ink);
    font-weight: 700;
    font-size: .82rem;
    padding: 8px 14px;
    border-radius: var(--r-pill);
    cursor: pointer;
    transition: all 0.15s ease;
}
.home-nav-btn:hover {
    background: var(--hv);
    border-color: var(--hv-deep);
}
.home-nav-btn[hidden] { display: none; }

/* Page title strip (state / topic / guide pages) */
.page-hero-bar {
    background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 55%, #2a2f3a 100%);
    border-bottom: 1px solid var(--ink-3);
    padding: 20px 0 22px;
    position: relative;
    overflow: hidden;
}
.page-hero-bar::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background-image: radial-gradient(var(--hv) 1px, transparent 1px);
    background-size: 18px 18px;
    pointer-events: none;
}
.page-hero-bar__title {
    position: relative;
    z-index: 1;
    font-family: var(--ff-display);
    font-size: clamp(1.35rem, 1rem + 1.5vw, 1.85rem);
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
    margin: 0;
}

/* Homepage editorial hero */
.home-editorial-hero {
    background: linear-gradient(145deg, var(--ink) 0%, var(--ink-2) 50%, #2a3040 100%);
    border-bottom: 1px solid var(--ink-3);
    padding: 28px 0 32px;
    position: relative;
    overflow: hidden;
}
/* Dots stay decorative at the edges — not behind the copy */
.home-editorial-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.18;
    background-image: radial-gradient(rgba(255, 212, 0, 0.55) 1px, transparent 1px);
    background-size: 22px 22px;
    pointer-events: none;
    /* Dots mainly on the right — copy sits on the left */
    mask-image: linear-gradient(
        90deg,
        transparent 0%,
        transparent 46%,
        rgba(0, 0, 0, 0.35) 58%,
        rgba(0, 0, 0, 0.9) 82%,
        black 100%
    );
    -webkit-mask-image: linear-gradient(
        90deg,
        transparent 0%,
        transparent 46%,
        rgba(0, 0, 0, 0.35) 58%,
        rgba(0, 0, 0, 0.9) 82%,
        black 100%
    );
}
.home-editorial-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        rgba(22, 24, 29, 0.88) 0%,
        rgba(22, 24, 29, 0.72) 42%,
        rgba(22, 24, 29, 0.25) 68%,
        transparent 100%
    );
    pointer-events: none;
}
.home-editorial-hero__inner {
    position: relative;
    z-index: 1;
    max-width: 640px;
    padding: 22px 26px 24px;
    background: rgba(16, 18, 24, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--r-lg);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}
@supports (backdrop-filter: blur(10px)) {
    .home-editorial-hero__inner {
        background: rgba(16, 18, 24, 0.52);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}
.home-editorial-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .68rem;
    font-weight: 700;
    font-family: var(--ff-display);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--hv);
    background: rgba(255, 212, 0, 0.12);
    border: 1px solid rgba(255, 212, 0, 0.28);
    padding: 6px 12px;
    border-radius: var(--r-pill);
    margin-bottom: 14px;
}
.home-editorial-hero__title {
    font-family: var(--ff-display);
    font-size: clamp(1.75rem, 1.2rem + 2.5vw, 2.75rem);
    font-weight: 600;
    color: #fff;
    line-height: 1.12;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.home-editorial-hero__accent {
    display: block;
    margin-top: 10px;
    font-weight: 700;
    color: var(--hv);
    font-size: 0.72em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.home-editorial-hero__list {
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
    display: grid;
    gap: 8px;
    max-width: 100%;
}
.home-editorial-hero__list li {
    position: relative;
    padding: 10px 14px 10px 38px;
    background: rgba(0, 0, 0, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--r-sm);
    font-size: 0.92rem;
    color: #f3f5f8;
    line-height: 1.45;
}
.home-editorial-hero__list li::before {
    content: "✓";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--hv);
    font-weight: 800;
    font-size: 0.75rem;
}
.home-editorial-hero__meta {
    margin-top: 14px;
    font-size: 0.86rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.82);
    letter-spacing: 0.02em;
}

/* Desktop: brand + single-line nav */
@media (min-width: 761px) {
    .nav-toggle { display: none; }
    .site-header__top {
        flex-wrap: nowrap;
    }
    .site-header__drawer {
        display: flex;
        flex: 1;
        min-width: 0;
        justify-content: flex-end;
    }
    .site-header__drawer-inner {
        display: flex;
        align-items: center;
        min-width: 0;
        width: 100%;
        justify-content: flex-end;
    }
    .site-header__drawer .secondary-nav {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    .site-header__drawer .secondary-nav::-webkit-scrollbar { display: none; }
    .site-header__drawer .secondary-nav {
        background: rgba(255, 255, 255, 0.75);
        border: 1px solid var(--line);
        border-radius: var(--r-pill);
        padding: 4px 8px;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }
    .site-brand__tagline { display: none; }
    .nav-link { font-size: .78rem; padding: 7px 10px; }
}

/* Mobile nav drawer (smooth expand) */
.site-header__drawer {
    display: grid;
    grid-template-rows: 1fr;
}
.site-header__drawer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    min-width: 0;
}
body.nav-menu-open {
    overflow: hidden;
}

.intro-content--modes {
    padding: 20px 22px 24px;
    background: transparent;
    border: none;
    box-shadow: none;
}
.intro-content--modes::before { display: none; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.review-mode-hint {
    font-size: 0.82rem;
    color: var(--muted);
    text-align: center;
    margin: -6px 0 10px;
    line-height: 1.45;
}

body.has-cookie-banner {
    padding-bottom: 100px;
}

/* ==========================================================================
   MAIN / SCREENS
   ========================================================================== */
main.container { flex: 1 0 auto; padding-top: 26px; padding-bottom: 30px; }

.screen { display: none; }
.screen.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- Hero / intro ------------------------------------------------------- */
.intro-content {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh);
    padding: 30px 26px 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.intro-content::before {
    content: "";
    position: absolute; inset: 0 0 auto 0;
    height: 5px;
    background-image: repeating-linear-gradient(
        -45deg, var(--hv) 0, var(--hv) 12px, var(--ink) 12px, var(--ink) 24px);
}
.intro-content h2 { margin: 6px 0 10px; }
.intro-text {
    color: var(--muted);
    font-size: 1.02rem;
    max-width: 52ch;
    margin: 0 auto 18px;
}
.intro-list {
    list-style: none;
    display: grid;
    gap: 10px;
    max-width: 460px;
    margin: 0 auto 18px;
    text-align: left;
}
.intro-list li {
    position: relative;
    padding: 10px 14px 10px 42px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    font-size: .95rem;
    color: var(--text);
}
.intro-list li::before {
    content: "✓";
    position: absolute;
    left: 12px; top: 50%;
    transform: translateY(-50%);
    width: 20px; height: 20px;
    display: grid; place-items: center;
    background: var(--hv);
    color: var(--ink);
    border-radius: 50%;
    font-size: .72rem;
    font-weight: 900;
}
.intro-meta {
    color: var(--muted-2);
    font-size: .86rem;
    font-weight: 600;
    margin: 14px 0 20px;
    letter-spacing: .01em;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-weight: 800;
    font-size: 1rem;
    line-height: 1;
    padding: 15px 28px;
    border: 1px solid transparent;
    border-radius: var(--r-pill);
    cursor: pointer;
    transition: transform .12s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
    text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

.btn-primary {
    background: var(--hv);
    color: var(--ink);
    box-shadow: 0 6px 18px rgba(255,212,0,.40);
}
.btn-primary:hover { background: var(--hv-deep); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(255,212,0,.5); color: var(--ink); }

.btn-secondary {
    background: var(--surface);
    color: var(--ink);
    border-color: var(--line-2);
}
.btn-secondary:hover { background: var(--surface-2); border-color: var(--ink); transform: translateY(-2px); color: var(--ink); }

/* Big hero CTA */
#start-btn { font-size: 1.12rem; padding: 17px 40px; }

/* ==========================================================================
   GAMIFICATION DASHBOARD (slim stat strip under hero)
   ========================================================================== */
.gamify-dashboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 20px auto 0;
    max-width: 620px;
}
.gamify-stat {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 16px 12px;
    text-align: center;
    box-shadow: var(--sh);
    position: relative;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.gamify-stat::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--hv), var(--hv-deep));
}
.gamify-stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--sh-md);
}
.gamify-icon { font-size: 1.2rem; display: block; line-height: 1; }
.gamify-value {
    display: block;
    font-family: var(--ff-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--ink);
    margin-top: 6px;
}
.gamify-label { display: block; font-size: .7rem; color: var(--muted); font-weight: 600; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.04em; }

/* ==========================================================================
   MODE SELECTION PANEL
   ========================================================================== */
.mode-selection {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh);
    padding: 24px 22px;
    margin-top: 22px;
}
.mode-selection__title {
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-weight: 800;
    color: var(--muted);
    text-align: center;
    margin-bottom: 16px;
}
.welcome-back {
    background: var(--hv-soft);
    border: 1px solid #F1E08A;
    border-radius: var(--r-sm);
    padding: 10px 14px;
    font-size: .92rem;
    font-weight: 700;
    color: #7a6500;
    text-align: center;
    margin-bottom: 16px;
}
.mode-buttons {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}
.btn-mode {
    width: 100%;
    justify-content: flex-start;
    background: #fff;
    border: 2px solid var(--ink);
    color: var(--ink);
    font-weight: 800;
    font-size: 1rem;
    padding: 15px 18px;
    border-radius: var(--r);
    text-align: left;
    box-shadow: var(--sh-sm);
}
.btn-mode:hover:not([disabled]),
.btn-mode:focus-visible:not([disabled]) {
    background: var(--hv);
    border-color: var(--ink);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 212, 0, 0.35);
    color: var(--ink);
}
/* Full Test stays yellow by default; turns white when hovering Quick Quiz or Review */
.mode-buttons .btn-mode:nth-child(2) {
    background: var(--hv);
    border-color: var(--ink);
    box-shadow: 0 6px 16px rgba(255, 212, 0, 0.4);
}
.mode-buttons:has(.btn-mode:hover) .btn-mode:nth-child(2):not(:hover):not(:focus-visible),
.mode-buttons:has(.btn-mode:focus-visible) .btn-mode:nth-child(2):not(:hover):not(:focus-visible) {
    background: #fff;
    box-shadow: var(--sh-sm);
    transform: none;
}
.mode-buttons .btn-mode:nth-child(2):hover,
.mode-buttons .btn-mode:nth-child(2):focus-visible {
    background: var(--hv);
    box-shadow: 0 6px 16px rgba(255, 212, 0, 0.4);
}
.btn-mode[disabled] { opacity: .5; cursor: not-allowed; }
.btn-mode[disabled]:hover {
    background: #fff;
    transform: none;
    box-shadow: var(--sh-sm);
}

/* Topic drill */
.topic-drill { border-top: 1px dashed var(--line-2); padding-top: 16px; }
.topic-drill-label {
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-weight: 800;
    color: var(--muted);
    text-align: center;
    margin-bottom: 12px;
}
.topic-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.btn-topic {
    background: var(--ink);
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
    padding: 9px 14px;
    border-radius: var(--r-pill);
    border: 1px solid var(--ink);
}
.btn-topic:hover { background: var(--hv); color: var(--ink); border-color: var(--hv); transform: translateY(-1px); }
.start-divider { display: none; } /* redundant with hero CTA */

/* ==========================================================================
   DAILY CHALLENGE
   ========================================================================== */
.daily-challenge {
    background: linear-gradient(180deg, #fff, var(--surface-2));
    border: 1px solid var(--line);
    border-left: 5px solid var(--hv);
    border-radius: var(--r);
    box-shadow: var(--sh-sm);
    padding: 20px;
    margin-top: 22px;
}
.dc-title { font-weight: 800; color: var(--ink); margin-bottom: 12px; }
.dc-question { font-weight: 600; margin-bottom: 14px; }
.dc-options { display: grid; gap: 8px; }
.dc-opt-btn {
    width: 100%;
    text-align: left;
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: var(--r-sm);
    padding: 12px 14px;
    font: inherit;
    font-size: .95rem;
    cursor: pointer;
    transition: all .15s ease;
}
.dc-opt-btn:hover:not([disabled]) { border-color: var(--ink); }
.dc-opt-btn[disabled] { cursor: default; }
.dc-correct { background: var(--green-bg) !important; border-color: var(--green) !important; color: #11532a; }
.dc-wrong   { background: var(--red-bg) !important; border-color: var(--red) !important; color: #7d1a1a; }
.dc-result { margin-top: 12px; font-weight: 700; }
.dc-result.dc-correct { color: var(--green); background: none !important; }
.dc-result.dc-wrong { color: var(--red); background: none !important; }

/* ==========================================================================
   QUIZ
   ========================================================================== */
.progress-container { margin-bottom: 20px; }
.progress-bar {
    height: 10px;
    background: var(--line);
    border-radius: var(--r-pill);
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--hv-deep), var(--hv));
    border-radius: var(--r-pill);
    transition: width .35s ease;
}
.progress-text {
    margin-top: 8px;
    font-size: .85rem;
    font-weight: 700;
    color: var(--muted);
    text-align: center;
}

.question-container {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh);
    padding: 28px 24px;
}
.question-text {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 22px;
    color: var(--ink);
}
.options-container { display: grid; gap: 11px; }
.option-btn {
    width: 100%;
    text-align: left;
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: var(--r);
    padding: 16px 18px 16px 52px;
    font: inherit;
    font-size: 1rem;
    color: var(--text);
    cursor: pointer;
    position: relative;
    transition: all .14s ease;
}
.option-btn::before {
    content: "";
    position: absolute; left: 16px; top: 50%;
    transform: translateY(-50%);
    width: 22px; height: 22px;
    border: 2px solid var(--line-2);
    border-radius: 50%;
    transition: all .14s ease;
}
.option-btn:hover:not([disabled]) { border-color: var(--ink); transform: translateY(-1px); box-shadow: var(--sh-sm); }
.option-btn:hover:not([disabled])::before { border-color: var(--ink); }
.option-btn[disabled] { cursor: default; }
.option-btn.correct {
    border-color: var(--green);
    background: var(--green-bg);
    color: #11532a;
    font-weight: 700;
}
.option-btn.correct::before { border-color: var(--green); background: var(--green); content: "✓"; color: #fff; display: grid; place-items: center; font-size: .72rem; font-weight: 900; }
.option-btn.incorrect {
    border-color: var(--red);
    background: var(--red-bg);
    color: #7d1a1a;
    font-weight: 700;
}
.option-btn.incorrect::before { border-color: var(--red); background: var(--red); content: "✕"; color: #fff; display: grid; place-items: center; font-size: .72rem; font-weight: 900; }

.explanation {
    margin-top: 20px;
    background: var(--hv-soft);
    border: 1px solid #F1E08A;
    border-left: 5px solid var(--hv);
    border-radius: var(--r-sm);
    padding: 16px 18px;
    font-size: .96rem;
    color: #5e5300;
    display: none;
}
.quiz-next-btn, #next-btn { margin-top: 22px; width: 100%; }

/* ==========================================================================
   RESULTS
   ========================================================================== */
.result-content {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-md);
    padding: 34px 26px;
    text-align: center;
}
.result-content h2, .results-title { margin-bottom: 18px; }
.score-display { margin-bottom: 22px; }

/* circular score (legacy static markup) */
.score-circle {
    width: 150px; height: 150px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: conic-gradient(var(--hv) 0, var(--hv) var(--p,0%), var(--line) 0);
    border: 8px solid var(--surface);
    box-shadow: 0 0 0 2px var(--line);
}
.score-circle #score-percentage { font-size: 2.4rem; font-weight: 900; color: var(--ink); }

/* JS-rendered results */
.results-score-pct { font-size: 3.4rem; font-weight: 900; line-height: 1; }
.results-score-pct--pass { color: var(--green); }
.results-score-pct--fail { color: var(--red); }
.results-score-detail { font-weight: 700; color: var(--ink); margin-top: 6px; }
.results-readiness { color: var(--muted); margin-top: 8px; max-width: 44ch; margin-inline: auto; }
.results-readiness--pass { color: var(--green); font-weight: 600; }
.results-readiness--fail { color: var(--muted); }
.score-text { color: var(--muted); }
.pass-fail-message { font-weight: 700; margin-top: 8px; }

.results-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 22px;
}
.btn-review {
    background: var(--ink);
    color: #fff;
    border-radius: var(--r-pill);
    padding: 14px 22px;
    font-weight: 800;
    border: 1px solid var(--ink);
    cursor: pointer;
    font-family: inherit;
}
.btn-review:hover { background: var(--ink-2); transform: translateY(-2px); }

/* ==========================================================================
   AFFILIATE / REFERRAL
   ========================================================================== */
.affiliate-box { margin: 26px 0 0; }
body.is-quiz-active #affiliate-box { display: none; }
.affiliate-card {
    background: linear-gradient(180deg, #fff, var(--hv-soft));
    border: 1px solid #F1E08A;
    border-radius: var(--r-lg);
    padding: 28px 24px;
    text-align: center;
    box-shadow: var(--sh-sm);
}
.affiliate-eyebrow {
    text-transform: uppercase;
    letter-spacing: .1em;
    font-size: .72rem;
    font-weight: 800;
    color: #8a7400;
    margin-bottom: 6px;
}
.affiliate-heading { font-size: 1.3rem; font-weight: 800; margin-bottom: 10px; }
.affiliate-text { color: var(--muted); max-width: 48ch; margin: 0 auto 18px; }
.affiliate-disclosure { font-size: .76rem; color: var(--muted-2); margin-top: 14px; }

/* results affiliate */
.results-affiliate-cta {
    margin-top: 8px;
    background: var(--hv-soft);
    border: 1px solid #F1E08A;
    border-radius: var(--r);
    padding: 20px 18px;
}
.results-affiliate-copy { color: #5e5300; font-weight: 600; margin-bottom: 14px; }
.results-affiliate-btn {
    display: inline-block;
    background: var(--ink);
    color: #fff;
    font-weight: 800;
    padding: 13px 24px;
    border-radius: var(--r-pill);
}
.results-affiliate-btn:hover { background: var(--ink-2); color: #fff; text-decoration: none; transform: translateY(-2px); }

/* ==========================================================================
   AD SLOTS
   ========================================================================== */
.ad-slot {
    display: none;
    align-items: center;
    justify-content: center;
    margin: 30px auto;
    min-height: 100px;
    max-width: 728px;
    background: repeating-linear-gradient(-45deg,#fafafa,#fafafa 12px,#f1f2f4 12px,#f1f2f4 24px);
    border: 1px dashed var(--line-2);
    border-radius: var(--r);
    overflow: hidden;
}
.ad-slot:has(.adsbygoogle) {
    display: flex;
    background: none;
    border: none;
    min-height: 0;
}
.ad-slot__label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); }
.ad-slot:has(.adsbygoogle) .ad-slot__label { display: none; }

/* ==========================================================================
   SEO TEXT BLOCK + FAQ
   ========================================================================== */
.seo-text { margin-top: 36px; }
.seo-text .container {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-sm);
    padding: 32px 28px;
    max-width: var(--maxw);
}
.seo-text h2 { margin-bottom: 16px; }
.seo-text section + section { margin-top: 28px; }
.seo-text h3 { margin: 26px 0 10px; }
.seo-text section:has(.faq-question) > h3,
.seo-text section:has(.faq-list) > h3 {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.seo-text p { color: var(--text); margin-bottom: 14px; }
.seo-text ul, .seo-text ol { margin: 0 0 16px 1.1rem; }
.seo-text li { margin-bottom: 6px; }
.seo-text a { color: #0b5cab; font-weight: 600; }

.wc-state-unique {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-left: 5px solid var(--hv);
    border-radius: var(--r);
    padding: 20px 22px;
    margin: 8px 0 26px;
}
.wc-state-unique h3 { margin-top: 0; }
.wc-state-unique p { margin-bottom: 10px; }

/* FAQ accordion */
dl { margin: 0; }
.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    font-weight: 700;
    color: var(--ink);
    padding: 16px 2px;
    border-top: 1px solid var(--line);
    list-style: none;
}
.faq-list .faq-question:first-child, dl .faq-question:first-of-type { border-top: none; }
.faq-question:hover { color: #000; }
.faq-question:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
.faq-toggle {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hv-soft);
    color: var(--ink);
    border-radius: 50%;
    font-size: 0;
    line-height: 0;
    transition: background 0.2s ease;
}
.faq-toggle::before {
    content: '▼';
    display: block;
    font-size: 0.65rem;
    font-weight: 900;
    line-height: 1;
    transition: transform 0.25s ease;
}
.faq-question[aria-expanded="true"] .faq-toggle {
    background: var(--hv);
}
.faq-question[aria-expanded="true"] .faq-toggle::before {
    transform: rotate(180deg);
}
.faq-answer, .faq-question + dd {
    color: var(--muted);
    padding: 0 2px 18px;
    font-size: .96rem;
}
.faq-answer[hidden], .faq-question + dd[hidden] { display: none; }
.faq-answer ol, .faq-answer ul { margin: 8px 0 0 1.1rem; }

/* Testimonials (revealed once real quotes added) */
.wc-testimonials { margin-top: 30px; text-align: center; }
.wc-testimonials:not(:has(.wc-testimonial)) { display: none; }
.wc-testimonials-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 16px; max-width: 900px; margin-left: auto; margin-right: auto; }
.wc-testimonials-grid:empty { display: none; }
.wc-testimonial {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 20px;
    text-align: left;
}
.wc-testimonial cite { display: block; margin-top: 10px; font-weight: 700; color: var(--muted); font-style: normal; }

/* ==========================================================================
   CONTENT PAGES (guide / tips / find-a-course / topic)
   ========================================================================== */
.content-page {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh);
    padding: 12px 26px 30px;
}
.content-hero {
    text-align: center;
    padding: 26px 0 22px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 22px;
    position: relative;
}
.content-hero h2 { margin-bottom: 10px; }
.content-hero-sub { color: var(--muted); font-size: 1.02rem; max-width: 56ch; margin: 0 auto 16px; }

.guide-section { margin-bottom: 26px; }
.guide-section h3 {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--hv);
    display: inline-block;
}
.guide-section ul, .guide-section ol { margin: 0 0 8px 1.2rem; }
.guide-section li { margin-bottom: 7px; }
.guide-section p { margin-bottom: 12px; }
.guide-section a { color: #0b5cab; font-weight: 600; }

/* Tables */
.guide-table, .blog-table {
    width: 100%;
    border-collapse: collapse;
    margin: 6px 0 8px;
    font-size: .95rem;
    background: var(--surface);
    border-radius: var(--r);
    overflow: hidden;
    box-shadow: var(--sh-sm);
}
.blog-table-wrap { overflow-x: auto; }
.guide-table th, .blog-table th {
    background: var(--ink);
    color: #fff;
    text-align: left;
    padding: 12px 14px;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.guide-table td, .blog-table td {
    padding: 12px 14px;
    border-top: 1px solid var(--line);
}
.guide-table tr:nth-child(even) td, .blog-table tr:nth-child(even) td { background: var(--surface-2); }

/* Table of contents */
.toc {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 16px 20px;
    margin-bottom: 24px;
    overflow: hidden;
}
.toc h3 {
    margin: 0 0 12px;
    font-size: 1.05rem;
}
.toc ol {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: toc;
}
.toc li {
    counter-increment: toc;
    padding: 8px 0;
    border-top: 1px solid var(--line);
}
.toc li:first-child {
    border-top: none;
    padding-top: 0;
}
.toc li::before {
    content: counter(toc) ".";
    display: inline-block;
    min-width: 1.75em;
    margin-right: 0.35em;
    font-weight: 700;
    color: var(--ink-2);
}
.toc a {
    color: #0b5cab;
    font-weight: 600;
    text-decoration: none;
}
.toc a:hover,
.toc a:focus-visible {
    text-decoration: underline;
}

/* CTA panel */
.content-cta {
    text-align: center;
    background: linear-gradient(180deg, var(--ink), var(--ink-2));
    color: #fff;
    border-radius: var(--r-lg);
    padding: 30px 24px;
    margin-top: 28px;
}
.content-cta h3 { color: #fff; margin-bottom: 8px; }
.content-cta p { color: #C9CDD6; margin-bottom: 18px; }
.content-cta .btn { margin: 5px; }

/* Topic link grid */
.topic-link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 6px;
}
.topic-link-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: 13px 14px;
    font-weight: 700;
    font-size: .9rem;
    color: var(--ink);
    transition: all .15s ease;
}
.topic-link-card__nr {
    flex: 0 0 auto;
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    display: grid;
    place-items: center;
    background: var(--hv);
    color: var(--ink);
    border-radius: var(--r-pill);
    font-size: .78rem;
    font-weight: 900;
    line-height: 1;
}
.topic-link-card:hover { border-color: var(--ink); background: #fff; transform: translateY(-2px); box-shadow: var(--sh-sm); text-decoration: none; }
.topic-link-card:hover .topic-link-card__nr { background: var(--ink); color: var(--hv); }

/* Course finder cards */
.course-state-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    margin-top: 8px;
}
.course-state-card {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 18px;
    display: flex;
    flex-direction: column;
}
.course-state-card h4 { font-size: 1rem; margin-bottom: 8px; }
.course-state-card p { color: var(--muted); font-size: .92rem; margin-bottom: 14px; flex: 1; }
.course-cta-btn {
    align-self: flex-start;
    background: var(--hv);
    color: var(--ink);
    font-weight: 800;
    font-size: .9rem;
    padding: 10px 16px;
    border-radius: var(--r-pill);
}
.course-cta-btn:hover { background: var(--hv-deep); text-decoration: none; transform: translateY(-1px); }

/* ==========================================================================
   BLOG
   ========================================================================== */
.blog-page { padding-top: 22px; }
.blog-breadcrumb {
    font-size: .85rem;
    color: var(--muted);
    margin-bottom: 18px;
}
.blog-breadcrumb a { color: var(--muted); font-weight: 600; }
.blog-breadcrumb a:hover { color: var(--ink); }
.blog-breadcrumb__sep { margin: 0 8px; color: var(--muted-2); }

.blog-index-header { text-align: center; margin-bottom: 26px; }
.blog-index-title { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.4rem); margin-bottom: 8px; }
.blog-index-intro { color: var(--muted); max-width: 56ch; margin: 0 auto; }

.blog-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}
.blog-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-sm);
    padding: 22px;
    display: flex;
    flex-direction: column;
    transition: transform .15s ease, box-shadow .15s ease;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.blog-card__date { font-size: .78rem; color: var(--muted-2); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.blog-card__title { font-size: 1.16rem; margin: 8px 0 10px; line-height: 1.3; }
.blog-card__title a { color: var(--ink); }
.blog-card__title a:hover { color: #000; text-decoration: none; }
.blog-card__excerpt { color: var(--muted); font-size: .94rem; flex: 1; margin-bottom: 14px; }
.blog-card__link { color: var(--ink); font-weight: 800; font-size: .9rem; }
.blog-card__link:hover { color: #000; }

/* Article */
.blog-article {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh);
    padding: 14px 30px 34px;
}
.blog-article__header { padding: 18px 0 18px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.blog-article__title { font-size: clamp(1.7rem, 1.3rem + 2vw, 2.3rem); line-height: 1.2; }
.blog-article__body { font-size: 1.05rem; }
.blog-article__body h2 { font-size: 1.45rem; margin: 30px 0 12px; }
.blog-article__body h3 { font-size: 1.18rem; margin: 22px 0 10px; }
.blog-article__body p { margin-bottom: 16px; color: #2a2e36; }
.blog-article__body a { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--hv-deep); text-underline-offset: 3px; }
.blog-article__body a:hover { color: var(--ink); }
.blog-list, .blog-list--ordered { margin: 0 0 18px 1.3rem; }
.blog-list li { margin-bottom: 9px; }
.blog-cta-wrap { margin: 26px 0; text-align: center; }
.blog-cta { display: inline-block; }

.blog-faq { margin-top: 30px; border-top: 2px solid var(--hv); padding-top: 8px; }
.blog-faq h2 { font-size: 1.4rem; margin: 16px 0 6px; }
.blog-faq-list { margin-top: 6px; }
.blog-faq-q.faq-question {
    padding: 16px 2px;
}
.blog-faq-a.faq-answer {
    padding: 0 2px 18px;
}
.blog-faq-a p { margin: 0; }

/* ==========================================================================
   LEGAL
   ========================================================================== */
.legal-page { padding-top: 26px; }
.legal-content {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-sm);
    padding: 28px;
}
.legal-section { margin-bottom: 26px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.legal-section:last-of-type { border-bottom: none; }
.legal-section h2 { margin-bottom: 12px; }
.legal-section h3 { margin: 18px 0 8px; }
.legal-section p { margin-bottom: 12px; color: var(--text); }
.legal-section a { color: #0b5cab; font-weight: 600; }
.contact-email { font-size: 1.1rem; font-weight: 700; }
.contact-email a { color: #0b5cab; }
.back-button-container { text-align: center; margin-top: 8px; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    flex-shrink: 0;
    background: var(--ink);
    color: #C9CDD6;
    text-align: center;
    padding: 30px 0 26px;
    margin-top: 40px;
    border-top: 5px solid transparent;
    border-image: repeating-linear-gradient(-45deg, var(--hv) 0, var(--hv) 14px, var(--ink) 14px, var(--ink) 28px) 5;
}
.footer p { color: #C9CDD6; font-size: .9rem; }
.footer-links { margin: 12px 0; display: flex; flex-wrap: wrap; gap: 6px 10px; justify-content: center; }
.footer-links a { color: #fff; font-weight: 600; font-size: .9rem; }
.footer-links a:hover { color: var(--hv); }
.separator { color: var(--ink-3); }
.footer-disclaimer { font-size: .78rem; color: var(--muted-2); margin-top: 6px; }

/* ==========================================================================
   COOKIE BANNER
   ========================================================================== */
.cookie-banner {
    position: fixed;
    left: 16px; right: 16px; bottom: 16px;
    z-index: 200;
    background: var(--ink);
    color: #E7E9ED;
    border-radius: var(--r);
    box-shadow: var(--sh-lg);
    display: none;
}
.cookie-banner__content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    max-width: var(--maxw);
    margin: 0 auto;
}
.cookie-banner__content p { color: #C9CDD6; font-size: .88rem; flex: 1 1 280px; margin: 0; }
.cookie-banner__content a { color: var(--hv); font-weight: 600; }
.cookie-banner__actions { flex: 0 0 auto; }
.cookie-btn { padding: 11px 24px; font-size: .92rem; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
/* Mobile: state row always visible; nav drawer animates */
@media (max-width: 760px) {
    .site-header__top {
        flex-wrap: wrap;
        padding-bottom: 8px;
    }
    .nav-toggle {
        display: inline-flex;
        margin-left: auto;
        order: 2;
    }
    .site-brand { order: 1; flex: 1 1 auto; min-width: 0; }
    .site-header__drawer {
        order: 3;
        flex: 1 0 100%;
        width: 100%;
        display: grid;
        grid-template-rows: 0fr;
        transition: grid-template-rows 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .site-header__drawer-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        min-height: 0;
        overflow: hidden;
        padding-bottom: 0;
        transition: padding 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    }
    body > header.site-header.nav-open .site-header__drawer {
        grid-template-rows: 1fr;
    }
    body > header.site-header.nav-open .site-header__drawer-inner {
        padding-bottom: 10px;
    }
    .site-header__drawer .secondary-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }
    .site-header__drawer .nav-link { text-align: center; }
    .site-header__states-wrap {
        flex-wrap: nowrap;
        padding-bottom: 10px;
    }
    .site-header__tools {
        margin-left: auto;
        flex-shrink: 0;
    }
    .state-selector {
        flex: 1;
        min-width: 0;
        flex-wrap: nowrap;
    }
    .state-selector::before { flex-shrink: 0; }
    .state-link { flex-shrink: 0; }
}

@media (max-width: 560px) {
    :root { --gut: 16px; }
    .intro-content, .question-container, .result-content { padding-left: 18px; padding-right: 18px; }
    .seo-text .container, .content-page, .blog-article, .legal-content { padding-left: 18px; padding-right: 18px; }
    .gamify-dashboard { gap: 8px; }
    .gamify-value { font-size: 1.05rem; }
    .question-text { font-size: 1.12rem; }
    .option-btn { padding-left: 46px; }
    .footer-links { flex-direction: column; }
    .separator { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   STATE EXTRA BLOCK
   ========================================================================== */
.wc-state-extra {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-left: 5px solid var(--ink);
    border-radius: var(--r);
    padding: 20px 22px;
    margin: 8px 0 26px;
}
.wc-state-extra h3 { margin: 6px 0 8px; }
.wc-state-extra h3:first-child { margin-top: 0; }
.wc-state-extra p { margin-bottom: 10px; }
.wc-state-extra dl { margin-top: 4px; }

/* ==========================================================================
   QUIZ QUESTION TOOLBAR (read-aloud + bookmark)
   ========================================================================== */
.question-tools { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.q-tool {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--surface-2);
    border: 1.5px solid var(--line-2);
    color: var(--ink);
    font: inherit; font-size: .82rem; font-weight: 700;
    padding: 7px 13px; border-radius: var(--r-pill); cursor: pointer;
    transition: all .15s ease;
}
.q-tool:hover { border-color: var(--ink); background: #fff; }
.q-tool.is-on { background: var(--hv); border-color: var(--ink); }

/* ==========================================================================
   FEATURE PAGES (progress / flashcards / bookmarks / glossary)
   ========================================================================== */
.feature-hero { text-align: center; padding: 8px 0 22px; }
.feature-hero h2 { margin-bottom: 8px; }
.feature-hero p { color: var(--muted); max-width: 56ch; margin: 0 auto; }

/* Progress */
.progress-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr));
    gap: 12px; margin-bottom: 22px;
}
.progress-stat {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r); padding: 18px; text-align: center; box-shadow: var(--sh-sm);
}
.progress-stat .v { font-size: 1.9rem; font-weight: 900; color: var(--ink); line-height: 1; }
.progress-stat .l { font-size: .8rem; color: var(--muted); font-weight: 600; margin-top: 6px; }
.readiness-card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-lg); padding: 24px; box-shadow: var(--sh-sm); margin-bottom: 22px; text-align: center;
}
.readiness-track { height: 16px; background: var(--line); border-radius: var(--r-pill); overflow: hidden; margin: 14px 0 8px; }
.readiness-fill { height: 100%; border-radius: var(--r-pill); transition: width .6s ease; }
.readiness-label { font-weight: 800; }
.progress-empty, .feature-empty {
    background: var(--surface-2); border: 1px dashed var(--line-2);
    border-radius: var(--r); padding: 26px; text-align: center; color: var(--muted);
}

/* Flashcards */
.flashcard {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-lg); box-shadow: var(--sh); padding: 30px 26px;
    min-height: 220px; display: flex; flex-direction: column; justify-content: center;
    text-align: center; cursor: pointer; position: relative;
}
.flashcard::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; border-radius: var(--r-lg) var(--r-lg) 0 0;
    background-image: repeating-linear-gradient(-45deg, var(--hv) 0, var(--hv) 12px, var(--ink) 12px, var(--ink) 24px); }
.flashcard__hint { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted-2); font-weight: 800; margin-bottom: 12px; }
.flashcard__q { font-size: 1.2rem; font-weight: 800; color: var(--ink); line-height: 1.35; }
.flashcard__a { margin-top: 14px; }
.flashcard__answer { font-size: 1.05rem; font-weight: 800; color: var(--green); }
.flashcard__exp { margin-top: 10px; color: var(--muted); font-size: .95rem; }
.flashcard-controls { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }
.flashcard-meta { text-align: center; color: var(--muted); font-weight: 700; font-size: .9rem; margin-top: 14px; }

/* Glossary */
.glossary-list { display: grid; gap: 12px; }
.glossary-term {
    background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--hv);
    border-radius: var(--r); padding: 14px 18px;
}
.glossary-term dt { font-weight: 800; color: var(--ink); margin-bottom: 4px; }
.glossary-term dd { color: var(--muted); margin: 0; }

/* Bookmarks / review list */
.review-item {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
    padding: 16px 18px; margin-bottom: 12px;
}
.review-item .rq { font-weight: 800; color: var(--ink); margin-bottom: 8px; }
.review-item .ra { color: var(--green); font-weight: 700; }
.review-item .re { color: var(--muted); font-size: .94rem; margin-top: 6px; }
.review-remove { background: none; border: none; color: var(--red); font-weight: 700; cursor: pointer; font-size: .85rem; margin-top: 8px; padding: 0; }

/* ==========================================================================
   SPOT-THE-HAZARD GAME
   ========================================================================== */
.hz-hud {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 12px; background: var(--ink); color: #fff;
    border-radius: var(--r) var(--r) 0 0; padding: 12px 18px;
}
.hz-hud__count { font-weight: 900; font-size: 1.05rem; }
.hz-hud__count b { color: var(--hv); }
.hz-hud__msg { font-weight: 700; font-size: .9rem; color: var(--hv); min-height: 1.2em; }
.hz-stage {
    position: relative; line-height: 0;
    border: 1px solid var(--line); border-top: none;
    border-radius: 0 0 var(--r) var(--r); overflow: hidden; background: #cfe8f5;
}
.hz-svg { width: 100%; height: auto; display: block; touch-action: manipulation; }
.hz-hotspot { fill: transparent; cursor: pointer; stroke: transparent; stroke-width: 3; }
.hz-hotspot:hover { stroke: rgba(255,212,0,.55); }
.hz-hotspot.found { cursor: default; stroke: var(--green); fill: rgba(27,135,63,.16); }
.hz-pin {
    fill: var(--green); stroke: #fff; stroke-width: 2;
}
.hz-pin-txt { fill: #fff; font: 800 16px Inter, sans-serif; text-anchor: middle; }
.hz-controls { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; justify-content: center; }
.hz-results { margin-top: 18px; }
.hz-found-list { display: grid; gap: 10px; margin-top: 10px; }
.hz-found-item {
    background: var(--surface); border: 1px solid var(--line);
    border-left: 5px solid var(--green); border-radius: var(--r); padding: 14px 16px;
}
.hz-found-item.pending { border-left-color: var(--line-2); opacity: .65; }
.hz-found-item h4 { margin-bottom: 4px; font-size: 1rem; }
.hz-found-item p { color: var(--muted); font-size: .92rem; margin: 0; }
.hz-win {
    background: linear-gradient(180deg,#fff,var(--hv-soft));
    border: 1px solid #F1E08A; border-radius: var(--r-lg);
    padding: 22px; text-align: center; margin-top: 18px;
}
.hz-win h3 { margin-bottom: 6px; }

/* ==========================================================================
   SAFETY SIGNS TRAINER
   ========================================================================== */
.signs-gallery {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr));
    gap: 14px; margin: 6px 0 8px;
}
.sign-card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r); padding: 16px; text-align: center; box-shadow: var(--sh-sm);
}
.sign-card svg { width: 76px; height: 76px; margin: 0 auto 10px; display: block; }
.sign-card h4 { font-size: .98rem; margin-bottom: 4px; }
.sign-card p { color: var(--muted); font-size: .85rem; margin: 0; }
.sign-quiz {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-lg); box-shadow: var(--sh); padding: 24px; text-align: center; margin-top: 8px;
}
.sign-quiz__figure { width: 120px; height: 120px; margin: 0 auto 16px; display: block; }
.sign-quiz__q { font-weight: 800; font-size: 1.1rem; margin-bottom: 16px; }
.sign-opts { display: grid; gap: 10px; max-width: 460px; margin: 0 auto; }
.sign-opt {
    width: 100%; text-align: left; background: var(--surface-2);
    border: 2px solid var(--line); border-radius: var(--r); padding: 13px 16px;
    font: inherit; font-size: .98rem; font-weight: 600; cursor: pointer; transition: all .14s ease;
}
.sign-opt:hover:not([disabled]) { border-color: var(--ink); }
.sign-opt.correct { border-color: var(--green); background: var(--green-bg); color: #11532a; font-weight: 800; }
.sign-opt.incorrect { border-color: var(--red); background: var(--red-bg); color: #7d1a1a; font-weight: 800; }
.sign-quiz__bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-weight: 800; color: var(--muted); }
.sign-quiz__score b { color: var(--ink); }

/* ── Spot-the-Hazard scene switcher (multi-scene) ─────────────────────── */
.hz-scenes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.hz-scene-tab {
    font: inherit; font-weight: 800; font-size: .85rem; cursor: pointer;
    background: var(--surface); color: var(--ink);
    border: 2px solid var(--line); border-radius: var(--r-pill);
    padding: 9px 16px; transition: all .15s ease;
}
.hz-scene-tab:hover { border-color: var(--ink); }
.hz-scene-tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.hz-scene-tab .done { color: var(--hv); }
#hz-next-scene { display: none; }

/* ── UX hardening: table overflow + long-word wrapping ─────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 10px; }
.table-wrap .guide-table { margin-bottom: 0; }
p, li, dd, .blog-article__body, .glossary-term dd, .intro-list li, .hz-found-item p { overflow-wrap: break-word; }
.contact-email a { word-break: break-word; }
