/* Hillclimb site. Spacing scale: 8 16 24 32 48 64 96 128. */
:root {
  --bg: #fcfcfa;
  --surface: #ffffff;
  --ink: #111412;
  --ink-2: #474c48;
  --ink-3: #6a706b;
  --line: #e4e5e0;
  --line-2: #d3d5ce;
  --accent: #0b5a38;
  --accent-hover: #084a2e;
  --accent-tint: #edf4ef;
  --accent-line: #c9ddd0;
  --on-accent: #ffffff;
  --code-bg: #111412;
  --code-ink: #e9ece8;
  --code-dim: #8e958f;
  --topo: #0b5a38;
  --topo-op: 0.09;
  --shadow: 0 1px 2px rgba(17, 20, 18, 0.04), 0 12px 32px -8px rgba(17, 20, 18, 0.10), 0 32px 64px -24px rgba(17, 20, 18, 0.14);
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0f1210;
  --surface: #161a17;
  --ink: #edf0ec;
  --ink-2: #b9c0ba;
  --ink-3: #959c96;
  --line: #262b27;
  --line-2: #333a35;
  --accent: #5cc08e;
  --accent-hover: #7ad0a5;
  --accent-tint: #15261c;
  --accent-line: #24442f;
  --on-accent: #08130d;
  --code-bg: #0a0c0b;
  --topo: #5cc08e;
  --topo-op: 0.08;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 24px 56px -16px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
p { margin: 0; }
figure { margin: 0; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 20; background: var(--ink); color: var(--bg); padding: 8px 16px; border-radius: 8px; }
.skip:focus { left: 16px; }

.wrap { width: 100%; max-width: 1168px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 24px; border-radius: 10px; font-weight: 500; font-size: 16px; letter-spacing: -0.005em; transition: background-color .15s, border-color .15s; }
.btn:hover { text-decoration: none; }
.btn-solid { background: var(--accent); color: var(--on-accent); }
.btn-solid:hover { background: var(--accent-hover); }
.btn-line { border: 1px solid var(--line-2); color: var(--ink); background: var(--surface); }
.btn-line:hover { border-color: var(--ink-3); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14.5px; border-radius: 8px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); font-family: var(--serif); font-size: 26px; line-height: 1; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand svg { width: 28px; height: 28px; }
.mk-bg { fill: var(--accent); }
.mk-l { fill: none; stroke: var(--on-accent); stroke-width: 2.4; stroke-linecap: round; }
.mk-2 { opacity: 0.6; }
.nav ul { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.nav nav { margin-left: auto; }
.nav ul a { color: var(--ink-2); font-size: 15px; }
.nav ul a:hover { color: var(--ink); text-decoration: none; }
.theme { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); display: grid; place-items: center; cursor: pointer; }
.theme svg { width: 16px; height: 16px; }
@media (max-width: 760px) { .hide-sm { display: none; } }
@media (max-width: 420px) { .hide-xs { display: none; } }

/* hero */
.hero { position: relative; padding: 128px 0 0; overflow: hidden; }
.topo { position: absolute; inset: 0 0 auto 0; width: 100%; height: 760px; pointer-events: none; }
.topo path { fill: none; stroke: var(--topo); stroke-width: 1; opacity: var(--topo-op); vector-effect: non-scaling-stroke; }
.hero-in { position: relative; text-align: center; }
h1, h2 { font-family: var(--serif); font-weight: 400; color: var(--ink); margin: 0; }
h1 { font-size: clamp(48px, 7.4vw, 88px); line-height: 1.0; letter-spacing: -0.02em; max-width: 12ch; margin: 0 auto; }
.sub { font-size: clamp(18px, 1.9vw, 21px); line-height: 1.5; color: var(--ink-2); max-width: 34ch; margin: 24px auto 0; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 40px; }
.window { position: relative; margin-top: 96px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.window-bar { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-bottom: 1px solid var(--line); background: var(--bg); }
.window-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.window-bar span { margin: 0 auto; transform: translateX(-28px); font-size: 13px; color: var(--ink-3); }
@media (max-width: 640px) {
  .hero { padding-top: 80px; }
  .window { margin-top: 64px; border-radius: 10px; }
  .window-bar { height: 32px; }
  .window-bar span { display: none; }
}

/* rows */
.row { padding-top: 160px; }
@media (max-width: 900px) { .row { padding-top: 120px; } }
h2 { font-size: clamp(38px, 4.6vw, 56px); line-height: 1.04; letter-spacing: -0.015em; }
.copy p, .center-copy p { margin-top: 24px; color: var(--ink-2); font-size: 18px; line-height: 1.6; max-width: 40ch; }
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 64px; align-items: center; }
.split.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
.split.flip .copy { order: 2; }
.split.flip > figure { order: 1; }
@media (max-width: 900px) {
  .split, .split.flip { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .split.flip .copy { order: 0; }
  .split.flip > figure { order: 1; }
}
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 2px rgba(17, 20, 18, 0.03); }

/* chart */
.chart-card { padding: 32px 32px 24px; }
.chart { width: 100%; height: auto; display: block; font-family: var(--sans); font-size: 13px; font-variant-numeric: tabular-nums; }
.chart-sm { display: none; }
@media (max-width: 640px) { .chart-lg { display: none; } .chart-sm { display: block; } .chart-card { padding: 24px 16px 16px; } }
.chart .g { stroke: var(--line); stroke-width: 1; }
.chart .t { fill: var(--ink-3); }
.chart .dev { fill: none; stroke: var(--accent); stroke-width: 2.25; stroke-linejoin: round; }
.chart .held { fill: none; stroke: var(--ink-3); stroke-width: 1.5; stroke-dasharray: 4 4; }
.chart .pa { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.chart .pr { fill: var(--surface); stroke: var(--ink-3); stroke-width: 1.5; }
.chart .pg { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.chart .tg { fill: var(--ink); font-weight: 500; font-size: 12px; }
.chart .ld { fill: var(--accent); font-weight: 600; }
.chart .lh { fill: var(--ink-2); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 16px; font-size: 14px; color: var(--ink-2); }
.legend i { display: inline-block; vertical-align: middle; margin-right: 8px; }
.k-dev { width: 16px; border-top: 2.25px solid var(--accent); }
.k-held { width: 16px; border-top: 1.5px dashed var(--ink-3); }
.k-rej { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--ink-3); }

/* journal */
.journal { padding: 8px 0; font-size: 15px; overflow: hidden; }
.journal-head, .journal li { display: grid; grid-template-columns: 24px minmax(0, 1fr) 48px 152px; gap: 16px; align-items: baseline; padding: 12px 24px; }
.journal-head { font-size: 13px; color: var(--ink-3); border-bottom: 1px solid var(--line); padding-top: 16px; }
.journal-head span:nth-child(3) { text-align: right; }
.journal ol { list-style: none; margin: 0; padding: 0; }
.journal li { border-bottom: 1px solid var(--line); }
.journal li:last-child { border-bottom: 0; }
.jid { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.jh { color: var(--ink); line-height: 1.45; }
.js { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.jo { font-size: 13.5px; color: var(--ink-3); }
.journal li.kept .jo { color: var(--accent); font-weight: 500; }
.journal li.kept .js { color: var(--ink); font-weight: 500; }
.journal li.blocked { background: var(--accent-tint); }
.journal li.blocked .jo { color: var(--ink); font-weight: 600; }
@media (max-width: 640px) {
  .journal-head { display: none; }
  .journal li { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 4px 12px; padding: 14px 16px; }
  .journal .jo { grid-column: 2; grid-row: 2; }
  .journal .js { grid-column: 3; grid-row: 1; }
}

/* gate */
.center-copy { text-align: center; }
.center-copy h2 { max-width: 16ch; margin: 0 auto; }
.center-copy p { margin: 24px auto 0; max-width: 46ch; }
.gate { margin: 64px auto 0; max-width: 960px; padding: 40px; }
.gate-hyp { font-size: 16px; color: var(--ink-2); max-width: 70ch; }
.gate-hyp span { display: block; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.gate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 32px; }
.gate-side { border: 1px solid var(--line); border-radius: 12px; padding: 32px; }
.gate-bad { border-color: var(--ink); border-width: 1.5px; }
.gate-k { font-weight: 600; font-size: 16px; }
.gate-k span { display: block; font-weight: 400; color: var(--ink-3); font-size: 14px; }
.gate-v { font-family: var(--serif); font-size: clamp(44px, 5.4vw, 64px); line-height: 1.1; margin-top: 24px; font-variant-numeric: lining-nums tabular-nums; }
.gate-v .to { color: var(--ink-3); }
.pill { display: inline-block; margin-top: 16px; padding: 4px 12px; border-radius: 999px; font-size: 14px; font-weight: 500; }
.pill-good { background: var(--accent-tint); color: var(--accent); border: 1px solid var(--accent-line); }
.pill-bad { background: var(--ink); color: var(--bg); }
.gate-told { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 16px; }
.gate-told q { color: var(--ink); font-style: italic; font-family: var(--serif); font-size: 20px; quotes: "\201C" "\201D"; }
@media (max-width: 760px) {
  .gate { padding: 24px 16px; }
  .gate-grid { grid-template-columns: 1fr; gap: 16px; }
  .gate-side { padding: 24px; }
}

/* results band */
.band { margin-top: 160px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { padding: 64px 32px; }
.stat:first-child { padding-left: 0; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-v { font-family: var(--serif); font-size: clamp(56px, 7vw, 88px); line-height: 1; letter-spacing: -0.02em; color: var(--ink); }
.stat-c { margin-top: 16px; font-size: 15px; color: var(--ink-3); max-width: 28ch; }
@media (max-width: 860px) {
  .band { margin-top: 120px; }
  .stats { grid-template-columns: 1fr; }
  .stat { padding: 40px 0; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--line); }
}

/* code */
.code-card { background: var(--code-bg); border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.code-card pre { margin: 0; padding: 32px; overflow-x: auto; color: var(--code-ink); font: 400 15px/1.9 var(--mono); }
.code-card .p { color: var(--code-dim); user-select: none; margin-right: 8px; }
@media (max-width: 640px) { .code-card pre { padding: 24px 16px; font-size: 13px; } }

/* footer */
.foot { margin-top: 160px; border-top: 1px solid var(--line); }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 32px; height: auto; padding-top: 32px; padding-bottom: 48px; font-size: 14px; color: var(--ink-3); }
.foot-name { font-family: var(--serif); font-size: 22px; color: var(--ink); margin-right: auto; }
.foot a { color: var(--ink-2); }

/* docs */
.docs { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 64px; padding-top: 64px; }
.docs-side { position: sticky; top: 96px; align-self: start; display: flex; flex-direction: column; gap: 4px; }
.docs-side-h { font-size: 13px; color: var(--ink-3); margin-bottom: 8px; }
.docs-side a { color: var(--ink-2); padding: 6px 12px; border-radius: 8px; font-size: 15px; }
.docs-side a:hover { background: var(--accent-tint); text-decoration: none; }
.docs-side a[aria-current] { background: var(--accent-tint); color: var(--accent); font-weight: 500; }
@media (max-width: 860px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 32px; }
  .docs-side { position: static; flex-direction: row; flex-wrap: wrap; }
  .docs-side-h { width: 100%; margin: 0; }
}
.prose-doc { max-width: 760px; min-width: 0; font-size: 16.5px; }
.prose-doc h1 { font-size: clamp(40px, 5vw, 56px); text-align: left; max-width: none; margin: 0 0 24px; }
.prose-doc h2 { font-size: 34px; margin: 56px 0 16px; }
.prose-doc h3 { font-family: var(--sans); font-size: 18px; font-weight: 600; margin: 32px 0 8px; }
.prose-doc p, .prose-doc ul, .prose-doc ol { margin: 0 0 16px; color: var(--ink-2); }
.prose-doc li { margin-bottom: 6px; }
.prose-doc strong { color: var(--ink); font-weight: 600; }
.prose-doc code { font-family: var(--mono); font-size: 0.86em; background: var(--accent-tint); color: var(--ink); padding: 1px 6px; border-radius: 6px; }
.prose-doc pre { background: var(--code-bg); color: var(--code-ink); border-radius: 12px; padding: 16px 24px; overflow-x: auto; font: 13.5px/1.65 var(--mono); margin: 0 0 24px; }
.prose-doc pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.prose-doc table { display: block; overflow-x: auto; border-collapse: collapse; width: 100%; margin: 0 0 24px; font-size: 15px; }
.prose-doc th, .prose-doc td { border-bottom: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.prose-doc th { color: var(--ink-3); font-weight: 500; font-size: 14px; }
.prose-doc blockquote { margin: 0 0 16px; padding: 4px 16px; border-left: 2px solid var(--accent); }
