/* ==========================================================================
   EveryO — public site
   One typeface throughout: Google Sans Code, a monospace variable font.
   Set in a single place so weight and optical sizing stay consistent.
   ========================================================================== */

:root {
  /* Type */
  --font: "Google Sans Code", ui-monospace, "SF Mono", "Cascadia Mono",
    "Roboto Mono", Menlo, Consolas, monospace;

  /* Neutrals — a cool grey ramp, not pure black, so long reading is easier */
  --ink-900: #0b1220;
  --ink-800: #131c2e;
  --ink-700: #26324a;
  --ink-500: #55627d;
  --ink-400: #78859f;
  --ink-300: #aab3c5;
  --ink-200: #d9dee8;
  --ink-100: #eef1f6;
  --ink-050: #f7f9fc;
  --white: #ffffff;

  /* Accent — a single measured blue, plus one green for verified facts.
     Deliberately restrained: one hue carries the whole identity. */
  --brand-800: #0c2f6e;
  --brand-700: #12408f;
  --brand-600: #1a56c4;
  --brand-500: #2a6fe8;
  --brand-100: #e4edfd;

  /* Cipher effect — the decoder tokens from the brief, mapped onto the
     project palette rather than the neon defaults. */
  --ink: var(--text);
  --ink-2: var(--brand-500);
  --ink-3: var(--brand-600);

  /* Motion — one easing curve and two durations, used everywhere. */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 160ms;
  --t-base: 280ms;
  --t-slow: 620ms;
  --verify-600: #12715a;
  --verify-100: #dcf3ec;
  --warn-600: #8a5a06;
  --warn-100: #fdf0d6;

  /* Semantic */
  --bg: var(--white);
  --bg-alt: var(--ink-050);
  --bg-inset: var(--ink-100);
  --surface: var(--white);
  --text: var(--ink-900);
  --text-muted: var(--ink-500);
  --text-faint: var(--ink-400);
  --border: var(--ink-200);
  --border-strong: var(--ink-300);
  --accent: var(--brand-600);
  --accent-hover: var(--brand-700);
  --accent-soft: var(--brand-100);
  --code-bg: var(--ink-900);
  --code-text: #e7ecf5;

  /* Metrics */
  --max: 1160px;
  --gutter: 24px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(11, 18, 32, 0.06), 0 1px 3px rgba(11, 18, 32, 0.04);
  --shadow-md: 0 4px 12px rgba(11, 18, 32, 0.07), 0 2px 4px rgba(11, 18, 32, 0.04);
  --shadow-lg: 0 18px 40px rgba(11, 18, 32, 0.1), 0 4px 10px rgba(11, 18, 32, 0.05);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #080d17;
    --bg-alt: #0d1422;
    --bg-inset: #131c2e;
    --surface: #0f1726;
    --text: #e9edf5;
    --text-muted: #9aa6bd;
    --text-faint: #71809a;
    --border: #1e2a40;
    --border-strong: #2b3a56;
    --accent: #6fa0ff;
    --accent-hover: #93b8ff;
    --accent-soft: #14213c;
    --code-bg: #060a12;
    --code-text: #dde5f2;
    --ink: var(--text);
    --ink-2: #8fb8ff;
    --ink-3: #6fa0ff;
    --verify-600: #59c9a8;
    --verify-100: #0e2a24;
    --warn-600: #e0b264;
    --warn-100: #2a2010;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.6);
  }
}

:root[data-theme="dark"] {
  --bg: #080d17;
  --bg-alt: #0d1422;
  --bg-inset: #131c2e;
  --surface: #0f1726;
  --text: #e9edf5;
  --text-muted: #9aa6bd;
  --text-faint: #71809a;
  --border: #1e2a40;
  --border-strong: #2b3a56;
  --accent: #6fa0ff;
  --accent-hover: #93b8ff;
  --accent-soft: #14213c;
  --code-bg: #060a12;
  --code-text: #dde5f2;
  --ink: var(--text);
  --ink-2: #8fb8ff;
  --ink-3: #6fa0ff;
  --verify-600: #59c9a8;
  --verify-100: #0e2a24;
  --warn-600: #e0b264;
  --warn-100: #2a2010;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.6);
}

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

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-optical-sizing: auto;
  font-variation-settings: "MONO" 1;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-variation-settings: "MONO" 1;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-weight: 700; font-size: clamp(2rem, 5.2vw, 3.4rem); }
h2 { font-weight: 700; font-size: clamp(1.5rem, 3.4vw, 2.15rem); }
h3 { font-weight: 600; font-size: clamp(1.1rem, 2.2vw, 1.3rem); }
h4 { font-weight: 600; font-size: 1rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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

hr { border: 0; border-top: 1px solid var(--border); margin: 0; }

code, pre, kbd { font-family: var(--font); font-variation-settings: "MONO" 1; }

code {
  font-size: 0.9em;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.12em 0.4em;
  /* API names such as init_tcp_process_group have no break opportunity, and a
     single one of them is enough to push a 320px page into a horizontal
     scroll. Prose code may break; code blocks below scroll instead. */
  overflow-wrap: anywhere;
}

pre code {
  overflow-wrap: normal;
}

pre {
  margin: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  z-index: 200;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

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

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--border); }

.section__head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 52px); }
.section__head--center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.lede {
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  color: var(--text-muted);
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}
.brand:hover { text-decoration: none; color: var(--text); }

.brand__mark {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 800;
  flex: none;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a {
  white-space: nowrap;
  display: block;
  padding: 8px 12px;
  border-radius: 7px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}
.nav__links a:hover {
  color: var(--text);
  background: var(--bg-inset);
  text-decoration: none;
}

.nav__actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  font-family: var(--font);
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; }

.nav__toggle { display: none; }

/* The inline nav collapses to a menu before its items run out of room, not at
   a round number. Nine nowrap links plus the actions need ~1150px; below that
   they would push the page wider than the viewport. */
@media (max-width: 1150px) {
  .nav__links {
    position: fixed;
    inset: 64px 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 12px var(--gutter) 20px;
    box-shadow: var(--shadow-lg);
    transform: translateY(-140%);
    transition: transform 0.24s ease;
    max-height: calc(100dvh - 64px);
    overflow-y: auto;
  }
  .nav__links[data-open="true"] { transform: translateY(0); }
  .nav__links a { padding: 12px 10px; font-size: 0.95rem; }
  .nav__toggle { display: grid; }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn svg { width: 16px; height: 16px; flex: none; }

.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); color: #fff; }

.btn--ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn--ghost:hover { background: var(--bg-inset); color: var(--text); }

.btn--sm { padding: 8px 14px; font-size: 0.82rem; }

/* Below ~360px the brand, two icon buttons and a labelled button no longer fit
   across the header. The icon still says GitHub; the word is what gives way. */
@media (max-width: 380px) {
  .btn--sm .btn__label { display: none; }
  .btn--sm { padding: 8px 10px; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding: clamp(48px, 7vw, 88px) 0 clamp(40px, 6vw, 72px);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40% 50% auto -10%;
  height: 520px;
  background: radial-gradient(closest-side, var(--accent-soft), transparent 72%);
  opacity: 0.85;
  pointer-events: none;
}

.hero__inner { position: relative; }

.hero__grid {
  display: grid;
  gap: clamp(32px, 5vw, 56px);
  align-items: center;
  grid-template-columns: 1fr;
}

@media (min-width: 1000px) {
  .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}
.pill__tag {
  white-space: nowrap;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 2px 9px;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
}

.hero h1 { margin-bottom: 20px; }
.hero h1 .accent {
  background: linear-gradient(120deg, var(--brand-500), var(--brand-700));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
:root[data-theme="dark"] .hero h1 .accent,
:root:not([data-theme="light"]) .hero h1 .accent {
  background: linear-gradient(120deg, #7fb0ff, #b9d0ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .hero h1 .accent {
    background: linear-gradient(120deg, var(--brand-500), var(--brand-700));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.hero__lede {
  font-size: clamp(1.02rem, 1.9vw, 1.2rem);
  color: var(--text-muted);
  max-width: 56ch;
  margin-bottom: 30px;
}

.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }

.hero__note {
  font-size: 0.8rem;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Code card
   -------------------------------------------------------------------------- */
.code-card {
  background: var(--code-bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.code-card__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.code-card__dots { display: flex; gap: 6px; }
.code-card__dots i {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: block;
}

.code-card__title {
  font-size: 0.76rem;
  color: rgba(231, 236, 245, 0.62);
  margin-left: 6px;
  font-weight: 500;
}

.code-card pre {
  padding: 20px;
  font-size: 0.83rem;
  line-height: 1.75;
  color: var(--code-text);
}

@media (min-width: 560px) {
  .code-card pre { font-size: 0.86rem; }
}

.tok-kw { color: #c792ea; }
.tok-fn { color: #82aaff; }
.tok-str { color: #c3e88d; }
.tok-num { color: #f78c6c; }
.tok-com { color: #6b7a99; font-style: italic; }
.tok-out { color: #59c9a8; }

/* --------------------------------------------------------------------------
   Stats
   -------------------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

@media (min-width: 760px) {
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.stat { background: var(--surface); padding: 24px 20px; }
.stat__value {
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 6px;
}
.stat__label { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }

/* --------------------------------------------------------------------------
   Cards / grids
   -------------------------------------------------------------------------- */
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }

/* Grid and flex children default to min-width:auto, which is the intrinsic
   width of their content. A wide <pre> or <table> inside one therefore widens
   the track past the viewport and the whole page scrolls sideways on a phone.
   min-width:0 lets the track shrink so the inner scroll container does its job. */
.grid > *,
.hero__grid > *,
.step > *,
.footer__grid > * { min-width: 0; }

.code-card,
.table-scroll,
.term { min-width: 0; max-width: 100%; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}

.card--flat { box-shadow: none; }

.card__icon {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}
.card__icon svg { width: 19px; height: 19px; }

.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 0; }

.card__list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  font-size: 0.86rem;
  color: var(--text-muted);
}
.card__list li {
  padding-left: 18px;
  position: relative;
  margin-bottom: 5px;
}
.card__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.55;
}

/* --------------------------------------------------------------------------
   Capability table
   -------------------------------------------------------------------------- */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 540px;
}

thead th {
  text-align: left;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  white-space: nowrap;
}

tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text-muted);
}
tbody tr:last-child td { border-bottom: 0; }
tbody td:first-child { color: var(--text); font-weight: 600; white-space: nowrap; }

.mono-num { font-variant-numeric: tabular-nums; }

/* Numeric columns read as a column only when they are right-aligned and share
   one digit width, so figures line up on the decimal point down the table. */
th.num,
td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Rows are scannable when the eye has a resting line. Kept very low contrast:
   this is a hairline, not a stripe. */
tbody tr:hover td { background: color-mix(in srgb, var(--accent) 4%, transparent); }

/* The verification matrix carries prose in its first column, so the global
   nowrap on first cells would push the table far wider than the page. */
.table--matrix tbody td:first-child { white-space: normal; }
.table--matrix { min-width: 640px; }

/* The matrix exists for its third column -- what was *not* verified. Letting
   that column sit off-screen behind a horizontal scroll on a phone would hide
   the one thing the table is for, so below 700px each row becomes a block and
   every cell carries its own heading. */
@media (max-width: 700px) {
  .table--matrix,
  .table--matrix thead,
  .table--matrix tbody,
  .table--matrix tr,
  .table--matrix td {
    display: block;
    min-width: 0;
  }
  .table--matrix thead { display: none; }
  .table--matrix tbody tr {
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
  }
  .table--matrix tbody tr:last-child { border-bottom: 0; }
  .table--matrix tbody td {
    border-bottom: 0;
    padding: 4px 18px;
  }
  .table--matrix tbody td:first-child {
    font-size: 1rem;
    padding-bottom: 10px;
  }
  .table--matrix tbody td[data-label]:not(:first-child)::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-faint);
  }
  .table--matrix tbody td[data-label="Not verified"] { padding-top: 12px; }
  /* The container's own scroll is pointless once nothing overflows it. */
  .table-scroll:has(.table--matrix) { overflow-x: visible; }
}

/* --------------------------------------------------------------------------
   Verified / status chips
   -------------------------------------------------------------------------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.chip--ok { background: var(--verify-100); color: var(--verify-600); }
.chip--plan { background: var(--bg-inset); color: var(--text-faint); }
.chip--exp { background: var(--warn-100); color: var(--warn-600); }

/* --------------------------------------------------------------------------
   Tally — a single figure stated once, for a claim the page then substantiates
   -------------------------------------------------------------------------- */
.tally {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 26px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--verify-600);
  border-radius: var(--radius);
  background: var(--surface);
}
.tally__count {
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-weight: 700;
  line-height: 1;
  color: var(--verify-600);
  letter-spacing: -0.02em;
}
.tally__text {
  font-size: 0.88rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* A heading that divides a section without starting a new one. */
.subhead {
  margin: clamp(40px, 6vw, 60px) 0 20px;
  padding-top: clamp(28px, 4vw, 40px);
  border-top: 1px solid var(--border);
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
}

/* --------------------------------------------------------------------------
   Callout
   -------------------------------------------------------------------------- */
.callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  background: var(--bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.callout strong { color: var(--text); }
.callout--warn { border-left-color: var(--warn-600); }

/* --------------------------------------------------------------------------
   Figures
   -------------------------------------------------------------------------- */
figure {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
figure img { width: 100%; }
figcaption {
  padding: 14px 18px;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

/* --------------------------------------------------------------------------
   Terminal block
   -------------------------------------------------------------------------- */
.term {
  background: var(--code-bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 0.79rem;
  line-height: 1.8;
  color: var(--code-text);
  box-shadow: var(--shadow-sm);
}
@media (min-width: 560px) { .term { font-size: 0.83rem; } }

/* --------------------------------------------------------------------------
   Steps
   -------------------------------------------------------------------------- */
.steps { counter-reset: step; display: grid; gap: 18px; }
.step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 16px;
  align-items: start;
}
.step__n {
  counter-increment: step;
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
}
.step__n::before { content: counter(step); }
.step h4 { margin-bottom: 4px; }
.step p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 10px; }

/* --------------------------------------------------------------------------
   Roadmap
   -------------------------------------------------------------------------- */
.roadmap { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.roadmap li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 0.9rem;
}
.roadmap li span { color: var(--text-muted); }
.roadmap li strong { color: var(--text); font-weight: 600; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: clamp(44px, 6vw, 68px) 0 32px;
}

.footer__grid {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  margin-bottom: 36px;
}

.footer__brand { max-width: 300px; }
.footer__brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 12px;
}

.footer h4 {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 12px;
}

.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 8px; }
.footer a { font-size: 0.87rem; color: var(--text-muted); }
.footer a:hover { color: var(--accent); }

.footer__base {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* ==========================================================================
   Cipher / decoder effect
   Scrambled characters resolve into the word, hold, then re-encrypt.
   Driven entirely by `content` on a pseudo-element with steps(1), so there
   is no interpolation and each frame lands crisply.

   The text lives in aria-label, not in the DOM: generated content is not
   dependably exposed to assistive technology, and a screen reader should be
   given the word, never the scramble.
   ========================================================================== */
.fx-decoder {
  display: inline-block;
  font-family: var(--font);
  font-weight: 700;
  font-variation-settings: "MONO" 1;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  white-space: nowrap;
  /* The scrambled frames are all the same length as "model.fit()", so the
     line never reflows and no width reservation is needed -- reserving one
     would only push the following punctuation away from the word. */
}

.fx-decoder::after {
  content: "model.fit()";
  animation: fx-decoder 7.5s steps(1) infinite;
}

@keyframes fx-decoder {
  0%       { content: "▓#☰3&*▒%@()"; color: var(--ink-3); }
  6%       { content: "m#☰3&*▒%@()"; }
  12%      { content: "mo☰3&.▒%t()"; }
  18%      { content: "mod3&.f▒t()"; }
  24%      { content: "mode1.fi▒()"; color: var(--ink-2); }
  30%, 84% { content: "model.fit()"; color: var(--ink); }
  90%      { content: "m0d3l.f1t()"; color: var(--ink-2); }
  96%      { content: "▓#d€&.▒%t()"; color: var(--ink-3); }
}

/* Someone who has asked for less motion gets the decoded word, held still. */
@media (prefers-reduced-motion: reduce) {
  .fx-decoder::after {
    content: "model.fit()";
    animation: none;
    color: var(--ink);
  }
}

/* ==========================================================================
   Scroll reveal
   The `is-ready` class is set by JavaScript. Without it nothing is hidden,
   so the page is fully readable when the script fails, is blocked, or the
   visitor has asked for reduced motion.
   ========================================================================== */
.is-ready .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity var(--t-slow) var(--ease-out),
    transform var(--t-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.is-ready .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Once it has arrived, drop the compositing hint again. */
.is-ready .reveal.is-settled { will-change: auto; }

@media (prefers-reduced-motion: reduce) {
  .is-ready .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==========================================================================
   Section numbering — a quiet structural cue, not decoration
   ========================================================================== */
.section__head { counter-increment: section; }

.eyebrow::before {
  content: counter(section, decimal-leading-zero) " / ";
  color: var(--text-faint);
  font-weight: 500;
}

body { counter-reset: section; }

.section__head--center .eyebrow::before { content: none; }

/* ==========================================================================
   Motion refinements
   One easing curve, two durations. Everything that moves uses them.
   ========================================================================== */
.card {
  transition:
    transform var(--t-base) var(--ease),
    box-shadow var(--t-base) var(--ease),
    border-color var(--t-base) var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
  }

  .roadmap li {
    transition: border-color var(--t-base) var(--ease), transform var(--t-base) var(--ease);
  }
  .roadmap li:hover {
    border-color: var(--border-strong);
    transform: translateX(3px);
  }

  figure {
    transition: box-shadow var(--t-base) var(--ease), transform var(--t-base) var(--ease);
  }
  figure:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
  }
}

.btn {
  transition:
    background var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease);
}
.btn:active { transform: translateY(1px); }

.nav__links a {
  position: relative;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

/* Active-section indicator, set by the scrollspy. */
.nav__links a[aria-current="true"] { color: var(--text); }
.nav__links a[aria-current="true"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform-origin: left;
  animation: nav-underline var(--t-base) var(--ease-out);
}

@keyframes nav-underline {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}

@media (max-width: 900px) {
  .nav__links a[aria-current="true"]::after { display: none; }
  .nav__links a[aria-current="true"] { background: var(--bg-inset); }
}

/* The hero wash drifts slowly rather than sitting static. */
@media (prefers-reduced-motion: no-preference) {
  .hero::before { animation: hero-drift 26s var(--ease) infinite alternate; }
}

@keyframes hero-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(3%, 2%, 0) scale(1.08); }
}

/* Tabular figures so a counting number does not jitter mid-animation. */
.stat__value { font-variant-numeric: tabular-nums; }

.stat {
  transition: background var(--t-base) var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .stat:hover { background: var(--bg-alt); }
}

/* ==========================================================================
   Corporate detail: a fine rule above each section heading
   ========================================================================== */
.section__head .eyebrow {
  padding-top: 14px;
  border-top: 2px solid var(--accent);
}
.section__head--center .eyebrow { border-top: 0; padding-top: 0; }

/* ==========================================================================
   Custom scrollbars
   Replaces the operating system's scrollbar with one that belongs to the
   page. Implemented in CSS only: a JavaScript scroll hijack would break
   keyboard paging, momentum scrolling, find-in-page and every assistive
   technology that relies on the real scroll position.

   Firefox gets the standard two-value `scrollbar-color`; WebKit and Blink
   get the pseudo-elements. Both are progressive — an engine that supports
   neither simply shows its native bar.
   ========================================================================== */
:root {
  --scroll-track: var(--bg-alt);
  --scroll-thumb: var(--ink-300);
  --scroll-thumb-hover: var(--brand-600);
  --scroll-size: 12px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --scroll-track: #0b1220;
    --scroll-thumb: #2b3a56;
    --scroll-thumb-hover: var(--accent);
  }
}

:root[data-theme="dark"] {
  --scroll-track: #0b1220;
  --scroll-thumb: #2b3a56;
  --scroll-thumb-hover: var(--accent);
}

/* The standard properties and the WebKit pseudo-elements are mutually
   exclusive in Blink: if `scrollbar-color` is set, Chromium ignores every
   ::-webkit-scrollbar rule and falls back to a plain thin bar. So the
   standard properties are scoped to engines that have no pseudo-element
   support -- Firefox -- and Chromium and Safari get the fuller treatment. */
@supports not selector(::-webkit-scrollbar) {
  html {
    scrollbar-width: thin;
    scrollbar-color: var(--scroll-thumb) var(--scroll-track);
  }
}

*::-webkit-scrollbar {
  width: var(--scroll-size);
  height: var(--scroll-size);
}

*::-webkit-scrollbar-track {
  background: var(--scroll-track);
}

*::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 99px;
  /* A transparent border with background-clip gives the thumb breathing room
     without needing a second element. */
  border: 3px solid transparent;
  background-clip: content-box;
  transition: background-color var(--t-fast) var(--ease);
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-thumb-hover);
  background-clip: content-box;
}

*::-webkit-scrollbar-corner { background: var(--scroll-track); }

/* Inner scrollers — code blocks and wide tables — get a slimmer bar that
   reads as part of the panel rather than the page. */
.code-card pre::-webkit-scrollbar,
.term::-webkit-scrollbar,
.table-scroll::-webkit-scrollbar { height: 9px; width: 9px; }

.code-card pre::-webkit-scrollbar-track,
.term::-webkit-scrollbar-track { background: transparent; }

.code-card pre::-webkit-scrollbar-thumb,
.term::-webkit-scrollbar-thumb {
  background: rgba(231, 236, 245, 0.22);
  background-clip: content-box;
  border: 2px solid transparent;
}

.code-card pre::-webkit-scrollbar-thumb:hover,
.term::-webkit-scrollbar-thumb:hover {
  background: rgba(231, 236, 245, 0.42);
  background-clip: content-box;
}

@supports not selector(::-webkit-scrollbar) {
  .code-card pre,
  .term,
  .table-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(231, 236, 245, 0.28) transparent;
  }
}

/* ==========================================================================
   Scroll progress
   A hairline across the top of the sticky header. Width is set by script
   from the real scroll position, so it reports scrolling rather than
   replacing it.
   ========================================================================== */
.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--brand-500), var(--brand-700));
  transition: width 80ms linear;
  pointer-events: none;
  z-index: 2;
}

:root[data-theme="dark"] .scroll-progress,
:root:not([data-theme="light"]) .scroll-progress {
  background: linear-gradient(90deg, var(--accent), #b9d0ff);
}

@media (prefers-reduced-motion: reduce) {
  .scroll-progress { transition: none; }
}

/* ==========================================================================
   Sponsors and advertising
   Self-hosted slots. No third-party script, no cookie, no tracking pixel —
   which is what lets the footer keep saying the site collects nothing.
   ========================================================================== */
.ads { padding-block: clamp(44px, 6vw, 72px); }

.ads__label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 20px;
}
.ads__label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.ad-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.ad-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 168px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition:
    border-color var(--t-base) var(--ease),
    transform var(--t-base) var(--ease),
    box-shadow var(--t-base) var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .ad-slot:hover {
    border-color: var(--border-strong);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
  }
}

.ad-slot__tag {
  align-self: flex-start;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 9px;
  margin-bottom: 16px;
}

.ad-slot h3 { font-size: 1rem; margin-bottom: 6px; }
.ad-slot p { font-size: 0.86rem; color: var(--text-muted); margin-bottom: 0; }
.ad-slot__cta {
  margin-top: auto;
  padding-top: 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
}

/* The empty slot, shown until a sponsor fills it. Dashed rather than solid so
   it never reads as a real placement. */
.ad-slot--open {
  border-style: dashed;
  background: var(--bg-alt);
  align-items: flex-start;
  justify-content: center;
}
.ad-slot--open h3 { color: var(--text-muted); }

/* Where a third-party ad unit would mount, if one is ever switched on. */
.ad-unit {
  display: block;
  width: 100%;
  min-height: 90px;
}

/* ==========================================================================
   Design refinement pass
   Tighter vertical rhythm, a firmer typographic hierarchy and quieter
   surfaces. The aim is a page that reads as a product document rather than
   a landing page.
   ========================================================================== */

/* Denser, more deliberate type scale. Monospace runs wide, so the headline
   sizes are pulled back and the tracking tightened to compensate. */
h1 { letter-spacing: -0.035em; line-height: 1.08; }
h2 { letter-spacing: -0.028em; line-height: 1.16; }
h3 { letter-spacing: -0.018em; }

.lede { max-width: 68ch; }

/* Measured line length. Monospace at full container width is tiring to read. */
.card p,
.card__list { max-width: 62ch; }

/* A hairline rule between major sections instead of relying on fill alone,
   so the structure survives in both themes. */
.section + .section { border-top: 1px solid var(--border); }
.section--alt + .section--alt { border-top: 0; }

/* Panels sit flatter. Shadows are for things that genuinely float. */
.card { box-shadow: none; }
.card--flat { background: var(--bg-alt); }

figure { box-shadow: none; }

/* Stat band: heavier numerals, quieter labels, and a top rule that ties it
   to the section headings. */
.stats { border-radius: var(--radius); }
.stat { padding: 26px 22px; }
.stat__value { letter-spacing: -0.04em; }
.stat__label {
  font-size: 0.78rem;
  color: var(--text-faint);
  line-height: 1.55;
}

/* Tables read as data, not as prose. */
thead th { font-size: 0.68rem; letter-spacing: 0.12em; }
tbody td { font-size: 0.86rem; padding: 15px 18px; }
tbody tr { transition: background var(--t-fast) var(--ease); }
@media (hover: hover) and (pointer: fine) {
  tbody tr:hover { background: var(--bg-alt); }
}

/* Callouts lose the tinted fill and keep only the rule — less shouting. */
.callout {
  background: transparent;
  border: 0;
  border-left: 2px solid var(--accent);
  border-radius: 0;
  padding: 4px 0 4px 20px;
}
.callout--warn { border-left-color: var(--warn-600); }

/* Chips: flatter, with a hairline instead of a fill in the neutral case. */
.chip { padding: 4px 10px; letter-spacing: 0.01em; }
.chip--plan { background: transparent; border: 1px solid var(--border); }

/* Header: thinner, with the rule carried by the progress bar's track. */
.nav { height: 60px; }
.site-header { border-bottom-color: var(--border); }

/* Hero: calmer wash, firmer pill. */
.hero::before { opacity: 0.6; }
.pill { box-shadow: none; background: var(--bg-alt); }

/* Code panels: squarer corners read as more technical. */
.code-card { border-radius: var(--radius); }
.term { border-radius: 8px; }

/* Footer: a quieter close. */
.site-footer { background: var(--bg); }
.footer__base { font-size: 0.78rem; }

/* Roadmap rows sit on the page rather than on cards. */
.roadmap li { background: transparent; }

/* Consistent focus ring on every interactive surface. */
.ad-slot:focus-visible,
.card a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
