:root {
  --bg: #0b0c0e;
  --panel: #121418;
  --rule: #24272d;
  --text: #e6e6e3;
  --muted: #8d9199;
  --ghost: #8fe3ee;
  --amber: #f2b33d;
  --miss: #ff6b5b;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --w: 1100px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ghost); text-decoration: none; border-bottom: 1px solid rgba(143, 227, 238, .3); }
a:hover { border-bottom-color: var(--ghost); }
img, video { display: block; max-width: 100%; }
code, pre, .mono { font-family: var(--mono); }
code { font-size: .88em; color: #cfd3d8; background: #171a1f; padding: .1em .35em; border-radius: 3px; }
strong { font-weight: 600; }

.wrap { max-width: var(--w); margin: 0 auto; padding: 0 24px; }

header.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11, 12, 14, .88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
header.top .wrap { display: flex; align-items: center; gap: 28px; height: 54px; }
.brand { font-weight: 700; letter-spacing: .06em; color: var(--text); border: 0; }
.brand span { font-weight: 400; color: var(--muted); letter-spacing: 0; margin-left: 10px; font-size: 14px; }
header.top nav { margin-left: auto; display: flex; gap: 22px; font-size: 14px; }
header.top nav a { color: var(--muted); border: 0; }
header.top nav a:hover, header.top nav a[aria-current] { color: var(--text); }

section { padding: 72px 0; border-bottom: 1px solid var(--rule); }
.label {
  font: 12px/1 var(--mono); color: var(--muted); letter-spacing: .08em;
  display: flex; gap: 12px; align-items: center; margin-bottom: 22px;
}
.label b { color: var(--ghost); font-weight: 400; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 16px; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: clamp(32px, 5vw, 54px); max-width: 17ch; }
h2 { font-size: clamp(24px, 3vw, 34px); max-width: 26ch; }
h3 { font-size: 18px; }
p { margin: 0 0 16px; }
.lede { font-size: 19px; color: #c9cbcf; max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.hero { padding: 64px 0 56px; }
.hero .eyebrow { font: 13px/1.4 var(--mono); color: var(--muted); margin-bottom: 20px; }
.actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 28px 0 40px; }
.btn {
  display: inline-block; padding: 10px 18px; border: 1px solid var(--rule); border-radius: 6px;
  color: var(--text); font-size: 15px; background: var(--panel);
}
.btn:hover { border-color: #3a3f47; }
.btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }

figure { margin: 0; }
figure video, figure img { width: 100%; border-radius: 6px; border: 1px solid var(--rule); background: #000; }
figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; max-width: 70ch; }
figcaption .tag { font: 11px/1 var(--mono); border: 1px solid var(--rule); border-radius: 3px; padding: 2px 5px; margin-right: 6px; color: var(--muted); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.split.wide-left { grid-template-columns: 1.25fr 1fr; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 32px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); border: 1px solid var(--rule); border-radius: 6px; margin-top: 36px; }
.stat { padding: 22px 22px 20px; border-right: 1px solid var(--rule); }
.stat:last-child { border-right: 0; }
.stat .n { font: 600 34px/1.1 var(--mono); letter-spacing: -.02em; }
.stat .n.ghost { color: var(--ghost); }
.stat .n.miss { color: var(--miss); }
.stat .n.amber { color: var(--amber); }
.stat .d { font-size: 14px; color: var(--muted); margin-top: 8px; }
.stat .src { font-size: 12px; margin-top: 8px; color: var(--muted); }
.stat .src a { color: var(--muted); border-bottom-color: var(--rule); }

.gap { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; font-family: var(--mono); margin: 8px 0 20px; }
.gap .v { font-size: 48px; font-weight: 600; line-height: 1; }
.gap .k { font-size: 13px; color: var(--muted); display: block; margin-top: 6px; }
.gap .arrow { color: var(--muted); font-size: 28px; }

ol.loop { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
ol.loop li { padding: 22px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
ol.loop .i { font: 12px/1 var(--mono); color: var(--ghost); }
ol.loop h3 { margin: 10px 0 8px; }
ol.loop p { font-size: 15px; color: #c3c6cb; margin: 0; }

.video-slot {
  position: relative; aspect-ratio: 16 / 9; border: 1px dashed #3a3f47; border-radius: 6px;
  display: grid; place-items: center; background: #0f1114 center / cover no-repeat;
  overflow: hidden;
}
.video-slot::before { content: ""; position: absolute; inset: 0; background: rgba(11, 12, 14, .35); }
.video-slot p {
  position: absolute; left: 16px; bottom: 16px; margin: 0; padding: 6px 10px; border-radius: 4px;
  font: 13px/1.4 var(--mono); color: var(--text); background: rgba(11, 12, 14, .8);
}
.video-embed { position: relative; aspect-ratio: 16 / 9; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 6px; }

pre {
  background: var(--panel); border: 1px solid var(--rule); border-radius: 6px;
  padding: 16px 18px; overflow-x: auto; font-size: 14px; line-height: 1.6; margin: 0 0 20px;
}
pre .c { color: var(--muted); }
pre.eq { color: #dfe3e8; font-size: 15px; }

table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 8px 0 20px; }
th, td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font: 12px/1.4 var(--mono); color: var(--muted); font-weight: 400; letter-spacing: .04em; }
td code { white-space: nowrap; }
td.num { font-family: var(--mono); white-space: nowrap; }

.doc { display: grid; grid-template-columns: 220px 1fr; gap: 56px; }
.doc aside { position: sticky; top: 78px; align-self: start; font-size: 14px; padding-top: 72px; }
.doc aside ol { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.doc aside li { counter-increment: s; margin: 0 0 8px; }
.doc aside a { color: var(--muted); border: 0; }
.doc aside a::before { content: counter(s, decimal-leading-zero) "  "; font-family: var(--mono); font-size: 12px; color: #555a62; }
.doc aside a:hover { color: var(--text); }
.doc article { min-width: 0; max-width: 760px; }
.doc article section { padding: 56px 0 40px; }
.doc article section:first-child { padding-top: 72px; }
.doc article ul { padding-left: 20px; margin: 0 0 16px; }
.doc article li { margin-bottom: 6px; }
.where { font: 12px/1.4 var(--mono); color: var(--muted); margin: -6px 0 18px; }

footer { padding: 48px 0 64px; font-size: 14px; color: var(--muted); }
footer .cols { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }
footer p { margin-bottom: 10px; }

@media (max-width: 860px) {
  .split, .split.wide-left, .pair, footer .cols { grid-template-columns: 1fr; }
  ol.loop, .stats { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--rule); }
  .stat:last-child { border-bottom: 0; }
  .doc { grid-template-columns: 1fr; gap: 0; }
  .doc aside { display: none; }
  header.top nav { gap: 14px; font-size: 13px; }
  header.top nav .wide { display: none; }
  .gap .v { font-size: 36px; }
  .brand span { display: none; }
  section { padding: 52px 0; }
}
