/*
 * Ready for the Oath styles.
 * Brand motif: a row of rounded tiles, like an answer sheet. The home page shows the real test's pass mark
 * as 20 tiles with 15 filled; progress and results use the same row:
 * cobalt = answered or right, amber = the current question, outlined = still to go, red outline = missed.
 * Type: a DIN-style signage face for headings and numbers (system fonts only, nothing downloaded),
 * the system UI face for reading.
 */
:root {
  --paper: #F3F5F2;
  --surface: #FFFFFF;
  --ink: #142029;
  --muted: #56646F;
  --line: #D5DCD7;
  --line-strong: #AEB9B2;
  --cobalt: #1F4FD8;
  --cobalt-hover: #1A43BB;
  --cobalt-ink: #FFFFFF;
  --cobalt-soft: #E3E9FB;
  --amber: #F0B323;
  --amber-soft: #FDF3D7;
  --amber-line: #E2B23A;
  --good: #17804E;
  --bad: #C2412D;
  --bad-soft: #FBE9E5;
  --good-soft: #E3F3EA;
  --font-display: "DIN Alternate", "DIN Next LT Pro", "DIN Next", Bahnschrift, "sans-serif-condensed", "Roboto Condensed", "DejaVu Sans Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0E1418; --surface: #151E24; --ink: #E6ECEF; --muted: #9AA8B1; --line: #2A363E; --line-strong: #44535C;
    --cobalt: #7C98FF; --cobalt-hover: #98AEFF; --cobalt-ink: #0A1024; --cobalt-soft: #1B2646;
    --amber: #F4C04A; --amber-soft: #2E2612; --amber-line: #8C6E22;
    --good: #45C487; --bad: #F2806A; --bad-soft: #3A1C17; --good-soft: #12301F;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  font: 400 clamp(1rem, .96rem + .2vw, 1.0625rem)/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
main { flex: 1 0 auto; outline: none; }
img, svg { max-width: 100%; }
a { color: var(--cobalt); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0 0 .5em; text-wrap: balance; }
h1, h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2.35rem, 1.2rem + 4.6vw, 4.25rem); line-height: 1.02; }
h2 { font-size: clamp(1.55rem, 1.1rem + 1.6vw, 2.2rem); line-height: 1.08; }
h3 { font-size: 1.125rem; line-height: 1.3; font-weight: 650; }
ul, ol { padding-left: 1.2em; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.lead { font-size: clamp(1.08rem, 1rem + .45vw, 1.28rem); line-height: 1.5; color: var(--ink); max-width: 38rem; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.stack > * + * { margin-top: 1rem; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 32px); }
.narrow { max-width: 780px; }
.page { padding-top: clamp(28px, 5vw, 56px); padding-bottom: 64px; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 8px; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* ---------- buttons ---------- */
.btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 11px 20px; border-radius: 12px; border: 1.5px solid transparent;
  font: 600 1rem/1.2 var(--font-body); text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .08s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--cobalt); color: var(--cobalt-ink); }
.btn-primary:hover { background: var(--cobalt-hover); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-lg { min-height: 56px; padding: 14px 26px; font-size: 1.075rem; }
.btn-small { min-height: 40px; padding: 8px 14px; font-size: .94rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.linklike { appearance: none; background: none; border: 0; padding: 0; font: inherit; color: var(--cobalt); text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }

/* ---------- header and footer ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 1.3rem/1 var(--font-display); letter-spacing: -.01em; }
.nav { display: flex; gap: clamp(12px, 2.6vw, 28px); align-items: center; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 550; padding: 10px 0; }
.nav a:hover { color: var(--cobalt); text-decoration: underline; }
.site-footer { margin-top: 48px; border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: .94rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px 48px; }
.footer-about p { margin: .6em 0 0; max-width: 34rem; }
.footer-links { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.footer-links a, .footer-links .linklike { color: var(--ink); }
.footer-legal { grid-column: 1 / -1; margin: 0; font-size: .875rem; }

/* ---------- privacy choice banner (in the page flow, so it never covers the quiz) ---------- */
.consent { background: var(--ink); color: var(--paper); padding: 16px clamp(18px, 4vw, 32px); display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; align-items: center; }
.consent-title { grid-column: 1 / -1; font: 650 1rem/1.3 var(--font-body); margin: 0; }
.consent p { margin: 0; max-width: 60rem; font-size: .95rem; }
.consent a { color: var(--paper); }
.consent :focus-visible { outline-color: var(--amber); }
.consent-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.consent .btn-primary { background: var(--amber); color: #1B1503; }
.consent .btn-primary:hover { background: #F4C04A; }
.consent .btn-ghost { color: var(--paper); border-color: rgba(255, 255, 255, .55); }
.consent .btn-ghost:hover { border-color: var(--paper); }

.toast-root { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; width: min(92vw, 460px); pointer-events: none; }
.toast { background: var(--ink); color: var(--paper); padding: 12px 16px; border-radius: 12px; box-shadow: 0 8px 24px rgba(20, 32, 41, .25); font-size: .95rem; }

/* ---------- tiles: progress and results ---------- */
.route { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.route .stop { flex: 1 1 0; max-width: 22px; aspect-ratio: 1; border-radius: 22%; border: 1.5px solid var(--line-strong); background: var(--surface); }
.route .stop.is-done { background: var(--cobalt); border-color: var(--cobalt); }
.route .stop.is-current { background: var(--amber); border-color: var(--amber); }
.route-result { gap: 6px; }
.route-result .stop { max-width: 30px; }
.route-result .stop.is-right { background: var(--cobalt); border-color: var(--cobalt); }
.route-result .stop.is-wrong { background: var(--surface); border: 2px solid var(--bad); }
.route-legend { display: flex; gap: 18px; font-size: .875rem; color: var(--muted); margin-top: 10px; }
.route-legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.key-right::before { background: var(--cobalt); }
.key-wrong::before { border: 2px solid var(--bad); background: var(--surface); }

/* ---------- home ---------- */
.hero { padding: clamp(32px, 6vw, 72px) 0 clamp(40px, 6vw, 80px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.hero-copy h1 { max-width: 15ch; }
.hero-actions { margin-top: 28px; }

/* the real test at a glance: the pass mark drawn as tiles */
.exam-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 3vw, 30px); box-shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgba(20, 32, 41, .35); }
.exam-card-title { font-size: clamp(1.35rem, 1.15rem + .8vw, 1.7rem); margin-bottom: 18px; }
.exam-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 22px; }
.exam-facts div { border-top: 3px solid var(--ink); padding-top: 8px; }
.exam-facts dt { font-size: .875rem; color: var(--muted); font-weight: 600; }
.exam-facts .unit { font-size: .5em; margin-left: .18em; letter-spacing: 0; }
.exam-facts dd { white-space: nowrap; margin: 2px 0 0; font: 700 clamp(2rem, 1.6rem + 1.6vw, 2.75rem)/1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.exam-card .route { gap: 5px; }
.exam-card .route .stop { max-width: none; }
.exam-card-caption { font-weight: 650; margin: 12px 0 6px; }
.exam-card-note { font-size: .92rem; color: var(--muted); margin: 0; }
.exam-card-status { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-weight: 600; }
.intro .exam-facts { max-width: 34rem; margin-top: 8px; }
.hero-note { color: var(--muted); font-size: .95rem; max-width: 30rem; }
.section { padding: clamp(40px, 6vw, 72px) 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-lead { color: var(--muted); max-width: 40rem; }
.shelf-facts { color: var(--muted); font-size: .9rem; }
/* chapters, in the order of the guide */
.chapters { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; counter-reset: ch; }
.chapter { counter-increment: ch; position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 16px 62px; }
.chapter::before { content: counter(ch); position: absolute; left: 18px; top: 18px; width: 30px; height: 30px; border-radius: 22%; display: grid; place-items: center; border: 1.5px solid var(--line-strong); font: 700 1rem/1 var(--font-display); color: var(--muted); }
.chapter.is-tried::before { border-color: var(--cobalt); color: var(--cobalt); }
.chapter.is-ready::before { background: var(--cobalt); border-color: var(--cobalt); color: var(--cobalt-ink); }
.chapter h3 { margin-bottom: .3em; }
.chapter h3 a { color: var(--ink); text-decoration: none; }
.chapter h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.chapter:hover { border-color: var(--line-strong); }
.chapter:hover h3 a { text-decoration: underline; }
.chapter:has(a:focus-visible) { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.chapter h3 a:focus-visible { outline: none; }
.chapter p { margin: 0 0 10px; color: var(--muted); font-size: .95rem; }
.chapter-meta { margin-top: auto !important; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: .875rem !important; }
.chapter-status { font-weight: 650; color: var(--ink); }

/* question of the day */
.qotd-wrap { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(20px, 4vw, 56px); align-items: start; }
.qotd { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 3vw, 28px); }
.qotd-prompt { font-weight: 650; font-size: clamp(1.15rem, 1.05rem + .4vw, 1.3rem); line-height: 1.35; }
.qotd-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qotd-opt { appearance: none; min-height: 52px; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: 600 1rem/1.25 var(--font-body); text-align: left; cursor: pointer; transition: border-color .12s ease, background-color .12s ease; }
.qotd-opt:hover { border-color: var(--cobalt); }
.qotd.is-answered .qotd-opt { cursor: default; }
.qotd.is-answered .qotd-opt:hover { border-color: var(--line); }
.qotd .qotd-opt.is-answer, .qotd .qotd-opt.is-answer:hover { border-color: var(--good); background: var(--good-soft); }
.qotd .qotd-opt.is-chosen, .qotd .qotd-opt.is-chosen:hover { border-color: var(--bad); background: var(--bad-soft); }
.qotd-result:not(:empty) { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); outline: none; }
.qotd-result p { max-width: 40rem; }
.qotd-verdict { font: 700 1.25rem/1.2 var(--font-display); }
.qotd-verdict.is-right { color: var(--good); }
.qotd-verdict.is-wrong { color: var(--bad); }

.benefits { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.benefits li::before { content: ""; display: block; width: 14px; height: 14px; border-radius: 3px; background: var(--cobalt); margin-bottom: 14px; }
.benefits li:last-child::before { background: var(--amber); }
.benefits p { color: var(--muted); margin: 0; }
.how-title { margin-top: clamp(40px, 6vw, 64px); }
.how { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; counter-reset: how; }
.how li { counter-increment: how; }
.how li::before { content: counter(how); display: block; font: 700 2.6rem/1 var(--font-display); color: var(--cobalt); margin-bottom: 10px; }
.how p { color: var(--muted); margin: 0; }
.faq-wrap > * { max-width: 780px; }
.faq { border-top: 1px solid var(--line); }
.faq:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 36px 18px 0; font-weight: 650; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font: 700 1.4rem/1 var(--font-display); color: var(--cobalt); }
.faq[open] summary::after { content: "\2212"; }
.faq p { margin: 0 0 18px; color: var(--muted); max-width: 42rem; }

/* ---------- quiz intro ---------- */
.crumbs { font-size: .94rem; margin-bottom: 18px; }
.intro .lead { margin-bottom: 14px; }
.intro-facts { font-weight: 600; margin-bottom: 12px; }
.intro-state { font-weight: 600; }
.intro-sub { font-size: 1.3rem; margin-top: 40px; }
.notes { padding-left: 0; list-style: none; }
.notes li { position: relative; padding-left: 22px; margin-bottom: 8px; }
.notes li::before { content: ""; position: absolute; left: 0; top: .55em; width: 9px; height: 9px; border-radius: 2px; background: var(--cobalt); }
.fun-note { font-size: .9rem; color: var(--muted); border-left: 3px solid var(--amber); padding: 2px 0 2px 12px; margin-top: 24px; max-width: 40rem; }
.locked-box { background: var(--amber-soft); border: 1px solid var(--amber-line); border-radius: var(--radius); padding: 18px 20px; margin: 18px 0; }
.locked-box p:last-child { margin: 0; }

/* ---------- playing ---------- */
.play { padding-top: 20px; padding-bottom: 40px; }
.play-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 14px; }
.play-title { margin: 0; font: 650 .95rem/1.3 var(--font-body); letter-spacing: 0; color: var(--muted); }
.play-exit { font-size: .94rem; white-space: nowrap; }
.timer { margin: 0 0 0 auto; padding: 4px 12px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line-strong); font-size: .9rem; white-space: nowrap; }
.timer-label { color: var(--muted); }
.timer-value { font: 700 1.05rem/1 var(--font-display); font-variant-numeric: tabular-nums; }
.timer.is-low { border-color: var(--amber-line); background: var(--amber-soft); }
.qcard { margin-top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 4vw, 34px); }
.progress-text { font: 700 1rem/1.2 var(--font-display); color: var(--ink); margin: 0 0 6px; letter-spacing: .01em; }
.qcat { font-size: .875rem; color: var(--cobalt); font-weight: 600; margin: 0 0 14px; }
.qcard fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.qcard legend { padding: 0; font-weight: 650; font-size: clamp(1.2rem, 1.05rem + .6vw, 1.45rem); line-height: 1.35; margin-bottom: 20px; outline: none; }
.opts { display: grid; gap: 10px; }
.opt { position: relative; display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 12px 16px; border: 2px solid var(--line); border-radius: 14px; background: var(--paper); cursor: pointer; transition: border-color .12s ease, background-color .12s ease; }
.opt:hover { border-color: var(--line-strong); }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.opt-key { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; border: 1.5px solid var(--line-strong); font: 700 .95rem/1 var(--font-display); color: var(--muted); background: var(--surface); }
.opt-text { font-weight: 550; line-height: 1.35; }
.opt:has(input:checked) { border-color: var(--cobalt); background: var(--cobalt-soft); }
.opt input:checked + .opt-key { background: var(--cobalt); border-color: var(--cobalt); color: var(--cobalt-ink); }
.opt:has(input:focus-visible) { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.opt input:focus-visible + .opt-key { box-shadow: 0 0 0 3px var(--cobalt-soft); }
.form-error { color: var(--bad); font-weight: 600; min-height: 1.5em; margin: 12px 0 0; }
.play-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.play-nav .btn-primary { min-width: 11rem; }
.kbd-hint { text-align: center; font-size: .85rem; color: var(--muted); margin-top: 16px; }

/* ---------- results ---------- */
.results { padding-top: clamp(24px, 4vw, 48px); padding-bottom: 32px; }
.score-block { max-width: 780px; }
.score-line { margin: 0 0 .1em; line-height: .9; }
.score-num { font: 700 clamp(5.5rem, 3rem + 12vw, 9.5rem)/.9 var(--font-display); color: var(--cobalt); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.score-of { font: 700 clamp(2.4rem, 1.6rem + 4vw, 4rem)/1 var(--font-display); color: var(--muted); margin-left: .08em; }
.band { font-size: 1.15rem; max-width: 40rem; margin: 14px 0 22px; }
.verdict { display: inline-block; margin: 0 0 14px; padding: 6px 14px; border-radius: 999px; font: 700 1.05rem/1.2 var(--font-display); letter-spacing: .01em; }
.verdict.is-pass { background: var(--good-soft); color: var(--good); }
.verdict.is-fail { background: var(--bad-soft); color: var(--bad); }
.exam-meta { color: var(--muted); font-size: .95rem; margin-top: 14px; }
.study-next { margin: 28px 0 0; padding: clamp(20px, 3vw, 28px); border-radius: 20px; background: var(--amber-soft); border: 1px solid var(--amber-line); }
.study-next h2 { font-size: clamp(1.35rem, 1.1rem + .8vw, 1.7rem); }
.study-next p { margin: 0; }
.study-next.is-clear { background: var(--good-soft); border-color: var(--good); }
.study-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.study-list a { font-weight: 650; }
.next-steps .notes { margin: 0; }
.history { list-style: none; padding: 0; margin: 0; max-width: 34rem; }
.history li { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.history-date { color: var(--muted); font-size: .94rem; }
.history-score { font: 700 1.15rem/1 var(--font-display); font-variant-numeric: tabular-nums; }
.history-verdict { font-size: .85rem; font-weight: 700; padding: 3px 9px; border-radius: 6px; }
.history-verdict.is-pass { background: var(--good-soft); color: var(--good); }
.history-verdict.is-fail { background: var(--bad-soft); color: var(--bad); }
.intro-guide { margin-top: 18px; font-weight: 600; }
.rv-chapter { color: var(--muted); font-weight: 600; }
.results-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; margin-top: 40px; align-items: start; }
.cats, .share { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 3vw, 28px); }
.cats h2, .share h2 { font-size: 1.45rem; }
.cat-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.cat-list li { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; }
.cat-name { font-weight: 600; }
.cat-score { color: var(--muted); font-variant-numeric: tabular-nums; }
.meter { grid-column: 1 / -1; height: 10px; border-radius: 3px; background: var(--paper); border: 1px solid var(--line); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--cobalt); }
.share-card { margin: 0 0 16px; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; background: var(--paper); }
.share-card p { margin: 0; }
.share-brand { font: 700 1rem/1 var(--font-display); color: var(--cobalt); }
.share-quiz { font-weight: 600; margin-top: 10px !important; }
.share-score { font: 700 3.4rem/1 var(--font-display); color: var(--cobalt); margin-top: 6px !important; }
.share-score span { color: var(--muted); font-size: 1.6rem; }
.share-band { font-weight: 600; }
.share-strip { margin-top: 8px !important; letter-spacing: 0; font-size: .82rem; line-height: 1.4; word-break: break-all; }
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.share-actions .btn { min-height: 44px; padding: 9px 14px; font-size: .95rem; }
.share-note { font-size: .85rem; color: var(--muted); margin: 12px 0 0; }
.results-actions { margin: 28px 0 8px; }
.upsell { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 32px; align-items: center; margin: 32px 0; padding: clamp(20px, 3vw, 30px); border-radius: 20px; background: var(--amber-soft); border: 1px solid var(--amber-line); }
.upsell h2 { font-size: clamp(1.35rem, 1.1rem + .8vw, 1.75rem); }
.upsell p { margin: 0 0 .4em; max-width: 44rem; }
.upsell-price strong { font: 700 1.5rem/1 var(--font-display); }
.review { margin-top: 48px; }
.review-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 8px; }
.toggle { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; font-weight: 600; }
.toggle input { width: 18px; height: 18px; accent-color: var(--cobalt); }
.review-list { list-style: none; padding: 0; margin: 0; }
.review-list.only-missed .rv.is-right { display: none; }
.rv { padding: 20px 0 20px 18px; border-top: 1px solid var(--line); position: relative; }
.rv::before { content: ""; position: absolute; left: 0; top: 22px; bottom: 22px; width: 4px; border-radius: 2px; background: var(--cobalt); }
.rv.is-wrong::before { background: var(--bad); }
.rv p { margin: 0 0 .4em; max-width: 46rem; }
.rv-head { font-size: .875rem; display: flex; gap: 10px; align-items: center; }
.rv-num { color: var(--muted); font-weight: 600; }
.rv-status { font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.is-right .rv-status { background: var(--good-soft); color: var(--good); }
.is-wrong .rv-status { background: var(--bad-soft); color: var(--bad); }
.rv-q { margin: 6px 0 8px; font-size: 1.1rem; max-width: 46rem; }
.rv-a s { color: var(--bad); text-decoration-thickness: 1.5px; }
.rv-expl { color: var(--ink); }
.rv-src { font-size: .9rem; color: var(--muted); }

/* ---------- share landing ---------- */
.share-landing-score { font: 700 clamp(4.5rem, 3rem + 8vw, 7.5rem)/.9 var(--font-display); color: var(--cobalt); margin-bottom: 12px; }
.share-landing-score span { color: var(--muted); font-size: .45em; }

/* ---------- pack ---------- */
.pack-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .8fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.pack-main h2 { font-size: 1.5rem; margin-top: 36px; }
.pack-quizzes { list-style: none; padding: 0; margin: 16px 0 0; counter-reset: pq; }
.pack-quizzes li { counter-increment: pq; position: relative; padding: 18px 0 14px 52px; border-top: 1px solid var(--line); }
.pack-quizzes li::before { content: counter(pq); position: absolute; left: 0; top: 16px; width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--cobalt); color: var(--cobalt-ink); font: 700 1.1rem/1 var(--font-display); }
.pack-quizzes h3 { margin-bottom: .25em; }
.pack-quizzes p { margin: 0 0 .3em; }
.pack-quizzes.compact li { padding-bottom: 10px; }
.buy-box { position: sticky; top: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(22px, 3vw, 30px); }
.price-tag { font: 700 clamp(2.4rem, 1.8rem + 2vw, 3.1rem)/1 var(--font-display); margin: 0 0 8px; letter-spacing: -.01em; }
.price-terms { font-weight: 600; }
.buy-facts { list-style: none; padding: 0; margin: 0 0 20px; font-size: .94rem; color: var(--muted); }
.buy-facts li { padding: 8px 0; border-top: 1px solid var(--line); }
.buy-form { display: grid; gap: 14px; }
.buy-form p { margin: 0; }
.buy-form .form-error:empty { display: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .94rem; cursor: pointer; }
.check input { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--cobalt); }
.test-banner { background: var(--amber-soft); border: 1.5px dashed var(--amber-line); border-radius: 12px; padding: 10px 12px; font-size: .9rem; }
.unavailable { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: .92rem; }
.owned { font-weight: 600; }
.soon-box { background: var(--paper); border: 1.5px dashed var(--line-strong); border-radius: 12px; padding: 12px 14px; font-size: .95rem; margin: 0; }
.upsell-soon { background: var(--surface); border: 1.5px dashed var(--line-strong); }
.upsell-owned { background: var(--cobalt-soft); border-color: transparent; }

/* ---------- the Exam Pass: amber marks what is paid ---------- */
.section-pass { background: var(--amber-soft); border-top: 1px solid var(--amber-line); }
.pass-band { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.pass-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 18px; }
.pass-list li { position: relative; padding-left: 28px; }
.pass-list li::before { content: ""; position: absolute; left: 0; top: .32em; width: 14px; height: 14px; border-radius: 3px; background: var(--amber); }
.pass-list h3 { margin-bottom: .2em; }
.pass-list p { margin: 0; color: var(--muted); max-width: 40rem; }
.section-pass .pass-list p, .section-pass .section-lead { color: var(--ink); }
.pass-box { background: var(--surface); border: 1px solid var(--amber-line); border-radius: 20px; padding: clamp(22px, 3vw, 30px); }
.pass-box p:last-child { margin: 0; }
.pass-box .price-tag { font-size: clamp(2.1rem, 1.7rem + 1.4vw, 2.7rem); white-space: nowrap; }
.tools { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tools li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.tools h3 { margin-bottom: .2em; }
.tools p { margin: 0; color: var(--muted); font-size: .95rem; }
.success .tools { margin-top: 24px; }
.bank-note { font-size: .95rem; color: var(--muted); margin-top: 4px; }
.bank-note.is-full { color: var(--good); font-weight: 600; }
.tr-actions { margin-top: 20px; }
.trainer .qotd { background: var(--surface); }
.trainer .qotd-prompt { font-family: var(--font-body); letter-spacing: 0; margin: 0 0 16px; outline: none; }
.trainer .progress-text .rv-chapter { font: 600 .9rem/1.2 var(--font-body); margin-left: 8px; }

/* ---------- study sheets (made to be printed) ---------- */
.sheets h1 { font-size: clamp(2.1rem, 1.3rem + 3vw, 3.2rem); }
.sheet { margin-top: 40px; }
.sheet h2 { font-size: 1.5rem; padding-bottom: 6px; border-bottom: 2px solid var(--ink); }
.sheet h3 { margin: 26px 0 4px; }
.sheet-rows { margin: 0; }
.sheet-rows > div { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 2px 18px; padding: 7px 0; border-bottom: 1px solid var(--line); break-inside: avoid; }
.sheet-people > div { grid-template-columns: 15rem minmax(0, 1fr); }
.sheet-rows dt { font-weight: 700; }
.sheet-rows dd { margin: 0; }
.sheet-table { border-collapse: collapse; width: 100%; max-width: 46rem; }
.sheet-table th, .sheet-table td { text-align: left; padding: 7px 16px 7px 0; border-bottom: 1px solid var(--line); }
.sheet-table thead th { color: var(--muted); font-size: .9rem; }
.sheet-qa { padding-left: 2.2em; margin: 0; }
.sheet-qa li { padding: 6px 0; border-bottom: 1px solid var(--line); break-inside: avoid; }
.sheet-qa li::marker { color: var(--muted); font-size: .9em; }
.sheet-a { display: block; }
@media (min-width: 901px) { .sheet-qa { columns: 2; column-gap: 48px; } }
.pack-price-line { display: none; }
.buy-box:focus { outline: none; }
.access-link { margin-top: 32px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.access-link h2 { font-size: 1.3rem; }
.link-field { flex: 1 1 260px; min-width: 0; min-height: 48px; padding: 10px 12px; border: 1.5px solid var(--line-strong); border-radius: 10px; background: var(--paper); color: var(--ink); font: 400 .9rem var(--font-body); }

/* ---------- legal pages and the plain-HTML fallback ---------- */
.legal { max-width: 780px; padding-top: clamp(28px, 5vw, 56px); padding-bottom: 32px; }
.legal h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); }
.legal h2 { font-size: 1.4rem; margin-top: 1.6em; }
.legal li { margin-bottom: .4em; }
.draft-notice { background: var(--amber-soft); border: 1px solid var(--amber-line); border-radius: 12px; padding: 12px 16px; font-size: .95rem; }
.ssr-page { padding-top: clamp(32px, 6vw, 72px); padding-bottom: 48px; }
.page.narrow h1, .ssr-page h1 { font-size: clamp(2.1rem, 1.3rem + 3vw, 3.2rem); }
.access-link + p { margin-top: 14px; }

/* ---------- smaller screens ---------- */
@media (max-width: 900px) {
  .hero-grid, .pack-grid, .results-grid, .qotd-wrap, .pass-band { grid-template-columns: 1fr; }
  .hero-copy h1 { max-width: 16ch; }
  .benefits { grid-template-columns: 1fr 1fr; }
  .buy-box { position: static; }
  .pack-price-line { display: block; font-size: 1.05rem; }
}
@media (max-width: 700px) {
  .how { grid-template-columns: 1fr; gap: 20px; }
  .upsell, .tools { grid-template-columns: 1fr; }
  .sheet-rows > div, .sheet-people > div { grid-template-columns: 1fr; }
  .play-top { flex-wrap: wrap; row-gap: 8px; }
  .play-title { flex: 1 0 100%; }
  .timer { margin-left: 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .consent { grid-template-columns: 1fr; }
  .play-nav { position: sticky; bottom: 0; margin: 12px -20px -20px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); border-radius: 0 0 20px 20px; }
  .play-nav .btn { flex: 1 1 0; min-width: 0; }
  .play-nav .btn-primary { flex: 2 1 0; }
}
@media (max-width: 520px) {
  .benefits { grid-template-columns: 1fr; gap: 22px; }
  .qotd-options { grid-template-columns: 1fr; }
  .exam-facts dd { font-size: 1.9rem; }
  .nav { gap: 14px; font-size: .94rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, #consent-root, .share-actions, .results-actions, .upsell, .toast-root, .timer, .no-print, .skip-link { display: none !important; }
  .sheets { padding: 0; max-width: none; font-size: 10.5pt; line-height: 1.35; }
  .sheets h1 { font-size: 22pt; }
  .sheet { margin-top: 18pt; }
  .sheet h2 { font-size: 14pt; break-after: avoid; }
  .sheet h3 { font-size: 11.5pt; break-after: avoid; }
  .sheet-all { break-before: page; }
  .sheet-qa { columns: 2; column-gap: 22pt; }
  .sheet-rows > div, .sheet-qa li, .sheet-table th, .sheet-table td { padding-top: 3pt; padding-bottom: 3pt; }
  .sheets .fun-note { margin-top: 14pt; }
}
