/* TimedPrep - "exam paper" (direction B, chosen by the owner 14.10.2026).
   A printed test booklet: warm off-white paper, ink navy text and buttons, hairline rules, a serif for
   headlines, sans for body and controls, monospace for the form line and the clock. Squared corners (4px),
   no gradients, no shadows. LIGHT ONLY, on purpose: one finished look rather than a half-working dark one
   (question figures are drawn in currentColor, so a "night desk" variant is a stylesheet job for later).
   Mobile first; no framework; system fonts only (no font file, no third-party request). */
:root {
  --paper: #FBF8F1;
  --paper-2: #F4EFE3;        /* a second sheet: alternate bands, table heads */
  --sheet: #FFFDF8;          /* a card lying on the paper */
  --rule: #D9CFBA;
  --rule-2: #E4DCCB;
  --ink: #1F2A44;
  --text: #3B3526;
  --muted: #6B6150;          /* the mockup's #7A6F5A, one step darker: 5.6:1 on the paper for small print */
  --accent: #B25E09;         /* the one accent: clock, pace, warnings (4.9:1 on paper) */
  --accent-soft: #F6E7CC;
  --ok: #1E6B43;
  --ok-bg: #E4EFE2;
  --bad: #A3271F;
  --bad-bg: #F6E2DC;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --r: 4px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--paper); }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.6; color: var(--text); background: var(--paper); }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.18; color: var(--ink); font-weight: 700; letter-spacing: -0.005em; }
h1 { font-size: clamp(29px, 6.4vw, 46px); margin: 0 0 14px; }
h2 { font-size: clamp(23px, 4.7vw, 31px); margin: 0 0 12px; }
h3 { font-size: 19px; margin: 20px 0 8px; }
p { margin: 0 0 14px; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: 76px; }
.wrap { max-width: 1040px; margin: 0 auto; padding-inline: 18px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
/* The form line: "Practice form A · 50 items · 15 min", as printed at the top of a test booklet. */
.eyebrow, .form-line { display: block; font-family: var(--mono); font-size: 12.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.form-line { text-transform: none; letter-spacing: 0.02em; font-size: 13px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 16px; }
ul.plain { list-style: none; padding: 0; margin: 0 0 12px; }
ul.plain li { padding: 4px 0; }
code { font-family: var(--mono); font-size: 0.92em; }

/* Header: the top edge of the sheet, with a printed double rule */
.site-header { background: var(--paper); color: var(--ink); position: sticky; top: 0; z-index: 20; border-bottom: 2px solid var(--ink); box-shadow: 0 3px 0 var(--paper), 0 4px 0 var(--rule); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.logo { font-family: var(--serif); font-weight: 700; font-size: 22px; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.logo span { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 20px; }
.nav a { color: var(--ink); text-decoration: none; font-size: 15px; white-space: nowrap; }
.nav a:hover { text-decoration: underline; }
@media (max-width: 760px) { .nav .nav-link { display: none; } .nav { gap: 12px; } }
body.in-test .site-header, body.in-test .site-footer { display: none; }

/* Buttons: ink on paper, squared */
.btn {
  display: inline-block; background: var(--ink); color: var(--paper); font: inherit; font-weight: 700; text-decoration: none; text-align: center;
  border: 1.5px solid var(--ink); border-radius: var(--r); padding: 13px 22px; cursor: pointer; line-height: 1.25;
}
.btn:hover { background: #121a2e; border-color: #121a2e; }
.btn.small { padding: 7px 14px; font-size: 15px; }
.btn.wide { display: block; width: 100%; }
.btn.big { font-size: 19px; padding: 16px 26px; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--paper-2); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn.is-busy { opacity: 0.6; pointer-events: none; }
.link-btn { background: none; border: 0; padding: 4px 0; font: inherit; color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.buy-note { color: var(--bad); font-size: 14px; margin: 8px 0 0; }
.buy-note:empty { display: none; }

/* Hero: the cover of the booklet */
.hero { background: var(--paper); color: var(--text); padding-block: 30px 34px; border-bottom: 1px solid var(--rule); }
.hero h1 { color: var(--ink); }
.hero .eyebrow { color: var(--muted); }
.hero .lede { font-size: 19px; color: var(--text); max-width: 640px; }
.hero-sub { font-size: 15px; color: var(--muted); max-width: 640px; margin: 0; }
.hero-grid { display: grid; gap: 24px; }
@media (min-width: 900px) { .hero { padding-block: 52px 56px; } .hero-grid { grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 48px; } }

/* Start panel on a test landing page: the instruction box on the first page of a test */
.start { background: var(--sheet); color: var(--text); border: 1.5px solid var(--ink); border-radius: var(--r); padding: 20px; }
.start-clock { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 10px; padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.t-clock { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 20px; letter-spacing: 0.01em; color: var(--ink); }
.t-clock.big { font-size: 46px; line-height: 1; }
.t-clock.is-low { color: var(--bad); }
.start ul { margin: 0 0 14px; padding-left: 20px; font-size: 15px; }
.start li { margin: 2px 0; }
.start .small { margin: 10px 0 0; }
#last-result { background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: 0; padding: 10px 14px; margin: 0 0 14px; font-size: 15px; color: var(--text); }

/* Sections */
.section { padding-block: 36px; }
.section.tight { padding-top: 22px; }
.section.alt { background: var(--paper-2); border-block: 1px solid var(--rule); }
.cards { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .cards.four { grid-template-columns: repeat(5, 1fr); } .cards.three { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); padding: 18px; margin: 0 0 14px; }
.cards .card { margin: 0; }
.card h2 { font-size: 22px; padding-bottom: 8px; border-bottom: 1px solid var(--rule-2); }
.card h3 { margin-top: 0; }
a.card { display: block; text-decoration: none; color: var(--text); }
a.card:hover { border-color: var(--ink); }
.pick { border-top: 3px solid var(--ink); }
.pick .pick-name { font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--ink); display: block; }
.pick .pick-meta { font-family: var(--mono); color: var(--muted); font-size: 13px; display: block; margin: 4px 0 12px; }
.pick .pick-go { font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.pick-small { border-top-color: var(--rule); }
.pick-small .pick-name { font-size: 18px; }
.facts { display: grid; gap: 0; grid-template-columns: 1fr 1fr; margin: 0 0 14px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--sheet); }
@media (min-width: 760px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.fact { padding: 12px 14px; border-right: 1px solid var(--rule-2); border-bottom: 1px solid var(--rule-2); }
.fact b { display: block; font-family: var(--mono); font-size: 23px; line-height: 1.2; color: var(--ink); }
.fact span { font-size: 14px; color: var(--muted); }
.ticks { list-style: none; padding: 0; margin: 0 0 14px; }
.ticks li { padding: 4px 0 4px 26px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 11px; width: 11px; height: 6px; border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(-45deg); }
.helper select, .r-role-pick select, .plan select, input[type="email"], input[type="text"], input[type="date"] {
  font: inherit; padding: 10px 12px; border: 1.5px solid var(--ink); border-radius: var(--r); background: var(--sheet); color: var(--text); width: 100%; max-width: 420px;
}
.helper label { display: block; font-weight: 600; margin: 12px 0 4px; }
.helper [data-helper-out] { margin-top: 16px; }
.helper-two .btn { margin: 0 6px 8px 0; }
.source-table { width: 100%; border-collapse: collapse; font-size: 15.5px; border-top: 2px solid var(--ink); }
.source-table th, .source-table td { text-align: left; vertical-align: top; padding: 9px 10px 9px 0; border-bottom: 1px solid var(--rule); }
.source-table th { width: 34%; font-weight: 600; color: var(--ink); }
.mix { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 0 22px; grid-template-columns: 1fr; border-top: 2px solid var(--ink); }
@media (min-width: 620px) { .mix { grid-template-columns: 1fr 1fr; } }
.mix li { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--rule); padding: 5px 0; }
.mix li span:last-child { font-family: var(--mono); color: var(--ink); }
details.faq { border-bottom: 1px solid var(--rule); padding: 12px 0; }
details.faq:first-of-type { border-top: 2px solid var(--ink); }
details.faq summary { font-weight: 700; cursor: pointer; color: var(--ink); }
details.faq p { margin: 10px 0 0; }

/* Plans: two order forms side by side */
.plans { display: grid; gap: 14px; grid-template-columns: 1fr; margin: 16px 0; }
@media (min-width: 700px) { .plans { grid-template-columns: 1fr 1fr; align-items: start; } }
.plan { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); padding: 18px; position: relative; }
.plan.is-best { border: 1.5px solid var(--ink); border-top-width: 4px; }
.plan h3 { margin: 0 0 4px; font-size: 21px; }
.plan-flag { display: inline-block; font-family: var(--mono); background: transparent; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; border: 0; padding: 0; margin: 0 0 8px; }
.plan-price { margin: 0 0 10px; padding-bottom: 10px; border-bottom: 1px solid var(--rule-2); }
.price { font-family: var(--serif); font-size: 36px; font-weight: 700; color: var(--ink); }
.price-was { color: var(--muted); font-size: 0.6em; font-weight: 400; }
.price-code { font-family: var(--mono); font-size: 13px; color: var(--ok); font-weight: 700; }
.code-note { font-size: 15px; border-left: 3px solid var(--bad); background: var(--bad-bg); padding: 8px 12px; margin: 0 0 12px; }
.code-note.is-ok { border-left-color: var(--ok); background: var(--ok-bg); }
.code-note:empty { display: none; }
.plan .ticks { font-size: 15.5px; }
.plan select { margin: 0 0 10px; max-width: none; }
.r-terms { font-size: 15.5px; }

/* Article pages: a printed handout */
.article { padding-block: 26px 40px; }
.crumbs { font-family: var(--mono); font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.crumbs a { color: var(--muted); }
.article .lede { font-size: 19px; color: var(--text); }
.article .updated { font-family: var(--mono); font-size: 13px; color: var(--muted); padding-bottom: 14px; border-bottom: 2px solid var(--ink); }
.article h2 { margin-top: 34px; padding-top: 14px; border-top: 1px solid var(--rule); }
.article table { border-collapse: collapse; width: 100%; font-size: 15.5px; min-width: 480px; border-top: 2px solid var(--ink); }
.article th, .article td { border-bottom: 1px solid var(--rule); border-right: 1px solid var(--rule-2); padding: 8px 10px; text-align: left; vertical-align: top; background: var(--sheet); }
.article thead th { background: var(--paper-2); color: var(--ink); }
.article li { margin: 4px 0; }
.note { background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: 0; padding: 12px 14px; margin: 0 0 16px; }
.note p:last-child, .keyfacts ul { margin-bottom: 0; }
.keyfacts { background: var(--sheet); border: 1px solid var(--rule); border-top: 3px solid var(--ink); border-radius: var(--r); padding: 14px 16px 14px 6px; margin: 0 0 18px; }
.cta-box { background: var(--paper-2); color: var(--text); border: 1.5px solid var(--ink); border-radius: var(--r); padding: 18px; margin: 22px 0; }
.cta-box p { color: var(--text); margin: 0 0 12px; }
.cta-box strong { color: var(--ink); }
.cta-box .btn { margin: 0 8px 8px 0; }
.sample { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); padding: 16px; margin: 0 0 18px; }
.sample-tag { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 8px; padding-bottom: 8px; border-bottom: 1px solid var(--rule-2); }
.related { list-style: none; padding: 0; display: grid; gap: 0; border-top: 2px solid var(--ink); }
.related a { display: block; border-bottom: 1px solid var(--rule); padding: 10px 2px; text-decoration: none; font-weight: 600; }
.related a:hover { text-decoration: underline; }
.guide-list { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 10px; }
@media (min-width: 700px) { .guide-list { grid-template-columns: 1fr 1fr; } }
.guide-list a { display: block; height: 100%; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); padding: 12px 14px; text-decoration: none; color: var(--text); }
.guide-list a:hover { border-color: var(--ink); }
.guide-list b { display: block; font-family: var(--serif); font-size: 18px; color: var(--ink); }
.guide-list span { font-size: 14.5px; color: var(--muted); }

/* Footer: the small print at the bottom of the sheet */
.site-footer { background: var(--paper-2); color: var(--text); padding-block: 26px 32px; font-size: 14.5px; margin-top: 30px; border-top: 2px solid var(--ink); }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.foot-cols { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; margin-bottom: 18px; }
@media (min-width: 760px) { .foot-cols { grid-template-columns: repeat(3, 1fr); } }
.foot-cols h2 { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin: 0 0 6px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; }
.foot-cols ul { list-style: none; padding: 0; margin: 0; }
.foot-cols li { padding: 3px 0; }
.foot-feedback { margin: 0 0 12px; color: var(--text); }
.foot-feedback a { text-decoration: underline; }
.disclaimer { border-top: 1px solid var(--rule); padding-top: 14px; margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }

/* ---------- The question (player, review, drills, samples) ---------- */
.q-card { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); padding: 16px; }
.q-text { white-space: pre-line; font-size: 18px; line-height: 1.5; margin: 0 0 12px; overflow-wrap: anywhere; color: var(--ink); }
.fig-stem { margin: 4px 0 14px; color: var(--ink); max-width: 100%; }
.fig-stem svg, .opt-fig svg { display: block; width: 100%; height: auto; }
.fig-matrix { width: 72%; max-width: 260px; }
.fig-target { width: 34%; max-width: 120px; min-width: 96px; }
.fig-wide { width: 100%; max-width: 520px; }
.fig-analogy { width: 76%; max-width: 300px; }
.fig-fold { width: 100%; max-width: 400px; }
.pairs { margin: 0 0 14px; font-family: var(--mono); font-size: 15.5px; color: var(--ink); }
.pair { display: grid; grid-template-columns: 22px 1fr 1fr; gap: 4px 12px; padding: 7px 8px; border: 1px solid var(--rule); border-bottom-width: 0; align-items: baseline; background: var(--sheet); }
.pair:last-child { border-bottom-width: 1px; }
.pair-n { color: var(--muted); font-size: 13px; }
.pair-l, .pair-r { white-space: nowrap; }
/* A pair that does not fit on one line is stacked, left over right, never wrapped (bank SPEC, section 3).
   The longest strings in the bank are 38 characters; the font shrinks just enough for them to fit the
   narrowest phone (monospace: 0.6 em a character; 84 px is everything around the text). */
@media (max-width: 620px) {
  .pair { grid-template-columns: 16px 1fr; gap: 2px 6px; padding: 6px; }
  .pair-r { grid-column: 2; }
  .pairs { font-size: min(15.5px, calc((100vw - 84px) / 23.2)); }
  .q-card { padding: 14px 12px; }
}
.data-table { border-collapse: collapse; margin: 0 0 4px; font-family: var(--mono); font-size: 15px; font-variant-numeric: tabular-nums; border-top: 2px solid var(--ink); color: var(--ink); }
.data-table th, .data-table td { border-bottom: 1px solid var(--rule); border-right: 1px solid var(--rule-2); padding: 6px 12px; text-align: right; white-space: nowrap; }
.data-table th:first-child { text-align: left; }
.data-table thead th { background: var(--paper-2); }

/* Answer options: the bubbles of an answer sheet. Picked = filled in, like a pencil mark. */
.opts { display: grid; gap: 8px; }
.opt {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: var(--ink); background: var(--sheet);
  border: 1px solid var(--rule); border-radius: var(--r); padding: 11px 14px; cursor: pointer; min-height: 52px; position: relative;
}
.opt:hover:not([disabled]) { border-color: var(--ink); }
.opt-key { flex: none; width: 30px; height: 30px; border-radius: 50%; background: transparent; border: 1.5px solid var(--ink); font-family: var(--mono); font-weight: 700; font-size: 14px; display: grid; place-items: center; color: var(--ink); }
.opt-label { overflow-wrap: anywhere; }
.opt.is-picked { border-color: var(--ink); border-width: 1.5px; background: var(--paper-2); }
.opt.is-picked .opt-key { background: var(--ink); color: var(--paper); }
.opt[disabled] { cursor: default; opacity: 1; color: var(--ink); }
.opt.is-right { border-color: var(--ok); border-width: 1.5px; background: var(--ok-bg); }
.opt.is-right .opt-key { background: var(--ok); border-color: var(--ok); color: #fff; }
.opt.is-wrong { border-color: var(--bad); border-width: 1.5px; background: var(--bad-bg); }
.opt.is-wrong .opt-key { background: var(--bad); border-color: var(--bad); color: #fff; }
.opt-mark { margin-left: auto; font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.is-right .opt-mark { color: var(--ok); } .is-wrong .opt-mark { color: var(--bad); }
/* Figure options: 3 per row on a phone (four options and "2col" items: 2 x 2), one row from 480 px up. */
.opts-fig { grid-template-columns: repeat(3, 1fr); }
.opts-fig.opts-n4, .opts-fig.opts-n2, .opts-fig.opts-2col { grid-template-columns: repeat(2, 1fr); }
.opts-fig.opts-2col .opt-fig { max-width: 170px; }
.opts-fig .opt { flex-direction: column; gap: 6px; padding: 8px 8px 10px; align-items: center; }
.opts-fig .opt-fig { width: 100%; max-width: 124px; }
.opts-fig .opt-mark { margin: 0; }
@media (max-width: 400px) { .opts-fig { gap: 6px; } .opts-fig .opt { padding: 6px 4px 8px; } .opts-fig .opt-key { width: 26px; height: 26px; } }
@media (min-width: 480px) {
  .opts-fig.opts-n5 { grid-template-columns: repeat(5, 1fr); }
  .opts-fig.opts-n4 { grid-template-columns: repeat(4, 1fr); }
  .opts-fig.opts-n3 { grid-template-columns: repeat(3, 1fr); max-width: 420px; }
}
.explain { background: var(--paper-2); border-left: 3px solid var(--ink); border-radius: 0; padding: 12px 14px; margin: 12px 0 0; font-size: 16px; }
.explain.is-ok { background: var(--ok-bg); border-left-color: var(--ok); }
.explain.is-bad { background: var(--bad-bg); border-left-color: var(--bad); }

/* ---------- The test: the clock is the hero of the screen ---------- */
.test { max-width: 760px; margin: 0 auto; padding: 0 12px 96px; }
.t-top { position: sticky; top: 0; z-index: 15; background: var(--paper); padding: 10px 2px 8px; border-bottom: 2px solid var(--ink); margin-bottom: 12px; }
.t-form { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.03em; color: var(--muted); margin: 0 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-top-in { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.t-top .t-clock { font-size: 42px; line-height: 1.05; color: var(--ink); }
@media (min-width: 760px) { .t-top .t-clock { font-size: 56px; } .t-count { font-size: 15px; } }
.t-top .t-clock.is-low { color: var(--bad); }
.t-count { font-family: var(--mono); font-size: 14px; color: var(--muted); font-weight: 600; }
.t-bar { height: 4px; background: var(--rule-2); border-radius: 0; margin-top: 6px; overflow: hidden; }
.t-bar-fill { display: block; height: 100%; width: 0; background: var(--ink); transition: width 0.2s; }
.t-stage { padding-top: 2px; }
/* The answer button is always reachable: it sticks to the bottom of the screen. */
.t-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; background: var(--paper); border-top: 1px solid var(--rule);
  padding: 10px max(12px, calc((100vw - 736px) / 2)) calc(10px + env(safe-area-inset-bottom)); display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
.t-foot .t-next { flex: 1 1 auto; max-width: 340px; }
.t-foot .t-hint { flex: 1 1 0; min-width: 0; }
.t-next.is-skip { background: var(--sheet); border-color: var(--ink); color: var(--ink); }
@media (max-width: 520px) { .t-foot .t-hint { display: none; } .t-foot .t-next { max-width: none; } .test[data-nav="free"] .t-foot .btn { padding-inline: 10px; flex: 1 1 0; font-size: 15.5px; } }
.t-wait { text-align: center; padding: 60px 10px; }
.t-grid-title { font-size: 21px; }
.t-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 0 0 12px; }
@media (min-width: 520px) { .t-grid { grid-template-columns: repeat(10, 1fr); } }
.t-cell { font-family: var(--mono); font-size: 15px; font-weight: 700; padding: 10px 0; border-radius: var(--r); border: 1px solid var(--rule); background: var(--sheet); color: var(--ink); cursor: pointer; min-height: 44px; }
.t-cell.is-seen { border-color: var(--ink); }
.t-cell.is-done { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.t-cell.is-cur { outline: 3px solid var(--accent); outline-offset: 1px; }
.t-confirm { position: fixed; inset: 0; z-index: 40; background: rgba(31, 42, 68, 0.55); display: grid; place-items: center; padding: 16px; }
.t-confirm-in { background: var(--paper); border: 1.5px solid var(--ink); border-radius: var(--r); padding: 22px; max-width: 440px; width: 100%; }
.t-confirm-in label { display: block; font-weight: 600; margin: 8px 0 4px; }
.t-confirm-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.t-confirm-btns .btn { flex: 1 1 150px; }
.pace-bar { position: relative; height: 10px; background: var(--rule-2); border-radius: 0; margin-top: 6px; overflow: hidden; }
.pace-you { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ok); }
.pace-you.is-behind { background: var(--accent); }
.pace-even { position: absolute; top: 0; bottom: 0; width: 3px; background: var(--ink); z-index: 2; }
.pace-note { font-family: var(--mono); font-size: 13.5px; font-weight: 600; margin: 0 2px 10px; min-height: 22px; color: var(--ink); }

/* ---------- Result: a score report ---------- */
#stage:not([hidden]) { padding-block: 10px 30px; }
.result { max-width: 760px; margin: 0 auto; padding: 12px 14px 20px; }
.r-head { background: var(--sheet); color: var(--text); border: 1.5px solid var(--ink); border-top-width: 5px; border-radius: var(--r); padding: 18px 18px 16px; margin: 0 0 14px; }
.r-head .eyebrow { color: var(--muted); padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.r-score { display: flex; align-items: baseline; gap: 12px; margin: 6px 0 6px; }
.r-raw { font-family: var(--serif); font-size: 76px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; color: var(--ink); }
.r-of { font-family: var(--mono); font-size: 20px; color: var(--muted); font-weight: 600; }
.small-score .r-raw { font-size: 50px; }
.r-line { color: var(--text); margin: 0 0 14px; }
.r-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 2px solid var(--ink); }
@media (min-width: 560px) { .r-tiles { grid-template-columns: repeat(4, 1fr); } }
.r-tile { background: transparent; border-radius: 0; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); }
.r-tile-v { font-family: var(--mono); font-size: 21px; font-weight: 700; color: var(--ink); }
.r-tile-l { font-size: 13.5px; color: var(--muted); line-height: 1.3; }
.r-tile-s { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.r-jump { margin: 14px 0 0; }
.r-block { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); padding: 18px 16px; margin: 0 0 14px; }
.r-block h2 { font-size: 23px; padding-bottom: 8px; border-bottom: 1px solid var(--rule-2); }
.r-rank { padding-left: 20px; margin: 0 0 12px; }
.r-pct { font-size: 18px; }
.pct-bar { position: relative; height: 12px; background: var(--paper-2); border: 1px solid var(--rule); border-radius: 0; margin: 24px 0 12px; }
.pct-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--rule); }
.pct-mid { position: absolute; left: 50%; top: -4px; bottom: -4px; width: 1px; background: var(--muted); }
.pct-you { position: absolute; top: -24px; transform: translateX(-50%); font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--ink); }
.pct-you::after { content: ""; position: absolute; left: 50%; top: 20px; width: 3px; height: 20px; margin-left: -1.5px; background: var(--ink); }
.r-role-pick { display: block; font-weight: 600; margin: 0 0 12px; }
.r-role-pick select { display: block; margin-top: 4px; }
.r-role-verdict { border-radius: 0; padding: 10px 12px; border-left: 3px solid var(--ink); }
.r-role-verdict.is-under { background: var(--bad-bg); border-left-color: var(--bad); }
.r-role-verdict.is-in { background: var(--ok-bg); border-left-color: var(--ok); }
.r-role-list { columns: 2; column-gap: 20px; padding-left: 18px; font-size: 15px; margin: 0 0 12px; }
@media (max-width: 480px) { .r-role-list { columns: 1; } }
.r-role-more summary { cursor: pointer; color: var(--ink); text-decoration: underline; margin: 0 0 8px; }
.r-skip { border-left: 3px solid var(--accent); }
.r-skip-list { list-style: none; padding: 0; margin: 0 0 10px; border-top: 2px solid var(--ink); }
.r-skip-list li { display: grid; grid-template-columns: 44px 1fr auto auto; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: 15.5px; align-items: baseline; }
.r-skip-q { font-family: var(--mono); font-weight: 700; color: var(--ink); }
.r-skip-ms { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent); }
.r-skip-o { color: var(--muted); font-size: 14px; }
.chart { margin: 6px 0 14px; }
.chart svg { display: block; width: 100%; height: auto; max-width: 560px; }
.chart svg.strip { height: 70px; max-width: none; }
.chart .ax { stroke: var(--rule); stroke-width: 1; }
.chart .even { stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 4 3; fill: none; }
.chart .you { stroke: var(--accent); stroke-width: 2.5; fill: none; stroke-linejoin: round; }
.chart .you-dot { fill: var(--accent); }
.chart .lbl { font-size: 10px; fill: var(--muted); font-family: var(--mono); }
.s-ok { fill: var(--ok); } .s-bad { fill: var(--bad); } .s-blank { fill: #9C917B; } .s-none { fill: var(--rule-2); }
.chart-key span[class^="key-"] { display: inline-block; width: 12px; height: 12px; border-radius: 0; vertical-align: -1px; margin-left: 6px; }
.key-you { background: var(--accent); } .key-even { background: var(--ink); } .key-ok { background: var(--ok); } .key-bad { background: var(--bad); } .key-blank { background: #9C917B; }
.r-types { width: 100%; border-collapse: collapse; font-size: 15.5px; min-width: 330px; border-top: 2px solid var(--ink); }
.r-types th, .r-types td { text-align: left; padding: 8px 8px 8px 0; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.r-types thead th { font-family: var(--mono); font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.r-types tbody th { font-weight: 600; color: var(--ink); }
.r-types td { font-family: var(--mono); font-size: 14.5px; }
.frac.is-low { color: var(--bad); font-weight: 700; }
.mini { display: block; height: 4px; width: 64px; background: var(--bad-bg); border-radius: 0; margin-top: 3px; overflow: hidden; }
.mini-fill { display: block; height: 100%; background: var(--ok); }
.is-slow { color: var(--accent); font-weight: 700; }
.r-sections { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-family: var(--mono); background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--r); padding: 2px 10px; font-size: 13px; color: var(--ink); }
.r-offer { background: var(--sheet); border: 1.5px solid var(--ink); border-top-width: 5px; border-radius: var(--r); padding: 20px 16px; margin: 0 0 14px; }
.r-offer h2 { font-size: 25px; }
.r-diag { padding-left: 20px; margin: 0 0 12px; font-weight: 600; color: var(--ink); }
.r-offer-lede { font-size: 17px; }
.rv-list { border-top: 2px solid var(--ink); }
.rv { border-bottom: 1px solid var(--rule); }
.rv summary { display: grid; grid-template-columns: 40px 1fr auto auto auto; gap: 8px; padding: 10px 0; cursor: pointer; font-size: 15.5px; align-items: baseline; list-style: none; }
.rv summary::-webkit-details-marker { display: none; }
.rv-n { font-family: var(--mono); font-weight: 700; color: var(--ink); }
.rv-s { font-family: var(--mono); font-weight: 700; font-size: 13px; }
.rv-ok .rv-s { color: var(--ok); } .rv-bad .rv-s { color: var(--bad); } .rv-blank .rv-s, .rv-none .rv-s { color: var(--muted); }
.rv-ms { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; min-width: 42px; text-align: right; }
.rv-lock { font-family: var(--mono); font-size: 11.5px; background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--r); padding: 0 6px; color: var(--muted); }
.rv-body { padding: 4px 0 16px; }
.rv-locked { background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: 0; padding: 10px 12px; margin: 10px 0 0; font-size: 15.5px; }
.r-actions { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin: 18px 0; }

/* ---------- Dashboard: the candidate's folder ---------- */
.app-main { max-width: 760px; margin: 0 auto; padding: 16px 14px 40px; min-height: 60vh; }
.app-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); margin-bottom: 12px; }
.app-head h1 { font-size: 29px; margin-bottom: 4px; }
.app-head .muted { font-family: var(--mono); font-size: 12.5px; margin: 0; }
.app-back { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; margin: 0 0 12px; }
.app-back h1 { font-size: 25px; margin: 0; flex: 1 1 100%; }
.tabs { display: flex; gap: 0; overflow-x: auto; margin: 6px 0 14px; border-bottom: 1px solid var(--rule); }
.tab { font: inherit; font-weight: 700; font-size: 15px; white-space: nowrap; padding: 8px 14px; border-radius: var(--r) var(--r) 0 0; border: 1px solid transparent; border-bottom: 0; background: transparent; color: var(--muted); cursor: pointer; margin-bottom: -1px; }
.tab.is-on { background: var(--sheet); border-color: var(--rule); border-top: 3px solid var(--ink); color: var(--ink); }
.tests { list-style: none; padding: 0; margin: 0 0 8px; }
.tests li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.tests-name { font-weight: 700; color: var(--ink); }
.tests-score { grid-column: 1; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.tests-btns { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 12px; align-items: center; }
.forecast { font-size: 19px; }
.tr-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--rule); padding: 10px 0; }
.tr-row h3 { margin: 0 0 2px; }
.tr-row p { margin: 0; }
.ladder { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.ladder li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.ladder-name { font-weight: 600; color: var(--ink); }
.ladder-btns { grid-column: 1 / -1; display: flex; gap: 14px; align-items: center; }
@media (min-width: 620px) { .ladder li { grid-template-columns: 1fr auto auto; } .ladder-btns { grid-column: auto; } }
.pips { display: inline-flex; gap: 3px; }
.pip { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--ink); background: transparent; }
.pip.is-on { background: var(--ink); }
.plan-list { list-style: none; padding: 0; margin: 0 0 8px; }
.plan-list li { padding: 5px 0; }
.plan-list input { width: 18px; height: 18px; vertical-align: -3px; accent-color: var(--ink); }
.row input[type="date"] { max-width: 200px; display: block; margin-top: 4px; }
.code { font-family: var(--mono); font-size: 19px; letter-spacing: 1px; background: var(--accent-soft); border: 1px dashed var(--ink); border-radius: var(--r); padding: 2px 10px; white-space: nowrap; color: var(--ink); }
.app-foot { margin-top: 18px; }
.app-drill .t-foot .btn { max-width: 340px; flex: 1 1 auto; }
.app-drill { padding-bottom: 90px; }

/* Cheat sheet: one printed page */
.sheet { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); padding: 22px; font-size: 15px; line-height: 1.45; }
.sheet h1 { font-size: 25px; margin-bottom: 8px; }
.sheet h2 { font-size: 17px; margin: 14px 0 6px; border-bottom: 2px solid var(--ink); padding-bottom: 2px; }
.sheet h3 { font-size: 15px; margin: 10px 0 4px; }
.sheet p, .sheet ul { margin: 0 0 8px; }
.sheet ul { padding-left: 18px; }
.sheet li { margin: 1px 0; }
.sheet table { border-collapse: collapse; width: 100%; margin: 0 0 8px; }
.sheet th, .sheet td { border: 1px solid var(--rule); padding: 3px 7px; text-align: left; vertical-align: top; }
.sheet-foot { font-size: 12px; color: var(--muted); margin-top: 10px; }
@media print {
  @page { margin: 11mm; }
  html, body { background: #fff; font-size: 10.5pt; color: #000; }
  .site-header, .site-footer, .no-print { display: none !important; }
  .app-main { padding: 0; max-width: none; }
  .sheet { border: 0; padding: 0; font-size: 10pt; line-height: 1.32; background: #fff; }
  .sheet h1 { font-size: 15pt; } .sheet h2 { font-size: 11pt; margin-top: 7pt; border-color: #000; } .sheet h3 { font-size: 10pt; }
  .sheet th, .sheet td { border-color: #777; }
}

/* Feedback, reports, "not listed" */
.feedback-line { margin: 18px 0 6px; }
.report { margin: 10px 0 0; }
.report-open { font-size: 14px; color: var(--muted); }
.report-form { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 4px; }
.report-form input { flex: 1 1 200px; max-width: none; padding: 8px 10px; }
.want-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.want-opt { display: inline-flex; align-items: center; gap: 8px; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); padding: 7px 12px; font-size: 15.5px; cursor: pointer; min-height: 44px; color: var(--ink); }
.want-opt input { width: 18px; height: 18px; accent-color: var(--ink); }
.want label[for], .helper-ask label { display: block; font-weight: 600; margin: 8px 0 4px; }
.helper-ask { margin-top: 14px; }
.helper-ask input { margin: 0 8px 8px 0; }
.install { border-left: 3px solid var(--ink); }

/* Simple pages: sign-in, welcome, restore */
.box-page { max-width: 520px; margin: 0 auto; padding: 28px 16px 40px; min-height: 55vh; }
.box-page label { display: block; font-weight: 600; margin: 12px 0 4px; }
.box-page input { max-width: none; }
.box-page .btn { margin-top: 14px; }
.msg { border-radius: 0; padding: 10px 12px; margin: 12px 0 0; border-left: 3px solid var(--ink); }
.msg:empty { display: none; }
.msg.ok { background: var(--ok-bg); border-left-color: var(--ok); } .msg.no { background: var(--bad-bg); border-left-color: var(--bad); }
