/* Layout: one 1200px column on a cool paper ground; the custody ledger
   (dark band) is the recurring motif for hero, proof and CTA sections. */
:root {
  /* Color */
  --paper: #f5f8f8;          /* page ground, hue-biased toward teal */
  --paper-2: #ebf1f1;        /* alternate section ground */
  --card: #ffffff;
  --ink: #0d1b26;            /* body text */
  --ink-2: #435562;          /* secondary text */
  --line: #d5e0e1;
  --teal: #0f766e;           /* accent on light grounds */
  --teal-bright: #14b8a6;    /* accent on the dark ledger */
  --teal-wash: #e3f4f1;
  --ledger: #0b1726;         /* dark band, same in both themes */
  --ledger-2: #12263a;
  --ledger-line: #24405a;
  --ledger-ink: #e6eef2;
  --ledger-muted: #93a8b6;
  --allow: #15803d;
  --flag: #b45309;
  --deny: #be123c;
  --allow-bg: #dcfce7;
  --flag-bg: #fef3c7;
  --deny-bg: #ffe4e6;
  --focus: #0ea5e9;

  /* Type */
  --font-display: 'Archivo', 'Arial Narrow', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.4rem + 1.4vw, 2.375rem);
  --step-4: clamp(2.25rem, 1.6rem + 2.8vw, 3.75rem);

  /* Space */
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(64px, 9vw, 120px);
  --radius: 10px;
  --max: 1200px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0a141c; --paper-2: #0e1b25; --card: #112230; --ink: #e4edf1; --ink-2: #9db0bd;
    --line: #1f3546; --teal: #2dd4bf; --teal-wash: #0f2e2f;
    --allow: #4ade80; --flag: #fbbf24; --deny: #fb7185;
    --allow-bg: #0f2a1a; --flag-bg: #2d220b; --deny-bg: #2e0f18;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0a141c; --paper-2: #0e1b25; --card: #112230; --ink: #e4edf1; --ink-2: #9db0bd;
  --line: #1f3546; --teal: #2dd4bf; --teal-wash: #0f2e2f;
  --allow: #4ade80; --flag: #fbbf24; --deny: #fb7185;
  --allow-bg: #0f2a1a; --flag-bg: #2d220b; --deny-bg: #2e0f18;
  color-scheme: dark;
}

/* ---------------------------------------------------------------- Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; color: var(--ink); }
p { margin: 0; }
code, .mono { font-family: var(--font-mono); font-size: 0.9em; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--card); padding: 8px 14px; border-radius: 6px; }
.skip:focus { left: 16px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--alt { background: var(--paper-2); }
.stack { display: grid; gap: 16px; }
.measure { max-width: 64ch; }

.display {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 750;
  letter-spacing: -0.015em;
  line-height: 1.04;
}
.h1 { font-size: var(--step-4); }
.h2 { font-size: var(--step-3); }
.h3 { font-family: var(--font-body); font-size: var(--step-1); font-weight: 650; line-height: 1.3; }
.lead { font-size: var(--step-1); color: var(--ink-2); line-height: 1.55; }
.muted { color: var(--ink-2); }
.small { font-size: var(--step--1); }
.eyebrow {
  font: 600 0.75rem/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
}
.section-head { display: grid; gap: 14px; margin-bottom: clamp(32px, 5vw, 56px); max-width: 760px; }

/* ---------------------------------------------------------------- Header */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand .mark { width: 28px; height: 28px; color: var(--teal); --seal: var(--teal-bright); }
.brand-word { font: 700 0.95rem/1 var(--font-display); font-stretch: 125%; letter-spacing: 0.16em; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 0.9375rem;
  padding: 8px 12px; border-radius: 6px;
}
.nav a:hover { color: var(--ink); background: var(--paper-2); }
.nav a[aria-current="page"], .nav a.is-section { color: var(--ink); box-shadow: inset 0 -2px 0 var(--teal); border-radius: 0; }
.nav a, .nav .btn { white-space: nowrap; }
.nav-toggle { display: none; }
.menu-button { display: none; }

@media (max-width: 1180px) {
  .nav {
    display: none; position: absolute; inset: 68px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px;
  }
  .nav a { padding: 12px 4px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a[aria-current="page"] { box-shadow: none; color: var(--teal); }
  .nav .btn { margin-top: 12px; text-align: center; }
  .menu-button {
    display: inline-flex; margin-left: auto; align-items: center; gap: 8px;
    background: none; border: 1px solid var(--line); color: var(--ink);
    padding: 8px 12px; border-radius: 8px; font: 500 0.875rem var(--font-body); cursor: pointer;
  }
  .site-header.is-open .nav { display: flex; }
}

/* ---------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 600 0.9375rem/1 var(--font-body);
  padding: 14px 20px; border-radius: 8px; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background-color .15s, border-color .15s, transform .15s;
}
.btn--primary { background: var(--teal-bright); color: #052321; }
.btn--primary:hover { background: #2dd4bf; }
.btn--ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--teal); }
.btn--on-dark { border-color: var(--ledger-line); color: var(--ledger-ink); }
.btn--on-dark:hover { border-color: var(--teal-bright); }
.nav .btn { padding: 10px 16px; margin-left: 8px; }
/* The Pilot program button keeps dark text on teal in every state and theme
   (the .nav a link colors would otherwise override it) */
.nav a.btn--primary,
.nav a.btn--primary[aria-current="page"] { color: #052321; background: var(--teal-bright); box-shadow: none; border-radius: 8px; border-bottom: 0; }
.nav a.btn--primary:hover { color: #052321; background: #2dd4bf; }
.btn .arrow { transition: transform .15s; }
.btn:hover .arrow { transform: translateX(3px); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------------------------------------------------------------- Ledger band (dark) */
.ledger { background: var(--ledger); color: var(--ledger-ink); position: relative; overflow: hidden; }
.ledger h1, .ledger h2, .ledger h3 { color: #ffffff; }
.ledger .lead, .ledger .muted { color: var(--ledger-muted); }
.ledger .eyebrow { color: var(--teal-bright); }
.ledger a:not(.btn) { color: var(--teal-bright); }
.ledger::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 80% at 85% 10%, rgba(20,184,166,.16), transparent 60%),
    linear-gradient(var(--ledger-line) 1px, transparent 1px) 0 0 / 100% 48px;
  opacity: .55;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
}
.ledger > * { position: relative; }

/* ---------------------------------------------------------------- Hero */
.hero { padding-block: clamp(56px, 8vw, 104px) clamp(56px, 7vw, 96px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: var(--step-4); }
.hero h1 .accent { color: var(--teal-bright); }
.hero-copy { display: grid; gap: 24px; min-width: 0; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; font: 500 0.8125rem/1.4 var(--font-mono); color: var(--ledger-muted); }
.hero-meta strong { color: var(--ledger-ink); font-weight: 600; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }

/* Custody log (hero) */
.log {
  margin: 0;
  background: var(--ledger-2); border: 1px solid var(--ledger-line); border-radius: 14px;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.6); min-width: 0; overflow: hidden;
}
.log-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 18px; border-bottom: 1px solid var(--ledger-line);
  font: 500 0.75rem/1.3 var(--font-mono); color: var(--ledger-muted);
}
.log-head .live { display: inline-flex; align-items: center; gap: 8px; color: var(--ledger-ink); }
.log-head .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--teal-bright); box-shadow: 0 0 0 4px rgba(20,184,166,.18); }
.log-body { overflow-x: auto; }
.log table { width: 100%; border-collapse: collapse; font: 400 0.75rem/1.4 var(--font-mono); min-width: 480px; }
.log td .type { display: inline-block; min-width: 7.5ch; color: var(--ledger-muted); }
.log td .code { color: var(--ledger-muted); font-size: 0.6875rem; }
.log th { text-align: left; font-weight: 500; color: var(--ledger-muted); padding: 10px 14px; border-bottom: 1px solid var(--ledger-line); white-space: nowrap; }
.log td { padding: 8px 14px; border-bottom: 1px solid rgba(36,64,90,.55); vertical-align: top; color: var(--ledger-ink); }
.log tr:last-child td { border-bottom: 0; }
.log td.n, .log td.blk { color: var(--ledger-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.log tr.is-active td { background: rgba(20,184,166,.09); }
@media (max-width: 600px) {
  .log table { min-width: 0; }
  .log th:first-child, .log td.n { display: none; }
  .log td .type { display: block; }
}
.log-foot { padding: 12px 18px; border-top: 1px solid var(--ledger-line); font: 400 0.75rem/1.4 var(--font-mono); color: var(--ledger-muted); }

/* Decision pills */
.pill {
  display: inline-block; font: 700 0.6875rem/1 var(--font-mono); letter-spacing: 0.06em;
  padding: 5px 7px; border-radius: 4px; white-space: nowrap;
}
.pill--allow { color: var(--allow); background: var(--allow-bg); }
.pill--flag { color: var(--flag); background: var(--flag-bg); }
.pill--deny { color: var(--deny); background: var(--deny-bg); }
.ledger .pill--allow { color: #4ade80; background: rgba(74,222,128,.12); }
.ledger .pill--flag { color: #fbbf24; background: rgba(251,191,36,.12); }
.ledger .pill--deny { color: #fb7185; background: rgba(251,113,133,.12); }

/* ---------------------------------------------------------------- Proof strip */
.proof { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ledger-line); }
.proof > div { padding: 28px 24px 28px 0; display: grid; gap: 6px; align-content: start; }
.proof > div + div { padding-left: 24px; border-left: 1px solid var(--ledger-line); }
.proof .figure { font: 700 clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem)/1 var(--font-display); font-stretch: 112%; color: #ffffff; font-variant-numeric: tabular-nums; }
.proof .label { font-size: 0.875rem; color: var(--ledger-muted); line-height: 1.45; }
@media (max-width: 860px) {
  .proof { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .proof > div:nth-child(n+3) { border-top: 1px solid var(--ledger-line); }
}
.footnote { font-size: 0.8125rem; color: var(--ledger-muted); padding-bottom: 8px; }

/* ---------------------------------------------------------------- Content blocks */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; counter-reset: step; border-top: 2px solid var(--ink); }
.step { padding: 24px 28px 8px 0; display: grid; gap: 10px; align-content: start; }
.step + .step { padding-left: 28px; border-left: 1px solid var(--line); }
.step-n { font: 600 0.75rem/1 var(--font-mono); color: var(--teal); letter-spacing: .1em; }
.steps--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) and (min-width: 861px) {
  .steps--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps--4 .step:nth-child(3) { padding-left: 0; border-left: 0; }
  .steps--4 .step:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 860px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
  .step + .step { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}

.attack-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.attack { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.attack h3 { font-size: 1rem; font-weight: 650; }
@media (max-width: 600px) { .attack { grid-template-columns: minmax(0, 1fr); gap: 6px; } }

/* Threat table */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.filter {
  font: 500 0.875rem/1 var(--font-body); padding: 9px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
}
.filter[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; min-width: 640px; }
.table th {
  text-align: left; font: 600 0.6875rem/1.2 var(--font-mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-2); padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--paper-2);
}
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table td:first-child { font-weight: 600; }
.table .code { font: 500 0.78rem/1.4 var(--font-mono); color: var(--ink-2); word-break: break-word; }
.table .num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Feature grid */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.feature { background: var(--card); padding: 28px; display: grid; gap: 10px; align-content: start; }
.feature .tag { font: 600 0.6875rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--teal); }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .features { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 961px) { .feature--wide { grid-column: 1 / -1; } .feature--wide p { max-width: 72ch; } }

/* Code */
.code-block {
  background: var(--ledger); color: var(--ledger-ink); border-radius: var(--radius);
  padding: 20px 22px; overflow-x: auto; font: 400 0.8125rem/1.65 var(--font-mono); margin: 0;
  border: 1px solid var(--ledger-line);
}
.code-block .k { color: #7dd3fc; }
.code-block .s { color: #5eead4; }
.code-block .c { color: var(--ledger-muted); }

/* Journey timeline */
.journey { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: relative; margin-bottom: 8px; }
.journey::before { content: ""; position: absolute; left: 12%; right: 12%; top: 19px; height: 3px; background: var(--teal-bright); }
.stop { display: grid; justify-items: center; text-align: center; gap: 6px; position: relative; padding-inline: 8px; }
.stop .dot { width: 40px; height: 40px; border-radius: 50%; background: var(--ledger); display: grid; place-items: center; border: 3px solid var(--paper); }
.stop .dot::after { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--teal-bright); }
.stop strong { font-size: 0.9375rem; }
.stop span { font-size: 0.8125rem; color: var(--ink-2); }
.stop-events { display: grid; gap: 6px; margin-top: 10px; width: 100%; max-width: 230px; }
.stop-event { display: flex; align-items: center; gap: 8px; text-align: left; font-size: 0.8125rem; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; }
@media (max-width: 760px) {
  .journey { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .journey::before { left: 19px; right: auto; top: 20px; bottom: 20px; width: 3px; height: auto; }
  .stop { justify-items: start; text-align: left; grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; padding-inline: 0; }
  .stop .dot { grid-row: span 2; }
  .stop-events { grid-column: 2; margin-top: 4px; }
}

/* Verify demo */
.verify { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card); }
.verify-choices { padding: 24px; display: grid; gap: 8px; align-content: start; border-right: 1px solid var(--line); }
.choice { text-align: left; font: 500 0.9375rem/1.4 var(--font-body); padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; }
.choice[aria-pressed="true"] { border-color: var(--teal); background: var(--teal-wash); }
.verify-result { padding: 24px; display: grid; gap: 16px; align-content: start; }
.result-rows { display: grid; gap: 0; border-top: 1px solid var(--line); }
.result-rows div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font: 500 0.875rem/1.3 var(--font-mono); }
.verdict { font: 700 var(--step-2)/1.1 var(--font-display); font-stretch: 112%; }
.verdict.ok { color: var(--allow); }
.verdict.fail { color: var(--deny); }
@media (max-width: 760px) { .verify { grid-template-columns: minmax(0, 1fr); } .verify-choices { border-right: 0; border-bottom: 1px solid var(--line); } }

/* Phases */
.phases { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.phase { padding: 22px 24px 4px 0; display: grid; gap: 10px; align-content: start; }
.phase + .phase { padding-left: 24px; border-left: 1px solid var(--line); }
.phase .days { font: 600 0.8125rem/1 var(--font-mono); color: var(--teal); font-variant-numeric: tabular-nums; }
.phase-bar { display: grid; grid-template-columns: 15fr 15fr 45fr 15fr; gap: 4px; margin: 4px 0 28px; }
.phase-bar span { height: 10px; border-radius: 3px; background: var(--line); }
.phase-bar span:nth-child(3) { background: var(--teal-bright); }
.phase-bar-scale { position: relative; height: 1em; font: 500 0.75rem/1 var(--font-mono); color: var(--ink-2); margin-top: -18px; margin-bottom: 32px; }
.phase-bar-scale span { position: absolute; left: var(--at); transform: translateX(calc(var(--at) * -1)); white-space: nowrap; }
@media (max-width: 860px) {
  .phases { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .phase:nth-child(3) { padding-left: 0; border-left: 0; }
  .phase:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .phases { grid-template-columns: minmax(0, 1fr); }
  .phase + .phase { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checklist li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; }
.checklist li::before {
  content: ""; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%;
  background: var(--teal-wash) center / 12px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5l2.5 2.5L10 3.5' fill='none' stroke='%230f766e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- Form */
.apply { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
@media (max-width: 960px) { .apply { grid-template-columns: minmax(0, 1fr); } }
.form { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: clamp(20px, 3vw, 36px); display: grid; gap: 28px; }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 16px; }
.form legend { font: 600 0.75rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin-bottom: 4px; padding: 0; }
.fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.fields .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .fields { grid-template-columns: minmax(0, 1fr); } }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field label { font-weight: 600; font-size: 0.875rem; }
.field .hint { font-size: 0.8125rem; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; font: 400 1rem/1.4 var(--font-body); color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px;
}
.field textarea { min-height: 132px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-wash); }
.field [aria-invalid="true"] { border-color: var(--deny); }
.field .error { font-size: 0.8125rem; color: var(--deny); }
.form > .error { font-size: 0.8125rem; color: var(--deny); margin-top: -8px; }
.optional { font-weight: 400; color: var(--ink-2); }
.consent { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 0.9rem; color: var(--ink-2); }
.consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--teal); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { border-radius: 10px; padding: 16px 18px; font-size: 0.9375rem; }
.form-status.ok { background: var(--allow-bg); color: var(--ink); border: 1px solid var(--allow); }
.form-status.err { background: var(--deny-bg); color: var(--ink); border: 1px solid var(--deny); }
.form-status.info { background: var(--teal-wash); color: var(--ink); border: 1px solid var(--teal); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------------------------------------------------------------- Resources */
.docs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.doc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 12px; align-content: start; }
.doc .meta { font: 500 0.75rem/1 var(--font-mono); color: var(--ink-2); letter-spacing: .06em; }
.doc-links { display: flex; gap: 16px; margin-top: 4px; font-weight: 600; font-size: 0.9375rem; }
@media (max-width: 960px) { .docs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .docs { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- CTA + footer */
.cta { padding-block: clamp(56px, 8vw, 96px); }
.cta-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) auto; gap: 32px; align-items: end; }
@media (max-width: 760px) { .cta-grid { grid-template-columns: minmax(0, 1fr); align-items: start; } }

.site-footer { border-top: 1px solid var(--line); padding-block: 40px; font-size: 0.875rem; color: var(--ink-2); }
.footer-grid { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; justify-content: space-between; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-nav a { color: var(--ink-2); text-decoration: none; }
.footer-nav a:hover { color: var(--ink); }

/* Page header (inner pages) */
.page-hero { padding-block: clamp(48px, 7vw, 88px); }
.page-hero .stack { gap: 20px; max-width: 820px; }
.page-hero h1 { font-size: var(--step-4); }

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

/* Utilities */
.features--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 600px) { .features--2 { grid-template-columns: minmax(0, 1fr); } }
.table--compact { min-width: 0; }
.mt-s { margin-top: 14px; }
.mt-m { margin-top: 28px; }
.mb-m { margin-bottom: 32px; }
.table td.nowrap { white-space: nowrap; }
.split--code { gap: 24px; }
.split--code .code-block, .split .code-block { min-width: 0; }
.step .code { font: 500 0.78rem/1.4 var(--font-mono); color: var(--teal); word-break: break-word; }

/* API reference */
.section--tight { padding-block: clamp(36px, 5vw, 56px); }
.mb-s { margin-bottom: 16px; }
a.filter { text-decoration: none; }
a.filter:hover { color: var(--ink); border-color: var(--ink-2); }

.method { display: inline-block; min-width: 4.4em; text-align: center; font: 700 0.6875rem/1 var(--font-mono); letter-spacing: .06em; padding: 5px 7px; border-radius: 4px; background: var(--paper-2); color: var(--ink-2); }
.method--get { background: var(--allow-bg); color: var(--allow); }
.method--post { background: var(--teal-wash); color: var(--teal); }
.method--put, .method--patch { background: var(--flag-bg); color: var(--flag); }
.method--delete { background: var(--deny-bg); color: var(--deny); }
.section--tight + .section--tight { border-top: 0; }
[id] { scroll-margin-top: 84px; }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.faq-nav { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 88px); display: grid; gap: 4px; }
.faq-nav a { color: var(--ink-2); text-decoration: none; padding: 6px 0; border-left: 2px solid var(--line); padding-left: 12px; }
.faq-nav a:hover { color: var(--ink); border-left-color: var(--teal); }
.faq-group { display: grid; gap: 0; }
.faq-group + .faq-group { margin-top: 36px; }
.faq-group h2 { margin-bottom: 12px; }
.faq { border-top: 1px solid var(--line); }
.faq:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 36px 18px 0; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font: 400 1.4rem/1 var(--font-mono); color: var(--teal); }
.faq[open] summary::after { content: "–"; }
.faq summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.faq p { padding: 0 0 20px; max-width: 70ch; }
@media (max-width: 860px) { .faq-grid { grid-template-columns: minmax(0, 1fr); } .faq-nav { position: static; display: flex; flex-wrap: wrap; gap: 6px 16px; } .faq-nav a { border-left: 0; padding-left: 0; } }
.table--api { table-layout: fixed; }
.table--api .col-method { width: 96px; }
.table--api .col-path { width: 34%; }
.table--api .col-access { width: 168px; }
.table--api td.code.nowrap { white-space: normal; overflow-wrap: anywhere; }
@media (min-width: 700px) {
  .footer-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand copy" "nav nav"; gap: 20px 40px; }
  .footer-grid > .brand { grid-area: brand; }
  .footer-grid > .footer-nav { grid-area: nav; }
  .footer-grid > .footer-powered { grid-area: copy; }
}

/* Verification layer (cargo custody) */
.layer-card { max-width: 920px; margin-inline: auto; text-align: center; display: grid; gap: 18px; justify-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: calc(var(--radius) * 1.6); padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 48px); }
.layer-card h2 { text-wrap: balance; }
.layer-card .lead { max-width: 56ch; }
.layer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; width: 100%; margin-top: 10px; text-align: left; }
.layer-item { background: var(--paper-2); border-radius: var(--radius); padding: 20px; display: grid; gap: 8px; align-content: start; }
.layer-item .h3 { font-size: 1.0625rem; }
.layer-icon { color: var(--teal); }
.layer-tagline { font-weight: 600; font-size: var(--step-1); margin-top: 6px; }
.layer-cta { width: 100%; justify-content: center; background: var(--paper-2); }
@media (max-width: 760px) { .layer-grid { grid-template-columns: minmax(0, 1fr); } }

/* Technology page */
.status { justify-self: start; display: inline-block; font: 600 0.6875rem/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; padding: 5px 8px; border-radius: 4px; }
.status--now { background: var(--allow-bg); color: var(--allow); }
.status--eval { background: var(--flag-bg); color: var(--flag); }
.tech-mission { font-weight: 600; color: var(--ink); }
.tech-status { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--teal); border-radius: var(--radius); padding: 24px; display: grid; gap: 10px; align-content: start; }
.arch { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; position: relative; }
.arch::before { content: ""; position: absolute; left: 10%; right: 10%; top: 20px; height: 3px; background: var(--teal-bright); }
.arch-step { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 18px 20px; display: grid; gap: 10px; align-content: start; margin-top: 21px; }
.arch-n { width: 42px; height: 42px; margin: -21px auto 4px; border-radius: 50%; display: grid; place-items: center; background: var(--ledger); color: var(--teal-bright); font: 700 1rem/1 var(--font-mono); border: 3px solid var(--paper); }
.arch-step .h3 { font-size: 1rem; text-align: center; }
.arch-step .status { justify-self: center; }
.arch-today { border-top: 1px solid var(--line); padding-top: 10px; color: var(--ink-2); }
@media (max-width: 1100px) { .arch { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 34px; } .arch::before { display: none; } }
@media (max-width: 600px) { .arch { grid-template-columns: minmax(0, 1fr); } }
.feature--note { background: var(--teal-wash); }
.industry-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.industry { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 10px; grid-template-rows: auto auto auto 1fr auto; }
.industry .tag { font: 600 0.6875rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--teal); }
.industry-link { align-self: end; }
@media (max-width: 900px) { .industry-grid { grid-template-columns: minmax(0, 1fr); } }
.tech-signoff { font: 600 0.875rem/1.5 var(--font-mono); color: var(--ledger-muted); letter-spacing: .02em; }
.tech-signoff span { display: block; color: var(--teal-bright); }

/* Footer: technology statement and legal line */
.footer-powered { font: 600 0.75rem/1.2 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--teal); }
.footer-legal { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 20px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); font-size: var(--step--1); color: var(--ink-2); }
.footer-legal p { margin: 0; }
.footer-legal a { color: var(--ink-2); }
.footer-legal a:hover { color: var(--ink); }
.powered-by { display: inline-flex; align-items: center; gap: 10px; font: 600 0.8125rem/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--teal-bright); border: 1px solid var(--ledger-line); border-radius: 999px; padding: 9px 14px; justify-self: start; width: fit-content; }
.powered-mark { width: 8px; height: 8px; border-radius: 50%; background: var(--teal-bright); box-shadow: 0 0 0 4px rgba(20, 184, 166, .18); }

/* Legal pages */
.legal { display: grid; gap: 32px; max-width: 72ch; }
.legal-section { display: grid; gap: 12px; }
.legal p, .legal li { color: var(--ink-2); line-height: 1.65; }
.legal ul { margin: 0; padding-left: 1.25em; display: grid; gap: 6px; }
.legal strong { color: var(--ink); }
