/* Simulacro design system: tokens, base, components. Mobile first, no external assets.
   Page families live in css/app.css (logged-in shell, dashboard, settings) and css/site.css (public pages).
   Guide: docs/design.md. Colours only through the tokens below; dark mode swaps the tokens. */
@font-face { font-family: "Geist"; font-style: normal; font-weight: 300 800; font-display: swap; src: url("fonts/geist-normal-300-800-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 300 800; font-display: swap; src: url("fonts/geist-normal-300-800-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("fonts/geist-mono-normal-400-600-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("fonts/geist-mono-normal-400-600-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Tokens: ink teal for structure, warm sand for panels, one coral for actions and alerts. */
:root {
  color-scheme: light;
  --bg: #f3f5f3; --surface: #fff; --surface-2: #f8faf9; --line: #dce3e0; --line-strong: #c3cecb;
  --ink: #10292d; --muted: #52676a; --faint: #7d8f91;
  --teal: #0f6e5f; --teal-strong: #0a5247; --teal-soft: #e1efeb; --teal-line: #bcd9d1;
  --sand: #f1e8da; --sand-2: #e6d9c3; --sand-ink: #6b5536;
  --coral: #ff6f5b; --coral-strong: #f2573f; --coral-ink: #b53a27; --coral-soft: #ffe6e1;
  --on-coral: #10292d; --on-teal: #fff;
  --band-green: #1e8a5f; --band-amber: #c7891a; --band-red: #d2492f;
  --night: #10292d; --night-2: #17363b; --on-night: #e7efed; --on-night-muted: #a8bdb9;
  --shadow-1: 0 1px 2px rgba(16, 41, 45, .06); --shadow-2: 0 1px 2px rgba(16, 41, 45, .05), 0 12px 32px -16px rgba(16, 41, 45, .22);
  --font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2rem; --s7: 3rem; --s8: 4.5rem;
  --r-sm: 8px; --r: 14px; --r-lg: 20px; --pill: 999px;
  --step--1: .8125rem; --step-0: 1.0625rem; --step-1: 1.25rem; --step-2: 1.5625rem; --step-3: 2rem;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c1b1d; --surface: #12262a; --surface-2: #0f2124; --line: #22393d; --line-strong: #31504f;
  --ink: #e3edea; --muted: #9ab0ac; --faint: #748c89;
  --teal: #4cc2a6; --teal-strong: #7ad7c1; --teal-soft: #143a35; --teal-line: #23524a;
  --sand: #262118; --sand-2: #3a3224; --sand-ink: #d6c2a0;
  --coral: #ff7d69; --coral-strong: #ff9584; --coral-ink: #ff9b8a; --coral-soft: #3a1e19; --on-teal: #0c1b1d;
  --band-green: #4bc98f; --band-amber: #e8b04b; --band-red: #ff8b76;
  --night: #071012; --night-2: #102326; --shadow-1: 0 1px 0 rgba(0, 0, 0, .35); --shadow-2: 0 1px 0 rgba(0, 0, 0, .35), 0 16px 36px -18px rgba(0, 0, 0, .7);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] {
    color-scheme: dark;
    --bg: #0c1b1d; --surface: #12262a; --surface-2: #0f2124; --line: #22393d; --line-strong: #31504f;
    --ink: #e3edea; --muted: #9ab0ac; --faint: #748c89;
    --teal: #4cc2a6; --teal-strong: #7ad7c1; --teal-soft: #143a35; --teal-line: #23524a;
    --sand: #262118; --sand-2: #3a3224; --sand-ink: #d6c2a0;
    --coral: #ff7d69; --coral-strong: #ff9584; --coral-ink: #ff9b8a; --coral-soft: #3a1e19; --on-teal: #0c1b1d;
    --band-green: #4bc98f; --band-amber: #e8b04b; --band-red: #ff8b76;
    --night: #071012; --night-2: #102326; --shadow-1: 0 1px 0 rgba(0, 0, 0, .35); --shadow-2: 0 1px 0 rgba(0, 0, 0, .35), 0 16px 36px -18px rgba(0, 0, 0, .7);
  }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font: 400 var(--step-0)/1.55 var(--font); color: var(--ink); background: var(--bg); font-feature-settings: "ss01", "cv11"; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--teal); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--teal-strong); }
h1, h2, h3, .h2, .h3 { line-height: 1.12; margin: 0 0 .6em; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(2.05rem, 6.2vw, 3.4rem); letter-spacing: -.035em; }
h2, .h2 { font-size: clamp(1.45rem, 3.6vw, 2rem); letter-spacing: -.025em; margin-top: 1.4em; }
h3, .h3 { font-size: var(--step-1); letter-spacing: -.012em; font-weight: 650; }
p { margin: 0 0 1em; }
.eyebrow + h1, .eyebrow + h2, .wrap > h2:first-child { margin-top: 0; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--teal-soft); color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg); padding: .5rem 1rem; z-index: 50; }
.skip:focus { left: .5rem; }
.mono, .eyebrow, .tag, .q-number, .case-label, .label { font-family: var(--mono); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.icon { width: 1.25rem; height: 1.25rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }

/* Layout */
.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }
/* Narrow reading columns share the wide grid's left edge, so sections never jump sideways */
.narrow { max-width: 46rem; }
.wrap.narrow { max-width: 72rem; }
.wrap.narrow > * { max-width: 46rem; }
.wrap.narrow.center > * { margin-inline: auto; }
.page-mock .wrap.narrow { max-width: 46rem; }
.page-mock .wrap.narrow > * { max-width: none; }
.section { padding: var(--s7) 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-lead, .lead { font-size: 1.15rem; color: var(--muted); max-width: 40rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: .75rem; font-weight: 500; color: var(--teal); margin-bottom: .6rem; }
.note { color: var(--muted); font-size: .92rem; }
.center { text-align: center; }
.empty { padding: 1.25rem; border: 1px dashed var(--line-strong); border-radius: var(--r); color: var(--muted); background: var(--surface-2); }
main { overflow-wrap: break-word; }
body > main, body > .app { flex: 1 0 auto; }

/* Header and footer of the public site */
.sample-banner { margin: 0; padding: .45rem 1.25rem; background: var(--sand-2); color: var(--ink); font-size: .9rem; text-align: center; font-weight: 600; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding-top: .7rem; padding-bottom: .7rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 1.9rem; height: 1.9rem; border-radius: 9px; background: var(--teal); color: var(--on-teal); display: grid; place-items: center; }
.brand-mark svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.1rem; font-size: .95rem; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:not(.btn):hover { color: var(--teal); }
.theme-form { display: inline-flex; margin: 0; }
.theme-toggle { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0; border: 1px solid var(--line); border-radius: var(--pill); background: var(--surface); color: var(--ink); cursor: pointer; }
.theme-toggle:hover { border-color: var(--teal); color: var(--teal); }
.theme-toggle .i-sun, [data-theme="dark"] .theme-toggle .i-moon { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
/* Dark mode: the night hero is darker than the page and keeps an edge */
[data-theme="dark"] .hero { border-bottom: 1px solid var(--line); }
@media (prefers-color-scheme: dark) { [data-theme="system"] .hero { border-bottom: 1px solid var(--line); } }
@media (prefers-color-scheme: dark) { [data-theme="system"] .theme-toggle .i-moon { display: none; } [data-theme="system"] .theme-toggle .i-sun { display: block; } }
.site-footer { margin-top: var(--s7); padding: var(--s6) 0 var(--s5); background: var(--night); color: var(--on-night-muted); font-size: .92rem; }
.site-footer a { color: var(--on-night); }
.footer-brand strong { color: var(--on-night); font-size: 1.05rem; }
.footer-grid { display: grid; gap: 1.25rem; }
.footer-links, .lang-switch { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.lang-switch a[aria-current] { font-weight: 700; text-decoration: none; }

/* Buttons: coral is the action colour; ghost is the quiet alternative. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .78rem 1.3rem; border: 1.5px solid var(--coral); border-radius: var(--pill); background: var(--coral); color: var(--on-coral); font: inherit; font-weight: 650; line-height: 1.2; text-decoration: none; cursor: pointer; text-align: center; transition: background .15s var(--ease), border-color .15s var(--ease), transform .15s var(--ease); }
.btn:hover { background: var(--coral-strong); border-color: var(--coral-strong); color: var(--on-coral); }
.btn:active { transform: translateY(1px); }
.btn-big { padding: 1rem 1.7rem; font-size: 1.08rem; }
.btn-small { padding: .45rem .95rem; font-size: .9rem; }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { background: var(--teal-soft); border-color: var(--teal); color: var(--ink); }
.btn-teal { background: var(--teal); border-color: var(--teal); color: var(--on-teal); }
.btn-teal:hover { background: var(--teal-strong); border-color: var(--teal-strong); color: var(--on-teal); }
.btn-danger { background: transparent; border-color: var(--coral-ink); color: var(--coral-ink); }
.btn-danger:hover { background: var(--coral-soft); border-color: var(--coral-ink); color: var(--coral-ink); }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--teal); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

/* Flash messages */
.flashes { padding-top: 1rem; }
.flash { margin: 0 0 .5rem; padding: .8rem 1rem; border-radius: var(--r-sm); background: var(--teal-soft); border-left: 4px solid var(--teal); color: var(--ink); }
.flash-error { background: var(--coral-soft); border-color: var(--coral-ink); }
.flash-success { background: var(--teal-soft); border-color: var(--band-green); }

/* Hero (public pages; site.css adds the night band) */
.hero { padding: 2.5rem 0 3rem; }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
.hero .actions, .hero p.actions { margin: 1.5rem 0 .75rem; }
.hero-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.5rem; box-shadow: var(--shadow-2); }
.hero-card-title { font-weight: 700; font-size: 1.15rem; margin-bottom: .25rem; }
.hero-date strong { color: var(--teal); }

/* Facts: mono labels over plain values, like a chart's header */
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: 1rem 0 1.25rem; }
.facts div { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: .6rem .8rem; }
.facts dt { font-family: var(--mono); font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.facts dd { margin: 0; font-weight: 650; }

/* Cards */
.cards { display: grid; gap: 1rem; margin-top: 1.5rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.4rem; box-shadow: var(--shadow-1); }
.card h3 { margin-bottom: .4rem; }
.card p:last-child { margin-bottom: 0; }
.ticks { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.ticks li { position: relative; padding-left: 1.6rem; margin-bottom: .45rem; }
.ticks li::before { content: ""; position: absolute; left: .1rem; top: .45em; width: .8rem; height: .45rem; border-left: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(-45deg); }
.tag { display: inline-block; font-size: .72rem; letter-spacing: .04em; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; border-radius: var(--pill); background: var(--teal-soft); color: var(--teal-strong); font: 500 .75rem/1.4 var(--mono); letter-spacing: .03em; }
.chip-sand { background: var(--sand); color: var(--sand-ink); }
.chip-coral { background: var(--coral-soft); color: var(--coral-ink); }

/* Pricing */
.cards.pricing { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.price-card { display: flex; flex-direction: column; position: relative; }
.price-card .btn { margin-top: auto; }
.price-card.featured { border: 2px solid var(--teal); box-shadow: var(--shadow-2); }
.badge { position: absolute; top: -.8rem; left: 1.4rem; margin: 0; padding: .2rem .7rem; border-radius: var(--pill); background: var(--sand-2); font-size: .8rem; font-weight: 700; }
.price { font: 600 2.1rem/1.1 var(--mono); margin: .35rem 0 0; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.price-days { color: var(--muted); font-size: .92rem; }
.price-was { color: var(--muted); font-size: .6em; font-weight: 500; margin-right: .4rem; }
.price-from { font-weight: 700; }

/* Tutor, guarantee, FAQ */
.tutor { display: grid; gap: 1.25rem; align-items: start; }
.tutor-photo { width: 8.5rem; height: 8.5rem; border-radius: 50%; object-fit: cover; }
.tutor-initials { display: grid; place-items: center; background: var(--teal); color: var(--on-teal); font-size: 2.6rem; font-weight: 700; }
.tutor-name { font-size: 1.35rem; font-weight: 700; margin-bottom: .25rem; }
.tutor-socials { display: flex; gap: 1rem; }
.tutor-placeholder .tutor-initials { background: var(--line); }
.guarantee-band { text-align: center; max-width: 46rem; }
.faq { border-bottom: 1px solid var(--line); padding: 1rem 0; }
.faq summary { cursor: pointer; font-weight: 650; list-style-position: outside; }
.faq p { margin: .6rem 0 0; color: var(--muted); }
.final-cta { text-align: center; }

/* Mock under exam conditions: a night bar with the clock, one fieldset per question */
.mock-bar { position: sticky; top: 0; z-index: 5; background: var(--night); color: var(--on-night); border-bottom: 1px solid var(--night-2); }
.mock-bar-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding-top: .55rem; padding-bottom: .55rem; flex-wrap: wrap; }
.mock-bar p { margin: 0; }
.timer { font: 600 1.35rem/1.2 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.timer.low { color: var(--coral); }
.answered { font-family: var(--mono); font-size: .9rem; color: var(--on-night-muted); }
.save-status { font-size: .85rem; color: var(--on-night-muted); min-height: 1.2em; }
.save-status.failed { color: var(--coral); }
.questions { list-style: none; padding: 0; margin: 1.5rem 0; }
.question { margin-bottom: 1.25rem; scroll-margin-top: 4.5rem; }
.question fieldset { margin: 0; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.question legend { float: left; width: 100%; padding: 0; margin-bottom: .9rem; }
.q-number { display: block; font-size: .72rem; font-weight: 500; color: var(--teal); text-transform: uppercase; letter-spacing: .1em; margin-bottom: .2rem; }
.q-text { font-weight: 600; white-space: pre-line; }
.option { clear: both; display: flex; gap: .7rem; align-items: flex-start; padding: .75rem .9rem; margin-bottom: .5rem; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; background: var(--surface); transition: border-color .12s var(--ease), background .12s var(--ease); }
.option:hover { border-color: var(--teal); }
.option:has(input:checked) { border-color: var(--teal); background: var(--teal-soft); box-shadow: inset 3px 0 0 var(--teal); }
.option input { margin-top: .3rem; accent-color: var(--teal); }
.option-blank { color: var(--muted); font-size: .92rem; border-style: dashed; }
.letter { font-family: var(--mono); font-weight: 600; color: var(--teal); }
.submit-row { text-align: center; padding-bottom: 2rem; }

/* Results */
.score-card { border-radius: var(--r-lg); padding: 1.5rem; margin: 1rem 0 2rem; color: var(--on-night); background: var(--night); border: 1px solid var(--night-2); border-top: 4px solid var(--band-red); }
.score-card.passed, .score-card.rank.above-min { border-top-color: var(--band-green); }
.score-card.rank.below-min { border-top-color: var(--band-amber); }
.score-card .note { color: var(--on-night-muted); }
.verdict { font: 500 .85rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: .1em; margin: 0; }
.big-pct { font: 600 clamp(3rem, 14vw, 4.5rem)/1 var(--mono); letter-spacing: -.05em; margin: .35rem 0 .6rem; }
.score-card.rank .big-pct { font-size: clamp(2rem, 8.5vw, 3.2rem); }  /* "48 puntos sobre 100" on one line */
.counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 1rem 0; }
.counts div { background: var(--night-2); border-radius: var(--r-sm); padding: .5rem .7rem; }
.counts dt { font-size: .8rem; color: var(--on-night-muted); }
.counts dd { margin: 0; font: 600 1.35rem/1.3 var(--mono); }
.formula { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.topic-bars { list-style: none; padding: 0; }
.topic-bars li { margin-bottom: 1rem; }
.topic-line { display: flex; justify-content: space-between; gap: 1rem; margin: 0 0 .3rem; font-weight: 600; }
progress { width: 100%; height: .6rem; border: 0; border-radius: var(--pill); background: var(--line); overflow: hidden; appearance: none; -webkit-appearance: none; }
progress::-webkit-progress-bar { background: var(--line); border-radius: var(--pill); }
progress::-webkit-progress-value { background: var(--band, var(--teal)); border-radius: var(--pill); }
progress::-moz-progress-bar { background: var(--band, var(--teal)); border-radius: var(--pill); }
.small-link { font-size: .9rem; }
.cta-box { margin: 2rem 0; padding: 1.5rem; border-radius: var(--r); background: var(--sand); border: 1px solid var(--sand-2); }
.save-box { margin-bottom: 2rem; }
.inline-form { display: grid; gap: .5rem; }
.review { margin-bottom: 1.25rem; scroll-margin-top: 1rem; }
.review-status { color: var(--muted); }
.review.is-right { border-color: var(--teal-line); }
.explained { list-style: none; padding: 0; margin: 1rem 0; }
.explained li { padding: .75rem .9rem; border: 1px solid var(--line); border-radius: var(--r-sm); margin-bottom: .5rem; }
.explained li p { margin: 0; }
.explained .why { color: var(--ink); font-size: 1rem; line-height: 1.55; margin-top: .3rem; }
.explained .is-correct { border-color: var(--band-green); background: var(--teal-soft); }
.explained .is-chosen { border-color: var(--coral-ink); background: var(--coral-soft); }
.flag summary { cursor: pointer; color: var(--muted); font-size: .92rem; }
.flag form { display: grid; gap: .5rem; margin-top: .75rem; }
.flag-done, .right-hidden { margin-top: .5rem; }
.right-list { margin: 2rem 0; }
.right-list > summary { cursor: pointer; font-weight: 700; padding: .75rem 0; }

/* Clinical cases, readiness bands */
.case { margin-bottom: 1.75rem; }
.case-label { font-size: .72rem; font-weight: 500; text-transform: uppercase; letter-spacing: .1em; color: var(--teal); margin-bottom: .4rem; }
.case-stem { margin: 0 0 1rem; padding: 1rem 1.1rem; border-left: 3px solid var(--teal); border-radius: var(--r-sm); background: var(--sand); }
.case-questions { margin: 0; }
.case-question { padding-top: 1rem; border-top: 1px solid var(--line); margin-top: 1rem; }
.case-question:first-of-type { border-top: 0; margin-top: 0; }
.why-title { font-weight: 700; margin: .8rem 0 .2rem; }
.citation { font-family: var(--mono); font-size: .78rem; color: var(--muted); margin-top: 1rem; letter-spacing: -.01em; }
.locked { color: var(--muted); font-style: italic; }
.band-label { display: flex; align-items: center; gap: .45rem; margin: .3rem 0 0; font-weight: 600; font-size: .92rem; }
.band-dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--band, var(--line)); }
.band-green { --band: var(--band-green); } .band-amber { --band: var(--band-amber); } .band-red { --band: var(--band-red); }
.readiness-cards { list-style: none; padding: 0; display: grid; gap: .5rem; }
.readiness-cards li, .band { display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: baseline; padding: .6rem .8rem; border: 1px solid var(--line); border-left: 6px solid var(--band, var(--line)); border-radius: var(--r-sm); background: var(--surface); }
.bands { list-style: none; padding: 0; display: grid; gap: .5rem; }
.why-box { margin: .5rem 0; } .why-box summary { font-weight: 700; cursor: pointer; }
.disclaimer { font-size: .9rem; color: var(--muted); border-left: 3px solid var(--sand-2); padding-left: .75rem; }
.sample { margin-bottom: 1rem; }

/* Forms */
.stack-form { display: grid; gap: .6rem; max-width: 30rem; margin: 1.5rem 0; }
label { font-weight: 600; font-size: .95rem; }
input:not([type="radio"]):not([type="checkbox"]), select, textarea { width: 100%; padding: .75rem .85rem; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-sm); }
input:not([type="radio"]):not([type="checkbox"]):focus, select:focus, textarea:focus { border-color: var(--teal); outline: 2px solid var(--teal-soft); outline-offset: 0; }
input[type="radio"], input[type="checkbox"] { accent-color: var(--teal); width: 1.1rem; height: 1.1rem; }
input[readonly] { background: var(--surface-2); color: var(--muted); }
textarea { resize: vertical; }
.admin-form { max-width: none; }
.option-edit { border: 1px solid var(--line); border-radius: var(--r-sm); padding: .8rem; display: grid; gap: .5rem; }
label.inline { display: flex; gap: .5rem; align-items: center; font-weight: 400; }
form.inline { display: inline; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.reason-picker { margin: 0; padding: 0; border: 0; display: grid; gap: .4rem; }
.reason-picker legend { padding: 0; margin-bottom: .4rem; font-weight: 600; font-size: .95rem; }
.reason-picker .option { margin: 0; }
.resolve-form { display: grid; gap: .5rem; margin-top: 1rem; }

/* Tables and charts */
.table-scroll { overflow-x: auto; margin: 0 0 1.25rem; }
table, .data-table, .format-table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: .95rem; }
th, td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 500 .72rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
tbody th[scope="row"] { font: 600 .95rem/1.4 var(--font); text-transform: none; letter-spacing: 0; color: var(--ink); }
.format-table th[scope="row"] { width: 50%; }
tr.warn td { background: var(--sand); }
.compare-table td.unverified { color: var(--muted); font-style: italic; }
.plan-full_mock td, .plan-diagnostic td { font-weight: 700; background: var(--teal-soft); }
.footnotes { font-size: .9rem; color: var(--muted); }
.footnotes a { word-break: break-all; }
.chart { width: 100%; max-width: 40rem; height: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.chart .bar-pass { fill: var(--band-green); }
.chart .bar-fail { fill: var(--band-red); }
.chart .chart-pass { stroke: var(--sand-ink); stroke-width: 1.5; stroke-dasharray: 4 3; }
.plan-box { margin: 1rem 0 2rem; }
.logout { margin-top: 2rem; }

/* Admin, partner, fix log, install hint */
.admin-nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; margin-bottom: 1.5rem; padding-bottom: .75rem; border-bottom: 1px solid var(--line); }
.period { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.period a[aria-current] { font-weight: 700; text-decoration: none; color: var(--ink); }
.stat-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin: 1rem 0 2rem; }
.stat-tiles div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: .8rem 1rem; }
.stat-tiles dt { font-size: .82rem; color: var(--muted); }
.stat-tiles dd { margin: 0; font: 600 1.6rem/1.3 var(--mono); letter-spacing: -.03em; }
.queue { padding-left: 1.2rem; }
.queue li { margin-bottom: 1rem; }
.legal h2 { margin-top: 1.6em; }
.contact-email { font-size: 1.3rem; font-weight: 700; }
.code-route { margin-top: 1rem; }
.post-text, .copy-field { font-size: .95rem; }
.message-text { white-space: pre-wrap; }
.fixlog { list-style: none; padding: 0; margin: 1.5rem 0; }
.fixlog-item { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.fixlog-meta { margin: 0 0 .3rem; color: var(--muted); font: .82rem/1.4 var(--mono); }
.fixlog-note { margin: 0; }
.funnel td small { color: var(--muted); }
.funnel tfoot th, .funnel tfoot td { font-weight: 700; border-top: 2px solid var(--line); }
.install-hint { background: var(--teal-soft); border-bottom: 1px solid var(--teal-line); font-size: .95rem; }
.install-hint[hidden], .page-mock .install-hint { display: none; }
.install-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding-top: .6rem; padding-bottom: .6rem; }
.install-row p { margin: 0; flex: 1 1 14rem; }
.review a, .fixlog a, .q-text { overflow-wrap: anywhere; }

/* Phones (checked at 390 px): one question per screen width, big tap targets, sticky timer, readable results */
@media (max-width: 30rem) {
  html:has(.page-mock) { scroll-snap-type: y proximity; }
  .wrap { padding-left: 1rem; padding-right: 1rem; }
  .section { padding: 2rem 0; }
  h1 { font-size: 1.95rem; }
  .nav a, .footer-links a, .lang-switch a { min-height: 44px; display: inline-flex; align-items: center; }
  .btn { min-height: 48px; }
  .btn-small { min-height: 44px; }
  .btn-big, .submit-row .btn, .cta-box .btn, .price-card .btn, .inline-form .btn, .stack-form .btn { width: 100%; }
  .theme-toggle { width: 44px; height: 44px; }
  .nav { width: 100%; justify-content: space-between; gap: .25rem .75rem; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav > * { flex: none; white-space: nowrap; }
  .nav > .btn { order: -1; }  /* the free CTA leads the strip: at 360 px the end of the strip is off screen */
  .data-table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .data-table.stack tr { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
  .data-table.stack th[scope=row] { grid-column: 1 / -1; border: 0; padding-bottom: 0; }
  .data-table.stack td { border: 0; }
  .data-table.stack td[colspan] { grid-column: 1 / -1; }
  .data-table.stack td[data-label]::before { content: attr(data-label); display: block; font: 500 .68rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
  .page-mock .wrap.narrow { padding: 0; }
  .page-mock h1 { padding: 0 1rem; }
  .question { scroll-snap-align: start; scroll-margin-top: 3.75rem; }
  .question fieldset { padding: 1rem; border-left: 0; border-right: 0; border-radius: 0; }
  .option { min-height: 52px; padding: .9rem 1rem; align-items: center; font-size: 1.02rem; }
  .option input { flex: none; width: 1.4rem; height: 1.4rem; margin: 0; }
  .mock-bar-row { flex-wrap: nowrap; padding-top: .4rem; padding-bottom: .4rem; }
  .timer { font-size: 1.5rem; }
  .save-status { font-size: .8rem; }
  .save-status:empty { display: none; }
  .score-card { margin-left: -1rem; margin-right: -1rem; padding: 1.25rem 1rem; border-radius: 0; }
  .counts dd { font-size: 1.2rem; }
  .topic-line { flex-wrap: wrap; gap: .25rem 1rem; }
  .review { padding: 1rem; }
  .explained li { padding: .75rem; }
  .flag summary, .right-list > summary { min-height: 44px; display: flex; align-items: center; }
  .stat-tiles dd { font-size: 1.3rem; }
  th, td { padding: .5rem; }
}

@media (min-width: 48rem) {
  .section { padding: var(--s8) 0; }
  .hero { padding: 4rem 0 4.5rem; }
  .hero-grid { grid-template-columns: 1.4fr 1fr; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .tutor { grid-template-columns: auto 1fr; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .stat-tiles { grid-template-columns: repeat(4, 1fr); }
  .inline-form { grid-template-columns: 1fr auto; align-items: end; }
  .inline-form label { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Busy buttons (theme.js): a spinner after the label while the next page loads */
.btn[aria-busy="true"] { cursor: progress; opacity: .75; gap: .5rem; }
.btn[aria-busy="true"]::after { content: ""; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn[aria-busy="true"]::after { animation-duration: 2.4s; } }
