/* kith's page, drawn as a line map: paper, ink, and one blue line (DESIGN.md, "Direction").
   The page's rail is the stem of the k in the bar, carried down; every part is a stop on it. */
.paused *, .paused ::before, .paused ::after { animation-play-state: paused !important; transition: none !important; }
button.button { font-family: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.shot img { display: block; width: 100%; height: auto; margin-top: 14px; border: 1px solid var(--hair); }

@font-face {
  font-family: Overpass;
  src: url(fonts/overpass.woff2) format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --bg: #f6f5f1;
  --sunken: #eceae3;
  --text: #16181d;
  --dim: #575c69;
  --hair: #cfccc2;
  --accent: #2f5fe0;
  --accent-text: #2a57cf;
  --warn: #8f5f00;
  --bad: #c23030;
  --on-accent: #ffffff;
  --stroke: 3px;
  --stop: 20px;
  --small: 13px;
  --note: 15px;
  --base: 17px;
  --large: 21px;
  --head: 28px;
  --title: 48px;
  --quick: 140ms;
  --arrive: 220ms;
  --enter: 360ms;
  --pop: 500ms;
  --reveal: 600ms;
  --grow: 900ms;
  --write: 2.2s;
  --step: 80ms;
  --breath: 2.6s;
  --blink: 1s;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --sans: Overpass, "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "Cascadia Code", "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
  --gutter: 24px;
  --rail: 56px;
  --gap: 128px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181d;
    --sunken: #20232b;
    --text: #f6f5f1;
    --dim: #a9aebb;
    --hair: #383d4a;
    --accent: #5b8cff;
    --accent-text: #8fb0ff;
    --warn: #f2b84b;
    --bad: #ff7a7a;
    --on-accent: #0d1017;
  }
}
@media (max-width: 720px) {
  :root { --gutter: 16px; --rail: 28px; --gap: 80px; --title: 28px; --head: 21px; --large: 17px; --base: 16px; }
}

*, ::before, ::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 var(--base) / 1.55 var(--sans); font-variant-numeric: tabular-nums; overflow-x: hidden; }
h1, h2, h3, p, ul, ol, pre, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--accent-text); text-underline-offset: 3px; }
code, pre { font-family: var(--mono); font-size: 0.86em; }
.dim { color: var(--dim); font-weight: 400; }
.fine { color: var(--dim); font-size: var(--note); max-width: 64ch; }
:focus-visible { outline: var(--stroke) solid var(--accent); outline-offset: 2px; }

/* The bar. The line under the mark is the k's stem going on down the page. */
.bar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 24px; padding-block: 12px; padding-inline: max(var(--gutter), calc((100vw - 1120px) / 2)); background: var(--bg); }
.scrolled .bar { border-bottom: 1px solid var(--hair); padding-bottom: 11px; }
.brand { position: relative; display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-size: var(--large); font-weight: 800; letter-spacing: -0.02em; }
.brand::after { content: ""; position: absolute; left: 6px; top: 33px; width: var(--stroke); height: 15px; background: var(--text); }
.bar nav { display: flex; gap: 16px; margin-left: auto; font-size: var(--note); font-weight: 600; }
.bar nav a { color: var(--text); text-decoration: none; background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 100% / 0 var(--stroke); padding-bottom: 4px; transition: background-size var(--arrive) var(--ease); }
.bar nav a:hover { background-size: 100% var(--stroke); }
@media (max-width: 1100px) {
  .bar nav { display: none; }
  .bar #motion, .bar #motion[hidden] + .button { margin-left: auto; }
  .bar #motion + .button { margin-left: 0; }
}
@media (max-width: 720px) { .bar { gap: 8px; } }

.button { display: inline-block; padding: 11px 20px; border: var(--stroke) solid var(--accent); background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: var(--note); text-decoration: none; transition: background var(--quick), color var(--quick); }
.button::after { content: "\2192"; display: inline-block; margin-left: 10px; transition: transform var(--quick); }
.button:hover::after { transform: translateX(4px); }
.button.quiet { background: none; border-color: var(--text); color: var(--text); transition: background var(--quick), color var(--quick); }
.button.quiet:hover { background: var(--text); color: var(--bg); }
.button.quiet[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.bar .button { padding: 5px 14px; }
.bar .button::after { content: none; }
@media (max-width: 720px) { .bar .button { padding: 4px 9px; font-size: var(--small); } }

/* The mark in the bar: it draws itself, and its hub keeps a pulse. */
.mark { width: 30px; height: 36px; overflow: visible; }
.mark line { stroke: var(--text); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 40; animation: draw var(--grow) var(--ease) both; }
.mark circle { fill: var(--text); transform-box: fill-box; transform-origin: center; animation: pop var(--pop) var(--ease) both; animation-delay: var(--pop); }
.mark .hub { fill: var(--accent); animation-delay: var(--enter); }
.mark .ring { fill: none; stroke: var(--accent); stroke-width: 1.5; animation: ring var(--breath) ease-out infinite; }

/* The rail and its stops. */
main { position: relative; max-width: calc(1120px + 2 * var(--gutter)); margin-inline: auto; padding: 0 var(--gutter) 0 calc(var(--gutter) + var(--rail)); }
main::before, main::after { content: ""; position: absolute; left: calc(var(--gutter) + 6px); top: 0; bottom: 0; width: var(--stroke); background: var(--text); }
main::after { background: var(--accent); transform: scaleY(var(--run, 0)); transform-origin: top; }
.end { position: absolute; left: calc(var(--gutter) - 3px); bottom: 0; width: 21px; height: var(--stroke); background: var(--text); z-index: 1; }
.part { position: relative; padding-top: var(--gap); }
.part:last-of-type { padding-bottom: 96px; }
.part::before { content: ""; position: absolute; z-index: 1; left: calc(7.5px - var(--rail) - var(--stop) / 2); top: calc(var(--gap) + 2px); width: var(--stop); height: var(--stop); border: var(--stroke) solid var(--text); border-radius: 50%; background: var(--bg); transition: background var(--enter), border-color var(--enter); }
.part.seen::before { border-color: var(--accent); background: radial-gradient(var(--accent) 38%, var(--bg) 42%); }

/* The top: where you are going, first and largest. */
.hero { display: grid; grid-template-columns: 1.25fr 0.75fr; align-items: center; gap: 40px; min-height: min(82vh, 800px); padding-block: 56px 72px; }
.hero .say > * { animation: rise var(--enter) var(--ease) both; }
.hero .say > :nth-child(2) { animation-delay: var(--step); }
.hero .say > :nth-child(3) { animation-delay: calc(var(--step) * 2); }
.hero .say > :nth-child(4) { animation-delay: calc(var(--step) * 3); }
.hero .say > :nth-child(5) { animation-delay: calc(var(--step) * 4); }
.word { font-size: var(--note); color: var(--dim); }
.word b { color: var(--text); font-weight: 800; }
h1 { font-size: clamp(44px, 7.4vw, 100px); line-height: 0.98; letter-spacing: -0.035em; font-weight: 800; margin-block: 20px 28px; text-wrap: balance; }
.under { background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 96% / 100% 0.08em; animation: rule var(--grow) var(--ease) var(--pop) both; }
.lead { font-size: var(--large); line-height: 1.45; max-width: 31em; }
.acts { display: flex; flex-wrap: wrap; gap: 12px; margin-block: 32px 20px; }

/* The mark as the map it is: four machines on three lines, and what runs between them. */
.live { width: 100%; max-width: 460px; justify-self: end; }
.map { display: block; width: 100%; height: auto; overflow: visible; }
.map .lines path { fill: none; stroke: var(--text); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 200; animation: drawn calc(var(--grow) * 1.5) var(--ease) both; }
.map .stopped { fill: var(--bg); stroke: var(--text); stroke-width: 4; }
.map .hub { fill: var(--accent); stroke: var(--bg); stroke-width: 3; }
.map .stopped, .map .hub, .map .halo, .map .rep, .map .wave { transform-box: fill-box; transform-origin: center; }
.map .stopped, .map .hub { animation: pop var(--pop) var(--ease) var(--pop) both; }
.map .halo { fill: none; stroke: var(--accent); stroke-width: 1.5; animation: halo calc(var(--breath) * 2) ease-out infinite; }
.map .halo.late { animation-delay: var(--breath); }
.map text { font: 700 14px var(--sans); fill: var(--text); text-anchor: middle; animation: rise var(--enter) var(--ease) var(--grow) both; }
.map .packets circle { stroke-width: 2; }
.packets circle { fill: var(--accent); stroke: var(--bg); }
/* The replicas of one workload: a short line past each machine with a stop for each; a free place is a dashed ring. */
.map .reps path { fill: none; stroke: var(--text); stroke-width: 3; stroke-linecap: round; animation: rise var(--enter) var(--ease) var(--grow) both; }
.map .rep { fill: var(--bg); stroke: var(--dim); stroke-width: 2; stroke-dasharray: 3 3; animation: pop var(--pop) var(--ease) calc(var(--grow) + var(--pop)) both; }
.map .rep.on { fill: var(--accent); stroke: var(--accent); stroke-width: 3; stroke-dasharray: none; animation: pop var(--pop) var(--ease) calc(var(--grow) + var(--pop)) both, beat var(--breath) ease-in-out calc(var(--d, 0s) + var(--k, 0s)) infinite; }
.map .rep.wait { stroke: var(--warn); stroke-width: 3; stroke-dasharray: none; animation: waitdot var(--blink) ease-in-out infinite; }
/* Once the map has drawn itself (the script says so), a stop that comes back is not held back by the first draw's delay. */
.map.go .rep { animation-delay: 0s; }
.map.go .rep.on { animation-delay: 0s, calc(var(--d, 0s) + var(--k, 0s)); }
.map .reps[data-node="laptop"] { --d: -0.7s; }
.map .reps[data-node="server"] { --d: -1.4s; }
.map .reps[data-node="old"] { --d: -2.0s; }
.map .rep:nth-of-type(2) { --k: -0.4s; }
.map .rep:nth-of-type(3) { --k: -1.2s; }
.map .wave { fill: var(--accent); stroke: var(--bg); stroke-width: 2; opacity: 0; }
/* A machine that is lost (the script sets .gone on everything of its): its line is broken, its stop is a dashed red ring, and nothing runs to it. */
.map .lines path.gone { stroke: var(--dim); stroke-dasharray: 1 9; }
.map .stopped.gone { stroke: var(--bad); stroke-dasharray: 4 4; }
.map text.gone { fill: var(--dim); }
.map .packets circle.gone { opacity: 0; }
.map .reps.gone path { stroke: var(--dim); }
.map .reps.gone .rep.on { opacity: 0.5; }
.map .reps path, .map .rep, .map .stopped, .map text { transition: stroke var(--enter), fill var(--enter), opacity var(--enter); }
.live figcaption { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin: 14px 0 0; padding-top: 10px; border-top: var(--stroke) solid var(--text); font-weight: 400; font-size: var(--note); }
.live code { font-weight: 700; color: var(--text); }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-block: 32px 56px; }
  .live { max-width: 440px; justify-self: start; }
}

/* Four numbers, on a band. */
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 32px; border-top: var(--stroke) solid var(--text); }
.stat { padding-top: 18px; }
.stat > b { display: block; font-size: var(--title); line-height: 1.05; letter-spacing: -0.03em; font-weight: 800; }
.stat small { font-size: var(--note); font-weight: 600; letter-spacing: 0; margin-left: 4px; }
.stat p { color: var(--dim); font-size: var(--note); margin-top: 6px; max-width: 26ch; }
@media (max-width: 860px) { .strip { grid-template-columns: 1fr 1fr; row-gap: 12px; } }

/* A part: its code on the line, its name, and what it shows. */
.head { max-width: 46em; margin-bottom: 36px; }
.no { font-size: var(--note); font-weight: 700; display: flex; align-items: center; gap: 10px; }
.no b { font: 700 var(--small) var(--mono); color: var(--bg); background: var(--text); padding: 2px 6px; }
h2 { font-size: var(--title); line-height: 1.04; letter-spacing: -0.03em; font-weight: 800; margin-block: 14px 16px; text-wrap: balance; }
.head > p:last-child { color: var(--dim); max-width: 62ch; }
h3 { font-size: var(--large); font-weight: 800; letter-spacing: -0.01em; }

/* A figure hangs from a rule, as a sign hangs from its band. */
.panel { border-top: var(--stroke) solid var(--text); padding-top: 10px; min-width: 0; }
figcaption { display: flex; align-items: baseline; gap: 12px; font-size: var(--small); font-weight: 700; margin-bottom: 12px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.pair.wide { grid-template-columns: 1.1fr 0.9fr; gap: 56px; }
@media (max-width: 860px) { .pair, .pair.wide { grid-template-columns: 1fr; } }

pre { background: var(--sunken); padding: 20px; line-height: 1.7; font-size: var(--small); overflow-x: auto; }
.k { color: var(--accent-text); }
.c { color: var(--dim); }
.ok { color: var(--accent-text); font-weight: 700; }
.bad { color: var(--bad); }
.js .term .line { opacity: 0; }
.js .seen .term .line { animation: arrive var(--arrive) var(--ease) both; animation-delay: var(--at, 0ms); }

/* Replicas are stops on a short line: ready ones are filled, a waiting one blinks. */
.lamps { display: inline-flex; gap: 10px; background: linear-gradient(var(--text), var(--text)) no-repeat center / 100% var(--stroke); }
.lamp { width: 14px; height: 14px; border-radius: 50%; border: var(--stroke) solid var(--text); background: var(--bg); transition: background var(--enter), border-color var(--enter); }
.lamp.ok { background: var(--accent); border-color: var(--accent); animation: beat var(--breath) ease-in-out infinite; }
.lamp.ok:nth-child(2) { animation-delay: calc(var(--breath) / -3); }
.lamp.ok:nth-child(3) { animation-delay: calc(var(--breath) / -1.5); }
.lamp.wait { border-color: var(--warn); animation: wait var(--blink) ease-in-out infinite; }

/* Pulse: three stops, and what happens when one is gone. */
.pulse svg { display: block; width: 100%; height: auto; transition: opacity var(--enter); }
.pulse.cut svg, .pulse.cut .rows { opacity: 0; }
.pulse .edges path { fill: none; stroke: var(--text); stroke-width: 3; stroke-linecap: round; transition: stroke var(--enter); }
.pulse .packets circle { stroke-width: 1.5; transition: opacity var(--quick); }
.pulse .dot { fill: var(--bg); stroke: var(--text); stroke-width: 3; transition: fill var(--enter), stroke var(--enter); }
.pulse .lead { fill: none; stroke: var(--accent); stroke-width: 3; opacity: 0; transition: opacity var(--enter); }
.pulse .leads .dot { fill: var(--accent); stroke: var(--accent); }
.pulse .leads .lead { opacity: 1; }
.pulse text { fill: var(--text); font: 700 14px var(--sans); text-anchor: middle; }
.pulse .gone .dot { stroke: var(--bad); stroke-dasharray: 4 4; }
.pulse .gone text { fill: var(--dim); }
.pulse[data-state="lost"] .edges .to-g { stroke: var(--dim); stroke-dasharray: 1 9; }
.pulse[data-state="lost"] .packets .to-g { opacity: 0; }
.rows { border-top: 1px solid var(--hair); margin-top: 8px; padding-top: 12px; font-size: var(--note); transition: opacity var(--enter); }
.rows li { display: flex; align-items: center; gap: 14px; min-height: 30px; }
.rows b { width: 56px; }
.points li { color: var(--dim); padding-block: 14px; border-top: 1px solid var(--hair); max-width: 52ch; }
.points li:first-child { border-top: 0; padding-top: 0; }
.points b { color: var(--text); }

/* A node's disk: one slot runs, the other takes the update. */
.parts { display: grid; grid-template-columns: 0.8fr 1.3fr 1.3fr 1.6fr; gap: 4px; }
.p { position: relative; overflow: hidden; background: var(--sunken); border-left: var(--stroke) solid var(--hair); padding: 14px 14px 20px; min-height: 96px; transition: border-color var(--enter); }
.p b { display: block; font: 700 var(--small) var(--mono); }
.p small { color: var(--dim); font-size: var(--small); line-height: 1.4; display: block; margin-top: 4px; }
.slot i { position: absolute; inset: auto 0 0 0; height: var(--stroke); background: var(--accent); transform: scaleX(0); transform-origin: left; }
.slot b::after { font: 700 var(--small) var(--sans); margin-left: 10px; }
.slot.runs { border-color: var(--accent); }
.slot.runs b::after { content: "running"; color: var(--accent-text); }
.slot.writing i { transform: scaleX(1); transition: transform var(--write) linear; }
.slot.trying { border-color: var(--warn); }
.slot.trying b::after { content: "starting"; color: var(--warn); animation: blink var(--blink) ease-in-out infinite; }
.slot.failed { border-color: var(--bad); }
.slot.failed b::after { content: "did not come up"; color: var(--bad); }
.steps, .flow ol { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 16px; }
.steps li, .flow li { position: relative; margin-top: 28px; border-top: var(--stroke) solid var(--text); padding: 20px 24px 0 0; color: var(--dim); font-size: var(--note); }
.steps li::before, .flow li::before { content: ""; position: absolute; left: 0; top: calc((var(--stop) + var(--stroke)) / -2); width: var(--stop); height: var(--stop); border: var(--stroke) solid var(--text); border-radius: 50%; background: var(--bg); transition: background var(--enter), border-color var(--enter); }
.steps .now::before { background: var(--accent); border-color: var(--accent); }
.steps b, .flow b { color: var(--text); display: block; }
.after { margin-top: 28px; }
@media (max-width: 860px) { .parts, .steps, .flow ol { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .parts, .steps, .flow ol { grid-template-columns: 1fr; } }

/* kith OS from a spec: four stops, lit one after another when the figure is first seen. */
.flow { margin-top: 64px; }
.flow code { color: var(--text); overflow-wrap: anywhere; }
.seen .flow li::before { background: var(--accent); border-color: var(--accent); transition-delay: calc(var(--n, 0) * var(--grow) / 3 + var(--reveal)); }
.flow li:nth-child(2) { --n: 1; }
.flow li:nth-child(3) { --n: 2; }
.flow li:nth-child(4) { --n: 3; }

/* Install: the installer's nine questions as stops, lit one after another, each a link to its place on the install page. */
.stops { margin-top: 0; }
.stops li { margin-top: 24px; }
.stops b a { color: var(--text); text-decoration: none; background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 100% / 0 var(--stroke); padding-bottom: 2px; transition: background-size var(--arrive) var(--ease); }
.stops b a:hover { background-size: 100% var(--stroke); }
.stops li:nth-child(5) { --n: 4; }
.stops li:nth-child(6) { --n: 5; }
.stops li:nth-child(7) { --n: 6; }
.stops li:nth-child(8) { --n: 7; }
.stops li:nth-child(9) { --n: 8; }
.seen .stops li::before { transition-delay: calc(var(--n, 0) * var(--grow) / 4 + var(--reveal)); }
@media (min-width: 861px) { .stops ol { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* A measure is a line run out to a stop; its budget is where the line would end. */
.bars { display: grid; gap: 14px; padding-top: 18px; }
.row { display: grid; grid-template-columns: 230px 1fr 150px; align-items: center; gap: 20px; font-size: var(--note); }
.row > b { font-weight: 700; text-align: right; white-space: nowrap; }
.row small, .vs small { font-weight: 400; color: var(--dim); font-size: inherit; }
.track { position: relative; height: 16px; overflow: hidden; background: linear-gradient(var(--hair), var(--hair)) no-repeat center / 100% 1px; }
.track i { position: absolute; inset: 0; color: var(--accent); background: linear-gradient(currentColor, currentColor) no-repeat center / 100% var(--stroke); transform: translateX(-100%); transition: transform var(--grow) var(--ease); }
.track i::after { content: ""; position: absolute; right: 0; top: 1px; width: 14px; height: 14px; border: var(--stroke) solid currentColor; border-radius: 50%; background: var(--bg); }
.track i.other { color: var(--text); }
html:not(.js) .track { display: none; } /* a bar is drawn by the script: without it the figure beside it stands alone */
.seen .track i { transform: translateX(max(calc((var(--v, 0) - 1) * 100%), calc(14px - 100%))); }
.row[data-of] .track::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: var(--stroke); background: var(--text); }
.row:nth-child(2) .track i { transition-delay: var(--step); }
.row:nth-child(3) .track i { transition-delay: calc(var(--step) * 2); }
.row:nth-child(4) .track i { transition-delay: calc(var(--step) * 3); }
@media (max-width: 720px) {
  .row { grid-template-columns: 1fr auto; gap: 6px 12px; }
  .row .track { grid-column: 1 / -1; grid-row: 2; }
}
.versus, .where { margin-top: 64px; }
.versus h3, .where h3 { font-size: var(--head); letter-spacing: -0.02em; margin-bottom: 12px; }
.versus .panel { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 36px 48px; margin-block: 16px; padding-top: 18px; }
.versus section { display: grid; gap: 20px; align-content: start; }
.versus .vg { font-size: var(--note); font-weight: 700; color: var(--dim); border-bottom: 1px solid var(--dim); padding-bottom: 6px; margin: 0; }
.versus section > .fine { margin: -10px 0 0; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 18px 0 0; font-size: var(--note); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 28px; height: 14px; color: var(--accent); background: linear-gradient(currentColor, currentColor) no-repeat center / 100% var(--stroke); position: relative; }
.legend i::after { content: ""; position: absolute; right: 0; top: 0; width: 14px; height: 14px; box-sizing: border-box; border: var(--stroke) solid currentColor; border-radius: 50%; background: var(--bg); }
.legend .other i { color: var(--text); }
/* A bar pair: the figure is printed where its bar ends (the last --r of the lane is kept for it). */
.vs { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 6px 14px; font-size: var(--note); }
.vs p { grid-column: 1 / -1; font-weight: 700; margin: 0; }
.lane { --r: 76px; position: relative; }
.lane .track { margin-right: var(--r); }
.lane b { position: absolute; top: 50%; left: 0; transform: translateY(-50%); white-space: nowrap; font-weight: 700; transition: left var(--grow) var(--ease); }
.seen .lane b { left: calc(max(var(--v, 0) * (100% - var(--r)), 14px) + 10px); }
.lane.other .track i, .lane.other b { transition-delay: var(--step); }
.vs-table { margin-top: 20px; font-size: var(--note); }
.vs-table summary { cursor: pointer; font-weight: 700; }
.vs-table .scroll { overflow-x: auto; margin-top: 12px; }
.vs-table table { width: 100%; border-collapse: collapse; }
.vs-table th, .vs-table td { padding: 7px 14px 7px 0; border-bottom: 1px solid var(--hair); text-align: left; vertical-align: top; }
.vs-table thead th { border-bottom: var(--stroke) solid var(--text); }
.vs-table th[scope=rowgroup] { padding-top: 16px; font-size: var(--note); font-weight: 700; color: var(--dim); }
.vs-table td:nth-child(n+3) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vs-table th:nth-child(n+3) { text-align: right; }
.where .row { grid-template-columns: 150px 1fr 210px; }
@media (max-width: 720px) {
  .where .row { grid-template-columns: 1fr auto; }
  .pulse text { font-size: 22px; }
}
.counts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 32px; margin-top: 64px; border-top: var(--stroke) solid var(--text); padding-top: 18px; }
.counts b { font-size: var(--head); letter-spacing: -0.02em; font-weight: 800; }
.counts p { color: var(--dim); font-size: var(--note); max-width: 26ch; }
@media (max-width: 860px) { .counts { grid-template-columns: 1fr 1fr; } }

/* The kinds: each family is a line, and each kind a stop on it. */
.groups { border-top: var(--stroke) solid var(--text); }
.group { display: grid; grid-template-columns: 250px 1fr; gap: 12px 32px; padding-block: 20px 22px; border-bottom: 1px solid var(--hair); }
.group small { color: var(--dim); font-size: var(--small); display: block; margin-top: 2px; max-width: 30ch; }
.group p { display: flex; flex-wrap: wrap; align-content: start; padding-top: 2px; }
.group span { position: relative; margin-top: 12px; border-top: var(--stroke) solid var(--text); padding: 12px 26px 0 0; font: var(--small) var(--mono); }
.group span:last-child { padding-right: 8px; }
.group span::before { content: ""; position: absolute; left: 0; top: -10.5px; width: 18px; height: 18px; border: var(--stroke) solid var(--text); border-radius: 50%; background: var(--bg); transition: transform var(--enter) var(--ease), background var(--quick), border-color var(--quick); }
.js .group span::before { transform: scale(0); }
.js .seen .group span::before { transform: none; }
.group span:nth-child(2)::before { transition-delay: var(--step); }
.group span:nth-child(3)::before { transition-delay: calc(var(--step) * 2); }
.group span:nth-child(4)::before { transition-delay: calc(var(--step) * 3); }
.group span:nth-child(5)::before { transition-delay: calc(var(--step) * 4); }
.group span:nth-child(6)::before { transition-delay: calc(var(--step) * 5); }
.group:hover span::before { background: var(--accent); border-color: var(--accent); }
@media (max-width: 720px) { .group { grid-template-columns: 1fr; } }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.cards h3 { margin-bottom: 8px; text-wrap: balance; }
.cards p { color: var(--dim); font-size: var(--note); }
.cards p b { color: var(--text); }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }
.wall { margin-top: 40px; }
.calls { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.calls s { font: var(--small) var(--mono); text-decoration: none; padding: 3px 8px; background: linear-gradient(var(--bad), var(--bad)) no-repeat 8px 52% / 0 1px var(--sunken); transition: background-size var(--enter) var(--ease), color var(--enter); transition-delay: calc(var(--i) * var(--step) / 2 + var(--enter)); }
.seen .calls s { background-size: calc(100% - 16px) 1px; color: var(--dim); }

/* Hardware: shares of a GPU's memory run out to a ceiling; the one that does not fit stops short of it, in amber. */
.shares { padding-top: 12px; }
.shares .row { grid-template-columns: 96px minmax(0, 1fr) 128px; }
.shares .row > p { font-weight: 700; }
.shares .row .track::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: var(--stroke); background: var(--text); }
.shares .wait .track i { color: var(--warn); }
.shares .wait > b { color: var(--warn); }
.shares .wait > b small { color: var(--warn); }
.gpu .fine, .took .fine, .relay .fine, .code .fine { margin-top: 16px; }
.head.desk { margin-top: 72px; }
.head.desk h3 { font-size: var(--head); letter-spacing: -0.02em; margin-bottom: 12px; }
#desk .group { grid-template-columns: 1fr; gap: 4px; }
#desk { align-self: start; }
@media (max-width: 720px) { .shares .row { grid-template-columns: 72px minmax(0, 1fr) auto; gap: 6px 12px; } .shares .row .track { grid-column: auto; grid-row: auto; } }

/* Build: your commit goes to a node and what failed comes back; it takes this long. */
.path { position: relative; margin-top: 20px; padding-left: 4px; }
.path li { position: relative; padding: 0 0 18px 30px; border-left: var(--stroke) solid var(--text); margin-left: 8px; font-size: var(--note); }
.path li:last-child { border-left-color: transparent; padding-bottom: 0; }
.path li::before { content: ""; position: absolute; left: calc(var(--stroke) / -2 - var(--stop) / 2); top: 1px; width: var(--stop); height: var(--stop); border: var(--stroke) solid var(--text); border-radius: 50%; background: var(--bg); transition: background var(--enter), border-color var(--enter); transition-delay: calc(var(--n, 0) * var(--grow) / 3 + var(--reveal)); }
.seen .path li::before { background: var(--accent); border-color: var(--accent); }
.path li:nth-child(2) { --n: 1; }
.path li:nth-child(3) { --n: 2; }
.path li:nth-child(4) { --n: 3; }
.took .big b { display: block; font-size: clamp(64px, 11vw, 120px); line-height: 1; letter-spacing: -0.04em; font-weight: 800; }
.took .big small { font-size: var(--large); font-weight: 600; letter-spacing: 0; margin-left: 6px; }
.took .bars { padding-top: 14px; }
.took .row { grid-template-columns: 96px minmax(0, 1fr); }
.took code { overflow-wrap: anywhere; }

/* Where you are: the nav's link for the part in view is ruled, and its stop on the rail breathes. */
.bar nav a[aria-current] { background-size: 100% var(--stroke); }
.part::after { content: ""; position: absolute; left: calc(7.5px - var(--rail) - var(--stop) / 2); top: calc(var(--gap) + 2px); width: var(--stop); height: var(--stop); border: 1.5px solid var(--accent); border-radius: 50%; opacity: 0; pointer-events: none; }
.part.here::after { animation: ring var(--breath) ease-out infinite; }

footer { max-width: calc(1120px + 2 * var(--gutter)); margin-inline: auto; padding: 20px var(--gutter) 48px calc(var(--gutter) + var(--rail)); font-size: var(--note); display: flex; flex-wrap: wrap; gap: 6px 32px; justify-content: space-between; }

footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; font-weight: 600; }
footer nav a { color: var(--text); text-underline-offset: 4px; text-decoration-color: var(--hair); }
footer nav a:hover { text-decoration-color: var(--accent); }
footer p { min-width: 0; overflow-wrap: anywhere; }

/* 404.html: the map with one stop that is not there. It loads no script, so nothing there can be paused: its two loops end after three turns. */
.still .map .halo, .still .mark .ring { animation-iteration-count: 3; }
.hero.lost { display: block; min-height: 0; padding-block: 56px 72px; }
.hero.lost .map { max-width: 340px; margin-top: 40px; }
@media (max-width: 860px) { .hero.lost { padding-block: 32px 56px; } }

/* What is in a part rises once, when the part is first seen; its stop on the rail is always there. */
.js [data-see] > * { opacity: 0; transform: translateY(14px); transition: opacity var(--reveal) var(--ease), transform var(--reveal) var(--ease); }
.js [data-see].seen > * { opacity: 1; transform: none; }

@keyframes draw { from { stroke-dashoffset: 40; } }
@keyframes pop { from { transform: scale(0); } }
@keyframes ring { from { transform: scale(1); opacity: 0.9; } to { transform: scale(2.6); opacity: 0; } }
@keyframes halo { from { transform: scale(0.5); opacity: 0.8; } to { transform: scale(2.6); opacity: 0; } }
@keyframes beat { 50% { transform: scale(0.72); } }
@keyframes wait { 50% { background: var(--warn); } }
@keyframes waitdot { 50% { fill: var(--warn); } }
@keyframes drawn { from { stroke-dashoffset: 200; } }
@keyframes blink { 50% { opacity: 0.25; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes arrive { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; } }
@keyframes rule { from { background-size: 0 0.08em; } }

/* Asked for less motion: everything is where it ends up, and nothing loops. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, ::before, ::after { animation: none !important; transition: none !important; }
  .js [data-see] > *, .js .term .line { opacity: 1; transform: none; }
  .js .group span::before { transform: none; }
  .packets, .mark .ring, .map .halo, .map .wave, .part::after { display: none; }}
