/* Layout: a strict hairline grid; the commit range is the hero and every section hangs off the same columns. Single dark look by choice. */
:root {
  --bg: #0b0b0c; --panel: #111113; --line: #232327; --fg: #ececee; --muted: #8b8b94;
  --suspect: #f2b544; --good: #46c48a; --bad: #ff6b57; --skip: #5d5d66;
  --display: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--display); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
.wrap { max-width: 1160px; margin: 0 auto; padding-inline: 20px; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--suspect); outline-offset: 3px; }
.mono { font-family: var(--mono); font-size: .92em; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
h1, h2, h3, h4 { text-wrap: balance; margin: 0; }
h1 { font-size: clamp(36px, 6vw, 68px); line-height: 1.02; letter-spacing: -.035em; font-weight: 600; }
h2 { font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -.025em; font-weight: 600; line-height: 1.1; }
p { margin: 0; }
.lede { color: var(--muted); font-size: 18px; max-width: 58ch; }
.lede.s { font-size: 16px; }
.intro { display: grid; gap: 14px; align-content: start; }

nav { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 5; }
nav .wrap { display: flex; align-items: center; gap: 24px; height: 56px; }
.logo { font-weight: 700; letter-spacing: -.02em; display: flex; gap: 8px; align-items: center; text-decoration: none; }
.logo i { width: 14px; height: 14px; border: 2px solid var(--suspect); display: inline-block; }
nav .links { display: flex; gap: 20px; margin-left: auto; color: var(--muted); font-size: 14px; }
nav .links a { text-decoration: none; }
nav .links a:hover { color: var(--fg); }
.btn { font: 500 14px var(--display); border: 1px solid var(--line); background: var(--fg); color: var(--bg); padding: 8px 14px; border-radius: 6px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn.ghost { background: transparent; color: var(--fg); }
.btn.ghost:hover { border-color: var(--muted); }
@media (max-width: 760px) { nav .links { display: none; } nav .btn { margin-left: auto; } }

.grid { background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 48px 48px; background-position: -1px -1px; }
section { border-bottom: 1px solid var(--line); padding-block: 72px; }
.hero { padding-block: 64px 56px; border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; gap: 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.install { font-family: var(--mono); font-size: 13px; color: var(--muted); border: 1px solid var(--line); padding: 8px 12px; border-radius: 6px; background: var(--panel); max-width: 100%; overflow-x: auto; white-space: nowrap; }

/* the range */
.range { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; overflow: hidden; }
.range-head { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.range-head b { color: var(--fg); font-weight: 500; }
.range-head .spacer { margin-left: auto; }
.cells-scroll { overflow-x: auto; }
.cells { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); }
.cell { border-right: 1px solid var(--line); padding: 14px 6px 12px; min-height: 118px; display: flex; flex-direction: column; gap: 8px; transition: background .4s, opacity .4s; }
.cell:last-child { border-right: 0; }
.cell .pos { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.cell .sha { font-family: var(--mono); font-size: 11.5px; writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: .04em; align-self: center; }
.cell .tag { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; align-self: center; padding: 2px 4px; border-radius: 3px; color: var(--muted); }
.cell.out { opacity: .32; }
.cell.good .tag { background: color-mix(in srgb, var(--good) 22%, transparent); color: var(--good); }
.cell.bad .tag { background: color-mix(in srgb, var(--bad) 22%, transparent); color: var(--bad); }
.cell.skip .tag { background: color-mix(in srgb, var(--skip) 40%, transparent); color: var(--fg); }
.cell.culprit { background: color-mix(in srgb, var(--suspect) 14%, transparent); box-shadow: inset 0 0 0 2px var(--suspect); }
.cell.culprit .tag { background: var(--suspect); color: var(--bg); }
.range-log { border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 14px 16px; align-items: end; }
.log { font-family: var(--mono); font-size: 12.5px; line-height: 1.7; color: var(--muted); min-width: 0; overflow-x: auto; white-space: pre; }
.log .g { color: var(--good); } .log .b { color: var(--bad); } .log .s { color: var(--fg); } .log .c { color: var(--suspect); }
@media (max-width: 760px) { .cells { grid-template-columns: repeat(14, 52px); } .range-log { grid-template-columns: 1fr; } .range-log .btn { justify-self: start; } }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stat { padding: 22px 20px; border-right: 1px solid var(--line); display: grid; gap: 6px; align-content: start; background: var(--panel); }
.stat:last-child { border-right: 0; }
.stat .n { font-size: clamp(30px, 4vw, 44px); font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat .n.hi { color: var(--suspect); }
.stat .k { color: var(--muted); font-size: 13.5px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0,1fr)); } .stat:nth-child(2) { border-right: 0; } .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

.split { display: grid; grid-template-columns: 5fr 7fr; gap: 40px; align-items: start; }
.split > * { min-width: 0; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } }
.stack { display: grid; gap: 56px; }
.steps { display: grid; border-top: 1px solid var(--line); }
.step { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.step .i { font-family: var(--mono); font-size: 12px; color: var(--suspect); padding-top: 3px; }
.step h3 { font-size: 16px; font-weight: 600; }
.step p { color: var(--muted); font-size: 14.5px; margin-top: 4px; }

/* bars */
.bars { display: grid; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 76px; gap: 12px; align-items: center; font-size: 14px; }
.bar-row .name small { display: block; color: var(--muted); font-family: var(--mono); font-size: 11.5px; }
.bar-track { height: 26px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); overflow: hidden; }
.bar-fill { height: 100%; background: var(--fg); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.bar-fill.hi { background: var(--suspect); }
.bar-fill.dim { background: var(--skip); }
.bar-row .v { font-family: var(--mono); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.axis { display: grid; grid-template-columns: 150px 1fr 76px; gap: 12px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.axis div:nth-child(2) { display: flex; justify-content: space-between; }
.chart-note { font-size: 13px; color: var(--muted); }
@media (max-width: 520px) { .bar-row, .axis { grid-template-columns: 100px 1fr 64px; } }

/* tables */
.tbl { overflow-x: auto; }
.tbl table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.tbl th, .tbl td { border: 1px solid var(--line); padding: 10px 8px; text-align: center; vertical-align: middle; }
.tbl th { font-weight: 500; color: var(--muted); font-family: var(--mono); font-size: 12px; }
.tbl td.l, .tbl th.l { text-align: left; }
.tbl td.l small { display: block; color: var(--muted); font-size: 12px; }
.tbl tr.group td { background: var(--panel); font-family: var(--mono); font-size: 12px; color: var(--muted); text-align: left; letter-spacing: .04em; text-transform: uppercase; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 2px; vertical-align: middle; }
.dot.y { background: var(--fg); }
.dot.n { border: 1px solid var(--skip); }
.dot.diff { background: var(--suspect); }
.pill { font-family: var(--mono); font-size: 11px; padding: 3px 7px; border-radius: 4px; white-space: nowrap; display: inline-block; }
.pill.found { background: var(--fg); color: var(--bg); }
.pill.none { border: 1px solid var(--skip); color: var(--muted); }
.pill.miss { border: 1px solid var(--bad); color: var(--bad); }
tr.differs td.l { box-shadow: inset 3px 0 0 var(--suspect); }
.legend { display: flex; gap: 10px 18px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-top: 12px; align-items: center; }
.legend span { display: inline-flex; gap: 8px; align-items: center; }
.swatch { width: 12px; height: 12px; display: inline-block; box-shadow: inset 3px 0 0 var(--suspect); border: 1px solid var(--line); }

/* modes */
.modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.mode { padding: 22px 20px; border-right: 1px solid var(--line); display: grid; gap: 12px; align-content: start; background: var(--panel); min-width: 0; }
.mode:last-child { border-right: 0; }
.mode .cmd { font-family: var(--mono); font-size: 12.5px; color: var(--suspect); }
.mode h3 { font-size: 18px; font-weight: 600; }
.mode p { color: var(--muted); font-size: 14px; }
.mode .big { font-size: 34px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.mode .big.good { color: var(--good); }
.mini { font-family: var(--mono); font-size: 12px; line-height: 1.75; border-top: 1px solid var(--line); padding-top: 10px; display: grid; }
.mini div { display: flex; gap: 10px; }
.mini .g { color: var(--good); min-width: 52px; } .mini .b { color: var(--bad); min-width: 52px; }
@media (max-width: 860px) { .modes { grid-template-columns: 1fr; } .mode { border-right: 0; border-bottom: 1px solid var(--line); } .mode:last-child { border-bottom: 0; } }

/* PR comment */
.pr { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); overflow: hidden; }
.pr-head { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.pr-head .av { width: 22px; height: 22px; border: 2px solid var(--suspect); }
.pr-head .x { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 50%, transparent); padding: 2px 8px; border-radius: 999px; }
.pr-body { padding: 18px 18px 20px; display: grid; gap: 12px; font-size: 14.5px; }
.pr-body h4 { font-size: 16px; }
.pr-body code { font-family: var(--mono); font-size: 12.5px; background: var(--bg); border: 1px solid var(--line); padding: 1px 5px; border-radius: 4px; }
.quote { border-left: 2px solid var(--suspect); padding-left: 12px; color: var(--muted); }
.diff { font-family: var(--mono); font-size: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; overflow-x: auto; white-space: pre; line-height: 1.6; }
.diff .add { color: var(--good); } .diff .del { color: var(--bad); }

/* get started */
.code { position: relative; font-family: var(--mono); font-size: 13px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; overflow-x: auto; white-space: pre; line-height: 1.7; }
.code .c { color: var(--muted); }
.copy { position: absolute; top: 8px; right: 8px; font: 500 12px var(--mono); background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 5px; padding: 4px 8px; cursor: pointer; }
.copy:hover { border-color: var(--muted); }
.start { display: grid; gap: 22px; }
.start .step { grid-template-columns: 34px minmax(0, 1fr); }
.start .step > div { display: grid; gap: 10px; min-width: 0; }

/* limits */
.limits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.limit { padding: 18px 20px 18px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; align-content: start; }
.limit:nth-child(odd) { border-right: 1px solid var(--line); }
.limit:nth-child(even) { padding-left: 20px; }
.limit h3 { font-size: 15.5px; font-weight: 600; }
.limit p { color: var(--muted); font-size: 14px; }
@media (max-width: 760px) { .limits { grid-template-columns: 1fr; } .limit:nth-child(odd) { border-right: 0; } .limit:nth-child(even) { padding-left: 0; } }

footer { padding-block: 64px; }
footer .wrap { display: grid; gap: 18px; }
.foot-meta { color: var(--muted); font-size: 13px; display: flex; gap: 18px; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } html { scroll-behavior: auto; } }

/* ---- shared additions: nav state, home artifacts, case study ---- */
nav .links a[aria-current="page"] { color: var(--fg); }
.code-line { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 14px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 6px 6px 14px; max-width: 100%; }
.code-line code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; color: var(--fg); }
.code-line code::before { content: "$ "; color: var(--suspect); }
.code-line .copy-btn { font: 600 12.5px var(--display); background: var(--suspect); color: var(--bg); border: 0; border-radius: 6px; padding: 6px 12px; cursor: pointer; }
.code-line .copy-btn.done { background: var(--good); }

/* three steps strip */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.trio > div { padding: 22px 20px; border-right: 1px solid var(--line); display: grid; gap: 8px; align-content: start; background: var(--panel); }
.trio > div:last-child { border-right: 0; }
.trio .k { font: 500 12px var(--mono); color: var(--suspect); letter-spacing: .06em; text-transform: uppercase; }
.trio h3 { font-size: 18px; font-weight: 600; }
.trio p { color: var(--muted); font-size: 14.5px; }
@media (max-width: 760px) { .trio { grid-template-columns: 1fr; } .trio > div { border-right: 0; border-bottom: 1px solid var(--line); } .trio > div:last-child { border-bottom: 0; } }

/* interval playground */
.play { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); padding: 22px 22px 20px; display: grid; gap: 18px; }
.play-presets { display: flex; gap: 8px; flex-wrap: wrap; }
.play-presets button { font: 500 13px var(--mono); color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.play-presets button[aria-pressed="true"] { border-color: var(--suspect); color: var(--suspect); }
.play-ctrl { display: grid; grid-template-columns: 90px 1fr 60px; gap: 12px; align-items: center; font-size: 14px; }
.play-ctrl input { width: 100%; accent-color: var(--suspect); }
.play-ctrl output { font-family: var(--mono); text-align: right; font-variant-numeric: tabular-nums; }
.scale { position: relative; height: 64px; }
.scale .axis-line { position: absolute; left: 0; right: 0; top: 30px; height: 2px; background: var(--line); }
.scale .band { position: absolute; top: 20px; height: 22px; border-radius: 4px; transition: left .35s, width .35s, background .35s; }
.scale .pt { position: absolute; top: 25px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--fg); transition: left .35s; }
.scale .thr { position: absolute; top: 8px; bottom: 6px; width: 2px; background: var(--suspect); }
.scale .thr span { position: absolute; top: -6px; left: 6px; font: 11px var(--mono); color: var(--suspect); white-space: nowrap; }
.scale .tick { position: absolute; bottom: -4px; font: 11px var(--mono); color: var(--muted); transform: translateX(-50%); }
.verdict-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 14.5px; color: var(--muted); }
.verdict { font: 600 13px var(--mono); padding: 4px 10px; border-radius: 6px; }
.verdict.GOOD { background: color-mix(in srgb, var(--good) 20%, transparent); color: var(--good); }
.verdict.BAD { background: color-mix(in srgb, var(--bad) 20%, transparent); color: var(--bad); }
.verdict.INCONCLUSIVE { background: color-mix(in srgb, var(--skip) 40%, transparent); color: var(--fg); }

/* mode cards with small product artifacts */
.cards3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 20px; display: grid; gap: 14px; align-content: start; text-decoration: none; }
.card:hover { border-color: var(--muted); }
.card .cmd { font: 500 12.5px var(--mono); color: var(--suspect); }
.card h3 { font-size: 17px; font-weight: 600; }
.card p { color: var(--muted); font-size: 14px; }
.card .more { font-size: 13.5px; color: var(--fg); }
.card .more::after { content: " →"; color: var(--suspect); }
.art { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-size: 12.5px; min-height: 112px; display: grid; align-content: center; gap: 8px; }
.checkrow { display: flex; gap: 10px; align-items: center; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.checkrow:last-child { border-bottom: 0; }
.checkrow .ic { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; flex: none; }
.checkrow .ok { background: color-mix(in srgb, var(--good) 25%, transparent); color: var(--good); }
.checkrow .no { background: color-mix(in srgb, var(--bad) 25%, transparent); color: var(--bad); }
.checkrow b { font-weight: 600; color: var(--fg); }
.checkrow span.t { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.drift-art { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; height: 84px; }
.drift-art .col { display: grid; gap: 6px; justify-items: center; font: 11px var(--mono); color: var(--muted); }
.drift-art .bar { width: 100%; height: 56px; border-radius: 4px; background: linear-gradient(var(--good), color-mix(in srgb, var(--good) 40%, transparent)); }
.drift-art .pill { font: 600 12px var(--mono); color: var(--good); border: 1px solid color-mix(in srgb, var(--good) 50%, transparent); border-radius: 999px; padding: 3px 10px; align-self: center; }
.mut-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.mut { height: 30px; border-radius: 5px; border: 1.5px solid var(--good); background: color-mix(in srgb, var(--good) 22%, transparent); }
.mut.miss { border: 1.5px dashed var(--bad); background: transparent; }
.mut-legend { display: flex; gap: 14px; font: 11px var(--mono); color: var(--muted); }
@media (max-width: 860px) { .cards3 { grid-template-columns: 1fr; } }

/* proof strip */
.proof { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; background: var(--panel); }
.proof .big { font-size: clamp(22px, 3vw, 30px); font-weight: 600; letter-spacing: -.02em; }
.proof .big b { color: var(--suspect); font-weight: 600; }

/* case study */
.walk { display: grid; gap: 0; border-left: 2px solid var(--line); margin-left: 10px; }
.walk > div { position: relative; padding: 0 0 26px 26px; display: grid; gap: 6px; }
.walk > div::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--suspect); }
.walk h3 { font-size: 16.5px; font-weight: 600; }
.walk p { color: var(--muted); font-size: 14.5px; }
.walk .q { border-left: 2px solid var(--suspect); padding-left: 12px; color: var(--fg); font-style: italic; }
.acc td.num, .acc th.num { text-align: right; font-variant-numeric: tabular-nums; }
.page-head { padding-block: 56px 40px; border-bottom: 1px solid var(--line); }
.page-head .wrap { display: grid; gap: 16px; }
.links-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* GitHub link in the top bar: stays visible on phones, where the text links hide */
nav .gh { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); text-decoration: none; font-size: 14px; margin-left: auto; }
nav .gh:hover { color: var(--fg); }
nav .links + .gh { margin-left: 0; }
nav .wrap > .links { margin-left: auto; }
@media (max-width: 760px) { nav .gh span { display: none; } nav .gh { margin-left: auto; } nav .btn { margin-left: 0; } }
