/* pay.hmbrd.dev — hmnpay, the payment gateway.

   A member of the Hummingbird family: the same black ground and paper ink, hairline rules,
   Martian Mono labels, numbered sections, corners of 4px at most, and the family bar on top.
   Its own: the product's typeface (Geist, with Geist Mono for amounts and commands) and the
   product's one accent, the ultramarine of the dot in its mark, in place of the family's red.
   Green appears in exactly one meaning, as in the product: a payment that is paid.

   One idea carries the page: paid means final. The full stop of the headline is the dot of the
   mark, and the centrepiece is a ruler of the seconds between a transfer's block and "paid",
   drawn to scale and replayed at its real speed. Product pictures are screenshots of the real
   interface: the payer's checkout is light, so it lies on the only paper on the page.

   The stylesheet and the script are separate files because the page's CSP allows nothing
   inline (src/worker.js). */

@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/geist-mono-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Martian Mono";
  src: url("/assets/fonts/martian-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #070707;
  --raise: #0d0d0c;
  --paper: #f1f0ec;
  --sheet: #fafafa; /* the background of the product's light pages, so a screenshot has no edge */
  --ink: #f1f0ec;
  --ink-2: rgba(241, 240, 236, 0.74);
  --ink-3: rgba(241, 240, 236, 0.54);
  --ink-4: rgba(241, 240, 236, 0.26);
  --line: rgba(241, 240, 236, 0.1);
  --line-strong: rgba(241, 240, 236, 0.24);
  --ultra: #5b86ff; /* the dot of the hmnpay mark */
  --ultra-ink: #a3b9ff; /* the same hue, for small text on black */
  --ultra-soft: rgba(91, 134, 255, 0.16);
  --paid: #3ecb74;
  --paid-soft: rgba(62, 203, 116, 0.14);
  --label: "Martian Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 3px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1); /* the product's ease-out-quint */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, p, dl, dd, figure, pre, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ultra); }
:focus-visible { outline: 2px solid var(--ultra); outline-offset: 3px; }
::selection { background: var(--ultra); color: #fff; }
code { font-family: var(--mono); font-size: 0.86em; }
p code, dd code, li code { white-space: nowrap; }
b { font-weight: 600; color: var(--ink); }
i, em { font-style: italic; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); }
.skip {
  position: absolute; left: -9999px; top: 8px; padding: 8px 12px;
  background: var(--ink); color: var(--bg); font: 500 0.75rem var(--label);
}
.skip:focus { left: 8px; z-index: 100; }

/* ==========================================================================
   Family bar — the switcher at the very top of every Hummingbird site.
   Markup: src/components/FamilyBar.tsx. The same rules are pasted into
   nano/web/styles.css and harness/site/public/assets/site.css, so this block
   depends on nothing outside itself: every value has a literal fallback.
   ========================================================================== */
.fam {
  --fam-ink: var(--ink, #f1f0ec);
  --fam-dim: var(--ink-3, #7c7b76);
  --fam-line: var(--line, rgba(255, 255, 255, 0.09));
  --fam-signal: var(--signal, #ff2b2b);
  --fam-font: var(--f-mono, var(--mono, ui-monospace, "SF Mono", Menlo, monospace));
  position: relative;
  z-index: 60;
  background: #030303;
  border-bottom: 1px solid var(--fam-line);
  font-family: var(--fam-font);
  font-size: 0.62rem;
  line-height: 1;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--fam-dim);
}
.fam__row {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: var(--maxw, 1320px);
  height: 36px;
  margin: 0 auto;
  padding: 0 var(--gutter, clamp(16px, 4vw, 48px));
}
.fam a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}
.fam a:hover,
.fam a[aria-current="page"] {
  color: var(--fam-ink);
}
/* the site you are on: a red rule along the bottom edge of the bar */
.fam a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--fam-signal);
}
.fam__lab {
  padding-right: 18px;
  font-weight: 600;
  color: var(--fam-ink) !important;
}
/* the eye of the mark */
.fam__glyph {
  width: 9px;
  height: 5px;
  background: var(--fam-signal);
  clip-path: polygon(0 0, 100% 45%, 30% 100%);
}
.fam__role {
  color: var(--fam-dim);
  font-weight: 400;
  letter-spacing: 0.05em;
  opacity: 0.8;
}
.fam__sites {
  display: flex;
  align-items: stretch;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fam__sites li {
  display: flex;
  border-left: 1px solid var(--fam-line);
}
.fam__sites a {
  padding: 0 18px;
}
.fam__sites li:last-child {
  border-right: 1px solid var(--fam-line);
}
.fam__note {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
  padding-left: 18px;
  min-width: 0;
  white-space: nowrap;
}
.fam__note a {
  color: var(--fam-ink);
  border-bottom: 1px solid var(--fam-signal);
  height: auto;
  padding-bottom: 2px;
}
.fam__dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--fam-signal);
  vertical-align: 1px;
  animation: fam-blink 2.4s infinite;
}
@keyframes fam-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* Roles are a luxury of wide screens; below that the names carry it. */
@media (max-width: 1180px) {
  .fam__sites .fam__role { display: none; }
}
@media (max-width: 860px) {
  .fam__note > span { display: none; }
}
@media (max-width: 620px) {
  .fam { font-size: 0.58rem; letter-spacing: 0.05em; }
  .fam__lab { padding-right: 12px; }
  .fam__lab .fam__role { display: none; }
  .fam__sites a { padding: 0 12px; }
  .fam__sites li:last-child { border-right: 0; }
  .fam__note { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .fam__dot { animation: none; }
}

/* The bar's row is as wide as this site's column, and it speaks the family's label face. The
   signal stays the family's red: the bar is the one thing on this page that is not hmnpay's. */
.fam { --maxw: 1160px; --fam-font: var(--label); }
/* Five sites: on the narrowest screens the bar scrolls sideways instead of pushing the page. */
@media (max-width: 620px) {
  .fam__row { overflow-x: auto; scrollbar-width: none; }
  .fam__row::-webkit-scrollbar { display: none; }
  .fam__sites a { padding: 0 10px; }
}

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 7, 7, 0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 56px; }
.mark { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.mark-glyph { width: 22px; height: 22px; flex: none; }
.mark-dot { fill: var(--ultra); }
.mark-word { font: 600 1.12rem/1 var(--sans); letter-spacing: -0.03em; }
.mark-word span { color: var(--ink-3); }
.beta {
  margin-left: 4px; padding: 4px 7px 3px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  font: 500 0.56rem/1 var(--label); letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-2);
}
.top nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 28px); font: 400 0.66rem var(--label); letter-spacing: 0.02em; }
.top nav a { color: var(--ink-3); text-decoration: none; padding: 6px 0; transition: color 0.2s; white-space: nowrap; }
.top nav a:hover { color: var(--ink); }
.top nav .out { color: var(--ink); padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); transition: background 0.2s, color 0.2s, border-color 0.2s; }
.top nav .out::after { content: " ↗"; color: var(--ink-3); transition: color 0.2s; }
.top nav .out:hover { background: var(--paper); border-color: var(--paper); color: var(--bg); }
.top nav .out:hover::after { color: var(--bg); }

/* ---------- hero: the sentence is the picture ---------- */
.hero { padding-top: clamp(30px, 3.6vw, 46px); padding-bottom: clamp(56px, 8vw, 104px); }
.eyebrow, .label { font: 400 0.66rem var(--label); color: var(--ink-3); letter-spacing: 0.07em; text-transform: uppercase; }

/* Three words at the size of a poster. The full stop is the dot of the mark: the one place the
   headline uses the accent, and the point of the sentence. */
.giant {
  margin-top: clamp(10px, 1.4vw, 18px); margin-left: -0.045em;
  font: 600 clamp(2.6rem, 12.3vw, 8.9rem)/0.92 var(--sans);
  letter-spacing: -0.058em; white-space: nowrap;
  animation: rise 0.9s var(--ease) both;
}
/* A circle, like the dot of the mark; the character itself stays in the text for readers. */
.giant-dot {
  display: inline-block; width: 0.17em; height: 0.17em; margin-left: 0.035em;
  border-radius: 50%; background: var(--ultra); color: transparent; overflow: hidden;
  letter-spacing: 0; vertical-align: baseline; user-select: none;
}

.hero-row {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(32px, 6vw, 88px); align-items: start;
  margin-top: clamp(26px, 3.2vw, 44px); padding-top: clamp(24px, 2.8vw, 34px);
  border-top: 1px solid var(--line);
}
.lede { max-width: 33em; color: var(--ink); font-size: clamp(1.08rem, 1.5vw, 1.3rem); line-height: 1.5; letter-spacing: -0.012em; text-wrap: pretty; }
.lede em { font-style: normal; border-bottom: 1px solid var(--ultra); }
.lede-2 { margin-top: 14px; color: var(--ink-2); font-size: 1.02rem; line-height: 1.6; letter-spacing: 0; }

/* One orchestrated entrance, then nothing moves until the ruler is asked to. */
.rise { animation: rise 0.9s var(--ease) both; }
.r1 { animation-delay: 0.1s; }
.r2 { animation-delay: 0.18s; }
.r3 { animation-delay: 0.26s; }
.r4 { animation-delay: 0.34s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.btn {
  display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 20px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  font: 500 0.7rem var(--label); letter-spacing: 0.07em; text-transform: uppercase; text-decoration: none;
  color: var(--ink); transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn::after { content: "↓"; color: var(--ink-3); transition: transform 0.3s var(--ease), color 0.2s; }
.btn:hover { border-color: var(--ink); }
.btn:hover::after { color: var(--ink); transform: translateY(2px); }
.btn-solid { background: var(--paper); border-color: var(--paper); color: var(--bg); }
.btn-solid::after { content: "↗"; color: var(--bg); }
.btn-solid:hover { background: #fff; border-color: #fff; }
.btn-solid:hover::after { color: var(--bg); transform: translate(2px, -2px); }
.beta-note { margin-top: 16px; max-width: 37em; font-size: 0.88rem; color: var(--ink-3); text-wrap: pretty; }
.beta-note b { color: var(--ink-2); }
.beta-note a { color: var(--ink-2); }

.kv { margin-top: 34px; border-top: 1px solid var(--line-strong); }
.kv div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.kv dt { font: 400 0.64rem/2.1 var(--label); color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.07em; }
.kv dd { font-size: 0.93rem; color: var(--ink-2); text-wrap: pretty; }
.kv dd code { white-space: normal; overflow-wrap: anywhere; }
.kv-tight { margin-top: 12px; }

/* ---------- plates: screenshots of the real interface ----------
   A plate is a hairline frame with a one-line bar (the path the screen lives at) and a numbered
   caption, like the plates on hmbrd.dev. The payer's pages are light, so they lie on paper. */
.plate { min-width: 0; }
.plate-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; border: 1px solid var(--line-strong); border-bottom: 0;
  border-radius: 4px 4px 0 0; background: var(--raise);
  font: 400 0.62rem var(--label); letter-spacing: 0.04em; color: var(--ink-3);
}
.plate-bar b { font-weight: 400; color: var(--ink-2); white-space: nowrap; }
.plate-bar span { text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.paper, .ink { border: 1px solid var(--line-strong); border-radius: 0 0 4px 4px; overflow: hidden; }
.paper { background: var(--sheet); border-color: var(--sheet); }
.ink { background: #0a0a0a; }
.plate figcaption { margin-top: 12px; font-size: 0.84rem; color: var(--ink-3); text-wrap: pretty; }
.plate figcaption span { margin-right: 12px; font: 400 0.62rem var(--label); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ultra-ink); }
.plate-phone { justify-self: end; width: 100%; max-width: 344px; }
.plate-phone img { width: 100%; }
.plate-wide { margin-top: clamp(28px, 4vw, 44px); }
.plate-wide + .plate-wide { margin-top: clamp(36px, 5vw, 60px); }
.plate-wide .paper { padding: clamp(6px, 1.4vw, 18px) clamp(6px, 4vw, 70px); }
.plate-wide img { width: 100%; }
.plate-wide .paper img { max-width: 1020px; margin: 0 auto; }
/* The desktop screens would be unreadable on a phone, so a phone gets the phone's own checkout,
   in its last state (paid), and the two cards of the dashboard that are a phone's width, at their
   real size. Of each pair of plates only one is ever shown (and so loaded). */
.plate-narrow { display: none; }

/* ---------- sections ---------- */
section + section { border-top: 1px solid var(--line); }
.sec { padding-top: clamp(52px, 7.4vw, 96px); padding-bottom: clamp(52px, 7.4vw, 96px); }
.section-h {
  display: flex; align-items: baseline; gap: 16px;
  font: 600 clamp(1.7rem, 3.5vw, 2.7rem)/1.08 var(--sans); letter-spacing: -0.045em; text-wrap: balance;
}
.section-h span { flex: none; font: 400 0.66rem var(--label); color: var(--ultra-ink); letter-spacing: 0.04em; }
.sec-head { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(20px, 5vw, 72px); align-items: start; }
.sec-head .body { margin-top: 6px; max-width: 36em; }
.body { margin-top: 18px; color: var(--ink-2); max-width: 32em; text-wrap: pretty; }
.fine { font-size: 0.85rem; color: var(--ink-3); text-wrap: pretty; }
.fine a { color: var(--ink-2); }
h3 { font: 600 1.04rem/1.35 var(--sans); letter-spacing: -0.02em; }
.grid code, .body code, .rules code, .kv code, .fine code, .steps code {
  padding: 1px 5px; border-radius: 2px; background: rgba(241, 240, 236, 0.08); color: var(--ink);
}

/* ---------- finality: the wait, drawn to scale and replayed at its real speed ----------
   Everything on the ruler is a position on one scale, 0 to 25 seconds: s seconds is s * 4%.
   The fill is driven by --p (0 to 1 of the scale); without the script it rests at 17 s. */
.fin {
  --c-run: 56px; --c-range: 132px; --c-med: 76px;
  margin-top: clamp(34px, 5vw, 60px); padding: clamp(18px, 2.6vw, 30px) clamp(16px, 2.6vw, 30px) clamp(16px, 2.2vw, 24px);
  border: 1px solid var(--line-strong); border-radius: 4px; background: var(--raise);
}
.fin-read { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 14px clamp(20px, 4vw, 48px); }
.fin-clock {
  font: 500 clamp(4.2rem, 13vw, 9rem)/0.86 var(--mono); letter-spacing: -0.07em;
  font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink);
  min-width: 3.1em; /* the width of "17.0 s", so the status does not slide as digits change */
}
.fin-clock small { margin-left: 0.18em; font-size: 0.3em; font-weight: 400; letter-spacing: 0; color: var(--ink-3); }
.fin-status { padding-bottom: 6px; }
.fin-label { font: 400 0.62rem var(--label); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.fin-chips { margin-top: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border-radius: 999px;
  font: 500 0.95rem/1 var(--sans); letter-spacing: -0.01em;
}
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip-confirming { background: var(--ultra-soft); color: var(--ultra-ink); box-shadow: inset 0 0 0 1px rgba(91, 134, 255, 0.36); }
.chip-paid { background: var(--paid-soft); color: var(--paid); box-shadow: inset 0 0 0 1px rgba(62, 203, 116, 0.34); }
.fin-event { margin-top: 10px; font-size: 0.8rem; color: var(--ink-3); }
.fin-event code { font-size: 1em; }
.fin[data-state="done"] .chip-confirming, .fin[data-state="done"] .ev-confirming,
.fin[data-state="run"] .chip-paid, .fin[data-state="run"] .ev-paid { display: none; }
.fin[data-state="done"] .chip-paid { animation: swap 0.24s var(--ease) backwards; }
@keyframes swap { from { opacity: 0; transform: scale(0.94); } }
.replay {
  margin-left: auto; margin-bottom: 6px; min-height: 40px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: transparent; color: var(--ink-2); cursor: pointer;
  font: 500 0.64rem var(--label); letter-spacing: 0.07em; text-transform: uppercase;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.replay:hover { background: var(--paper); border-color: var(--paper); color: var(--bg); }
.replay[disabled] { opacity: 0.45; cursor: default; pointer-events: none; }

.ruler { margin: clamp(22px, 3vw, 34px) calc(var(--c-range) + var(--c-med)) 0 var(--c-run); }
.ruler-track {
  position: relative; height: 34px;
  border: 1px solid var(--line-strong); border-radius: 2px;
  /* a hairline every second, a stronger one every five */
  background:
    repeating-linear-gradient(to right, var(--line-strong) 0 1px, transparent 1px 20%),
    repeating-linear-gradient(to right, var(--line) 0 1px, transparent 1px 4%);
}
.ruler-band { position: absolute; inset: 0 0 0 60%; background: repeating-linear-gradient(135deg, rgba(62, 203, 116, 0.22) 0 1px, transparent 1px 6px); border-left: 1px solid rgba(62, 203, 116, 0.5); }
.ruler-fill {
  position: absolute; inset: 0; transform-origin: 0 50%;
  transform: scaleX(var(--p, 0.68)); background: var(--ultra);
}
.fin[data-state="done"] .ruler-fill { background: var(--paid); transition: background 0.3s; }
.ruler-typ { position: absolute; top: -7px; bottom: -7px; left: 68%; width: 2px; margin-left: -1px; background: var(--ink); }
.ruler-scale { position: relative; height: 20px; margin-top: 8px; font: 400 0.62rem var(--label); color: var(--ink-3); letter-spacing: 0.02em; }
.ruler-scale li { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.ruler-scale .s0 { left: 0; transform: none; }
.ruler-scale .s5 { left: 20%; }
.ruler-scale .s10 { left: 40%; }
.ruler-scale .s15 { left: 60%; }
.ruler-scale .s20 { left: 80%; }
.ruler-scale .s25 { left: 100%; transform: translateX(-100%); }
.ruler-notes { position: relative; height: 18px; margin-top: 2px; font: 400 0.62rem var(--label); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.ruler-notes span { position: absolute; top: 0; white-space: nowrap; }
.n-start { left: 0; }
.n-typ { left: 68%; transform: translateX(-100%); padding-right: 10px; color: var(--ink); }
.n-band { left: 68%; padding-left: 10px; color: var(--paid); }

.runs { width: 100%; margin-top: clamp(18px, 2.6vw, 28px); border-collapse: collapse; }
.runs caption { caption-side: top; text-align: left; padding-bottom: 10px; font: 400 0.62rem var(--label); letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-3); }
.runs tr { display: grid; grid-template-columns: var(--c-run) minmax(0, 1fr) var(--c-range) var(--c-med); align-items: center; border-top: 1px solid var(--line); }
.runs thead tr { border-top-color: var(--line-strong); }
.runs th, .runs td { padding: 9px 0; text-align: left; font-weight: 400; }
.runs thead th { font: 400 0.6rem var(--label); letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-3); }
.runs thead th:nth-child(n + 3), .runs td:nth-child(n + 3) { text-align: right; }
.runs tbody th { font: 400 0.66rem var(--label); color: var(--ink-3); }
.runs tbody th::before { content: "0"; }
.runs td { font: 400 0.84rem var(--mono); font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.runs td:last-child { color: var(--ink); }
.run-cell { padding: 0 !important; }
/* a run: its slowest and fastest payment as a bar, its median as a tick */
.run { position: relative; display: block; height: 28px; }
.run::before { content: ""; position: absolute; top: 50%; left: var(--from); width: var(--len); height: 7px; margin-top: -3.5px; background: var(--ink-4); border-radius: 1px; }
.run i { position: absolute; top: 5px; bottom: 5px; left: var(--med); width: 2px; margin-left: -1px; background: var(--ink); }
.run-1 { --from: 58.8%; --len: 38%; --med: 72%; }   /* 14.7 to 24.2 s, median 18.0 */
.run-2 { --from: 56.4%; --len: 23.6%; --med: 66.4%; } /* 14.1 to 20.0 s, median 16.6 */
.run-3 { --from: 57.2%; --len: 19.2%; --med: 66%; }   /* 14.3 to 19.1 s, median 16.5 */
.fin-foot { margin-top: 16px; max-width: 62em; }

.rules { margin-top: clamp(30px, 4vw, 48px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); }
.rules article { padding: 22px clamp(16px, 2.2vw, 28px) 4px; border-left: 1px solid var(--line); }
.rules article:first-child { padding-left: 0; border-left: 0; }
.rules p { margin-top: 10px; font-size: 0.93rem; color: var(--ink-2); text-wrap: pretty; }

/* ---------- what it does ---------- */
.grid {
  margin-top: clamp(28px, 4vw, 44px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong); counter-reset: fact;
}
.grid article { position: relative; padding: 24px clamp(16px, 2.2vw, 28px) 30px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); counter-increment: fact; }
.grid article:nth-child(3n + 1) { padding-left: 0; border-left: 0; }
.grid article::before { content: "0" counter(fact); display: block; margin-bottom: 18px; font: 300 0.62rem var(--label); color: var(--ink-4); letter-spacing: 0.06em; }
.grid p { margin-top: 10px; font-size: 0.93rem; color: var(--ink-2); text-wrap: pretty; }
.grid p code { white-space: normal; overflow-wrap: anywhere; }

/* ---------- quick start, integrate ---------- */
.split { display: grid; grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.need-h { margin-top: 34px; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.code figcaption { margin-bottom: 8px; font: 400 0.64rem var(--label); color: var(--ink-3); letter-spacing: 0.07em; text-transform: uppercase; }
.cmd {
  display: flex; align-items: stretch;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--raise);
}
.cmd pre { flex: 1; min-width: 0; padding: 15px 0 15px 16px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--ink-4) transparent; }
.cmd code { display: block; width: max-content; min-width: 100%; padding-right: 16px; white-space: pre; font-size: 0.78rem; line-height: 1.75; color: var(--ink); }
/* a sample that may break anywhere: it is one line of JSON, not a command */
.cmd.soft code { width: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.cmd code i { font-style: normal; color: var(--ink-3); }
.prompt { color: var(--ultra); user-select: none; }
.copy {
  flex: none; padding: 0 14px; min-width: 76px;
  border: 0; border-left: 1px solid var(--line-strong); border-radius: 0 var(--radius) var(--radius) 0;
  background: transparent; color: var(--ink-2); cursor: pointer;
  font: 500 0.64rem var(--label); letter-spacing: 0.07em; text-transform: uppercase;
  transition: background 0.2s, color 0.2s;
}
.copy:hover { background: var(--paper); color: var(--bg); }
.copy[data-done] { color: var(--paid); background: transparent; }
/* a block of several lines: the text gets the full width, the button sits underneath */
.cmd.wrapline { flex-direction: column; }
.cmd.wrapline .copy { border-left: 0; border-top: 1px solid var(--line-strong); padding: 12px 16px; text-align: left; border-radius: 0 0 var(--radius) var(--radius); }
.steps { margin-top: 28px; border-top: 1px solid var(--line-strong); counter-reset: step; }
.steps li { position: relative; padding: 13px 0 13px 44px; border-bottom: 1px solid var(--line); font-size: 0.93rem; color: var(--ink-2); counter-increment: step; text-wrap: pretty; }
.steps li::before { content: "0" counter(step); position: absolute; left: 0; top: 17px; font: 400 0.62rem var(--label); color: var(--ultra-ink); letter-spacing: 0.04em; }

/* ---------- trust and limits ---------- */
.scroll { margin-top: clamp(28px, 4vw, 44px); overflow-x: auto; }
.trust { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 0.88rem; }
.trust th, .trust td { padding: 14px 18px 14px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); font-weight: 400; }
.trust thead th { font: 400 0.6rem/1.5 var(--label); color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.07em; border-bottom-color: var(--line-strong); }
.trust tbody th { width: 17%; color: var(--ink); font-weight: 600; }
.trust td { position: relative; width: 16.6%; padding-left: 17px; color: var(--ink-2); text-wrap: pretty; }
.dot { position: absolute; left: 0; top: 1.42em; width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--ink-3); }
.dot.ok { background: var(--paper); border-color: var(--paper); }
.dot.half { background: linear-gradient(to right, var(--paper) 50%, transparent 50%); border-color: var(--paper); }
.trust-foot { margin-top: 16px; max-width: 60em; }

.honest { margin-top: clamp(36px, 5vw, 60px); display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); padding-top: clamp(24px, 3vw, 34px); border-top: 1px solid var(--line-strong); }
.honest-lead { margin-top: 12px; max-width: 16em; font: 600 clamp(1.4rem, 2.6vw, 2rem)/1.15 var(--sans); letter-spacing: -0.035em; color: var(--ink-2); text-wrap: balance; }
.honest-gap { margin-top: 30px; }
.plain { margin-top: 10px; }
.plain li { position: relative; padding: 10px 0 10px 18px; border-bottom: 1px solid var(--line); font-size: 0.93rem; color: var(--ink-2); text-wrap: pretty; }
.plain li::before { content: ""; position: absolute; left: 0; top: 1.25em; width: 6px; height: 1px; background: var(--ink-3); }
.honest-foot { margin-top: 14px; color: var(--ink-2); }

.reads, .foot-fam ul { margin-top: 14px; border-top: 1px solid var(--line-strong); }
.reads { margin-top: clamp(32px, 4vw, 48px); }
.reads a, .foot-fam a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 13px 0; border-bottom: 1px solid var(--line); text-decoration: none;
  transition: padding 0.3s var(--ease), border-color 0.2s;
}
.reads b, .foot-fam b { font: 600 0.98rem var(--sans); letter-spacing: -0.02em; }
.reads span, .foot-fam span { margin-left: auto; font: 400 0.62rem var(--label); color: var(--ink-3); letter-spacing: 0.03em; text-align: right; }
.reads a::after, .foot-fam a::after { content: "→"; flex: none; order: 3; font: 400 0.8rem var(--label); color: var(--ink-3); transition: color 0.2s, transform 0.3s var(--ease); }
.reads a::after { content: "↗"; }
.reads a:hover, .foot-fam a:hover { padding-left: 8px; border-bottom-color: var(--ink-3); }
.reads a:hover::after, .foot-fam a:hover::after { color: var(--ultra-ink); transform: translateX(4px); }

/* ---------- closing ---------- */
.closing { padding-top: clamp(64px, 9vw, 120px); padding-bottom: clamp(64px, 9vw, 120px); }
.closing-h { max-width: 13em; font: 600 clamp(2.1rem, 6vw, 4.6rem)/0.98 var(--sans); letter-spacing: -0.05em; text-wrap: balance; }
.closing .btn-solid { text-transform: none; letter-spacing: 0.01em; font-size: 0.76rem; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); }
.foot-row {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px);
  padding-top: clamp(36px, 5vw, 56px); padding-bottom: clamp(40px, 6vw, 64px);
}
.foot-about p { margin-top: 18px; max-width: 34em; font-size: 0.84rem; color: var(--ink-3); text-wrap: pretty; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 18px; font: 400 0.66rem var(--label); letter-spacing: 0.04em; }
.foot-links a { display: inline-block; padding: 6px 0; color: var(--ink-2); }
.foot-about .foot-fine { margin-top: 14px; font-size: 0.78rem; }
.foot-h { font: 500 0.62rem var(--label); color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.1em; }

/* ---------- the 404 page ---------- */
.lost { min-height: 62vh; display: flex; flex-direction: column; justify-content: center; padding-top: 64px; padding-bottom: 64px; }
.lost .giant { white-space: normal; font-size: clamp(2.6rem, 9vw, 6rem); }
.lost .lede { margin-top: 22px; color: var(--ink-2); }

/* ---------- narrower screens ---------- */
@media (max-width: 1000px) {
  .top nav a:not(.out):nth-child(n + 4) { display: none; }
}
@media (max-width: 900px) {
  .hero-row, .split, .foot-row, .sec-head, .honest { grid-template-columns: minmax(0, 1fr); }
  .plate-phone { justify-self: start; margin-top: 8px; }
  .sec-head .body { margin-top: 0; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid article:nth-child(3n + 1) { padding-left: clamp(16px, 2.2vw, 28px); border-left: 1px solid var(--line); }
  .grid article:nth-child(odd) { padding-left: 0; border-left: 0; }
  .rules { grid-template-columns: minmax(0, 1fr); }
  .rules article, .rules article:first-child { padding: 18px 0 16px; border-left: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 640px) {
  /* the ruler takes the whole width; each run's numbers go on a line under its bar */
  .fin { --c-run: 0px; --c-range: 0px; --c-med: 0px; }
  .runs thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .runs tr { grid-template-columns: auto minmax(0, 1fr) auto; padding: 4px 0 8px; }
  .runs tbody th { grid-row: 2; padding: 0 10px 0 0; }
  .runs tbody th::before { content: "Run 0"; }
  .run-cell { grid-column: 1 / -1; grid-row: 1; }
  .runs td:nth-child(3) { grid-row: 2; padding: 0; text-align: left; }
  .runs td:nth-child(4) { grid-row: 2; padding: 0; }
  .runs td:nth-child(4)::before { content: "median "; font: 400 0.6rem var(--label); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
  .plate-broad { display: none; }
  .plate-narrow { display: block; }
  .plate-narrow .paper { padding: 0; }
  .n-start { display: none; }
  .ruler-notes { height: 34px; }
  .ruler-notes .n-band { left: auto; right: 0; top: 16px; padding-left: 0; }
  .replay { margin-left: 0; }
}
@media (max-width: 560px) {
  .top nav a:not(.out) { display: none; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .grid article, .grid article:nth-child(3n + 1) { padding-left: 0; border-left: 0; }
  .kv div { grid-template-columns: 78px minmax(0, 1fr); }
  .plate-phone { max-width: none; }
  .btn { flex: 1 1 auto; justify-content: space-between; }
  .reads span, .foot-fam span { display: none; }
  .cmd code { font-size: 0.74rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .giant, .rise, .fin[data-state="done"] .chip-paid { animation: none; }
  .btn::after, .reads a, .reads a::after, .foot-fam a, .foot-fam a::after, .ruler-fill { transition: none; }
}
