/* Public site styles. Hand-written, no framework: these pages are ranked partly
   on how fast they render, and a content site needs almost none of a framework.

   Structure:
     1. tokens (light, then a single dark override)
     2. base elements + typography
     3. layout containers
     4. header / footer
     5. shared components (buttons, cards, lists, tags, tables, pager)
     6. question-page components
     7. homepage sections (namespaced .hero-* .sec-* .step-* .feat-* .stat-*
        .road-* .price-* .faq-* .mock-*)

   Brand anchor is indigo #4f46e5, shared with the admin console (/admin) and
   the student app (/app) so the three surfaces read as one product. The dark
   palette is lifted from web-student/src/App.css, where it was already checked
   for lightness banding and colour-vision separation. */

/* --- 1. tokens ----------------------------------------------------------- */

:root {
  color-scheme: light;

  --ink: #0f1020;
  --ink-2: #3f4155;
  --muted: #6b6e80;

  --line: #e6e7ef;
  --line-2: #d7d9e6;

  --bg: #f7f8fb;
  --card: #ffffff;
  --tint: #f2f3f9;

  --brand: #4f46e5;
  --brand-dark: #4338ca;
  --brand-soft: #eef2ff;
  --brand-line: #dcdcf5;
  --on-brand: #ffffff;

  /* Used sparingly: stat rules, chips, the hero mock. Never for body text --
     it does not reach 4.5:1 on white and is not meant to. */
  --accent: #47bfff;

  --good: #047857;
  --good-soft: #f2fbf6;
  --good-line: #bfe3d1;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --danger: #b91c1c;

  --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-2: 0 8px 24px rgba(16, 24, 40, 0.07);
  --shadow-3: 0 18px 48px rgba(16, 24, 40, 0.10);

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 999px;

  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 72px;
  --s9: 96px;

  /* Reading measure for article-shaped pages; the landing page opts into the
     wider one per section. */
  --wrap: 860px;
  --wrap-wide: 1120px;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --ink: #e8e9f0;
    --ink-2: #c3c7ce;
    --muted: #9599a8;

    --line: #2e2e3b;
    --line-2: #3d3d4c;

    --bg: #131319;
    --card: #1c1c25;
    --tint: #20202a;

    --brand: #8b87f5;
    --brand-dark: #a5a1ff;
    --brand-soft: #23233a;
    --brand-line: #383858;
    --on-brand: #14142a;

    --accent: #6ecbff;

    --good: #34d399;
    --good-soft: #12271f;
    --good-line: #1f5344;
    --warn: #fbbf24;
    --warn-soft: #2a2113;
    --danger: #fca5a5;

    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.32);
    --shadow-2: 0 8px 24px rgba(0, 0, 0, 0.38);
    --shadow-3: 0 18px 48px rgba(0, 0, 0, 0.46);
  }
}

/* --- 2. base ------------------------------------------------------------- */

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Nothing on any page may cause a sideways scrollbar. */
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

img { max-width: 100%; }

/* One visible focus style for everything, so keyboard users are never lost. */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

::selection { background: var(--brand-soft); color: var(--ink); }

/* Offscreen until focused: the first Tab on any page jumps past the header.
   Clipped to a 1px box rather than pushed to left:-9999px -- a far-offscreen
   box is a classic source of phantom horizontal scroll. */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  left: 0;
  top: 0;
  z-index: 100;
  background: var(--brand);
  color: var(--on-brand);
  padding: 10px 16px;
  border-radius: 0 0 var(--r-sm) 0;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus {
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
  color: var(--on-brand);
}

h1, h2, h3 {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.16; margin: var(--s5) 0 var(--s3); }
h2 { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.24; margin: var(--s6) 0 var(--s3); }
h3 { font-size: 19px; line-height: 1.35; margin: var(--s5) 0 var(--s2); }

p { text-wrap: pretty; }

.lede {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.6;
  color: var(--ink-2);
  letter-spacing: -0.005em;
}

.muted { color: var(--muted); }
.empty { color: var(--muted); }

/* --- 3. layout ----------------------------------------------------------- */

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s5); }
.wrap-wide { max-width: var(--wrap-wide); margin: 0 auto; padding: 0 var(--s5); }

/* The landing page opts out of the reading measure so its sections can run
   full-bleed; each section re-establishes its own container inside. */
.page-wide { display: block; }

/* --- 4. header / footer -------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
/* color-mix is widely supported but not universal; without it the bar is just
   opaque, which is a fine outcome rather than a transparent unreadable one. */
@supports not (background: color-mix(in srgb, red 50%, transparent)) {
  .site-header { background: var(--bg); }
}

.site-header-in {
  display: flex;
  align-items: center;
  gap: var(--s5);
  max-width: var(--wrap-wide);
  margin: 0 auto;
  padding: var(--s3) var(--s5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-weight: 750;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}
.brand:hover { color: var(--ink); }
.brand-mark { display: block; width: 22px; height: 22px; color: var(--brand); }
.brand-mark svg { display: block; width: 100%; height: 100%; }

.site-nav { display: flex; gap: var(--s5); flex-wrap: wrap; align-items: center; }
.site-nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 1.5px solid transparent;
}
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--brand); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brand); }

.header-cta { margin-left: auto; display: flex; align-items: center; gap: var(--s3); }

/* CSS-only mobile navigation. <details> is used rather than a checkbox hack so
   it is keyboard-operable and announced without a line of JavaScript. */
.nav-mobile { display: none; margin-left: auto; position: relative; }
.nav-mobile > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--card);
  color: var(--ink);
}
.nav-mobile > summary::-webkit-details-marker { display: none; }
.nav-mobile > summary::marker { content: ""; }
.nav-mobile[open] > summary { background: var(--brand-soft); border-color: var(--brand-line); }
.nav-mobile-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 210px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-3);
  padding: var(--s2);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-mobile-panel a {
  padding: 10px 12px;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  text-decoration: none;
  font-size: 15px;
}
.nav-mobile-panel a:hover { background: var(--tint); color: var(--ink); }
.nav-mobile-panel .cta { margin-top: var(--s2); text-align: center; }

.site-footer {
  margin-top: var(--s9);
  padding: var(--s7) 0 var(--s7);
  border-top: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  font-size: 14px;
}
.footer-cols {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: var(--s6);
  max-width: var(--wrap-wide);
  margin: 0 auto;
  padding: 0 var(--s5);
}
.footer-about p { margin: var(--s3) 0 0; max-width: 34ch; line-height: 1.6; }
.footer-col h2 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0 0 var(--s3);
}
.footer-col nav { display: flex; flex-direction: column; gap: var(--s2); }
.footer-col a { color: var(--muted); text-decoration: none; }
.footer-col a:hover { color: var(--brand); text-decoration: underline; }
.footer-base {
  max-width: var(--wrap-wide);
  margin: var(--s7) auto 0;
  padding: var(--s5) var(--s5) 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3) var(--s5);
  justify-content: space-between;
  font-size: 13px;
}
.footer-base p { margin: 0; }

/* --- 5. shared components ------------------------------------------------ */

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  background: var(--brand);
  color: var(--on-brand);
  text-decoration: none;
  padding: 12px 22px;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  border: 1px solid transparent;
  box-shadow: var(--shadow-1);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.cta:hover {
  background: var(--brand-dark);
  color: var(--on-brand);
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
}
.cta:active { transform: translateY(0); }

.cta-sm { padding: 8px 15px; font-size: 14px; }

.cta-ghost {
  background: var(--card);
  color: var(--brand);
  border-color: var(--line-2);
  box-shadow: none;
}
.cta-ghost:hover { background: var(--brand-soft); color: var(--brand-dark); }

.cta-lg { padding: 14px 28px; font-size: 16px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: var(--s5);
  margin: var(--s4) 0;
}
a.card {
  display: block;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
a.card:hover {
  border-color: var(--brand-line);
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
  color: var(--ink);
}

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s4); }

.q-list { list-style: none; padding: 0; margin: var(--s5) 0; }
.q-list li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: var(--s4);
  margin-bottom: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.q-list li:hover { border-color: var(--brand-line); box-shadow: var(--shadow-1); }
.q-list a { text-decoration: none; font-weight: 600; }
.q-list a:hover { text-decoration: underline; }
.q-meta { color: var(--muted); font-size: 13px; margin-top: var(--s1); }

.tag-row { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 10px 0 0; }
.tag {
  background: var(--brand-soft);
  color: var(--brand-dark);
  border: 1px solid var(--brand-line);
  border-radius: var(--r-full);
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
}
.tag:hover { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); }

.crumbs { font-size: 13px; color: var(--muted); margin: var(--s4) 0 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-2); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }

.pager { display: flex; gap: 10px; align-items: center; margin: var(--s6) 0; }
.pager a {
  border: 1px solid var(--line-2);
  background: var(--card);
  color: var(--ink-2);
  border-radius: var(--r-sm);
  padding: 8px 14px;
  text-decoration: none;
  font-weight: 500;
}
.pager a:hover { border-color: var(--brand); color: var(--brand); }
.pager .muted { color: var(--muted); font-size: 14px; }

table.plain { border-collapse: collapse; width: 100%; font-size: 15px; }
table.plain th, table.plain td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
}
table.plain th { color: var(--ink-2); font-weight: 600; }

/* --- 6. question page ---------------------------------------------------- */

.q-stem { font-size: 17px; }
.q-stem p { margin: 10px 0; }

.q-options { list-style: none; padding: 0; margin: var(--s4) 0; }
.q-options li {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  margin-bottom: var(--s2);
  background: var(--card);
}
.q-options .label { font-weight: 700; margin-right: var(--s2); color: var(--ink-2); }
/* Correctness is never colour-alone: the row also carries the word "Correct". */
.q-options li.correct { border-color: var(--good-line); background: var(--good-soft); }
.correct-badge {
  color: var(--good);
  font-weight: 700;
  font-size: 12px;
  margin-left: var(--s2);
}
.answer-box {
  background: var(--good-soft);
  border: 1px solid var(--good-line);
  border-radius: var(--r-sm);
  padding: var(--s3) var(--s4);
  margin: var(--s5) 0;
}
.answer-box strong { color: var(--good); }

.q-fig {
  max-width: 100%;
  height: auto;
  display: block;
  margin: var(--s3) 0;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: #fff;
}

.q-math { margin: var(--s3) 0; overflow-x: auto; }
.math svg { vertical-align: middle; max-width: 100%; }
.math-raw {
  background: var(--tint);
  border-radius: var(--r-sm);
  padding: 1px 6px;
  font-size: 13px;
}

/* The signup gate on a question's full solution. */
.gate {
  border: 1px solid var(--brand-line);
  background: linear-gradient(180deg, var(--card) 0%, var(--brand-soft) 100%);
  border-radius: var(--r);
  padding: var(--s5);
  margin: var(--s5) 0;
}
.gate h2 { margin-top: 0; font-size: 19px; }
.gate p { color: var(--ink-2); margin: 6px 0 var(--s4); }

/* --- 7. homepage --------------------------------------------------------- */
/* Everything below is namespaced to the landing page. Section bands run
   full-bleed and re-establish their own container (.wrap-wide) inside, which is
   why the home route renders with variant:'wide'. */

.ico { width: 20px; height: 20px; flex: 0 0 auto; }

.sec { padding: var(--s8) 0; }
.sec + .sec { padding-top: 0; }

/* A tinted full-bleed band. Two in a row would stripe the page, so they are
   deliberately placed apart. */
.sec-band {
  background: var(--tint);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: var(--s8) 0;
  margin-top: var(--s8);
}
.sec + .sec-band { margin-top: 0; }

.sec-title { margin: 0 0 var(--s3); }
.sec-lede {
  font-size: 17px;
  color: var(--ink-2);
  margin: 0 0 var(--s6);
  max-width: 62ch;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 var(--s4);
  padding: 5px 13px;
  border-radius: var(--r-full);
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* --- hero ---------------------------------------------------------------- */

.sec-hero {
  padding: var(--s8) 0 var(--s9);
  /* A single soft wash behind the hero, so the fold has depth without an
     image. Sits under the content and never intercepts a click. */
  background:
    radial-gradient(60ch 40ch at 12% -10%, var(--brand-soft) 0%, transparent 62%),
    radial-gradient(50ch 34ch at 96% 4%, color-mix(in srgb, var(--accent) 16%, transparent) 0%, transparent 58%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: var(--s8);
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(34px, 5.1vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.032em;
  margin: 0 0 var(--s4);
}
.hero-copy .lede { margin: 0 0 var(--s6); max-width: 52ch; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin: 0 0 var(--s5);
}

.hero-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3) var(--s5);
  padding: 0;
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}
.hero-chips li { display: inline-flex; align-items: center; gap: 6px; }
.hero-chips .ico { width: 16px; height: 16px; color: var(--good); }

.hero-figure { margin: 0; }
.hero-figcap {
  margin-top: var(--s3);
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

/* --- the hero product mock ----------------------------------------------- */
/* A drawing of the result view, not a screenshot: no asset to serve, nothing
   to re-export when the UI moves, and it reflows on a phone. */

.mock {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-3);
  overflow: hidden;
}
.mock-head {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 10px var(--s4);
  background: var(--tint);
  border-bottom: 1px solid var(--line);
}
.mock-dots { display: flex; gap: 6px; }
.mock-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.mock-head-title { font-size: 12.5px; color: var(--muted); font-weight: 500; }

.mock-body { padding: var(--s5); }

.mock-score { display: flex; align-items: center; gap: var(--s4); }
.mock-ring {
  position: relative;
  width: 76px;
  height: 76px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: conic-gradient(var(--brand) calc(var(--pct) * 1%), var(--line) 0);
  display: grid;
  place-items: center;
}
.mock-ring::after {
  content: "";
  position: absolute;
  inset: 9px;
  background: var(--card);
  border-radius: 50%;
}
.mock-ring-val {
  position: relative;
  /* The ::after disc that punches the hole is painted after this element, so
     without a stacking bump it hides the number it is meant to frame. */
  z-index: 1;
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.mock-ring-val small { font-size: 12px; font-weight: 600; color: var(--muted); }
.mock-score-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mock-score-meta strong { font-size: 20px; letter-spacing: -0.02em; }
.mock-score-meta span { font-size: 13px; color: var(--muted); }

.mock-rows { margin-top: var(--s5); display: flex; flex-direction: column; gap: 10px; }
.mock-row { display: grid; grid-template-columns: 1fr 96px 34px; align-items: center; gap: var(--s3); }
/* min-width:0 is load-bearing: a grid item defaults to min-width:auto, which
   refuses to shrink below its text and would push the card wider than a narrow
   phone before the ellipsis ever kicks in. */
.mock-row-name { min-width: 0; font-size: 13.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mock-bar { display: block; height: 7px; border-radius: var(--r-full); background: var(--line); overflow: hidden; }
.mock-bar-fill { display: block; height: 100%; border-radius: var(--r-full); }
/* The percentage is printed beside every bar, so colour is never the only
   channel carrying the meaning. */
.mock-bar-fill.is-ok { background: var(--good); }
.mock-bar-fill.is-mid { background: var(--warn); }
.mock-bar-fill.is-low { background: var(--danger); }
.mock-row-pct { font-size: 12.5px; font-weight: 600; color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }

.mock-insight {
  display: flex;
  gap: var(--s2);
  align-items: flex-start;
  margin: var(--s5) 0 0;
  padding: var(--s3) var(--s4);
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  border-radius: var(--r-sm);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-2);
  /* The balanced wrapping inherited from `p` breaks this sentence into ragged
     column-like fragments around the bold run. Plain wrapping reads better. */
  text-wrap: normal;
}
.mock-insight-ico { color: var(--brand); margin-top: 1px; }
.mock-insight > span { min-width: 0; }
.mock-insight b { color: var(--ink); }

/* --- stat strip ---------------------------------------------------------- */

.sec-stats { padding: 0; }
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--s5);
  margin: 0;
  padding: var(--s6) var(--s5);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}
.stat { text-align: center; }
.stat dt { font-size: 13px; color: var(--muted); order: 2; margin-top: 2px; }
.stat dd {
  order: 1;
  margin: 0;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat { display: flex; flex-direction: column; }

/* --- how it works -------------------------------------------------------- */

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--s6);
}
.step { position: relative; }
.step-n {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-full);
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 700;
  font-size: 15px;
}
.step h3 { margin: var(--s3) 0 var(--s2); }
.step p { margin: 0; color: var(--ink-2); font-size: 15px; }
/* The connector rule that ties the three steps together. Hidden as soon as
   they stop sitting on one row, where it would point at nothing. */
@media (min-width: 860px) {
  .step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 17px;
    left: 46px;
    right: calc(var(--s6) * -1 + 12px);
    height: 1px;
    background: var(--line-2);
  }
}

/* --- feature grid -------------------------------------------------------- */

.feats {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s4);
}
.feat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: var(--s5);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.feat:hover { border-color: var(--brand-line); box-shadow: var(--shadow-2); }
.feat-ico {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--brand-soft);
  color: var(--brand);
  border: 1px solid var(--brand-line);
}
.feat h3 { margin: var(--s4) 0 var(--s2); font-size: 17px; }
.feat p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.6; }

/* --- free tests ---------------------------------------------------------- */

.tests {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--s4);
}
.test-card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s4);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: var(--s5);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.test-card:hover { border-color: var(--brand-line); box-shadow: var(--shadow-2); }
.test-main { min-width: 0; }
.test-card h3 { margin: 0; font-size: 19px; letter-spacing: -0.015em; }
.test-detail { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.test-meta {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s3);
  padding: 0;
  margin: var(--s3) 0 0;
  font-size: 13px;
  color: var(--ink-2);
}
/* A dot between the facts, drawn rather than typed: source files stay ASCII. */
.test-meta li + li::before { content: ""; display: inline-block; width: 3px; height: 3px;
  border-radius: 50%; background: var(--line-2); vertical-align: 3px; margin-right: var(--s3); }
.test-secs { margin: var(--s2) 0 0; font-size: 13px; color: var(--muted); }

/* --- analytics band ------------------------------------------------------ */

.band-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s8); align-items: start; }
.band-note {
  font-size: 14.5px;
  color: var(--muted);
  border-left: 2px solid var(--brand-line);
  padding-left: var(--s4);
  margin: 0;
}
.insights { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--s3); }
.insights li {
  display: flex;
  gap: var(--s3);
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: var(--s4);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-2);
}
.insights .ico { color: var(--brand); margin-top: 3px; }

/* --- subjects ------------------------------------------------------------ */

/* auto-FILL, not auto-fit: with only two or three subjects published, auto-fit
   would stretch each card to half the page and make the section look emptier
   than it is. Empty tracks are the better failure. */
.subj-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.subj { margin: 0; }
.subj strong { display: block; font-size: 17px; letter-spacing: -0.01em; }

/* --- roadmap ------------------------------------------------------------- */

.chip {
  display: inline-block;
  vertical-align: 2px;
  margin-left: var(--s2);
  padding: 2px 9px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.chip-live { background: var(--good-soft); color: var(--good); border: 1px solid var(--good-line); }
.chip-planned { background: var(--tint); color: var(--muted); border: 1px solid var(--line-2); }

.road {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--s6);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--s4);
}
.road-item {
  display: flex;
  gap: var(--s4);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: var(--s4) var(--s5);
}
/* A planned phase is visibly quieter than a shipped one, on top of saying so. */
.road-item.is-planned { background: transparent; border-style: dashed; }
.road-n {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--r-full);
  border: 1px solid var(--line-2);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.road-item.is-live .road-n { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.road-txt h3 { margin: 2px 0 var(--s1); font-size: 16px; }
.road-txt p { margin: 0; font-size: 14px; color: var(--ink-2); }
.road-foot { font-size: 14.5px; color: var(--ink-2); margin: 0; }
.road-foot strong { color: var(--ink); }

/* --- pricing teaser ------------------------------------------------------ */

.prices { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.price {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s6);
}
.price-now { border-color: var(--brand-line); box-shadow: var(--shadow-2); }
.price-soon { background: transparent; border-style: dashed; }
.price h3 { margin: 0; font-size: 20px; }
.price-tag { margin: var(--s1) 0 var(--s4); color: var(--muted); font-size: 14px; }
.price p { color: var(--ink-2); font-size: 14.5px; }
.price-list { list-style: none; padding: 0; margin: 0 0 var(--s5); display: flex; flex-direction: column; gap: 10px; }
.price-list li { display: flex; gap: var(--s2); align-items: flex-start; font-size: 14.5px; color: var(--ink-2); }
.price-list .ico { width: 17px; height: 17px; color: var(--good); margin-top: 3px; }

/* --- FAQ ----------------------------------------------------------------- */

.faq { max-width: var(--wrap); }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item > summary {
  list-style: none;
  cursor: pointer;
  padding: var(--s4) var(--s7) var(--s4) 0;
  font-weight: 600;
  font-size: 16.5px;
  color: var(--ink);
  position: relative;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::marker { content: ""; }
/* A CSS-drawn plus that becomes a minus when open -- no icon font, no script. */
.faq-item > summary::after {
  content: "+";
  position: absolute;
  right: var(--s3);
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1;
}
.faq-item[open] > summary::after { content: "-"; }
.faq-item > summary:hover { color: var(--brand); }
.faq-item p { margin: 0 0 var(--s5); color: var(--ink-2); font-size: 15px; max-width: 70ch; }

/* --- closing CTA --------------------------------------------------------- */

.sec-cta { padding-bottom: 0; }
/* Fixed indigo rather than var(--brand): this band is always dark, in both
   colour schemes, so white text on it is always the readable choice. */
.cta-band {
  background: linear-gradient(135deg, #4f46e5 0%, #6d5cf0 55%, #7c5cf5 100%);
  border-radius: var(--r-xl);
  padding: var(--s8) var(--s6);
  text-align: center;
  color: #fff;
}
.cta-band h2 { color: #fff; margin: 0 auto var(--s3); max-width: 22ch; }
.cta-band p { color: rgba(255, 255, 255, 0.88); margin: 0 auto var(--s5); max-width: 56ch; font-size: 16px; }
.cta-band p:last-child { margin-bottom: 0; }
.cta-band .cta { background: #fff; color: #3b32c9; box-shadow: var(--shadow-2); }
.cta-band .cta:hover { background: #f3f2ff; color: #3b32c9; }
.cta-band :focus-visible { outline-color: #fff; }

/* --- homepage responsive ------------------------------------------------- */

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--s7); }
  .hero-copy h1 { font-size: clamp(32px, 7vw, 44px); }
  .hero-figure { max-width: 520px; }
  .band-grid { grid-template-columns: 1fr; gap: var(--s6); }
  .prices { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .sec, .sec-band { padding: var(--s7) 0; }
  .sec-band { margin-top: var(--s7); }
  .sec + .sec { padding-top: 0; }
  .sec-hero { padding: var(--s6) 0 var(--s7); }
  .cta-band { padding: var(--s7) var(--s5); border-radius: var(--r-lg); }
  .mock-row { grid-template-columns: 1fr 72px 32px; }
}

/* --- responsive ---------------------------------------------------------- */

@media (max-width: 900px) {
  .footer-cols { grid-template-columns: 1fr 1fr; gap: var(--s5); }
  .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .site-nav, .header-cta { display: none; }
  .nav-mobile { display: block; }
  .site-header-in { padding: 10px var(--s4); }
  .wrap, .wrap-wide { padding: 0 var(--s4); }
}

@media (max-width: 520px) {
  .footer-cols { grid-template-columns: 1fr; }
  .footer-base { flex-direction: column; gap: var(--s2); }
}

/* Motion is decoration here: every transition above is a nicety, so removing
   them all costs the page nothing. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .cta:hover, a.card:hover { transform: none; }
}

@media print {
  .site-header, .site-footer, .cta, .gate { display: none; }
  body { background: #fff; }
}
