@font-face { font-family: "Geist"; src: url("/vendor/fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/vendor/fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --bg: #eceeed; --surface: #f8f9f8; --fg: #101312; --muted: #56605c; --rule: #b4bbb7; --accent: #b3122b;
  --term-bg: #101312; --term-fg: #e9eceb; --term-dim: #8a9490;
  --sans: "Geist", "Helvetica Neue", Arial, sans-serif; --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --radius: 2px; --measure: 60ch;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.5 var(--sans); }
a { color: inherit; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px 72px; }
.nav { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: baseline; padding-block: 20px; border-bottom: 1px solid var(--rule); }
.nav .home { margin-right: auto; font-size: 1em; }
.nav .home:hover { text-decoration: none; }
.nav b { font-weight: 600; letter-spacing: 0.01em; }
.nav b::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-left: 7px; }
.nav a { text-decoration: none; font-size: 0.9em; }
.nav a:hover { text-decoration: underline; }

.hero { display: grid; gap: 18px; padding-block: 56px 40px; }
h1 { font: 600 46px/1.04 var(--sans); letter-spacing: -0.035em; margin: 0; max-width: 18ch; text-wrap: balance; }
.lede { font-size: 18px; max-width: var(--measure); margin: 0; }
.not { color: var(--muted); font: 400 0.82em/1.5 var(--mono); margin: 0; }

section { padding-block: 34px; border-top: 1px solid var(--rule); display: grid; gap: 16px; grid-template-columns: 170px minmax(0, 1fr); column-gap: 24px; }
section > h2 { grid-row: 1 / span 6; padding-top: 3px; }
section > :not(h2) { grid-column: 2; }
h2 { font: 600 0.78em/1.2 var(--mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); margin: 0; }
p { margin: 0; max-width: var(--measure); }
.cap { color: var(--muted); font-size: 0.85em; }

/* demo: one instrument panel. Video on top, terminal and result below. */
.demo { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; background: var(--term-bg); }
.stage { grid-column: 1 / -1; position: relative; aspect-ratio: 16 / 9; background: #000; }
.stage video, .stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage canvas { pointer-events: none; }
.bar { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 12px; font: 400 12.5px/1.6 var(--mono); }
.term { background: var(--term-bg); color: var(--term-fg); font: 400 12px/1.6 var(--mono); display: grid; grid-template-rows: auto 1fr; min-width: 0; border-top: 1px solid rgba(255,255,255,0.14); }
.term .bar { border-bottom: 1px solid rgba(255,255,255,0.14); color: var(--term-dim); }
.term button { font: inherit; color: var(--term-bg); background: var(--term-fg); border: 1px solid var(--term-fg); border-radius: var(--radius); padding: 3px 12px; cursor: pointer; }
.term button:disabled { opacity: 0.5; cursor: default; }
.term .modes, .term .acts { display: flex; gap: 6px; }
.term .bar button { white-space: nowrap; }
.term #upload { color: var(--term-fg); background: none; }
.term .modes button { color: var(--term-dim); background: none; border-color: rgba(255,255,255,0.25); padding: 2px 9px; }
.term .modes button[aria-pressed="true"] { color: var(--term-fg); border-color: var(--term-fg); }
.out { margin: 0; padding: 12px; height: 300px; overflow: auto; white-space: pre; font: inherit; }
.out .d { color: var(--term-dim); }
.out .row { display: block; cursor: pointer; }
.out .row:hover { background: rgba(255,255,255,0.07); }
.out .row.on { background: rgba(255,255,255,0.14); }
.view { background: var(--surface); display: grid; grid-template-rows: auto 1fr auto; min-width: 0; border-top: 1px solid var(--rule); }
.view .bar { border-bottom: 1px solid var(--rule); color: var(--muted); }
.plot { display: grid; place-items: center; padding: 10px; }
.plot svg { width: 100%; max-width: 230px; height: auto; display: block; }
.plot .zone { fill: none; stroke: var(--fg); stroke-width: 0.35; }
.plot .plate { fill: none; stroke: var(--rule); stroke-width: 0.35; }
.plot .tick { fill: var(--muted); font: 2.6px var(--mono); }
.plot .ball { fill: var(--surface); stroke: var(--fg); stroke-width: 0.35; cursor: pointer; }
.plot .sd { fill: none; stroke: var(--muted); stroke-width: 0.25; stroke-dasharray: 0.8 0.8; }
.plot .num { font: 500 2.4px var(--mono); fill: var(--fg); pointer-events: none; text-anchor: middle; dominant-baseline: central; }
.plot g.on .ball { fill: var(--accent); stroke: var(--accent); }
.plot g.on .num { fill: #fff; }
.plot g.on .sd { stroke: var(--accent); }
.plot g.off .ball { stroke-dasharray: 0.7 0.7; }
.plot g.off .num { fill: var(--muted); }
.read { border-top: 1px solid var(--rule); padding: 10px 12px; font: 400 12px/1.6 var(--mono); display: flex; flex-wrap: wrap; gap: 2px 16px; min-height: 62px; }
.read b { font-weight: 500; }
.field { grid-column: 1 / -1; background: var(--surface); border-top: 1px solid var(--rule); display: grid; grid-template-rows: auto 1fr; min-width: 0; }
.field .bar { border-bottom: 1px solid var(--rule); color: var(--muted); }
.field .bar button { font: inherit; color: var(--fg); background: none; border: 1px solid var(--rule); border-radius: var(--radius); padding: 2px 9px; cursor: pointer; }
.field .bar button[aria-pressed="true"] { background: var(--fg); color: var(--surface); border-color: var(--fg); }
.field .views { display: flex; gap: 6px; }
#f3d { height: 340px; position: relative; touch-action: none; }
#f3d canvas { display: block; width: 100%; height: 100%; }

table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.tbl { overflow-x: auto; }
th, td { text-align: left; padding: 9px 16px 9px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font: 500 0.75em/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
td:first-child { font-weight: 600; white-space: nowrap; }
td.n { font-family: var(--mono); white-space: nowrap; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 32px; padding: 0; margin: 0; list-style: none; }
.stats li { display: grid; gap: 2px; align-content: start; padding: 14px 0 16px; border-bottom: 1px solid var(--rule); }
.stats b { font: 500 30px/1.1 var(--mono); letter-spacing: -0.02em; }
.stats span { font-weight: 600; }
.stats small { color: var(--muted); font-size: 0.8em; line-height: 1.4; }

/* replay: a play picker, then the clip and the 3D field side by side, one clock */
.plays { display: flex; flex-wrap: wrap; gap: 8px; }
.plays button { font: inherit; text-align: left; background: var(--surface); color: var(--fg); border: 1px solid var(--rule); border-radius: var(--radius); padding: 8px 12px; cursor: pointer; display: grid; gap: 1px; }
.plays button b { font-weight: 600; font-size: 0.9em; }
.plays button span { font: 400 0.78em/1.4 var(--mono); color: var(--muted); }
.plays button[aria-selected="true"] { border-color: var(--fg); box-shadow: inset 0 -2px 0 var(--accent); }
.rp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.rp-video { background: #000; display: grid; align-items: center; }
.rp-video video { width: 100%; display: block; aspect-ratio: 16 / 9; }
.rp-3d { display: grid; grid-template-rows: auto 1fr; border-left: 1px solid var(--rule); min-width: 0; }
.rp-3d .bar { border-bottom: 1px solid var(--rule); color: var(--muted); }
.rp-3d .bar button, .rp-bar button { font: 400 12.5px/1.6 var(--mono); color: var(--fg); background: none; border: 1px solid var(--rule); border-radius: var(--radius); padding: 2px 9px; cursor: pointer; }
.rp-3d .bar button[aria-pressed="true"], .rp-bar button[aria-pressed="true"] { background: var(--fg); color: var(--surface); border-color: var(--fg); }
#r3d { position: relative; min-height: 300px; touch-action: none; }
#r3d canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rp-bar { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--rule); }
.rp-t { margin-left: auto; font: 400 12.5px/1.6 var(--mono); color: var(--muted); }
.rp-read { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 4px 32px; padding: 14px 16px 16px; border-top: 1px solid var(--rule); }
.rp-read h3 { font: 600 0.72em/1.2 var(--mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.rp-read p { margin: 0 0 3px; }
.rp-read b { font: 500 1em var(--mono); }
.rp-read i { font-style: normal; color: var(--muted); font-size: 0.85em; }

.who { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 32px; padding: 0; margin: 0; list-style: none; }
.who b { display: block; }
.who span { color: var(--muted); font-size: 0.93em; }

form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; max-width: 760px; }
label { display: grid; gap: 4px; font: 500 0.75em/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
input { font: 400 16px/1.4 var(--sans); color: var(--fg); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 8px 10px; width: 100%; }
label.wide { grid-column: 1 / -1; }
.go { justify-self: start; font: 600 16px/1 var(--sans); color: var(--bg); background: var(--fg); border: 1px solid var(--fg); border-radius: var(--radius); padding: 10px 16px; cursor: pointer; }
.addr { font-family: var(--mono); user-select: all; }
footer { border-top: 1px solid var(--rule); padding-top: 18px; color: var(--muted); font-size: 0.85em; display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 760px) {
  h1 { font-size: 34px; }
  section { grid-template-columns: 1fr; }
  section > h2 { grid-row: auto; }
  section > :not(h2) { grid-column: 1; }
  .demo { grid-template-columns: 1fr; }
  .out { height: 220px; }
  #f3d { height: 260px; }
  .rp { grid-template-columns: 1fr; }
  .rp-3d { border-left: 0; border-top: 1px solid var(--rule); }
  #r3d { min-height: 280px; }
  .rp-3d .bar > span:first-child { display: none; }
}
