/* ==========================================================================
   Food Safety Practice Test — Design System
   Premium hospitality · editorial · calm confidence
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;500;600;700&family=Fraunces:opsz,wght@9..144,500;600;700&display=swap');

/* ---- Design tokens ------------------------------------------------------ */
:root {
    /* Brand — refined emerald */
    --hv:        #059669;
    --hv-deep:   #047857;
    --hv-soft:   #ECFDF5;
    --hv-muted:  #D1FAE5;
    --accent-glow: rgba(5, 150, 105, 0.18);

    --ink:       #141816;
    --ink-2:     #1E2421;
    --ink-3:     #2D3530;

    /* Neutrals — warm stone */
    --bg:        #EDF0EC;
    --surface:   #FFFFFF;
    --surface-2: #F1F3EF;
    --line:      #E1E6DF;
    --line-2:    #D2D8D2;
    --text:      #1A1F1C;
    --muted:     #5C6760;
    --muted-2:   #8A948D;

    /* Status */
    --green:     #059669;
    --green-bg:  #ECFDF5;
    --red:       #DC2626;
    --red-bg:    #FEF2F2;
    --amber:     #C9852B;

    /* Shape */
    --r-sm: 12px;
    --r:    16px;
    --r-lg: 22px;
    --r-pill: 999px;

    /* Elevation */
    --sh-sm: 0 1px 2px rgba(20, 24, 22, 0.05), 0 2px 8px rgba(20, 24, 22, 0.05);
    --sh:    0 4px 20px rgba(20, 24, 22, 0.07), 0 1px 3px rgba(20, 24, 22, 0.05);
    --sh-md: 0 12px 40px rgba(20, 24, 22, 0.10);
    --sh-lg: 0 24px 60px rgba(20, 24, 22, 0.12);

    /* Layout */
    --maxw: 920px;
    --gut: 24px;

    /* Type */
    --ff: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --ff-display: 'Fraunces', Georgia, 'Times New Roman', serif;
}

/* ---- 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:
        radial-gradient(ellipse 90% 60% at 50% -15%, rgba(5, 150, 105, 0.07), transparent 55%),
        radial-gradient(ellipse 50% 40% at 100% 0%, rgba(5, 150, 105, 0.04), transparent 50%),
        linear-gradient(180deg, #FAFBF9 0%, var(--bg) 100%);
    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-muted); 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.22; letter-spacing: -0.02em; font-weight: 700; font-family: var(--ff-display); }
h1 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem); }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.6vw, 2rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }
p { color: var(--text); }

/* ---- Heading rhythm (reset zeroes margins — restore sitewide) ---------- */
h1 { margin: 0 0 1rem; }
h2 { margin: 2.25rem 0 0.875rem; }
h3 { margin: 1.5rem 0 0.75rem; }
h4 { margin: 1.25rem 0 0.625rem; }

/* Headings that open a block: rely on container padding, not extra top gap */
:where(.content-hero, .feature-hero, .blog-index-header, .wc-state-unique, .wc-state-extra, .content-cta, .guide-cta, .seo-cta__copy, .affiliate-card)
    > :is(h1, h2, h3, h4):first-child,
:where(.guide-section, .legal-section, .seo-text section)
    > :is(h1, h2, h3, h4):first-child,
.seo-text .container > header:first-child h2,
.content-page > h1:first-child,
.blog-article > h1:first-child,
.legal-content > h1:first-child {
    margin-top: 0;
}

.affiliate-card .affiliate-heading { margin-top: 0; }

/* Long-form paragraph & list spacing */
.content-page > p,
.guide-section p,
.blog-article > p,
.seo-text .container > p,
.seo-text section p,
.legal-section p { margin-bottom: 1rem; }

.content-page ul, .content-page ol,
.guide-section ul, .guide-section ol,
.blog-article > ul, .blog-article > ol,
.seo-text ul, .seo-text ol { margin: 0 0 1rem 1.25rem; }

.content-page li + li,
.guide-section li + li,
.blog-article > li + li { margin-top: 0.35rem; }

/* ==========================================================================
   HEADER (premium · hi-vis accent)
   ========================================================================== */
body > header.site-header {
    background: rgba(255, 255, 255, 0.88);
    color: var(--ink);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(20, 24, 22, 0.06);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 4px 24px rgba(20, 24, 22, 0.04);
}
@supports (backdrop-filter: blur(12px)) {
    body > header.site-header {
        background: rgba(255, 255, 255, 0.82);
        backdrop-filter: blur(16px) saturate(1.4);
        -webkit-backdrop-filter: blur(16px) saturate(1.4);
    }
}
body > header.site-header::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    pointer-events: none;
    z-index: 0;
    background: linear-gradient(90deg, transparent, rgba(5, 150, 105, 0.35), transparent);
}
body > header.site-header::after {
    content: "";
    display: block;
    position: relative;
    z-index: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--hv-deep), var(--hv), var(--hv-deep));
    opacity: 0.85;
}
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-2) 100%);
    color: #fff;
    font-family: var(--ff);
    font-weight: 700;
    font-size: .75rem;
    letter-spacing: 0.04em;
    border-radius: 14px;
    border: none;
    box-shadow: 0 4px 12px rgba(20, 24, 22, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.site-brand:hover .site-brand__mark {
    box-shadow: 0 6px 20px var(--accent-glow), 0 4px 12px rgba(20, 24, 22, 0.18);
    transform: translateY(-1px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.site-brand__title {
    font-family: var(--ff-display);
    font-weight: 600;
    font-size: clamp(1rem, 0.9rem + 0.5vw, 1.15rem);
    color: var(--ink);
    line-height: 1.15;
    letter-spacing: -0.01em;
}
.site-brand__tagline {
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--muted);
    text-transform: none;
}

.secondary-nav {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 2px;
    min-width: 0;
}
.site-brand__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.nav-link {
    font-family: var(--ff);
    color: var(--muted);
    font-size: .8rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: var(--r-pill);
    border: 1px solid transparent;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.nav-link:hover {
    background: var(--surface-2);
    color: var(--ink);
    text-decoration: none;
}
.nav-link[aria-current="page"],
.nav-link--active {
    background: var(--ink);
    color: #fff;
    box-shadow: 0 2px 8px rgba(20, 24, 22, 0.12);
}
.nav-link--cta {
    background: var(--surface);
    border-color: var(--hv-muted);
    color: var(--hv-deep);
}
.nav-link--cta:hover {
    background: var(--hv-soft);
    border-color: var(--hv);
    color: var(--hv-deep);
}

.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);
    color: #fff;
}

.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);
    color: #fff;
}

.site-header__states-wrap {
    display: flex;
    align-items: center;
    gap: 12px 16px;
    padding: 10px 0 12px;
    border-top: 1px solid rgba(20, 24, 22, 0.05);
    background: transparent;
}
.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 14px;
    font-size: .76rem;
    font-weight: 600;
    font-family: var(--ff);
    color: var(--muted);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    transition: all 0.2s ease;
}
@media (hover: hover) {
    .state-link:hover {
        background: var(--hv-soft);
        border-color: var(--hv-muted);
        color: var(--hv-deep);
        text-decoration: none;
    }
}
.state-link:active {
    background: var(--hv-soft);
    border-color: var(--hv);
    color: var(--hv-deep);
    text-decoration: none;
}
.state-link[aria-current="page"] {
    background: var(--hv-soft);
    border-color: var(--hv);
    color: var(--hv-deep);
    font-weight: 700;
}

.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);
    color: #fff;
}
.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 hero + quiz side-by-side above the fold */
.home-practice-zone {
    display: grid;
    grid-template-columns: 1fr;
    background: var(--bg);
}
.home-practice-zone__main {
    padding-top: 16px;
    padding-bottom: 28px;
    scroll-margin-top: 88px;
}
body.is-quiz-active .home-practice-zone {
    grid-template-columns: 1fr;
}
body.is-quiz-active .home-editorial-hero {
    display: none;
}
@media (min-width: 960px) {
    .home-practice-zone {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
        align-items: stretch;
    }
    .home-editorial-hero {
        display: flex;
        align-items: center;
        min-height: 420px;
        padding: 32px 0;
    }
    .home-editorial-hero__inner {
        max-width: 520px;
        margin-left: auto;
        padding-right: 24px;
    }
    .home-practice-zone__main {
        padding: 24px 24px 28px 0;
        max-width: none;
        width: 100%;
    }
    body.is-quiz-active .home-practice-zone__main {
        grid-column: 1 / -1;
        max-width: 680px;
        margin: 0 auto;
        padding: 24px 24px 40px;
    }
}

/* Homepage editorial hero */
.home-editorial-hero {
    background: linear-gradient(135deg, #0F1412 0%, #1A2420 45%, #152019 100%);
    border-bottom: none;
    padding: 28px 0 32px;
    position: relative;
    overflow: hidden;
}
.home-editorial-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 1;
    background:
        radial-gradient(ellipse 70% 80% at 85% 20%, rgba(5, 150, 105, 0.22), transparent 55%),
        radial-gradient(ellipse 50% 60% at 10% 80%, rgba(5, 150, 105, 0.08), transparent 50%);
    pointer-events: none;
}
.home-editorial-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.15) 100%);
    pointer-events: none;
}
.home-editorial-hero__inner {
    position: relative;
    z-index: 1;
    max-width: 680px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}
@supports (backdrop-filter: blur(10px)) {
    .home-editorial-hero__inner {
        background: transparent;
        backdrop-filter: none;
    }
}
.home-editorial-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .7rem;
    font-weight: 600;
    font-family: var(--ff);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--hv-muted);
    background: rgba(5, 150, 105, 0.12);
    border: 1px solid rgba(5, 150, 105, 0.28);
    padding: 7px 14px;
    border-radius: var(--r-pill);
    margin-bottom: 18px;
}
.home-editorial-hero__title {
    font-family: var(--ff-display);
    font-size: clamp(2rem, 1.4rem + 2.8vw, 3rem);
    font-weight: 600;
    color: #fff;
    line-height: 1.15;
    margin: 0;
    letter-spacing: -0.02em;
    text-shadow: none;
}
.home-editorial-hero__sub {
    margin: 16px 0 0;
    font-size: 1.02rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.78);
    max-width: 52ch;
}
.home-editorial-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}
.btn-hero-cta {
    font-size: 1.02rem;
    padding: 15px 28px;
    box-shadow: 0 8px 28px rgba(5, 150, 105, 0.45);
}
.btn-hero-secondary {
    font-size: .94rem;
    padding: 15px 22px;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.92);
}
@media (max-width: 959px) {
    .btn-hero-secondary { display: none; }
}
.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}
.home-editorial-hero__accent {
    display: block;
    margin-top: 12px;
    font-family: var(--ff);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.55em;
    letter-spacing: 0.01em;
    text-shadow: none;
}
.home-editorial-hero__list {
    list-style: none;
    margin: 28px 0 0;
    padding: 0;
    display: grid;
    gap: 10px;
    max-width: 100%;
}
.home-editorial-hero__list li {
    position: relative;
    padding: 12px 16px 12px 40px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--r);
    font-size: 0.94rem;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.5;
    backdrop-filter: blur(8px);
}
.home-editorial-hero__list li::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--hv);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(5, 150, 105, 0.6);
    font-size: 0;
}
.home-editorial-hero__meta {
    margin-top: 14px;
    font-size: .82rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.02em;
}
.home-editorial-hero__stats {
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}
.home-editorial-hero__stats li {
    font-size: .78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.62);
    letter-spacing: 0.02em;
}
.home-editorial-hero__stats strong {
    color: rgba(255, 255, 255, 0.95);
    font-family: var(--ff-display);
    font-weight: 600;
}
@media (min-width: 960px) {
    .trust-strip { display: none; }
}

/* Trust strip — scannable proof below hero */
.trust-strip {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 10px 0;
}
body.is-quiz-active .trust-strip { display: none; }
body:not(.is-quiz-active) .trust-strip[hidden] { display: none; }
.trust-strip__inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.trust-strip__item {
    text-align: center;
    padding: 8px 6px;
    border-right: 1px solid var(--line);
}
.trust-strip__item:last-child { border-right: none; }
.trust-strip__item strong {
    display: block;
    font-family: var(--ff-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--hv-deep);
    letter-spacing: -0.02em;
}
.trust-strip__item span {
    display: block;
    font-size: .72rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 2px;
}
@media (max-width: 959px) {
    .home-editorial-hero {
        padding: 22px 0 24px;
    }
    .home-editorial-hero__title {
        font-size: clamp(1.65rem, 1.2rem + 2vw, 2.2rem);
        max-width: none;
    }
    .home-editorial-hero__sub {
        font-size: .94rem;
    }
    .home-practice-zone__main {
        padding-top: 12px;
    }
}

/* 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: var(--surface-2);
        border: 1px solid var(--line);
        border-radius: var(--r-pill);
        padding: 5px 8px;
        box-shadow: var(--sh-sm);
    }
    .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: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}
.intro-content--modes::before { display: none; }

#start-screen.active {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-md);
    padding: 24px 22px 26px;
    margin-top: 0;
}
.home-practice-zone #start-screen.active {
    border-color: var(--hv-muted);
    box-shadow: var(--sh-md), 0 0 0 1px rgba(5, 150, 105, 0.06);
}
.home-practice-zone #start-screen.active::before {
    content: "Free practice test";
    display: block;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--hv-deep);
    margin-bottom: 14px;
    text-align: center;
}
.intro-content--modes .mode-selection {
    margin-top: 0;
    border: none;
    box-shadow: none;
    padding: 0;
    background: transparent;
}

/* Conversion-focused mode picker */
.mode-primary-cta {
    width: 100%;
    font-size: 1.05rem;
    padding: 16px 20px;
    box-shadow: 0 6px 24px rgba(5, 150, 105, 0.35);
}
.mode-primary-note {
    margin: 10px 0 18px;
    text-align: center;
    font-size: .82rem;
    font-weight: 500;
    color: var(--muted);
    line-height: 1.45;
}
.mode-secondary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}
.mode-secondary:has(.mode-secondary__btn:nth-child(3)) {
    grid-template-columns: repeat(3, 1fr);
}
.mode-secondary__btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 64px;
    padding: 10px 8px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r);
    cursor: pointer;
    font: inherit;
    color: inherit;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.mode-secondary__btn:hover,
.mode-secondary__btn:focus-visible {
    border-color: var(--hv-muted);
    background: var(--hv-soft);
    transform: translateY(-1px);
}
.mode-secondary__title {
    font-size: .82rem;
    font-weight: 700;
    color: var(--ink);
}
.mode-secondary__meta {
    font-size: .72rem;
    font-weight: 600;
    color: var(--muted);
}
.topic-drill-disclosure {
    border-top: 1px solid var(--line);
    padding-top: 4px;
}
.topic-drill-disclosure__summary {
    list-style: none;
    cursor: pointer;
    font-size: .82rem;
    font-weight: 600;
    color: var(--muted);
    padding: 12px 0;
    text-align: center;
    transition: color 0.2s ease;
}
.topic-drill-disclosure__summary::-webkit-details-marker { display: none; }
.topic-drill-disclosure__summary::after {
    content: " +";
    color: var(--hv-deep);
}
.topic-drill-disclosure[open] .topic-drill-disclosure__summary::after {
    content: " −";
}
.topic-drill-disclosure[open] .topic-drill-disclosure__summary {
    color: var(--ink);
    margin-bottom: 10px;
}
.topic-drill-disclosure .topic-buttons {
    padding-bottom: 4px;
}
@media (max-width: 480px) {
    .mode-secondary,
    .mode-secondary:has(.mode-secondary__btn:nth-child(3)) {
        grid-template-columns: 1fr;
    }
    .mode-secondary__btn {
        flex-direction: row;
        justify-content: space-between;
        min-height: 0;
        padding: 12px 14px;
    }
}

.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,
html:not(.cookies-accepted) body {
    padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
}

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

.screen { display: none; }
.screen.active { display: block; animation: fadeUp .35s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } 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: 3px;
    background: linear-gradient(90deg, var(--hv-deep), var(--hv), var(--hv-deep));
    border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.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.25;
    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: linear-gradient(135deg, var(--hv) 0%, var(--hv-deep) 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(5, 150, 105, 0.35);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #10B981 0%, var(--hv-deep) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(5, 150, 105, 0.4);
    color: #fff;
}

.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: 2px;
    background: linear-gradient(90deg, var(--hv-deep), var(--hv));
}
.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.4rem;
    font-weight: 600;
    color: var(--ink);
    margin-top: 6px;
    letter-spacing: -0.02em;
}
.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: 28px 26px;
    margin-top: 0;
}
.mode-selection__title {
    font-family: var(--ff-display);
    font-size: 1.25rem;
    text-transform: none;
    letter-spacing: -0.01em;
    font-weight: 600;
    color: var(--ink);
    text-align: center;
    margin: 0;
}
.mode-selection__subtitle {
    text-align: center;
    font-size: .92rem;
    color: var(--muted);
    line-height: 1.55;
    max-width: 46ch;
    margin: 8px auto 22px;
}
.mode-selection__header { margin-bottom: 4px; }
.welcome-back {
    background: var(--hv-soft);
    border: 1px solid var(--hv-muted);
    border-radius: var(--r);
    padding: 12px 16px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--hv-deep);
    text-align: center;
    margin-bottom: 18px;
}
.btn-mode {
    width: 100%;
    justify-content: flex-start;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink);
    font-weight: 600;
    font-size: .98rem;
    padding: 16px 20px;
    border-radius: var(--r);
    text-align: left;
    box-shadow: var(--sh-sm);
    transition: all 0.2s ease;
}
.btn-mode:hover:not([disabled]),
.btn-mode:focus-visible:not([disabled]) {
    background: var(--hv-soft);
    border-color: var(--hv-muted);
    transform: translateY(-2px);
    box-shadow: var(--sh);
    color: var(--ink);
}
.mode-buttons .btn-mode:nth-child(2) {
    background: linear-gradient(135deg, var(--hv) 0%, var(--hv-deep) 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 16px rgba(5, 150, 105, 0.3);
}
.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: var(--surface);
    border-color: var(--line);
    color: var(--ink);
    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: linear-gradient(135deg, #10B981 0%, var(--hv-deep) 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.35);
}
.btn-topic {
    background: var(--surface);
    color: var(--ink);
    font-size: .8rem;
    font-weight: 600;
    padding: 9px 16px;
    border-radius: var(--r-pill);
    border: 1px solid var(--line);
    transition: all 0.2s ease;
}
.btn-topic:hover {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
    transform: translateY(-1px);
    box-shadow: var(--sh-sm);
}
.mode-buttons {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}
.btn-mode[disabled] { opacity: .5; cursor: not-allowed; }
.btn-mode[disabled]:hover {
    background: var(--surface);
    transform: none;
    box-shadow: var(--sh-sm);
}
.topic-drill { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 4px; }
.topic-drill-label {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-weight: 600;
    color: var(--muted);
    text-align: center;
    margin-bottom: 14px;
}
.topic-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.start-divider { display: none; }

/* ==========================================================================
   DAILY CHALLENGE
   ========================================================================== */
.daily-challenge {
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
    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;
    color: var(--text);
}
.dc-title { font-weight: 800; color: var(--text); margin-bottom: 12px; }
.dc-title strong { color: inherit; }
.dc-question { font-weight: 600; margin-bottom: 14px; color: var(--text); }
.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: 6px;
    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), #34D399);
    border-radius: var(--r-pill);
    transition: width .4s cubic-bezier(0.22, 1, 0.36, 1);
}
.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-md);
    padding: 32px 28px;
}
.question-text {
    font-family: var(--ff-display);
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 24px;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.options-container { display: grid; gap: 11px; }
.option-btn {
    width: 100%;
    text-align: left;
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: var(--r);
    padding: 16px 18px 16px 52px;
    font: inherit;
    font-size: .98rem;
    color: var(--text);
    cursor: pointer;
    position: relative;
    transition: all .2s 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 .2s ease;
}
.option-btn:hover:not([disabled]) {
    border-color: var(--hv-muted);
    background: var(--hv-soft);
    transform: translateY(-1px);
    box-shadow: var(--sh-sm);
}
.option-btn:hover:not([disabled])::before { border-color: var(--hv); }
.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 var(--hv-muted);
    border-left: 4px solid var(--hv);
    border-radius: var(--r);
    padding: 16px 18px;
    font-size: .94rem;
    color: var(--hv-deep);
    line-height: 1.55;
    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,
#affiliate-box[hidden] { display: none; }
.affiliate-card {
    background: linear-gradient(180deg, var(--surface) 0%, var(--hv-soft) 100%);
    border: 1px solid var(--hv-muted);
    border-radius: var(--r-lg);
    padding: 32px 28px;
    text-align: center;
    box-shadow: var(--sh);
    color: var(--text);
}
.affiliate-card--promo {
    background: linear-gradient(180deg, var(--surface) 0%, var(--hv-soft) 100%);
}
.affiliate-card--conversion {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 28px;
    text-align: left;
    padding: 0;
    overflow: hidden;
}
.affiliate-card__content {
    padding: 32px 28px 28px;
}
.affiliate-card__aside {
    background: linear-gradient(180deg, var(--hv-deep) 0%, #047857 100%);
    color: #fff;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.affiliate-aside__label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.85;
    margin-bottom: 14px;
}
.affiliate-aside__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}
.affiliate-aside__list li {
    position: relative;
    padding-left: 18px;
    font-size: .92rem;
    font-weight: 500;
    line-height: 1.4;
}
.affiliate-aside__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.75);
}
.affiliate-trust-list {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: grid;
    gap: 8px;
}
.affiliate-trust-list li {
    position: relative;
    padding-left: 22px;
    font-size: .88rem;
    color: var(--muted);
    line-height: 1.45;
}
.affiliate-trust-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--hv-deep);
    font-weight: 700;
    font-size: .82rem;
}
.affiliate-card--conversion .affiliate-text {
    margin-left: 0;
    margin-right: 0;
    max-width: none;
}
.affiliate-card--conversion .affiliate-cta {
    width: 100%;
    max-width: 340px;
    text-align: center;
}
@media (max-width: 760px) {
    .affiliate-card--conversion { grid-template-columns: 1fr; }
    .affiliate-card__aside { order: -1; padding: 20px 22px; }
    .affiliate-card__content { padding: 24px 22px 28px; }
}
.affiliate-eyebrow {
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .7rem;
    font-weight: 600;
    color: var(--hv-deep);
    margin-bottom: 8px;
}
.affiliate-heading {
    font-family: var(--ff-display);
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
    color: var(--ink);
}
.affiliate-text { color: var(--muted); max-width: 48ch; margin: 0 auto 18px; line-height: 1.6; }
.affiliate-disclosure { font-size: .76rem; color: var(--muted-2); margin-top: 14px; }

/* SEO mid-page conversion CTA */
.seo-cta {
    margin: 48px 0 0;
    padding-top: 48px;
    border-top: 1px solid var(--line);
}
.seo-cta__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: linear-gradient(135deg, var(--hv-soft) 0%, var(--surface) 100%);
    border: 1px solid var(--hv-muted);
    border-radius: var(--r-lg);
    padding: 28px 32px;
    box-shadow: var(--sh-sm);
}
.seo-cta__copy h3 {
    font-family: var(--ff-display);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}
.seo-cta__copy p {
    margin: 0;
    color: var(--muted);
    font-size: .92rem;
    line-height: 1.55;
    max-width: 48ch;
}
.seo-cta__inner .btn { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 640px) {
    .seo-cta__inner { flex-direction: column; align-items: stretch; text-align: center; }
    .seo-cta__copy p { max-width: none; }
}

/* Mobile sticky start CTA */
.sticky-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.92);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(12px);
    box-shadow: 0 -4px 24px rgba(20, 24, 22, 0.08);
}
body.has-cookie-banner .sticky-cta { bottom: 0; }
.sticky-cta__btn {
    width: 100%;
    font-size: 1rem;
    padding: 14px 20px;
}
@media (min-width: 761px) {
    .sticky-cta { display: none !important; }
}
body.is-quiz-active .sticky-cta { display: none !important; }
body.sticky-cta-visible { padding-bottom: 76px; }

.results-affiliate-cta {
    margin-top: 8px;
    background: var(--hv-soft);
    border: 1px solid var(--hv-muted);
    border-radius: var(--r);
    padding: 20px 18px;
}
.results-affiliate-copy { color: var(--hv-deep); 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: 4rem; margin-bottom: 2rem; }
.seo-text .container {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh);
    padding: 3rem 2rem 2.5rem;
    max-width: var(--maxw);
}
/* Page-level SEO blocks (checker, state pages): h2/h3 as direct container children */
.seo-text .container > header:first-child {
    margin-bottom: 0.25rem;
}
.seo-text .container > header:first-child h2,
.seo-text .container > h2:first-child {
    margin: 0 0 1.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}
.seo-text .container > h2:not(:first-child) {
    margin-top: 2.75rem;
    margin-bottom: 1rem;
    padding-top: 0.25rem;
}
.seo-text h2 {
    font-family: var(--ff-display);
    font-weight: 600;
    letter-spacing: -0.02em;
}
.seo-text .container > h3 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--line-2);
    display: block;
}
.seo-text .container > h3 + p,
.seo-text .container > h2 + p,
.seo-text .container > header + section {
    margin-top: 0;
}
.seo-text .container > .ad-slot {
    margin: 1.75rem 0;
}
.seo-text .container > dl {
    margin-top: 0.5rem;
}
.seo-text section > h3 {
    margin: 0 0 1rem;
    padding-bottom: 0;
    border-bottom: none;
}
.seo-text section:has(.faq-question) > h3,
.seo-text section:has(.faq-list) > h3 {
    font-family: var(--ff-display);
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.seo-text a { color: var(--hv-deep); font-weight: 600; }
.seo-text section + section {
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--line);
}
.seo-text .container > header + section {
    margin-top: 2rem;
    padding-top: 0;
    border-top: none;
}
.seo-text .topic-link-grid {
    margin-top: 16px;
    margin-bottom: 4px;
}

.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: var(--ink); }
.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: 1.25rem 26px 2rem;
}
.content-page > h1 {
    font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.2rem);
    margin: 0.5rem 0 0.75rem;
}
.content-page > .content-hero-sub {
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--line);
}
.content-page > .ad-slot { margin: 1.25rem 0; }
.content-page > .guide-section:first-of-type { margin-top: 1.25rem; }
.content-hero {
    text-align: center;
    padding: 26px 0 22px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 22px;
    position: relative;
}
.content-hero h2 { margin: 0 0 10px; }
.content-hero-sub { color: var(--muted); font-size: 1.02rem; max-width: 56ch; margin: 0 auto 16px; }

.guide-section {
    margin-bottom: 2rem;
    padding-top: 0.25rem;
}
.guide-section + .guide-section {
    margin-top: 0.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--line);
}
.guide-section h2 {
    font-family: var(--ff-display);
    font-size: clamp(1.35rem, 1.1rem + 1vw, 1.65rem);
    font-weight: 600;
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
}
.guide-section h3 {
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--hv);
    display: inline-block;
}
.guide-section ul, .guide-section ol { margin: 0 0 1rem 1.2rem; }
.guide-section li { margin-bottom: 7px; }
.guide-section p { margin-bottom: 1rem; }
.guide-section a { color: var(--hv-deep); font-weight: 600; }
.guide-section a:hover { color: var(--ink); }

/* 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: var(--hv-deep);
    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: 0 0 8px; }
.content-cta p { color: #C9CDD6; margin: 0 0 18px; }
.content-cta .btn { margin: 5px; }

.guide-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: 2.5rem;
}
.guide-cta h3 { color: #fff; margin: 0 0 8px; }
.guide-cta p { color: #C9CDD6; margin: 0 0 18px; }
.guide-cta .btn { margin: 5px; }

/* Topic link grid */
.topic-link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 10px;
}
.topic-link-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 14px 16px;
    font-weight: 600;
    font-size: .88rem;
    color: var(--ink);
    transition: all .2s ease;
    box-shadow: var(--sh-sm);
}
.topic-link-card__nr {
    flex: 0 0 auto;
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    display: grid;
    place-items: center;
    background: var(--hv-soft);
    color: var(--hv-deep);
    border: 1px solid var(--hv-muted);
    border-radius: 8px;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1;
}
.topic-link-card:hover {
    border-color: var(--hv-muted);
    background: var(--hv-soft);
    transform: translateY(-2px);
    box-shadow: var(--sh);
    text-decoration: none;
}
.topic-link-card:hover .topic-link-card__nr {
    background: var(--hv);
    color: #fff;
    border-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: #fff;
    font-weight: 800;
    font-size: .9rem;
    padding: 10px 16px;
    border-radius: var(--r-pill);
}
.course-cta-btn:hover {
    background: var(--hv-deep);
    color: #fff;
    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: var(--ink); 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: var(--ink); }

/* Article */
.blog-article {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh);
    padding: 20px 30px 36px;
}
.blog-breadcrumb { margin-bottom: 1rem; }
.blog-article > h1 {
    font-size: clamp(1.7rem, 1.3rem + 2vw, 2.3rem);
    line-height: 1.2;
    margin: 0 0 0.875rem;
}
.blog-article > .blog-lead {
    margin: 0 0 1.5rem;
    font-size: 1.08rem;
    line-height: 1.65;
    color: var(--muted);
}
.blog-article > h2 {
    font-size: 1.45rem;
    margin: 2.5rem 0 0.875rem;
}
.blog-article > h3 {
    font-size: 1.18rem;
    margin: 1.75rem 0 0.75rem;
}
.blog-article > p { margin-bottom: 1rem; color: var(--text); }
.blog-article > ul,
.blog-article > ol { margin: 0 0 1rem 1.3rem; }
.blog-article > table,
.blog-article > .cook-table { margin: 0.75rem 0 1.25rem; }
.blog-article > .ad-slot { margin: 1.25rem 0; }
.blog-article > a { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--hv-deep); text-underline-offset: 3px; }
.blog-article > a:hover { color: var(--ink); }
.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: 2.5rem 0 0.875rem; }
.blog-article__body h3 { font-size: 1.18rem; margin: 1.75rem 0 0.75rem; }
.blog-article__body p { margin-bottom: 1rem; color: var(--text); }
.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: 2.5rem; border-top: 2px solid var(--hv); padding-top: 1.25rem; }
.blog-faq h2 { font-size: 1.4rem; margin: 0 0 0.75rem; }
.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: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.legal-section:last-of-type { border-bottom: none; }
.legal-section h2 { margin: 0 0 0.875rem; }
.legal-section h3 { margin: 1.5rem 0 0.625rem; }
.legal-section p { margin-bottom: 1rem; color: var(--text); }
.legal-section a { color: var(--hv-deep); font-weight: 600; }
.contact-email { font-size: 1.1rem; font-weight: 700; }
.contact-email a { color: var(--hv-deep); }
.back-button-container { text-align: center; margin-top: 8px; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--ink) 0%, #0a0d0b 100%);
    color: rgba(255, 255, 255, 0.65);
    text-align: center;
    padding: 36px 0 32px;
    margin-top: 48px;
    border-top: 2px solid var(--hv-deep);
}
.footer p { color: rgba(255, 255, 255, 0.65); font-size: .88rem; }
.footer-links { margin: 14px 0; display: flex; flex-wrap: wrap; gap: 6px 10px; justify-content: center; }
.footer-links a { color: rgba(255, 255, 255, 0.9); font-weight: 500; font-size: .88rem; }
.footer-links a:hover { color: var(--hv-muted); text-decoration: none; }
.separator { color: rgba(255, 255, 255, 0.25); }
.footer-disclaimer { font-size: .76rem; color: rgba(255, 255, 255, 0.4); margin-top: 8px; }

/* ==========================================================================
   COOKIE BANNER
   ========================================================================== */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background: linear-gradient(180deg, var(--ink-2) 0%, var(--ink) 100%);
    color: #E7ECE8;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -8px 40px rgba(20, 24, 22, 0.22);
    display: flex;
    align-items: stretch;
    padding: 0 env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
    animation: cookieSlideUp 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
html.cookies-accepted .cookie-banner {
    display: none !important;
}
@keyframes cookieSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.cookie-banner__content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 18px;
    padding: 16px 20px;
    width: 100%;
    max-width: min(1280px, 100%);
    margin: 0 auto;
}
.cookie-banner__content p {
    color: #C9CDD6;
    font-size: .9rem;
    line-height: 1.5;
    flex: 1 1 280px;
    margin: 0;
}
.cookie-banner__content a {
    color: #6EE7B7;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.cookie-banner__content a:hover { color: #fff; }
.cookie-banner__actions { flex: 0 0 auto; }
.cookie-btn {
    padding: 12px 28px;
    font-size: .92rem;
    white-space: nowrap;
}
@media (min-width: 761px) {
    .cookie-banner__content {
        padding: 18px 24px;
    }
}

/* ==========================================================================
   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: 1.25rem 0 0.625rem; }
.wc-state-extra h3:first-child { margin-top: 0; }
.wc-state-extra p { margin-bottom: 1rem; }
.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(--hv-muted); background: var(--surface); }
.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 h1,
.feature-hero h2 { margin: 0 0 0.75rem; }
.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(--text); line-height: 1.35; }
.flashcard__a { margin-top: 14px; }
.flashcard__answer { font-size: 1.05rem; font-weight: 800; color: var(--green); }
.flashcard__answer strong { color: inherit; }
.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, var(--surface), var(--hv-soft));
    border: 1px solid var(--hv-muted);
    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; }

/* ==========================================================================
   Premium polish — content pages, results, cookie
   ========================================================================== */
.content-page {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh);
    padding: 36px 32px;
    margin-bottom: 24px;
}
.content-hero h1 {
    font-family: var(--ff-display);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0 0 0.75rem;
    line-height: 1.2;
}
.score-circle {
    border-color: var(--line) !important;
    box-shadow: 0 0 0 8px var(--hv-soft), var(--sh-md);
}
.faq-toggle {
    background: var(--surface-2);
    border: 1px solid var(--line);
}
.faq-question[aria-expanded="true"] .faq-toggle {
    background: var(--hv-soft);
    border-color: var(--hv-muted);
    color: var(--hv-deep);
}
.cookie-banner .btn-primary { box-shadow: none; color: #fff; }
@media (min-width: 761px) {
    .home-editorial-hero__inner { padding-left: 4px; }
}
/* ==========================================================================
   PREMIUM QUIZ EXPERIENCE
   ========================================================================== */
body.is-quiz-active main.container,
body.is-quiz-active .home-practice-zone__main,
body.is-quiz-active #quiz-screen.active,
body.is-quiz-active #result-screen.active {
    max-width: 680px;
}

.quiz-shell {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-md);
    overflow: hidden;
}

.progress-container {
    padding: 20px 24px 18px;
    background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
    border-bottom: 1px solid var(--line);
    margin-bottom: 0;
}
.progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.progress-label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.02em;
}
.progress-pct {
    font-family: var(--ff-display);
    font-size: .9rem;
    font-weight: 600;
    color: var(--hv-deep);
    font-variant-numeric: tabular-nums;
}
.progress-bar {
    height: 5px;
    background: var(--line);
    border-radius: var(--r-pill);
    overflow: hidden;
}
.quiz-shell .question-container {
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 28px 24px 32px;
}

/* Mode cards */
.mode-cards {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}
@media (min-width: 560px) {
    .mode-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 960px) {
    .home-practice-zone .mode-cards {
        grid-template-columns: 1fr;
    }
}
@media (min-width: 1100px) {
    .home-practice-zone .mode-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}
.mode-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    text-align: left;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 18px 16px;
    cursor: pointer;
    font: inherit;
    color: inherit;
    box-shadow: var(--sh-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
}
.mode-card:hover:not([disabled]),
.mode-card:focus-visible:not([disabled]) {
    border-color: var(--hv-muted);
    transform: translateY(-2px);
    box-shadow: var(--sh);
}
.mode-card--featured {
    background: linear-gradient(160deg, var(--hv-soft) 0%, var(--surface) 100%);
    border-color: var(--hv);
    box-shadow: 0 4px 20px var(--accent-glow);
}
.mode-card--featured:hover:not([disabled]) {
    border-color: var(--hv-deep);
    box-shadow: 0 8px 28px var(--accent-glow);
}
.mode-card__badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: .62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff;
    background: var(--hv-deep);
    padding: 3px 8px;
    border-radius: var(--r-pill);
}
.mode-card__title {
    display: block;
    font-family: var(--ff-display);
    font-weight: 600;
    font-size: 1rem;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.mode-card__meta {
    display: block;
    font-size: .78rem;
    color: var(--muted);
    font-weight: 500;
    margin-top: 2px;
}
.mode-card[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Answer options with A/B/C/D */
.option-btn {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    text-align: left;
}
.option-btn::before { display: none; }
.option-btn__letter {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    background: var(--surface-2);
    border: 1.5px solid var(--line-2);
    border-radius: 10px;
    font-size: .82rem;
    font-weight: 700;
    color: var(--muted);
    transition: all 0.2s ease;
}
.option-btn__text {
    flex: 1;
    padding-top: 5px;
    line-height: 1.45;
}
.option-btn:hover:not([disabled]) .option-btn__letter {
    background: var(--hv-soft);
    border-color: var(--hv);
    color: var(--hv-deep);
}
.option-btn.correct .option-btn__letter {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}
.option-btn.incorrect .option-btn__letter {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

/* Explanation panel */
.explanation::before {
    content: "Explanation";
    display: block;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--hv-deep);
    margin-bottom: 6px;
}

/* Results ring */
.result-content--premium {
    padding: 40px 28px 36px;
}
.results-title {
    font-family: var(--ff-display);
    font-weight: 600;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}
.results-ring-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}
.results-ring {
    --ring-size: 160px;
    width: var(--ring-size);
    height: var(--ring-size);
    border-radius: 50%;
    background: conic-gradient(
        var(--hv) 0deg,
        var(--hv) calc(var(--score, 0) * 3.6deg),
        var(--line) calc(var(--score, 0) * 3.6deg),
        var(--line) 360deg
    );
    display: grid;
    place-items: center;
    box-shadow: 0 0 0 6px var(--hv-soft), var(--sh-md);
}
.results-ring--fail {
    background: conic-gradient(
        var(--red) 0deg,
        var(--red) calc(var(--score, 0) * 3.6deg),
        var(--line) calc(var(--score, 0) * 3.6deg),
        var(--line) 360deg
    );
    box-shadow: 0 0 0 6px var(--red-bg), var(--sh-md);
}
.results-ring__inner {
    width: calc(var(--ring-size) - 24px);
    height: calc(var(--ring-size) - 24px);
    border-radius: 50%;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}
.results-ring .results-score-pct {
    font-family: var(--ff-display);
    font-size: 2.4rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.03em;
}
.results-ring__label {
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}
.results-score-detail {
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 8px;
}

/* Refined question tools */
.question-tools {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.q-tool {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--muted);
    font: inherit;
    font-size: .8rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: var(--r-pill);
    cursor: pointer;
    transition: all 0.2s ease;
}
.q-tool:hover {
    border-color: var(--hv-muted);
    background: var(--hv-soft);
    color: var(--hv-deep);
}
.q-tool.is-on {
    background: var(--hv-soft);
    border-color: var(--hv);
    color: var(--hv-deep);
}
.q-tool__icon { font-size: .9rem; line-height: 1; }

@media (prefers-reduced-motion: reduce) {
    .screen.active { animation: none; }
    .btn, .option-btn, .topic-link-card, .gamify-stat, .mode-card { transition: none; }
    .mode-card:hover:not([disabled]) { transform: none; }
}

/* ════════════════════════════════════════════════════════════════════
   ENHANCEMENTS: dark mode · theme toggle · exam timer · combo streak
   · temperature thermometer · allergen grid
   ════════════════════════════════════════════════════════════════════ */

/* ── DARK MODE ─────────────────────────────────────────────────────── */
[data-theme="dark"] {
    --bg:        #0F1411;
    --surface:   #171D19;
    --surface-2: #1E2521;
    --line:      #2A322C;
    --line-2:    #353F38;
    --ink:       #E7ECE8;
    --ink-2:     #C9D4CC;
    --ink-3:     #9AA69E;
    --fill:      #1A211C;
    --fill-2:    #252D28;
    --text:      #E7ECE8;
    --muted:     #9AA69E;
    --muted-2:   #7C887F;
    --green-bg:  #0E2A20;
    --red-bg:    #2A1414;
    --amber:     #E0A24A;
    --hv-soft:   #0E2A20;
    --hv-muted:  #134E3A;
    --sh-sm: 0 1px 2px rgba(0,0,0,0.4), 0 2px 8px rgba(0,0,0,0.4);
    --sh:    0 4px 20px rgba(0,0,0,0.5), 0 1px 3px rgba(0,0,0,0.4);
    --sh-md: 0 12px 40px rgba(0,0,0,0.55);
    --sh-lg: 0 24px 60px rgba(0,0,0,0.6);
}
[data-theme="dark"] body {
    background:
        radial-gradient(ellipse 90% 60% at 50% -15%, rgba(5, 150, 105, 0.10), transparent 55%),
        radial-gradient(ellipse 50% 40% at 100% 0%, rgba(5, 150, 105, 0.06), transparent 50%),
        linear-gradient(180deg, #10160F 0%, var(--bg) 100%);
    color: var(--text);
}
[data-theme="dark"] ::selection { background: var(--hv-muted); color: var(--text); }
[data-theme="dark"] a { color: var(--text); }
[data-theme="dark"] a:hover { color: #fff; }

/* Keep dark fills on components that use --ink as a background in light mode */
[data-theme="dark"] .site-brand__mark {
    background: linear-gradient(145deg, var(--fill) 0%, var(--fill-2) 100%);
    color: #fff;
}
[data-theme="dark"] .nav-link[aria-current="page"],
[data-theme="dark"] .nav-link--active {
    background: var(--hv-deep);
    color: #fff;
}
[data-theme="dark"] .page-hero-bar {
    background: linear-gradient(135deg, var(--fill) 0%, var(--fill-2) 55%, #2a3530 100%);
}
[data-theme="dark"] .btn-topic:hover {
    background: var(--fill);
    color: #fff;
    border-color: var(--fill);
}
[data-theme="dark"] .btn-review,
[data-theme="dark"] .results-affiliate-btn {
    background: var(--fill);
    color: #fff;
}
[data-theme="dark"] .btn-review:hover,
[data-theme="dark"] .results-affiliate-btn:hover {
    background: var(--fill-2);
    color: #fff;
}
[data-theme="dark"] .guide-table th,
[data-theme="dark"] .blog-table th {
    background: var(--fill);
    color: #fff;
}
[data-theme="dark"] .content-cta {
    background: linear-gradient(180deg, var(--fill), var(--fill-2));
}
[data-theme="dark"] .footer {
    background: linear-gradient(180deg, var(--fill) 0%, #0a0d0b 100%);
}
[data-theme="dark"] .cookie-banner {
    background: linear-gradient(180deg, var(--fill) 0%, #0a0d0b 100%);
    border-top-color: var(--line);
}
[data-theme="dark"] .home-nav-btn {
    background: var(--fill);
    color: #fff;
}
[data-theme="dark"] .hz-scene-tab.active {
    background: var(--fill);
    border-color: var(--fill);
    color: #fff;
}

[data-theme="dark"] body > header.site-header { background: rgba(20, 26, 22, 0.90); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    [data-theme="dark"] body > header.site-header { background: rgba(20, 26, 22, 0.78); }
}
[data-theme="dark"] .option-btn { background: var(--surface-2); color: var(--text); }
[data-theme="dark"] .option-btn.correct { color: #6EE7B7; }
[data-theme="dark"] .option-btn.incorrect { color: #FCA5A5; }
[data-theme="dark"] .q-tool {
    background: var(--surface-2);
    color: var(--text);
    border-color: var(--line-2);
}
[data-theme="dark"] .q-tool:hover {
    background: var(--surface);
    border-color: var(--hv-muted);
    color: var(--text);
}
[data-theme="dark"] .progress-stat .v,
[data-theme="dark"] .q-tool.is-on { color: var(--text); }

[data-theme="dark"] .content-page,
[data-theme="dark"] .guide-section,
[data-theme="dark"] .guide-section li,
[data-theme="dark"] .legal-section,
[data-theme="dark"] .blog-article__body,
[data-theme="dark"] .blog-article__body p {
    color: var(--text);
}
[data-theme="dark"] .content-hero-sub,
[data-theme="dark"] .guide-section p,
[data-theme="dark"] .affiliate-text,
[data-theme="dark"] .blog-card__excerpt,
[data-theme="dark"] .glossary-term dd {
    color: var(--muted);
}
[data-theme="dark"] .affiliate-card,
[data-theme="dark"] .affiliate-card--promo {
    background: linear-gradient(180deg, var(--surface) 0%, var(--hv-muted) 100%) !important;
    border-color: var(--line);
    color: var(--text);
}
[data-theme="dark"] .affiliate-heading,
[data-theme="dark"] .affiliate-card h3 { color: var(--text); }
[data-theme="dark"] .affiliate-eyebrow { color: #6EE7B7; }
[data-theme="dark"] .affiliate-disclosure { color: var(--muted-2); }
[data-theme="dark"] .daily-challenge {
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%) !important;
    border-color: var(--line);
    color: var(--text);
}
[data-theme="dark"] .dc-title,
[data-theme="dark"] .dc-title strong,
[data-theme="dark"] .dc-question {
    color: var(--text);
}
[data-theme="dark"] .dc-opt-btn {
    background: var(--surface-2);
    color: var(--text);
    border-color: var(--line);
}
[data-theme="dark"] .dc-opt-btn:hover:not([disabled]) { border-color: var(--muted); }
[data-theme="dark"] .dc-correct {
    background: var(--green-bg) !important;
    border-color: var(--green) !important;
    color: #6EE7B7 !important;
}
[data-theme="dark"] .dc-wrong {
    background: var(--red-bg) !important;
    border-color: var(--red) !important;
    color: #FCA5A5 !important;
}
[data-theme="dark"] .dc-result.dc-correct { color: #6EE7B7 !important; background: none !important; }
[data-theme="dark"] .dc-result.dc-wrong { color: #FCA5A5 !important; background: none !important; }
[data-theme="dark"] .seo-text .container {
    background: var(--surface);
    border-color: var(--line);
}
[data-theme="dark"] .guide-section a,
[data-theme="dark"] .legal-section a,
[data-theme="dark"] .blog-article__body a {
    color: #6EE7B7;
}
[data-theme="dark"] .thermo-legend .tl-item { color: var(--muted); }
[data-theme="dark"] .thermo-legend .tl-item strong { color: var(--text); }
[data-theme="dark"] .tl-item--hot { background: linear-gradient(90deg, rgba(220, 38, 38, 0.18), transparent); }
[data-theme="dark"] .tl-item--danger { background: linear-gradient(90deg, rgba(234, 88, 12, 0.22), transparent); }
[data-theme="dark"] .tl-item--safe { background: linear-gradient(90deg, rgba(37, 99, 235, 0.18), transparent); }
[data-theme="dark"] .faq-question { color: var(--text); }
[data-theme="dark"] .faq-question:hover { color: #fff; }
[data-theme="dark"] .faq-answer { color: var(--muted); }
[data-theme="dark"] .mode-selection__title,
[data-theme="dark"] .question-text,
[data-theme="dark"] .gamify-value,
[data-theme="dark"] .mode-card__title,
[data-theme="dark"] .dc-title,
[data-theme="dark"] .allergen-name {
    color: var(--text);
}
[data-theme="dark"] .btn-mode { background: var(--surface-2); color: var(--text); border-color: var(--line); }
[data-theme="dark"] .btn-mode:hover:not([disabled]) { background: var(--hv-soft); color: var(--text); }
[data-theme="dark"] .mode-buttons .btn-mode:nth-child(2) {
    background: linear-gradient(135deg, var(--hv) 0%, var(--hv-deep) 100%);
    color: #fff;
}
[data-theme="dark"] .sign-opt.correct { color: #6EE7B7; }
[data-theme="dark"] .sign-opt.incorrect { color: #FCA5A5; }
[data-theme="dark"] .btn-secondary {
    background: var(--surface-2);
    color: var(--text);
    border-color: var(--line-2);
}
[data-theme="dark"] .btn-secondary:hover {
    background: var(--surface);
    color: var(--text);
    border-color: var(--muted);
}
[data-theme="dark"] .seo-text,
[data-theme="dark"] .seo-text h2,
[data-theme="dark"] .seo-text h3 {
    color: var(--text);
}
[data-theme="dark"] .seo-text p {
    color: var(--muted);
}
[data-theme="dark"] .topic-link-card {
    background: var(--surface);
    color: var(--text);
}
[data-theme="dark"] .topic-link-card:hover {
    color: var(--text);
}
[data-theme="dark"] .explanation,
[data-theme="dark"] .progress-label,
[data-theme="dark"] .progress-text,
[data-theme="dark"] .option-btn__text,
[data-theme="dark"] .toc a {
    color: var(--text);
}
[data-theme="dark"] .toc a:hover { color: #6EE7B7; }
[data-theme="dark"] .explanation {
    background: var(--surface-2);
    border-color: var(--line);
    color: var(--muted);
}
[data-theme="dark"] .welcome-back { color: #6EE7B7; }
[data-theme="dark"] .mode-selection__subtitle,
[data-theme="dark"] .topic-drill-label,
[data-theme="dark"] .review-mode-hint {
    color: var(--muted);
}
[data-theme="dark"] .btn-topic {
    background: var(--surface-2);
    color: var(--text);
    border-color: var(--line);
}
[data-theme="dark"] .btn-topic:hover {
    background: var(--hv-deep);
    color: #fff;
}

[data-theme="dark"] .state-link[aria-current="page"] {
    background: var(--hv-muted);
    border-color: var(--hv);
    color: #fff;
}
[data-theme="dark"] .state-link:hover {
    color: #fff;
}
[data-theme="dark"] .site-header__tools {
    background: rgba(30, 37, 33, 0.85);
    border-left-color: var(--line);
}
[data-theme="dark"] .sticky-cta {
    background: rgba(20, 26, 22, 0.92);
    border-top-color: var(--line);
}
[data-theme="dark"] .results-affiliate-copy {
    color: #6EE7B7;
}
[data-theme="dark"] .seo-text a {
    color: #6EE7B7;
}
[data-theme="dark"] .seo-text a:hover {
    color: #fff;
}
[data-theme="dark"] .topic-link-card__nr {
    background: var(--hv-muted);
    color: #fff;
    border-color: var(--hv);
}
[data-theme="dark"] .home-editorial-hero__badge {
    color: #6EE7B7;
    background: rgba(5, 150, 105, 0.18);
    border-color: rgba(110, 231, 183, 0.35);
}
[data-theme="dark"] .cookie-banner__content a {
    color: #6EE7B7;
}
[data-theme="dark"] .nav-toggle:hover,
[data-theme="dark"] .font-resize-btn:hover,
[data-theme="dark"] .home-nav-btn:hover {
    color: #fff;
}
[data-theme="dark"] .btn-primary:focus-visible {
    outline-color: #6EE7B7;
}
[data-theme="dark"] .guide-cta {
    background: linear-gradient(180deg, var(--fill), var(--fill-2));
}
[data-theme="dark"] .guide-cta h3 { color: #fff; }
[data-theme="dark"] .guide-cta p { color: var(--muted); }
[data-theme="dark"] .content-cta .btn-secondary {
    background: var(--surface-2);
    color: var(--text);
    border-color: var(--line-2);
}
[data-theme="dark"] .content-cta .btn-secondary:hover,
[data-theme="dark"] .guide-cta .btn-secondary:hover {
    background: var(--surface);
    color: #fff;
    border-color: var(--muted);
}
[data-theme="dark"] .faq-question[aria-expanded="true"] .faq-toggle {
    background: var(--hv);
    border-color: var(--hv);
    color: #fff;
}
[data-theme="dark"] .course-cta-btn {
    color: #fff;
}
[data-theme="dark"] .course-cta-btn:hover {
    color: #fff;
}

[data-theme="dark"] .flashcard::before {
    background-image: repeating-linear-gradient(-45deg, var(--hv) 0, var(--hv) 12px, var(--fill-2) 12px, var(--fill-2) 24px);
}
[data-theme="dark"] .flashcard { color: var(--text); }
[data-theme="dark"] .flashcard__q { color: var(--text); }
[data-theme="dark"] .flashcard__answer,
[data-theme="dark"] .flashcard__answer strong { color: #6EE7B7; }
[data-theme="dark"] .flashcard__exp { color: var(--muted); }
[data-theme="dark"] .flashcard__hint,
[data-theme="dark"] .flashcard-meta { color: var(--muted-2); }
[data-theme="dark"] .feature-hero h1 { color: var(--text); }
[data-theme="dark"] .feature-hero p { color: var(--muted); }
[data-theme="dark"] .review-item .rq { color: var(--text); }
[data-theme="dark"] .review-item .ra { color: #6EE7B7; }
[data-theme="dark"] .review-item .re { color: var(--muted); }

/* ── THEME TOGGLE BUTTON ───────────────────────────────────────────── */
.theme-toggle {
    width: 38px; height: 38px;
    border-radius: var(--r-pill);
    border: 1px solid var(--line-2);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
    transition: border-color .15s, transform .15s, background .15s;
    margin-left: 8px;
}
.theme-toggle:hover { border-color: var(--hv); transform: translateY(-1px); }
.theme-toggle:focus-visible { outline: 2px solid var(--hv); outline-offset: 2px; }

/* ── QUIZ META: COMBO STREAK + EXAM TIMER PILLS ────────────────────── */
.quiz-meta { display: inline-flex; align-items: center; gap: 8px; }
.combo-pill, .timer-pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 11px;
    border-radius: var(--r-pill);
    font-size: .8rem; font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.combo-pill { background: #FEF3C7; color: #B45309; }
[data-theme="dark"] .combo-pill { background: #3A2E0D; color: #FBBF24; }
.combo-pill[hidden], .timer-pill[hidden] { display: none; }
@keyframes combo-pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.combo-pill:not([hidden]) { animation: combo-pop .25s ease; }
.timer-pill { background: var(--hv-soft); color: var(--hv-deep); }
[data-theme="dark"] .timer-pill { color: #34D399; }
.timer-pill--warning { background: var(--red-bg); color: var(--red); animation: timer-pulse 1s infinite; }
@keyframes timer-pulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

/* ── EXAM MODE BADGE ───────────────────────────────────────────────── */
.mode-card__badge--exam { background: var(--hv-deep); color: #fff; }

/* ── TEMPERATURE DANGER-ZONE THERMOMETER ───────────────────────────── */
.thermo-wrap { display: flex; gap: 22px; align-items: stretch; flex-wrap: wrap; margin: 8px 0; }
.thermo {
    width: 92px; flex-shrink: 0; display: flex; flex-direction: column;
    border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line); min-height: 300px;
}
.thermo-zone {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; font-size: .82rem; text-align: center; padding: 6px;
    transition: transform .15s;
}
.thermo-zone:hover { transform: scale(1.04); }
.thermo-zone small { font-weight: 600; font-size: .68rem; opacity: .92; margin-top: 2px; }
.tz-hot { background: linear-gradient(180deg,#B91C1C,#DC2626); flex: .8; }
.tz-danger { background: repeating-linear-gradient(45deg,#EA580C,#EA580C 10px,#F97316 10px,#F97316 20px); flex: 2; }
.tz-safe { background: linear-gradient(180deg,#2563EB,#1D4ED8); flex: .8; }
.thermo-legend { flex: 1; min-width: 240px; }
.thermo-legend--aligned {
    display: flex;
    flex-direction: column;
    min-height: 300px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    overflow: hidden;
    background: var(--surface);
}
.thermo-legend .tl-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    font-size: .88rem;
    line-height: 1.45;
    color: var(--muted);
    margin: 0;
}
.thermo-legend--aligned .tl-item { border-bottom: 1px solid var(--line); }
.thermo-legend .tl-item:last-child { border-bottom: none; }
.thermo-legend .tl-item strong { color: var(--text); display: block; margin-bottom: 2px; }
.tl-item--hot { flex: .8; background: linear-gradient(90deg, rgba(220, 38, 38, 0.06), transparent); }
.tl-item--danger { flex: 2; background: linear-gradient(90deg, rgba(234, 88, 12, 0.08), transparent); }
.tl-item--safe { flex: .8; background: linear-gradient(90deg, rgba(37, 99, 235, 0.06), transparent); }
.tl-item__text { min-width: 0; }
.tl-dot { width: 14px; height: 14px; border-radius: 4px; flex-shrink: 0; }
.tl-dot--hot { background: #DC2626; }
.tl-dot--danger { background: #EA580C; }
.tl-dot--safe { background: #2563EB; }
@media (max-width: 520px) {
    .thermo-legend--aligned { min-height: 0; }
    .thermo-legend--aligned .tl-item { flex: none; }
}

/* ── 10 PRIORITY ALLERGENS GRID ────────────────────────────────────── */
.allergen-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 8px 0; }
@media (max-width: 640px) { .allergen-grid { grid-template-columns: repeat(2, 1fr); } }
.allergen-cell {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
    padding: 16px 8px; text-align: center; transition: transform .15s, border-color .15s, box-shadow .15s;
}
.allergen-cell:hover { transform: translateY(-2px); border-color: var(--hv); box-shadow: var(--sh-sm); }
.allergen-emoji { font-size: 1.8rem; line-height: 1; }
.allergen-name { font-size: .8rem; font-weight: 700; margin-top: 8px; color: var(--text); }

/* ── STATE REQUIREMENTS FACTS BOX ──────────────────────────────────── */
.state-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0.75rem 0 1.25rem; }
@media (max-width: 640px) { .state-facts { grid-template-columns: repeat(2, 1fr); } }
.state-fact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; }
.state-fact__label { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.state-fact__val { font-size: .9rem; font-weight: 700; color: var(--text); margin-top: 3px; line-height: 1.35; }

/* ── DANGER-ZONE CHECKER TOOL ──────────────────────────────────────── */
.tool-wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 22px; align-items: start; margin: 8px 0; }
@media (max-width: 760px) { .tool-wrap { grid-template-columns: 1fr; } }
.tool-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--sh-sm); }
.tool-card h3 { margin-bottom: 4px; }
.tool-readout { display: flex; align-items: baseline; gap: 10px; margin: 14px 0 6px; }
.tool-temp { font-size: 2.6rem; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.tool-slider { width: 100%; margin: 14px 0 6px; accent-color: var(--hv); }
.tool-status { display: inline-block; padding: 6px 14px; border-radius: var(--r-pill); font-weight: 800; font-size: .9rem; }
.tool-status--safe { background: #DBEAFE; color: #1D4ED8; }
.tool-status--hot { background: #FEE2E2; color: #B91C1C; }
.tool-status--danger { background: #FFEDD5; color: #C2410C; }
[data-theme="dark"] .tool-status--safe { background: #11233F; color: #93C5FD; }
[data-theme="dark"] .tool-status--hot { background: #3A1414; color: #FCA5A5; }
[data-theme="dark"] .tool-status--danger { background: #3A2A14; color: #FDBA74; }
.tool-advice { font-size: .92rem; color: var(--muted); margin-top: 10px; line-height: 1.6; }
.cook-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.cook-table th, .cook-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.cook-table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.cook-table td.temp-val { font-weight: 800; color: var(--hv-deep); white-space: nowrap; }
[data-theme="dark"] .cook-table td.temp-val { color: #34D399; }
.rule-tool { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.rule-tool input { width: 90px; padding: 9px 11px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); color: var(--text); font: inherit; }
.rule-result { font-weight: 800; padding: 8px 14px; border-radius: var(--r-pill); }
.rule-result--ok { background: #DBEAFE; color: #1D4ED8; }
.rule-result--use { background: #FFEDD5; color: #C2410C; }
.rule-result--bin { background: #FEE2E2; color: #B91C1C; }
[data-theme="dark"] .rule-result--ok { background:#11233F; color:#93C5FD; }
[data-theme="dark"] .rule-result--use { background:#3A2A14; color:#FDBA74; }
[data-theme="dark"] .rule-result--bin { background:#3A1414; color:#FCA5A5; }

/* ── LIGHT-MODE BUTTON CONTRAST ────────────────────────────────────────
   In the default (light) theme, white/surface buttons on a near-white page
   blended in. Give the "ghost" buttons a clearly visible border + subtle
   lift so they read as tappable. Scoped to light mode only — dark mode
   keeps its own overrides untouched. */
html:not([data-theme="dark"]) .btn-secondary,
html:not([data-theme="dark"]) .btn-mode,
html:not([data-theme="dark"]) .btn-topic,
html:not([data-theme="dark"]) .option-btn,
html:not([data-theme="dark"]) .btn-hero-secondary,
html:not([data-theme="dark"]) .theme-toggle,
html:not([data-theme="dark"]) .font-resize-btn {
    border-color: #AEB7B0;
    box-shadow: 0 1px 2px rgba(20, 24, 22, 0.05), 0 2px 6px rgba(20, 24, 22, 0.06);
}

/* The two main quiz mode buttons are the most important affordance */
html:not([data-theme="dark"]) .btn-mode {
    border-width: 1.5px;
    border-color: #9CA8A0;
}
html:not([data-theme="dark"]) .option-btn {
    border-color: #A7B1AA;
}
html:not([data-theme="dark"]) .option-btn::before {
    border-color: #98A39B;
}

/* Keep clear, stronger feedback on hover/focus in light mode */
html:not([data-theme="dark"]) .btn-secondary:hover,
html:not([data-theme="dark"]) .btn-mode:hover:not([disabled]),
html:not([data-theme="dark"]) .btn-mode:focus-visible:not([disabled]),
html:not([data-theme="dark"]) .theme-toggle:hover,
html:not([data-theme="dark"]) .font-resize-btn:hover {
    border-color: var(--hv-deep);
    box-shadow: 0 3px 10px rgba(5, 150, 105, 0.18);
}

/* Don't override the filled/colored states */
html:not([data-theme="dark"]) .mode-buttons .btn-mode:nth-child(2),
html:not([data-theme="dark"]) .option-btn.correct,
html:not([data-theme="dark"]) .option-btn.incorrect {
    border-color: transparent;
}
html:not([data-theme="dark"]) .option-btn.correct { border-color: var(--green); }
html:not([data-theme="dark"]) .option-btn.incorrect { border-color: var(--red); }
