/*
  Inference Exchange — converted stylesheet (task 004).

  Source: `design/Inference Exchange.dc.html` + `design/styles.css`, per `docs/specs/design_spec.md`.
  The accent ramp below is the PAGE's own override (purple, #7c11f5) — not the shared system's
  default (red). See design_spec.md §2.

  ────────────────────────────────────────────────────────────────────────────────────────────
  DOM CONTRACT HOOKS — stable classes/ids tasks 005 (desk.js) and 006 (form.js) bind to.
  Neither task may edit index.html, so every hook they need is listed here.
  ────────────────────────────────────────────────────────────────────────────────────────────
  Trade desk (task 005):
    .js-model-tabs          — container of the four model tabs
    .js-model-tab           — each of the four model-tab buttons
    .js-ladder-bid-column   — the bid column (holds six .js-ladder-bid-row rows)
    .js-ladder-ask-column   — the ask column (holds six .js-ladder-ask-row rows)
    [data-testid="ladder-bid-row"] / [data-testid="ladder-ask-row"] — one per ladder row
    [data-testid="ladder-mid"] / [data-testid="ladder-spread"] / [data-testid="ladder-open-interest"]
    .js-ladder-summary      — the Mid / Spread / Open interest strip
    .js-tape-header         — the trade-tape panel's header row (title + Matching + stop control)
    .js-tape-list           — the trade-tape row list
    [data-testid="tape-row"] — each trade-tape row
    .js-desk-stop           — the stop control button ("Pause" / "Resume")
    .js-bucket-tabs         — container of the two bucket tabs
    .js-bucket-tab          — each of the two bucket-tab buttons
    .js-bucket-caption      — the note line beneath the bucket tabs (bucket note + sort note)
    .js-contracts-thead     — the contracts table <thead>
    .js-contracts-tbody     — the contracts table <tbody>
    .js-sort-btn            — each column's sort control (`data-sort-key` names the field)

  Waitlist form (task 006):
    .js-hero-cta            — both hero CTAs ("Buy tokens" / "Sell tokens"), `data-side` names the side
    .js-waitlist-form       — the <form> element
    .js-success-panel       — the success panel (sibling of the form; mutually exclusive at runtime)
    .js-side-option         — each of the two side radio wrappers
    .js-side-radio          — each of the two `role=radio` inputs (shared `name`)
    .js-contract-block      — the block revealed once a side is chosen
    .js-contract-heading    — swaps text between "The contract you need" / "…you hold"
    .js-latency-label       — swaps text between "Latency requirement" (buy) / "Latency" (sell)
    .js-model-select        — the Model <select>
    .js-submit-btn          — the submit control
    .js-submit-status       — the in-flight / failure message slot (empty until triggered)
    .js-field-error         — each field's inline error slot (`id` referenced by that field's
                              `aria-describedby`; empty text, reserved space, until triggered)
  ────────────────────────────────────────────────────────────────────────────────────────────
*/

@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo-latin-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Accent ramp — the page's own override (purple). Wins by being the only definition shipped. */
  --color-accent: #7c11f5;
  --color-accent-100: #eee0ff;
  --color-accent-200: #d9bcff;
  --color-accent-300: #bd91fb;
  --color-accent-400: #9d5ff9;
  --color-accent-500: #7c11f5;
  --color-accent-600: #6a0ed2;
  --color-accent-700: #560aa9;
  --color-accent-800: #410880;
  --color-accent-900: #2c0557;

  /* Ground and ink, unchanged from the shared system. */
  --color-bg: #f3f2f2;
  --color-surface: #eae9e9;
  --color-text: #201e1d;
  /* Mathematically identical to design_spec.md's own `color-mix(in srgb, #201e1d 40%,
     transparent)` formula (mixing a colour with transparent at X% is exactly that colour at
     X% alpha) — written as a literal rgba() because Chromium serialises a computed color-mix()
     result via the newer `color(srgb ...)` function notation, which the acceptance suite's
     regex-based colour parser does not recognise (`ac-1-06g-contrast.spec.ts`, border checks). */
  --color-divider: rgba(32, 30, 29, 0.4);

  /* Only the two neutral steps this page actually uses (tape "down" rows, the neutral tag). */
  --color-neutral-100: #f8f4f4;
  --color-neutral-800: #444141;

  --font-family: 'Archivo', system-ui, sans-serif;
}

/* ── Reset ─────────────────────────────────────────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Only h1/h2/h3 are used as real headings on this page — see the note on the eyebrow labels
   below for why the canvas's h6 "eyebrows" are demoted to non-heading elements here. h3 is the
   only level of these three whose SIZE is never overridden by a class ("Listed contracts" and
   the success heading both rely on this default per design_spec.md §3). */
h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-family);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.015em;
}
h3 {
  font-size: 25px;
}

p {
  margin: 0;
}
ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* The canvas draws three "kicker" labels ("INFERENCE EXCHANGE", "Trade desk", "Get started")
   as <h6>. Kept as real headings they would corrupt the outline — h6 sitting right after an h3
   (or h4) is a level SKIP, not a step down (design_spec.md §10: "heading levels descend without
   skipping"). Demoted to a plain paragraph carrying the identical visual metrics, the same
   treatment design_spec.md gives the accent-band/features display text ("styled as display
   type but are paragraphs... promoting them to headings would corrupt the outline"). */
.eyebrow-label {
  margin: 0 0 14px;
  font-family: var(--font-family);
  font-weight: 800;
  font-size: 13px;
  line-height: 1.12;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}
a:not(.btn):hover {
  color: var(--color-accent-700);
}

:focus {
  outline: none;
}
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
::selection {
  background: color-mix(in srgb, var(--color-accent) 30%, transparent);
}

.hr {
  height: 2px;
  border: 0;
  margin: 16px 0;
  background: var(--color-divider);
}

/* ── Buttons ───────────────────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-family);
  font-weight: 800;
  font-size: 15px;
  line-height: 1.2;
  color: var(--color-text);
  background: transparent;
  border: 1px solid transparent;
  padding: 12px 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-height: 44px;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--color-accent);
  color: var(--color-bg);
}
.btn-primary:hover {
  background: var(--color-accent-600);
}
.btn-primary:active {
  background: var(--color-accent-700);
}
.btn-secondary {
  border-color: var(--color-divider);
}
.btn-secondary:hover {
  background: color-mix(in srgb, var(--color-text) 7%, transparent);
}
.btn-secondary:active {
  background: color-mix(in srgb, var(--color-text) 14%, transparent);
}

/* ── Layout ────────────────────────────────────────────────────────────────────────────── */

.divider-bottom {
  border-bottom: 2px solid var(--color-divider);
}

/* ── Header ────────────────────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: 14px clamp(20px, 5vw, 72px);
  border-bottom: 2px solid var(--color-divider);
  background: var(--color-bg);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  margin-right: auto;
}
.brand-mark {
  height: 26px;
  width: auto;
}
.brand-word {
  font-family: var(--font-family);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  flex-wrap: wrap;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.site-nav a:not(.btn) {
  color: inherit;
}
.site-nav a:not(.btn):hover {
  color: var(--color-accent-700);
}

/* ── Hero ──────────────────────────────────────────────────────────────────────────────── */

.hero {
  padding: clamp(48px, 7vw, 100px) clamp(20px, 5vw, 72px) clamp(56px, 7vw, 104px);
}
.hero h1 {
  font-size: clamp(44px, 8vw, 112px);
  line-height: 0.94;
  letter-spacing: -0.04em;
  margin: 0 0 36px;
  max-width: 22ch;
}
.hero-lede {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(24px, 4vw, 64px);
}
.hero-lede p {
  font-size: clamp(18px, 1.8vw, 26px);
  line-height: 1.4;
  max-width: 34ch;
}
.hero-cta-block {
  margin-top: clamp(40px, 5vw, 72px);
}
.hero-cta-eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
  margin-bottom: 12px;
}
.hero-cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Accent band / display paragraphs ─────────────────────────────────────────────────── */

.accent-band {
  padding: clamp(28px, 3vw, 40px) clamp(20px, 5vw, 72px);
  background: var(--color-accent);
  color: var(--color-bg);
}
.display-text {
  margin: 0;
  font-family: var(--font-family);
  font-weight: 800;
  font-size: clamp(30px, 4.6vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  max-width: 34ch;
}

/* ── Problem section ───────────────────────────────────────────────────────────────────── */

/* §4.3 defect 3: the approved design draws the divider between the two problem cells as a
   border-right on the first cell, which becomes a stray vertical rule once the auto-fit grid
   collapses to one column (the rule no longer has a second column to sit beside). Fixed
   structurally, not with a query: the GRID CONTAINER, not either cell, carries the divider
   colour as its background, and a column-gap reveals a hairline only where two columns are
   genuinely adjacent. Collapsed to one column there is no column-gap to reveal, so the rule
   disappears by construction rather than by a breakpoint switching it off. */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  column-gap: 2px;
  background: var(--color-divider);
  border-top: 2px solid var(--color-divider);
}
.problem-cell {
  display: grid;
  align-content: start;
  padding: clamp(28px, 3vw, 44px) clamp(20px, 3vw, 40px);
  background: var(--color-bg);
}
.problem-eyebrow-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.problem-eyebrow {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}
/* §4.3 defects 1 & 2: dropped the fixed width:389px / height:30px; the character-unit
   max-width and a natural auto height replace them, so a wrapped heading can grow. */
.problem-heading {
  margin: 0 0 14px;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  max-width: 26ch;
}
/* The canvas gives the left ("Winners don't wait.") heading a narrower measure (22ch) than
   the right (26ch) — no visible difference at 19 characters, restored for fidelity anyway. */
.problem-cell:first-child .problem-heading {
  max-width: 22ch;
}
/* §4.3 defect 4: the fixed min-height on the paragraph used to fake list alignment is
   dropped; both cells' lists now align because both grid cells share the same row structure
   (eyebrow → heading → copy → list), not a magic-number spacer. */
.problem-copy {
  font-size: 15px;
  line-height: 1.55;
  max-width: 44ch;
  margin: 0 0 40px;
  color: color-mix(in srgb, var(--color-text) 78%, transparent);
}
.problem-list {
  display: grid;
  gap: 22px;
}
.problem-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  font-size: 14px;
  line-height: 1.5;
}
.problem-list-index {
  font-family: var(--font-family);
  font-weight: 800;
  color: var(--color-accent);
}

/* ── Features band ─────────────────────────────────────────────────────────────────────── */

.features-intro {
  padding: clamp(40px, 5vw, 72px) clamp(20px, 5vw, 72px) clamp(28px, 3vw, 44px);
  background-color: var(--color-bg);
}
.features-intro .display-text {
  color: var(--color-text);
  text-align: left;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  border-top: 2px solid var(--color-divider);
}
.feature-cell {
  display: grid;
  justify-items: center;
  text-align: center;
  align-content: center;
  gap: 18px;
  padding: clamp(28px, 3vw, 44px) clamp(20px, 3vw, 40px);
}
.feature-cell:first-child {
  padding: clamp(32px, 3vw, 48px) clamp(20px, 3vw, 40px);
}
.feature-icon {
  display: block;
}
/* h3, not the canvas's h4 — see the note on .eyebrow-label above: this page's real heading
   outline runs h1 -> h2 (problem) -> h3 (features), so this is now one level below "Winners
   don't wait." / "You committed..." (design_spec.md §10). */
.feature-heading {
  letter-spacing: -0.02em;
  font-size: clamp(18px, 1.7vw, 22px);
}
.feature-cell p {
  font-size: 15px;
  line-height: 1.55;
  max-width: 34ch;
  color: color-mix(in srgb, var(--color-text) 78%, transparent);
}

/* ── Contract terms ────────────────────────────────────────────────────────────────────── */

.terms-section {
  padding: clamp(28px, 3vw, 44px) clamp(20px, 5vw, 72px) clamp(32px, 3vw, 48px);
}
.terms-eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
  margin-bottom: 8px;
}
.terms-row {
  display: grid;
  grid-template-columns: minmax(140px, 22%) 1fr;
  gap: clamp(16px, 3vw, 48px);
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--color-text) 14%, transparent);
}
/* text-transform: uppercase renders all four identically (matching the canvas); the SOURCE
   keeps two upper-case, two title-case (verified by a separate test reading page.content()). */
.terms-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
}
.terms-value {
  font-family: var(--font-family);
  font-weight: 800;
  font-size: clamp(17px, 1.8vw, 22px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* ── Trade desk ────────────────────────────────────────────────────────────────────────── */

.desk-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: clamp(36px, 4vw, 56px) clamp(20px, 5vw, 72px) clamp(24px, 3vw, 36px);
}
.desk-header h2 {
  font-size: clamp(28px, 3.6vw, 46px);
  letter-spacing: -0.03em;
  max-width: 26ch;
}

/* Same construction as .problem-grid above: a border-right on each tab becomes a stray rule
   once this wrapping flex row collapses to two lines of two — the divider needs both a
   column AND a row edge, and border-right alone only ever drew the column edge. Fixed
   structurally: the CONTAINER carries the divider colour as its background, and `gap` reveals
   a hairline only where two tabs are genuinely adjacent, in both axes, with no nth-child
   arithmetic tied to a column count that has to be re-derived at the next breakpoint. Every
   tab needs an opaque background matching the surrounding panel (--color-bg, not transparent)
   for the gap to read as a divider instead of a seam. */
.model-tabs {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  background: var(--color-divider);
  border-top: 2px solid var(--color-divider);
  border-bottom: 2px solid var(--color-divider);
}
.model-tab {
  flex: 1 1 clamp(140px, 24%, 240px);
  min-width: 0;
  min-height: 44px;
  padding: 14px 18px;
  font-family: var(--font-family);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-align: left;
  cursor: pointer;
  border: 0;
  background: var(--color-bg);
  color: var(--color-text);
}
.model-tab[aria-pressed='true'] {
  background: var(--color-accent);
  color: var(--color-bg);
}

/* §4.3 defect 3, same construction as .problem-grid above: the ladder cell's border-right
   becomes a stray rule once this auto-fit grid collapses to one column. The container's
   background plus a column-gap reveals the divider only where the ladder and tape panels are
   genuinely side by side. */
/* minmax(min(330px, 100%), 1fr), not a bare 330px: design_spec.md's own 330px reflow minimum
   (§4.2) is wider than AC-1.6j's 320px acceptance viewport, so a bare fixed minimum forces a
   hard 10px page overflow there. `min(330px, 100%)` is still a fluid value, not a breakpoint —
   it holds at exactly 330px for every viewport that can fit it, and only concedes width on a
   container narrower than that, which is precisely the 320px case. */
.desk-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(330px, 100%), 1fr));
  column-gap: 2px;
  background: var(--color-divider);
}
.ladder-panel {
  padding: 24px clamp(20px, 3vw, 36px);
  border-bottom: 2px solid var(--color-divider);
  background: var(--color-bg);
}
.ladder-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}
.panel-title {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.panel-subtitle {
  font-size: 12px;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
}

.ladder-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 clamp(16px, 2vw, 32px);
}
.ladder-col-head {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
  padding-bottom: 6px;
  border-bottom: 2px solid var(--color-divider);
}
.ladder-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 5px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--color-text) 12%, transparent);
}
.ladder-row .price {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.ladder-row .size {
  font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--color-text) 65%, transparent);
}

.ladder-summary {
  display: flex;
  gap: clamp(16px, 3vw, 40px);
  flex-wrap: wrap;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 2px solid var(--color-divider);
}
.summary-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}
.summary-value {
  font-family: var(--font-family);
  font-weight: 800;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.tape-panel {
  padding: 24px clamp(20px, 3vw, 36px);
  background: var(--color-bg);
}
.tape-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.tape-header-status {
  display: flex;
  align-items: center;
  gap: 16px;
}
.matching {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
}
.matching-dot {
  width: 7px;
  height: 7px;
  background: var(--color-accent);
  display: block;
}

.stop-control {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 14px;
  font-family: var(--font-family);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  border: 2px solid var(--color-divider);
  background: transparent;
  color: var(--color-text);
}
.stop-control[aria-pressed='true'] {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-bg);
}

.tape-col-head {
  display: grid;
  grid-template-columns: 68px 1fr 62px 60px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
  padding-bottom: 6px;
  border-bottom: 2px solid var(--color-divider);
}
.tape-col-head span:nth-child(3),
.tape-col-head span:nth-child(4) {
  text-align: right;
}

/* Direction colour lives on the ROW itself, not the price span (design_spec.md §5.3 / the DOM
   contract: "Direction is read from the row's computed colour"). The price span has no colour
   of its own and simply inherits it; the row's other spans (time/contract/term) each set an
   explicit muted colour that overrides the inherited direction colour for themselves only. */
.tape-row {
  display: grid;
  grid-template-columns: 68px 1fr 62px 60px;
  font-size: 13px;
  padding: 5px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--color-text) 12%, transparent);
}
.tape-row.is-up {
  color: var(--color-accent-700);
}
.tape-row.is-down {
  color: var(--color-neutral-800);
}
.tape-row .tape-time {
  font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
}
.tape-row .tape-contract {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-text);
}
.tape-row .tape-price {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.tape-row .tape-term {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
}

/* ── Listed contracts ──────────────────────────────────────────────────────────────────── */

.contracts-section {
  padding: clamp(32px, 4vw, 52px) clamp(20px, 5vw, 72px) clamp(36px, 4vw, 56px);
}
.contracts-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.contracts-title-group {
  display: grid;
  gap: 14px;
}
.contracts-title-group h3 {
  letter-spacing: -0.02em;
}

.bucket-tabs {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
}
.bucket-tab {
  min-width: 44px;
  min-height: 44px;
  padding: 10px 18px;
  font-family: var(--font-family);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border: 2px solid var(--color-divider);
  background: transparent;
  color: var(--color-text);
}
.bucket-tab[aria-pressed='true'] {
  background: var(--color-accent);
  color: var(--color-bg);
}

.contracts-note {
  font-size: 12px;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.contracts-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 14px;
}
.contracts-table th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
  padding: 0;
  border-bottom: 2px solid var(--color-divider);
  white-space: nowrap;
}
.contracts-table th[aria-sort='ascending'],
.contracts-table th[aria-sort='descending'] {
  color: var(--color-accent);
}
.js-sort-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 12px 10px;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}
.contracts-table td {
  padding: 8px;
  border-bottom: 1px solid var(--color-divider);
  font-variant-numeric: tabular-nums;
}
.contracts-table tbody tr:hover {
  background: color-mix(in srgb, var(--color-text) 4%, transparent);
}
.contracts-table td.model-cell {
  font-weight: 600;
}
.contracts-table td.price-cell {
  font-weight: 600;
}

.class-tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
}
.tag-accent {
  background: var(--color-accent-100);
  color: var(--color-accent-800);
}
.tag-neutral {
  background: var(--color-neutral-100);
  color: var(--color-neutral-800);
}
/* Outlined, no fill: recedes further than .tag-neutral so the lowest capability tier (Small)
   reads as visually lighter-weight than Mid, without introducing a third hue. */
.tag-muted {
  background: transparent;
  color: var(--color-neutral-800);
  border: 1px solid var(--color-divider);
  padding: 2px 9px;
}

/* ── Waitlist ──────────────────────────────────────────────────────────────────────────── */

/* §4.3 defect 3, same construction as .problem-grid above: the left waitlist cell's
   border-right becomes a stray rule once this auto-fit grid collapses to one column. */
.waitlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  column-gap: 2px;
  background: var(--color-divider);
}
.waitlist-copy-col {
  padding: clamp(36px, 4vw, 60px) clamp(20px, 5vw, 72px);
  background: var(--color-bg);
}
.waitlist-copy-col h2 {
  font-size: clamp(28px, 3.4vw, 44px);
  letter-spacing: -0.03em;
  margin: 0 0 20px;
  max-width: 18ch;
}
/* A class, not a bare `> p` combinator: the eyebrow label above it is ALSO a direct-child <p>
   (.eyebrow-label), and a tag-based selector here would out-specificity its accent colour. */
.waitlist-copy-lede {
  font-size: 15px;
  max-width: 42ch;
  color: color-mix(in srgb, var(--color-text) 78%, transparent);
}
.waitlist-list {
  display: grid;
  gap: 12px;
  font-size: 14px;
}
.waitlist-list li {
  display: flex;
  gap: 10px;
}
.waitlist-list li::before {
  content: '—';
  color: var(--color-accent);
  font-weight: 800;
}

.waitlist-panel-col {
  padding: clamp(36px, 4vw, 60px) clamp(20px, 5vw, 72px);
  background: var(--color-surface);
}

.js-waitlist-form {
  display: grid;
  gap: 18px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
}
.field {
  display: grid;
}
.field > label {
  display: block;
  font-size: 12px;
  margin-bottom: 5px;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}
.field-input {
  width: 100%;
  min-height: 44px;
  padding: 6px 10px;
  font: inherit;
  font-size: 14px;
  color: var(--color-text);
  caret-color: var(--color-accent);
  background: var(--color-bg);
  border: 1px solid var(--color-divider);
}
.field-input:hover {
  border-color: color-mix(in srgb, var(--color-text) 45%, transparent);
}
.field-input:focus-visible {
  border-color: var(--color-accent);
  outline-offset: 0;
}
textarea.field-input {
  min-height: 90px;
  resize: vertical;
}

.field-error {
  min-height: 1.4em;
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--color-accent-700);
}

.side-fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}
.side-fieldset > legend {
  display: block;
  width: 100%;
  padding: 0;
  font-size: 12px;
  margin-bottom: 5px;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}
.side-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.side-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 11px 18px;
  font-family: var(--font-family);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid var(--color-divider);
  color: var(--color-text);
  background: transparent;
}
.side-option:has(.js-side-radio:checked) {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--color-bg);
}
/* inset: -1px, not 0: an absolutely positioned descendant's containing block is the padding
   box of its positioned ancestor, not the border box — `.side-option`'s own 1px border would
   otherwise eat 2px off this input's own height/width (measured directly by AC-1.6e), pushing
   a control sized exactly to the label below the 44px floor. -1px extends it flush with the
   label's actual outer edge. */
.js-side-radio {
  position: absolute;
  inset: -1px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  cursor: pointer;
}

/* Hidden until a side is chosen (design_spec.md §8.1: "the block is absent" until then).
   Copy stays in the markup — AC-1.5/AC-1.1 read it via `textContent`, which finds text
   regardless of `display: none` — task 006 reveals it at runtime (e.g. `el.style.display =
   'grid'`; setting individual style properties via JS is unaffected by the page's CSP). */
.js-contract-block {
  display: none;
  gap: 18px;
  padding-top: 18px;
  border-top: 2px solid var(--color-divider);
}
.contract-block-eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
}

/* D-G (docs/phase_2/task_001_bot_check.md): the honeypot input — visually hidden AND removed
   from the tab order (tabindex="-1" in the markup); a commodity bot filling every visible field
   it can find in the DOM still finds this one. Off-screen positioning, not `display:none` /
   `visibility:hidden` — some crawlers skip elements a cheap style check reveals are hidden. */
.hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.submit-row {
  display: grid;
  gap: 4px;
}
.js-submit-btn {
  justify-self: start;
}
.submit-privacy-note {
  margin: 12px 0 0;
  font-size: 12px;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}
/* D-C: the only visible trace of the bot check anywhere on the page — score-based verification
   has no widget of its own. Styled like its sibling privacy note, not called out further, since
   it is disclosure copy rather than a warning. */
.recaptcha-disclosure {
  margin: 4px 0 0;
  font-size: 12px;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}
.recaptcha-disclosure a {
  color: inherit;
  text-decoration: underline;
}
.js-submit-status {
  min-height: 1.4em;
  font-size: 15px;
  color: var(--color-accent-700);
}

/* D-C: Google's documented class for the floating reCAPTCHA badge — hidden because the text
   disclosure above is the chosen equivalent (Google's terms require one or the other), and the
   badge is a floating element that would change the page's visual surface at unpredictable
   breakpoints, which the product spec forbids. */
.grecaptcha-badge {
  visibility: hidden;
}

/* Hidden until a submission succeeds (design_spec.md §8: "the form and the success panel are
   mutually exclusive — one replaces the other; they are never both present"). Copy stays in
   the markup for the same `textContent`-not-innerText reason as .js-contract-block above; task
   006 reveals it and hides the form at runtime. */
.js-success-panel {
  display: none;
}
.js-success-panel .success-mark {
  width: 20px;
  height: 20px;
  background: var(--color-accent);
  margin-bottom: 20px;
}
.js-success-panel h3 {
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.js-success-panel > p {
  font-size: 15px;
  max-width: 38ch;
  color: color-mix(in srgb, var(--color-text) 75%, transparent);
}
.js-success-panel .btn {
  margin-top: 12px;
}

/* ── No-scripting notice ───────────────────────────────────────────────────────────────── */

.noscript-notice {
  margin: 0 0 18px;
  padding: 12px;
  border: 1px solid var(--color-divider);
  background: var(--color-bg);
  font-size: 15px;
  color: var(--color-text);
}

/* ── Footer ────────────────────────────────────────────────────────────────────────────── */

.site-footer {
  display: grid;
  gap: 20px;
  padding: 32px clamp(20px, 5vw, 72px) 40px;
  border-top: 2px solid var(--color-divider);
}
.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-brand-mark {
  height: 16px;
  width: auto;
}
.footer-brand-word {
  font-family: var(--font-family);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.footer-links {
  display: flex;
  gap: clamp(14px, 2vw, 28px);
  flex-wrap: wrap;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.footer-links a {
  color: inherit;
}
.footer-links a:hover {
  color: var(--color-accent-700);
}
.footer-legal {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(20px, 3vw, 48px);
  font-size: 12px;
  line-height: 1.5;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}
.footer-legal p {
  margin: 0;
}

/* ── Legal pages (task 003) — privacy.html / terms.html / disclosures.html ───────────────
   Additive only: reuses .site-header/.brand/.site-footer/.footer-* as-is (no nav links —
   these pages are single-purpose, so the header carries just the brand mark back to `/`). */
.legal-content {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) clamp(20px, 5vw, 40px) clamp(56px, 7vw, 88px);
}
.legal-content h1 {
  font-size: clamp(32px, 4vw, 44px);
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}
.legal-content h2 {
  font-size: 20px;
  letter-spacing: -0.015em;
  margin: clamp(28px, 4vw, 40px) 0 12px;
}
.legal-content p {
  margin: 0 0 16px;
}
.legal-updated {
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
  font-size: 13px;
  margin-bottom: clamp(24px, 4vw, 40px);
}
.legal-list {
  list-style: disc;
  padding-left: 1.3em;
  margin: 0 0 16px;
}
.legal-list li {
  margin-bottom: 6px;
}
.legal-back {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
}
.legal-back-bottom {
  margin-top: clamp(28px, 4vw, 40px);
}

/* ── Reduced motion — the only media query this stylesheet carries ───────────────────────
   The desk's motion is a timer, not CSS, so this rule governs only smooth scrolling; the
   timer itself is stopped by desk.js reading the same preference at runtime. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
