/* Pledge Ready. Printed-booklet look: white page, ink type, ruled tables, one highlighter yellow. */

:root {
  --page: #ffffff;
  --sheet: #f6f6f3;
  --ink: #16181d;
  --ink-2: #3d424c;
  --muted: #646a75;
  --rule: #dcdee3;
  --rule-strong: #b9bdc5;
  --link: #1e5a45;
  --gum: #1e5a45;
  --hi: #ffe14d;
  --hi-ink: #16181d;
  --ok: #1e6b4a;
  --ok-bg: #e9f4ee;
  --bad: #b3261e;
  --bad-bg: #fbecea;
  --warn: #9a6a00;
  --focus: #1d4ed8;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #111316; --sheet: #191c21; --ink: #eceef2; --ink-2: #c9cdd5; --muted: #9da3ae;
    --rule: #2a2f37; --rule-strong: #454c57; --link: #7cc9a6; --gum: #7cc9a6;
    --hi: #f0cf45; --ok: #7cc9a6; --ok-bg: #16281f; --bad: #f08a80; --bad-bg: #2d1a19; --warn: #e3b341; --focus: #8ab4ff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #111316; --sheet: #191c21; --ink: #eceef2; --ink-2: #c9cdd5; --muted: #9da3ae;
  --rule: #2a2f37; --rule-strong: #454c57; --link: #7cc9a6; --gum: #7cc9a6;
  --hi: #f0cf45; --ok: #7cc9a6; --ok-bg: #16281f; --bad: #f08a80; --bad-bg: #2d1a19; --warn: #e3b341; --focus: #8ab4ff;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 1.0625rem/1.6 var(--sans); }
img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 600; color: var(--ink); }
p { margin: 0; }
table { border-collapse: collapse; width: 100%; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--page); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(720px, 100% - 32px); margin-inline: auto; }
.display, .h1 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.015em; line-height: 1.08; }
.h1 { font-size: clamp(2.2rem, 5.2vw, 3.5rem); }
.h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.15; letter-spacing: -0.01em; }
.h3 { font-size: 1.3rem; line-height: 1.25; }
.lead { font-size: 1.125rem; color: var(--ink-2); max-width: 60ch; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.eyebrow { font-size: .95rem; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* buttons: square-ish, plain labels */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 6px; border: 1.5px solid transparent; font: 700 1rem/1 var(--sans); text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.btn-primary, .btn-wattle { background: var(--ink); color: var(--page); }
.btn-primary:hover, .btn-wattle:hover { background: var(--ink-2); }
.btn-line { border-color: var(--rule-strong); background: transparent; color: var(--ink); }
.btn-line:hover { border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink-2); text-decoration: underline; text-underline-offset: .2em; padding: 0 8px; }
.btn-ghost:hover { color: var(--ink); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: .95rem; }
.btn[disabled] { opacity: .45; cursor: default; }
.arr { display: none; }

/* header */
.site-head { border-bottom: 1px solid var(--rule); background: var(--page); position: sticky; top: 0; z-index: 20; }
.head-in { display: flex; align-items: center; gap: 28px; min-height: 64px; }
.brand { display: inline-flex; align-items: baseline; text-decoration: none; color: var(--ink); font: 600 1.35rem/1 var(--serif); letter-spacing: -0.01em; }
.brand span { background: linear-gradient(transparent 58%, var(--hi) 58%, var(--hi) 92%, transparent 92%); padding: 0 2px; }
.brand svg { display: none; }
.nav { display: flex; gap: 22px; margin-right: auto; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: .98rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); border-bottom-color: var(--rule-strong); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.head-cta { display: flex; align-items: center; gap: 6px; }
.theme-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; background: none; border-radius: 6px; cursor: pointer; color: var(--ink-2); }
.theme-btn:hover { background: var(--sheet); }
.menu-btn { display: none; }
@media (max-width: 860px) {
  .head-in { gap: 12px; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--page); border-bottom: 1px solid var(--rule); flex-direction: column; gap: 0; padding: 8px 16px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .nav a[aria-current="page"] { border-bottom-color: var(--rule); font-weight: 700; }
  .menu-btn { display: inline-grid; }
  .head-cta .btn { display: none; }
  .head-cta { margin-left: auto; }
}

main { display: block; }
.sec { padding: 64px 0; border-top: 1px solid var(--rule); }
.sec-head { display: grid; gap: 10px; margin-bottom: 28px; max-width: 64ch; }
.sec-split { display: grid; grid-template-columns: 300px 1fr; gap: 48px; align-items: start; }
.sec-split .sec-head { margin: 0; position: sticky; top: 96px; }
@media (max-width: 900px) { .sec-split { grid-template-columns: 1fr; gap: 20px; } .sec-split .sec-head { position: static; } }

/* home hero: text on the left, a working question on the right */
.hero { padding: 56px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: start; }
.hero h1 { max-width: 13ch; }
.hero .lead { margin: 20px 0 28px; }
.hero-note { margin-top: 14px; font-size: .95rem; color: var(--muted); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } .hero { padding-top: 36px; } }

.try { border: 1.5px solid var(--ink); border-radius: 8px; padding: 22px 22px 18px; background: var(--page); }
.try-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; font-size: .9rem; color: var(--muted); }
.try-top b { color: var(--ink); }
.try .qtext { font-size: 1.3rem; margin-bottom: 16px; }
.try .opts { gap: 8px; }
.try .opt { min-height: 52px; padding: 10px 12px; }
.try .explain { margin-top: 14px; }
.try-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; font-size: .9rem; color: var(--muted); }

/* test rules as a ruled reference table */
.facts { margin: 0; border-top: 2px solid var(--ink); }
.facts div { display: grid; grid-template-columns: 180px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.facts dt { font-weight: 700; }
.facts dd { margin: 0; color: var(--ink-2); }
@media (max-width: 600px) { .facts div { grid-template-columns: 1fr; gap: 2px; } }

/* contents-page lists (parts) */
.contents { border-top: 2px solid var(--ink); }
.c-row { display: grid; grid-template-columns: 64px 1fr 100px 190px 90px; gap: 18px; align-items: center; padding: 16px 0; border: 0; border-bottom: 1px solid var(--rule); color: inherit; text-decoration: none; text-align: left; background: none; width: 100%; font: inherit; cursor: pointer; }
.c-row:hover .c-name { text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 1px; }
.c-part { font-family: var(--serif); font-size: 1.05rem; color: var(--muted); }
.c-name { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; line-height: 1.25; }
.c-name small { display: block; font-family: var(--sans); font-weight: 400; font-size: .9rem; color: var(--muted); margin-top: 2px; }
.c-meta { color: var(--muted); font-size: .95rem; }
.c-meta .meter { margin-top: 6px; }
.c-go { font-weight: 700; color: var(--link); text-align: right; white-space: nowrap; }
.values-tag { display: inline-block; font: 700 .78rem/1 var(--sans); background: var(--hi); color: var(--hi-ink); padding: 4px 6px; border-radius: 3px; margin-left: 8px; vertical-align: 3px; }
@media (max-width: 760px) {
  .c-row { grid-template-columns: 1fr auto; gap: 4px 12px; }
  .c-part, .c-name, .c-meta { grid-column: 1; }
  .c-go { grid-column: 2; grid-row: 1 / span 4; align-self: center; }
}

.topics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 56px; }
.topics h3 { font-size: 1.15rem; padding: 18px 0 10px; border-bottom: 2px solid var(--ink); }
.topics a { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.topics a::after { content: ""; flex: 1; order: 1; border-bottom: 1px dotted var(--rule-strong); transform: translateY(-4px); min-width: 16px; }
.topics a span { order: 2; color: var(--muted); font-size: .92rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.topics a:hover { color: var(--link); }
@media (max-width: 760px) { .topics { grid-template-columns: 1fr; } }

.faq { display: grid; gap: 28px; max-width: 68ch; }
.faq h3 { font-size: 1.2rem; margin-bottom: 6px; }
.faq p { color: var(--ink-2); }

.progress-box { padding: 24px; background: var(--sheet); border-radius: 8px; }

/* footer */
.site-foot { margin-top: 80px; border-top: 1px solid var(--rule); padding: 40px 0 48px; font-size: .95rem; color: var(--ink-2); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-foot h4 { font: 700 .95rem/1.2 var(--sans); margin-bottom: 10px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-foot a { color: var(--ink-2); }
.legal { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--rule); display: grid; gap: 8px; font-size: .88rem; color: var(--muted); max-width: 90ch; }
.legal a { color: var(--muted); }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > div:first-child { grid-column: 1 / -1; } }

/* article pages */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .92rem; color: var(--muted); padding: 28px 0 0; }
.crumbs a { color: var(--muted); }
.page-head { display: grid; gap: 14px; padding: 20px 0 32px; }
.page-head .meta { color: var(--muted); font-size: .95rem; }
.prose { display: grid; gap: 18px; }
.prose h2 { font-size: 1.5rem; margin-top: 18px; }
.prose ul, .prose ol { margin: 0; padding-left: 1.25em; display: grid; gap: 8px; }
.prose p, .prose li { color: var(--ink-2); }
.keybox { border-top: 2px solid var(--ink); padding-top: 14px; }
.keybox h2 { font-size: 1.35rem; margin: 0 0 8px; }
.keybox ul { list-style: none; padding: 0; gap: 0; }
.keybox li { padding: 10px 0 10px 26px; border-bottom: 1px solid var(--rule); position: relative; color: var(--ink); }
.keybox li::before { content: ""; position: absolute; left: 2px; top: 1.05em; width: 12px; height: 8px; background: var(--hi); border-radius: 1px; }
.note { padding: 14px 16px; border-left: 4px solid var(--hi); background: var(--sheet); color: var(--ink); }
.sample { display: grid; border-top: 1px solid var(--rule); }
.sample details { border-bottom: 1px solid var(--rule); padding: 14px 0; }
.sample summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.sample summary::-webkit-details-marker { display: none; }
.sample summary small { font-weight: 400; color: var(--link); white-space: nowrap; text-decoration: underline; text-underline-offset: .18em; }
.sample details[open] summary small { visibility: hidden; }
.sample ol { list-style: upper-alpha; margin: 10px 0 0; }
.sample .ans { margin-top: 10px; color: var(--ink-2); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--rule); }
.pager a { display: grid; gap: 2px; color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.pager a:last-child { text-align: right; }
.pager small { font: 400 .9rem var(--sans); color: var(--muted); }
.pager a:hover { color: var(--link); }

/* quiz app */
.app { padding-top: 28px; }
.intro-card { display: grid; gap: 18px; }
.rules { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); }
.rules div { padding: 14px 12px 14px 0; display: grid; gap: 2px; }
.rules strong { font: 600 1.6rem/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.rules span { color: var(--muted); font-size: .92rem; }
@media (max-width: 600px) { .rules { grid-template-columns: 1fr 1fr; } }
.resume { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; background: var(--sheet); border-left: 4px solid var(--hi); }

.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 12px; }
.bar .label { font-weight: 700; display: grid; }
.bar .label small { font-weight: 400; color: var(--muted); font-size: .92rem; }
.timer { font: 700 1.15rem/1 var(--sans); font-variant-numeric: tabular-nums; padding: 8px 10px; border: 1.5px solid var(--rule-strong); border-radius: 6px; }
.timer.low { border-color: var(--warn); color: var(--warn); }
.timer.crit { border-color: var(--bad); color: var(--bad); }
.track { height: 4px; background: var(--rule); margin-bottom: 20px; }
.track span { display: block; height: 100%; background: var(--ink); transition: width .25s; }
.qcard { border: 1.5px solid var(--rule-strong); border-radius: 8px; padding: clamp(18px, 4vw, 32px); }
.qmeta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: .9rem; color: var(--muted); margin-bottom: 10px; }
.qmeta .values { background: var(--hi); color: var(--hi-ink); padding: 2px 6px; border-radius: 3px; font-weight: 700; }
.qtext { font: 600 clamp(1.35rem, 3vw, 1.75rem)/1.25 var(--serif); margin-bottom: 20px; }
.opts { display: grid; gap: 10px; }
.opt { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 12px 14px; text-align: left; border: 1.5px solid var(--rule-strong); border-radius: 6px; background: var(--page); cursor: pointer; font-size: 1.05rem; transition: border-color .12s, background-color .12s; }
.opt:hover:not([disabled]) { border-color: var(--ink); }
.opt .k { display: grid; place-items: center; width: 30px; height: 30px; border: 1.5px solid var(--rule-strong); border-radius: 4px; font-weight: 700; font-size: .92rem; }
.opt .mk { font-size: .85rem; font-weight: 700; }
.opt.sel { border-color: var(--ink); background: var(--sheet); }
.opt.sel .k { background: var(--ink); color: var(--page); border-color: var(--ink); }
.opt.right { border-color: var(--ok); background: var(--ok-bg); }
.opt.right .k { background: var(--ok); border-color: var(--ok); color: var(--page); }
.opt.right .mk { color: var(--ok); }
.opt.wrong { border-color: var(--bad); background: var(--bad-bg); }
.opt.wrong .k { background: var(--bad); border-color: var(--bad); color: var(--page); }
.opt.wrong .mk { color: var(--bad); }
.opt[disabled] { cursor: default; }
.opt.out { opacity: .45; }
.opt.out span:nth-child(2) { text-decoration: line-through; }
.hint { margin-top: 18px; padding: 12px 16px; border-left: 4px solid var(--hi); background: var(--sheet); }
.explain { margin-top: 18px; padding: 14px 16px; border-left: 4px solid var(--rule-strong); background: var(--sheet); display: grid; gap: 8px; }
.explain.good { border-left-color: var(--ok); }
.explain.bad { border-left-color: var(--bad); }
.explain .t { font-weight: 700; }
.explain.good .t { color: var(--ok); }
.explain.bad .t { color: var(--bad); }
.explain .ref { font-size: .9rem; color: var(--muted); }
.qnav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 22px; }
.btn.flagged { border-color: var(--warn); background: var(--hi); color: var(--hi-ink); }
.dots { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; margin-top: 16px; }
.qd { min-height: 40px; border: 1px solid var(--rule); border-radius: 4px; background: var(--page); cursor: pointer; font-size: .9rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.qd.done { background: var(--sheet); color: var(--ink); border-color: var(--rule-strong); }
.qd.ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.qd.no { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); }
.qd.flag { box-shadow: inset 0 -4px 0 var(--hi); }
.qd.cur { border: 2px solid var(--ink); color: var(--ink); font-weight: 700; }
.kbd { margin-top: 14px; font-size: .85rem; color: var(--muted); }
@media (max-width: 600px) { .dots { grid-template-columns: repeat(5, 1fr); } .kbd { display: none; } }

/* results */
.verdict { display: grid; grid-template-columns: auto 1fr; gap: 36px; align-items: start; padding-top: 8px; }
.score { min-width: 150px; padding: 18px 20px; border: 2px solid var(--ink); border-radius: 8px; text-align: center; }
.score svg { display: none; }
.score strong { display: block; font: 600 3.4rem/1 var(--serif); font-variant-numeric: tabular-nums; }
.score span { color: var(--muted); font-size: .95rem; }
.score.pass { border-color: var(--ok); }
.score.pass strong { color: var(--ok); }
.score.fail { border-color: var(--bad); }
.score.fail strong { color: var(--bad); }
.verdict h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.checks { display: grid; margin-top: 18px; border-top: 1px solid var(--rule); }
.check { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.check i { font-style: normal; font-weight: 700; }
.check.y i { color: var(--ok); }
.check.n i { color: var(--bad); }
.check.m i { color: var(--muted); }
@media (max-width: 600px) { .verdict { grid-template-columns: 1fr; gap: 20px; } .score { justify-self: start; } }

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.card { display: grid; gap: 14px; align-content: start; border-top: 2px solid var(--ink); padding-top: 14px; }
@media (max-width: 760px) { .cards { grid-template-columns: 1fr; } }
.parts { display: grid; gap: 12px; }
.meter-lbl { display: flex; justify-content: space-between; gap: 8px; white-space: nowrap; font-size: .88rem; color: var(--ink-2); margin-bottom: 4px; }
.meter { height: 6px; background: var(--rule); }
.meter span { display: block; height: 100%; background: var(--ok); }
.meter span.low { background: var(--warn); }
.weak { display: grid; border-top: 1px solid var(--rule); }
.weak a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
.weak a:hover b { text-decoration: underline; }
.weak small { color: var(--bad); white-space: nowrap; font-size: .9rem; }

.filters { display: inline-flex; border: 1.5px solid var(--rule-strong); border-radius: 6px; overflow: hidden; }
.filters button { border: 0; background: none; padding: 8px 14px; cursor: pointer; font-size: .95rem; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--page); }
.review { display: grid; border-top: 1px solid var(--rule); }
.rv { padding: 18px 0; border-bottom: 1px solid var(--rule); display: grid; gap: 8px; }
.rv .q { font: 600 1.15rem/1.35 var(--serif); }
.rv ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rv li { padding: 6px 10px; border-radius: 4px; color: var(--ink-2); }
.rv li.c { background: var(--ok-bg); color: var(--ink); }
.rv li.x { background: var(--bad-bg); color: var(--ink); }
.rv .who { font-size: .82rem; font-weight: 700; margin-left: 8px; }
.rv li.c .who { color: var(--ok); }
.rv li.x .who { color: var(--bad); }
.rv em { display: block; font-style: normal; font-size: .92rem; color: var(--ink-2); margin-top: 2px; }

/* progress */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); }
.stat { padding: 14px 12px 14px 0; display: grid; gap: 2px; }
.stat strong { font: 600 1.9rem/1.1 var(--serif); }
.stat span { color: var(--muted); font-size: .92rem; }
@media (max-width: 600px) { .stats { grid-template-columns: 1fr 1fr; } }
.hist th, .hist td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.hist th { font-size: .88rem; color: var(--muted); font-weight: 700; border-bottom: 2px solid var(--ink); }
.pill { font-size: .85rem; font-weight: 700; }
.pill.p { color: var(--ok); }
.pill.f { color: var(--bad); }
.pill.n { color: var(--muted); font-weight: 400; }
.empty { padding: 20px; background: var(--sheet); color: var(--ink-2); }

/* dialog */
.scrim { position: fixed; inset: 0; background: rgba(10, 12, 15, .5); display: grid; place-items: center; padding: 16px; z-index: 60; }
.modal { width: min(440px, 100%); background: var(--page); border-radius: 8px; padding: 24px; display: grid; gap: 12px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.modal h2 { font-size: 1.4rem; }
.modal p { color: var(--ink-2); }

/* ---------- movement with a purpose ---------- */
:root { --band: #16181d; --band-ink: #f4f1e8; --band-muted: #a9adb6; --ease: cubic-bezier(.2, .7, .2, 1); }
:root[data-theme="dark"] { --band: #1d2026; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --band: #1d2026; } }

/* the try card sits on a small stack of question sheets */
.try { position: relative; box-shadow: 6px 6px 0 -1.5px var(--page), 6px 6px 0 0 var(--ink), 12px 12px 0 -1.5px var(--page), 12px 12px 0 0 var(--rule-strong); margin-right: 12px; }
.try.enter > * { animation: card-in .35s var(--ease) both; }
@keyframes card-in { from { opacity: 0; transform: translateX(14px); } }

/* the pledge band: each phrase is highlighted in turn, and each maps to a part of the test */
.pledge { background: var(--band); color: var(--band-ink); padding: 88px 0 80px; }
.pledge figure { margin: 0; }
.pledge figcaption { color: var(--band-muted); font-size: .95rem; margin-bottom: 22px; }
.pledge blockquote { margin: 0; font: 500 clamp(1.9rem, 4.6vw, 3.6rem)/1.18 var(--serif); letter-spacing: -.01em; max-width: 24ch; }
.pledge mark { color: inherit; background: linear-gradient(var(--hi), var(--hi)) no-repeat 0 62% / 0% .92em; transition: background-size .7s var(--ease), color .3s .25s; padding: 0 .08em; margin: 0 -.04em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.pledge.in mark { background-size: 100% .92em; color: #16181d; }
.pledge.in mark:nth-of-type(2) { transition-delay: .55s, .8s; }
.pledge.in mark:nth-of-type(3) { transition-delay: 1.1s, 1.35s; }
.pledge.in mark:nth-of-type(4) { transition-delay: 1.65s, 1.9s; }
.pledge .ptag { font: 700 .8rem/1 var(--sans); letter-spacing: 0; vertical-align: super; margin-left: .3em; color: var(--hi); text-decoration: none; opacity: 0; transition: opacity .4s; }
.pledge.in .ptag { opacity: 1; }
.pledge.in .ptag:nth-of-type(2) { transition-delay: .9s; }
.pledge.in .ptag:nth-of-type(3) { transition-delay: 1.45s; }
.pledge.in .ptag:nth-of-type(4) { transition-delay: 2s; }
.pledge .ptag:hover { text-decoration: underline; }
.pledge-key { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .16); }
.pledge-key a { color: var(--band-ink); text-decoration: none; display: grid; gap: 4px; }
.pledge-key a b { color: var(--hi); font-size: .85rem; }
.pledge-key a span { font: 500 1.15rem/1.3 var(--serif); }
.pledge-key a small { color: var(--band-muted); font-size: .88rem; }
.pledge-key a:hover span { text-decoration: underline; text-underline-offset: .18em; }
@media (max-width: 800px) { .pledge { padding: 60px 0 56px; } .pledge-key { grid-template-columns: 1fr 1fr; } }

/* answers: a correct answer gets marked, a wrong one gives a small shake */
.opt.anim.right { animation: mark-ok .45s var(--ease); }
.opt.anim.right .k { animation: tick-pop .4s var(--ease); }
.opt.anim.wrong { animation: shake .36s ease-in-out; }
@keyframes mark-ok { from { background-color: var(--page); } }
@keyframes tick-pop { 40% { transform: scale(1.22); } }
@keyframes shake { 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.explain.anim { animation: drop-in .35s var(--ease) both; }
@keyframes drop-in { from { opacity: 0; transform: translateY(-6px); } }
.opt.sel { animation: press .18s ease-out; }
@keyframes press { 50% { transform: scale(.985); } }

/* mock test: the bar under the header is time left, and it drains */
.track.clock { height: 6px; }
.track.clock span { background: var(--ink); transition: width 1s linear, background-color .3s; }
.track.clock.low span { background: var(--warn); }
.track.clock.crit span { background: var(--bad); }

/* results: the verdict lands like a stamp */
.stamp { display: inline-block; border: 3px solid currentColor; border-radius: 6px; padding: 2px 14px 6px; transform: rotate(-3deg); animation: stamp .5s var(--ease) both .15s; }
.stamp.pass { color: var(--ok); }
.stamp.fail { color: var(--bad); }
@keyframes stamp { from { opacity: 0; transform: rotate(-8deg) scale(1.6); } 60% { opacity: 1; transform: rotate(-2deg) scale(.96); } }
.meter span { transition: width .8s var(--ease); }

/* progress map: one square per topic, coloured by how often you get it right */
.map { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 32px; }
.map-part > span { display: block; font-size: .85rem; font-weight: 700; margin-bottom: 8px; }
.map-grid { display: grid; grid-template-columns: repeat(5, 36px); gap: 6px; }
.map-grid a { width: 36px; height: 36px; border: 1.5px solid var(--rule-strong); border-radius: 4px; background: var(--page); transform: scale(.6); opacity: 0; transition: transform .4s var(--ease), opacity .4s, background-color .4s, border-color .4s; transition-delay: calc(var(--i, 0) * 30ms); }
.map.in .map-grid a { transform: none; opacity: 1; }
.map-grid a:hover { border-color: var(--ink); }
.map-grid a.s1 { background: var(--bad); border-color: var(--bad); }
.map-grid a.s2 { background: var(--hi); border-color: var(--hi); }
.map-grid a.s3 { background: var(--ok); border-color: var(--ok); }
.map-key { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; font-size: .88rem; color: var(--muted); }
.map-key i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; border: 1.5px solid var(--rule-strong); vertical-align: -1px; margin-right: 6px; }
.map-key i.s1 { background: var(--bad); border-color: var(--bad); }
.map-key i.s2 { background: var(--hi); border-color: var(--hi); }
.map-key i.s3 { background: var(--ok); border-color: var(--ok); }
.map-wrap { padding: 24px; border: 1.5px solid var(--rule); border-radius: 8px; margin-bottom: 28px; }
.map-wrap h3 { font-family: var(--serif); font-size: 1.3rem; margin-bottom: 4px; }
.map-wrap > p { color: var(--muted); margin-bottom: 18px; }
@media (max-width: 700px) { .map { grid-template-columns: repeat(2, auto); gap: 22px 28px; } .map-grid { grid-template-columns: repeat(5, 26px); } .map-grid a { width: 26px; height: 26px; } }
@media (prefers-reduced-motion: reduce) { .map-grid a, .pledge .ptag { opacity: 1; transform: none; } .pledge mark { background-size: 100% .92em; color: #16181d; } }

/* ---------- Pass Pack, buy prompts and ad spaces ---------- */
html.has-pack .free-only { display: none !important; }
html:not(.has-pack) .pack-only { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.btn-buy { background: var(--hi); color: var(--hi-ink); border-color: var(--hi); box-shadow: inset 0 -3px 0 rgba(0,0,0,.14); }
.btn-buy:hover { background: #ffd61a; }
.btn-buy[disabled] { opacity: .55; cursor: not-allowed; }
.tag { display: inline-block; font: 700 .72rem/1.6 var(--sans); letter-spacing: .04em; text-transform: uppercase; padding: 0 7px; border-radius: 3px; background: var(--hi); color: var(--hi-ink); vertical-align: middle; }
.price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.price strong { font: 600 2.4rem/1 var(--serif); letter-spacing: -.02em; }
.price span { color: var(--muted); }
.price-sm { font-size: .92rem; color: var(--muted); white-space: nowrap; }
.compare { font-size: .98rem; border-top: 2px solid var(--ink); }
.compare th, .compare td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.compare thead th { font: 600 1.05rem var(--serif); }
.compare thead th small { display: block; font: 400 .85rem var(--sans); color: var(--muted); }
.compare tbody th { font-weight: 400; color: var(--ink-2); }
.compare .pk { background: color-mix(in srgb, var(--hi) 22%, transparent); font-weight: 700; }
.compare thead .pk { background: var(--hi); color: var(--hi-ink); }
.compare thead .pk small { color: var(--hi-ink); opacity: .75; }
.pack-hero { display: grid; gap: 40px; grid-template-columns: 1fr; padding: 8px 0 56px; align-items: start; }
.pack-hero .page-head { display: grid; gap: 18px; padding-top: 24px; }
.has-it { display: grid; gap: 14px; padding: 16px; background: var(--ok-bg); border-left: 4px solid var(--ok); }
.pack-feats { display: grid; gap: 28px 40px; grid-template-columns: 1fr; border-top: 1px solid var(--rule); padding: 40px 0; }
.pack-feats > div { display: grid; gap: 8px; align-content: start; }
.pack-feats p { color: var(--ink-2); }
.pack-faq { padding: 24px 0 72px; border-top: 1px solid var(--rule); }
@media (min-width: 860px) { .pack-hero { grid-template-columns: 1fr 1fr; } .pack-feats { grid-template-columns: 1fr 1fr; } }
.proof { list-style: none; margin: 0; padding: 18px 0; display: flex; flex-wrap: wrap; gap: 10px 28px; border-top: 1px solid var(--rule); color: var(--ink-2); font-size: .98rem; }
.proof b { color: var(--ink); }
.offers { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
.offers a { display: grid; gap: 8px; align-content: start; padding: 22px; border: 1.5px solid var(--rule-strong); border-radius: 8px; color: inherit; text-decoration: none; background: var(--page); transition: border-color .15s, transform .15s; }
.offers a:hover { border-color: var(--ink); transform: translateY(-2px); }
.offers .tag { justify-self: start; }
.offers p { color: var(--ink-2); }
.offers .go { margin-top: 6px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 860px) { .offers { grid-template-columns: 1fr; } }
.final-cta { padding: 64px 0 72px; border-top: 1px solid var(--rule); text-align: center; }
.final-cta, .final-cta .wrap { display: grid; gap: 14px; justify-items: center; }
.who p { font-size: 1.1rem; max-width: 60ch; }
.final-cta .lead { max-width: 52ch; }
.walk { border-top: 1px solid var(--rule); padding: 40px 0 32px; display: grid; gap: 8px; }
.walk .pack-feats { border-top: 0; padding: 16px 0 8px; }
.pack-feats .n { font: 600 1.6rem/1 var(--serif); color: var(--muted); }
@media (min-width: 860px) { .pack-feats.three { grid-template-columns: repeat(3, 1fr); } }
.pack-cta { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 18px 32px; justify-content: space-between; align-items: center; padding: 20px 22px; background: var(--sheet); border: 1px solid var(--rule); border-left: 6px solid var(--hi); }
.pack-cta > div:first-child { flex: 1 1 340px; display: grid; gap: 6px; }
.pack-cta p { color: var(--ink-2); max-width: 62ch; }
.pack-cta-buy { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.practice-lock { margin-top: 8px; padding: 26px 24px; }
.practice-lock .tag { justify-self: start; }
.mock-left { padding: 10px 14px; background: var(--sheet); border-left: 4px solid var(--hi); }
.practice-extra { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 20px 0 56px; }
.practice-extra .locked { color: var(--muted); }
.practice-extra .tag { margin-left: 8px; }
.qmeta .speak { margin-left: auto; min-height: 0; padding: 2px 10px; font-size: .88rem; }
.ready { display: flex; flex-wrap: wrap; gap: 16px 28px; justify-content: space-between; align-items: center; padding: 18px 20px; border: 1px solid var(--rule); border-top: 3px solid var(--ink); margin-bottom: 32px; }
.ready > div { flex: 1 1 320px; display: grid; gap: 8px; }
.ready.locked { border-top-color: var(--hi); background: var(--sheet); }
.ready.lv-ready { border-top-color: var(--ok); }
.ready.lv-notyet { border-top-color: var(--bad); }
.verdict-tag { display: inline-block; margin-left: 8px; font: 700 .8rem/1.7 var(--sans); text-transform: uppercase; letter-spacing: .05em; padding: 0 8px; border: 2px solid currentColor; border-radius: 3px; vertical-align: middle; transform: rotate(-2deg); }
.ready.lv-ready .verdict-tag { color: var(--ok); }
.ready.lv-close .verdict-tag { color: var(--warn); }
.ready.lv-notyet .verdict-tag { color: var(--bad); }
.last3 { display: flex; gap: 8px; }
.last3 span { font-variant-numeric: tabular-nums; font-size: .9rem; padding: 2px 8px; border-radius: 3px; }
.last3 .p { background: var(--ok-bg); color: var(--ok); }
.last3 .f { background: var(--bad-bg); color: var(--bad); }
.ad-slot { display: none; margin: 40px auto; max-width: 728px; }
body[data-ads="on"] .ad-slot { display: block; }
html.has-pack .ad-slot { display: none !important; }
.ad-slot > span { display: block; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.ad-box { min-height: 90px; display: grid; place-items: center; padding: 12px; text-align: center; font-size: .88rem; color: var(--muted); border: 1px dashed var(--rule-strong); background: var(--sheet); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
/* privacy policy */
.policy-short { border: 1px solid var(--rule); padding: 20px 24px; display: grid; gap: 12px; }
.policy-short h2 { margin-top: 0; }

/* Pass Pack thanks page: one block shows at a time, picked by data-state. */
#pay-state > div { display: none; }
#pay-state[data-state="checking"] .pay-checking,
#pay-state[data-state="ok"] .pay-ok,
#pay-state[data-state="pending"] .pay-pending,
#pay-state[data-state="error"] .pay-error,
#pay-state[data-state="fail"] .pay-fail { display: grid; gap: 16px; }
.restore { margin-top: 24px; padding: 20px; border: 1px solid var(--rule); border-radius: 12px; display: grid; gap: 8px; }
.restore-row { display: flex; gap: 8px; flex-wrap: wrap; }
.restore-row input { flex: 1 1 220px; min-width: 0; font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 8px; background: transparent; color: inherit; }
