/* Concept: an engineering prototype. Matte black, hairline precision, one ignition orange,
   and motion that sweeps laterally with long, decisive easing. */
:root {
  --bg: #08090a;
  --panel: #0e1012;
  --line: #1d2025;
  --fg: #ebebe8;
  --fg-2: #c3c5c2;
  --muted: #80858e;
  --accent: #ff6b1a;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --expo: cubic-bezier(.16, 1, .3, 1);
  --font: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; line-height: 1.5; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
svg { display: block; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }

.rule-b { border-bottom: 1px solid var(--line); }
.rule-t { border-top: 1px solid var(--line); }
.wrap {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  border-inline: 1px solid var(--line);
}
.pad { padding: 24px 16px; }

/* Header. On every load an orange streak draws across beneath it, then cools to a hairline. */
body > header { position: relative; }
body > header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent) 70%, #fff);
  transform-origin: left;
  pointer-events: none;
  animation: ignite 1.8s var(--expo) .1s both;
}
@keyframes ignite { 0% { transform: scaleX(0); opacity: 1; } 55% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: .875rem; font-weight: 500; }
.sq { width: 12px; height: 12px; background: var(--accent); transition: transform .4s var(--ease); }
.brand:hover .sq { transform: rotate(90deg); }
.topnav { display: flex; gap: 20px; font-size: .75rem; color: var(--muted); }
.topnav a { transition: color .15s; }
.topnav a:hover { color: var(--fg); }

/* Hero */
.hero { display: grid; align-items: end; gap: 48px; padding: 64px 16px; }
.grid-bg {
  --cols: 8;
  --rows: 12;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: calc(100% / var(--cols)) calc(100% / var(--rows));
  background-position: -1px -1px;
}
.eyebrow { font-size: .75rem; line-height: 1rem; text-transform: uppercase; letter-spacing: .22em; color: var(--muted); }
.dot { display: inline-block; width: 6px; height: 6px; margin-right: 8px; background: var(--accent); vertical-align: middle; }
/* Sized so all 15 characters fit on one line at every width (mono advance .6em, tracking -.05em). */
.display { margin-top: 32px; font-size: clamp(2.25rem, 10.4vw, 4.5rem); line-height: 1; font-weight: 500; letter-spacing: -.05em; white-space: nowrap; }
.lede { margin-top: 24px; max-width: 28rem; font-size: .875rem; line-height: 1.625; color: var(--muted); }

/* Text is unveiled left to right, like a panel lighting up, in a short stagger. */
.hero > div > *, .page-title > *, .back { animation: wipe 1.2s var(--expo) .15s both; }
.hero > div > :nth-child(2), .page-title > :nth-child(2) { animation-delay: .25s; }
.hero > div > :nth-child(3), .page-title > :nth-child(3) { animation-delay: .35s; }
@keyframes wipe { from { clip-path: inset(-10% 100% -10% 0); transform: translateX(-10px); } to { clip-path: inset(-10% -2% -10% 0); } }
@keyframes slide { from { opacity: 0; transform: translateX(-12px); } }

/* Registration marks: four hairline corners around instruments and figures. */
.instrument, .frame { position: relative; }
.instrument::before, .frame::before {
  --m: color-mix(in srgb, var(--accent) 75%, transparent);
  content: "";
  position: absolute;
  inset: -6px;
  pointer-events: none;
  background:
    linear-gradient(var(--m), var(--m)) top left / 10px 1px,
    linear-gradient(var(--m), var(--m)) top left / 1px 10px,
    linear-gradient(var(--m), var(--m)) top right / 10px 1px,
    linear-gradient(var(--m), var(--m)) top right / 1px 10px,
    linear-gradient(var(--m), var(--m)) bottom left / 10px 1px,
    linear-gradient(var(--m), var(--m)) bottom left / 1px 10px,
    linear-gradient(var(--m), var(--m)) bottom right / 10px 1px,
    linear-gradient(var(--m), var(--m)) bottom right / 1px 10px;
  background-repeat: no-repeat;
  animation: lock 1.4s var(--expo) .4s both;
}
@keyframes lock { from { inset: -18px; opacity: 0; } }

/* Hero art: a diffusion pass. Every square starts as noise and denoises in hard digital steps;
   squares further right hold their noise longer (--n), so the graph resolves left to right.
   --k sets each square's noise amplitude and .alt flips its phase, so neighbours never agree. */
.art { width: 100%; height: auto; background: var(--bg); overflow: hidden; }
.art .px { animation: denoise calc(.9s + var(--n)) steps(1, end) both; }
.art .px.alt { animation-name: denoise-alt; }
.art .px.blink { animation: denoise calc(.9s + var(--n)) steps(1, end) both, blink 3s ease-in-out calc(2s + var(--b)) infinite; }
.art .px.alt.blink { animation-name: denoise-alt, blink; }
.art .cell { animation: noise calc(.9s + var(--n)) steps(1, end) both; }
.art .cell.alt { animation-name: noise-alt; }
@keyframes denoise {
  0% { opacity: calc(var(--k) * .9); } 14% { opacity: .08; } 28% { opacity: calc(.3 + var(--k) * .7); } 42% { opacity: .2; }
  57% { opacity: 1; } 71% { opacity: .5; } 85% { opacity: 1; } 100% { opacity: 1; }
}
@keyframes denoise-alt {
  0% { opacity: .08; } 14% { opacity: calc(var(--k) * .9); } 28% { opacity: .2; } 42% { opacity: calc(.4 + var(--k) * .6); }
  57% { opacity: .6; } 71% { opacity: 1; } 85% { opacity: .75; } 100% { opacity: 1; }
}
@keyframes noise {
  0% { fill: var(--accent); fill-opacity: calc(var(--k) * .5); } 14% { fill: var(--accent); fill-opacity: 0; }
  28% { fill: var(--accent); fill-opacity: calc(var(--k) * .38); } 42% { fill: var(--accent); fill-opacity: .03; }
  57% { fill: var(--accent); fill-opacity: calc(var(--k) * .2); } 71% { fill: var(--accent); fill-opacity: 0; }
  85% { fill: var(--accent); fill-opacity: calc(var(--k) * .08); } 100% { fill: var(--accent); fill-opacity: 0; }
}
@keyframes noise-alt {
  0% { fill: var(--accent); fill-opacity: 0; } 14% { fill: var(--accent); fill-opacity: calc(var(--k) * .5); }
  28% { fill: var(--accent); fill-opacity: .03; } 42% { fill: var(--accent); fill-opacity: calc(var(--k) * .3); }
  57% { fill: var(--accent); fill-opacity: 0; } 71% { fill: var(--accent); fill-opacity: calc(var(--k) * .12); }
  85% { fill: var(--accent); fill-opacity: 0; } 100% { fill: var(--accent); fill-opacity: 0; }
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .15; } }

/* Lists */
.label {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: .75rem;
  line-height: 1rem;
  text-transform: uppercase;
  letter-spacing: .22em;
  color: var(--muted);
}
.label-meta { display: inline-flex; align-items: baseline; gap: 20px; }
.count { font-variant-numeric: tabular-nums; letter-spacing: .1em; }
.count::before { content: "· "; color: var(--accent); }
.more { text-transform: none; letter-spacing: 0; transition: color .15s; }
.more:hover { color: var(--accent); }
.rows > li + li { border-top: 1px solid var(--line); }
/* Rows: on hover a panel sweeps in from the left behind the content, led by an orange edge. */
.row {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: auto 1fr auto;
  column-gap: 24px;
  row-gap: 4px;
  align-items: baseline;
  padding: 24px 16px;
}
.row::before, .row::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.row::before {
  right: auto;
  left: -1px;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform .5s var(--expo);
}
.row::after {
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 5%, var(--panel)), var(--panel) 40%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .7s var(--expo);
}
.row .num { grid-row: span 2; font-size: .75rem; color: var(--muted); transition: color .2s; white-space: nowrap; }
.row .name { font-size: 1.125rem; line-height: 1.75rem; transition: transform .6s var(--expo); }
.row .desc { grid-column: 2; font-size: .875rem; line-height: 1.25rem; color: var(--muted); }
.row .arrow { grid-column: 3; grid-row: 1 / span 2; align-self: center; color: var(--muted); transition: color .2s, transform .6s var(--expo); }
.row.static { grid-template-columns: auto 1fr; }
@media (hover: hover) {
  a.row:hover::before { transform: scaleY(1); }
  a.row:hover::after { transform: scaleX(1); }
  a.row:hover .num, a.row:hover .arrow { color: var(--accent); }
  a.row:hover .name { transform: translateX(6px); }
  a.row:hover .arrow { transform: translate(3px, -3px); }
}
.empty { font-size: .875rem; color: var(--muted); }

/* Page heads */
.page-head { min-height: 26rem; padding: 40px 16px; }
.back { display: inline-flex; align-items: center; gap: 8px; font-size: .75rem; color: var(--muted); transition: color .15s; }
.back:hover { color: var(--fg); }
.back svg { transition: transform .3s var(--ease); }
.back:hover svg { transform: translateX(-3px); }
.page-title { margin-top: 48px; }
.headline { margin-top: 24px; font-size: 1.875rem; line-height: 1.2; font-weight: 500; letter-spacing: -.025em; text-wrap: balance; }
.intro { margin-top: 20px; max-width: 36rem; font-size: .875rem; line-height: 1.625; color: var(--muted); }
.link { color: var(--fg); text-decoration: underline; text-underline-offset: 4px; }
.link:hover { color: var(--accent); }

.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding-inline: 16px;
  font-size: .875rem;
  border: 1px solid var(--line);
  transition: background-color .3s, border-color .3s, color .3s;
}
.btn .arrow { width: 14px; height: 14px; transition: transform .6s var(--expo); }
.btn:hover { border-color: var(--muted); }
.btn:hover .arrow { transform: translate(3px, -3px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 500; }
/* A glint crosses the orange button on hover, like light along a body panel. */
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / .45) 50%, transparent 65%);
  transform: translateX(-110%);
  pointer-events: none;
}
.btn-primary:hover::after { transform: translateX(110%); transition: transform .9s var(--expo); }

/* Spec grid: labelled cells read like a data plate. */
.spec { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
.spec > div { padding: 14px 16px; outline: 1px solid var(--line); animation: slide .9s var(--expo) both; }
.spec > div:nth-child(2) { animation-delay: .06s; }
.spec > div:nth-child(3) { animation-delay: .12s; }
.spec > div:nth-child(4) { animation-delay: .18s; }
.spec dt { font-size: .625rem; color: var(--muted); text-transform: uppercase; letter-spacing: .22em; }
.spec dd { margin-top: 6px; font-size: .8125rem; color: var(--fg); }
.wrap > .spec { overflow: hidden; }

.code { padding: 20px 16px; background: var(--panel); font-family: var(--font); font-size: .8125rem; line-height: 1.7; overflow-x: auto; white-space: pre; }

/* Figure stage */
.stage { padding: 40px 16px; }
.stage.grid-bg { --cols: 8; --rows: 8; }
.frame { background: var(--bg); border: 1px solid var(--line); }
.caption { display: flex; gap: 16px; padding: 12px 16px; font-size: .75rem; color: var(--muted); }
.caption span { color: var(--fg); text-transform: uppercase; letter-spacing: .22em; white-space: nowrap; }
.frame [style*="--i"] { animation: slide .9s var(--expo) calc(var(--i) * 110ms + .2s) both; }

/* Figures share one chart language: muted labels, solid orange for the subject,
   hatched grey for the comparison, hairline rules between rows. */
.chart { padding: 24px 16px; }
.metric-label { font-size: .75rem; color: var(--muted); }
.val { font-size: .75rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ours { background: var(--accent); }
.theirs { background: repeating-linear-gradient(135deg, var(--muted) 0 1px, transparent 1px 5px); box-shadow: inset 0 0 0 1px var(--line); }
.c { display: inline-block; flex: none; width: 12px; height: 12px; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 24px; font-size: .75rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 10px; height: 10px; }
.note { font-size: .75rem; line-height: 1.6; color: var(--muted); }
.hl { color: var(--accent); }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes flow { to { stroke-dashoffset: -16; } }

/* Myrmidon's mascot on its dark dotted tile. The right eye winks on a loop. */
.mascot { display: block; width: 100%; height: auto; }
.mascot-tile { fill: #050506; }
.mascot-dots { fill: #fff; opacity: .04; }
.mascot-eye { fill: var(--accent); filter: drop-shadow(0 0 4px color-mix(in srgb, var(--accent) 70%, transparent)); }
.wink-open { animation: wink-open 5s infinite; }
.wink-shut { opacity: 0; animation: wink-shut 5s infinite; }
@keyframes wink-open { 0%, 60%, 74%, 100% { opacity: 1; } 62%, 72% { opacity: 0; } }
@keyframes wink-shut { 0%, 60%, 74%, 100% { opacity: 0; } 62%, 72% { opacity: 1; } }

/* Benchmarks (nsfw-onnx) */
.metrics { display: grid; gap: 28px; }
.metrics .metric-label { margin-bottom: 10px; }
.bar { display: flex; align-items: center; gap: 12px; height: 22px; }
.bar + .bar { margin-top: 6px; }
.fill { flex: 0 0 auto; width: calc(var(--w) * .72); height: 14px; transform-origin: left; animation: grow 1.1s var(--expo) .3s both; }
.fill.theirs { animation-delay: .45s; }
.metrics .legend { margin-top: 0; }

/* Tally (Myrmidon): nine jobs wired into one hub. Hatched cells are the tools each job used to need. */
.tally { display: grid; gap: 52px; padding-top: 32px; }
.core { display: grid; justify-items: center; gap: 10px; text-align: center; }
.core .mascot { width: 148px; filter: drop-shadow(0 0 36px color-mix(in srgb, var(--accent) 22%, transparent)); }
.core-name { margin-top: 6px; font-size: .875rem; font-weight: 500; }
.core-sum { display: flex; gap: 10px; font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.jobs { position: relative; display: grid; }
.jobs li { display: grid; grid-template-columns: 4.4rem 1fr; gap: 2px 14px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.jobs li:first-child { border-top: 1px solid var(--line); }
.jobs .cells { grid-row: span 2; display: flex; gap: 3px; }
.jobs .cells .c { width: 10px; height: 10px; }
.job { font-size: .8125rem; }
.tools { font-size: .6875rem; color: var(--muted); }

/* Hosts (sshup) */
.hrow { display: grid; grid-template-columns: minmax(0, 8rem) minmax(24px, 1fr) 2.6rem 2.4rem; gap: 12px; align-items: center; padding: 7px 0; font-size: .75rem; }
.hrow.head { padding-top: 0; }
.hname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track { height: 10px; background: color-mix(in srgb, var(--line) 55%, transparent); }
.track .fill { display: block; width: var(--w); height: 100%; }
.load { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.hrow.down .hname, .hrow.down .val { color: var(--muted); }

/* Bundle (Serverbrdg): many files, one archive, many files. */
.bundle { display: grid; gap: 12px; align-items: center; }
.stagecol { display: grid; gap: 12px; justify-items: center; text-align: center; }
.field { display: grid; grid-template-columns: repeat(8, 8px); gap: 4px; }
.field i { width: 8px; height: 8px; border: 1px solid var(--muted); opacity: .55; }
.block .c { width: 44px; height: 44px; box-shadow: 0 0 32px -8px var(--accent); }
.flow { justify-self: center; width: 48px; height: 10px; transform: rotate(90deg); overflow: visible; }
.flow path { fill: none; stroke: var(--accent); vector-effect: non-scaling-stroke; }
.flow path:first-child { stroke-dasharray: 3 4; animation: flow 1.2s linear infinite; }

/* Pins (Pi 5 MHS35) */
.prow { display: grid; grid-template-columns: 4.5rem repeat(3, 1fr); gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.prow.head { padding-top: 0; }
.pin { display: inline-flex; align-items: center; gap: 8px; font-size: .75rem; }
.pin .c { width: 10px; height: 10px; }

/* Bits (XPT2046) */
.brow { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; align-items: center; padding: 8px 0; }
.brow > .metric-label { grid-column: 1 / -1; }
.brow.head > span:empty { display: none; }
.byte { display: inline-grid; grid-template-columns: repeat(8, 22px); gap: 4px; }
.byte em { font-style: normal; font-size: .625rem; color: var(--accent); white-space: nowrap; text-transform: uppercase; letter-spacing: .12em; }
.bit { display: grid; place-items: center; height: 22px; font-style: normal; font-size: .75rem; color: var(--muted); border: 1px solid var(--line); }
.bit.on { color: var(--fg); background: color-mix(in srgb, var(--muted) 16%, transparent); }
.bit.msb { border-color: var(--muted); }
.bit.hot { color: var(--bg); background: var(--accent); border-color: var(--accent); box-shadow: 0 0 18px -4px var(--accent); }
.bits .note { margin-top: 16px; max-width: 34rem; }

/* Figure: Patchbay routing */
.route { display: grid; gap: 16px; padding: 48px 16px 24px; }
.ends { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ends::before, .jobs::before { content: attr(data-label); position: absolute; bottom: calc(100% + 12px); left: 0; font-size: .625rem; color: var(--muted); text-transform: uppercase; letter-spacing: .22em; white-space: nowrap; }
.ends-out { margin-top: 32px; }
.ends li { display: flex; }
.ends span { flex: 1; padding: 8px 10px; font-size: .75rem; text-align: center; border: 1px solid var(--line); background: var(--panel); }
.bus { display: none; }
.bus path { fill: none; stroke: var(--accent); stroke-opacity: .75; stroke-dasharray: 2 6; vector-effect: non-scaling-stroke; animation: flow 1s linear infinite; }
.hub {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 26px;
  color: var(--accent);
  border: 1px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--bg));
  box-shadow: 0 0 48px -16px var(--accent);
}
.glyph { width: 52px; height: 52px; fill: currentColor; }
.hub span { margin-top: 4px; font-size: .75rem; color: var(--fg); }
.hub em { font-style: normal; font-size: .625rem; color: var(--muted); letter-spacing: .12em; }


/* Figure: type and colour specimen */
.specimen { display: grid; gap: 28px; padding: 24px 16px; }
.spec-big { font-size: 6rem; line-height: 1; font-weight: 500; letter-spacing: -.05em; }
.spec-name { margin-top: 12px; font-size: .75rem; color: var(--muted); }
.spec-weights { margin-top: 8px; }
.spec-weights span { margin-right: 16px; font-size: 1.125rem; }
.spec-weights .w5 { font-weight: 500; }
.spec-swatches { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; }
.spec-swatches li { padding: 12px; background: var(--bg); outline: 1px solid var(--line); }
.spec-swatches i { display: block; height: 40px; margin-bottom: 10px; background: var(--c); transform-origin: bottom; animation: grow-y .8s var(--ease) calc(var(--i) * 80ms + .3s) both; }
@keyframes grow-y { from { transform: scaleY(0); } }
.spec-swatches span { display: block; font-size: .75rem; }
.spec-swatches em { display: block; font-size: .6875rem; font-style: normal; color: var(--muted); }

/* Cards: a ruled grid, after opyuii's nano feature list */
.cards { display: grid; grid-template-columns: 1fr; overflow: hidden; }
.cards li { outline: 1px solid var(--line); }
.cards li > * { display: block; height: 100%; padding: 20px 16px; transition: background-color .2s; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: .875rem; }
kbd { flex: none; padding: 0 6px; font-family: inherit; font-size: .6875rem; color: var(--muted); border: 1px solid var(--line); transition: color .2s, border-color .2s; }
.card-body { margin-top: 12px; font-size: .75rem; line-height: 1.625; color: var(--muted); }
.card-foot { margin-top: 16px; font-size: .6875rem; color: var(--muted); }
@media (hover: hover) {
  .cards a:hover { background: var(--panel); }
  .cards a:hover kbd { color: var(--accent); border-color: var(--accent); }
}

/* Long-form writing */
.prose { max-width: 46rem; padding: 40px 16px 56px; font-size: .9375rem; line-height: 1.8; color: var(--fg-2); }
.prose > * + * { margin-top: 1.25em; }
.prose h2, .prose h3, .prose h4 { position: relative; color: var(--fg); font-weight: 500; line-height: 1.3; scroll-margin-top: 24px; }
.prose h2 { margin-top: 2.4em; font-size: 1.375rem; letter-spacing: -.02em; }
.prose h3 { margin-top: 2em; font-size: 1.0625rem; }
.prose h4 { margin-top: 1.8em; font-size: .9375rem; color: var(--fg-2); }
.anchor { display: none; }
.prose a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; transition: color .15s; }
.prose a:hover { color: var(--accent); }
.prose .anchor { text-decoration: none; }
.prose strong { color: var(--fg); font-weight: 500; }
.prose mark { padding: 0 3px; color: var(--fg); background: color-mix(in srgb, var(--accent) 28%, transparent); }
.prose :not(pre) > code { padding: 1px 5px; font-family: var(--font); font-size: .875em; color: var(--fg); background: var(--panel); border: 1px solid var(--line); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: square; }
.prose ol { list-style: decimal; }
.prose li::marker { color: var(--accent); }
.prose li + li { margin-top: .4em; }
.prose li:has(> input[type="checkbox"]), .prose li:has(> p > input[type="checkbox"]) { list-style: none; margin-left: -1.4em; }
.prose input[type="checkbox"] { appearance: none; width: 12px; height: 12px; margin-right: 10px; vertical-align: -1px; border: 1px solid var(--muted); }
.prose input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
.prose blockquote { padding-left: 18px; border-left: 2px solid var(--accent); color: var(--fg-2); font-style: italic; }
.prose hr { margin: 2.5em 0; border: 0; border-top: 1px solid var(--line); }
.md-code { position: relative; background: var(--panel); border: 1px solid var(--line); }
.md-code pre { padding: 18px 16px; overflow-x: auto; font-size: .8125rem; line-height: 1.7; }
.md-code code { font-family: var(--font); color: var(--fg); }
.md-lang { position: absolute; top: 0; right: 0; padding: 3px 8px; font-size: .625rem; color: var(--muted); text-transform: uppercase; letter-spacing: .18em; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.md-fig { margin-block: 2em; }
.md-fig img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); }
.md-fig img:not([width]) { width: 100%; }
.md-fig figcaption { margin-top: 10px; font-size: .75rem; color: var(--muted); }
.md-table { overflow-x: auto; }
.md-table table { width: 100%; border-collapse: collapse; font-size: .8125rem; }
.md-table th, .md-table td { padding: 8px 12px; text-align: left; border: 1px solid var(--line); }
.md-table th { color: var(--fg); font-weight: 500; background: var(--panel); }
.callout { --c: var(--accent); padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-left: 2px solid var(--c); }
.callout > * + * { margin-top: .75em; }
.callout-title { font-size: .75rem; color: var(--c); text-transform: uppercase; letter-spacing: .18em; }
.callout-quote, .callout-example { --c: var(--muted); }
.wikilink { text-decoration-style: dotted !important; }
.wikilink.missing { color: var(--muted); }

/* Footer */
.meter { position: relative; overflow: hidden; padding-top: 16px; border-bottom: 1px solid var(--line); }
.bars { width: 100%; height: 40px; }
.bars line { transform-box: fill-box; transform-origin: bottom; animation: sway 3.2s ease-in-out calc(var(--i) * -110ms) infinite alternate; }
@keyframes sway { from { transform: scaleY(.75); } }

/* HUD scan: a faint beam crosses the meter every 8s and each bar and readout flares as it is reached.
   The per-bar delay (index × 79ms) matches where the beam's leading edge is at that moment. */
.meter::after {
  content: "";
  position: absolute;
  top: 16px;
  bottom: 0;
  left: -56px;
  width: 56px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 7%, transparent));
  border-right: 1px solid color-mix(in srgb, var(--accent) 60%, transparent);
  animation: sweep 8s linear infinite;
}
@keyframes sweep { from { left: -56px; } to { left: 100%; } }
.bars line.cold { animation: sway 3.2s ease-in-out calc(var(--i) * -110ms) infinite alternate, hit 8s linear calc(var(--i) * 79ms) infinite; }
@keyframes hit { 0% { stroke: var(--accent); stroke-opacity: .7; } 6%, 100% { stroke: var(--muted); stroke-opacity: .45; } }

/* Telemetry readouts sit in a fixed row above their bar and tick in place. --v is a registered
   integer so it can animate, and counter() prints it; without animation it rests at full height. */
@property --v { syntax: "<integer>"; inherits: false; initial-value: 0; }
.readout {
  --v: var(--hi);
  position: absolute;
  top: 3px;
  left: var(--x);
  font-size: .5625rem;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: .06em;
  counter-reset: v var(--v);
  transform: translateX(-50%);
  animation:
    v-sway 3.2s ease-in-out calc(var(--i) * -110ms) infinite alternate,
    flare 8s linear calc(var(--i) * 79ms) infinite,
    v-count 1.6s var(--ease) .3s backwards;
}
.readout::before { content: ""; position: absolute; top: calc(100% + 2px); left: 50%; width: 1px; height: 3px; background: var(--accent); opacity: .5; }
.readout::after { content: counter(v, decimal-leading-zero); }
@keyframes v-sway { from { --v: var(--lo); } to { --v: var(--hi); } }
@keyframes v-count { from { --v: 0; } to { --v: var(--hi); } }
@keyframes flare { 0% { color: var(--fg); text-shadow: 0 0 4px color-mix(in srgb, var(--accent) 60%, transparent); } 6%, 100% { color: var(--accent); text-shadow: none; } }
.foot { display: flex; flex-direction: column; gap: 8px; padding: 24px 16px; font-size: .75rem; color: var(--muted); }
.foot nav { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.foot a { transition: color .15s; }
.foot a:hover { color: var(--fg); }
.stamp { margin-left: 16px; padding-left: 16px; border-left: 1px solid var(--line); font-variant-numeric: tabular-nums; letter-spacing: .08em; }

/* Lists, cards and figures ease in as they scroll into view, where supported. */
@supports (animation-timeline: view()) {
  .rows > li, .cards > li, .stage .frame {
    animation: reveal linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 35%;
  }
  @keyframes reveal { from { opacity: 0; transform: translateX(-16px); } }
}

@media (min-width: 40rem) {
  .topbar, .label { padding-inline: 24px; }
  .pad { padding: 24px; }
  .spec { grid-template-columns: none; grid-auto-columns: 1fr; grid-auto-flow: column; }
  .spec > div { padding: 16px 24px; }
  .hero { padding: 96px 24px; }
  .hero.grid-bg { --cols: 14; --rows: 15; }
  .row { grid-template-columns: 5.5rem 12.5rem 1fr auto; padding-inline: 24px; }
  .row .num, .row .desc, .row .arrow { grid-row: auto; grid-column: auto; }
  .row.static { grid-template-columns: auto 12.5rem 1fr; }
  .page-head { padding: 56px 24px; }
  .headline { font-size: 3rem; line-height: 1.05; }
  .code { padding-inline: 24px; }
  .stage { padding: 64px 48px; }
  .stage.grid-bg { --cols: 14; --rows: 8; }
  .caption { padding-inline: 24px; }
  .chart, .route, .specimen { padding: 32px 28px; }
  .route { grid-template-columns: 1fr 72px auto 72px 1fr; gap: 0; align-items: stretch; padding-top: 60px; }
  .ends { grid-template-columns: 1fr; grid-auto-rows: 1fr; gap: 0; }
  .ends li { align-items: center; padding-block: 5px; }
  .ends-out { margin-top: 0; }
  .ends-out::before { left: auto; right: 0; }
  .bus { display: block; width: 100%; height: 100%; }
  .hub { align-self: center; }
  .metrics { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .metrics .legend { grid-column: 1 / -1; }
  .tally { grid-template-columns: 200px 72px 1fr; gap: 0; align-items: stretch; padding-top: 56px; }
  .core { align-self: center; }
  .jobs { grid-auto-rows: 1fr; }
  .jobs li { padding: 6px 0; }
  .hrow { grid-template-columns: 11rem 1fr 3rem 3rem; }
  .bundle { grid-template-columns: 1fr 72px auto 72px 1fr; }
  .flow { width: 100%; transform: none; }
  .prow { grid-template-columns: 6rem repeat(3, 1fr); }
  .brow { grid-template-columns: 8rem auto 1fr; }
  .brow > .metric-label { grid-column: auto; }
  .brow.head > span:empty { display: block; }
  .byte { grid-template-columns: repeat(8, 28px); }
  .bit { height: 28px; }
  .specimen { grid-template-columns: 1fr 1.6fr; align-items: end; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .cards li > * { padding: 20px 24px; }
  .prose { padding: 56px 24px 72px; }
  .anchor { display: block; position: absolute; left: -1.1em; color: var(--accent); opacity: 0; transition: opacity .15s; }
  .prose h2:hover .anchor, .prose h3:hover .anchor, .prose h4:hover .anchor { opacity: 1; }
  .foot { flex-direction: row; align-items: center; justify-content: space-between; padding-inline: 24px; }
}

@media (min-width: 64rem) {
  .hero { grid-template-columns: 1fr minmax(0, 420px); }
  .display { font-size: min(4rem, 5.2vw); }
  .hero.grid-bg { --cols: 22; --rows: 9; }
  .stage { padding: 72px 96px; }
  .stage.grid-bg { --cols: 22; --rows: 8; }
  .cards { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .wink-shut { opacity: 0; }
}
