@font-face { font-family: "IBM Plex Sans"; src: url(/fonts/ibm-plex-sans-var.woff2) format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(/fonts/ibm-plex-mono-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(/fonts/ibm-plex-mono-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #f4f4f0; --surface: #fcfcfb; --surface-2: #eeede8; --ink: #0b0b0b; --ink-2: #52514e; --muted: #7d7b75;
  --grid: #e3e2db; --axis: #c3c2b7; --border: rgba(11, 11, 11, .09); --border-strong: rgba(11, 11, 11, .2);
  --s-openai: #2a78d6; --s-anthropic: #e0612c; --s-google: #1a9f70; --s-other: #6c6a63;
  --net-rgb: 11, 11, 11; --tip-bg: rgba(252, 252, 251, .97); --live: #1a9f70; --stale: #c98a12;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0e0e0d; --surface: #171716; --surface-2: #222220; --ink: #f4f4f1; --ink-2: #c3c2b7; --muted: #8d8b84;
    --grid: #2a2a28; --axis: #3d3d3a; --border: rgba(255, 255, 255, .09); --border-strong: rgba(255, 255, 255, .22);
    --s-openai: #4a92ea; --s-anthropic: #e36d3a; --s-google: #22b27f; --s-other: #a8a69e;
    --net-rgb: 255, 255, 255; --tip-bg: rgba(23, 23, 22, .97); --live: #22b27f; --stale: #e0a531;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 var(--font); }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
h1, h2, p { margin: 0; }
.wrap { max-width: 1360px; margin: 0 auto; padding: 0 16px 28px; }
.eyebrow { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }

/* header */
.top { display: flex; align-items: center; gap: 6px 18px; flex-wrap: wrap; padding: 18px 0 14px; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 600; font-size: 19px; letter-spacing: -.01em; }
.mark { width: 24px; height: 24px; fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.mark .net { stroke-width: 1.6; }
.mark circle { fill: var(--ink); stroke: none; }
.tag { color: var(--ink-2); font-size: 14px; }
.live { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); font-family: var(--mono); }
.live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.live.ok .dot { background: var(--live); box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 22%, transparent); }
.live.stale .dot { background: var(--stale); }

/* stage */
.stage { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; align-items: start; }
.viz { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; min-width: 0; }
.viz canvas { display: block; width: 100%; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.viz canvas.drag { cursor: grabbing; }
.bar { position: absolute; inset: 10px 10px auto 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; justify-content: space-between; z-index: 2; pointer-events: none; }
.bar > * { pointer-events: auto; }
.bar-r { display: flex; gap: 8px; align-items: center; }
.bar-l { display: grid; gap: 8px; justify-items: start; }
.key { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink-2); padding-left: 6px; }
.key span { display: inline-flex; align-items: center; gap: 6px; }
.key .k-better { color: var(--muted); }
.key svg { width: 14px; height: 14px; display: block; }
.k-ring { fill: var(--surface); stroke: var(--ink); stroke-width: 1.8; }
.k-dot { fill: var(--muted); }
.k-net { fill: rgba(var(--net-rgb), .1); stroke: rgba(var(--net-rgb), .45); stroke-width: 1; stroke-linejoin: round; }
.k-step { fill: none; stroke: var(--ink); stroke-width: 1.6; }
.info { position: absolute; right: 10px; z-index: 4; width: min(380px, calc(100% - 20px)); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; padding: 11px 13px; box-shadow: 0 8px 24px rgba(0, 0, 0, .14); font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }
.info ul { margin: 0; padding-left: 16px; display: grid; gap: 6px; }
.info b { color: var(--ink); font-weight: 500; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 999px; padding: 2px; background: var(--surface); }
.seg button { border: 0; background: transparent; color: var(--ink-2); font-size: 12.5px; line-height: 1; padding: 7px 11px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.icon { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); cursor: pointer; color: var(--ink-2); }
.icon:hover { color: var(--ink); }
.icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.axes { display: flex; gap: 6px; flex-basis: 100%; font-size: 12px; color: var(--muted); align-items: center; }
.axes label { display: inline-flex; gap: 5px; align-items: center; }
.axes select { font: inherit; font-size: 12px; color: var(--ink); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 999px; padding: 4px 8px; }
.hint { position: absolute; left: 12px; bottom: 10px; font-size: 12px; color: var(--muted); pointer-events: none; transition: opacity .6s; }
.hint.gone { opacity: 0; }
.state { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-2); font-size: 14px; pointer-events: none; }
.credit { position: absolute; right: 12px; bottom: 9px; display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--ink-2); text-decoration: none; background: color-mix(in srgb, var(--surface) 86%, transparent); padding: 3px 6px; border-radius: 6px; }
.credit:hover span { text-decoration: underline; }
.credit img { height: 10px; width: auto; display: block; }
.logo-dark { display: none !important; }
@media (prefers-color-scheme: dark) { .logo-light { display: none !important; } .logo-dark { display: block !important; } }
.tip { position: absolute; pointer-events: none; background: var(--tip-bg); border: 1px solid var(--border-strong); border-radius: 8px; padding: 7px 9px; font-size: 12px; line-height: 1.4; max-width: 250px; box-shadow: 0 6px 18px rgba(0, 0, 0, .12); z-index: 3; }
.tip b { font-weight: 500; }
.tip .m { font-family: var(--mono); color: var(--ink-2); font-size: 11.5px; }

/* rail */
.rail { display: grid; gap: 14px; min-width: 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.card h2 { font-size: 13px; font-weight: 600; }
.d-name { font-size: 18px; font-weight: 600; margin-top: 4px; line-height: 1.25; }
.d-sub { color: var(--ink-2); font-size: 13px; margin-top: 3px; display: flex; align-items: center; gap: 6px; }
.figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--border); }
.figs div { min-width: 0; }
.figs dt { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.25; }
.figs dd { margin: 0; font-family: var(--mono); font-size: 19px; font-weight: 500; letter-spacing: -.02em; white-space: nowrap; line-height: 1.1; order: -1; }
.figs div { display: flex; flex-direction: column; }
.pill { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border-strong); }
.pill.front { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.beats { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; }
.row { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 7px; align-items: center; width: 100%; padding: 5px 6px; border-radius: 7px; cursor: pointer; font-size: 13px; }
.row:hover { background: var(--surface-2); }
.row:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.row.sel { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--ink); }
.row .nm { display: flex; gap: 4px; min-width: 0; }
.row .fam { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.row .eff { flex: none; white-space: nowrap; color: var(--ink-2); }
.row .v { font-family: var(--mono); font-size: 11.5px; letter-spacing: -.02em; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.row .v b { color: var(--ink); font-weight: 500; }
.row svg { display: block; }
.flist { max-height: 470px; overflow: auto; margin: 0 -6px; }
.fhead { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 7px; padding: 0 6px 4px; font-size: 10.5px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.fhead span:last-child { font-family: var(--mono); letter-spacing: 0; text-transform: none; }
.more { all: unset; box-sizing: border-box; display: block; width: 100%; padding: 8px 6px 2px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; text-align: left; }
.more:hover { color: var(--ink); text-decoration: underline; }
.more:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; border-radius: 6px; }

/* labs */
.labs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 12px 0 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); font-size: 12.5px; line-height: 1; padding: 6px 10px 6px 8px; border-radius: 999px; cursor: pointer; }
.chip[aria-pressed="false"] { opacity: .42; text-decoration: line-through; }
.chip .n { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.labs .all { background: none; border: 0; color: var(--ink-2); font-size: 12px; text-decoration: underline; cursor: pointer; padding: 4px; }

/* footer */
.foot { margin-top: 18px; display: grid; gap: 6px; color: var(--muted); font-size: 12.5px; max-width: 120ch; }
.foot a { color: var(--ink-2); }

@media (max-width: 960px) {
  .stage { grid-template-columns: 1fr; }
  .flist { max-height: none; }
}
@media (max-width: 600px) {
  .top { padding-top: 14px; }
  .tag { order: 3; flex-basis: 100%; font-size: 13px; }
  .bar { position: static; padding: 8px 8px 0; gap: 6px; }
  .bar-l { gap: 6px; }
  .key { font-size: 11px; gap: 2px 12px; }
  .seg button { padding: 6px 9px; font-size: 12px; }
  .hint { position: static; padding: 4px 12px 0; }
  .hint.gone { display: none; }
  .credit { right: 8px; bottom: 7px; }
  .figs dd { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
