/* Peregrine site stylesheet.
   One file for every static page. Tokens first, then base, then components.
   Class names follow block__element--modifier. State classes start with is-. */

/* ---------- Tokens ---------- */
:root {
  --ink: #0B1020;
  --ink-2: #0E1426;
  --ink-3: #1B2338;
  --ink-line: #232C44;
  --paper: #FBFAF8;
  --surface: #FFFFFF;

  --sky: #19B4F5;
  --sky-deep: #0B76C4;
  --sky-tint: #E3F5FE;
  --sun: #FFAF1A;
  --sun-deep: #9A5B06;
  --sun-tint: #FFF3DC;
  --violet: #8E5BFF;
  --violet-fill: #7A45F0;
  --violet-deep: #6A2FCB;
  --violet-light: #A97BFF;
  --violet-tint: #F1EBFF;

  --text: #0B1020;
  --body: #4A5265;
  --muted: #616A7C;
  --micro: #6F695C;
  --on-dark: #FFFFFF;
  --on-dark-body: #9AA3B8;
  --on-dark-muted: #8B94AA;

  --rule: #E7E4DC;
  --rule-soft: #EEEBE4;
  --rule-strong: #D5D1C8;

  --font-sans: 'Instrument Sans', -apple-system, 'Helvetica Neue', Helvetica, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --container: 1200px;
  --gutter: 32px;
  --header-h: 72px;
  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 16px;
  --shadow-panel: 0 24px 48px -24px rgba(11, 16, 32, 0.28), 0 2px 6px rgba(11, 16, 32, 0.05);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}
h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--sky-deep); text-decoration: none; }
a:hover { color: #075D96; }
button { font: inherit; color: inherit; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--sky-deep); outline-offset: 3px; border-radius: 4px; }
.section--dark :focus-visible, .site-footer :focus-visible { outline-color: var(--sky); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  padding: 10px 16px; border-radius: var(--radius-s);
  background: var(--ink); color: var(--on-dark); font-weight: 600;
}
.skip-link:focus { top: 12px; color: var(--on-dark); }

.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--font-mono); }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Accent bar (3.2 / 1.9 / 1.1, the logo ratio) ---------- */
.accent-bar { display: flex; height: 5px; }
.accent-bar__sky { flex: 3.2; background: var(--sky); }
.accent-bar__sun { flex: 1.9; background: var(--sun); }
.accent-bar__violet { flex: 1.1; background: var(--violet); }
.accent-bar--reverse { flex-direction: row-reverse; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 24px; border-radius: 9px; border: 1px solid transparent;
  font-size: 15.5px; font-weight: 600; white-space: nowrap; cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.btn--sm { height: 38px; padding: 0 18px; font-size: 14px; border-radius: var(--radius-s); }
.btn--lg { height: 52px; padding: 0 28px; font-size: 16px; }
.btn--primary { background: var(--violet-fill); color: var(--on-dark); font-weight: 700; }
.btn--primary:hover { background: var(--violet-deep); color: var(--on-dark); }
.btn--ink { background: var(--ink); color: var(--on-dark); }
.btn--ink:hover { background: var(--ink-3); color: var(--on-dark); }
.btn--sky { background: var(--sky-deep); color: var(--on-dark); }
.btn--sky:hover { background: #075D96; color: var(--on-dark); }
.btn--outline { background: var(--surface); border-color: var(--rule-strong); color: var(--text); }
.btn--outline:hover { border-color: var(--ink); color: var(--text); }
.btn--outline-dark { border-color: #2A3350; color: var(--on-dark); }
.btn--outline-dark:hover { border-color: var(--violet); color: var(--on-dark); }
.btn__arrow { transition: transform .16s ease; }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* ---------- Brand ---------- */
.brand {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--text); font-weight: 600; font-size: 18px; letter-spacing: -0.03em;
}
.brand:hover { color: var(--text); }
/* Lock-up ratio from peregrinesearch.dev: mark 44 px, gap 14 px, wordmark 38 px. */
.brand__mark { width: 21px; height: 21px; flex: none; }

/* ---------- Site header and mega menu ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 250, 248, 0.9);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}
.site-header__inner {
  position: relative;
  display: flex; align-items: center; gap: 40px;
  height: var(--header-h);
}
.site-header__actions { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.site-header__signin { font-size: 14.5px; font-weight: 500; color: var(--body); }
.site-header__signin:hover { color: var(--text); }

.nav { height: 100%; }
.nav__list { display: flex; align-items: stretch; gap: 4px; height: 100%; }
.nav__item { display: flex; align-items: center; }
.nav__trigger, .nav__link {
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 12px; border: 0; border-radius: var(--radius-s);
  background: none; color: var(--body); font-size: 14.5px; font-weight: 500; cursor: pointer;
  transition: background-color .14s ease, color .14s ease;
}
.nav__trigger:hover, .nav__link:hover, .nav__trigger[aria-expanded="true"] { color: var(--text); background: rgba(11, 16, 32, 0.05); }
.nav__link[aria-current="page"] { color: var(--text); }
.nav__item--phone { display: none; }
.nav__chevron { width: 10px; height: 10px; transition: transform .2s var(--ease-out); }
.nav__trigger[aria-expanded="true"] .nav__chevron { transform: rotate(180deg); }

.mega {
  position: absolute; left: var(--gutter); right: var(--gutter); top: calc(100% - 6px);
  display: grid; grid-template-columns: 1fr 300px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-l);
  box-shadow: var(--shadow-panel); overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s ease, transform .22s var(--ease-out), visibility 0s linear .22s;
}
.nav__item.is-open .mega,
html:not(.js) .nav__item:hover .mega,
html:not(.js) .nav__item:focus-within .mega {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .18s ease, transform .22s var(--ease-out), visibility 0s;
}
.mega__main { display: flex; flex-direction: column; }
.mega__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 24px; padding: 28px 28px 20px; }
.mega__heading {
  margin: 0 0 10px 12px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--micro);
}
.mega__links { display: flex; flex-direction: column; gap: 2px; }
.mega-link {
  display: grid; grid-template-columns: 36px 1fr; gap: 2px 14px; align-items: start;
  padding: 10px 12px; border-radius: var(--radius-m); color: var(--text);
  transition: background-color .14s ease;
}
.mega-link:hover { background: var(--paper); color: var(--text); }
.mega-link__icon {
  grid-row: span 2; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--rule);
  background: var(--paper); color: var(--sky-deep);
  transition: border-color .14s ease, background-color .14s ease;
}
.mega-link__icon svg { width: 18px; height: 18px; }
.mega-link:hover .mega-link__icon { border-color: var(--sky); background: var(--sky-tint); }
.mega-link__icon--sun { color: var(--sun-deep); }
.mega-link:hover .mega-link__icon--sun { border-color: var(--sun); background: var(--sun-tint); }
.mega-link__icon--violet { color: var(--violet-deep); }
.mega-link:hover .mega-link__icon--violet { border-color: var(--violet); background: var(--violet-tint); }
.mega-link__title { font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; }
.mega-link__desc { font-size: 13px; line-height: 1.45; color: var(--muted); }
.mega__bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin-top: auto;
  padding: 14px 40px; border-top: 1px solid var(--rule-soft); background: var(--paper);
  font-size: 13px;
}
.mega__bar a { display: inline-flex; align-items: center; gap: 6px; color: var(--body); font-weight: 500; }
.mega__bar a:hover { color: var(--text); }
.mega__bar-label { color: var(--micro); font-family: var(--font-mono); font-size: 12px; }

.mega-feature {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: 28px; background: var(--ink); color: var(--on-dark); overflow: hidden;
}
.mega-feature::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(240px 160px at 100% 0%, rgba(25, 180, 245, 0.22), transparent 70%),
    radial-gradient(200px 140px at 0% 100%, rgba(142, 91, 255, 0.22), transparent 70%);
  pointer-events: none;
}
.mega-feature > * { position: relative; }
.mega-feature__kicker { font-family: var(--font-mono); font-size: 11.5px; color: var(--sky); letter-spacing: 0.02em; }
.mega-feature__figure { font-family: var(--font-mono); font-size: 44px; font-weight: 500; letter-spacing: -0.04em; line-height: 1; }
.mega-feature__unit { font-size: 18px; color: var(--on-dark-muted); }
.mega-feature__title { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; }
.mega-feature__text { font-size: 13.5px; line-height: 1.55; color: var(--on-dark-body); }
.mega-feature__link { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--on-dark); font-size: 14px; font-weight: 600; }
.mega-feature__link:hover { color: var(--violet-light); }
.mega-feature__code {
  margin: 0; padding: 14px; border: 1px solid var(--ink-line); border-radius: 10px; background: var(--ink-2);
  font-family: var(--font-mono); font-size: 12px; line-height: 1.7; color: #D6DBE8; white-space: pre; overflow-x: auto;
}

.nav-toggle {
  display: none; place-items: center; width: 42px; height: 42px; margin-left: 4px;
  border: 1px solid var(--rule-strong); border-radius: 10px; background: var(--surface); cursor: pointer;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink);
  transition: transform .2s var(--ease-out), background-color .2s ease;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.site-header.is-menu-open .nav-toggle__bars { background: transparent; }
.site-header.is-menu-open .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.site-header.is-menu-open .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Section scaffolding ---------- */
.section { padding-block: 104px; }
.section--surface { background: var(--surface); border-block: 1px solid var(--rule); }
.section--dark { background: var(--ink); color: var(--on-dark); }
.section-head { display: flex; flex-direction: column; gap: 16px; max-width: 62ch; margin-bottom: 52px; }
.section-head--split {
  max-width: none; flex-direction: row; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px;
}
.section-head__copy { display: flex; flex-direction: column; gap: 16px; max-width: 58ch; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sky-deep);
}
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.eyebrow--violet { color: var(--violet-light); }
.eyebrow--sun { color: var(--sun-deep); }
.section-title { font-size: clamp(30px, 3.3vw, 44px); line-height: 1.08; letter-spacing: -0.032em; font-weight: 700; }
.section-lead { font-size: 17px; line-height: 1.6; color: var(--body); }
.section--dark .section-lead { color: var(--on-dark-body); }
.inline-code {
  font-family: var(--font-mono); font-size: 0.82em; font-weight: 500;
  padding: 2px 8px; border-radius: 6px; background: var(--sky-tint);
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero::before {
  /* A faint engineering grid behind the hero, faded at the edges. */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(11, 16, 32, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(11, 16, 32, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 70% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 80% at 70% 40%, #000 20%, transparent 75%);
}
.hero__inner {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 64px; align-items: center;
  padding-block: 88px 80px;
}
.hero__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 26px; }
.pill {
  display: inline-flex; align-items: center; gap: 11px; padding: 6px 15px 6px 11px;
  border: 1px solid #E0DCD2; border-radius: 999px; background: var(--surface);
  font-size: 12.5px; font-weight: 600; color: #3A4152; letter-spacing: 0.01em;
}
.pill__dots { display: inline-flex; align-items: center; gap: 4px; }
.pill__dot { display: inline-block; border-radius: 999px; }
.pill__dot--sky { width: 9px; height: 9px; background: var(--sky); }
.pill__dot--sun { width: 7px; height: 7px; background: var(--sun); }
.pill__dot--violet { width: 5px; height: 5px; background: var(--violet); }
.hero__title { font-size: clamp(42px, 4.8vw, 66px); line-height: 1.01; letter-spacing: -0.038em; font-weight: 700; max-width: 15ch; }
.hero__lead { font-size: 19.5px; line-height: 1.55; color: var(--body); max-width: 46ch; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.hero__meta-sep { color: #CFCBC2; }

.code-window {
  border: 1px solid #E0DDD4; border-radius: 14px; background: var(--ink); overflow: hidden;
  box-shadow: 0 40px 70px -36px rgba(11, 16, 32, 0.55);
}
.code-window__bar { display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-bottom: 1px solid var(--ink-3); }
.code-window__dot { width: 9px; height: 9px; border-radius: 999px; background: #2A3350; }
.code-window__file { margin-left: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--on-dark-muted); }
.code-window__status { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--violet-light); }
.code-window__body {
  margin: 0; padding: 22px 22px 26px; overflow-x: auto;
  font-family: var(--font-mono); font-size: 12.8px; line-height: 1.75; color: #D6DBE8;
}
.tok-kw { color: #B48EF0; }
.tok-str { color: #5FD3A6; }
.tok-fn { color: #7FA8FF; }
.tok-num { color: var(--sun); }
.tok-com { color: #7D87A3; }

/* ---------- Stat ledger ---------- */
.stats { background: var(--surface); border-block: 1px solid var(--rule); }
.stats__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { position: relative; display: flex; flex-direction: column-reverse; justify-content: flex-end; padding: 34px 28px; border-left: 1px solid var(--rule-soft); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat__value { font-family: var(--font-mono); font-size: 34px; font-weight: 700; letter-spacing: -0.03em; }
.stat__unit { font-size: 18px; color: var(--muted); }
.stat__label { margin-top: 6px; font-size: 13.5px; color: var(--body); }
.stat--violet .stat__value { color: var(--violet-deep); }
.stat--sky .stat__value { color: var(--sky-deep); }
.stat--sun .stat__value { color: var(--sun-deep); }

/* ---------- Tabs (benchmarks and consistency dial) ---------- */
.js [role="tabpanel"][hidden] { display: none; }

/* ---------- Benchmarks ---------- */
.bench { border: 1px solid var(--ink-3); border-radius: var(--radius-l); background: var(--ink-2); overflow: hidden; }
.bench__tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px; border-bottom: 1px solid var(--ink-3); }
html:not(.js) .bench__tabs { display: none; }
.bench__tab {
  padding: 9px 15px; border: 1px solid var(--ink-line); border-radius: var(--radius-s);
  background: rgba(255, 255, 255, 0.04); color: var(--on-dark-body);
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.bench__tab:hover { color: var(--on-dark); }
.bench__tab[aria-selected="true"] { background: var(--violet-fill); border-color: var(--violet-fill); color: var(--on-dark); }
.bench__panel { padding: 30px 32px 26px; }
html:not(.js) .bench__panel + .bench__panel { border-top: 1px solid var(--ink-3); }
.bench__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.bench__title { font-size: 17.5px; font-weight: 600; letter-spacing: -0.01em; }
.bench__better { padding: 4px 11px; border: 1px solid var(--ink-line); border-radius: 999px; font-family: var(--font-mono); font-size: 11.5px; color: var(--on-dark-muted); }
.bench__note { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--ink-3); max-width: 88ch; font-size: 12.5px; line-height: 1.65; color: var(--on-dark-muted); }
.bench__source { margin-top: 18px; font-family: var(--font-mono); font-size: 12px; color: var(--on-dark-muted); }

.bar-table { width: 100%; border-collapse: collapse; }
.bar-table th, .bar-table td { padding: 8px 0; vertical-align: middle; }
.bar-table__name { width: 160px; padding-right: 18px; text-align: left; font-size: 14px; font-weight: 400; color: var(--on-dark-body); }
.bar-table__bar { width: auto; }
.bar-table__value { width: 110px; padding-left: 18px; text-align: right; font-family: var(--font-mono); font-size: 13.5px; color: var(--on-dark-body); }
.bar-table__row--us .bar-table__name { font-weight: 600; color: var(--on-dark); }
.bar-table__row--us .bar-table__value { font-weight: 500; color: var(--violet-light); }
.bar { width: 100%; height: 12px; overflow: visible; }
.bar__track { fill: #171F33; }
.bar__fill { fill: #2A3350; transform-box: fill-box; transform-origin: left center; }
.bar__fill--us { fill: url(#grad-violet); }
.js .bar__fill { transform: scaleX(0); transition: transform .8s var(--ease-out); }
.js .is-visible .bar__fill { transform: scaleX(1); }

/* ---------- Why Peregrine: the wall ledger ---------- */
.walls { border-top: 1px solid var(--ink); }
.wall {
  position: relative;
  display: grid; grid-template-columns: 112px minmax(0, 1.1fr) minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px;
  align-items: start; padding: 40px 0 44px; border-bottom: 1px solid var(--rule);
}
.wall::before {
  /* The accent rule draws across the row on hover. */
  content: ""; position: absolute; left: 0; top: -1px; height: 3px; width: 0;
  background: var(--wall-accent, var(--sky)); transition: width .5s var(--ease-out);
}
.wall:hover::before { width: 100%; }
.wall--violet { --wall-accent: var(--violet); --wall-text: var(--violet-deep); }
.wall--sky { --wall-accent: var(--sky); --wall-text: var(--sky-deep); }
.wall--sun { --wall-accent: var(--sun); --wall-text: var(--sun-deep); }
.wall__index {
  font-family: var(--font-mono); font-size: 64px; font-weight: 500; line-height: 0.9; letter-spacing: -0.05em;
  color: transparent; -webkit-text-stroke: 1.2px var(--rule-strong);
  transition: -webkit-text-stroke-color .3s ease;
}
.wall__index::before { content: attr(data-index); }
.wall:hover .wall__index { -webkit-text-stroke-color: var(--wall-accent); }
.wall__claim { display: flex; flex-direction: column; gap: 10px; }
.wall__tag { font-family: var(--font-mono); font-size: 12px; color: var(--wall-text); text-transform: lowercase; }
.wall__title { font-size: 25px; line-height: 1.15; font-weight: 650; letter-spacing: -0.025em; }
.wall__body { font-size: 15.5px; line-height: 1.65; color: var(--body); padding-top: 26px; }
.wall__compare { display: flex; flex-direction: column; gap: 16px; padding-top: 26px; }
.versus { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: baseline; }
.versus__label { font-size: 12.5px; color: var(--muted); }
.versus__value { font-family: var(--font-mono); font-size: 14px; font-weight: 500; color: var(--muted); text-align: right; }
.versus__value--us { color: var(--wall-text); font-size: 18px; }
.versus__label--us { color: var(--text); font-weight: 600; }
.versus .bar { grid-column: 1 / -1; height: 8px; }
.versus .bar__track { fill: var(--rule-soft); }
.versus .bar__fill { fill: #C9C4B8; }
.versus .bar__fill--us { fill: var(--wall-accent); }

/* ---------- Architecture pipeline ---------- */
.pipeline { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; counter-reset: step; }
.pipeline::before {
  /* The track that joins the five stations. */
  content: ""; position: absolute; left: 22px; right: 22px; top: 22px; height: 2px;
  background: linear-gradient(90deg, var(--violet), var(--sky) 45%, var(--sun));
  opacity: 0.55;
}
.pipeline::after {
  /* One write, travelling from upsert() to a ranked hit. */
  content: ""; position: absolute; top: 17px; left: 17px; width: 12px; height: 12px; border-radius: 999px;
  background: var(--ink); box-shadow: 0 0 0 4px rgba(25, 180, 245, 0.25);
  animation: pipeline-packet 6s var(--ease-out) infinite;
}
@keyframes pipeline-packet {
  0% { left: 17px; opacity: 0; }
  8% { opacity: 1; }
  85% { opacity: 1; }
  100% { left: calc(100% - 29px); opacity: 0; }
}
.station { position: relative; display: flex; flex-direction: column; gap: 10px; padding-right: 22px; }
.station__node {
  display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 14px;
  border: 2px solid var(--station-accent, var(--sky)); border-radius: 999px; background: var(--surface);
  font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--station-text, var(--sky-deep));
}
.station--violet { --station-accent: var(--violet); --station-text: var(--violet-deep); }
.station--sky { --station-accent: var(--sky); --station-text: var(--sky-deep); }
.station--sun { --station-accent: var(--sun); --station-text: var(--sun-deep); }
.station__stage { font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; color: var(--station-text); }
.station__title { font-size: 16.5px; font-weight: 650; letter-spacing: -0.015em; }
.station__text { font-size: 13.8px; line-height: 1.58; color: #5A6274; }
.pipeline-ends { display: flex; justify-content: space-between; margin-top: 36px; padding-top: 18px; border-top: 1px dashed var(--rule-strong); font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }

/* ---------- Consistency dial ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; }
.split__copy { display: flex; flex-direction: column; gap: 18px; }
.dial-options { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
html:not(.js) .dial-options { display: none; }
.dial-option {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%;
  padding: 15px 18px; border: 1px solid #E4E1DA; border-radius: 10px; background: var(--surface);
  text-align: left; cursor: pointer; transition: background-color .16s ease, border-color .16s ease;
}
.dial-option:hover { border-color: var(--rule-strong); }
.dial-option[aria-selected="true"] { background: var(--sky-tint); border-color: var(--sky); }
.dial-option__code { font-family: var(--font-mono); font-size: 13.5px; font-weight: 500; }
.dial-option__desc { font-size: 13.5px; color: #5A6274; }

.dial { border: 1px solid #E4E1DA; border-radius: var(--radius-l); background: var(--surface); padding: 32px 34px 30px; }
.gauge { width: 100%; max-width: 340px; margin: 0 auto 8px; }
.gauge__track { fill: none; stroke: var(--rule-soft); stroke-width: 14; }
.gauge__seg { fill: none; stroke-width: 14; }
.gauge__seg--strong { stroke: var(--violet); }
.gauge__seg--bounded { stroke: var(--sky); }
.gauge__seg--eventual { stroke: var(--sun); }
.gauge__tick { font-family: var(--font-mono); font-size: 9px; fill: var(--muted); }
.gauge__needle { transform-origin: 120px 120px; transition: transform .6s var(--ease-out); transform: rotate(0deg); }
.gauge__needle line { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.gauge__hub { fill: var(--ink); }
.dial[data-mode="strong"] .gauge__needle { transform: rotate(-60deg); }
.dial[data-mode="eventual"] .gauge__needle { transform: rotate(60deg); }
.dial__readout { display: flex; flex-direction: column; gap: 18px; }
html:not(.js) .dial__readout + .dial__readout { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--rule-soft); }
.dial__headline { display: flex; align-items: baseline; justify-content: space-between; }
.dial__label { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.dial__latency { font-family: var(--font-mono); font-size: 44px; font-weight: 500; letter-spacing: -0.03em; color: var(--sky-deep); }
.facts { display: flex; flex-direction: column; gap: 14px; padding-top: 18px; border-top: 1px solid var(--rule-soft); }
.facts__row { display: flex; justify-content: space-between; gap: 16px; font-size: 14.5px; }
.facts__row dt { color: #5A6274; }
.facts__row dd { font-weight: 500; text-align: right; }
.facts__row dd.mono { font-family: var(--font-mono); }
.dial__note { padding-top: 18px; border-top: 1px solid var(--rule-soft); font-size: 13.5px; line-height: 1.6; color: var(--muted); }

/* ---------- Pricing receipt ---------- */
.pricing__copy { align-items: flex-start; }
.pricing__aside { font-size: 15px; line-height: 1.6; color: #5A6274; }
.receipt {
  position: relative; max-width: 460px; margin-inline: auto; width: 100%;
  background: var(--surface); border: 1px solid #E4E1DA; border-bottom: 0;
  border-radius: var(--radius-m) var(--radius-m) 0 0;
  box-shadow: 0 30px 60px -40px rgba(11, 16, 32, 0.4);
  font-family: var(--font-mono);
}
.receipt::after {
  /* A torn edge: a row of half circles cut from the paper. */
  content: ""; position: absolute; left: -1px; right: -1px; bottom: -10px; height: 10px;
  background: radial-gradient(circle at 8px 0, var(--surface) 7px, transparent 7.5px) 0 0 / 16px 10px repeat-x;
}
.receipt__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 22px 26px 18px; border-bottom: 1px dashed var(--rule-strong); }
.receipt__title { font-family: var(--font-sans); font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em; }
.receipt__flag { padding: 3px 9px; border-radius: 999px; background: var(--ink); color: var(--on-dark); font-size: 11px; }
.receipt__lines { padding: 10px 26px; }
.receipt__line { display: flex; align-items: baseline; gap: 10px; padding: 12px 0; font-size: 14px; color: var(--body); }
.receipt__leader { flex: 1; min-width: 20px; border-bottom: 1px dotted #C9C4B8; transform: translateY(-4px); }
.receipt__amount { font-weight: 500; }
.receipt__line--us { margin: 4px -12px; padding: 14px 12px; border-radius: var(--radius-s); background: var(--sun-tint); color: var(--text); font-weight: 600; }
.receipt__line--us .receipt__amount { font-size: 22px; color: var(--sun-deep); }
.receipt__foot { padding: 16px 26px 26px; border-top: 1px dashed var(--rule-strong); font-family: var(--font-sans); font-size: 12.5px; line-height: 1.6; color: var(--muted); }

/* ---------- Closing call to action ---------- */
.cta-band { position: relative; overflow: hidden; }
.cta-band__inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 22px; padding-block: 112px; text-align: center; }
.cta-band__mark { position: absolute; right: -60px; bottom: -80px; width: 420px; height: 420px; opacity: 0.12; pointer-events: none; }
.cta-band__title { font-size: clamp(32px, 3.8vw, 48px); line-height: 1.06; letter-spacing: -0.033em; font-weight: 700; max-width: 20ch; }
.cta-band__lead { max-width: 56ch; font-size: 18px; line-height: 1.6; color: var(--on-dark-body); }
.cta-band__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }

/* ---------- Site footer ---------- */
.site-footer { background: var(--paper); }
.site-footer__inner { padding-block: 64px 36px; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); gap: 40px; }
.site-footer__about { display: flex; flex-direction: column; gap: 14px; }
.site-footer__tagline { max-width: 30ch; font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.site-footer__heading { margin-bottom: 14px; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--micro); }
.site-footer__links { display: flex; flex-direction: column; gap: 12px; }
.site-footer__links a { font-size: 13.5px; color: var(--body); }
.site-footer__links a:hover { color: var(--text); }
.site-footer__base {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px;
  margin-top: 48px; padding-top: 26px; border-top: 1px solid var(--rule); font-size: 12.5px; color: var(--micro);
}
.site-footer__regions { font-family: var(--font-mono); }

/* ---------- Narrow screens ---------- */
@media (max-width: 1080px) {
  .site-header__inner { gap: 20px; }
  .nav__trigger, .nav__link { padding: 0 9px; }
  .wall { grid-template-columns: 80px minmax(0, 1fr) minmax(0, 1fr); }
  .wall__index { font-size: 48px; }
  .wall__compare { grid-column: 2 / -1; padding-top: 0; }
  .pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 40px; }
  .pipeline::before, .pipeline::after { display: none; }
  .site-footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-footer__about { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
  :root { --gutter: 22px; --header-h: 64px; }
  .nav-toggle { display: grid; }
  .site-header__signin { display: none; }
  .nav__item--phone { display: flex; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%; height: calc(100dvh - var(--header-h));
    padding: 12px var(--gutter) 32px; overflow-y: auto;
    background: var(--paper); border-top: 1px solid var(--rule);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .18s ease, transform .2s var(--ease-out), visibility 0s linear .2s;
  }
  .site-header.is-menu-open .nav { opacity: 1; visibility: visible; transform: none; transition: opacity .18s ease, transform .2s var(--ease-out), visibility 0s; }
  html:not(.js) .nav { position: static; opacity: 1; visibility: visible; transform: none; padding: 0; border: 0; }
  .nav__list { flex-direction: column; gap: 0; height: auto; }
  .nav__item { flex-direction: column; align-items: stretch; border-bottom: 1px solid var(--rule); }
  .nav__trigger, .nav__link { justify-content: space-between; height: 56px; padding: 0 4px; font-size: 17px; font-weight: 600; color: var(--text); border-radius: 0; }
  .nav__trigger:hover, .nav__link:hover, .nav__trigger[aria-expanded="true"] { background: none; }
  .mega {
    position: static; display: none; grid-template-columns: 1fr;
    border: 0; border-radius: 0; box-shadow: none; background: transparent;
    opacity: 1; visibility: visible; transform: none; transition: none;
  }
  .nav__item.is-open .mega { display: block; }
  .mega__cols { padding: 0 0 16px; gap: 12px; }
  .mega__heading { margin-left: 4px; }
  .mega-link { padding: 10px 4px; }
  .mega__bar, .mega-feature { display: none; }
  .site-header__actions .btn { height: 38px; }
  body.is-menu-locked { overflow: hidden; }

  .hero__inner { grid-template-columns: 1fr; gap: 48px; padding-block: 56px 64px; }
  .stats__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--rule-soft); }
  .section { padding-block: 80px; }
  .split { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 640px) {
  .hero__lead { font-size: 17.5px; }
  .stat { padding: 24px 16px; }
  .stat__value { font-size: 28px; }
  .bench__panel { padding: 24px 18px 20px; }
  .bar-table__name { width: 110px; padding-right: 10px; font-size: 13px; }
  .bar-table__value { width: 76px; padding-left: 10px; font-size: 12.5px; }
  .wall { grid-template-columns: 1fr; gap: 14px; padding: 32px 0; }
  .wall__index { font-size: 40px; }
  .wall__body, .wall__compare { grid-column: auto; padding-top: 0; }
  .pipeline { grid-template-columns: 1fr; row-gap: 28px; }
  .station { display: grid; grid-template-columns: 46px 1fr; column-gap: 16px; padding-right: 0; }
  .station__node { grid-row: span 3; margin-bottom: 0; }
  .pipeline-ends { flex-direction: column; gap: 6px; }
  .dial { padding: 24px 20px; }
  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
  .js .bar__fill { transform: none; }
}
