@font-face { font-family: "Plex Sans"; src: url(/ui/fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url(/ui/fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url(/ui/fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url(/ui/fonts/ibm-plex-sans-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
:root {
  --paper: #f5f1e8;
  --card: #fbf9f4;
  --face: #fffdf8;
  --felt: #efe9dc;
  --ink: #1d1b17;
  --muted: #6b655a;
  --faint: #a39b8b;
  --line: #e2dacb;
  --peel: #d9531e;
  --peel-soft: #f6dccd;
  --leaf: #4f6b3a;
  --leaf-soft: #dfe6d3;
  --rust: #9b2c2c;
  --rust-soft: #f3d6d3;
  --c0: #2f5d7c;
  --c1: #b5651d;
  --c2: #6a4c93;
  --on-accent: #fffdf8;
  --shadow-1: 0 1px 1px rgba(40, 30, 15, .05), 0 2px 5px rgba(40, 30, 15, .06);
  --shadow-2: 0 2px 3px rgba(40, 30, 15, .06), 0 12px 24px rgba(40, 30, 15, .12);
  --shadow-3: 0 4px 8px rgba(40, 30, 15, .08), 0 22px 44px rgba(40, 30, 15, .18);
  --backdrop: rgba(29, 27, 23, .35);
  --sans: "Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: var(--sans);
  --mono: var(--sans);
  --code: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, Menlo, monospace; /* only for raw logs and stripped payloads */
  --av-ink: #1d1b17; --av-face: #fffdf8; --av-glass: color-mix(in srgb, var(--c0) 18%, var(--av-face)); /* agent portraits */
  color-scheme: light;
}
/* dark: warm charcoal, not inverted. The table is the darkest surface and the cards sit on it like paper under a lamp. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #161412; --card: #1e1b18; --face: #262220; --felt: #121110; --ink: #efe8db; --muted: #a89f90; --faint: #6f675b;
    --line: #322d27; --peel: #e7743f; --peel-soft: #3b2519; --leaf: #93ad78; --leaf-soft: #243020; --rust: #e06b62; --rust-soft: #3d1f1d;
    --c0: #74a9cc; --c1: #dd9a55; --c2: #ad92d6; --on-accent: #161412;
    --shadow-1: 0 1px 1px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .3);
    --shadow-2: 0 2px 4px rgba(0, 0, 0, .4), 0 12px 26px rgba(0, 0, 0, .45);
    --shadow-3: 0 4px 12px rgba(0, 0, 0, .45), 0 24px 48px rgba(0, 0, 0, .55);
    --backdrop: rgba(0, 0, 0, .55); color-scheme: dark;
  --av-face: #f3ecdf; --av-base: #d8ccb8; --av-mix: 34%; /* portraits sit like light stickers on the dark table */
  }
}
:root[data-theme="dark"] {
  --paper: #161412; --card: #1e1b18; --face: #262220; --felt: #121110; --ink: #efe8db; --muted: #a89f90; --faint: #6f675b;
  --line: #322d27; --peel: #e7743f; --peel-soft: #3b2519; --leaf: #93ad78; --leaf-soft: #243020; --rust: #e06b62; --rust-soft: #3d1f1d;
  --c0: #74a9cc; --c1: #dd9a55; --c2: #ad92d6; --on-accent: #161412;
  --shadow-1: 0 1px 1px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .3);
  --shadow-2: 0 2px 4px rgba(0, 0, 0, .4), 0 12px 26px rgba(0, 0, 0, .45);
  --shadow-3: 0 4px 12px rgba(0, 0, 0, .45), 0 24px 48px rgba(0, 0, 0, .55);
  --backdrop: rgba(0, 0, 0, .55); color-scheme: dark;
  --av-face: #f3ecdf; --av-base: #d8ccb8; --av-mix: 34%; /* portraits sit like light stickers on the dark table */
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--paper); transition: background-color .25s; color: var(--ink); font: 15px/1.5 var(--sans); font-variant-numeric: tabular-nums; }
button, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0; letter-spacing: -0.01em; }

.top { display: flex; align-items: center; gap: 24px; padding: 14px 32px; border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand .word { font-family: var(--serif); font-size: 26px; font-weight: 700; letter-spacing: -0.03em; }
.run-pick { display: flex; align-items: center; gap: 12px; }
select { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px; max-width: 280px; }
.chip { white-space: nowrap; font-size: 12px; padding: 3px 9px; border-radius: 99px; background: var(--line); color: var(--muted); font-weight: 600; }
.chip.done { background: var(--leaf-soft); color: var(--leaf); }
.chip.running { background: var(--peel-soft); color: var(--peel); }
.chip.halted, .chip.budget_stop, .chip.failed, .chip.interrupted { background: var(--rust-soft); color: var(--rust); }
.meter { margin-left: auto; min-width: 220px; }
.meter-label { display: flex; gap: 6px; align-items: baseline; font-size: 12px; color: var(--muted); }
.meter-label b { font: 600 18px var(--mono); color: var(--ink); }
.meter-bar { height: 6px; background: var(--line); border-radius: 3px; margin: 4px 0 2px; overflow: hidden; }
.meter-bar i { display: block; height: 100%; width: 0; background: var(--leaf); border-radius: 3px; transition: width .4s; }
.meter-bar i.warn { background: var(--peel); }
.meter-sub { font-size: 12px; color: var(--faint); font-family: var(--mono); }
.lease { font-size: 12px; color: var(--muted); text-align: right; line-height: 1.3; }
.lease b { display: block; font: 600 13px var(--mono); color: var(--ink); }
.lease.bad b { color: var(--rust); }
.theme { background: none; border: 1px solid var(--line); border-radius: 8px; width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.theme:hover { color: var(--ink); border-color: var(--muted); }
.theme svg { width: 18px; height: 18px; }
.kill { background: transparent; color: var(--rust); border: 2px solid var(--rust); border-radius: 8px; padding: 8px 18px; font-weight: 700; cursor: pointer; }
.kill:hover { background: var(--rust); color: var(--on-accent); }
.kill:disabled { opacity: .4; cursor: default; background: transparent; color: var(--rust); }

.goal { padding: 28px 32px 8px; max-width: 1100px; }
.eyebrow { font-size: 12px; color: var(--peel); font-weight: 700; margin: 0 0 6px; }
.goal h1 { font-size: 30px; line-height: 1.2; }
.summary { color: var(--muted); margin: 8px 0 0; }

.tabs { display: flex; gap: 4px; padding: 16px 32px 0; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; padding: 12px 14px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--peel); }
main { padding: 24px 32px 64px; }
.tab { display: none; }
.tab.on { display: block; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; margin-bottom: 20px; }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-h h2 { font-size: 19px; }
.hint { font-size: 12px; color: var(--faint); }
.board-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.safety-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

table.lb { width: 100%; border-collapse: collapse; }
.lb th { font-size: 12px; color: var(--faint); text-align: left; font-weight: 600; padding: 0 8px 8px; border-bottom: 1px solid var(--line); }
.lb td { padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.lb tr { cursor: pointer; }
.lb tbody tr:hover td { background: var(--paper); }
.lb tr.sel td { background: var(--peel-soft); }
.lb .rank { font: 600 13px var(--mono); color: var(--faint); width: 24px; }
.lb .hid { font: 12px var(--mono); color: var(--muted); }
.lb .t { font-family: var(--serif); font-size: 15.5px; line-height: 1.3; }
.lb .num { text-align: right; font-family: var(--mono); white-space: nowrap; }
.lb .elo { font-weight: 700; font-size: 15px; }
.lb tr.top3 .rank { color: var(--peel); }
.lb tr.dead td { color: var(--faint); }
.lb tr.dead .t { text-decoration: line-through; text-decoration-color: var(--faint); }
.why { display: block; font-family: var(--sans); font-size: 12px; color: var(--muted); text-decoration: none; margin-top: 2px; }
.lb tr.dead .why { color: var(--rust); }
.tag { display: inline-block; font-size: 12px; padding: 1px 6px; border-radius: 4px; background: var(--line); color: var(--muted); margin-left: 6px; vertical-align: 2px; font-family: var(--sans); font-weight: 600; }
.tag.evo { background: var(--leaf-soft); color: var(--leaf); }
svg.spark { display: block; }

.detail h3 { font-size: 21px; line-height: 1.25; margin-bottom: 6px; }
.detail .empty { color: var(--faint); }
.detail .stmt { font-family: var(--serif); font-size: 16px; margin: 8px 0 14px; }
.detail h4 { font-size: 12px; color: var(--faint); margin: 18px 0 8px; }
.prem { margin: 0 0 8px; padding: 9px 12px; background: var(--paper); border-radius: 8px; font-size: 14px; }
.prem q { display: block; color: var(--muted); font-style: italic; margin-top: 2px; quotes: "\201C" "\201D"; }
.prem a { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.prem.struck { color: var(--faint); background: none; box-shadow: inset 0 0 0 1px var(--line); }
.prem.struck span { text-decoration: line-through; }
.prem.struck em { display: block; color: var(--rust); font-style: normal; font-size: 12px; }
.rev { display: grid; grid-template-columns: 110px 1fr; gap: 4px 12px; font-size: 13.5px; margin-bottom: 8px; }
.rev b { font-weight: 600; }
.verdict { font-size: 12px; font-weight: 700; }
.verdict.accept { color: var(--leaf); } .verdict.reject { color: var(--rust); } .verdict.revise { color: var(--c1); }
.kt { background: var(--paper); border-radius: 8px; padding: 12px 12px; font-size: 14px; }
.kt .cost { font: 600 13px var(--mono); color: var(--peel); }
.veto-btn { margin-top: 18px; background: none; border: 1px solid var(--rust); color: var(--rust); border-radius: 6px; padding: 6px 12px; cursor: pointer; font-weight: 600; }
.veto-btn:hover { background: var(--rust); color: var(--paper); }

ol.matches { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 28px; }
.matches li { break-inside: avoid; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; display: grid; grid-template-columns: 34px 1fr; gap: 8px; }
.matches .m { font: 12px var(--mono); color: var(--faint); }
.matches .w { font-weight: 700; }
.matches .l { color: var(--faint); }
.matches .mode { font-size: 12px; color: var(--peel); font-weight: 700; margin-left: 6px; }
.matches .dec { display: block; color: var(--muted); }

.split-grid { display: grid; grid-template-columns: minmax(220px, 1.6fr) repeat(4, minmax(110px, 1fr)) 120px; border-top: 1px solid var(--line); }
.split-grid > div { padding: 12px 12px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.split-grid .hd { font-size: 12px; color: var(--faint); font-weight: 600; }
.split-grid .ttl { font-family: var(--serif); font-size: 14.5px; line-height: 1.25; }
.split-grid .ttl small { font: 12px var(--mono); color: var(--faint); margin-right: 6px; }
.scale { position: relative; height: 30px; width: 100%; border-radius: 6px; background: var(--paper); }
.scale.split { box-shadow: inset 0 0 0 2px var(--peel); }
.scale::before { content: ""; position: absolute; left: 8px; right: 8px; top: 50%; height: 1px; background: var(--line); }
.scale i { position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%; transform: translate(-50%, -50%); border: 1.5px solid var(--card); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin: 0 4px 0 12px; vertical-align: 0; }
.c0 { background: var(--c0); } .c1 { background: var(--c1); } .c2 { background: var(--c2); }
.ring { display: inline-block; width: 16px; height: 12px; border-radius: 3px; box-shadow: inset 0 0 0 2px var(--peel); margin: 0 4px 0 12px; vertical-align: -1px; }
.legend { font-size: 12px; color: var(--muted); }
.vs { font-size: 12px; display: flex; gap: 4px; flex-wrap: wrap; }

.brief { max-width: 820px; font-size: 15.5px; }
.brief h1 { font-size: 30px; margin-bottom: 12px; }
.brief h2 { font-size: 21px; margin: 30px 0 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.brief h3 { font-size: 18px; margin: 22px 0 6px; color: var(--peel); }
.brief p { margin: 8px 0; }
.brief ul { padding-left: 20px; margin: 6px 0; }
.brief li { margin: 4px 0; }
.brief del { color: var(--faint); }
.brief code { font-family: var(--code); font-size: 13px; }

.strip { background: var(--paper); border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; font-size: 13.5px; }
.strip .r { font: 600 12px var(--mono); color: var(--peel); }
.strip .o { font: 12px var(--mono); color: var(--faint); margin-left: 8px; }
.strip pre { white-space: pre-wrap; margin: 4px 0 0; font: 12.5px/1.45 var(--code); color: var(--muted); }
.okline { color: var(--leaf); font-size: 14px; }
.bigms { font: 700 34px var(--mono); color: var(--ink); }

ol.trace { list-style: none; padding: 0; margin: 0; font: 12.5px/1.5 var(--code); max-height: 70vh; overflow: auto; }
.trace li { display: grid; grid-template-columns: 52px 150px 1fr; gap: 12px; padding: 3px 0; border-bottom: 1px dotted var(--line); }
.trace .k { color: var(--peel); }
.trace .k.safety { color: var(--rust); font-weight: 700; }
.trace .s { color: var(--faint); }
.trace .d { color: var(--muted); overflow-wrap: anywhere; }

dialog { border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); padding: 22px; max-width: 460px; width: 92vw; }
dialog::backdrop { background: var(--backdrop); }
dialog p { color: var(--muted); font-size: 14px; }
dialog textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: var(--paper); }
dialog .row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.ghost { background: none; border: 1px solid var(--line); border-radius: 6px; padding: 6px 14px; cursor: pointer; }
.primary { background: var(--rust); border: 0; color: var(--on-accent); border-radius: 6px; padding: 6px 14px; cursor: pointer; font-weight: 600; }

@media (max-width: 900px) {
  .top { flex-wrap: wrap; padding: 12px 16px; gap: 12px; }
  .meter { margin-left: 0; flex: 1; min-width: 160px; }
  .goal, .tabs, main { padding-left: 16px; padding-right: 16px; }
  .board-grid, .safety-grid { grid-template-columns: 1fr; }
  ol.matches { columns: 1; }
  .tabs { overflow-x: auto; }
  .split-grid { grid-template-columns: minmax(160px, 1.4fr) repeat(4, minmax(70px, 1fr)); overflow-x: auto; }
  .split-grid .vcol { display: none; }
  .lb .spk { display: none; }
}

/* ---------------------------------------------------------------- live floor */
.mono { font-family: var(--mono); }
:root { --lv-spd: 1; }
.lv-transport { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 12px 16px; position: sticky; top: 70px; z-index: 4; }
.lv-btns { display: flex; gap: 6px; }
#lv-sound { min-width: 96px; padding: 6px 12px; }
#lv-sound[aria-pressed="false"] { color: var(--faint); }
.lv-btns .ghost { min-width: 38px; padding: 6px 12px; }
#lv-play { background: var(--peel); min-width: 84px; }
#lv-play[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.lv-speed { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.lv-speed button { background: none; border: 0; border-left: 1px solid var(--line); padding: 6px 12px; cursor: pointer; font: 600 12.5px var(--mono); color: var(--muted); }
.lv-speed button:first-child { border-left: 0; }
.lv-speed button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
#lv-scrub { flex: 1; min-width: 160px; accent-color: var(--peel); }
.lv-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.lv-meta .mono { font-size: 12px; color: var(--faint); }
.chip.playing { background: var(--ink); color: var(--paper); }
.chip.running::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--peel); margin-right: 6px; vertical-align: 1px; animation: lv-blink 1.2s infinite; }

.lv-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.lv-side { position: sticky; top: 140px; }
.lv-side .card { padding: 16px 16px; }
.lv-bench { list-style: none; margin: 0; padding: 0; }
.lv-bench li { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center; padding: 6px 6px; border-radius: 8px; transition: background .3s, transform .3s; }
.lv-bench li small { display: block; font-size: 12px; color: var(--faint); line-height: 1.2; }
.lv-bench li b { font-weight: 600; font-size: 13.5px; }
.lv-bench li em { font: 12px var(--mono); color: var(--faint); font-style: normal; }
.lv-bench li.working small { color: var(--peel); }
.lv-bench li.working .av { animation: lv-bob calc(.9s * var(--lv-spd)) ease-in-out infinite; }
.lv-bench li.speaking { background: var(--peel-soft); transform: translateX(4px); }
.av { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font: 700 13px var(--serif); color: var(--paper); flex: none; }
.t-peel { background: var(--peel); } .t-c0 { background: var(--c0); } .t-c1 { background: var(--c1); } .t-c2 { background: var(--c2); }
.av.pic { background: none; }
.av.pic svg { display: block; overflow: visible; }
.t-ink { background: var(--ink); } .t-leaf { background: var(--leaf); } .t-muted { background: var(--muted); } .t-rust { background: var(--rust); }

.lv-desk { display: flex; flex-direction: column; gap: 8px; }
.dk { position: relative; border-radius: 8px; transition: box-shadow .4s; }
.dk.hot .pcard { border-color: var(--peel); box-shadow: 0 0 0 1px var(--peel); }
.dk .cites { position: absolute; right: 8px; top: 6px; font: 12px var(--mono); color: var(--faint); }
.dk.hot .cites { color: var(--peel); font-weight: 700; }
.dk .pcard { padding-right: 70px; }

.pcard { display: block; text-decoration: none; color: inherit; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 12.5px; line-height: 1.35; transition: border-color .3s, box-shadow .3s; }
.pcard:hover { border-color: var(--muted); }
.pcard .src { display: block; font: 12px var(--mono); color: var(--faint); text-transform: none; }
.pcard b { display: block; font-family: var(--serif); font-weight: 600; font-size: 13.5px; color: var(--ink); }
.pcard .au { display: block; color: var(--muted); font-size: 12px; }
.pcard q { display: block; margin-top: 5px; font-family: var(--serif); font-style: italic; font-size: 13px; color: var(--ink); quotes: "\201C" "\201D"; }

.lv-feedwrap { padding: 0; overflow: hidden; }
.lv-feed { position: relative; height: calc(100vh - 230px); min-height: 420px; overflow-y: auto; padding: 18px 22px 28px; scroll-behavior: smooth; }
.lv-item { margin-bottom: 14px; }
.lv-item.enter { animation: lv-in calc(.55s * var(--lv-spd)) cubic-bezier(.2, .7, .2, 1) both; }
.lv-item.enter .turn, .lv-item.enter .ruling { animation: lv-in calc(.45s * var(--lv-spd)) cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i) * .45s * var(--lv-spd) + .3s * var(--lv-spd)); }
.lv-item.enter .lv-prem { animation: lv-in calc(.4s * var(--lv-spd)) both; animation-delay: calc(.35s * var(--lv-spd)); }
.lv-round { display: flex; align-items: center; gap: 12px; margin: 22px 0 12px; font: 600 12px var(--sans); color: var(--peel); }
.lv-round::before, .lv-round::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.lv-round.end { color: var(--leaf); }
.lv-phase { font-family: var(--serif); font-size: 17px; font-weight: 600; margin: 16px 0 8px; }
.lv-phase small { font: 12px var(--sans); color: var(--faint); margin-left: 6px; }
.lv-sys { font-size: 13px; color: var(--muted); padding: 6px 12px; background: var(--paper); border-radius: 8px; }
.lv-sys.bad { color: var(--rust); background: var(--rust-soft); font-weight: 600; }

.lv-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.who { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.who b { font-weight: 600; font-size: 13.5px; }
.who small { display: block; font-size: 12px; color: var(--faint); line-height: 1.2; }
.lv-hid { font: 12px var(--mono); color: var(--faint); margin: 0 6px 0 0; }
p.lv-hid { margin: 0 0 2px; }
.lv-card h3 { font-size: 18px; line-height: 1.25; }
.lv-stmt { font-family: var(--serif); font-size: 15.5px; margin: 6px 0 8px; }
.lv-pred { font-size: 13.5px; color: var(--muted); margin: 0 0 12px; }
.lv-pred b { color: var(--ink); font-weight: 600; margin-right: 4px; }
.lv-prems { display: grid; gap: 8px; }
.lv-prem { font-size: 13.5px; display: grid; gap: 5px; }
.lv-prem.struck span { text-decoration: line-through; color: var(--faint); }
.lv-prem.struck em { color: var(--rust); font-style: normal; font-size: 12px; }
.reading .shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.lv-item.enter .shelf .pcard { animation: lv-in calc(.35s * var(--lv-spd)) both; }

.lv-revs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.lv-rev { background: var(--paper); border-radius: 8px; padding: 9px 12px; font-size: 13px; }
.lv-rev p { margin: 3px 0; }
.lv-rev .lv-t { font-family: var(--serif); font-size: 14px; line-height: 1.25; }
.lv-rev .dim, .lv-card .dim { color: var(--muted); }
.lv-rh { display: flex; align-items: center; gap: 6px; }
.bars { display: inline-flex; gap: 3px; margin-left: auto; }
.bars i { width: 16px; height: 5px; background: var(--line); border-radius: 3px; overflow: hidden; }
.bars s { display: block; height: 100%; background: var(--ink); opacity: .55; }

.judge .lv-vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: stretch; margin-bottom: 12px; }
.judge .lv-vs > div { background: var(--paper); border-radius: 8px; padding: 8px 12px; font-family: var(--serif); font-size: 14px; line-height: 1.25; border: 1px solid transparent; transition: border-color .4s, background .4s; }
.judge .lv-vs > div .lv-hid { display: block; }
.judge .lv-vs > div.won { border-color: var(--peel); background: var(--peel-soft); }
.vsx { align-self: center; font: 600 12px var(--mono); color: var(--faint); }
.conv { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 12px; }
.turn { max-width: 82%; padding: 8px 12px; border-radius: 12px; font-size: 13.5px; background: var(--paper); }
.turn .tl { display: block; font: 600 12px var(--mono); color: var(--faint); margin-bottom: 2px; }
.turn.s1 { align-self: flex-start; border-top-left-radius: 2px; }
.turn.s2 { align-self: flex-end; border-top-right-radius: 2px; background: var(--line); }
.ruling { border-top: 1px solid var(--line); padding-top: 9px; font-size: 13.5px; }
.ruling b { color: var(--peel); }
.ruling .delta { float: right; font: 12px var(--mono); color: var(--muted); }
.ruling p { margin: 4px 0 0; color: var(--muted); }
.meta .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; font-size: 13.5px; }
.meta h4 { font-size: 12px; color: var(--faint); margin: 0 0 4px; }
.meta ul { margin: 0; padding-left: 18px; }
.prior .pv { font-size: 12px; }
.pv.novel { color: var(--leaf); } .pv.partially { color: var(--c1); } .pv.already_published { color: var(--rust); }
.lv-card.ktest .cost { font: 600 13px var(--mono); color: var(--peel); margin: 2px 0; }
.lv-card p { margin: 4px 0; }

.lv-typing { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13.5px; padding: 6px 2px; animation: lv-in calc(.3s * var(--lv-spd)) both; }
.lv-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); animation: lv-dot 1.1s infinite ease-in-out; }
.lv-typing i:nth-of-type(2) { animation-delay: .15s; } .lv-typing i:nth-of-type(3) { animation-delay: .3s; }
.lv-typing .av { animation: lv-bob .9s ease-in-out infinite; }

@keyframes lv-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes lv-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes lv-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@keyframes lv-blink { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .lv-item.enter, .lv-item.enter *, .lv-typing, .lv-typing *, .lv-bench .av { animation: none !important; } .lv-feed { scroll-behavior: auto; } }
@media (max-width: 900px) {
  .lv-grid { grid-template-columns: 1fr; }
  .lv-side { position: static; }
  .lv-transport { top: 0; position: static; gap: 12px; }
  .lv-feed { height: auto; max-height: 75vh; padding: 14px; }
  .turn { max-width: 92%; }
  .meta .cols, .judge .lv-vs { grid-template-columns: 1fr; }
  .vsx { justify-self: center; }
}

/* ---------------------------------------------------------------- card table */
.lv-views { display: inline-flex; gap: 4px; margin: 0 0 14px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 3px; }
.lv-views button { background: none; border: 0; border-radius: 6px; padding: 5px 14px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 13.5px; }
.lv-views button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
[hidden] { display: none !important; }
.lv-table { position: relative; width: 100%; overflow: hidden; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.tb-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.tb-seats { position: absolute; left: 0; top: 10px; height: 64px; width: 100%; }
.tb-seat { position: absolute; width: 80px; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); transition: transform .3s; }
.tb-seat b { font-weight: 600; white-space: nowrap; }
.tb-seat i { position: absolute; right: 12px; top: -2px; font: 10px var(--mono); color: var(--faint); font-style: normal; }
.tb-seat .av { width: 34px; height: 34px; font-size: 14px; box-shadow: 0 0 0 3px var(--card); transition: box-shadow .3s; }
.tb-seat .av.pic { width: 38px; height: 38px; border-radius: 50%; }
.tb-seat.working .av { animation: lv-bob calc(.9s * var(--lv-spd)) ease-in-out infinite; box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--line); }
.tb-seat.working b { color: var(--peel); }
.tb-seat.speaking { transform: translateY(4px); }
.tb-seat.speaking .av { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--peel); }
.tb-seat.speaking b { color: var(--ink); }
.tb-zone { position: absolute; border-radius: 14px; background: var(--felt); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .06); }
.tb-zone span { position: absolute; left: 12px; bottom: 8px; font-size: 10px; color: var(--faint); font-weight: 600; }
.tb-zone.felt { background: var(--felt); }
.tb-zone.felt span { top: 10px; bottom: auto; }
.tb-vs { position: absolute; left: 615px; top: 205px; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--paper); font: 700 15px var(--serif); font-style: italic; box-shadow: var(--shadow-2); opacity: 0; transform: scale(.4); transition: opacity .3s, transform .4s cubic-bezier(.3, 1.6, .5, 1); z-index: 450; }
.tb-vs.on { opacity: 1; transform: none; }
.tb-caption { position: absolute; left: 214px; top: 328px; width: 876px; text-align: center; font-family: var(--serif); font-size: 17px; line-height: 1.3; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-caption b { color: var(--peel); }
.tb-caption.in { animation: lv-in calc(.4s * var(--lv-spd)) both; }

.tc { position: absolute; left: 0; top: 0; perspective: 900px; transition: transform calc(.7s * var(--lv-spd)) cubic-bezier(.25, .46, .45, .94), opacity calc(.5s * var(--lv-spd)); will-change: transform; }
.tb-stage.jump .tc, .tb-stage.jump .tc-in { transition: none !important; }
.tc.paper { width: 150px; height: 100px; }
.tc.hyp { width: 168px; height: 116px; }
.tc-in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform calc(.6s * var(--lv-spd)) cubic-bezier(.3, .7, .3, 1); }
.tc.down .tc-in { transform: rotateY(180deg); }
.tc-face, .tc-back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 10px; border: 1px solid var(--line); box-shadow: var(--shadow-1); overflow: hidden; transition: box-shadow .35s, border-color .35s; }
.tc-back { transform: rotateY(180deg); background: var(--peel); color: var(--paper); display: grid; place-items: center; border-color: var(--peel); background-image: repeating-linear-gradient(45deg, transparent 0 7px, rgba(255, 250, 240, .12) 7px 8px); box-shadow: inset 0 0 0 5px var(--peel), inset 0 0 0 6px rgba(255, 250, 240, .35), var(--shadow-1); }
.tc-back svg { width: 34px; height: 34px; }
.tc-face { background: var(--face); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.tc.paper .tc-face { padding: 9px 11px; }
.tc.paper .src { font: 9.5px var(--mono); color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc.paper b { font: 600 12px/1.28 var(--serif); color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tc.paper .au { font-size: 10px; color: var(--muted); margin-top: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc.hot .tc-face { border-color: var(--peel); box-shadow: 0 0 0 1.5px var(--peel), var(--shadow-2); }
.tc.hyp b { font: 600 13px/1.27 var(--serif); color: var(--ink); letter-spacing: -.005em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tc-top { display: flex; align-items: baseline; gap: 6px; font: 10.5px var(--mono); color: var(--faint); }
.tc-top .rk { color: var(--peel); font-weight: 700; }
.tc-top .rk:empty { display: none; }
.tc-top .mv { font: 700 10.5px var(--sans); opacity: 0; }
.tc-top .mv.up { color: var(--leaf); } .tc-top .mv.down { color: var(--rust); }
.tc-top .mv.show { animation: tb-mv calc(1.8s * var(--lv-spd)) ease-out both; }
.tc-top .elo { margin-left: auto; font: 700 13px var(--mono); color: var(--ink); }
.tc-bot { margin-top: auto; display: flex; align-items: center; gap: 5px; font: 10px var(--mono); color: var(--muted); }
.tc-bot .wl { margin-left: auto; }
.tc-top .evo { background: var(--leaf-soft); color: var(--leaf); border-radius: 3px; padding: 0 4px; font-family: var(--sans); font-weight: 600; font-size: 9px; }
.tc-bot .kt { color: var(--peel); font-weight: 700; background: none; padding: 0; border-radius: 0; font-size: 11px; white-space: nowrap; margin-left: auto; }
.stamps { display: inline-flex; gap: 3px; }
.st { position: relative; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; font: 700 9px var(--sans); font-style: normal; color: var(--on-accent); }
/* A new stamp comes down, hits the card at 40% of its run, and the card gives under it. --k staggers a critic's stamps across the table. */
.st.new { animation: tb-stamp calc(.5s * var(--lv-spd)) both; animation-delay: calc(var(--k, 0) * .07s * var(--lv-spd)); }
.st.new::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 1.5px solid var(--ink); opacity: 0; animation: tb-ring calc(.4s * var(--lv-spd)) ease-out both; animation-delay: calc((var(--k, 0) * .07s + .2s) * var(--lv-spd)); }
.tc-in.thud { animation: tb-thud calc(.24s * var(--lv-spd)) ease-out; animation-delay: calc((var(--k, 0) * .07s + .2s) * var(--lv-spd)); }
.tc-in.land { animation: tb-land calc(.2s * var(--lv-spd)) ease-out; }
.tc-top .elo.up { animation: tb-elo-up calc(.6s * var(--lv-spd)) ease-out; }
.tc-top .elo.down { animation: tb-elo-down calc(.6s * var(--lv-spd)) ease-out; }
.tc-bot .kt.new { animation: tb-pop calc(.4s * var(--lv-spd)) cubic-bezier(.3, 1.5, .5, 1) both; transform-origin: 0 50%; }
.tc-why.new { animation: tb-why calc(.3s * var(--lv-spd)) ease-out both; }
.tb-seat.speaking .av { animation: tb-nod calc(.45s * var(--lv-spd)) ease-out; }
.tb-seat .tk { font-size: 11.5px; line-height: 1; min-height: 12px; margin-top: -2px; color: var(--faint); font-variant-numeric: tabular-nums; }
.tb-seat .tk.tick, #meter-val.tick { animation: tb-tick .35s ease-out; }
.st.c0 { background: var(--c0); } .st.c1 { background: var(--c1); } .st.c2 { background: var(--c2); }
.st.reject { box-shadow: 0 0 0 1.5px var(--face), 0 0 0 2.5px var(--rust); }
.tb-stage.jump .st { animation: none; }
.tc-why { position: absolute; left: 0; right: 0; bottom: 0; background: var(--rust); color: var(--on-accent); font-size: 10px; font-weight: 600; text-align: center; padding: 2px 4px; }
.tc.lift .tc-face { border-color: var(--peel); box-shadow: 0 0 0 2px var(--peel), var(--shadow-3); }
.tc.lift .tc-in { transform: translateY(-10px); transition-delay: calc(.5s * var(--lv-spd)); }
.tc.up .tc-face { box-shadow: var(--shadow-3); }
.tc.mid .tc-face { box-shadow: var(--shadow-2); }
.tc.lost .tc-face { filter: saturate(.35); opacity: .7; transition: opacity .4s calc(.5s * var(--lv-spd)); }
@keyframes tb-stamp { 0% { transform: scale(2.6) rotate(-18deg); opacity: 0; animation-timing-function: cubic-bezier(.5, 0, .9, .5); } 40% { transform: scale(.84); opacity: 1; animation-timing-function: ease-out; } 66% { transform: scale(1.12); opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes tb-ring { from { transform: scale(1); opacity: .55; } to { transform: scale(2.6); opacity: 0; } }
@keyframes tb-thud { 0% { scale: 1; translate: 0 0; } 30% { scale: .972; translate: 0 2px; } 100% { scale: 1; translate: 0 0; } }
@keyframes tb-land { 0% { scale: 1; } 32% { scale: .962; } 100% { scale: 1; } }
@keyframes tb-elo-up { 0% { color: var(--leaf); translate: 0 5px; } 35% { translate: 0 -1px; } 70% { color: var(--leaf); translate: 0 0; } }
@keyframes tb-elo-down { 0% { color: var(--rust); translate: 0 -5px; } 35% { translate: 0 1px; } 70% { color: var(--rust); translate: 0 0; } }
@keyframes tb-pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes tb-why { from { transform: translateY(100%); } to { transform: none; } }
@keyframes tb-nod { 0% { rotate: 0deg; scale: 1; } 30% { rotate: -9deg; scale: 1.12; } 65% { rotate: 5deg; scale: 1.04; } 100% { rotate: 0deg; scale: 1; } }
@keyframes tb-mv { 0% { opacity: 0; translate: 0 3px; } 12% { opacity: 1; translate: 0 0; } 75% { opacity: 1; } 100% { opacity: 0; } }
@keyframes tb-tick { 0% { color: var(--peel); } }

.lv-speech { margin-top: 16px; max-height: 360px; overflow-y: auto; padding: 0; border: 0; background: none; }
.lv-speech > .lv-item { margin: 0; }
.lv-quiet { color: var(--muted); font-family: var(--serif); font-size: 16px; margin: 4px 2px; }
@media (prefers-reduced-motion: reduce) { .tc, .tc-in, .st, .st::after, .tb-caption.in, .tc-top .elo, .tc-top .mv, .tc-bot .kt, .tc-why, .tb-seat .av, .tk, #meter-val { transition: none !important; animation: none !important; } }
@media (max-width: 900px) { .lv-table { border-radius: 12px; } .lv-speech { max-height: none; } }
.detail .sub { color: var(--muted); font-size: 13px; margin: 0 0 4px; }
.lb .t .hid { color: var(--faint); margin-right: 8px; font-size: 13px; }
.prem a { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Phones: nothing may widen the page (a wide page zooms out and shifts fixed overlays). */
@media (max-width: 720px) {
  .top { position: static; }   /* the header wraps to several rows on a phone; pinned, it would hide a third of the screen */
  .tabs { overflow-x: auto; padding: 12px 16px 0; scrollbar-width: none; }
  .tabs button { white-space: nowrap; flex: none; }
  main { padding: 16px 16px 48px; }
  .card { overflow-x: auto; }
  .goal { padding-left: 16px; padding-right: 16px; }
}
