:root {
  --bg: #f4f5f8;
  --card: #ffffff;
  --card-2: #f7f8fb;
  --ink: #0f1424;
  --ink-2: #4a5268;
  --ink-3: #8a91a5;
  --line: #e3e6ee;
  --line-2: #eef0f5;
  --hs: #0e9f6e;          /* Onset */
  --hs-soft: rgba(14,159,110,.12);
  --bl: #64748b;          /* Baseline */
  --bl-soft: rgba(100,116,139,.13);
  --web: #2f6fed;
  --local: #0d9488;
  --audio: #8b5cf6;
  --draft: #d97706;
  --answer: #0e9f6e;
  --stale: #9aa1b2;
  --err: #dc2626;
  --gold: #f5b301;
  --spk: #ef4444;
  --hl-entity: rgba(47,111,237,.14);
  --hl-number: rgba(217,119,6,.16);
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --radius: 12px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0e16; --card: #131826; --card-2: #181e2e; --ink: #eef1f8; --ink-2: #aeb5c8; --ink-3: #6f7891;
    --line: #242b3d; --line-2: #1c2233; --hs: #34d399; --hs-soft: rgba(52,211,153,.14); --bl: #94a3b8;
    --bl-soft: rgba(148,163,184,.14); --web: #5b8cff; --local: #2dd4bf; --audio: #a78bfa; --draft: #fbbf24;
    --answer: #34d399; --stale: #5d6579; --err: #f87171; --gold: #fcd34d; --spk: #f87171;
    --hl-entity: rgba(91,140,255,.22); --hl-number: rgba(251,191,36,.2);
    --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0e16; --card: #131826; --card-2: #181e2e; --ink: #eef1f8; --ink-2: #aeb5c8; --ink-3: #6f7891;
  --line: #242b3d; --line-2: #1c2233; --hs: #34d399; --hs-soft: rgba(52,211,153,.14); --bl: #94a3b8;
  --bl-soft: rgba(148,163,184,.14); --web: #5b8cff; --local: #2dd4bf; --audio: #a78bfa; --draft: #fbbf24;
  --answer: #34d399; --stale: #5d6579; --err: #f87171; --gold: #fcd34d; --spk: #f87171;
  --hl-entity: rgba(91,140,255,.22); --hl-number: rgba(251,191,36,.2);
  --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2 { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
code, kbd { font-family: var(--mono); font-size: .9em; }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--card-2); }
.muted { color: var(--ink-3); }
.sub { font-weight: 500; color: var(--ink-3); font-size: 12px; margin-left: 6px; letter-spacing: 0; text-transform: none; }

/* ---------- header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 7px 16px; min-height: 50px;
  border-bottom: 1px solid var(--line); background: var(--card); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand h1 { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.tag { margin: 0; color: var(--ink-2); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo { width: 30px; height: 30px; border-radius: 9px; background: var(--hs); display: flex; align-items: center;
  justify-content: center; gap: 3px; flex: none; }
.logo span { width: 3px; border-radius: 2px; background: #fff; }
.logo span:nth-child(1) { height: 8px; } .logo span:nth-child(2) { height: 16px; } .logo span:nth-child(3) { height: 11px; }
.controls { display: flex; align-items: center; gap: 10px; flex: none; }
.seg { display: inline-flex; background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 5px 10px; border-radius: 7px; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.mic { position: relative; display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 999px;
  padding: 7px 14px; background: var(--ink); color: var(--card); font-weight: 700; }
.mic.live { background: var(--spk); color: #fff; }
.mic-ring { position: absolute; inset: -4px; border-radius: 999px; border: 2px solid var(--spk); opacity: 0; transform: scale(1); pointer-events: none; }
.mic.live .mic-ring { opacity: .7; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); font-weight: 500; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--stale); }
.status.warm i { background: var(--hs); }
.status.cold i { background: var(--draft); animation: pulse 1.2s infinite; }
.status.down i { background: var(--err); }
.icon-btn { border: 1px solid var(--line); background: var(--card-2); border-radius: 8px; width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2); }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 12px; padding: 10px 16px 24px; }
.main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 9px 12px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; min-height: 18px; }
.card-head h2, .side-head h2 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-2); }

/* ---------- sidebar ---------- */
.side { position: sticky; top: 60px; align-self: start; max-height: calc(100vh - 70px); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.side-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 2px; }
.hint { font-size: 11px; color: var(--ink-3); }
.qlist { list-style: none; margin: 0; padding: 0; overflow: auto; display: flex; flex-direction: column; gap: 5px; min-height: 0; }
.qlist li.empty { color: var(--ink-3); font-size: 12.5px; padding: 10px; border: 1px dashed var(--line); border-radius: 10px; }
.qlist button { width: 100%; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 10px;
  padding: 6px 9px; display: grid; grid-template-columns: 18px 1fr; gap: 5px; align-items: start; transition: border-color .15s, background .15s; }
.qlist button:hover { border-color: var(--hs); }
.qlist button.on { border-color: var(--hs); background: var(--hs-soft); }
.qlist .n { font: 600 11px/18px var(--mono); color: var(--ink-3); }
.qlist .qt { font-size: 13px; line-height: 1.35; }
.qlist .qm { display: block; font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.adhoc { display: flex; gap: 6px; }
.adhoc input { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 8px; padding: 6px 8px; font: 12px var(--mono); }
.adhoc button { border: 1px solid var(--line); background: var(--card-2); border-radius: 8px; padding: 6px 10px; font-size: 12px; font-weight: 600; }

/* ---------- transcript + frame ---------- */
.row-top { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 12px; }
.ear { font: 500 11.5px var(--mono); color: var(--ink-3); }
.ear.live { color: var(--spk); }
.transcript { font-size: 22px; line-height: 1.75; font-weight: 600; letter-spacing: -.01em; min-height: 52px; padding-top: 11px; }
.placeholder { font-size: 15px; font-weight: 500; color: var(--ink-3); }
.w { display: inline-block; position: relative; padding: 0 2px; margin: 0 1px; border-radius: 5px; }
.w.new { animation: wIn .25s ease-out; }
.w.slot-entity { background: var(--hl-entity); box-shadow: inset 0 -2px 0 var(--web); }
.w.slot-number { background: var(--hl-number); box-shadow: inset 0 -2px 0 var(--draft); }
.w .lab { position: absolute; left: 2px; top: -12px; font: 600 9.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; color: var(--web); }
.w.slot-number .lab { color: var(--draft); }
.w.revised { animation: wRev 1.1s ease-out; }
.w .was { position: absolute; left: 0; top: auto; bottom: -1.15em; font-size: .55em; color: var(--err); text-decoration: line-through; opacity: 0; animation: wasOut 1.6s ease-out; white-space: nowrap; pointer-events: none; }
.w.pending { color: var(--ink-3); }
@keyframes wIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes wRev { 0% { background: rgba(220,38,38,.25); } 100% { background: transparent; } }
@keyframes wasOut { 0% { opacity: 1; transform: none; } 70% { opacity: .9; } 100% { opacity: 0; transform: translateY(-6px); } }

.frame { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 6px 14px; padding-top: 4px; }
.kv { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 6px; min-height: 24px; min-width: 0; }
.kv label { font: 600 10.5px var(--mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.intent { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 14.5px; min-width: 0; }
.intent .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbar { width: 36px; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; flex: none; }
.pbar i { display: block; height: 100%; background: var(--hs); transition: width .25s; }
.pv { font: 500 11px var(--mono); color: var(--ink-3); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { display: inline-flex; align-items: center; gap: 4px; border-radius: 6px; padding: 1px 7px; font-size: 12.5px; font-weight: 600; background: var(--hl-entity); }
.chip.number { background: var(--hl-number); }
.chip small { font: 600 9.5px var(--mono); text-transform: uppercase; color: var(--ink-2); }
.query { font: 500 12.5px var(--mono); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chips { flex-wrap: nowrap; overflow: hidden; }
.route { display: inline-flex; gap: 4px; }
.route span { font: 600 11px var(--mono); padding: 1px 7px; border-radius: 5px; border: 1px solid var(--line); color: var(--ink-3); }
.route span.on.web { color: #fff; background: var(--web); border-color: var(--web); }
.route span.on.local { color: #fff; background: var(--local); border-color: var(--local); }
.badges { display: inline-flex; gap: 5px; }
.badge { font: 700 10px var(--mono); text-transform: uppercase; letter-spacing: .05em; padding: 2px 6px; border-radius: 5px; }
.badge.corr { background: var(--err); color: #fff; animation: pop .4s ease-out; }
.badge.cc { background: var(--hs-soft); color: var(--hs); }
@keyframes pop { 0% { transform: scale(.6); } 70% { transform: scale(1.12); } 100% { transform: none; } }

/* ---------- timeline ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11px; color: var(--ink-2); justify-content: flex-end; }
.legend span { display: inline-flex; align-items: center; gap: 4px; }
.lg { width: 14px; height: 7px; border-radius: 2px; display: inline-block; }
.lg.web { background: var(--web); } .lg.local { background: var(--local); } .lg.audio { background: var(--audio); }
.lg.draft { background: var(--draft); } .lg.ans { background: var(--answer); }
.lg.stale { background: repeating-linear-gradient(135deg, var(--stale) 0 2px, transparent 2px 4px); border: 1px solid var(--stale); }
.lg.used { background: var(--card); box-shadow: inset 0 0 0 2px var(--hs); }
.lg.reused { background: var(--draft); box-shadow: 0 0 0 2px var(--gold), 0 0 6px var(--gold); }

.tl { position: relative; --lab: 210px; }
.tl-axis, .tl-row, .tl-overlay, .tl-sec { display: grid; grid-template-columns: var(--lab) minmax(0, 1fr); }
.tl-track { position: relative; }
.tl-axis { height: 18px; border-bottom: 1px solid var(--line); }
.tick { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line-2); }
.tick span { position: absolute; top: 2px; left: 4px; font: 500 10.5px var(--mono); color: var(--ink-3); white-space: nowrap; }
.tl-body { max-height: max(96px, calc(100vh - 560px)); overflow-y: auto; overflow-x: hidden; }
.tl-sec { height: 20px; align-items: end; }
.tl-sec .tl-label { font: 700 10.5px var(--sans); text-transform: uppercase; letter-spacing: .07em; display: flex; align-items: center; gap: 6px; }
.tl-sec.hs .tl-label { color: var(--hs); } .tl-sec.bl .tl-label { color: var(--bl); }
.tl-row { height: 19px; align-items: center; }
.tl-row.first.m-baseline { border-top: 1px solid var(--line); }
.tl-row.m-headstart .tl-label { box-shadow: inset 3px 0 0 var(--hs); padding-left: 7px; }
.tl-row.m-baseline .tl-label { box-shadow: inset 3px 0 0 var(--bl); padding-left: 7px; }
.tl-row .tl-label { display: flex; align-items: center; gap: 6px; font-size: 11.5px; min-width: 0; padding-right: 8px; color: var(--ink-2); }
.tl-row .tl-label .q { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--mono); font-size: 11px; }
.tl-row.st-stale .q, .tl-row.st-cancelled .q { text-decoration: line-through; color: var(--ink-3); }
.lane { flex: none; font: 700 9px/1 var(--mono); text-transform: uppercase; padding: 3px 4px; border-radius: 4px; color: #fff; width: 40px; text-align: center; }
.lane.web { background: var(--web); } .lane.local { background: var(--local); } .lane.audio { background: var(--audio); }
.lane.draft { background: var(--draft); } .lane.ans { background: var(--answer); }
.lane.final { background: var(--bl); }
.tl-row .tl-track { height: 100%; }
.tl-row .tl-track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px dashed var(--line-2); }
.bar { position: absolute; top: 3px; height: 12px; border-radius: 4px; min-width: 3px; background: var(--c, var(--web)); transition: opacity .3s, box-shadow .3s; }
.bar.web { --c: var(--web); } .bar.local { --c: var(--local); } .bar.audio { --c: var(--audio); }
.bar.draft { --c: var(--draft); } .bar.ans { --c: var(--answer); } .bar.final { --c: var(--bl); }
.bar.final.ans { --c: var(--bl); }
.bar.live { background: repeating-linear-gradient(90deg, var(--c) 0 8px, color-mix(in srgb, var(--c) 55%, transparent) 8px 16px);
  background-size: 32px 100%; animation: flow .6s linear infinite; }
.bar.stale, .bar.cancelled { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 45%, transparent) 0 3px, transparent 3px 6px);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 55%, transparent); }
.bar.stale::after, .bar.cancelled::after { content: ""; position: absolute; left: -2px; right: -2px; top: 50%; border-top: 2px solid var(--stale); }
.bar.error { --c: var(--err); }
.bar.unused { opacity: .55; }
.bar.used { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--hs); }
.bar.reused { box-shadow: 0 0 0 2px var(--gold), 0 0 12px var(--gold); }
.bar .bt { position: absolute; left: calc(100% + 6px); top: -1px; font: 500 10.5px var(--mono); color: var(--ink-3); white-space: nowrap; }
.bar .tickmark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); border-radius: 1px; }
@keyframes flow { to { background-position: 32px 0; } }

.tl-row.speech { height: 24px; }
.tl-row.speech .tl-label { font-weight: 700; font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--spk); }
.sw { position: absolute; top: 4px; height: 18px; border-radius: 4px; background: color-mix(in srgb, var(--spk) 14%, transparent);
  font: 600 10.5px/18px var(--sans); color: var(--ink); padding: 0 3px; overflow: hidden; white-space: nowrap; text-overflow: clip; }

.tl-overlay { position: absolute; left: 0; right: 0; top: 0; bottom: 0; pointer-events: none; }
.mark { position: absolute; top: 18px; bottom: 0; border-left: 2px solid var(--mc, var(--ink)); transition: left .15s linear; }
.mark.dash { border-left-style: dashed; }
.mark span { position: absolute; top: -18px; left: 3px; font: 700 10px/1 var(--sans); white-space: nowrap; color: var(--mc); background: var(--card);
  padding: 3px 4px; border-radius: 4px; }
.mark.right span { left: auto; right: 3px; }
.mark.now { --mc: var(--ink-3); border-left-width: 1px; }
.mark.now span { display: none; }
.mark.spk { --mc: var(--spk); }
.mark.ep { --mc: var(--ink-3); }
.mark.hs { --mc: var(--hs); } .mark.bl { --mc: var(--bl); }
.gap { position: absolute; bottom: 4px; height: 0; border-top: 2px solid var(--mc); }
.gap.hs { --mc: var(--hs); } .gap.bl { --mc: var(--bl); }

/* ---------- answer panes ---------- */
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pane { display: flex; flex-direction: column; gap: 6px; border-top: 3px solid var(--bl); transition: box-shadow .3s; }
.pane[data-mode="headstart"] { border-top-color: var(--hs); }
.pane.off { opacity: .45; }
.pane.winner { box-shadow: 0 0 0 2px var(--hs-soft), var(--shadow); }
.pane-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pane-head h2 { font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 7px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.hs { background: var(--hs); } .dot.bl { background: var(--bl); }
.path { font: 600 10.5px var(--mono); padding: 2px 7px; border-radius: 5px; background: var(--card-2); border: 1px solid var(--line); color: var(--ink-2); }
.path:empty { display: none; }
.path.p-draft-reuse { background: var(--gold); border-color: var(--gold); color: #3b2a00; }
.path.p-speculative-hit, .path.p-pool-commit { background: var(--hs-soft); border-color: var(--hs); color: var(--hs); }
.path.p-speculative-miss { color: var(--err); border-color: var(--err); }
.watch { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; min-height: 52px; }
.clock { display: flex; flex-direction: column; gap: 2px; }
.big { font: 800 34px/1 var(--sans); letter-spacing: -.035em; font-variant-numeric: tabular-nums; color: var(--ink); min-width: 120px; }
.pane[data-mode="headstart"] .big.final { color: var(--hs); }
.big.running { color: var(--ink-3); }
.watch-sub { font-size: 11.5px; color: var(--ink-2); }
.delta { text-align: right; color: var(--ink-3); }
.delta .dl { display: block; font-size: 12.5px; font-weight: 600; }
.delta.hero { color: var(--hs); animation: heroIn .5s cubic-bezier(.2,1.4,.4,1); }
.delta.hero .dv { display: block; font: 900 50px/0.95 var(--sans); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.delta.hero .dl { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.pane[data-mode="baseline"] .delta.hero { color: var(--ink); }
@keyframes heroIn { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
.answer { font-size: 14.5px; line-height: 1.45; min-height: 42px; }
.answer.err { color: var(--err); font-size: 13px; }
.answer .caret { display: inline-block; width: 7px; height: 1em; vertical-align: -2px; background: var(--ink-3); margin-left: 2px; animation: blink 1s steps(2) infinite; }
.answer .wait { color: var(--ink-3); font-size: 13.5px; }
.cite { display: inline-block; font: 700 10.5px/1 var(--mono); padding: 2px 4px; margin: 0 1px; border-radius: 4px; vertical-align: 2px;
  background: var(--card-2); border: 1px solid var(--line); color: var(--web); text-decoration: none; cursor: pointer; }
.cite:hover { background: var(--web); color: #fff; }
.stats { display: flex; flex-wrap: wrap; gap: 5px 12px; font: 500 11.5px var(--mono); color: var(--ink-3); }
.stats b { color: var(--ink); font-weight: 600; }
.stats:empty { display: none; }
.sources { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 5px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.src { display: block; border: 1px solid var(--line); border-radius: 8px; padding: 4px 7px; text-decoration: none; color: var(--ink); background: var(--card-2);
  font-size: 12px; line-height: 1.3; min-width: 0; transition: border-color .15s, transform .15s; }
.src.hl { border-color: var(--web); transform: translateY(-1px); box-shadow: 0 0 0 2px color-mix(in srgb, var(--web) 25%, transparent); }
.src .st { display: flex; gap: 5px; align-items: center; }
.src .sn { font: 700 10.5px var(--mono); color: var(--web); flex: none; }
.src .tt { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.src .sm { display: flex; align-items: center; gap: 4px; font: 500 10px var(--mono); color: var(--ink-3); margin-top: 2px; white-space: nowrap; overflow: hidden; }
.src .sm .mt { overflow: hidden; text-overflow: ellipsis; }
.src .ln { flex: none; font: 700 8.5px/1 var(--mono); text-transform: uppercase; color: #fff; padding: 2px 3px; border-radius: 3px; background: var(--web); }
.src .ln.local { background: var(--local); } .src .ln.audio { background: var(--audio); }
.src .ts { flex: none; font: 700 10px/1 var(--mono); color: var(--local); background: color-mix(in srgb, var(--local) 14%, transparent); padding: 2px 4px; border-radius: 3px; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- results ---------- */
.link-btn { border: 0; background: none; color: var(--web); font-size: 12px; font-weight: 600; }
.res-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.tile { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--card-2); }
.tile label { display: block; font: 600 10.5px var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.tile .v { font: 800 24px/1.2 var(--sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tile .v small { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.tile.hs .v { color: var(--hs); }
.res-chart svg { display: block; width: 100%; height: auto; }
.res-chart text { font-family: var(--sans); fill: var(--ink-2); }
.res-chart .ax { stroke: var(--line); }
.res-chart .grid { stroke: var(--line-2); }
.res-chart .conn { stroke: var(--ink-3); stroke-width: 2; opacity: .35; }
.res-chart .ph { fill: var(--hs); } .res-chart .pb { fill: var(--bl); }
.res-chart .lbl { font-size: 11.5px; fill: var(--ink); }
.res-chart .num { font: 500 10.5px var(--mono); fill: var(--ink-3); }
.res-chart .row:hover .conn { opacity: .8; }
.res-legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); margin: 4px 0 8px; }
.res-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }
pre.raw { font: 11px/1.4 var(--mono); max-height: 240px; overflow: auto; background: var(--card-2); padding: 8px; border-radius: 8px; }

.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--card);
  padding: 8px 14px; border-radius: 9px; font-size: 13px; font-weight: 500; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; z-index: 50; max-width: 80vw; }
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.err { background: var(--err); color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 1360px) {
  .layout { grid-template-columns: 206px minmax(0, 1fr); gap: 10px; padding: 10px 12px 20px; }
  .tl { --lab: 176px; }
  .tag, .status b { display: none; }
}
@media (max-width: 1180px) { .pipe small { display: none; } }
@media (max-width: 980px) {
  .top { flex-wrap: wrap; }
  .pipe { order: 3; width: 100%; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; max-height: none; }
  .qlist { max-height: 180px; }
  .row-top, .answers { grid-template-columns: minmax(0, 1fr); }
  .tl { --lab: 120px; }
  .legend { display: none; }
  .res-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .top { flex-wrap: wrap; padding: 10px 16px; }
  .layout { padding: 12px 16px; }
  .seg button { padding: 5px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
.answer .old { font-size: 12px; color: var(--ink-3); margin-bottom: 4px; line-height: 1.4; }
.answer .old .badge { margin-right: 4px; animation: none; }
.tl { padding-bottom: 42px; }
.tl-overlay .mark { bottom: 0; }
.res-note { font-size: 12.5px; color: var(--ink-2); margin: 0 0 6px; }
.res-chart .ph.bad { fill: var(--card); stroke: var(--hs); stroke-width: 2; }
.res-chart .pb.bad { fill: var(--card); stroke: var(--bl); stroke-width: 2; }

/* ---------- how it works strip ---------- */
.pipe { list-style: none; margin: 0; padding: 0; display: flex; align-items: stretch; gap: 0; flex: 1 1 auto; min-width: 0; max-width: 720px; justify-content: center; }
.pipe li { position: relative; display: flex; flex-direction: column; justify-content: center; min-width: 0; flex: 1 1 0; max-width: 150px;
  padding: 3px 10px 3px 14px; border: 1px solid var(--line); background: var(--card-2); color: var(--ink-3);
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 50%, calc(100% - 9px) 100%, 0 100%, 9px 50%); margin-left: -3px;
  transition: background .3s, color .3s; }
.pipe li:first-child { clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 50%, calc(100% - 9px) 100%, 0 100%); border-radius: 7px 0 0 7px; margin-left: 0; padding-left: 10px; }
.pipe b { font-size: 12px; font-weight: 700; line-height: 1.2; }
.pipe small { font: 500 10px/1.25 var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pipe li.on { background: var(--hs-soft); color: var(--ink); border-color: transparent; }
.pipe li.on b { color: var(--hs); }
.pipe li.hit { background: var(--hs); color: #fff; }
.pipe li.hit b, .pipe li.hit small { color: #fff; }
.pipe li.hit { transition: none; }

/* local/web question set tabs */
.qtabs { display: flex; gap: 4px; background: var(--card-2); border: 1px solid var(--line); border-radius: 9px; padding: 3px; }
.qtabs[hidden] { display: none; }
.qtabs button { flex: 1; border: 0; background: transparent; padding: 4px 6px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.qtabs button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.delta.tie .dv { font-size: 34px; }
.transcript.long { font-size: 18px; line-height: 1.85; }
.stats { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }
/* conversation memory + history */
.badge.mem { background: var(--audio); color: #fff; text-transform: none; letter-spacing: 0; font-size: 11.5px; padding: 2px 7px; animation: pop .4s ease-out; }
.badge.heardfix { background: var(--web); color: #fff; text-transform: none; letter-spacing: 0; font-size: 11.5px; padding: 2px 7px; animation: pop .4s ease-out; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge.heardfix i { font-style: normal; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; opacity: .85; margin-right: 3px; }
.badge.mem i { font-style: normal; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; opacity: .85; margin-right: 3px; }
.history { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin-top: 2px; padding-top: 5px; border-top: 1px dashed var(--line); font-size: 11.5px; color: var(--ink-3); min-width: 0; }
.history[hidden] { display: none; }
.history .hl-lab { font: 600 9.5px var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.history .turn { display: inline-flex; gap: 5px; min-width: 0; max-width: 100%; }
.history .tq { color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.history .ta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.turn-sep { display: inline-block; margin: 0 5px; font: 600 9.5px var(--mono); text-transform: uppercase; color: var(--ink-3); }
.qtabs button[hidden] { display: none; }
.frame-card .card-head h2 { white-space: nowrap; }
.badges { flex-wrap: nowrap; min-width: 0; overflow: hidden; }
.badge { white-space: nowrap; }
/* glitch-fix round: layering, collisions, compact rows */
.tl-body { position: relative; z-index: 2; }
.tl-overlay { z-index: 1; }
.bar .bt { background: var(--card); padding: 0 3px; border-radius: 3px; top: -2px; line-height: 15px; }
.tick span.hid { visibility: hidden; }
.mark span { z-index: 3; }
.sw { text-overflow: ellipsis; padding: 0 3px; }
.sw.tiny { padding: 0; background: color-mix(in srgb, var(--spk) 30%, transparent); }
.tl-row.m-baseline { height: 16px; }
.tl-row.m-baseline .bar { top: 3px; height: 10px; }
.tl-row.m-baseline .tl-label { font-size: 10.5px; }
.tl-row.m-baseline .lane { padding: 2px 4px; font-size: 8.5px; }
.tl-row.m-baseline .bar .bt { font-size: 10px; line-height: 13px; }
.tl-row.st-stale, .tl-row.st-cancelled { height: 15px; }
.tl-row.st-stale .bar, .tl-row.st-cancelled .bar { top: 3px; height: 9px; }
.tl-row.st-stale .tl-label, .tl-row.st-cancelled .tl-label { font-size: 10.5px; }
.tl-row.st-stale .lane, .tl-row.st-cancelled .lane { padding: 2px 4px; font-size: 8.5px; opacity: .7; }
.tl-body { max-height: max(120px, calc(100vh - 528px)); }
.stats { flex-wrap: wrap; white-space: normal; gap: 2px 10px; }
.stats span { white-space: nowrap; }
.tile .v small { font-size: 12px; }
.answer { font-size: 14px; line-height: 1.42; }

/* degraded / offline mode: always labelled */
.status.degraded i { background: var(--gold); }
/* notices (server/notices.py): one calm line per problem, with what to do; hidden when all is well */
.degraded { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; margin: 0 16px; padding: 7px 12px; border-radius: 8px;
  background: color-mix(in srgb, var(--gold) 12%, var(--card)); border: 1px solid color-mix(in srgb, var(--gold) 55%, var(--line));
  font-size: 13px; color: var(--ink); }
.degraded[hidden] { display: none; }
.degraded .nt { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.degraded .nt i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex: none; }
.degraded .nt b { font-weight: 600; }
.degraded .nt-hint { color: var(--ink-2); }
.degraded .nt-act { border: 0; background: none; padding: 0; color: var(--web); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.degraded .nt-act:focus-visible { outline: 2px solid var(--web); outline-offset: 2px; border-radius: 3px; }

/* route chip in each pane head: card / facts / saved / web / wait (+ local, memory) */
.pane-head .route-chip { margin-left: auto; }
.route-chip { font: 600 11px/1 var(--mono); padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2);
  background: var(--card-2); text-transform: lowercase; letter-spacing: .02em; white-space: nowrap; }
.route-chip:empty { display: none; }
.route-chip.live { border-style: dashed; }
.route-chip.rt-card { color: var(--hs); border-color: color-mix(in srgb, var(--hs) 50%, transparent); background: var(--hs-soft); }
.route-chip.rt-facts { color: var(--web); border-color: color-mix(in srgb, var(--web) 50%, transparent); background: color-mix(in srgb, var(--web) 10%, transparent); }
.route-chip.rt-saved, .route-chip.rt-memory, .route-chip.rt-local { color: var(--audio); border-color: color-mix(in srgb, var(--audio) 50%, transparent); background: color-mix(in srgb, var(--audio) 10%, transparent); }
.route-chip.rt-web { color: var(--draft); border-color: color-mix(in srgb, var(--draft) 50%, transparent); background: color-mix(in srgb, var(--draft) 9%, transparent); }
.route-chip.rt-wait { color: var(--ink-3); }

/* the Results button (web/scorecard.js) */
.sc-open { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--card-2); color: var(--ink); font-weight: 600; font-size: 13px; }
.sc-open:hover { border-color: var(--hs); color: var(--hs); }
.sc-open:focus-visible { outline: 2px solid var(--hs); outline-offset: 2px; }
.res-old { margin: 0 0 10px; padding: 6px 10px; border-radius: 8px; background: var(--card-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 12.5px; }
.stats .flag, .badge.fb { background: var(--gold); color: #1f1300; border-radius: 4px; padding: 0 5px; font-weight: 700; }
.badge.fb { text-transform: none; letter-spacing: 0; font-size: 10.5px; }
/* final round: frame fallbacks, short slot labels, single-line sources, label collisions */
.chips { flex-wrap: wrap; overflow: visible; row-gap: 3px; }
.chip { white-space: nowrap; }
.from-partial { display: inline-flex; align-items: center; gap: 6px; opacity: .6; min-width: 0; flex-wrap: wrap; }
.from-partial .fp { font: 500 10px var(--mono); color: var(--ink-3); white-space: nowrap; }
.src { padding: 3px 7px; }
.src .st { gap: 4px; white-space: nowrap; }
.src .sm { display: none; }
.src .ln, .src .ts { flex: none; }
.src .ln.cached { background: var(--ink-3); }
.bar .bt.hid { visibility: hidden; }
.sources { grid-auto-columns: minmax(185px, 1fr); }

/* Arc read-out row (tagger-depth) */
.readout { display: flex; flex-wrap: wrap; gap: 4px 5px; }
.ro { display: inline-flex; align-items: center; border-radius: 6px; padding: 1px 7px; font: 600 11.5px var(--mono); background: var(--hl-entity); color: var(--ink); white-space: nowrap; }
.ro.act, .ro.dir { background: transparent; border: 1px solid var(--line, rgba(127,127,127,.35)); color: var(--ink-2); }
.ro.fresh, .ro.num { background: var(--hl-number); }
.ro.priv { background: rgba(46, 160, 67, .18); }
.ro.warn { background: rgba(218, 54, 51, .16); }

/* ---------- live results in the race panes (shared logic: results.js) ---------- */
.answers { height: clamp(330px, calc(100vh - 318px), 640px); }
.pane { min-height: 0; overflow: hidden; }
.pane .watch { flex: none; min-height: 44px; }
.pane .big { font-size: 30px; }
.delta.hero .dv { font-size: 42px; }
.pane .sources { display: none; }
.pane .stats { flex: none; }
.pane .answer { flex: none; min-height: 0; font-size: 13.5px; line-height: 1.42; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pane .answer .old { display: none; }
.pane .answer:empty { display: none; }
.rq { flex: none; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 16px; line-height: 16px; border-top: 1px solid var(--line-2); padding-top: 5px; }
.rq:empty { visibility: hidden; }
.rq b { color: var(--ink); font: 500 11.5px var(--mono); }
.rq s { font-family: var(--mono); text-decoration-color: var(--err); }
.rq .st { color: var(--err); font-weight: 700; }
.rq .lk { color: var(--hs); font-weight: 700; margin-right: 2px; }
.pane[data-mode="baseline"] .rq .lk { color: var(--bl); }
.rq .nx { margin-left: 8px; color: var(--web); }
.rq .sp { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 50%; border: 2px solid var(--web); border-right-color: transparent; vertical-align: -1px; animation: fSpin .8s linear infinite; }
@keyframes fSpin { to { transform: rotate(360deg); } }
.res { position: relative; flex: 1 1 0; min-height: 0; overflow: hidden; }
.rr { position: relative; padding: 4px 8px 5px; margin-bottom: 5px; border-radius: 8px; border: 1px solid transparent; background: var(--card-2);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .35s, border-color .2s; }
.rr.entering { opacity: 0; transform: translateX(18px); }
.rr.leaving { position: absolute; left: 0; right: 0; opacity: 0; transform: scale(.97); pointer-events: none; transition: opacity .4s, transform .4s; }
.rr-h { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; }
.rr .fav { width: 15px; height: 15px; font-size: 8.5px; flex: none; }
.rr-n { font: 700 10.5px var(--mono); color: var(--web); flex: none; }
.rr-ts { font: 700 10px var(--mono); color: var(--local); background: color-mix(in srgb, var(--local) 14%, transparent); padding: 1px 4px; border-radius: 3px; flex: none; }
.rr-d { flex: none; }
.rr-d::before { content: "· "; }
.rr-t { font-size: 14px; font-weight: 600; line-height: 1.3; color: #1a0dab; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rr-t a { color: inherit; text-decoration: none; }
.rr-t a:hover { text-decoration: underline; }
.rr-s { font-size: 12px; line-height: 1.35; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rr-t { color: #8ab4f8; } }
:root[data-theme="dark"] .rr-t { color: #8ab4f8; }
.res.k-stale .rr { opacity: .42; }
.res.k-stale .rr-t { text-decoration: line-through; text-decoration-color: var(--err); }
.res.k-final .rr { border-color: color-mix(in srgb, var(--hs) 35%, var(--line)); }
.pane[data-mode="baseline"] .res.k-final .rr { border-color: color-mix(in srgb, var(--bl) 35%, var(--line)); }
.rr.hl { border-color: var(--web) !important; box-shadow: 0 0 0 2px color-mix(in srgb, var(--web) 22%, transparent); }

/* Results view (general web search): results are the hero, the spoken answer is a one-line summary */
.view-results .pane .answer { -webkit-line-clamp: 1; font-size: 13px; color: var(--ink-2); }
.view-results .pane .answer { cursor: pointer; }
.pane .answer.open, .view-results .pane .answer.open { -webkit-line-clamp: unset; overflow: visible; }
.answer .heard-note { color: var(--ink-3); font-style: italic; }
.big.heard { color: var(--ink-3); }
.view-results .pane .answer .badge { display: none; }
.view-results .rr { padding: 6px 10px 7px; margin-bottom: 6px; background: transparent; border-color: var(--line-2); }
.view-results .rr-t { font-size: 15.5px; }
.view-results .rr-s { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 12.5px; }
.view-results .pane .stats { display: none; }
.view-seg button { padding: 5px 9px; }
.tl-body { max-height: max(110px, calc(100vh - 620px)); }
.brand { flex: none; }
.brand h1 { white-space: nowrap; }
.pipe { flex: 1 1 auto; min-width: 0; }
.pipe li { min-width: 0; }
.view-results .rr { padding: 4px 9px 5px; margin-bottom: 4px; }
.view-results .rr-t { font-size: 14.5px; line-height: 1.28; }
.view-results .rr-s { font-size: 12px; line-height: 1.3; }
.view-results .answers { height: clamp(380px, calc(100vh - 250px), 760px); }
.view-results .pane .watch-sub { font-size: 11px; }


/* ---------------------------------------------------------------- minimal comparison view (default; D toggles) */
.minimal .pipe, .minimal aside.side, .minimal .frame-card, .minimal .tl-card, .minimal #results,
.minimal .pane .path, .minimal .watch-sub, .minimal .rq, .minimal .stats, .minimal .sources,
.minimal .pane-head .sub, .minimal .tag, .minimal .history { display: none !important; }
.minimal .layout { grid-template-columns: minmax(0, 1fr); max-width: 1400px; margin: 0 auto; }
.minimal .row-top { grid-template-columns: minmax(0, 1fr); }
.minimal .answers { height: auto; align-items: start; }
.minimal .pane { overflow: visible; min-height: 0; }
.minimal .res { overflow: visible; flex: none; }
.minimal .pane .answer { display: block; -webkit-line-clamp: unset; overflow: visible; font-size: 15px; line-height: 1.5; }
.minimal .rr { padding: 8px 12px 9px; margin-bottom: 8px; }
.minimal .rr-h { white-space: normal; }
.minimal .rr-t { white-space: normal; overflow: visible; text-overflow: clip; font-size: 15px; }
.minimal .rr-s { white-space: normal; overflow: visible; text-overflow: clip; display: block; -webkit-line-clamp: unset;
  font-size: 13.5px; line-height: 1.45; }

/* ---------------------------------------------------------------- What Arc hears: annotated transcript (hears.js) */
.transcript.hears-host { min-height: 0; padding-top: 0; font-size: inherit; line-height: normal; font-weight: inherit; letter-spacing: 0; }
.hears { --pin-h: 17px; }
.hw-ph { display: block; padding: 14px 0 10px; font-size: 15px; font-weight: 500; color: var(--ink-3); }
.hw-line { display: flex; flex-wrap: wrap; align-items: flex-start; row-gap: 2px; column-gap: 9px; min-height: 92px; }
.hw { position: relative; display: inline-flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.hw.in { animation: hwIn .28s ease-out; }
@keyframes hwIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.hw-top, .hw-bot { position: relative; height: var(--pin-h); width: 0; overflow: visible; display: flex; gap: 4px; white-space: nowrap; z-index: 3; }
.hw-top { align-items: flex-end; height: calc(var(--pin-h) * 2); }   /* two pin rows (hears.js layoutPins) */
.hw-x { position: relative; font-size: 25px; line-height: 1.25; font-weight: 600; letter-spacing: -.012em; color: var(--ink); padding: 0 1px;
  transition: color .25s, opacity .25s; white-space: nowrap; }
.hw-ul { position: relative; height: 15px; white-space: nowrap; }
/* stop words dim, content words (what goes into the search) carry the weight */
.hw.stop .hw-x { color: var(--ink-3); font-weight: 500; }
.hw.content .hw-x { color: var(--ink); font-weight: 750; }
/* typed spans: a coloured underline across the span, the type (+ normalised value) under its first word */
.hw.slot .hw-x { border-bottom: 3px solid var(--slot-c); padding-bottom: 1px; }
.hw.slot.ent { --slot-c: var(--web); }
.hw.slot.num { --slot-c: var(--draft); }
.hw.slot.s-first .hw-x { border-bottom-left-radius: 2px; }
.ul { position: absolute; left: 1px; top: 1px; font: 600 10.5px/1.25 var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--slot-c, var(--ink-3)); white-space: nowrap; z-index: 2; }
.ul b { text-transform: none; letter-spacing: 0; font-weight: 700; color: var(--ink); background: color-mix(in srgb, var(--slot-c, var(--ink-3)) 16%, transparent); border-radius: 4px; padding: 0 4px; margin-left: 2px; }
.ul.ent { --slot-c: var(--web); } .ul.num { --slot-c: var(--draft); }
.ul.corr { color: var(--hs); text-transform: none; letter-spacing: 0; }
.ul.pii { color: var(--hs); text-transform: none; letter-spacing: 0; }
.ul.mem { color: var(--audio); text-transform: none; letter-spacing: 0; border: 1px dashed var(--audio); border-radius: 5px; padding: 0 5px; top: 0; }
.ul.lift, .pin.lift, .spin.lift { transform: translateY(var(--lift, 14px)); }
/* self-correction: the corrected-away words struck, the cue quiet, the replacement marked */
.hw.dropped .hw-x { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--err); text-decoration-thickness: 2px; font-weight: 500; }
.hw.cue .hw-x { color: var(--ink-3); font-style: italic; font-weight: 500; }
.hw.repl .arrow { color: var(--hs); font-weight: 800; margin-right: 3px; }
/* private data */
.hw.redact .hw-x { color: var(--hs); letter-spacing: .08em; }
.hw.redact .lock { font-size: .6em; vertical-align: .25em; margin-right: 2px; letter-spacing: 0; }
/* ear word confidence: uncertain words get a wavy underline (opacity = how unsure) */
.hw.unsure .hw-x { text-decoration: underline wavy color-mix(in srgb, var(--draft) calc(var(--conf, 0) * 100%), transparent); text-underline-offset: 5px; }
/* a revision: the old word struck above, fading */
.hw-x .was { position: absolute; left: 0; top: -.95em; font-size: .5em; font-weight: 600; color: var(--err); text-decoration: line-through; white-space: nowrap; animation: wasOut 1.8s ease-out forwards; }
.hw.rev .hw-x { animation: wRev 1.1s ease-out var(--rev-age, 0ms); border-radius: 4px; }
/* pins on words: small, labels in full on hover */
.pin { font: 600 10.5px/15px var(--sans); padding: 0 6px; border-radius: 8px; white-space: nowrap; animation: pop .35s ease-out; cursor: default; }
.pin.intent { background: color-mix(in srgb, var(--audio) 18%, transparent); color: var(--audio); }
.pin.intent b { font-family: var(--mono); font-weight: 600; opacity: .8; }
.pin.act { border: 1px solid var(--line); color: var(--ink-2); background: var(--card); }
.pin.cc { color: var(--hs); background: var(--hs-soft); }
.pin.cc small { font-size: 9px; opacity: .75; }
.spin { display: inline-flex; align-items: center; gap: 2px; font: 500 10px/15px var(--mono); color: var(--web); padding: 0 5px 0 3px; border-radius: 8px;
  background: color-mix(in srgb, var(--web) 12%, transparent); animation: pop .35s ease-out; max-width: 150px; }
.spin i { font-style: normal; overflow: hidden; text-overflow: ellipsis; max-width: 0; transition: max-width .3s; }
.hw:hover .spin i { max-width: 160px; }
.hw:hover { z-index: 5; }
.spin.s-fired { animation: pop .35s ease-out, pulse 1.2s ease-in-out infinite; }
/* already on screen before this re-render: no pop again (hears.js marks them) */
.pin.still, .spin.still, .tk.still, .hc.still { animation: none; }
.spin.s-fired.still { animation: pulse 1.2s ease-in-out infinite; }
.spin.s-stale, .spin.s-cancelled { opacity: .45; text-decoration: line-through; filter: grayscale(1); }
.spin.s-used { color: #fff; background: var(--hs); }
/* after the last word: end-of-turn signals and the endpoint, with time after the last word */
.hw-tail { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; align-self: center; margin-left: 6px; padding-left: 10px; border-left: 2px dotted var(--line); min-height: 30px; }
.tk { display: inline-flex; align-items: center; gap: 4px; font: 500 11px var(--sans); color: var(--ink-3); white-space: nowrap; animation: pop .35s ease-out; }
.tk i { width: 2px; height: 14px; border-radius: 1px; background: currentColor; }
.tk b { font: 600 10.5px var(--mono); color: var(--ink-2); }
.tk.EagerEndOfTurn { color: var(--audio); }
.tk.TurnResumed { color: var(--draft); }
.tk.EndOfTurn { color: var(--ink-2); }
.tk.ep { color: var(--hs); font-weight: 700; }
.tk.bl { color: var(--bl); }
.tk.ep.heard { color: var(--ink-2); }
/* utterance chips */
.hw-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; padding-top: 6px; border-top: 1px dashed var(--line-2); min-height: 27px; }
.hw-chips:empty { visibility: hidden; }
.hc { display: inline-flex; align-items: center; gap: 5px; font: 600 12px var(--sans); color: var(--ink); background: var(--card-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; white-space: nowrap; animation: pop .3s ease-out; }
.hc small { font: 600 9.5px var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.hc.c-intent { border-color: color-mix(in srgb, var(--audio) 45%, var(--line)); }
.hc.c-fresh, .hc.c-fam { border-color: color-mix(in srgb, var(--draft) 45%, var(--line)); }
.hc.c-mem { border-style: dashed; border-color: var(--audio); color: var(--audio); }
.hc.c-priv { border-color: var(--hs); color: var(--hs); }
.hc.c-warn, .hc.c-low { border-color: var(--err); color: var(--err); }
.hc.c-arc { border-color: color-mix(in srgb, var(--spk) 35%, var(--line)); }
.minimal .transcript-card { padding: 10px 16px 10px; }
.minimal .hw-x { font-size: 27px; }
@media (max-width: 1100px) { .hw-x { font-size: 21px; } .minimal .hw-x { font-size: 22px; } }
.ul .rp { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--hs); font-weight: 600; margin-left: 4px; }
.hw-top > *, .hw-bot > * { flex: none; }

/* ---------------------------------------------------------------- router lane chip + live-data card (both views) */
.lanebox:empty { display: none; }
.lanebox { margin: 6px 0 2px; }
.lane-chip { display: inline-block; font-size: 11px; letter-spacing: .02em; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--line, rgba(127,127,127,.35)); color: var(--muted, #888); }
.lane-chip.lc-card { color: #0a7d4f; border-color: rgba(10,125,79,.45); background: rgba(10,125,79,.08); }
.lane-chip.lc-facts { color: #3b5bdb; border-color: rgba(59,91,219,.45); background: rgba(59,91,219,.08); }
.lane-chip.lc-index { color: #7048e8; border-color: rgba(112,72,232,.45); background: rgba(112,72,232,.08); }
.lane-chip.lc-web { color: #9a6700; border-color: rgba(154,103,0,.4); background: rgba(154,103,0,.07); }
.lane-card { margin-top: 6px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line, rgba(127,127,127,.3));
  background: var(--card2, rgba(127,127,127,.06)); font-size: 13px; }
.lc-h { font-weight: 600; margin-bottom: 4px; }
.lc-big { font-size: 15px; }
.lc-sub, .lc-src { color: var(--muted, #888); font-size: 11.5px; margin-top: 3px; }
.lc-src a { color: inherit; }
.lc-days { display: flex; gap: 8px; flex-wrap: wrap; }
.lc-day { display: flex; flex-direction: column; min-width: 92px; padding: 4px 8px; border-radius: 8px;
  background: rgba(127,127,127,.08); }
.lc-t { font-variant-numeric: tabular-nums; font-weight: 600; }
.lc-p { color: var(--muted, #888); font-size: 11px; }
.flag.ok { color: #0a7d4f; }
/* timeline rows served by the router's free tiers; in the details view the card shrinks to its chip + one line
   (the sources list below needs the room) */
.lane.t-card { background: #0a7d4f; } .lane.t-facts { background: #3b5bdb; } .lane.t-index { background: #7048e8; }
.bar.t-card { --c: #0a7d4f; } .bar.t-facts { --c: #3b5bdb; } .bar.t-index { --c: #7048e8; }
body:not(.minimal) .lane-card .lc-days, body:not(.minimal) .lane-card .lc-sub { display: none; }
body:not(.minimal) .lane-card { padding: 4px 8px; margin-top: 4px; font-size: 12px; }
body:not(.minimal) .lane-card .lc-h { margin-bottom: 0; }
.lg.t-card { background: #0a7d4f; } .lg.t-facts { background: #3b5bdb; } .lg.t-index { background: #7048e8; }

/* websocket dropped: shown until it reconnects (app.js reconnectBanner) */
.reconnect { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 1000; padding: 8px 16px;
  border-radius: 999px; background: var(--err, #d93025); color: #fff; font-size: 13px; font-weight: 600;
  box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.reconnect[hidden] { display: none; }

/* ---------- typed questions (TYPED_INPUT) + masked words (TAGGER_SAFETY) ---------- */
.typebar { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px 8px 6px 12px; min-width: 0; flex-wrap: wrap; }
.typebar[hidden] { display: none; }
.typebar > svg { color: var(--ink-3); flex: none; }
.typebar:focus-within { border-color: var(--hs); box-shadow: 0 0 0 3px var(--hs-soft); }
.typebar #typeBox { flex: 1 1 260px; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 500 15px var(--sans); padding: 6px 2px; }
.typebar #typeBox::placeholder { color: var(--ink-3); }
.typebar .tb-key { color: var(--ink-3); font-size: 11px; }
.typebar .tb-go { border: 1px solid var(--line); background: var(--card-2); border-radius: 8px; padding: 5px 12px; font-size: 13px; font-weight: 600; }
.typebar .tb-go:hover { border-color: var(--hs); color: var(--hs); }
.typebar .tb-mask { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-2); white-space: nowrap; cursor: pointer; }
.typebar .tb-mask input { accent-color: var(--hs); margin: 0; }
.hw.masked .hw-x { color: var(--ink-2); letter-spacing: .04em; }
.hw.masked-off .hw-x { text-decoration: line-through dotted var(--ink-3); }
.ul.mask { color: var(--ink-3); text-transform: none; letter-spacing: 0; }
.hc.c-care { border-color: var(--hs); color: var(--hs); }
.hc.c-mask { color: var(--ink-2); }

/* a plain notice that stays until dismissed (window.__hsNotice: the Mac app after it had to reload the page) */
.page-notice { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 1001; display: flex; align-items: center;
  gap: 12px; max-width: min(640px, calc(100vw - 32px)); padding: 9px 10px 9px 16px; border-radius: 12px; background: var(--card);
  color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 13.5px; line-height: 1.35; }
.page-notice[hidden] { display: none; }
.page-notice button { flex: none; border: 1px solid var(--line); background: var(--card-2); color: var(--ink); border-radius: 8px;
  padding: 4px 10px; font-size: 12.5px; font-weight: 600; cursor: pointer; }

/* ---------------------------------------------------------------- answer card (polish2): readable text, whole-line
   clamp with a fade + "more", superscript citations. Overrides the -webkit-line-clamp rules above (they could stop
   half-way through a line in WebKit and cut citation chips to "3…"). --alh = the answer's line height, --aln = lines. */
.pane .answer, .view-results .pane .answer, .minimal .pane .answer {
  --alh: 22px; --aln: 3; position: relative; display: block; -webkit-line-clamp: unset; overflow: hidden;
  font: 400 14.5px/var(--alh) var(--sans); color: var(--ink); max-height: calc(var(--alh) * var(--aln)); }
.minimal .pane .answer { --alh: 24px; --aln: 6; font-size: 15.5px; }
.view-results .pane .answer { --alh: 21px; --aln: 2; font-size: 14px; color: var(--ink); }
.minimal.view-results .pane .answer { --alh: 22px; --aln: 2; font-size: 14.5px; }
.pane .answer.open, .view-results .pane .answer.open, .minimal .pane .answer.open { max-height: none; overflow: visible; }
.pane .answer.clamped { cursor: pointer; }
.pane .answer.clamped::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--alh);
  background: linear-gradient(to bottom, color-mix(in srgb, var(--card) 0%, transparent), var(--card) 92%); pointer-events: none; }
.pane .answer > .more { position: absolute; right: 0; bottom: 0; z-index: 1; height: var(--alh); padding: 0 2px 0 18px; border: 0;
  font: 600 12.5px/var(--alh) var(--sans); color: var(--web); cursor: pointer;
  background: linear-gradient(to right, color-mix(in srgb, var(--card) 0%, transparent), var(--card) 16px); }
.pane .answer.open > .more { position: static; display: inline; height: auto; padding: 0 0 0 6px; background: none; line-height: inherit; }
.pane .answer > .more:hover { text-decoration: underline; }
.answer .cites { font-size: 0; line-height: 0; vertical-align: super; white-space: nowrap; margin-left: 1px; }
.answer .cite, .answer .cs { display: inline; font: 600 10.5px/1 var(--sans); padding: 0 1px; margin: 0; border: 0; border-radius: 3px;
  background: none; color: var(--web); text-decoration: none; cursor: pointer; vertical-align: baseline; }
.answer .cs { color: var(--ink-3); cursor: default; padding: 0; }
.answer .cite:hover { background: var(--web); color: #fff; }
.delta.hero .dl { text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 600; }

/* polish2, the default (minimal) view keeps what a judge needs: the question as heard, with the moments a search
   fired under its words. Tagger pins (intent, act, command complete), the end-of-turn ticks and the read-out chips are
   in the details view (D); safety, privacy and masking chips stay visible in both. */
.minimal .hw-top { display: none; }
.minimal .hw-line { min-height: 0; }
.minimal .hw-tail { display: none; }
.minimal .hw-chips .hc:not(.c-care):not(.c-warn):not(.c-mask):not(.c-priv) { display: none; }
.minimal .hw-chips:not(:has(.c-care, .c-warn, .c-mask, .c-priv)) { display: none; }
.ear.hint { color: var(--hs); font-weight: 700; }
