/* Edzuno: one stylesheet, no external fonts or frameworks. */
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f3f1ea;
  --ink: #18202e;
  --muted: #5a6475;
  --line: #e3dfd4;
  --brand: #2346a0;
  --brand-ink: #ffffff;
  --brand-soft: #e9eefb;
  --accent: #c9821c;
  --ok: #1d7a4b;
  --ok-soft: #e4f4ea;
  --bad: #b3362c;
  --bad-soft: #fbe9e6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(24, 32, 46, .06), 0 6px 24px rgba(24, 32, 46, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10141c;
    --surface: #171d28;
    --surface-2: #1c2331;
    --ink: #e7eaf1;
    --muted: #9ba4b6;
    --line: #2a3243;
    --brand: #8ea7ff;
    --brand-ink: #0d1322;
    --brand-soft: #1f2840;
    --accent: #f0b65a;
    --ok: #63c993;
    --ok-soft: #173126;
    --bad: #f08176;
    --bad-soft: #3a1d1b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #10141c; --surface: #171d28; --surface-2: #1c2331; --ink: #e7eaf1; --muted: #9ba4b6; --line: #2a3243;
  --brand: #8ea7ff; --brand-ink: #0d1322; --brand-soft: #1f2840; --accent: #f0b65a; --ok: #63c993; --ok-soft: #173126;
  --bad: #f08176; --bad-soft: #3a1d1b; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
a { color: var(--brand); }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; }

/* Header & footer */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 750; font-size: 1.25rem; letter-spacing: -.02em; }
.brand-mark { width: 28px; height: 28px; color: var(--brand); }
.site-nav { display: flex; align-items: center; gap: 18px; font-size: .95rem; }
.site-nav a:not(.btn) { color: var(--muted); text-decoration: none; }
.site-nav a:not(.btn):hover { color: var(--ink); }
@media (max-width: 640px) { .site-nav a:not(.btn) { display: none; } }
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 40px; margin-top: 24px; color: var(--muted); font-size: .9rem; }
.footer-links a { color: var(--muted); }
.fine { font-size: .82rem; color: var(--muted); }

/* Buttons & forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 999px; border: 1.5px solid transparent;
  font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .06s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-small { min-height: 38px; padding: 0 16px; font-size: .92rem; background: var(--brand); color: var(--brand-ink); }
.btn-large { min-height: 54px; padding: 0 30px; font-size: 1.08rem; }
input[type=email], input[type=text], select {
  font: inherit; min-height: 46px; padding: 0 14px; border-radius: 10px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); min-width: 0;
}
input:focus-visible, select:focus-visible, .btn:focus-visible, .opt:focus-visible, summary:focus-visible, .palette button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px;
}
.start-form label { display: block; font-weight: 600; margin-bottom: 6px; }
.start-row { display: flex; gap: 10px; flex-wrap: wrap; }
.start-row select, .start-row input { flex: 1 1 200px; }
.hint { font-size: .9rem; color: var(--muted); margin-top: 10px; }
.notice { padding: 12px 16px; border-radius: 10px; background: var(--bad-soft); color: var(--bad); }

/* Sections */
.section { padding: 56px 0; }
.section.alt { background: var(--surface-2); }
.section-lede, .lede { color: var(--muted); font-size: 1.08rem; max-width: 62ch; }
.center .section-lede { margin-left: auto; margin-right: auto; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--accent); margin-bottom: .6em; }
.two-col { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 860px) { .two-col { grid-template-columns: 1.2fr 1fr; align-items: start; } }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 24px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card p { color: var(--muted); margin: 0; }
.ticks { list-style: none; padding: 0; margin: 0 0 1.2em; }
.ticks li { position: relative; padding-left: 30px; margin-bottom: .7em; }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: .45em; width: 16px; height: 9px;
  border-left: 3px solid var(--ok); border-bottom: 3px solid var(--ok); transform: rotate(-45deg);
}
.callout { background: var(--brand-soft); border-radius: var(--radius); padding: 24px; }
.callout-title { font-weight: 700; margin-bottom: .4em; }
.text-link { font-weight: 600; }

/* Hero */
.hero { padding: 48px 0 56px; }
.hero-grid { display: grid; gap: 36px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.15fr 1fr; } }
.start-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); max-width: 560px; }
.sample-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: var(--shadow); max-width: 440px; margin: 0 auto; }
.sample-label { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .3em; }
.sample-prompt { font-weight: 650; }
.sample-stem { max-width: 260px; margin: 0 auto 16px; }
.sample-options { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.sample-opt { border: 1.5px solid var(--line); border-radius: 10px; padding: 4px; aspect-ratio: 1; }

/* Offer / pricing */
.offer { display: grid; gap: 28px; grid-template-columns: 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--shadow); }
@media (min-width: 860px) { .offer { grid-template-columns: 1.4fr 1fr; align-items: center; } }
.price-box { text-align: center; background: var(--surface-2); border-radius: var(--radius); padding: 24px; }
.price-box-large { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); text-align: left; }
.price-box-large .price-was, .price-box-large .price-now, .price-box-large .price-note { text-align: center; }
.price-was { text-decoration: line-through; color: var(--muted); margin: 0; }
.price-now { font-size: 2.6rem; font-weight: 800; margin: 0; letter-spacing: -.02em; }
.price-note { color: var(--muted); margin-bottom: 16px; }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 14px 0; }
summary { cursor: pointer; font-weight: 650; list-style-position: outside; }
details p { margin: .6em 0 0; color: var(--muted); }

/* Prose pages */
.prose h2 { margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.table { width: 100%; border-collapse: collapse; margin: 1em 0 1.4em; font-size: .95rem; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table th { color: var(--muted); font-weight: 650; }
.sources { font-size: .92rem; }

/* Lead form */
.lead-form { max-width: 560px; margin: 0 auto; }
.price-box .lead-form { margin-top: 8px; }

/* Puzzles (figures use currentColor so they follow the theme) */
.fig { display: block; width: 100%; height: auto; margin: 0 auto; color: var(--ink); overflow: visible; }
.opt .fig { max-width: 120px !important; }
.num-row, .word-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }
.num-tile, .word-tile {
  display: inline-flex; align-items: center; justify-content: center; min-width: 56px; min-height: 52px; padding: 0 14px;
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); font-weight: 700; font-size: 1.25rem;
}
.word-tile { font-size: 1.1rem; font-weight: 650; }
.num-q, .word-q { border-style: dashed; color: var(--muted); }
.num-pair { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 12px; background: var(--surface-2); }
.num-arrow, .word-sep { color: var(--muted); font-weight: 700; }
.word-gap { color: var(--muted); font-style: italic; padding: 0 6px; }

/* Test runner */
.is-test .site-header .header-inner { justify-content: center; }
.test { max-width: 860px; padding-top: 24px; padding-bottom: 48px; }
.intro { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--shadow); margin-top: 16px; }
.test-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.test-section { font-weight: 700; margin: 0; }
.test-count { margin: 0; color: var(--muted); font-size: .92rem; }
.timer { margin: 0; font-variant-numeric: tabular-nums; font-weight: 750; font-size: 1.25rem; padding: 6px 14px; border-radius: 999px; background: var(--surface-2); }
.timer-low { color: var(--bad); background: var(--bad-soft); }
.progress { height: 6px; border-radius: 99px; background: var(--surface-2); margin: 14px 0 22px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--brand); transition: width .25s ease; }
.q { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px 20px; box-shadow: var(--shadow); }
.q-prompt { font-size: 1.15rem; font-weight: 650; margin-bottom: 18px; }
.q-sub { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin-bottom: .4em; }
.review-sub { font-size: .82rem; color: var(--muted); }
.fig-target { max-width: 120px !important; }
.q-stem { margin-bottom: 22px; }
.q-stem-text { padding: 8px 0; }
.q-options { display: grid; gap: 10px; }
.q-options-figure { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.q-options-text { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
@media (max-width: 520px) {
  .q-options-figure { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .q { padding: 18px 12px; }
}
.opt {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  border: 2px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink);
  padding: 8px 8px 10px; font: inherit; cursor: pointer; transition: border-color .12s ease, background .12s ease;
}
button.opt:hover { border-color: var(--muted); }
.opt.is-selected { border-color: var(--brand); background: var(--brand-soft); }
.opt-letter { font-size: .78rem; font-weight: 750; color: var(--muted); }
.opt-body { width: 100%; }
.q-options-text .opt { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 12px 14px; }
.q-options-text .opt-body { font-weight: 650; font-size: 1.08rem; text-align: left; }
.test-nav { display: flex; justify-content: space-between; gap: 12px; margin: 20px 0; }
.palette { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.palette button {
  width: 34px; height: 34px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--surface);
  color: var(--muted); font: inherit; font-size: .85rem; cursor: pointer;
}
.palette button.is-answered { background: var(--brand-soft); color: var(--ink); border-color: transparent; }
.palette button.is-current { border-color: var(--brand); color: var(--ink); font-weight: 700; }
.modal { position: fixed; inset: 0; background: rgba(10, 14, 22, .55); display: grid; place-items: center; padding: 16px; z-index: 10; }
.modal-box { background: var(--surface); border-radius: 20px; padding: 24px; max-width: 440px; width: 100%; box-shadow: var(--shadow); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* Results */
.results-head h1 { margin-bottom: .3em; }
.score-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin: 26px 0; }
.score-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.score-title { font-weight: 650; margin-bottom: .2em; }
.score-num { font-size: 2rem; font-weight: 800; margin: 0 0 8px; }
.score-num span { font-size: 1.1rem; color: var(--muted); font-weight: 600; }
.meter { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.insights { background: var(--brand-soft); border-radius: var(--radius); padding: 20px 22px; }
.insights p:last-child { margin-bottom: 0; }
.review-area { border: 1px solid var(--line); border-radius: var(--radius); padding: 0 18px; margin-bottom: 14px; background: var(--surface); }
.review-area > summary { padding: 16px 0; font-size: 1.1rem; }
.review-sum { color: var(--muted); font-weight: 600; margin-left: 6px; }
.review-item { border-top: 1px solid var(--line); padding: 20px 0; }
.review-item header { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.review-n { font-weight: 750; }
.review-badge { font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.is-right .review-badge { background: var(--ok-soft); color: var(--ok); }
.is-wrong .review-badge { background: var(--bad-soft); color: var(--bad); }
.review-options .opt { cursor: default; }
.opt.is-answer { border-color: var(--ok); background: var(--ok-soft); }
.opt.is-chosen { border-color: var(--bad); background: var(--bad-soft); }
.opt-tag { position: absolute; top: 4px; right: 8px; font-size: 1rem; font-weight: 800; line-height: 1; }
.is-answer .opt-tag { color: var(--ok); }
.is-chosen .opt-tag { color: var(--bad); }
.explain { margin-top: 14px; background: var(--surface-2); padding: 12px 14px; border-radius: 10px; }

/* Guides, practice hub and drills */
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.muted { color: var(--muted); font-weight: 400; }
.battery-h { margin-top: 1.6em; }
.card-link h3 a { color: var(--ink); text-decoration: none; }
.card-link h3 a:hover { color: var(--brand); }
.card-actions { margin-top: 10px !important; font-size: .92rem; }
.card-h { font-size: 1.15rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 8px; }
.center-row { justify-content: center; }
.btn-block { width: 100%; margin-top: 10px; }
.level-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pill {
  display: inline-flex; gap: 6px; align-items: baseline; padding: 7px 14px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-size: .92rem; font-weight: 600;
}
.pill span { color: var(--muted); font-weight: 400; font-size: .85rem; }
.pill:hover { border-color: var(--brand); }
.pill.is-on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.pager { display: flex; justify-content: space-between; gap: 12px; margin: 32px 0 20px; padding-top: 18px; border-top: 1px solid var(--line); font-weight: 600; }
.tips li { margin-bottom: .5em; }
.table-wrap { overflow-x: auto; }
.paper-table td, .paper-table th { white-space: nowrap; }
.q-static { margin: 14px 0 22px; box-shadow: none; }
.q-static .q-prompt { font-size: 1.05rem; }
.reveal { border: 0; padding: 12px 0 0; }
.reveal summary { color: var(--brand); }
.drill-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.drill-card {
  display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink);
}
.drill-card:hover { border-color: var(--brand); }
.drill-battery { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.drill-title { font-weight: 700; }
.drill-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.drill-head h1 { margin-bottom: 0; font-size: clamp(1.5rem, 3.5vw, 2rem); }
.feedback { margin-top: 16px; }
.feedback-title { font-weight: 750; color: var(--bad); margin-bottom: 6px; }
.feedback.is-right .feedback-title { color: var(--ok); }
button.opt:disabled { cursor: default; opacity: 1; }
.drill-lead { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.intro.center { text-align: center; }

/* Footer */
.footer-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 18px; }
.footer-grid a { display: block; color: var(--muted); text-decoration: none; padding: 3px 0; }
.footer-grid a:hover { color: var(--ink); }
.footer-h { font-weight: 700; color: var(--ink); margin-bottom: 6px; }

/* Worksheets (screen) */
.worksheet { max-width: 900px; padding-top: 24px; padding-bottom: 48px; }
.ws-toolbar { display: grid; gap: 14px; margin-bottom: 24px; padding: 20px; border-radius: var(--radius); background: var(--surface-2); }
.ws-toolbar h1 { font-size: 1.6rem; margin-bottom: .3em; }
.ws-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ws-actions .level-pills { margin: 0; }
.ws-header { display: grid; gap: 6px; border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 18px; }
.ws-fields { display: flex; flex-wrap: wrap; gap: 18px; color: var(--muted); }
.ws-questions { padding-left: 1.4em; }
.ws-q { margin-bottom: 26px; }
.ws-prompt { font-weight: 650; }
.ws-q .q-options-figure .fig { max-width: 90px !important; }
.ws-q .q-stem { margin-bottom: 12px; }
.ws-key { margin-top: 40px; border-top: 2px solid var(--ink); padding-top: 16px; }
.ws-key li { margin-bottom: .5em; }

@media print {
  :root, :root:not([data-theme="light"]) {
    --bg: #fff; --surface: #fff; --surface-2: #fff; --ink: #000; --muted: #444; --line: #bbb;
    --brand: #000; --brand-soft: #fff; --ok-soft: #fff; --bad-soft: #fff; color-scheme: light;
  }
  body { background: #fff; color: #000; font-size: 12pt; }
  .site-header, .site-footer, .no-print { display: none !important; }
  .worksheet { padding: 0; max-width: none; }
  .ws-q { break-inside: avoid; page-break-inside: avoid; }
  .ws-key { break-before: page; page-break-before: always; border-top: 0; }
  .opt { border: 1px solid #999; padding: 2px 4px 4px; border-radius: 8px; }
  .q-options-figure { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: 6px; }
  /* Compact figures so 4-5 questions fit on a page. */
  .ws-q { margin-bottom: 14px; }
  .ws-q .q-stem { margin-bottom: 6px; }
  .ws-q .q-stem .fig { max-width: 150px !important; }
  .ws-q .q-stem .fig-row { max-width: 400px !important; }
  .ws-q .q-options-figure .fig { max-width: 58px !important; }
  /* Figure recognition depends on the target and designs being drawn at exactly the same scale. */
  .ws-q.kind-figure_recognition .q-stem .fig,
  .ws-q.kind-figure_recognition .q-options-figure .fig { max-width: 104px !important; }
  .ws-q .q-options-text .opt { padding: 4px 8px; }
  .num-tile, .word-tile { min-height: 36px; min-width: 40px; font-size: 1rem; }
  a { color: #000; text-decoration: none; }
}

/* School pages */
.facts li { margin-bottom: .6em; }
.cite { font-size: .75em; vertical-align: super; text-decoration: none; margin-left: 2px; }
.schools-table td { vertical-align: top; }
.schools-table td:first-child { white-space: nowrap; }
@media (max-width: 640px) { .schools-table td:first-child { white-space: normal; } }

/* Homepage */
.hero { position: relative; overflow: hidden; }
.hero-grid { position: relative; z-index: 1; }
.hero-bg { position: absolute; inset: 0; color: var(--brand); pointer-events: none; }
.hero-shape { position: absolute; width: 44px; height: 44px; opacity: .1; animation: drift 14s ease-in-out infinite; }
.hero-shape.s1 { top: 8%; left: 3%; width: 60px; height: 60px; }
.hero-shape.s2 { top: 70%; left: 8%; color: var(--accent); opacity: .16; animation-delay: -3s; }
.hero-shape.s3 { top: 12%; left: 46%; width: 36px; height: 36px; animation-delay: -6s; }
.hero-shape.s4 { top: 78%; left: 52%; width: 52px; height: 52px; animation-delay: -9s; }
.hero-shape.s5 { top: 6%; right: 4%; color: var(--accent); opacity: .18; animation-delay: -2s; }
.hero-shape.s6 { top: 84%; right: 6%; width: 30px; height: 30px; animation-delay: -11s; }
@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(14px, -18px) rotate(40deg); }
  66% { transform: translate(-10px, 10px) rotate(-25deg); }
}
.hl { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--accent) 35%, transparent) 62%); padding: 0 .1em; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0; margin: 16px 0 0; font-size: .9rem; color: var(--muted); }
.trust li { position: relative; padding-left: 20px; }
.trust li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 10px; height: 5px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }

.sample-card { animation: float 6s ease-in-out infinite; transition: box-shadow .3s ease; }
.sample-card.is-solved { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 35%, transparent), var(--shadow); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.sample-opt { transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.sample-opt.is-scan { border-color: var(--brand); background: var(--brand-soft); transform: translateY(-3px); }
.sample-opt.is-pick { border-color: var(--ok); background: var(--ok-soft); transform: scale(1.08); }
.sample-status { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; font-size: .88rem; color: var(--muted); min-height: 1.6em; }
.sample-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); animation: pulse 1.2s ease-in-out infinite; }
.is-solved .sample-status .dot { background: var(--ok); animation: none; }
@keyframes pulse { 0%, 100% { opacity: .3; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }

.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; padding-top: 22px; padding-bottom: 22px; }
.stat { display: flex; flex-direction: column; align-items: center; text-align: center; }
.stat-n { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; color: var(--brand); font-variant-numeric: tabular-nums; }
.stat-l { font-size: .88rem; color: var(--muted); }

.steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: step; }
.step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 20px 20px; counter-increment: step; }
.step::after { content: counter(step); position: absolute; top: 14px; right: 18px; font-size: 2.4rem; font-weight: 800; color: var(--line); line-height: 1; }
.step p { color: var(--muted); margin: 0; }
.step-icon, .tool-icon, .area-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); margin-bottom: 12px; transition: transform .25s ease; }
.step-icon svg, .tool-icon svg, .area-icon svg { width: 24px; height: 24px; }
.step:hover .step-icon, .tool:hover .tool-icon, .area-card:hover .area-icon { transform: rotate(-8deg) scale(1.06); }

.try { max-width: 760px; margin: 26px auto 0; }
.try-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 16px; }
.try-tab {
  font: inherit; font-weight: 650; font-size: .95rem; padding: 8px 18px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); transition: background .15s ease, border-color .15s ease;
}
.try-tab:hover { border-color: var(--brand); }
.try-tab.is-on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.try-tab:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }
.try-panel { animation: fade-up .35s ease both; }
.try-panel .q-stem .fig { max-width: min(260px, 70vw) !important; }
.try-more { text-align: center; margin-top: 18px; font-weight: 600; }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.report-row { align-items: center; }
.report { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; box-shadow: var(--shadow); max-width: 460px; width: 100%; justify-self: center; }
.report-head { display: flex; justify-content: space-between; align-items: center; }
.report-title { font-weight: 750; margin: 0; }
.report-badge { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); border: 1.5px solid currentColor; border-radius: 99px; padding: 2px 10px; }
.report-total { margin: 10px 0 16px; }
.report-total .stat-n { font-size: 2.2rem; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 36px; align-items: center; gap: 12px; margin-bottom: 12px; font-size: .92rem; }
.bar-row b { text-align: right; font-variant-numeric: tabular-nums; }
.report .meter span { width: var(--w); transition: width 1.1s cubic-bezier(.2, .8, .2, 1); }
.js .report:not(.in) .meter span { width: 0; }
.report .bar-row:nth-child(2) .meter span { transition-delay: .12s; }
.report .bar-row:nth-child(3) .meter span { transition-delay: .24s; background: var(--accent); }
.report .bar-row:nth-child(4) .meter span { transition-delay: .36s; }
.report-next { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 6px; }
.report-next-h { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.chip { display: inline-block; padding: 4px 12px; margin: 0 6px 6px 0; border-radius: 99px; background: var(--brand-soft); color: var(--brand); font-size: .88rem; font-weight: 650; }

.area-card { transition: transform .2s ease, box-shadow .2s ease; }
.area-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.school-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; }

.tools { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 26px; }
.tool {
  display: flex; flex-direction: column; padding: 22px 20px; border-radius: var(--radius); text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.tool:hover { transform: translateY(-4px); border-color: var(--brand); box-shadow: var(--shadow); }
.tool-h { font-weight: 750; font-size: 1.05rem; margin-bottom: 4px; }
.tool-p { color: var(--muted); font-size: .95rem; }

/* Scroll reveal: hidden only when JS is running, so the page never depends on it. */
.js .rv { opacity: 0; transform: translateY(18px); transition: opacity .6s ease var(--d, 0ms), transform .6s ease var(--d, 0ms); }
.js .rv.in { opacity: 1; transform: none; }

.sticky-cta {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 20; display: none;
  min-height: 50px; align-items: center; justify-content: center; border-radius: 999px;
  background: var(--brand); color: var(--brand-ink); font-weight: 700; text-decoration: none; box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
  transform: translateY(140%); transition: transform .3s ease;
}
@media (max-width: 760px) { .sticky-cta:not([hidden]) { display: flex; } }
.sticky-cta.is-shown { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .hero-shape, .sample-card, .sample-status .dot, .try-panel { animation: none; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .report .meter span, .sticky-cta { transition: none; }
}

/* Full test form, plan opt-in and share buttons */
.field-label { display: block; font-weight: 600; margin: 12px 0 6px; text-align: left; }
.field { display: block; width: 100%; }
.check { display: flex; gap: 10px; align-items: flex-start; text-align: left; font-size: .92rem; color: var(--muted); margin-top: 12px; cursor: pointer; }
.check input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--brand); }
.share { text-align: center; }
.share-h { font-weight: 750; font-size: 1.2rem; margin-bottom: .3em; }
.share-lede { color: var(--muted); margin-bottom: 14px; }
.share-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.btn-wa { background: #1f9d55; color: #fff; }
.btn-wa:hover { filter: brightness(1.08); }
.drill-lead .share { margin-top: 22px; }
.chips-h { font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 6px 0 6px; }
.pill-more { border-style: dashed; color: var(--brand); }

/* CAT4 year-group pages */
.year-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); margin: 12px 0 8px; }
.year-card {
  display: flex; flex-direction: column; padding: 12px 14px; border-radius: var(--radius); text-decoration: none;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); transition: border-color .15s ease, transform .15s ease;
}
.year-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.year-card.is-on { border-color: var(--brand); background: var(--brand-soft); }
.year-n { font-weight: 750; }
.year-sub { font-size: .85rem; color: var(--muted); }
.facts-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 20px 0 8px; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.fact-k { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0; }
.fact-v { font-size: 1.35rem; font-weight: 800; margin: 2px 0 0; }
.fact-v span { font-size: .9rem; font-weight: 500; color: var(--muted); }
.q-static-wrap .q-static { margin-top: 0; }

/* CAT4 score checker */
.sc-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 22px 0; box-shadow: var(--shadow); }
.sc-inputs { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 8px; }
.sc-input { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .95rem; }
.sc-input input { font: inherit; font-size: 1.15rem; font-weight: 700; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); width: 100%; }
.sc-input input:focus { outline: 3px solid color-mix(in srgb, var(--brand) 40%, transparent); border-color: var(--brand); }
.sc-form .btn { margin-top: 6px; }
.sc-errors { background: var(--bad-soft); color: var(--bad); border-radius: var(--radius); padding: 14px 18px; font-weight: 600; }
.sc-errors p { margin: 0; }
.sc-result { scroll-margin-top: 80px; }
.sc-rows { display: grid; gap: 14px; }
.sc-row { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.sc-row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.sc-sas { font-size: 1.6rem; font-weight: 800; color: var(--brand); }
.sc-track { position: relative; height: 10px; border-radius: 5px; background: var(--surface-2); margin: 10px 0; }
/* average band: SAS 89-111 on the 59-141 scale */
.sc-avg { position: absolute; top: 0; bottom: 0; left: 36.6%; width: 26.8%; background: color-mix(in srgb, var(--accent) 35%, transparent); border-radius: 5px; }
.sc-dot { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--brand); border: 3px solid var(--surface); box-shadow: var(--shadow); }
.sc-row-text { margin: 0; color: var(--muted); font-size: .95rem; }
.sc-profiles { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 10px 0 14px; }
.sc-band { font-size: .72rem; line-height: 1.2; text-align: center; padding: 8px 4px; border-radius: 8px; background: var(--surface-2); color: var(--muted); }
.sc-band.is-on { background: var(--brand); color: var(--brand-ink); font-weight: 750; }

/* Puzzle of the day */
.pz-streak { display: inline-block; margin-top: 4px; padding: 6px 14px; border-radius: 999px; background: var(--brand-soft); font-weight: 700; }
.pz-next { margin-top: 10px; font-weight: 600; }
.pz-share { margin: 28px 0 8px; }

/* Contact form */
.contact-form { max-width: 560px; }
.contact-form .field { width: 100%; }
.contact-form textarea { font: inherit; padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); resize: vertical; }
.contact-form textarea:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }
.contact-form .btn { margin-top: 18px; }
.field-error { color: var(--bad); font-weight: 600; margin: 6px 0 0; }

/* Worksheet builder */
.wb-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 22px 0; box-shadow: var(--shadow); }
.wb-group { border: 0; padding: 0; margin: 0 0 18px; }
.wb-group legend { font-weight: 750; margin-bottom: 8px; }
.wb-types { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.wb-type { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 600; }
.wb-type:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.wb-type input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.wb-type small { display: block; color: var(--muted); font-weight: 400; }
.wb-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin: 6px 0 14px; }
.wb-row .field { width: 100%; }
.wb-quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.wb-quick button { font: inherit; font-size: .88rem; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); cursor: pointer; }
.wb-total { font-weight: 700; color: var(--brand); }
.ws-permalink { margin: 0 0 18px; }
.ws-permalink label { display: block; font-size: .9rem; color: var(--muted); margin-bottom: 6px; }
.ws-permalink input { width: 100%; font-size: .9rem; }

/* Report a problem */
.report { margin: 10px 0 0; font-size: .85rem; }
.report a { color: var(--muted); }

/* Certificate */
.cert-tools { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; }
.cert-tools h1 { font-size: 1.6rem; margin: 0 0 4px; }
.cert-row { display: flex; flex-wrap: wrap; gap: 10px; }
.cert-row input { flex: 1 1 220px; }
.cert { background: #fff; color: #18202e; border: 3px solid #2346a0; border-radius: 18px; padding: 10px; max-width: 980px; margin: 0 auto; }
.cert-inner { border: 1.5px dashed #c9821c; border-radius: 12px; padding: clamp(24px, 6vw, 56px) clamp(16px, 5vw, 56px); text-align: center; }
.cert-brand { font-weight: 800; letter-spacing: .02em; color: #2346a0; font-size: 1.2rem; margin: 0; }
.cert-kicker { font-size: clamp(1.6rem, 5vw, 2.8rem); font-weight: 800; margin: 10px 0 18px; }
.cert-small { color: #5a6475; margin: 0; }
.cert-name { font-size: clamp(1.8rem, 6vw, 3.2rem); font-weight: 700; color: #2346a0; border-bottom: 2px solid #c9821c; display: inline-block; min-width: min(70%, 520px); margin: 8px 0 18px; padding: 0 12px 4px; }
.cert-what { font-size: clamp(1rem, 2.6vw, 1.3rem); max-width: 640px; margin: 0 auto 10px; }
.cert-praise { font-weight: 700; color: #c9821c; font-size: 1.1rem; margin: 0 0 26px; }
.cert-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #5a6475; font-size: .9rem; }
.cert-mark { color: #2346a0; }
@media print {
  .cert { border-width: 3px; break-inside: avoid; }
  .cert, .cert * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Glossary */
.gl-index { line-height: 2; }
.glossary { margin: 18px 0 30px; }
.glossary dt { font-weight: 750; font-size: 1.1rem; margin-top: 22px; scroll-margin-top: 80px; }
.glossary dd { margin: 6px 0 0; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
