/* GroundCheck site.
 *
 * Principles, carried over from the product dashboard:
 *   - Colour means status only. Pass is green, refuse is red, not reached is
 *     grey. Nothing else on the page is coloured, so a red mark always means a
 *     refusal.
 *   - One typeface family, Atkinson Hyperlegible, designed for low-vision
 *     readers. The Mono cut is reserved for real data: IDs, timings, code.
 *   - Left aligned, hairline structure, no decorative cards.
 */

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/fonts/atkinson-hyperlegible-next-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  src: url("/fonts/atkinson-hyperlegible-mono-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root{
  --ground: #f5f7f6;
  --surface: #ffffff;
  --ink: #0f2622;
  --text: #1c2b28;
  --muted: #4f5f5b;
  --line: #d6dedb;
  --line-strong: #b9c5c1;
  --code-bg: #eaefed;

  --pass: #17784a;
  --pass-bg: #e3f3ea;
  --fail: #b8241c;
  --fail-bg: #fbe9e7;
  --skip: #8d9894;       /* the not-reached marker ring */
  --skip-text: #66726e;  /* not-reached text, 4.5:1 or better on surface */

  --btn-bg: #0f2622;
  --btn-text: #ffffff;
  --btn-hover: #1d3d37;

  --font-sans: "Atkinson Hyperlegible Next", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Atkinson Hyperlegible Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Type scale: a perfect fourth (1.333) from a 17px base. */
  --step--1: 0.8125rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.2vw, 1.9rem);
  --step-3: clamp(1.9rem, 1.4rem + 2vw, 2.5rem);
  --step-4: clamp(2.5rem, 1.6rem + 3.6vw, 4.2rem);

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --maxw: 90rem; /* Layout width. Paragraphs keep their own measure below. */
  --radius: 6px;
}

@media (prefers-color-scheme: dark) {
  :root{
    --ground: #0c1513;
    --surface: #121e1b;
    --ink: #e8f0ed;
    --text: #d3ddda;
    --muted: #9aa9a5;
    --line: #25332f;
    --line-strong: #374843;
    --code-bg: #17231f;

    --pass: #56c28a;
    --pass-bg: #123224;
    --fail: #ff7b6e;
    --fail-bg: #3a1714;
    --skip: #66746f;
    --skip-text: #8f9d98;

    --btn-bg: #e8f0ed;
    --btn-text: #0c1513;
    --btn-hover: #c9d6d2;
  }
}

/* ---------- Base ---------- */

*,
*::before,
*::after{ box-sizing: border-box; }

[hidden]{ display: none !important; }

html{
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body{
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3{
  color: var(--ink);
  margin: 0;
  font-weight: 700;
  text-wrap: balance;
}

p{ margin: 0; text-wrap: pretty; }

a{ color: var(--ink); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover{ text-decoration-thickness: 2px; }

:focus-visible{
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

code, .mono{ font-family: var(--font-mono); font-size: 0.9em; }

:not(pre) > code{
  background: var(--code-bg);
  padding: 0.08em 0.35em;
  border-radius: 4px;
  overflow-wrap: anywhere;
}

.wrap{
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px));
}

.visually-hidden{
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link{
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  background: var(--btn-bg);
  color: var(--btn-text);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius);
}
.skip-link:focus{ top: 1rem; }

.icon{ width: 1.05em; height: 1.05em; fill: currentColor; flex: none; }

/* ---------- Buttons ---------- */

.btn{
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.btn-primary{ background: var(--btn-bg); color: var(--btn-text); }
.btn-primary:hover{ background: var(--btn-hover); }

.btn-secondary{ background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover{ border-color: var(--ink); }

.btn-github{
  min-height: 2.25rem;
  padding: 0.35rem 0.8rem;
  font-size: var(--step--1);
  background: var(--btn-bg);
  color: var(--btn-text);
}
.btn-github:hover{ background: var(--btn-hover); }

/* ---------- Header ---------- */

.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner{
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 3.75rem;
}

.brand{
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-mark{
  width: 1.5rem; height: 1.5rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-nav{
  display: flex;
  gap: 1.4rem;
  margin-left: auto;
  font-size: 0.95rem;
}
.site-nav a{
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem; /* A full touch target on tablets, where the nav shows. */
  color: var(--muted);
  text-decoration: none;
}
.site-nav a:hover{ color: var(--ink); }

@media (max-width: 64rem) {
  .site-nav{ display: none; }
  .btn-github{ margin-left: auto; }
}
.site-nav a[aria-current="true"]{ color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.5em; }

/* ---------- Hero ---------- */

.hero{ padding-block: clamp(2rem, 4vw, 3.5rem) clamp(3rem, 6vw, 5rem); }

.hero-grid{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  /* Top-aligned: centring against the taller record pushed the headline
   * down and left a band of empty space under the header. */
  align-items: start;
}

@media (max-width: 60rem) {
  .hero-grid{ grid-template-columns: minmax(0, 1fr); }
}

.hero h1{
  font-size: var(--step-4);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 14ch;
}

.lede{
  margin-top: 1.25rem;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--text);
  max-width: 34rem;
}

.actions{ display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

.fineprint{ margin-top: 1rem; font-size: 0.95rem; color: var(--muted); }

/* The audit record: a real trace, set like a lab result sheet. */

.record{
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgb(15 38 34 / 0.28);
  overflow: hidden;
}

.record-head{
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1.25rem;
  border-bottom: 1px solid var(--line);
  font-size: var(--step--1);
  color: var(--muted);
}

.record-question{
  padding: 1rem 1.25rem 0.9rem;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.4;
  border-bottom: 1px solid var(--line);
}

.trace{ list-style: none; margin: 0; padding: 0.4rem 0; }

.stage{
  display: grid;
  grid-template-columns: 1.25rem 9.5rem minmax(0, 1fr) 3rem;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.34rem 1.25rem;
  font-size: 0.93rem;
  line-height: 1.35;
}

.stage-name{ color: var(--ink); font-weight: 700; }
.stage-detail{ color: var(--muted); min-width: 0; }
.stage-ms{ text-align: right; color: var(--muted); font-size: var(--step--1); font-variant-numeric: tabular-nums; }

.flag{
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  align-self: center;
  justify-self: center;
}

.stage[data-status="pass"] .flag{ background: var(--pass); }
.stage[data-status="info"] .flag{ background: var(--pass); }
.stage[data-status="fail"]{ background: var(--fail-bg); }
.stage[data-status="fail"] .flag{ background: var(--fail); border-radius: 2px; transform: rotate(45deg); }
.stage[data-status="fail"] .stage-detail{ color: var(--fail); font-weight: 700; }
.stage[data-status="skip"] .flag{ background: transparent; border: 1.5px solid var(--skip); }
.stage[data-status="skip"] .stage-name,
.stage[data-status="skip"] .stage-detail,
.stage[data-status="skip"] .stage-ms{ color: var(--skip-text); font-weight: 400; }

@media (max-width: 34rem) {
  .stage{ grid-template-columns: 1rem minmax(0, 1fr) 2.5rem; row-gap: 0; }
  .stage-name{ grid-column: 2; }
  .stage-ms{ grid-column: 3; grid-row: 1; }
  .stage-detail{ grid-column: 2 / 4; font-size: var(--step--1); }
}

.verdict{
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1rem;
  padding: 0.95rem 1.25rem;
  border-top: 1px solid var(--line);
}

.verdict-word{
  color: var(--fail);
  font-weight: 800;
  font-size: var(--step-1);
  letter-spacing: -0.01em;
}
.verdict-reason{ color: var(--text); font-size: 0.95rem; }
.record[data-decision="answer"] .verdict-word{ color: var(--pass); }

.record-controls{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.6rem 1.25rem;
  border-top: 1px solid var(--line);
}
.record-controls[hidden]{ display: none; }
.record-runs{ display: flex; gap: 0.35rem; }
.record-run,
.record-pause{
  font: inherit;
  font-size: var(--step--1);
  font-weight: 700;
  min-height: 2.25rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.record-run:hover,
.record-pause:hover{ color: var(--ink); border-color: var(--ink); }
.record-run[aria-pressed="true"]{ color: var(--btn-text); background: var(--btn-bg); border-color: var(--btn-bg); }

.record figcaption{
  padding: 0.8rem 1.25rem 1rem;
  font-size: var(--step--1);
  color: var(--muted);
  background: var(--ground);
  border-top: 1px solid var(--line);
}

/* The one orchestrated motion on the page: the record alternates between a
 * refused run and an answered run, replaying each trace stage by stage. It
 * pauses on request, off screen and in background tabs. With reduced motion
 * or without JavaScript, the refused run is shown in full, and the run
 * buttons switch runs without animation. */
.record.is-replaying .stage,
.record.is-replaying .verdict{ opacity: 0; }
.record .trace,
.record .record-question,
.record .verdict{ transition: opacity 220ms ease-out; }
.record.is-switching .trace,
.record.is-switching .record-question,
.record.is-switching .verdict{ opacity: 0; }
.record.is-replaying .stage.is-shown,
.record.is-replaying .verdict.is-shown{ opacity: 1; transition: opacity 180ms ease-out; }

/* ---------- Sections ---------- */

.section{ padding-block: clamp(3.5rem, 8vw, 6rem); }
.section-rule{ border-top: 1px solid var(--line); }

.section-intro{ max-width: 44rem; margin-bottom: clamp(2rem, 5vw, 3.25rem); }
.section-intro h2{
  font-size: var(--step-3);
  line-height: 1.12;
  letter-spacing: -0.025em;
}
.section-intro p{ margin-top: 1rem; font-size: 1.125rem; color: var(--text); }

#idea .section-intro{ max-width: 52rem; }

.note{ margin-top: 2rem; font-size: 0.95rem; color: var(--muted); max-width: 48rem; }

.specimen{
  margin-top: 1rem;
  display: grid;
  gap: 0.5rem;
}
.specimen-row{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.6rem;
  font-size: 0.95rem;
}
.specimen-row code{ background: var(--code-bg); }
.specimen-row .canon{ background: var(--surface); border: 1px solid var(--line-strong); }
.arrow{ color: var(--muted); }

.tag{
  font-size: var(--step--1);
  font-weight: 700;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}
.tag-pass{ color: var(--pass); background: var(--pass-bg); }
.tag-fail{ color: var(--fail); background: var(--fail-bg); }

/* Evaluation */

.misses{
  border-left: 3px solid var(--fail);
  padding-left: 1.25rem;
}
.misses h3{ font-size: var(--step-1); }
.misses > p{ margin-top: 0.5rem; color: var(--text); font-size: 0.98rem; }
.miss-list{ list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: 1rem; }
.miss-list li{ display: grid; gap: 0.35rem; font-size: 0.95rem; }
.miss-list span{ color: var(--muted); }

/* Adapt */

.adapt-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.75rem clamp(2rem, 5vw, 4rem);
}
@media (max-width: 48rem) {
  .adapt-grid{ grid-template-columns: minmax(0, 1fr); }
}
.adapt h3{ font-size: var(--step-1); }
.adapt p{ margin-top: 0.5rem; }

.code{
  margin: 1rem 0 0;
  padding: 1rem 1.1rem;
  background: var(--code-bg);
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ink);
  tab-size: 2;
}
.code code{ font-size: inherit; }

/* Tour: a tablist of dashboard views beside a light box. Without
 * JavaScript the tabs stay hidden and every screenshot is shown in order. */

.tour{
  display: grid;
  gap: 2rem;
}
.tour.is-tabbed{
  grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.tour-tabs{ display: grid; gap: 0.25rem; }

.tour-tab{
  display: grid;
  gap: 0.15rem;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  border-left: 3px solid var(--line);
  padding: 0.75rem 0.9rem;
  cursor: pointer;
}
.tour-tab:hover{ border-left-color: var(--line-strong); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.tour-tab[aria-selected="true"]{ border-left-color: var(--ink); background: var(--surface); }
.tour-tab-title{ font-weight: 700; color: var(--ink); }
.tour-tab-desc{ font-size: 0.93rem; color: var(--muted); line-height: 1.45; }

.tour-panels{ display: grid; gap: 3rem; min-width: 0; }
.tour.is-tabbed .tour-panels{ gap: 0; }

.tour-panel{ min-width: 0; }
.tour-figure{ margin: 0; }

.lightbox{
  --lightbox-pad: clamp(0.75rem, 2.5vw, 2rem);
  display: grid;
  place-items: center;
  padding: var(--lightbox-pad);
  overflow: hidden;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
}
/* Keep the view list in reach while a tall screenshot scrolls past. */
.tour.is-tabbed .tour-tabs{ position: sticky; top: calc(4.5rem + env(safe-area-inset-top, 0px)); }

.lightbox img{
  display: block;
  max-width: 100%;
  /* Shown at its natural size (captured at 2x, declared at 1x) or narrower,
   * never shrunk to a fixed height, so tall panels stay readable. The box
   * grows with the image. */
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 1px 0 var(--line), 0 14px 32px -20px rgb(15 38 34 / 0.35);
  background: #fff;
}

/* The link wraps the image without changing its size, so the height cap on
 * the image still applies. */
.lightbox-link{ display: contents; cursor: zoom-in; }

.tour-panel figcaption{ margin-top: 0.75rem; font-size: 0.95rem; color: var(--muted); }
.tour-panel figcaption strong{ color: var(--ink); }
.tour.is-tabbed .tour-panel figcaption{ display: none; }

@media (max-width: 52rem) {
  .tour.is-tabbed{ grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .tour.is-tabbed .tour-tabs{
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }
  .tour.is-tabbed .tour-tab{
    flex: none;
    width: auto;
    min-height: 2.75rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: 0.5rem 0.95rem;
    scroll-snap-align: start;
  }
  .tour.is-tabbed .tour-tab[aria-selected="true"]{ border-color: var(--ink); background: var(--btn-bg); }
  .tour.is-tabbed .tour-tab[aria-selected="true"] .tour-tab-title{ color: var(--btn-text); }
  .tour.is-tabbed .tour-tab-desc{ display: none; }
  .tour.is-tabbed .tour-tabs{ position: static; }
  .tour.is-tabbed .tour-panel figcaption{ display: block; }
}

.callout-line{
  margin-top: 2.5rem;
  padding: 0.9rem 1.1rem;
  border-left: 3px solid var(--fail);
  background: var(--surface);
  max-width: 52rem;
}
.callout-line strong{ color: var(--ink); }

/* Corpus */

.corpus-grid{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.corpus-grid .section-intro{ margin-bottom: 0; }
.corpus-grid .section-intro p + p{ margin-top: 0.9rem; font-size: 1rem; }
@media (max-width: 60rem) {
  .corpus-grid{ grid-template-columns: minmax(0, 1fr); }
}

/* API */

.api-grid{
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 60rem) {
  .api-grid{ grid-template-columns: minmax(0, 1fr); }
}
.api-example{ display: grid; gap: 1.25rem; min-width: 0; }
.api-example .code-block{ margin-top: 0; }
.api-example .note{ margin-top: 0; }
.api-example .code-toolbar{ min-height: 2.8rem; }

.api-side h3{ font-size: var(--step-1); }
.api-side h3 + *{ margin-top: 0.75rem; }
.api-side h3:not(:first-child){ margin-top: 2.25rem; }

.endpoints{ margin: 0; }
.endpoints > div{
  display: grid;
  gap: 0.15rem;
  padding-block: 0.65rem;
  border-bottom: 1px solid var(--line);
}
.endpoints > div:first-child{ border-top: 1px solid var(--line); }
.endpoints dt code{ background: none; padding: 0; color: var(--ink); font-weight: 700; }
.endpoints dd{ margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Limitations */

.limits{
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
  gap: 0 clamp(2rem, 5vw, 4rem);
}
@media (max-width: 30rem) {
  .limits{ grid-template-columns: minmax(0, 1fr); }
}
.limits li{ padding-block: 1rem; border-top: 1px solid var(--line); }
.limits strong{ display: block; color: var(--ink); }

/* Roadmap: capabilities, available or planned. Deliberately unordered. */

.phases-roadmap{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
  gap: 2.75rem clamp(1.5rem, 3vw, 2.5rem);
}
@media (max-width: 30rem) {
  .phases-roadmap{ grid-template-columns: minmax(0, 1fr); }
}

.phase-card{ border-top: 1px solid var(--line-strong); padding-top: 1rem; }
.phase-card[data-state="available"]{ border-top: 3px solid var(--pass); padding-top: calc(1rem - 2px); }
.phase-head{ display: flex; }
.phase-card h3{ margin-top: 0.6rem; font-size: var(--step-1); line-height: 1.3; }
.phase-goal{ margin-top: 0.4rem; color: var(--text); }
.phase-card ul{ margin: 0.85rem 0 0; padding-left: 1.1rem; display: grid; gap: 0.4rem; font-size: 0.95rem; color: var(--text); }

.state{
  font-size: var(--step--1);
  font-weight: 700;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  white-space: nowrap;
}
.phase-card[data-state="available"] .state{ color: var(--pass); background: var(--pass-bg); border-color: transparent; }

.compliance{
  margin-top: clamp(3rem, 7vw, 4.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 2rem clamp(2rem, 6vw, 5rem);
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}
@media (max-width: 60rem) {
  .compliance{ grid-template-columns: minmax(0, 1fr); }
}
.compliance h3{ font-size: var(--step-2); line-height: 1.2; letter-spacing: -0.015em; }
.compliance p{ margin-top: 0.75rem; }
.compliance strong{ color: var(--ink); }

.standards{ margin: 0; }
.standards > div{
  display: grid;
  grid-template-columns: minmax(0, 10rem) minmax(0, 1fr);
  gap: 1rem;
  padding-block: 0.75rem;
  border-bottom: 1px solid var(--line);
}
.standards > div:first-child{ padding-top: 0; }
.standards > div:last-child{ border-bottom: 0; padding-bottom: 0; }
.standards dt{ font-weight: 700; color: var(--ink); }
.standards dd{ margin: 0; }
@media (max-width: 30rem) {
  .standards > div{ grid-template-columns: minmax(0, 1fr); gap: 0.2rem; }
}

/* FAQ */

.faq-grid{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 2rem clamp(2rem, 6vw, 5rem);
  align-items: start;
}
@media (max-width: 52rem) {
  .faq-grid{ grid-template-columns: minmax(0, 1fr); }
}
.faq-grid .section-intro{ margin-bottom: 0; }

.faq details{ border-top: 1px solid var(--line); }
.faq details:last-child{ border-bottom: 1px solid var(--line); }
.faq summary{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 3.25rem;
  padding-block: 0.9rem;
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker{ display: none; }
.faq summary::after{
  content: "+";
  flex: none;
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1;
  color: var(--muted);
}
.faq details[open] summary::after{ content: "−"; }
.faq details p{ padding-bottom: 1.1rem; max-width: 48rem; }

/* Get started */

.start-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem clamp(2rem, 5vw, 4rem);
}
@media (max-width: 52rem) {
  .start-grid{ grid-template-columns: minmax(0, 1fr); }
}
.start h3{ font-size: var(--step-1); }
.start > p{ margin-top: 0.75rem; font-size: 0.98rem; }

/* The copy button sits above the code, never over it, so a long line that
 * scrolls horizontally on a phone is never hidden behind it. */
.code-block{ display: grid; margin-top: 0.75rem; }
.code-block .code{ margin-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }

.code-toolbar{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.4rem 0.4rem 0.4rem 1.1rem;
  background: var(--code-bg);
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
  font-size: var(--step--1);
  color: var(--muted);
}

.copy{
  font: inherit;
  font-size: var(--step--1);
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  min-height: 2rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  cursor: pointer;
}
.copy:hover{ border-color: var(--ink); }

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html{ scroll-behavior: auto; }
  *, *::before, *::after{ transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- 404 ---------- */

.notfound-title{ font-size: var(--step-3); line-height: 1.12; letter-spacing: -0.025em; }

/* ---------- Training studio (planned) ---------- */

/* A drawn sketch, deliberately not styled like a real screenshot. */
.device-picker{ margin: clamp(2.5rem, 6vw, 3.5rem) auto 0; max-width: 40rem; }
.device-picker-panel{
  background: var(--surface);
  border: 1.5px dashed var(--line-strong);
  border-radius: 10px;
  padding: 1rem 1.1rem 1.1rem;
  display: grid;
  gap: 0.5rem;
}
.dp-head{ display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 0.35rem; }
.dp-title{ font-weight: 700; color: var(--ink); }
.dp-status{ color: var(--muted); font-size: 0.95rem; }
.dp-option{
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.dp-option.is-selected{ border-color: var(--ink); }
.dp-radio{ width: 1rem; height: 1rem; border-radius: 50%; border: 1.5px solid var(--line-strong); }
.dp-option.is-selected .dp-radio{ border: 5px solid var(--ink); }
.dp-name{ color: var(--ink); min-width: 0; }
.dp-meta{ color: var(--muted); font-size: 0.9rem; }

.device-picker figcaption{ margin-top: 0.75rem; font-size: 0.93rem; color: var(--muted); text-align: center; text-wrap: balance; }

/* ---------- Tables on phones ---------- */

/* Phones: columns don't fit, so each row becomes a stacked block and every
 * cell is labelled from its data-label. The table keeps its semantics for
 * assistive technology; only the visual layout changes. */

/* ---------- Local AI (planned) ---------- */

.local-ai-grid{
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 2.5rem clamp(2rem, 6vw, 5rem);
  align-items: center;
}
@media (max-width: 64rem) {
  .local-ai-grid{ grid-template-columns: minmax(0, 1fr); }
}

.model-picker{ margin-top: 0; width: 100%; }
.dp-tag{
  margin-left: 0.4rem;
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--pass);
  background: var(--pass-bg);
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  white-space: nowrap;
}
.dp-option.is-disabled .dp-name,
.dp-option.is-disabled .dp-meta{ color: var(--skip-text); }


/* ==========================================================================
   Visual components
   ========================================================================== */

/* Icons come from one self-hosted Lucide sprite: <svg class="i"><use …/></svg> */
.i {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  stroke: currentColor;
  fill: none;
  vertical-align: -0.2em;
}

.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
}
.feature-icon .i { width: 1.4rem; height: 1.4rem; }

.section-intro-center { margin-inline: auto; text-align: center; }

/* ---------- Hero additions ---------- */

.hero { position: relative; overflow: hidden; isolation: isolate; }

/* Cursor-reactive dot lattice behind the hero, drawn by main.js. */
.dotgrid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 35%, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse 80% 70% at 70% 35%, #000 30%, transparent 80%);
}

.btn .i { width: 1.1em; height: 1.1em; }

.proof {
  list-style: none;
  margin: 2.25rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.8rem;
  max-width: 34rem;
}
.proof li { display: flex; align-items: center; gap: 0.75rem; color: var(--text); }
.proof .i { width: 1.35rem; height: 1.35rem; color: var(--pass); }
.proof strong { color: var(--ink); }

.record-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink);
  font-weight: 700;
}
.record-status canvas { width: 20px; height: 20px; }

/* ---------- Demo video ---------- */

.demo { padding-top: clamp(1rem, 3vw, 2rem); }
.demo .section-intro { margin-bottom: clamp(1.25rem, 3vw, 2rem); }

.demo-figure {
  margin: 0 auto;
  /* The recording is 1600 x 950 (1.68:1). Size it to fit one screen with its
   * chapter row, but never below 44rem wide where the page has room. */
  max-width: min(100%, max(44rem, min(80rem, calc((100svh - 11rem) * 1.68))));
}

.demo-frame {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 0 var(--line), 0 30px 60px -30px rgb(15 38 34 / 0.35);
}


.demo-stage { position: relative; background: #fff; }
.demo-video { display: block; width: 100%; height: auto; cursor: pointer; }

.demo-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
}
.demo-loading[hidden] { display: none; }
.demo-loading canvas { width: 64px; height: 64px; }

.demo-toggle {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 0;
  background: var(--btn-bg);
  color: var(--btn-text);
  cursor: pointer;
  box-shadow: 0 8px 20px -8px rgb(0 0 0 / 0.45);
}
.demo-toggle:hover { background: var(--btn-hover); }
.demo-toggle .i { width: 1.2rem; height: 1.2rem; }
.demo-toggle .i-pause { display: none; }
.demo-figure.is-playing .demo-toggle .i-play { display: none; }
.demo-figure.is-playing .demo-toggle .i-pause { display: block; }

/* Before playback starts, a larger centred play button invites a click. */
.demo-figure:not(.has-started) .demo-toggle {
  right: 50%;
  bottom: 50%;
  transform: translate(50%, 50%);
  width: 4.5rem;
  height: 4.5rem;
}
.demo-figure:not(.has-started) .demo-toggle .i { width: 1.8rem; height: 1.8rem; }

.demo-chapters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
@media (max-width: 40rem) {
  .demo-chapters { grid-template-columns: minmax(0, 1fr); }
}

.chapter {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.25rem;
  padding: 0.65rem 0.9rem;
  font: inherit;
  text-align: left;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.chapter:hover { border-color: var(--line-strong); }
.chapter.is-current { border-color: var(--ink); }
.chapter-num {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--code-bg);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.9rem;
}
.chapter.is-current .chapter-num { background: var(--btn-bg); color: var(--btn-text); }
.chapter-text { font-weight: 700; color: var(--ink); }
.chapter-time { font-family: var(--font-mono); font-size: var(--step--1); color: var(--muted); }

/* Progress through the current chapter, set by main.js. */
.chapter::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: calc(var(--progress, 0) * 100%);
  background: var(--ink);
}

.transcript { margin-top: 1rem; color: var(--text); }
.transcript summary { cursor: pointer; font-weight: 700; color: var(--ink); width: fit-content; }
.transcript ol { margin: 0.75rem 0 0; padding-left: 1.25rem; display: grid; gap: 0.4rem; max-width: 52rem; }

/* ---------- Feature rows (principles, audience) ---------- */

.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 2rem clamp(1.5rem, 4vw, 3rem);
}
.features li { display: grid; gap: 0.6rem; align-content: start; }
.features h3 { margin-top: 0.4rem; font-size: var(--step-1); line-height: 1.3; }
.features p { color: var(--text); }

/* ---------- Pipeline flowchart ---------- */

.flowchart {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
@media (max-width: 64rem) {
  .flowchart { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 36rem) {
  .flowchart { grid-template-columns: minmax(0, 1fr); }
}

.flow-phase {
  position: relative;
  padding: 1.1rem 1.1rem 0.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.flow-phase h3 {
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.85rem;
}
.flow-phase ol { list-style: none; margin: 0; padding: 0; position: relative; }

/* The rail that joins the stages inside a phase. */
.flow-phase ol::before {
  content: "";
  position: absolute;
  left: 0.9rem;
  top: 0.9rem;
  bottom: 1.6rem;
  width: 2px;
  background: var(--line);
}

.flow-step {
  position: relative;
  display: grid;
  grid-template-columns: 1.8rem minmax(0, 1fr);
  gap: 0.75rem;
  padding-bottom: 0.9rem;
  line-height: 1.35;
}
.flow-step strong { display: block; color: var(--ink); }
.flow-step > span:last-child { color: var(--muted); font-size: 0.95rem; }

.flow-dot {
  position: relative;
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--line-strong);
  transition: background-color 250ms ease, border-color 250ms ease, color 250ms ease;
}
.flow-step.is-lit .flow-dot,
.flowchart:not(.is-animated) .flow-dot {
  background: var(--pass-bg);
  border-color: var(--pass);
  color: var(--pass);
}
.flow-step-final .flow-dot { border-radius: 6px; }

/* ---------- Guard cards ---------- */

.guard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
@media (max-width: 52rem) {
  .guard-grid { grid-template-columns: minmax(0, 1fr); }
}

.guard-card {
  padding: clamp(1.1rem, 2.5vw, 1.6rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 0;
}
.guard-head { display: flex; align-items: center; gap: 0.6rem; color: var(--ink); }
.guard-head h3 { font-size: var(--step-1); }
.guard-card > p { margin-top: 0.5rem; }

/* A soft light that follows the pointer across interactive cards. */
.spotlight { position: relative; isolation: isolate; }
.spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(380px circle at var(--spot-x, 50%) var(--spot-y, 50%), color-mix(in srgb, var(--pass) 12%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity 250ms ease;
}
.spotlight:hover::before { opacity: 1; }

/* ---------- Modes ---------- */

.modes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
@media (max-width: 56rem) {
  .modes { grid-template-columns: minmax(0, 1fr); }
}
.mode {
  padding: 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 0.5rem;
  align-content: start;
}
.mode-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem; }
.mode h3 { font-size: var(--step-1); }
.mode-facts { list-style: none; margin: 0.5rem 0 0; padding: 0.75rem 0 0; border-top: 1px solid var(--line); display: grid; gap: 0.45rem; font-size: 0.95rem; }
.mode-facts li { display: flex; gap: 0.55rem; align-items: center; }
.mode-facts .i { color: var(--muted); width: 1.1rem; height: 1.1rem; }

.state-available { color: var(--pass); background: var(--pass-bg); border-color: transparent; }

/* ---------- Checklists ---------- */

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.checklist li {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  padding: 0.8rem 0;
  border-top: 1px solid var(--line);
  font-size: 1.05rem;
  color: var(--ink);
}
.checklist li:last-child { border-bottom: 1px solid var(--line); }
.checklist .i { color: var(--pass); width: 1.35rem; height: 1.35rem; }

.local-ai-grid .section-intro { margin-bottom: 1.5rem; }

.dp-progress {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 0.35rem 0.6rem;
  margin-top: 0.5rem;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
}
.dp-progress canvas { width: 20px; height: 20px; }
.dp-bar { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: var(--code-bg); overflow: hidden; }
.dp-bar span { display: block; height: 100%; width: 62%; border-radius: 999px; background: var(--ink); }

/* ---------- Evaluation meters ---------- */

.eval-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 60rem) {
  .eval-layout { grid-template-columns: minmax(0, 1fr); }
}

.meters { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.75rem; }
.meter-label { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.25rem 1rem; }
.meter-label h3 { font-size: var(--step-1); }
.meter-value { color: var(--muted); font-variant-numeric: tabular-nums; }
.meter-value strong { color: var(--ink); font-size: var(--step-2); font-weight: 800; letter-spacing: -0.02em; margin-right: 0.2rem; }
.meter p { margin-top: 0.5rem; color: var(--muted); font-size: 0.95rem; }

/* Thin bars, rounded data ends, a 2px gap between the correct and missed segments. */
.meter-track {
  display: flex;
  gap: 2px;
  height: 12px;
  margin-top: 0.6rem;
  border-radius: 999px;
  background: var(--code-bg);
  overflow: hidden;
}
.meter-fill,
.meter-miss {
  display: block;
  height: 100%;
  width: calc(var(--fill, 0) * 1%);
  transition: width 1100ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.meter-fill { background: var(--ink); border-radius: 999px 4px 4px 999px; }
.meter-miss { background: var(--fail); border-radius: 4px 999px 999px 4px; min-width: 4px; }

.misses h3 { display: flex; align-items: center; gap: 0.5rem; }
.misses h3 .i { color: var(--fail); }
.misses { border-left: 3px solid var(--fail); padding-left: 1.25rem; }
.miss-list { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 1rem; }
.miss-list li { display: grid; gap: 0.35rem; font-size: 0.95rem; }
.miss-list span { color: var(--muted); }

/* ---------- Corpus bar chart ---------- */

.bars { width: 100%; border-collapse: collapse; }
.bars th {
  text-align: left;
  font-weight: 700;
  color: var(--ink);
  padding: 0.55rem 1rem 0.55rem 0;
  white-space: nowrap;
  width: 9.5rem;
}
.bars td { padding: 0.55rem 0; }
.bars td { display: flex; align-items: center; gap: 0.6rem; }
.bar {
  display: block;
  height: 14px;
  width: calc(var(--fill, 0) * 0.85%);
  min-width: 4px;
  border-radius: 2px 4px 4px 2px;
  background: var(--ink);
  transition: width 1100ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.bar-value { font-variant-numeric: tabular-nums; color: var(--text); }

.shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.shot figcaption { margin-top: 0.6rem; font-size: 0.93rem; color: var(--muted); }

.corpus-grid { align-items: center; }

/* ---------- API chips ---------- */

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chips li {
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.93rem;
  color: var(--ink);
  background: var(--surface);
}

.adapt h3 { display: flex; align-items: center; gap: 0.55rem; }
.adapt h3 .i { color: var(--pass); }

/* ---------- Limits ---------- */

.limits { gap: 0 clamp(2rem, 5vw, 4rem); grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); }
.limits li { color: var(--muted); }

/* ---------- Roadmap cards ---------- */

.phase-card {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.phase-card[data-state="available"] { border-top: 1px solid var(--line); padding-top: 1.25rem; box-shadow: inset 0 3px 0 var(--pass); }
.phase-head { justify-content: space-between; align-items: center; }
.phase-details { margin-top: 0.75rem; }
.phase-details summary {
  cursor: pointer;
  width: fit-content;
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--ink);
}
.phase-details ul { margin: 0.6rem 0 0; padding-left: 1.1rem; display: grid; gap: 0.35rem; font-size: 0.93rem; color: var(--text); }
.phases-roadmap { gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }

/* Chart values, so the bars are correct without JavaScript. main.js animates
 * them from zero when they scroll into view. */
[data-fill="0.6"] { --fill: 0.6; }
[data-fill="11"] { --fill: 11; }
[data-fill="13.2"] { --fill: 13.2; }
[data-fill="16.7"] { --fill: 16.7; }
[data-fill="83"] { --fill: 83; }
[data-fill="83.3"] { --fill: 83.3; }
[data-fill="99.4"] { --fill: 99.4; }
[data-fill="100"] { --fill: 100; }

/* ---------- Mobile menu ---------- */

/* Very narrow phones: the header GitHub button keeps its icon; its label
 * stays available to screen readers. */
@media (max-width: 24rem) {
  .header-inner { gap: 0.75rem; }
  .btn-github { padding-inline: 0.65rem; }
  .btn-github span {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
  }
}

.menu-button {
  display: none;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  border-radius: 8px;
}
@media (max-width: 64rem) {
  .menu-button:not([hidden]) { display: grid; }
}
.menu-lines { display: grid; gap: 5px; width: 20px; }
.menu-lines span { display: block; height: 2px; border-radius: 2px; background: currentColor; transition: transform 200ms ease; }
.menu-button[aria-expanded="true"] .menu-lines span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-button[aria-expanded="true"] .menu-lines span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.mobile-menu { border-top: 1px solid var(--line); background: var(--ground); }
.mobile-menu nav { display: grid; padding-block: 0.5rem 1rem; }
.mobile-menu a {
  display: flex;
  align-items: center;
  min-height: 3rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 64.0625rem) {
  .mobile-menu { display: none !important; }
}

/* ---------- Call to action band ---------- */

.cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #0f2622;
  color: #d9e4e0;
  text-align: center;
  padding-block: clamp(4rem, 10vw, 7rem);
}
.cta-dots {
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000 10%, transparent 75%);
}
.cta-inner { display: grid; justify-items: center; }
.cta-orb { width: 64px; height: 64px; margin-bottom: 1.25rem; }
.cta h2 {
  color: #ffffff;
  font-size: var(--step-4);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  max-width: 16ch;
}
.cta p { margin-top: 1rem; font-size: var(--step-1); max-width: 36rem; }
.cta-actions { justify-content: center; margin-top: 2rem; }
.btn-inverse { background: #ffffff; color: #0f2622; }
.btn-inverse:hover { background: #d9e4e0; }
.btn-inverse-outline { color: #ffffff; border-color: rgb(255 255 255 / 0.35); }
.btn-inverse-outline:hover { border-color: #ffffff; }
.cta :focus-visible { outline-color: #ffffff; }
.cta-links {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.75rem;
}
.cta-links a { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2.75rem; color: #d9e4e0; }
.cta-links a:hover { color: #ffffff; }

@media (prefers-color-scheme: dark) {
  .cta { background: #132722; }
}

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  overflow: hidden;
  padding-top: clamp(3rem, 7vw, 4.5rem);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  font-size: 0.95rem;
  color: var(--muted);
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 2.5rem clamp(2rem, 6vw, 6rem);
}
@media (max-width: 52rem) {
  .footer-top { grid-template-columns: minmax(0, 1fr); }
}
.footer-brand p { margin-top: 0.85rem; max-width: 22rem; }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}
@media (max-width: 30rem) {
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.footer-cols h2 { font-size: 0.95rem; color: var(--ink); }
.footer-cols ul { list-style: none; margin: 0.75rem 0 0; padding: 0; display: grid; gap: 0.1rem; }
.footer-cols a { display: inline-flex; align-items: center; min-height: 2.25rem; color: var(--muted); text-decoration: none; }
.footer-cols a:hover { color: var(--ink); text-decoration: underline; }

.footer-top { padding-bottom: clamp(2.5rem, 6vw, 3.5rem); border-bottom: 1px solid var(--line); }
.disclaimer { margin-top: 1.5rem; max-width: 52rem; }
.disclaimer strong { color: var(--ink); }

.footer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; margin-top: 1rem; }
.footer-meta a { color: var(--muted); }

/* An oversized, faint wordmark anchoring the page. */
.footer-wordmark {
  margin: clamp(1.5rem, 4vw, 2.5rem) 0 0;
  font-size: clamp(3.5rem, 15.5vw, 16rem);
  font-weight: 800;
  line-height: 0.78;
  letter-spacing: -0.06em;
  text-align: center;
  white-space: nowrap;
  color: transparent;
  background: linear-gradient(to bottom, var(--line-strong), transparent 92%);
  -webkit-background-clip: text;
  background-clip: text;
  user-select: none;
}
