/* Follows the h5i site chassis (h5i.dev/_static/blog.css): near-black
   ground, a warm greyscale ramp, red as the lone accent, hairline cells, no
   radius, no shadow. Archivo for prose, IBM Plex Mono for every label; weight
   is spent on the one headline, not on every heading. */
:root {
  color-scheme: dark;
  --spot:       #ff6258;
  --spot-solid: #e0241b;
  --red-bright: #ff3b30;

  --bg:     #070707;
  --panel:  #0e0e0d;
  --panel2: #151513;
  --mass:   #1d1d1b;
  --ink:    #f1ede4;
  --text:   #d3cfc6;
  --dim:    #a5a198;
  --faint:  #807c74;
  --line:   #1a1a18;
  --line2:  #2a2a27;
  --grid:   #0e0e0d;

  --cyan:   #a9bdd0;
  --green:  #62c98c;
  --yellow: #d6a94e;

  --good: var(--green);
  --bad:  var(--spot);
  --scrim: rgba(0, 0, 0, 0.6);

  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Archivo", -apple-system, system-ui, sans-serif;
  --disp: "Archivo", -apple-system, system-ui, sans-serif;

  /* one curve for everything that moves */
  --ease: cubic-bezier(.2, .7, .2, 1);

  --chip-good-bg: color-mix(in srgb, var(--green) 14%, transparent);
  --chip-warn-bg: color-mix(in srgb, var(--yellow) 14%, transparent);

  --gut: 34px;
  --sheet: 1440px;
}
/* Light: its own steps of the same ramps, chosen for contrast on white. */
:root[data-theme="light"] {
  color-scheme: light;
  --spot:       #c8221a;
  --spot-solid: #d11f16;
  --bg:     #f6f4ef;
  --panel:  #fdfcf9;
  --panel2: #eeebe4;
  --mass:   #e3e0d8;
  --ink:    #12110f;
  --text:   #2a2925;
  --dim:    #55524b;
  --faint:  #716d65;
  --line:   #e6e3dc;
  --line2:  #d0ccc3;
  --grid:   #edeae3;
  --cyan:   #2f5878;
  --green:  #1d7f46;
  --yellow: #8f6412;
  --scrim: rgba(20, 20, 24, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 72px 72px;
}
body {
  max-width: var(--sheet);
  margin: 0 auto;
  background: var(--bg);
  border-left: 1px solid var(--line2);
  border-right: 1px solid var(--line2);
  border-bottom: 1px solid var(--line2);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  font-feature-settings: "ss01";
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--spot); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; color: inherit; }
code { font-family: var(--mono); font-size: .88em; color: var(--ink); }
::selection { background: var(--spot-solid); color: #fff; }
a:focus-visible, button:focus-visible, summary:focus-visible, select:focus-visible, input:focus-visible {
  outline: 2px solid var(--spot); outline-offset: 3px;
}
.skip-link {
  position: fixed; top: -60px; left: 1rem; z-index: 300;
  padding: .6rem 1rem; background: var(--ink); color: var(--bg);
  font-weight: 700; transition: top .15s;
}
.skip-link:focus { top: 0; }
:target { scroll-margin-top: 84px; }

/* nav */
.site-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 24px;
  height: 60px; padding: 0 var(--gut);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line2);
}
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { width: 24px; height: 24px; }
.brand span { font-family: var(--disp); font-weight: 700; font-size: 19px; letter-spacing: -.03em; }
.brand span::after {
  content: ""; display: inline-block; width: 5px; height: 5px; margin-left: 5px;
  background: var(--spot-solid); vertical-align: middle;
}
.brand .brand-reading {
  font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint);
}
.brand .brand-reading::after { display: none; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a, .github-link {
  font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .14em; text-transform: uppercase;
  color: var(--dim); transition: color .15s, background-size .25s var(--ease);
}
/* the underline draws in from the left rather than blinking on */
.site-nav a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; padding-bottom: 3px; }
.site-nav a:hover { color: var(--ink); text-decoration: none; background-size: 100% 1px; }
.github-link {
  padding: 7px 15px; border: 1px solid var(--line2); color: var(--ink);
  transition: background .15s, border-color .15s;
}
.github-link:hover { background: var(--spot-solid); border-color: var(--spot-solid); color: #fff; text-decoration: none; }

/* bands */
main > section { position: relative; padding: 44px var(--gut) 50px; border-bottom: 1px solid var(--line2); }
main > section:last-child { border-bottom: 0; }
.intro { padding: 72px var(--gut) 56px; }
.intro h1, .intro .lede { max-width: 1000px; }
.eyebrow, .section-tag {
  display: flex; align-items: center; gap: 10px; margin: 0;
  font: 500 11px var(--mono); letter-spacing: .24em; text-transform: uppercase; color: var(--spot);
}
h1 {
  margin: 20px 0 0; color: var(--ink);
  font-family: var(--disp); font-weight: 700;
  font-size: clamp(32px, 4.2vw, 60px); line-height: 1; letter-spacing: -.035em;
}
.lede { margin: 28px 0 0; color: var(--dim); font-size: 16px; line-height: 1.7; max-width: 76ch; }

.callout {
  max-width: 900px; margin: 30px 0 0; padding: 14px 18px;
  border: 0; border-left: 2px solid var(--ink); background: var(--panel);
}
.callout p { margin: 0; color: var(--dim); font-size: 14.5px; }
.callout .callout-title {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
  font: 500 11px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ink);
}
.callout .callout-title svg { width: 14px; height: 14px; fill: currentColor; }
.callout.warning { border-left-color: var(--yellow); }
.callout.warning .callout-title { color: var(--yellow); }

/* numbers strip, filled by the script */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line2); }
.tiles:empty { display: none; }
.tile { padding: 24px var(--gut) 26px; border-right: 1px solid var(--line); }
.tile:last-child { border-right: 0; }
.tile .v {
  display: block; color: var(--ink);
  font-family: var(--disp); font-weight: 700; font-size: clamp(26px, 3vw, 40px);
  letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums;
}
.tile .l {
  display: block; margin-top: 11px;
  font: 500 10.5px var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--faint);
}
.tile .s { display: block; margin-top: 8px; color: var(--dim); font-size: 12.5px; }
.tile .bar-track { margin-top: 12px; height: 4px; }

.block-head { margin-bottom: 30px; }
.block-head h2 {
  margin: 0; color: var(--ink);
  font-family: var(--disp); font-weight: 650; font-size: clamp(26px, 2.8vw, 36px);
  line-height: 1.1; letter-spacing: -.025em;
}
.block-head p { margin: 18px 0 0; max-width: 76ch; color: var(--dim); font-size: 15px; line-height: 1.7; }
.key { display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line2); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 14px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); color: var(--dim); }
thead th {
  background: var(--panel); color: var(--faint); white-space: nowrap;
  font: 500 10.5px var(--mono); letter-spacing: .16em; text-transform: uppercase;
  border-bottom: 1px solid var(--line2);
}
tbody tr:last-child td { border-bottom: 0; }
thead th.num { font-size: 10.5px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-family: var(--mono); font-size: 13px; }
.models td:first-child { color: var(--ink); font-weight: 500; white-space: nowrap; }
.models .agent { color: var(--faint); font-family: var(--mono); font-size: 12.5px; }
.w-bar { width: 42%; }
.bar-row { display: flex; align-items: center; gap: 12px; }
.bar-track { flex: 1; height: 8px; min-width: 80px; background: var(--panel2); overflow: hidden; }
.bar-fill { height: 100%; background: var(--spot-solid); }
.bar-label { min-width: 110px; font: 13px var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.bar-label .pct { font-weight: 700; }
.bar-label .of { color: var(--faint); }

.filters { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 14px; }
.field {
  display: flex; flex-direction: column; gap: 6px;
  font: 400 10px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--faint);
}
.field.grow { flex: 1; min-width: 200px; }
.field select, .field input {
  min-height: 38px; padding: 6px 10px; border: 1px solid var(--line2); border-radius: 0;
  background: var(--panel); color: var(--ink);
  font-family: var(--sans); font-size: 14px; letter-spacing: 0; text-transform: none;
}

.matrix th, .matrix td { padding: 8px 10px; }
.matrix thead th.col { text-align: center; font-size: 10px; line-height: 1.35; min-width: 90px; letter-spacing: .08em; }
.matrix thead th.col .agent { display: block; color: var(--faint); opacity: .75; text-transform: none; letter-spacing: 0; }
.matrix tbody tr.task { cursor: pointer; transition: background .15s; }
.matrix tbody tr.task:hover, .matrix tbody tr.task:focus-visible {
  background: color-mix(in srgb, var(--spot-solid) 6%, transparent); outline: none;
}
.matrix tr.group td {
  padding-top: 18px; background: var(--bg); color: var(--spot);
  font: 400 10.5px var(--mono); letter-spacing: .2em; text-transform: uppercase;
}
.matrix .t-name { color: var(--ink); font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
.matrix .t-prop { color: var(--dim); font-size: 13px; min-width: 220px; }
.matrix td.cell { text-align: center; }
.cell-icon { display: inline-grid; place-items: center; width: 22px; height: 22px; font-size: 13px; font-weight: 700; line-height: 1; }
.cell-icon.good { color: var(--bg); background: var(--good); }
.cell-icon.bad { color: var(--bad); border: 1px solid var(--bad); }
.cell-icon.none { color: var(--faint); }
.matrix .count { color: var(--faint); font: 12px var(--mono); padding: 14px; }

.apps td:first-child { color: var(--ink); font-weight: 500; white-space: nowrap; }
.apps .repo { font-family: var(--mono); font-size: 12px; white-space: nowrap; }

/* pipeline cells */
.step-k { color: var(--spot); font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.about, .flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 30px; }
.about { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.flow { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.about li, .step {
  position: relative; padding: 20px 22px 22px;
  border: 1px solid var(--line2); transition: background .15s;
}
.about li:hover, .step:hover { background: color-mix(in srgb, var(--spot-solid) 4%, transparent); }
.about h3, .step h3 {
  margin: 12px 0 8px; color: var(--ink);
  font-family: var(--disp); font-weight: 600; font-size: 17px; letter-spacing: -.01em; line-height: 1.3;
}
.about p, .step p { margin: 0; color: var(--dim); font-size: 13.5px; line-height: 1.65; }
.about li:not(:last-child)::after { content: "→"; position: absolute; top: calc(50% - 12px); right: -23px; color: var(--faint); font: 16px var(--mono); }
.about-note { margin: 22px 0 0; color: var(--dim); font-size: 14.5px; }
.step { border-top: 2px solid var(--step); padding: 18px 18px 20px; }
.step:not(:last-child)::after { content: ""; position: absolute; top: 50%; right: -24px; width: 18px; height: 1px; background: var(--faint); }
.step:not(:last-child)::before { content: ""; position: absolute; top: calc(50% - 4px); right: -25px; border: 4px solid transparent; border-left: 6px solid var(--faint); border-right: 0; }
.step.rust { --step: var(--spot-solid); }
.step.lean { --step: var(--cyan); }
.step.agent { --step: var(--ink); }
.step.grade { --step: var(--green); }
.step.lean .step-k { color: var(--cyan); }
.step.agent .step-k { color: var(--ink); }
.step.grade .step-k { color: var(--green); }
.flow-notes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 30px; margin-top: 12px; }
.bracket { position: relative; margin: 0; padding: 14px 4px 0; color: var(--dim); font-size: 13px; border-top: 1px solid var(--faint); }
.bracket::before, .bracket::after { content: ""; position: absolute; top: -10px; width: 1px; height: 10px; background: var(--faint); }
.bracket::before { left: 0; }
.bracket::after { right: 0; }
.bracket strong { color: var(--ink); font-weight: 500; }
.bracket.diff { grid-column: 1 / 3; border-top-color: var(--spot-solid); }
.bracket.diff::before, .bracket.diff::after { background: var(--spot-solid); }
.bracket.hidden-ref { grid-column: 4 / 6; }

/* footer */
.site-footer {
  display: flex; align-items: center; flex-wrap: wrap; gap: 22px;
  padding: 22px var(--gut); border-top: 1px solid var(--line2);
  font: 11px var(--mono); letter-spacing: .06em; color: var(--faint);
}
.site-footer .footer-brand { display: flex; align-items: center; gap: 8px; color: var(--ink); font: 700 15px var(--disp); letter-spacing: -.02em; }
.site-footer .footer-brand img { width: 18px; height: 18px; }
.site-footer .footer-brand .sub { color: var(--faint); font-weight: 400; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer nav a { color: var(--dim); }
.site-footer nav a:hover { color: var(--ink); text-decoration: none; }
.site-footer .legal { margin-left: auto; }

.tooltip {
  position: fixed; z-index: 60; max-width: 300px; padding: 9px 11px; pointer-events: none;
  background: var(--panel2); color: var(--text); border: 1px solid var(--line2); font-size: 12px;
}
.tooltip b { display: block; margin-bottom: 2px; color: var(--ink); font-size: 12.5px; }
.tooltip .r { color: var(--dim); }

/* task drawer */
.drawer { position: fixed; inset: 0; z-index: 50; }
.drawer-scrim { position: absolute; inset: 0; background: var(--scrim); }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(1100px, 100%);
  display: flex; flex-direction: column; background: var(--bg); border-left: 1px solid var(--line2);
}
.drawer-head { display: flex; gap: 16px; align-items: flex-start; padding: 22px 26px 16px; border-bottom: 1px solid var(--line2); }
.drawer-head > div { flex: 1; min-width: 0; }
.drawer-head h2 { margin: 14px 0 0; color: var(--ink); font: 600 19px var(--mono); overflow-wrap: anywhere; }
.d-property { margin: 6px 0 0; color: var(--dim); }
.close {
  width: 36px; height: 36px; border: 1px solid var(--line2); border-radius: 0;
  background: none; color: var(--dim); font-size: 20px; line-height: 1; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.close:hover { background: var(--spot-solid); border-color: var(--spot-solid); color: #fff; }
.tabs { display: flex; gap: 0; padding: 0 20px; border-bottom: 1px solid var(--line2); overflow-x: auto; }
.tabs button {
  padding: 12px 14px; border: 0; border-bottom: 2px solid transparent; background: none; cursor: pointer;
  color: var(--faint); font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--spot-solid); }
.drawer-body { flex: 1; overflow-y: auto; padding: 22px 26px 60px; }
.drawer-body h3 { margin: 28px 0 10px; color: var(--ink); font-family: var(--disp); font-weight: 600; font-size: 17px; letter-spacing: -.01em; }
.drawer-body h3:first-child { margin-top: 0; }
.drawer-body p.note { margin: 0 0 12px; color: var(--dim); font-size: 14px; }

.code { margin: 0 0 14px; border: 1px solid var(--line2); background: var(--panel); overflow: hidden; }
.code-head {
  display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline;
  padding: 8px 14px; border-bottom: 1px solid var(--line2);
  font: 500 10.5px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--faint);
}
.code-head strong { color: var(--ink); font-weight: 400; font-size: 11.5px; letter-spacing: .02em; text-transform: none; }
.code-head a { margin-left: auto; }
.code pre { margin: 0; padding: 14px 16px; overflow: auto; max-height: 560px; color: var(--text); font: 12.5px/1.65 var(--mono); tab-size: 4; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pair .missing { padding: 14px; border: 1px dashed var(--line2); color: var(--faint); font-size: 13px; }
.fn-title { margin: 24px 0 8px; color: var(--ink); font: 600 13.5px var(--mono); }
.fn-title:first-child { margin-top: 0; }
/* tokens differ by how much ink they carry, not by hue (h5i highlight.css):
   red is kept for keywords */
.tok-kw { color: var(--spot); }
.tok-str { color: color-mix(in srgb, var(--ink) 64%, transparent); }
.tok-com { color: color-mix(in srgb, var(--ink) 42%, transparent); }
.tok-num { color: var(--ink); }
.tok-type { color: var(--ink); font-weight: 500; }

.runs td, .runs th { padding: 8px 10px; font-size: 13.5px; }
.runs .reason { color: var(--faint); font-family: var(--mono); font-size: 12px; }
.result { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; white-space: nowrap; }
.result.good { color: var(--good); }
.result.bad { color: var(--bad); }
details.proof { margin-top: 14px; }
details.proof > summary, details.dev > summary { cursor: pointer; padding: 6px 0; color: var(--ink); font-weight: 500; }
details.proof > summary::marker, details.dev > summary::marker { color: var(--spot); }
.dev-body { padding: 4px 18px 10px; border: 1px solid var(--line2); background: var(--panel); font-size: 14px; color: var(--dim); }
.dev-body table { font-size: 13px; }
.dev-body th, .dev-body td { padding: 6px 8px; vertical-align: top; }
.dev-body h3, .dev-body h4, .dev-body h5 { margin: 18px 0 6px; color: var(--ink); }
.empty { color: var(--faint); font-size: 14px; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line2); }
::-webkit-scrollbar-thumb:hover { background: var(--spot-solid); }

@media (max-width: 900px) {
  :root { --gut: 20px; }
  html { background-size: 40px 40px; }
  .site-nav { display: none; }
  .brand { margin-right: auto; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tile { border-bottom: 1px solid var(--line); }
  .tile:nth-child(2n) { border-right: 0; }
  .tile:nth-last-child(-n + 2) { border-bottom: 0; }
  .intro { padding: 56px var(--gut) 44px; }
  main > section { padding: 34px var(--gut) 40px; }
  .pair, .flow, .flow-notes, .about { grid-template-columns: 1fr; }
  .about, .flow { gap: 22px; }
  .about li:not(:last-child)::after { content: "↓"; top: auto; right: auto; bottom: -24px; left: 22px; }
  .step:not(:last-child)::after { top: auto; bottom: -17px; right: auto; left: 28px; width: 1px; height: 12px; }
  .step:not(:last-child)::before { top: auto; bottom: -21px; right: auto; left: 24px; border: 4px solid transparent; border-top: 6px solid var(--faint); border-bottom: 0; }
  .bracket.diff, .bracket.hidden-ref { grid-column: 1; }
  .drawer-head, .drawer-body { padding-left: 16px; padding-right: 16px; }
  .tabs { padding: 0 8px; }
  .w-bar { width: auto; }
  .site-footer .legal { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---- terminal accents (after decbench) ---------------------------------- */
.prompt { margin: 0; font: 500 13px var(--mono); color: var(--dim); }
.prompt .ps { color: var(--spot); margin-right: 8px; }
.prompt .arg { color: var(--ink); }
.caret { display: inline-block; width: .62em; height: 1.15em; margin-left: 6px; vertical-align: -.2em; background: var(--spot); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.status-line { margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 8px 14px; font: 12px var(--mono); color: var(--faint); }
.status-line span { white-space: nowrap; }
.status-line b { color: var(--ink); font-weight: 400; }
.status-line .live { color: var(--yellow); }
/* section heads: a mono number over the title, as in the h5i manual */
h2.term::before {
  content: attr(data-n); display: block; margin-bottom: 12px;
  font: 500 12px var(--mono); letter-spacing: .1em; color: var(--spot);
}
/* inline code in prose is a cell */
.block-head code, .defs code, .step code, .caption code, .limits code, .flow-notes code, .note code {
  font-size: .86em; background: var(--panel); border: 1px solid var(--line2); padding: 1px 5px; white-space: nowrap;
}
.theme { display: flex; border: 1px solid var(--line2); }
.theme button { padding: 5px 9px; border: 0; background: none; cursor: pointer; color: var(--faint); font: 500 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.theme button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.theme button:hover { color: var(--ink); }
.theme button[aria-pressed="true"]:hover { color: var(--bg); }

/* sortable headers */
.sortable th[data-sort] { cursor: pointer; user-select: none; }
.sortable th[data-sort]:hover { color: var(--ink); }
.sortable th[data-sort]::after { content: " ↕"; opacity: .35; }
.sortable th[aria-sort="ascending"]::after { content: " ↑"; opacity: 1; color: var(--spot); }
.sortable th[aria-sort="descending"]::after { content: " ↓"; opacity: 1; color: var(--spot); }
th.c, td.c { text-align: center; }

/* status chips: icon + word, never color alone */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 1px 8px; font: 500 11px var(--mono); white-space: nowrap; border: 1px solid var(--line2); color: var(--dim); }
.chip.good { color: var(--green); background: var(--chip-good-bg); border-color: transparent; }
.chip.warn { color: var(--yellow); background: var(--chip-warn-bg); border-color: transparent; }
.chip.bad { color: var(--spot); border-color: color-mix(in srgb, var(--spot) 45%, transparent); }
.chip + .chip { margin-left: 4px; }
.mark { font: 600 13px var(--mono); }
.mark.good { color: var(--green); }
.mark.bad { color: var(--spot); }
.mark.none { color: var(--faint); }
.apps .sub { display: block; color: var(--faint); font: 11.5px var(--mono); white-space: nowrap; }
.apps .sub a { color: var(--faint); }
.apps .sub a:hover { color: var(--spot); }
.bar-fill.alt { background: var(--ink); opacity: .75; }

.defs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 34px; margin: 22px 0 0; }
.defs dt { color: var(--ink); font: 600 12px var(--mono); }
.defs dd { margin: 4px 0 0; color: var(--dim); font-size: 13.5px; }
.limits { margin: 26px 0 0; padding-left: 18px; color: var(--dim); font-size: 14px; max-width: 100ch; }
.limits li { margin: 6px 0; }
.limits li::marker { color: var(--spot); content: "! "; font-family: var(--mono); }
.count { margin: 10px 0 0; color: var(--faint); font: 12px var(--mono); }

/* charts */
.chart { margin: 0; border: 1px solid var(--line2); background: var(--panel); padding: 14px 10px 6px; overflow-x: auto; }
.chart svg { display: block; width: 100%; height: auto; min-width: 560px; font-family: var(--mono); }
.chart .axis text, .chart .lbl { fill: var(--faint); font-size: 11px; }
.chart .app-lbl { fill: var(--spot); font-size: 10.5px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; }
.chart .bench-lbl { fill: var(--dim); font-size: 11.5px; }
.chart .grid line { stroke: var(--line); }
.chart .ref { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; opacity: .6; }
.chart .dot { fill: var(--spot-solid); stroke: var(--panel); stroke-width: 2; }
.chart .dot.hollow { fill: var(--panel); stroke: var(--faint); stroke-width: 2; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover + .dot, .chart .dot.hot { stroke: var(--ink); }
.chart .stem { stroke: var(--line2); stroke-width: 2; }
.chart .zone { fill: var(--panel2); }
.caption { margin: 10px 0 0; color: var(--faint); font-size: 13px; max-width: 100ch; }
details.data-table { margin-top: 14px; }
details.data-table > summary { cursor: pointer; color: var(--dim); font: 12px var(--mono); }
details.data-table > summary::marker { color: var(--spot); }
details.data-table .table-wrap { margin-top: 10px; }
details.data-table td { font-size: 13px; }
details.data-table td.scope { color: var(--faint); font-size: 12px; max-width: 60ch; }

.matrix .t-name { white-space: nowrap; }
.matrix td.prover { color: var(--faint); font: 12px var(--mono); white-space: nowrap; }
.correction { margin: 0 0 14px; padding: 12px 14px; border: 0; border-left: 2px solid var(--yellow); background: var(--panel); color: var(--dim); font-size: 14px; }
.correction strong { color: var(--yellow); font: 500 11px var(--mono); letter-spacing: .2em; text-transform: uppercase; display: block; margin-bottom: 4px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0 0 16px; font-size: 13.5px; }
.kv dt { color: var(--faint); font: 12px var(--mono); }
.kv dd { margin: 0; color: var(--text); }

@media (max-width: 1100px) { .site-nav { gap: 12px; } .github-link { display: none; } }
@media (max-width: 900px) { .defs { grid-template-columns: 1fr; } .theme { margin-left: auto; } }
@media (prefers-reduced-motion: reduce) { .caret { animation: none; } }
.tile .v small { font-size: .5em; font-weight: 500; color: var(--faint); letter-spacing: -.01em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.w-bar-s { width: 22%; }
.w-bar-s .bar-track, td .bar-track { min-width: 60px; }

/* performance page */
.impl { font-family: var(--mono); font-size: 12.5px; color: var(--dim); white-space: nowrap; }
.impl.h5i { color: var(--ink); font-weight: 600; }
.impl.h5i::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; background: var(--spot-solid); vertical-align: middle; }
.sub-head { margin: 30px 0 12px; font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.block-head + .filters + div > .sub-head:first-child, .app-body > .sub-head:first-child { margin-top: 0; }
/* Equal plotting widths: headings and values must not change the bar scale.
   Keep readable columns on narrow screens via the table wrapper's scroll. */
.perf-matrix, .perf-bars { table-layout: fixed; }
.perf-matrix { min-width: calc(160px + var(--perf-columns) * 180px); }
.perf-bars { min-width: calc(220px + var(--perf-columns) * 190px); }
.perf-matrix tr > :first-child { width: 160px; }
.perf-bars tr > :first-child { width: 220px; }
.perf-matrix thead th, .perf-bars thead th,
.perf-matrix .impl, .perf-bars .impl { white-space: normal; overflow-wrap: anywhere; }
.perf-matrix th[scope="row"] a { font-family: var(--mono); font-size: 12.5px; color: var(--ink); }
/* Overview cell: a thin length bar (req/s as % of the row's fastest) under the
   number — length reads at a glance in both themes, where a faint color wash did
   not. The fastest is the full accent bar, marked with a dot and bold ink. */
.perf-matrix td.ov-cell { position: relative; padding-bottom: 13px; color: var(--text); }
.perf-matrix td.ov-cell .ov-val { position: relative; }
.perf-matrix td.ov-cell .ov-bar { position: absolute; left: 10px; right: 10px; bottom: 5px; height: 3px; background: var(--line2); border-radius: 2px; }
.perf-matrix td.ov-cell .ov-bar::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--f, 0) * 100%); background: color-mix(in srgb, var(--faint) 75%, transparent); border-radius: 2px; }
.perf-matrix td.ov-cell.best { color: var(--ink); font-weight: 600; }
.perf-matrix td.ov-cell.best .ov-bar::before { background: var(--spot-solid); }
.perf-matrix td.ov-cell.second .ov-bar::before { background: color-mix(in srgb, var(--spot-solid) 45%, var(--panel)); }
.perf-matrix td.ov-cell .win { color: var(--spot); font-size: 9px; vertical-align: 1px; margin-left: 5px; }
.perf-bars th, .perf-bars td { padding: 8px 12px; }
.perf-bars thead th.on, .perf-bars td.on { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.perf-bars .bar-track { min-width: 60px; }
.perf-bars .bar-label { flex: 0 0 64px; min-width: 0; font-size: 12.5px; white-space: normal; overflow-wrap: anywhere; }
.bar-fill.other { background: var(--faint); }
.perf-detail .sub { display: block; color: var(--faint); font: 11.5px var(--sans); white-space: normal; font-weight: 400; }
.perf-detail th[scope="row"] { min-width: 220px; }
.err { color: var(--spot); font-size: 11px; }
.scenario-tabs { padding: 0; margin-bottom: 4px; border: 0; border-bottom: 1px solid var(--line2); }

/* landing page */
.bench-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 1px solid var(--line2); }
.bench-card { display: flex; flex-direction: column; gap: 14px; padding: 40px var(--gut) 44px; border-right: 1px solid var(--line2); color: var(--text); transition: background .15s; }
.bench-card:last-child { border-right: 0; }
.bench-card:hover { background: color-mix(in srgb, var(--spot-solid) 4%, transparent); text-decoration: none; }
.bench-card h2 { margin: 0; font: 700 30px/1.15 var(--disp); letter-spacing: -.03em; color: var(--ink); }
.bench-card p { margin: 0; color: var(--dim); font-size: 15px; line-height: 1.7; max-width: 60ch; }
.bench-card .facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; margin: 10px 0 4px; }
.bench-card .facts .v { display: block; font: 600 28px/1.1 var(--disp); color: var(--ink); letter-spacing: -.02em; }
.bench-card .facts .v small { font-size: .55em; color: var(--faint); font-weight: 500; }
.bench-card .facts .l { display: block; margin-top: 6px; font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.bench-card .go { margin-top: auto; font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--spot); }
.landing-list { margin: 0; padding-left: 18px; color: var(--dim); max-width: 90ch; }
.landing-list li { margin: 8px 0; }
@media (max-width: 900px) {
  .bench-cards { grid-template-columns: 1fr; }
  .bench-card { border-right: 0; border-bottom: 1px solid var(--line2); padding: 32px 16px; }
  .bench-card:last-child { border-bottom: 0; }
}
#apps > section { padding: 44px var(--gut) 50px; border-bottom: 1px solid var(--line2); }
@media (max-width: 900px) { #apps > section { padding: 34px var(--gut) 40px; } }

/* Cart batch comparisons share the application chart layout. */
.batch-bars .bar-label { flex-basis: 100px; }
.batch-bars .sub { display: block; color: var(--faint); font: 11.5px var(--sans); }
