/*
 * The site's one stylesheet — the Claude Design board's "Keel Website", built as static
 * pages. Every page links it; nothing is styled inline.
 *
 * The token NAMES are the design system's (`--bg`, `--ink`, `--accent`…), so the board and
 * this file read the same. The VALUES are copied from `src/design/tokens.ts` — the app
 * imports them, and these static pages have no build step that could. `page.test.ts`
 * fails if a hex here is not one of the app's, and `contrast.test.ts` computes every pair
 * of them that puts a word on a ground.
 */

/* ── The board's faces ────────────────────────────────────────────────────────
   Space Grotesk for display, IBM Plex Sans for body, IBM Plex Mono for figures in the
   working — the weights the Keel Website board sets. The site draws more than the app's
   four files (Q15 is the APP's rule); Ihor chose the board's faces for the site, 23 Sep.

   SELF-HOSTED, copied out of node_modules by `scripts/build-web.mjs`. A link to
   fonts.googleapis.com would send every visitor's IP to Google from a site whose
   whole argument is that Keel does not do that. */
@font-face {
  font-family: 'Space Grotesk';
  src: url('/fonts/SpaceGrotesk-400.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('/fonts/SpaceGrotesk-500.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('/fonts/SpaceGrotesk-600.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('/fonts/IBMPlexSans-400.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('/fonts/IBMPlexSans-500.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('/fonts/IBMPlexSans-600.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/IBMPlexMono-400.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/IBMPlexMono-500.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}

:root {
  --bg: #f7f5f1;
  --surface: #ffffff;
  --surface-sunken: #efebe4;
  --hairline: #ddd7ce;
  --ink: #141c24;
  --ink-muted: #5b6672;
  --ink-faint: #646b73;
  --accent: #1f4e6b;
  --accent-press: #173a50;
  --accent-soft: #e4ecf1;
  --on-accent: #ffffff;
  --protected: #2e7d6b;
  --protected-soft: #dcebe5;
  --protected-text: #2b7464;
  --at-risk: #c2762c;
  --at-risk-soft: #f5e7d4;
  --at-risk-text: #965b22;
  --danger: #b3402f;
  /* The phone's bezel round a screenshot. The same in both schemes: it is a device. */
  --device: #141c24;

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

  --font-display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-sans: 'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --measure: 1200px;
  --gutter: 24px;
  --head: 68px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e141a;
    --surface: #161e26;
    --surface-sunken: #0a0f14;
    --hairline: #3c4a57;
    --ink: #ede8e1;
    --ink-muted: #9aa5b1;
    --ink-faint: #7a8793;
    --accent: #6fa8cc;
    --accent-press: #8fbedb;
    --accent-soft: #1b2a34;
    --on-accent: #0a0f14;
    --protected: #4fa98f;
    --protected-soft: #17332c;
    --protected-text: #4fa98f;
    --at-risk: #d89a4e;
    --at-risk-soft: #3a2c18;
    --at-risk-text: #d89a4e;
    --danger: #e0705c;
    color-scheme: dark;
  }
}

/* ── Base ─────────────────────────────────────────────────────────────────── */
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  scroll-padding-top: calc(var(--head) + 16px);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/26px var(--font-sans);
  /* Only the weights declared above. A browser asked for one it does not hold would
     SYNTHESISE it — a bold that exists in no font file. */
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: var(--accent-press);
}
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
img {
  max-width: 100%;
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
strong {
  font-weight: 600;
  color: var(--ink);
}
.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── Type ─────────────────────────────────────────────────────────────────── */
.eyebrow {
  font: 600 13px/18px var(--font-sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.eyebrow-risk {
  color: var(--at-risk-text);
}
.hero-title {
  margin-top: 24px;
  font: 500 clamp(44px, 6vw, 76px) / 1.02 var(--font-display);
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.page-title {
  margin-top: 16px;
  max-width: 760px;
  font: 500 clamp(40px, 5vw, 64px) / 1.04 var(--font-display);
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.section-title {
  margin-top: 16px;
  font: 500 clamp(34px, 4vw, 52px) / 1.08 var(--font-display);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.lede {
  margin-top: 24px;
  max-width: 540px;
  font: 400 19px/30px var(--font-sans);
  color: var(--ink-muted);
  text-wrap: pretty;
}
.fine {
  font: 400 14px/21px var(--font-sans);
  color: var(--ink-muted);
  text-wrap: pretty;
}
.cite {
  font: 400 13px/19px var(--font-sans);
  color: var(--ink-faint);
  text-wrap: pretty;
}
.num {
  font-variant-numeric: tabular-nums;
}

/* ── Buttons and fields — the design system's Button, Field and Chip ─────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 13px 24px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--on-accent);
  font: 600 16px/24px var(--font-sans);
  white-space: nowrap;
  cursor: pointer;
}
.btn:hover {
  background: var(--accent-press);
  color: var(--on-accent);
}
.btn:disabled {
  opacity: 0.38;
  cursor: default;
}
.btn-block {
  display: flex;
  width: 100%;
}
.btn-quiet {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--hairline);
}
.btn-quiet:hover {
  background: var(--surface-sunken);
  color: var(--ink);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.field-label {
  font: 600 13px/18px var(--font-sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.input {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  /* The design system's Field: a hairline at rest, 2px accent in focus, 2px danger in
     error. The hairline is 1.31:1 against the page — under WCAG 1.4.11's 3:1 — and the
     board draws it anyway; Ihor chose the board, 23 Sep. The app's field is Q43. */
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: 400 16px/24px var(--font-sans);
}
.input-num {
  font: 400 32px/1 var(--font-display);
  font-variant-numeric: tabular-nums;
}
.input:focus {
  outline: none;
  border: 2px solid var(--accent);
  padding: 0 13px;
}
/* The board's message box is not the Field component: a darker stroke, and a browser outline. */
textarea.input {
  min-height: 150px;
  padding: 14px 16px;
  border: 1px solid var(--ink-faint);
  resize: vertical;
}
textarea.input:focus {
  border: 1px solid var(--ink-faint);
  padding: 14px 16px;
  outline: 2px solid var(--accent);
}
.input[aria-invalid='true'] {
  border: 2px solid var(--danger);
  padding: 0 13px;
}
textarea.input[aria-invalid='true'] {
  padding: 13px 15px;
}
.field-error {
  font: 400 14px/20px var(--font-sans);
  color: var(--danger);
}
.field-hint {
  font: 400 14px/20px var(--font-sans);
  color: var(--ink-muted);
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: 600 15px/20px var(--font-sans);
  cursor: pointer;
}
.chip[aria-pressed='true'] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.icon {
  flex: none;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-accent {
  color: var(--accent);
}
.icon-protected {
  color: var(--protected);
}

/* ── Header ───────────────────────────────────────────────────────────────── */
.sitehead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--hairline);
}
.sitehead-in {
  min-height: var(--head);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  color: var(--ink);
}
.brand:hover {
  color: var(--ink);
}
.brand-mark {
  width: 30px;
  height: 30px;
}
.brand-word {
  display: flex;
  align-items: baseline;
  font: 500 25px/1 var(--font-display);
  letter-spacing: -0.012em;
}
.brand-word .ee {
  letter-spacing: -0.052em;
}
.brand-word svg {
  width: 0.222em;
  height: 0.723em;
  margin-left: 0.03em;
}
.sitenav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.sitenav a {
  padding: 6px 0 4px;
  border-bottom: 2px solid transparent;
  font: 500 15px/20px var(--font-sans);
  color: var(--ink-muted);
  white-space: nowrap;
}
.sitenav a[aria-current='page'] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.headcta {
  min-height: 40px;
  padding: 8px 18px;
  font-size: 15px;
  line-height: 24px;
}

/* A phone: the wordmark and the nav on two rows, the nav scrolling rather than wrapping. */
@media (max-width: 820px) {
  .sitehead-in {
    flex-wrap: wrap;
    row-gap: 0;
    padding-top: 12px;
  }
  .sitenav {
    order: 3;
    width: 100%;
    gap: 22px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .sitenav a {
    padding: 10px 0 8px;
  }
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.sitefoot {
  border-top: 1px solid var(--hairline);
  background: var(--surface);
}
.foot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 40px;
  padding-top: 56px;
  padding-bottom: 40px;
}
.foot-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font: 400 15px/22px var(--font-sans);
}
.foot-head {
  font: 600 12px/16px var(--font-sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.foot-blurb {
  max-width: 260px;
  font: 400 14px/21px var(--font-sans);
  color: var(--ink-muted);
}
.foot-col .brand-mark {
  width: 26px;
  height: 26px;
}
.foot-col .brand-word {
  font-size: 22px;
}
.foot-note {
  padding-top: 20px;
  padding-bottom: 32px;
  border-top: 1px solid var(--hairline);
}

/* ── Home · hero ──────────────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
  gap: 64px;
  align-items: center;
  padding-top: 80px;
  padding-bottom: 96px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-full);
  background: var(--surface);
  font: 600 12px/1 var(--font-sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
}
.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--at-risk);
}
.signup-slot {
  margin-top: 36px;
  max-width: 560px;
}
.signup {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}
.signup .field {
  flex: 1 1 260px;
}
.signup .btn {
  flex: 1 0 auto;
}
.signup .field-error {
  flex-basis: 100%;
}
.notice {
  display: flex;
  gap: 16px;
  align-items: center;
  max-width: 520px;
  padding: 20px 24px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--surface);
  font: 400 16px/24px var(--font-sans);
}
.hero .fine {
  margin-top: 16px;
  max-width: 520px;
}
.hero-shot {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 16px 0;
}
.hero-shot::before {
  content: '';
  position: absolute;
  inset: 0 6%;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--at-risk-soft), transparent);
}
.phone {
  position: relative;
  width: min(100%, 330px);
  padding: 11px;
  border-radius: 52px;
  background: var(--device);
}
.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 42px;
}

/* ── Home · who it is for ─────────────────────────────────────────────────── */
.band {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background: var(--surface);
}
.meds {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 48px;
  padding-top: 24px;
  padding-bottom: 24px;
}
.meds ul {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 16px 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.meds li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}
.med-brand {
  font: 500 21px/1 var(--font-display);
  letter-spacing: -0.01em;
}
.med-drug {
  font: 400 13px/1 var(--font-sans);
  color: var(--ink-muted);
}

/* ── Home · sections ──────────────────────────────────────────────────────── */
.section {
  padding-top: 112px;
  padding-bottom: 112px;
}
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 64px;
}
.split-end {
  align-items: end;
}
.split-center {
  align-items: center;
}
.title-wide {
  max-width: 720px;
}
.section-lede {
  margin-top: 24px;
  max-width: 520px;
  font: 400 18px/28px var(--font-sans);
  color: var(--ink-muted);
  text-wrap: pretty;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.stat {
  padding: 32px;
}
.stat + .stat {
  border-left: 1px solid var(--hairline);
}
.stat-figure {
  font: 500 72px/1 var(--font-display);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stat-figure small {
  font-size: 0.45em;
  letter-spacing: 0;
}
.stat-label {
  margin-top: 12px;
  font: 400 15px/22px var(--font-sans);
  color: var(--ink-muted);
}
.stats .cite {
  grid-column: 1 / -1;
  padding: 14px 32px;
  border-top: 1px solid var(--hairline);
}
@media (max-width: 480px) {
  .stat {
    padding: 24px 20px;
  }
  .stat-figure {
    font-size: 56px;
  }
  .stats .cite {
    padding: 14px 20px;
  }
}

.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 40px 32px;
  margin-top: 64px;
}
.shot {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.shot-frame {
  display: flex;
  justify-content: center;
  height: 440px;
  padding: 32px 40px 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface-sunken);
}
.shot-frame .phone {
  max-width: 250px;
  height: max-content;
  padding: 9px 9px 0;
  border-radius: 40px 40px 0 0;
}
.shot-frame .phone img {
  border-radius: 32px 32px 0 0;
}
.shot figcaption {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.shot-n {
  font: 500 15px/1 var(--font-mono);
  color: var(--ink-faint);
}
.shot-title {
  font: 600 20px/28px var(--font-sans);
}
.shot-body {
  font: 400 16px/25px var(--font-sans);
  color: var(--ink-muted);
  text-wrap: pretty;
}

.head-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
}
.head-row .section-title {
  margin: 0;
  max-width: 640px;
}
.head-row p {
  max-width: 400px;
  font: 400 17px/26px var(--font-sans);
  color: var(--ink-muted);
}
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  column-gap: 32px;
  margin: 56px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--hairline);
}
.features li {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 32px 0;
  border-bottom: 1px solid var(--hairline);
}
.feature-title {
  margin-top: 10px;
  font: 600 18px/26px var(--font-sans);
}
.feature-body {
  font: 400 15px/23px var(--font-sans);
  color: var(--ink-muted);
  text-wrap: pretty;
}

/* The privacy band is always dark — the board sets it with data-theme="dark". Its tokens
   are redefined below, after the scheme block, to the dark scheme's own values. */
.privacy-band {
  background: var(--bg);
  color: var(--ink);
}
.privacy-band .eyebrow,
.privacy-band .section-lede {
  color: var(--ink-muted);
}
.privacy-band .section-lede {
  max-width: none;
}
.band-link {
  display: inline-block;
  margin-top: 24px;
  font: 600 16px/24px var(--font-sans);
  color: var(--accent);
}
.points {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.points li {
  display: flex;
  gap: 16px;
  padding: 22px 28px;
  font: 400 16px/25px var(--font-sans);
}
.points li + li {
  border-top: 1px solid var(--hairline);
}
.points .icon {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  color: var(--protected);
}

.teaser {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  background: var(--surface);
}
.teaser > div {
  padding: clamp(32px, 5vw, 56px);
}
.teaser-title {
  margin-top: 16px;
  font: 500 clamp(32px, 3.6vw, 46px) / 1.08 var(--font-display);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.teaser p {
  margin-top: 16px;
  max-width: 440px;
  font: 400 17px/27px var(--font-sans);
  color: var(--ink-muted);
}
.teaser .btn {
  margin-top: 28px;
}
.teaser-example {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background:
    radial-gradient(closest-side, var(--protected-soft), transparent), var(--surface-sunken);
}
.big-figure {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 12px;
}
.big-figure span:first-child {
  font: 500 104px/1 var(--font-display);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.big-figure span + span {
  font: 500 30px/1 var(--font-display);
}
.teaser-working {
  margin-top: 10px;
  font: 400 14px/20px var(--font-mono);
  color: var(--ink-muted);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 64px;
  padding-bottom: 112px;
}
.faq-title {
  font: 500 clamp(34px, 4vw, 48px) / 1.08 var(--font-display);
  letter-spacing: -0.02em;
}
.faq-grid > div > p {
  margin-top: 20px;
  font: 400 17px/26px var(--font-sans);
  color: var(--ink-muted);
}
.faq {
  border-top: 1px solid var(--hairline);
}
.faq details {
  border-bottom: 1px solid var(--hairline);
}
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 0;
  font: 600 17px/25px var(--font-sans);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  flex: none;
  font: 400 24px/1 var(--font-sans);
  color: var(--ink-muted);
}
.faq details[open] summary::after {
  content: '−';
}
.faq details p {
  padding: 0 40px 24px 0;
  font: 400 16px/25px var(--font-sans);
  color: var(--ink-muted);
  text-wrap: pretty;
}

/* ── Inner pages ──────────────────────────────────────────────────────────── */
.page {
  padding-top: 72px;
  padding-bottom: 112px;
}
.page-lede {
  margin-top: 20px;
  max-width: 600px;
  font: 400 18px/28px var(--font-sans);
  color: var(--ink-muted);
  text-wrap: pretty;
}
.panel {
  padding: 32px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
@media (max-width: 480px) {
  .panel {
    padding: 24px 20px;
  }
}

/* ── The calculator ───────────────────────────────────────────────────────── */
.calc {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 32px;
  margin-top: 48px;
  align-items: start;
}
.calc-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
}
.seg button {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-muted);
  font: 600 15px/20px var(--font-sans);
  cursor: pointer;
}
.seg button[aria-checked='true'] {
  border-color: var(--hairline);
  background: var(--surface);
  color: var(--ink);
}
.bands {
  margin: 0;
  padding: 0;
  border: none;
}
.bands legend {
  margin-bottom: 10px;
  padding: 0;
  font: 600 15px/20px var(--font-sans);
}
.bands-list {
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
}
.band-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  color: var(--ink);
  font: 400 15px/22px var(--font-sans);
  cursor: pointer;
}
.band-option + .band-option {
  border-top: 1px solid var(--hairline);
}
.band-option:has(input:checked) {
  background: var(--accent-soft);
  font-weight: 600;
}
.band-option input {
  appearance: none;
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1.5px solid var(--ink-faint);
  border-radius: 50%;
  background: var(--surface);
}
.band-option input:checked {
  border: 6px solid var(--accent);
}
.band-option span:first-of-type {
  flex: 1;
}
.band-coef {
  font: 400 14px/20px var(--font-mono);
  color: var(--ink-muted);
}

.result {
  position: sticky;
  top: calc(var(--head) + 24px);
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.result-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 32px 40px;
  text-align: center;
  background: radial-gradient(closest-side, var(--protected-soft), transparent);
}
.floor {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 12px;
}
.floor-figure {
  font: 500 120px/1 var(--font-display);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.floor-unit {
  font: 500 36px/1 var(--font-display);
}
.floor-per {
  margin-top: 8px;
  font: 400 16px/24px var(--font-sans);
  color: var(--ink-muted);
}
.permeal {
  display: flex;
  align-items: center;
  min-height: 32px;
  margin-top: 20px;
  padding: 0 14px;
  border-radius: var(--radius-full);
  background: var(--protected-soft);
  color: var(--protected-text);
  font: 600 13px/1 var(--font-sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.permeal:empty {
  display: none;
}
.working {
  margin: 0;
  border-top: 1px solid var(--hairline);
}
.working div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 32px;
  border-bottom: 1px solid var(--hairline);
  font: 400 15px/22px var(--font-sans);
}
.working dt {
  color: var(--ink-muted);
}
.working dd {
  margin: 0;
  color: var(--ink);
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.working-line {
  padding: 20px 32px 0;
  font: 400 15px/23px var(--font-sans);
  color: var(--ink);
  text-wrap: pretty;
}
.result-foot {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px 32px 32px;
}
@media (max-width: 480px) {
  .result-head {
    padding: 36px 20px 32px;
  }
  .floor-figure {
    font-size: 96px;
  }
  .working div {
    padding: 14px 20px;
  }
  .working-line {
    padding: 20px 20px 0;
  }
  .result-foot {
    padding: 24px 20px 28px;
  }
}

/* ── Contact ──────────────────────────────────────────────────────────────── */
.contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 64px;
  align-items: start;
}
.contact .page-lede {
  max-width: 460px;
}
.notes {
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--hairline);
}
.notes li {
  display: flex;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--hairline);
}
.notes .icon {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: var(--accent);
}
.note-title {
  font: 600 16px/24px var(--font-sans);
}
.note-body {
  margin-top: 4px;
  font: 400 15px/23px var(--font-sans);
  color: var(--ink-muted);
  text-wrap: pretty;
}
.contact-aside {
  margin-top: 24px;
  font: 400 15px/23px var(--font-sans);
  color: var(--ink-muted);
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.group-label {
  margin-bottom: 10px;
  font: 600 15px/20px var(--font-sans);
}

/* ── Support, terms, privacy ──────────────────────────────────────────────── */
.doc-head {
  max-width: 760px;
}
.doc-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 56px;
  margin-top: 64px;
  align-items: start;
}
.toc {
  position: sticky;
  top: calc(var(--head) + 24px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 1px solid var(--hairline);
}
.toc .eyebrow {
  padding: 0 0 10px 18px;
}
.toc a {
  padding: 6px 0 6px 18px;
  font: 400 14px/20px var(--font-sans);
  color: var(--ink-muted);
}
.toc a:hover {
  color: var(--ink);
}
.prose {
  max-width: 680px;
}
.prose section {
  padding: 32px 0;
  border-top: 1px solid var(--hairline);
}
.prose h2 {
  font: 600 22px/30px var(--font-sans);
  letter-spacing: -0.005em;
}
.prose h3 {
  margin-top: 24px;
  font: 600 17px/26px var(--font-sans);
  color: var(--ink);
}
.prose p,
.prose li {
  font: 400 17px/28px var(--font-sans);
  color: var(--ink-muted);
  text-wrap: pretty;
}
.prose p {
  margin-top: 14px;
}
.prose ul {
  margin: 14px 0 0;
  padding-left: 22px;
}
.prose li + li {
  margin-top: 8px;
}
.unclear {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding: 28px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--surface);
  font: 400 16px/24px var(--font-sans);
}
.unclear .btn {
  min-height: 44px;
  padding: 10px 18px;
  font-size: 15px;
}
/* The privacy page's four summary cards, above the index. */
.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}
.summary li {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.summary .icon {
  width: 22px;
  height: 22px;
}
.summary-title {
  font: 600 16px/24px var(--font-sans);
}
.summary-body {
  font: 400 15px/23px var(--font-sans);
  color: var(--ink-muted);
  text-wrap: pretty;
}
@media (max-width: 900px) {
  .doc-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    margin-top: 40px;
  }
  .toc {
    position: static;
  }
}

/* ── The always-dark privacy band ─────────────────────────────────────────────
   Last in the file on purpose: `contrast.test.ts` reads the light values from before
   the scheme block and the dark values from after it, and these ARE the dark values —
   so the band is measured with the dark scheme's pairs, in either scheme. */
.privacy-band {
  --bg: #0e141a;
  --surface: #161e26;
  --hairline: #3c4a57;
  --ink: #ede8e1;
  --ink-muted: #9aa5b1;
  --accent: #6fa8cc;
  --accent-press: #8fbedb;
  --protected: #4fa98f;
  color-scheme: dark;
}
