/* Spec 033 — the marketing site's layout. Colours, type, spacing, radius and motion all come from
   design-tokens.css (a byte-for-byte copy of the workspace's). This file only arranges them: no colour
   literals (a test enforces it), the same app bar, buttons, badges and panels as the workspace. */

/* hidden always wins: a component's display rule must never reveal a pending slot or the success panel. */
[hidden] { display: none !important; }

:root { --wrap: 1120px; --section: clamp(56px, 9vw, 104px); }

body { min-height: 100vh; }
img, svg { max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: var(--lh-tight); text-wrap: balance; }
h2 { font-size: clamp(1.5rem, 3vw, 2.125rem); font-weight: 650; }
h3 { font-size: var(--t-lead); font-weight: 620; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--sp-4)); margin-inline: auto; }

.skip { position: absolute; left: var(--sp-3); top: -100px; z-index: 50; padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md); background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.skip:focus { top: var(--sp-3); }

.preview-bar { margin: 0; padding: var(--sp-2) var(--sp-4); text-align: center; font-size: var(--t-small);
  background: var(--predicted-bg); color: var(--predicted); border-bottom: 1px solid color-mix(in oklab, var(--predicted) 35%, transparent); }

/* ---- header: the workspace app bar ---------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--s-raised) 82%, transparent);
  backdrop-filter: blur(12px) saturate(1.3); -webkit-backdrop-filter: blur(12px) saturate(1.3); }
.site-header__row { display: flex; align-items: center; gap: var(--sp-4); min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: var(--sp-2); font-weight: 650; font-size: var(--t-lead);
  letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.brand__mark { display: block; width: 28px; height: 28px; filter: drop-shadow(0 2px 6px var(--brand-glow)); }
.site-nav { display: flex; align-items: center; gap: var(--sp-1); margin-left: auto; }
.site-nav__list { display: flex; align-items: center; gap: var(--sp-1); margin: 0; padding: 0; list-style: none; }
.site-nav__link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--sp-3); border-radius: var(--r-md);
  color: var(--ink-muted); text-decoration: none; font-size: var(--t-small); }
.site-nav__link:hover { color: var(--ink); background: var(--s-hover); }
.site-nav__link[aria-current="page"] { color: var(--ink); font-weight: 600; }
.site-nav__signin { color: var(--ink-muted); }
.site-nav__toggle { display: none; }
.site-nav__menu-cta { display: none; }

/* ---- buttons: the workspace .btn, at a marketing size ------------------------------------------------ */
.btn--lg { height: 48px; padding: 0 var(--sp-5); font-size: var(--t-body); font-weight: 600; border-radius: var(--r-lg);
  text-decoration: none; }
.btn--sm { text-decoration: none; }
.btn--lg.btn--primary, .btn--sm.btn--primary { color: var(--accent-ink); }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }

/* ---- sections --------------------------------------------------------------------------------------- */
.section { padding-block: var(--section); }
.section--raised { background: color-mix(in srgb, var(--s-raised) 70%, transparent); border-block: 1px solid var(--line); }
.section__head { display: flex; flex-direction: column; gap: var(--sp-3); max-width: 62ch; margin-bottom: var(--sp-7); }
.eyebrow { font-family: var(--font-mono); font-size: var(--t-micro); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); }
:root[data-theme="light"] .eyebrow { color: color-mix(in oklab, var(--verified) 70%, var(--ink)); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .eyebrow { color: color-mix(in oklab, var(--verified) 70%, var(--ink)); } }
.lead { font-size: var(--t-lead); color: var(--ink-muted); line-height: var(--lh-body); max-width: 62ch; }
.muted { color: var(--ink-muted); }
.small { font-size: var(--t-small); }

/* ---- hero ------------------------------------------------------------------------------------------- */
.hero { padding-block: clamp(48px, 9vw, 112px) var(--section); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero__copy { display: flex; flex-direction: column; gap: var(--sp-5); }
.hero h1 { font-size: var(--t-hero); font-weight: 680; letter-spacing: -0.035em; }
.hero__note { font-size: var(--t-small); color: var(--ink-muted); }

/* The deliverable preview: a panel with real-looking rows from the illustrative sample. */
.preview { padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-3);
  box-shadow: var(--shadow-pop); }
.preview__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  font-family: var(--font-mono); font-size: var(--t-micro); color: var(--ink-muted); letter-spacing: 0.04em; }
.preview__dots { display: inline-flex; gap: 6px; }
.preview__dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.preview__caption { font-size: var(--t-micro); color: var(--ink-muted); }

/* ---- the sample table ------------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--s-raised); }
.sample { width: 100%; border-collapse: collapse; font-size: var(--t-small); }
.sample caption { caption-side: bottom; text-align: left; padding: var(--sp-3) var(--sp-4); color: var(--ink-muted);
  font-size: var(--t-small); border-top: 1px solid var(--line); }
.sample th, .sample td { padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.sample thead th { position: sticky; top: 0; background: var(--s-overlay); color: var(--ink-muted); font-size: var(--t-micro);
  font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.sample tbody tr:last-child td { border-bottom: 0; }
.sample td.num { white-space: nowrap; }
.ref { font-family: var(--font-mono); font-size: var(--t-micro); padding: 1px var(--sp-2); border-radius: var(--r-sm);
  background: var(--accent-sunken); color: var(--ink); white-space: nowrap; }
.preview .sample th, .preview .sample td { padding: 6px var(--sp-2); }

/* ---- cards, lists, steps ---------------------------------------------------------------------------- */
.grid { display: grid; gap: var(--sp-4); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); }
.card p { color: var(--ink-muted); }
.card--accent { border-color: color-mix(in oklab, var(--accent) 45%, var(--line)); }
.ticks, .crosses { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--sp-3); }
.ticks li, .crosses li { position: relative; padding-left: 28px; }
.ticks li::before, .crosses li::before { position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.ticks li::before { content: "✓"; background: var(--verified-bg); color: var(--verified); }
.crosses li::before { content: "–"; background: var(--s-hover); color: var(--ink-muted); }

.steps { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--sp-4); counter-reset: step;
  grid-template-columns: repeat(5, minmax(0, 1fr)); }
.steps--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.step { counter-increment: step; padding: var(--sp-5) var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-2); }
.step::before { content: counter(step, decimal-leading-zero); font-family: var(--font-mono); font-size: var(--t-small);
  color: var(--accent); }
.step__who { font-family: var(--font-mono); font-size: var(--t-micro); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-muted); }
.step p { color: var(--ink-muted); font-size: var(--t-small); }

.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-4); margin: 0; padding: 0; list-style: none; }
.fact { padding: var(--sp-4); border-left: 2px solid var(--accent); display: flex; flex-direction: column; gap: var(--sp-1); }
.fact strong { font-size: var(--t-body); }
.fact span { color: var(--ink-muted); font-size: var(--t-small); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.callout { padding: var(--sp-5); border-radius: var(--r-lg); border: 1px solid var(--line-strong); background: var(--s-overlay);
  display: flex; flex-direction: column; gap: var(--sp-3); }
.quote-line { font-size: var(--t-lead); line-height: var(--lh-body); }

dl.terms { display: grid; grid-template-columns: max-content 1fr; gap: var(--sp-3) var(--sp-5); margin: 0; }
dl.terms dt { color: var(--ink-muted); font-size: var(--t-small); }
dl.terms dd { margin: 0; }

/* ---- policy slots: pending is visible, labelled and never mistaken for an offer ------------------------ */
.pending { display: inline-block; padding: 1px var(--sp-2); border-radius: var(--r-sm); border: 1px dashed var(--predicted);
  background: var(--predicted-bg); color: var(--predicted); font-family: var(--font-mono); font-size: var(--t-small); }
.is-pending { outline: 1px dashed color-mix(in oklab, var(--predicted) 60%, transparent); outline-offset: 6px; }

/* ---- FAQ -------------------------------------------------------------------------------------------- */
.faq { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: var(--sp-4) 0; font-weight: 600; display: flex; justify-content: space-between;
  gap: var(--sp-4); min-height: 44px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--ink-muted); font-size: var(--t-lead); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 0 var(--sp-5); color: var(--ink-muted); max-width: 70ch; display: flex; flex-direction: column; gap: var(--sp-2); }

/* ---- the form --------------------------------------------------------------------------------------- */
.form-panel { padding: clamp(20px, 4vw, 40px); }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4) var(--sp-5); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--wide { grid-column: 1 / -1; }
.field label { font-size: var(--t-small); font-weight: 600; }
.field .hint { font-size: var(--t-small); color: var(--ink-muted); }
.field input, .field select, .field textarea { min-height: 44px; padding: 0 var(--sp-3); border-radius: var(--r-md);
  border: 1px solid var(--line-strong); background: var(--s-sunken); color: var(--ink); font: inherit; }
.field textarea { padding: var(--sp-3); min-height: 112px; resize: vertical; line-height: var(--lh-body); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--line-focus); outline-offset: 1px; }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field__error { color: var(--danger); font-size: var(--t-small); font-weight: 600; }
.form__summary { grid-column: 1 / -1; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); border: 1px solid var(--danger);
  background: var(--fire-bg); color: var(--ink); }
.form__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: center; }
.form__actions .btn--lg[disabled] { opacity: 0.7; cursor: progress; }
.form__legal { font-size: var(--t-small); color: var(--ink-muted); max-width: 60ch; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.success { display: flex; flex-direction: column; gap: var(--sp-4); }
.success h3 { font-size: var(--t-title); }
.success ol { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: var(--sp-2); color: var(--ink-muted); }
.success__ref { font-family: var(--font-mono); color: var(--ink); }

/* ---- footer ------------------------------------------------------------------------------------------ */
.site-footer { border-top: 1px solid var(--line); padding-block: var(--sp-7); color: var(--ink-muted); font-size: var(--t-small); }
.site-footer__row { display: flex; flex-wrap: wrap; gap: var(--sp-5); justify-content: space-between; align-items: flex-start; }
.site-footer ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); }
.site-footer a { color: var(--ink-muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.site-footer__note { max-width: 60ch; margin-top: var(--sp-4); color: var(--ink-muted); }

/* ---- the reveal: opacity/transform only, and off for reduced motion (tokens handle that) ---------------- */
.rise { animation-delay: var(--delay, 0ms); }

/* ---- spec 036: page heroes, comparison, CTA band, choices, guides, prose ----------------------------------- */
.hero--page { padding-block: clamp(40px, 7vw, 88px) clamp(24px, 4vw, 48px); }
.hero--page .hero__copy { max-width: 760px; }
.section__more { margin-top: var(--sp-5); }
.section__more a { color: var(--ink); font-weight: 600; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.compare { width: 100%; border-collapse: collapse; font-size: var(--t-small); }
.compare th, .compare td { padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare thead th { font-size: var(--t-micro); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-muted); }
.compare tbody th { font-weight: 600; white-space: nowrap; }
.compare td { color: var(--ink-muted); }
.compare .compare__us { color: var(--ink); font-weight: 600; background: var(--accent-sunken); }
.compare thead .compare__us { color: var(--ink); }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.cta-band { padding: clamp(24px, 5vw, 48px); display: flex; flex-wrap: wrap; gap: var(--sp-5); align-items: center;
  justify-content: space-between; border-color: color-mix(in oklab, var(--accent) 45%, var(--line)); }
.cta-band > div:first-child { display: flex; flex-direction: column; gap: var(--sp-2); max-width: 56ch; }
.choice { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.choice legend { font-size: var(--t-small); font-weight: 600; margin-bottom: var(--sp-2); }
.choice label { display: flex; gap: var(--sp-2); align-items: center; min-height: 44px; padding: 0 var(--sp-3);
  border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--s-sunken); cursor: pointer; }
.choice label:has(input:checked) { border-color: var(--accent); background: var(--accent-sunken); }
.empty { align-items: flex-start; max-width: 720px; }
.prose { max-width: 72ch; display: flex; flex-direction: column; gap: var(--sp-4); }
.prose h2 { font-size: var(--t-title); margin-top: var(--sp-4); }
.prose p { color: var(--ink-muted); line-height: var(--lh-body); }
.terms--legend { margin-top: var(--sp-5); font-size: var(--t-small); }
.site-footer__brand { display: flex; flex-direction: column; gap: var(--sp-2); max-width: 40ch; }

/* ---- spec 036b: guides ------------------------------------------------------------------------------------ */
.guide-card__title { font-size: var(--t-lead); }
.guide-card__title a { text-decoration: none; }
.guide-card__title a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.crumbs { font-size: var(--t-small); color: var(--ink-muted); }
.crumbs a { color: var(--ink-muted); }
.guide h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
.guide__meta { font-size: var(--t-small); }
.guide__answer { font-size: var(--t-lead); color: var(--ink) !important; padding: var(--sp-4); border-left: 3px solid var(--accent);
  background: var(--accent-sunken); border-radius: var(--r-md); }
.guide ul, .guide ol { color: var(--ink-muted); line-height: var(--lh-body); padding-left: 1.2em; display: flex; flex-direction: column; gap: var(--sp-2); }
.guide .table-wrap { margin-top: var(--sp-2); }
.guide .sample { font-size: var(--t-micro); }
.guide .sample th, .guide .sample td { padding: 6px var(--sp-2); }
.guide__sources a { overflow-wrap: anywhere; }

/* ---- small screens --------------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .hero__grid, .split { grid-template-columns: 1fr; }
  .steps, .steps--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .site-nav__toggle { display: inline-flex; min-height: 44px; }
  .site-nav__list { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    padding: var(--sp-2) var(--sp-4) var(--sp-4); background: var(--s-overlay); border-bottom: 1px solid var(--line-strong);
    box-shadow: var(--shadow-pop); }
  .site-nav__list .site-nav__link { min-height: 48px; }
  .site-nav__list[data-open="false"], .site-nav__list:not([data-open]) { display: none; }
  .site-nav__cta { display: none; }
  .site-nav__list .site-nav__menu-cta { display: block; padding-top: var(--sp-3); }
  .grid--2, .grid--3, .form, .steps, .steps--4, .facts { grid-template-columns: 1fr; }
  dl.terms { grid-template-columns: 1fr; gap: var(--sp-1); }
  dl.terms dd { margin-bottom: var(--sp-3); }
  .btn--lg { width: 100%; justify-content: center; }
  .hero .preview { display: none; }
  .compare thead { display: none; }
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: 100%; }
  .compare tr { padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); }
  .compare tbody th { white-space: normal; border: 0; padding-bottom: var(--sp-1); }
  .compare td { border: 0; padding-block: var(--sp-1); }
  .compare td::before { content: attr(data-label) ": "; color: var(--ink-muted); font-weight: 400; }
  .cta-band .cta-row { width: 100%; }
}

/* The hero preview: a narrow excerpt, so badges and numbers never wrap. */
.preview .sample td:nth-child(n+2), .preview .sample th { white-space: nowrap; }
.preview .table-wrap { overflow: hidden; }
