/* GaimenPrep - design direction C, "Route map" (chosen 24.10.2026; mockup research/design/option-c).
   The test is a ride along a line: facts are stations, test progress is a line with stops (the orange stop is the pass
   mark), the clock is a departure board, topics have line badges (two letters + a colour).
   Teal #00876F + orange accent, white background, Barlow / Barlow Semi Condensed (Google Fonts, display=swap; system
   fonts until they load). Light only, on purpose. Mobile first (checked at 320 / 390 / 1280 px); no framework.
   Rules kept: nothing in this file knows the question count, pass mark or time - positions of stops are set from the
   form's data in JS (inline left: N%) and in scripts/pages.py. No police / government look: no badges, emblems, flags.
   Contrast: white text only on --teal-dk or on large (>= 19px bold) --teal; orange (#F08A00) always carries dark ink text. */
:root {
  --bg: #FFFFFF;
  --soft: #F2F5F4;
  --soft-2: #E8EDEB;
  --ink: #1A1F24;
  --text: #2A3138;
  --muted: #56606A;
  --line: #DCE2E0;
  --edge: #78837F;           /* borders of controls (3:1 on white) */
  --teal: #00876F;
  --teal-dk: #006652;
  --teal-soft: #E2F3EF;
  --orange: #F08A00;
  --orange-dk: #A85A00;
  --orange-soft: #FFF1DC;
  --board: #1F262D;
  --amber: #FFC23D;
  --red: #CF3B2E;
  --bad: #B3261E;
  --bad-bg: #FCEAE8;
  --ok: #1E6B43;
  --ok-bg: #E2F3EF;
  --jp: "Yu Gothic UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Meiryo", sans-serif;
  --sans: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, var(--jp);
  --cond: "Barlow Semi Condensed", "Barlow", system-ui, -apple-system, "Segoe UI", Arial, var(--jp);
  --r: 12px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; font-family: var(--sans); font-size: 18px; font-weight: 500; line-height: 1.55; color: var(--text); background: var(--bg); overflow-wrap: break-word; }
a { color: var(--teal-dk); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--orange-dk); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--cond); line-height: 1.15; color: var(--ink); font-weight: 800; }
h1 { font-size: clamp(30px, 8vw, 50px); margin: 12px 0 14px; text-wrap: balance; }
h2 { font-size: clamp(25px, 5.4vw, 32px); margin: 0 0 12px; text-wrap: balance; }
h3 { font-size: 21px; font-weight: 700; margin: 22px 0 8px; }
p { margin: 0 0 14px; }
ul, ol { padding-left: 22px; margin: 0 0 14px; }
li { margin: 3px 0; }
strong, b { font-weight: 700; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: 84px; }
.wrap { max-width: 1080px; margin: 0 auto; padding-inline: 16px; }
.narrow { max-width: 1080px; }   /* same left edge as every .wrap: text pages use one column, left-aligned */
/* decision 52: boxes span the container; the 66ch measure applies to prose lines (p, li) only */
.wrap.narrow > :is(.cards, .plans, .route, .facts, .cfacts) { max-width: none; }   /* data blocks use the full width, same left edge */
body.in-test .wrap.narrow { max-width: 780px; margin-inline: auto; }   /* the player is a centred, focused view */
body.in-test .wrap.narrow > * { max-width: none; }
.wrap .wrap { padding-inline: 0; }
.muted { color: var(--muted); }
.small { font-size: 15px; line-height: 1.45; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow, .form-line { display: block; font-family: var(--sans); font-size: 15px; line-height: 1.3; font-weight: 600; color: var(--muted); margin: 0 0 10px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.1em; font-size: 13px; font-weight: 700; }
.nowrap { white-space: nowrap; }

/* ---------- Header, footer ---------- */
.site-header { background: var(--bg); position: sticky; top: 0; z-index: 20; border-bottom: 4px solid var(--teal); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); white-space: nowrap; min-height: 44px; }
.logo svg { flex: none; display: block; }
.logo b { font: 800 22px/1 var(--cond); letter-spacing: 0.005em; }
.logo b span { color: var(--teal-dk); }
.nav { display: flex; align-items: center; gap: 0; }
.nav a { display: inline-block; padding: 10px 8px; line-height: 24px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 16px; white-space: nowrap; }
.nav a:hover { color: var(--teal-dk); text-decoration: underline; text-decoration-thickness: 2px; }
@media (min-width: 400px) { .site-header .wrap { gap: 10px; } .logo b { font-size: 23px; } .nav a { padding: 10px 10px; font-size: 16.5px; } }
@media (max-width: 720px) { .nav .nav-wide { display: none; } }
@media (max-width: 359px) { .nav .nav-mid { display: none; } .logo svg { width: 38px; height: 32px; } }
@media (max-width: 519px) { .nav .nav-mid { display: none; } }
body.in-test .site-header, body.in-test .site-footer, body.in-test .page-rest { display: none; }
.site-footer { border-top: 4px solid var(--teal); margin-top: 40px; padding: 24px 0 28px; background: var(--soft); font-size: 16px; }
/* Footer (24.10.2026): links are inline-block (no flex: text next to a span would lose its spaces). Phones: 44 px
   tap rows; from 640 px a tighter list (34 px rows). One grid for the columns and the bottom row, so the support
   line and the disclaimer line up with the columns. */
.foot-cols, .foot-bottom { display: grid; gap: 14px 32px; grid-template-columns: 1fr; }
.foot-cols { margin-bottom: 16px; }
@media (min-width: 640px) {
  .foot-cols, .foot-bottom { grid-template-columns: 1.5fr 1fr 1fr; }
  .foot-cols { gap: 0 32px; margin-bottom: 20px; }
}
.foot-cols h4 { margin: 0 0 4px; font: 800 18px/1.2 var(--cond); }
.foot-cols ul { list-style: none; padding: 0; margin: 0; }
.site-footer .foot-cols li { margin: 0; max-width: none; }
.foot-cols a { display: inline-block; padding: 10px 0; line-height: 24px; }
@media (min-width: 640px) { .foot-cols a { padding: 5px 0; line-height: 24px; } }
.foot-bottom { border-top: 2px solid var(--line); padding-top: 14px; align-items: start; }
.site-footer .foot-bottom p { max-width: none; margin: 0; font-size: 15px; line-height: 1.45; }
.foot-bottom .support { color: var(--text); }
.foot-bottom .disclaimer { color: var(--muted); font-size: 14.5px; }
@media (min-width: 640px) { .foot-bottom .disclaimer { grid-column: 2 / -1; } }

/* ---------- Buttons ---------- */
.btn { display: inline-block; vertical-align: middle; background: var(--teal); color: #fff; font-family: var(--cond); font-size: 20px; font-weight: 700; line-height: 24px; text-decoration: none; text-align: center;
  border: 2px solid var(--teal); border-radius: var(--r); padding: 12px 22px; cursor: pointer; min-height: 56px; }   /* inline-block, not flex: a label with a span keeps its spaces */
.btn:hover { background: var(--teal-dk); border-color: var(--teal-dk); color: #fff; }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--edge); }
.btn.ghost:hover { background: var(--soft); color: var(--ink); border-color: var(--ink); }
.btn.small { padding: 9px 16px; font-size: 17px; line-height: 22px; min-height: 44px; background: var(--teal-dk); border-color: var(--teal-dk); }
.btn.small.ghost { background: #fff; color: var(--ink); border-color: var(--edge); }
.btn.small.ghost:hover { background: var(--soft); border-color: var(--ink); }
.btn.wide { display: block; width: 100%; }
.btn[disabled], .btn.is-closed { background: var(--soft-2); border: 2px dashed var(--edge); color: #3A444B; cursor: default; }
.btn.is-busy { opacity: 0.6; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 16px 0; }
.btn + .note, .btn-row + .note, .buy-note { margin-top: 12px; }
.buy-note { font-size: 15.5px; color: var(--bad); font-weight: 600; }

/* ---------- Sections, cards, boxes ---------- */
.section { padding: 28px 0; border-bottom: 2px solid var(--line); }
.section:last-of-type { border-bottom: 0; }
.section h2:not(.no-stop)::before { content: ""; display: inline-block; vertical-align: 0.1em; width: 0.62em; height: 0.62em; margin-right: 0.38em; border-radius: 50%; border: 0.17em solid var(--teal); background: #fff; }
.hero { padding: 22px 0 10px; }
.hero h1 { margin-top: 10px; }
.answer { background: var(--soft); border-left: 8px solid var(--teal); border-radius: 0 var(--r) var(--r) 0; padding: 16px 18px; margin: 0 0 18px; font-size: 18.5px; }
.answer p:last-child { margin-bottom: 0; }
.card { background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 18px; margin: 0 0 16px; }
.card > :last-child { margin-bottom: 0; }
.card h2 { font-size: 26px; }
.cards { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .cards.two { grid-template-columns: 1fr 1fr; } .cards.three { grid-template-columns: repeat(3, 1fr); } }
.cards .card { margin: 0; }
.cards a.card { text-decoration: none; color: var(--text); display: block; border-left: 8px solid var(--teal); position: relative; min-height: 44px; }
.cards a.card:hover { border-color: var(--ink) var(--ink) var(--ink) var(--teal); background: var(--soft); }
.cards a.card h3 { margin-top: 0; color: var(--ink); padding-right: 26px; }
.cards a.card::after { content: "\2192"; position: absolute; right: 14px; top: 14px; font: 800 22px/1 var(--cond); color: var(--orange-dk); }
.cards a.card .lb { margin-bottom: 8px; }
.cards ul.cards-li, ul.cards.three { list-style: none; padding: 0; }
.checked { font-size: 15px; color: var(--muted); margin: 18px 0 6px; }
.sources { font-size: 16px; }
.sources li { margin: 6px 0; }
.todo-note { border: 2px dashed var(--orange-dk); background: var(--orange-soft); padding: 12px 14px; border-radius: var(--r); }
.crumbs { font-size: 15px; color: var(--muted); margin: 0 0 6px; }
.crumbs a { display: inline-block; text-align: center; padding: 10px 0; line-height: 24px; min-width: 44px; }
.badge { display: inline-block; font: 700 16px/28px var(--sans); color: var(--teal-dk); margin: 0; }
.badge i { display: inline-block; vertical-align: middle; margin-right: 8px; text-align: center; padding: 0 9px; height: 28px; border-radius: 8px; background: var(--teal-dk); color: #fff; font: 800 14px/28px var(--cond); font-style: normal; letter-spacing: 0.04em; }

/* Facts as stations on a line */
.route { list-style: none; margin: 0 0 16px; padding: 4px 0; position: relative; background: var(--soft); border-radius: 16px; }
.route li { position: relative; display: grid; grid-template-columns: 62px 1fr; align-items: center; gap: 12px; padding: 12px 14px 12px 16px; min-height: 76px; margin: 0; }
.route li::before { content: ""; position: absolute; left: 40px; width: 8px; top: 0; bottom: 0; background: var(--teal); }
.route li:first-child::before { top: 50%; }
.route li:last-child::before { bottom: 50%; }
.route li > * { position: relative; }
.stop { width: 56px; height: 56px; border-radius: 50%; background: #fff; border: 6px solid var(--teal); display: grid; place-items: center; font: 800 21px/1 var(--cond); color: var(--ink); text-align: center; }
.stop.goal { border-color: var(--orange-dk); background: var(--orange); color: var(--ink); }
.stop.cal { font-size: 13.5px; line-height: 1.05; }
.stop.sm { font-size: 15px; }
.route b { display: block; font: 700 21px/1.2 var(--cond); color: var(--ink); }
.route .t { display: block; color: var(--muted); font-size: 16px; line-height: 1.3; }
@media (min-width: 900px) { .route { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; } .route li:nth-child(odd):last-child::before { display: none; } }
.facts { margin: 0 0 14px; padding: 4px 0 4px 20px; position: relative; display: grid; grid-template-columns: 1fr; gap: 0; }
.facts::before { content: ""; position: absolute; left: 6px; top: 22px; bottom: 22px; width: 6px; border-radius: 3px; background: var(--teal); }
.facts > div { position: relative; display: flex; justify-content: space-between; gap: 12px; padding: 10px 6px 10px 14px; min-height: 44px; }
.facts > div::before { content: ""; position: absolute; left: -20px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: #fff; border: 4px solid var(--teal); }
.facts dt { color: var(--muted); font-size: 16px; }
.facts dd { margin: 0; font-weight: 700; color: var(--ink); text-align: right; font-family: var(--cond); font-size: 19px; }
@media (min-width: 700px) { .facts { grid-template-columns: 1fr 1fr; column-gap: 40px; } .facts::before { display: none; } .facts > div { border-bottom: 2px solid var(--line); padding-left: 6px; } .facts > div::before { display: none; } }

/* Topic line badges */
.lb { display: inline-grid; place-items: center; flex: none; min-width: 36px; height: 36px; padding: 0 6px; border-radius: 9px; background: var(--board); color: #fff; font: 800 15px/1 var(--cond); letter-spacing: 0.03em; }
.lb.sm { min-width: 28px; height: 28px; font-size: 13px; border-radius: 7px; }
.topic-line { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font: 700 18px/1.2 var(--cond); color: var(--ink); }

/* Center facts: label over value, the source link after it */
.cfacts { margin: 0 0 16px; border-top: 2px solid var(--line); }
.cfacts .crow { padding: 12px 0; border-bottom: 1px solid var(--line); }
.cfacts dt { font: 700 18px/1.2 var(--cond); color: var(--ink); }
.cfacts dd { margin: 2px 0 0; font-size: 17px; }
.cfacts dd ul { margin: 4px 0; }
.cfacts .csrc { font-size: 14.5px; color: var(--muted); white-space: nowrap; }
@media (min-width: 700px) { .cfacts .crow { display: grid; grid-template-columns: 210px 1fr; gap: 16px; } .cfacts dd { margin: 0; } }

/* Tables */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 16px; border-radius: var(--r); }
table { border-collapse: collapse; width: 100%; background: #fff; font-size: 16.5px; }
th, td { border: 1px solid var(--line); padding: 9px 11px; text-align: left; vertical-align: top; }
th { background: var(--board); color: #fff; font: 700 16px/1.25 var(--sans); border-color: var(--board); }
tbody tr:nth-child(even) td { background: var(--soft); }
@media (max-width: 560px) {
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack thead { display: none; }
  table.stack tr { border: 2px solid var(--line); border-radius: var(--r); margin: 0 0 10px; background: #fff; overflow: hidden; }
  table.stack td, table.stack tbody tr:nth-child(even) td { border: 0; border-bottom: 1px solid var(--line); background: #fff; }
  table.stack td:last-child { border-bottom: 0; }
  table.stack td::before { content: attr(data-th); display: block; font-size: 13.5px; color: var(--muted); font-weight: 700; }
}

/* FAQ */
.faq details { border-bottom: 2px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; font: 700 20px/1.25 var(--cond); color: var(--ink); min-height: 44px; display: block; padding: 10px 0; }
.faq details[open] summary { color: var(--teal-dk); }
.faq details p { margin: 4px 0 10px; }

/* ---------- Pricing ---------- */
.plans { display: grid; gap: 14px; grid-template-columns: 1fr; margin: 0 0 12px; }
@media (min-width: 900px) { .plans { grid-template-columns: 1fr 1fr 1fr; } }   /* 768 px overflowed with 3 columns */
.plan { background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; border-top: 8px solid var(--soft-2); }
.plan.main { border-color: var(--teal); border-top: 8px solid var(--teal); }
.plan h3 { margin: 0 0 4px; font-size: 24px; font-weight: 800; }
.plan .price { font: 800 40px/1.1 var(--cond); color: var(--ink); margin: 2px 0 10px; }
.plan .price small { font: 600 16px/1.2 var(--sans); color: var(--muted); }
.plan ul { padding: 0 0 16px 20px; margin: 0 0 16px; flex: 1; border-bottom: 2px solid var(--line); }   /* the rule sits at the same height in every card, so buttons line up and spare room reads as intentional */
.plan .btn { margin-top: auto; }

/* ---------- The test ---------- */
.test-start { background: #fff; border: 2px solid var(--line); border-left: 8px solid var(--teal); border-radius: 16px; padding: 18px; margin: 0 0 18px; }
.test-start .rules { margin: 0 0 14px; padding-left: 20px; }
.test-head { position: sticky; top: 0; z-index: 15; background: var(--board); color: #fff; margin-inline: calc(50% - 50vw); }
body.in-test { overflow-x: clip; }
.test-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 68px; padding-inline: 16px; box-sizing: border-box; max-width: 760px; margin-inline: auto; }
.test-head .form-line { margin: 0; font-size: 15px; color: #C9D1D8; font-weight: 600; }
.test-head .form-line b { color: #fff; font-weight: 700; display: block; font-size: 17px; }
.clockbox { text-align: right; }
.clockbox small { display: block; font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: #B3BDC6; font-weight: 700; }
.clock { font: 700 34px/1 var(--cond); color: var(--amber); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; min-width: 70px; text-align: right; }
.clock.warn { color: #FF8F84; }

/* The line with stops (progress in the test, your score in the result) */
.line { padding: 16px 0 6px; }
.line-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.line-top .n { font: 800 26px/1 var(--cond); color: var(--ink); }
.line-top .n small { font-size: 17px; color: var(--muted); font-weight: 700; }
.line-top .r { font-size: 16px; color: var(--muted); font-weight: 600; text-align: right; }
.track { position: relative; height: 26px; margin: 0 8px; }
.track::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 8px; border-radius: 4px; background: #CBD3D0; }
.track .done { position: absolute; left: 0; top: 9px; height: 8px; background: var(--teal); border-radius: 4px; width: 0; transition: width 0.25s; }
.track .st { position: absolute; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid #8E9A96; transform: translateX(-50%); }
.track .st.p { border-color: var(--teal); }
.track .st.goal { top: 3px; width: 20px; height: 20px; background: var(--orange); border: 3px solid var(--orange-dk); }
.track .now { position: absolute; top: 0; left: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--teal-dk); border: 4px solid #fff; box-shadow: 0 0 0 2px var(--teal-dk); transform: translateX(-50%); transition: left 0.25s; }
.track-l { position: relative; height: 22px; margin: 4px 8px 0; font-size: 14px; color: var(--muted); font-weight: 700; }
.track-l span { position: absolute; top: 0; white-space: nowrap; transform: translateX(-50%); }
.track-l span.l-l { transform: none; }
.track-l span.l-r { transform: translateX(-100%); }
.track-l .goal-l { color: var(--orange-dk); }
.track-l.above { margin: 0 8px 4px; }
.track-l.above span { top: auto; bottom: 0; }

.q-card { background: #fff; border: 2px solid var(--line); border-radius: 16px; margin: 14px 0; overflow: hidden; }
.qhead { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--soft); border-bottom: 2px solid var(--line); }
.qhead .num { display: inline-grid; place-items: center; flex: none; min-width: 40px; height: 40px; padding: 0 4px; border-radius: 50%; border: 5px solid var(--teal); background: #fff; color: var(--ink); font: 800 16px/1 var(--cond); }
.qbody { padding: 18px 16px; }
.q-card > .q-text:first-child, .q-card > .q-num:first-child { margin-left: 16px; margin-right: 16px; }
.q-num { font: 700 16px/1.2 var(--sans); color: var(--muted); margin: 0; }
.q-card > p.q-num:first-child { margin-top: 16px; margin-bottom: 6px; }
.q-text { font-size: 22px; line-height: 1.45; color: var(--ink); margin: 0 0 20px; font-weight: 500; }
.q-card > .q-text { margin-bottom: 16px; }
.tf { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tf button { font-family: var(--cond); font-size: 23px; font-weight: 700; min-height: 84px; padding: 8px; border: 2px solid var(--edge); border-radius: 14px; background: #fff; color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; position: relative; }
.tf button .m { font-size: 30px; line-height: 1; font-weight: 800; }
.tf button:hover:not([disabled]) { border-color: var(--teal-dk); background: var(--teal-soft); }
.tf button[aria-pressed="true"] { background: var(--teal-dk); border-color: var(--teal-dk); color: #fff; }
.tf button[disabled] { cursor: default; }
.q-card > .tf, .q-card > .feedback { margin-left: 16px; margin-right: 16px; }
.q-card > .tf { margin-bottom: 16px; }
/* the red circle (borrowed from option B): marks the correct answer after the statement is answered */
.tf button.is-key::after { content: ""; position: absolute; inset: -6px -5px; border: 3px solid var(--red); border-radius: 50% 46% 52% 48% / 58% 52% 56% 50%; transform: rotate(-1.5deg); pointer-events: none; }
.q-nav { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; margin: 0 0 12px; }
.q-nav .btn { width: 100%; }
.q-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; font-size: 16.5px; }
.q-tools button.link { background: none; border: 0; padding: 0 2px; min-height: 44px; font: 700 17px/1 var(--sans); color: var(--teal-dk); text-decoration: underline; cursor: pointer; }
.q-grid-title { font: 700 16px/1.2 var(--sans); color: var(--muted); margin: 6px 0 8px; }
.q-grid { display: grid; grid-template-columns: repeat(auto-fill, 44px); justify-content: space-between; gap: 6px 4px; margin: 0 0 14px; }
.q-grid button { font: 700 15px/1 var(--cond); width: 44px; height: 44px; padding: 0; border: 3px solid #8E9A96; background: #fff; color: var(--ink); border-radius: 50%; cursor: pointer; }
.q-grid button.done { background: var(--teal-dk); border-color: var(--teal-dk); color: #fff; }
.q-grid button.cur { border-color: var(--orange-dk); box-shadow: 0 0 0 3px var(--orange); }
.dialog { position: fixed; inset: 0; background: rgba(26, 31, 36, 0.6); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.dialog .box { background: #fff; border: 2px solid var(--line); border-top: 8px solid var(--teal); border-radius: 16px; padding: 20px; max-width: 440px; width: 100%; }
.dialog .box h3 { margin-top: 0; font-size: 26px; font-weight: 800; }
.dialog .box .btn { width: 100%; margin-top: 10px; }
.dialog input, .field input, .checker select { width: 100%; font: inherit; min-height: 48px; padding: 10px 12px; border: 2px solid var(--edge); border-radius: 10px; background: #fff; color: var(--ink); }

/* ---------- The result ---------- */
.score-card { margin: 16px 0; border-radius: 16px; overflow: hidden; border: 2px solid var(--line); background: #fff; }
.score-card .top { background: var(--board); color: #fff; padding: 16px 18px; }
.score-card .top .form-line { color: #C9D1D8; margin: 0; font-size: 15px; }
.score-card .row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 8px; }
.score-big { font: 800 72px/0.9 var(--cond); color: #fff; margin: 0; }
.score-big small { font-size: 28px; color: #B3BDC6; }
.vbox { text-align: right; }
.verdict { display: inline-block; font: 800 24px/1.1 var(--cond); letter-spacing: 0.06em; color: #FF8F84; }
.verdict.pass { color: #7EE0B8; }
.vbox small { display: block; font-size: 16px; color: var(--amber); font-weight: 600; margin-top: 2px; }
.score-card .bot { padding: 14px 18px 16px; }
.score-card .bot p { margin: 10px 0 0; }
.score-card .bot .line { padding: 6px 0 0; }
.topic-row { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 4px 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 17px; }
.card h2 + .topic-row { border-top: 0; }
.topic-row .nm { line-height: 1.25; }
.topic-row .c { font-weight: 700; text-align: right; white-space: nowrap; font-size: 16.5px; }
.topic-row.lost .c { color: var(--bad); }
.topic-row .bar { grid-column: 2 / -1; height: 8px; background: var(--soft-2); border-radius: 4px; }
.topic-row .bar > i { display: block; height: 100%; background: var(--teal); border-radius: 4px; }
.topic-row.lost .bar > i { background: var(--orange); }
.review-filter { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.review-filter button { font: 700 17px/1 var(--cond); padding: 0 16px; border: 2px solid var(--edge); background: #fff; color: var(--ink); border-radius: 22px; cursor: pointer; min-height: 44px; }
.review-filter button[aria-pressed="true"] { background: var(--teal-dk); border-color: var(--teal-dk); color: #fff; }
.rv { background: #fff; border: 2px solid var(--line); border-left: 8px solid var(--teal); border-radius: 14px; padding: 14px 16px; margin: 0 0 12px; }
.rv.bad { border-left-color: var(--red); }
.rv .rv-head { display: flex; align-items: center; gap: 8px; font: 700 15.5px/1.2 var(--sans); color: var(--muted); margin: 0 0 8px; }
.rv .rv-q { font-size: 19px; color: var(--ink); font-weight: 500; margin: 0 0 12px; }
.rv .rv-pick { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 12px; padding: 4px 6px; }
.rv .rv-pick > span { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; font: 700 20px/1 var(--cond); color: var(--ink); }
.rv .rv-pick .m { padding: 0; min-height: 0;  font-size: 24px; font-weight: 800; }
.rv .rv-pick .key::after { content: ""; position: absolute; inset: 1px -2px; border: 3px solid var(--red); border-radius: 50% 47% 52% 49% / 60% 52% 58% 50%; transform: rotate(-1.5deg); }
.rv .rv-pick .you { color: var(--muted); }
.rv .rv-pick .you small { font: 600 13px/1 var(--sans); }
.rv .rv-ans { font-size: 17px; margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--teal-soft); }
.rv.bad .rv-ans { background: var(--bad-bg); }
.rv .mark-ok { color: var(--ok); font-weight: 800; }
.rv .mark-bad { color: var(--bad); font-weight: 800; }
.rv .rv-exp { margin: 0 0 10px; font-size: 17.5px; }
.rv .rv-src { font-size: 16px; color: var(--ink); margin: 0; background: var(--teal-soft); border-radius: 10px; padding: 10px 12px; min-height: 44px; }
.rv .rv-src a { font-weight: 700; }
.feedback { margin: 12px 0 0; padding: 12px 14px; border-radius: var(--r); font-size: 17.5px; border-left: 8px solid var(--teal); background: var(--teal-soft); }
.feedback.bad { background: var(--bad-bg); border-left-color: var(--red); }
.feedback .rv-src { background: #fff; margin-top: 8px; }
.feedback .btn-row { margin-bottom: 0; }
.q-card > .feedback { margin-bottom: 16px; }

/* ---------- Checker ---------- */
.checker { background: var(--soft); border: 2px solid var(--line); border-left: 8px solid var(--teal); border-radius: 16px; padding: 18px; margin: 0 0 18px; }
.checker label { display: block; font: 700 20px/1.25 var(--cond); color: var(--ink); margin: 0 0 6px; }
.checker select { margin: 0 0 14px; }
.verdict-box { border-radius: var(--r); padding: 14px 16px; margin: 6px 0 0; border-left: 8px solid var(--teal); background: #fff; }
.verdict-box h3 { margin: 0 0 6px; font-size: 24px; }
.verdict-box.exempt { background: var(--ok-bg); border-left-color: var(--teal); }
.verdict-box.written { background: var(--orange-soft); border-left-color: var(--orange-dk); }
.verdict-box.both { background: var(--bad-bg); border-left-color: var(--red); }
.verdict-box p:last-child { margin-bottom: 0; }

/* ---------- Dashboard ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 18px; padding-bottom: 6px; border-bottom: 4px solid var(--teal); }
.tabs button { font: 700 18px/1 var(--cond); padding: 0 14px; border: 2px solid var(--line); background: var(--soft); color: var(--ink); border-radius: 12px; cursor: pointer; min-height: 44px; }
.tabs button:hover { border-color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--teal-dk); border-color: var(--teal-dk); color: #fff; }
.rowlist { list-style: none; padding: 0; margin: 0 0 14px; }
.rowlist li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line); margin: 0; min-height: 64px; }
.rowlist li > span:first-child { flex: 1 1 200px; min-width: 0; }
.rowlist strong { font: 700 20px/1.2 var(--cond); color: var(--ink); }
.rowlist .meta { font-size: 15.5px; color: var(--muted); }
.rowlist .tl { display: flex; align-items: center; gap: 12px; }
.rowlist .tl > span:last-child { flex: 1; min-width: 0; }
/* a ride: mock tests and history as stops on a line */
.rowlist.ride { position: relative; }
.rowlist.ride li { position: relative; padding-left: 44px; border-bottom: 0; }
.rowlist.ride li::before { content: ""; position: absolute; left: 11px; width: 6px; top: 0; bottom: 0; background: var(--teal); }
.rowlist.ride li:first-child::before { top: 50%; }
.rowlist.ride li:last-child::before { bottom: 50%; }
.rowlist.ride li::after { content: ""; box-sizing: border-box; position: absolute; left: 3px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; background: #fff; border: 5px solid var(--teal); }
.rowlist.ride li.pass::after { background: var(--teal); }
.rowlist.ride li.fail::after { background: var(--orange); border-color: var(--orange-dk); }
.rowlist.ride li.new::after { border-color: #8E9A96; }
.notice { background: var(--orange-soft); border-left: 8px solid var(--orange-dk); border-radius: var(--r); padding: 12px 14px; margin: 0 0 14px; }
.error-box { background: var(--bad-bg); border-left: 8px solid var(--red); border-radius: var(--r); padding: 12px 14px; margin: 0 0 14px; }
.field { margin: 0 0 12px; }
.field label { display: block; font: 700 19px/1.25 var(--cond); color: var(--ink); margin: 0 0 4px; }
.field input { max-width: 420px; }
code { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 0.92em; background: var(--soft); padding: 1px 5px; border-radius: 4px; }

/* Practical-test checklist (paid tab): printable */
.practical-body h3 { margin-top: 28px; }
.practical-body .pc-note { border: 2px solid var(--line); background: var(--soft); padding: 12px 14px; border-radius: var(--r); margin: 0 0 16px; }
.practical-body .src, .practical-body .src-line { display: block; font-size: 14px; line-height: 1.4; color: var(--muted); margin-top: 2px; }
.practical-body ul.checklist { list-style: none; padding-left: 0; }
.practical-body ul.checklist li { position: relative; padding: 8px 0 8px 36px; border-bottom: 1px solid var(--line); min-height: 44px; }
.practical-body ul.checklist li::before { content: ""; position: absolute; left: 2px; top: 10px; width: 20px; height: 20px; border: 3px solid var(--teal); border-radius: 50%; background: #fff; }
.practical-body table.sheet td:last-child { white-space: nowrap; font-weight: 700; }
@media print {
  .site-header, .site-footer, .btn, #account, .tabs, #practical-print { display: none; }
  body, html { background: #fff; font-size: 12pt; }
  .practical-body ul.checklist li, .practical-body tr { break-inside: avoid; }
  .practical-body .table-scroll { overflow: visible; }
  .practical-body a { color: inherit; }
}

/* ---------- Topic pages (/topics, /topics/<slug>) ---------- */
.fact { display: inline; }
a.src { font-size: 0.78em; color: var(--teal-dk); white-space: nowrap; margin-left: 2px; }
.key-rules li, .traps li { margin: 0 0 12px; }
.key-rules, .traps { list-style: none; padding-left: 0; }
.key-rules li, .traps li { position: relative; padding-left: 30px; }
.key-rules li::before { content: ""; position: absolute; left: 3px; top: 0.5em; width: 14px; height: 14px; border-radius: 50%; border: 4px solid var(--teal); background: #fff; }
.traps li::before { content: ""; position: absolute; left: 3px; top: 0.5em; width: 14px; height: 14px; border-radius: 50%; border: 4px solid var(--orange-dk); background: var(--orange); }
.rule-note { color: var(--muted); font-size: 0.92em; }
.try-q { font-size: 20px; font-weight: 500; color: var(--ink); margin: 0 0 12px; }
details.reveal > summary { list-style: none; display: inline-block; }
details.reveal > summary::-webkit-details-marker { display: none; }
details.reveal[open] > summary { margin-bottom: 10px; }
.reveal-answer { margin: 0 0 6px; }
.verdict-true, .verdict-false { position: relative; display: inline-block; padding: 0 9px; margin-right: 4px; color: var(--ink); }
.verdict-true::after, .verdict-false::after { content: ""; position: absolute; inset: -2px -1px; border: 3px solid var(--red); border-radius: 50% 47% 52% 49% / 60% 52% 58% 50%; transform: rotate(-1.5deg); }
.topic-cta .btn { margin-top: 4px; }
.topic-guide { font-size: 15px; margin-left: 6px; display: inline-block; padding: 10px 0; line-height: 24px; }
.topic-links a { display: inline-block; padding: 10px 0; line-height: 24px; }
.try-item .q-num { margin-bottom: 6px; }

@media (min-width: 900px) {
  .hero { padding-top: 34px; }
  .answer { font-size: 19.5px; }
  .tf button { font-size: 25px; }
  .q-text { font-size: 24px; }
}
@media (max-width: 359px) {
  body { font-size: 17px; }
  .score-big { font-size: 60px; }
  .tf { gap: 8px; }
  .tf button { font-size: 21px; gap: 6px; }
  .btn { padding: 10px 14px; }
  .route li { padding-left: 10px; }
  .route li::before { left: 34px; }
  .q-nav { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { .track .done, .track .now { transition: none; } }
#free-test + .page-rest .answer { margin-top: 20px; }
body.in-test .hero { padding-top: 0; }
/* Audit 24.10.2026: link lists are tap targets, a number and its unit never split, lines stay readable */
.sources li { margin: 0; }
.sources a { display: block; padding: 10px 0; line-height: 24px; }   /* block: the list bullet then sits on the first line of the link */
@media (min-width: 640px) { .sources a { padding: 4px 0; } }
.rv .rv-src a { display: inline-block; padding: 10px 0; line-height: 24px; }
.nw { white-space: nowrap; }
.wrap p, .wrap li { max-width: 66ch; }   /* ch of Barlow is wide: ~85 characters per line at most */
a.src { display: inline-block; padding: 14px 2px; margin: -14px 0; }
.plan .btn { white-space: nowrap; padding-inline: 12px; }
.try-item .small a, .contact-mail a { display: inline-block; padding: 10px 0; line-height: 24px; }

/* Polish 2 (24.10.2026): no orphan words on the last line */
p, li, dd, .faq details p { text-wrap: pretty; }
h3, h4, .btn, summary, .cards a.card h3, .topic-line { text-wrap: balance; }
@media (min-width: 700px) { .cards.three > a.card:last-child:nth-child(3n+1) { grid-column: 1 / -1; } .cards.two > a.card:last-child:nth-child(2n+1) { grid-column: 1 / -1; } }   /* no single card alone in the last row */
.checked { margin: 0 0 14px; }
.section > .wrap > .checked:first-child { margin-top: 0; }
.facts dd { text-wrap: balance; min-width: 0; }
.facts dt { flex: none; max-width: 45%; }
.wrap .rowlist li, .wrap .route li { max-width: none; }   /* rows run to the column edge; the 66ch cap is for prose */
.rowlist .btn.small { min-width: 128px; }               /* "Start" and "Take again" buttons in one column are one width */
.facts > div { align-items: baseline; }
.wrap.narrow > #app-root { max-width: none; }   /* the buyer pages (dashboard, tabs, rows) use the full column, same edges as the header */
#app-root > .card:not(#account, .welcome-card) { max-width: 560px; }   /* sign-in / restore forms stay form-sized, same left edge */

/* Decision 52 (24.10.2026): wide screens. Boxes run to the container's right edge (same as the header nav); article pages get a right sidebar from 1100 px. */
.art-side { display: none; }
@media (min-width: 1100px) {
  .art { display: grid; grid-template-columns: minmax(0, 1fr) 300px; column-gap: 40px; align-items: start; }
  .art-main { min-width: 0; }
  .art .art-main .wrap { max-width: none; padding-inline: 0; }
  .art-side { display: block; position: sticky; top: 84px; margin-top: 22px; }
  .art-side .card { margin: 0 0 16px; padding: 16px; }
  .art-side .card h2 { font-size: 22px; margin: 0 0 8px; }
  .art-side .card p { font-size: 16.5px; margin: 0 0 12px; }
  .art-side .btn { display: block; text-align: center; }
  .art-side ol { list-style: none; margin: 0; padding: 0; }
  .art-side li { margin: 0; max-width: none; }
  .art-side li a { display: block; padding: 4px 0; line-height: 24px; }
  .art .cards.three { grid-template-columns: 1fr 1fr; }
  .art .cards.three > a.card:last-child:nth-child(3n+1) { grid-column: auto; }
  .art .cards.three > a.card:last-child:nth-child(2n+1) { grid-column: 1 / -1; }
}
@media print { .art-side { display: none !important; } .art { display: block; } }

/* Decision 52b: /welcome, the account bar, the result on two columns */
.welcome-card { display: grid; gap: 4px 40px; }
.welcome-card .w-side { display: flex; flex-direction: column; }
.welcome-card .w-side .btn-row { order: -1; margin: 14px 0 12px; }
.welcome-card h2 { margin-top: 0; }
@media (min-width: 1100px) {
  .welcome-card { grid-template-columns: minmax(0, 1fr) 340px; align-items: center; padding: 26px 28px; }
  .welcome-card .w-side { border-left: 2px solid var(--line); padding-left: 32px; }
  .welcome-card .w-side .btn-row { order: 0; margin: 12px 0 0; }
  .welcome-card .w-side p { margin: 0; }
  .welcome-card .w-text > :last-child { margin-bottom: 0; }
}
#account { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 20px; padding: 8px 16px; }
#account p { margin: 0; line-height: 24px; max-width: none; }
#account .acc-r { font-size: 16px; }
#account .acc-r a { display: inline-block; padding: 8px 0; }
@media (min-width: 1100px) {
  .result { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 20px; align-items: start; }
  .result > * { grid-column: 1 / -1; }
  .result > .score-card, .result > .card:nth-child(2) { grid-column: auto; margin-block: 16px 0; }
  .result > .card:nth-child(2) { display: block; }
  .result > .score-card { position: sticky; top: 16px; } /* stays in view while the longer topic list scrolls */
}
