/* Watch-party TV mode (#/tv). Site chrome is hidden while body.tv-mode is set. */
body.tv-mode .site-header, body.tv-mode .site-footer, body.tv-mode .tabbar, body.tv-mode #grain { display: none !important; }
body.tv-mode .app-main { max-width: none; padding: 0; margin: 0; min-height: 0; }
body.tv-mode { overflow: hidden; }

/* One unit = 1% of a 16:9 frame's height, so the layout scales identically at 1080p, 768p, 720p. */
.tv-root { --u: min(1vh, .5625vw); --pad: calc(var(--u) * 2.4);
  position: fixed; inset: 0; z-index: 50; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: calc(var(--u) * 8) minmax(0, 1fr) calc(var(--u) * 6);
  background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: calc(var(--u) * 2);
  line-height: 1.2; font-variant-numeric: tabular-nums; }
.tv-root.tv-idle, .tv-root.tv-idle * { cursor: none !important; }
.tv-lab { font-family: var(--font-mono); font-size: calc(var(--u) * 1.5); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); white-space: nowrap; }
.tv-kicker { font-family: var(--font-mono); font-size: calc(var(--u) * 1.6); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.tv-sw { display: inline-block; width: calc(var(--u) * 1.4); height: calc(var(--u) * 1.4); border-radius: 2px; background: var(--vt); flex: none; }

/* ---------- top strip ---------- */
.tv-top { display: flex; flex-direction: column; background: var(--bg-elev); border-bottom: 1px solid var(--line-strong); min-height: 0; }
.tv-band { height: calc(var(--u) * .9); flex: none; }
.tv-top-row { flex: 1; min-height: 0; display: flex; align-items: center; gap: calc(var(--u) * 2.2); padding: 0 var(--pad); }
.tv-brand { display: flex; align-items: center; gap: calc(var(--u) * 1.1); font-family: var(--font-display); font-weight: 900; font-size: calc(var(--u) * 3.6);
  text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; line-height: 1; }
.tv-mark { height: calc(var(--u) * 4.4); width: auto; color: var(--ink); flex: none; }
.tv-tag { font-family: var(--font-mono); font-size: calc(var(--u) * 1.4); font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); border: 2px solid var(--accent); padding: calc(var(--u) * .3) calc(var(--u) * .8); white-space: nowrap; }
.tv-tag-sim { color: var(--ink); border-color: var(--ink); border-style: dashed; }
.tv-prec { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: calc(var(--u) * 1.2); }
.tv-prec-num { font-family: var(--font-display); font-size: calc(var(--u) * 3.6); font-weight: 800; line-height: 1; white-space: nowrap; }
.tv-prec-num span { color: var(--ink-soft); font-weight: 700; }
.tv-prec-pct { font-family: var(--font-mono); font-size: calc(var(--u) * 1.9); }
.tv-prec-bar { flex: 1; max-width: calc(var(--u) * 30); height: calc(var(--u) * 1.3); background: var(--bg-sunk); border: 1px solid var(--line-strong); }
.tv-prec-bar i { display: block; height: 100%; background: var(--accent); transition: width 1s var(--ease); }
.tv-sbe { display: flex; flex-direction: column; align-items: flex-end; gap: calc(var(--u) * .2); }
.tv-sbe b { font-family: var(--font-mono); font-size: calc(var(--u) * 2.1); white-space: nowrap; }
.tv-clock { font-family: var(--font-display); font-size: calc(var(--u) * 4.4); font-weight: 800; line-height: 1; min-width: 4.6em; text-align: right; white-space: nowrap; }

/* ---------- main ---------- */
.tv-main { display: grid; grid-template-columns: minmax(0, 62fr) minmax(0, 38fr); gap: calc(var(--u) * 2.2);
  padding: calc(var(--u) * 1.8) var(--pad); min-height: 0; }

/* hero: Baltimore Baby Fund */
.tv-hero { display: flex; flex-direction: column; gap: calc(var(--u) * 1.3); min-height: 0; min-width: 0; }
.tvh-head { display: flex; justify-content: space-between; align-items: flex-end; gap: calc(var(--u) * 2); }
.tvh-title { margin: calc(var(--u) * .3) 0 0; font-family: var(--font-display); font-weight: 900; font-size: calc(var(--u) * 6.4); line-height: .9; text-transform: uppercase; letter-spacing: .005em; }
.tvh-state { font-family: var(--font-mono); font-size: calc(var(--u) * 2); font-weight: 700; text-align: right; color: var(--accent); max-width: 50%; }
.tvh-wait { color: var(--ink-soft); }
.tvh-called { color: var(--accent-ink); background: var(--accent); padding: calc(var(--u) * .4) calc(var(--u) * 1); display: inline-block; }
.tvh-board { display: grid; grid-template-columns: 1fr 1fr; gap: calc(var(--u) * 3); border-top: calc(var(--u) * .5) solid var(--ink); padding-top: calc(var(--u) * 1.2); }
.tvh-side { display: flex; flex-direction: column; min-width: 0; }
.tvh-ag { align-items: flex-end; text-align: right; }
.tvh-lab { font-family: var(--font-display); font-size: calc(var(--u) * 4); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; line-height: 1; }
.tvh-for .tvh-lab { color: #a98bd6; } .tvh-ag .tvh-lab { color: #f08a45; }
.tvh-pct { font-family: var(--font-display); font-weight: 900; font-size: calc(var(--u) * 17); line-height: .82; letter-spacing: -.01em; margin-top: calc(var(--u) * .6); }
.tvh-pct small { font-size: .36em; color: var(--ink-soft); margin-left: calc(var(--u) * .3); }
.tvh-none .tvh-pct { color: var(--ink-faint); font-size: calc(var(--u) * 9); }
.tvh-votes { font-family: var(--font-mono); font-size: calc(var(--u) * 2.2); color: var(--ink-soft); margin-top: calc(var(--u) * .8); white-space: nowrap; }
.tv-root .delta-chip { font-size: calc(var(--u) * 1.8); margin-left: calc(var(--u) * .8); }
.tvh-track { position: relative; display: flex; gap: 3px; height: calc(var(--u) * 3); background: var(--bg-sunk); border: 1px solid var(--line-strong); margin-top: calc(var(--u) * 2.4); }
.tvh-track i { display: block; height: 100%; transition: width 1s var(--ease); }
.tvh-track .tf { box-shadow: inset 0 0 0 2px #a98bd6; }
.tvh-track .ta { margin-left: auto; }
.tvh-50 { position: absolute; left: 50%; top: calc(var(--u) * -1); bottom: calc(var(--u) * -1); width: 3px; background: var(--ink); transform: translateX(-1.5px); }
.tvh-50 b { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: calc(var(--u) * .2); font-family: var(--font-mono); font-size: calc(var(--u) * 1.5); color: var(--ink); white-space: nowrap; }
.tvh-meta { display: flex; justify-content: space-between; gap: calc(var(--u) * 2); font-family: var(--font-mono); font-size: calc(var(--u) * 1.8); color: var(--ink-soft); }
.tvh-meta b { color: var(--ink); }

.tvh-vt { width: 100%; border-collapse: collapse; table-layout: fixed; margin-top: calc(var(--u) * .4); }
.tvh-vt th, .tvh-vt td { padding: calc(var(--u) * .55) calc(var(--u) * 1); text-align: right; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tvh-vt thead th { border-top: calc(var(--u) * .45) solid var(--vt, transparent); border-bottom: 1px solid var(--line-strong); background: var(--bg-elev); padding-top: calc(var(--u) * .7); }
.tvh-vt thead th:first-child { background: none; border-top: none; width: 17%; }
.tvh-vtn { display: flex; align-items: center; justify-content: flex-end; gap: calc(var(--u) * .6); font-family: var(--font-display); font-weight: 800; font-size: calc(var(--u) * 2.6); text-transform: uppercase; line-height: 1; margin-bottom: calc(var(--u) * .5); }
.tvh-vt tbody th { text-align: left; font-family: var(--font-mono); font-size: calc(var(--u) * 1.6); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.tvh-vt td { font-family: var(--font-mono); font-size: calc(var(--u) * 2.2); }
.tvh-vt .r-for th { color: #a98bd6; } .tvh-vt .r-ag th { color: #f08a45; }
.tvh-vt .r-pct td b { font-family: var(--font-display); font-size: calc(var(--u) * 3.2); font-weight: 900; }
.tvh-vt .r-left td { font-size: calc(var(--u) * 1.6); line-height: 1.3; }
.tvh-vt .r-left td > * { display: block; margin-left: auto; width: fit-content; }
.tvh-vt .r-left td > * + * { margin-top: calc(var(--u) * .4); }
.tv-conf { color: var(--ink); }
.tv-conf:empty { display: none !important; }

.tv-st { display: inline-flex; align-items: center; gap: calc(var(--u) * .4); font-family: var(--font-mono); font-size: calc(var(--u) * 1.45); font-weight: 700;
  padding: calc(var(--u) * .2) calc(var(--u) * .8); border-radius: 999px; border: 2px solid var(--line-strong); white-space: nowrap; color: var(--ink); text-transform: none; letter-spacing: 0; }
.tv-st.on { border-color: #0ca30c; background: color-mix(in srgb, #0ca30c 24%, transparent); }
.tv-st.wait { border-color: #fab219; background: color-mix(in srgb, #fab219 16%, transparent); }

/* estimates: always labeled "est.", muted, dashed + hatched so they never read as a count */
.tv-est { display: inline-block; color: var(--ink-soft); font-style: italic; white-space: nowrap; border: 2px dashed var(--line-strong);
  padding: calc(var(--u) * .15) calc(var(--u) * .6);
  background: repeating-linear-gradient(135deg, transparent 0 calc(var(--u) * .5), color-mix(in srgb, var(--ink) 8%, transparent) calc(var(--u) * .5) calc(var(--u) * 1)); }
.tv-est b, .tv-estkey { font-style: normal; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.tv-estbadge { font-family: var(--font-mono); font-size: calc(var(--u) * 1.3); font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: calc(var(--u) * .2) calc(var(--u) * .8); border: 2px dashed var(--gold); color: var(--ink); white-space: nowrap; }

.tvld { margin-top: auto; }
.tvld-head { display: flex; align-items: center; gap: calc(var(--u) * 1.2); margin-bottom: calc(var(--u) * .7); }
.tvld-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: calc(var(--u) * 1.2); }
.tvld-cell { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: calc(var(--u) * .3) calc(var(--u) * .8); padding: calc(var(--u) * .7) calc(var(--u) * .9);
  border: 2px dashed var(--line-strong); background: var(--bg-elev); }
.tvld-name { white-space: nowrap; font-family: var(--font-display); font-weight: 800; font-size: calc(var(--u) * 2.3); text-transform: uppercase; }
.tvld-val { font-family: var(--font-mono); font-size: calc(var(--u) * 1.6); text-align: right; white-space: nowrap; }
.tvld-val b { font-family: var(--font-display); font-size: calc(var(--u) * 2.5); }
.tvld-dim { color: var(--ink-faint); }
.tvld-bar { grid-column: 1 / -1; position: relative; height: calc(var(--u) * .9); background: var(--bg-sunk); }
.tvld-bar i { display: block; height: 100%; }
.tvld-50 { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; background: var(--ink); }

/* ---------- rotating panel ---------- */
.tv-panel { position: relative; display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--bg-elev);
  border: 1px solid var(--line-strong); border-top: calc(var(--u) * .5) solid var(--ink); }
.tv-panel-head { display: flex; align-items: center; gap: calc(var(--u) * 1.2); padding: calc(var(--u) * 1) calc(var(--u) * 1.8); border-bottom: 1px solid var(--line); flex: none; }
.tv-card-title { font-family: var(--font-mono); font-size: calc(var(--u) * 1.7); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-right: auto; }
.tv-paused { font-family: var(--font-mono); font-size: calc(var(--u) * 1.5); font-weight: 700; color: var(--ink); border: 2px solid var(--ink); padding: calc(var(--u) * .1) calc(var(--u) * .6); white-space: nowrap; }
.tv-paused[hidden] { display: none; }
.tv-dots { display: flex; gap: calc(var(--u) * .7); flex: none; }
.tv-dots i { width: calc(var(--u) * 1.2); height: calc(var(--u) * 1.2); border-radius: 50%; border: 2px solid var(--ink-faint); }
.tv-dots i.on { background: var(--ink); border-color: var(--ink); }
.tv-dots i.hl { border-color: var(--accent); border-radius: 1px; transform: rotate(45deg); }
.tv-dots i.hl.on { background: var(--accent); }
.tv-card-wrap { flex: 1; min-height: 0; position: relative; overflow: hidden; }
.tv-card { position: absolute; inset: 0; padding: calc(var(--u) * 1.6) calc(var(--u) * 1.8); display: flex; flex-direction: column; min-height: 0; }
.tv-card-in { animation: tv-in .5s var(--ease) both; }
.tv-prog { height: calc(var(--u) * .5); background: var(--bg-sunk); flex: none; }
.tv-prog i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s linear; }
.tv-empty { margin: auto; text-align: center; display: flex; flex-direction: column; gap: calc(var(--u) * 1); color: var(--ink-soft); font-size: calc(var(--u) * 2.2); max-width: 80%; }
.tv-empty b { font-family: var(--font-display); font-size: calc(var(--u) * 4); text-transform: uppercase; color: var(--ink); }
@keyframes tv-in { from { opacity: 0; transform: translateY(calc(var(--u) * 1.5)); } to { opacity: 1; transform: none; } }
@keyframes tv-fade { from { opacity: 0; } to { opacity: 1; } }

/* scoreboards */
.tvsb { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.tvsb-head { display: flex; justify-content: space-between; align-items: baseline; gap: calc(var(--u) * 1.2); padding-bottom: calc(var(--u) * .8); border-bottom: 1px solid var(--line); }
.tvsb-state { font-family: var(--font-mono); font-size: calc(var(--u) * 1.7); font-weight: 700; color: var(--ink-soft); text-align: right; white-space: nowrap; }
.tvsb-state.called { color: var(--accent-ink); background: var(--accent); padding: calc(var(--u) * .2) calc(var(--u) * .7); }
.tvsb-rows { flex: 1; display: flex; flex-direction: column; justify-content: space-evenly; min-height: 0; }
.tvsb-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name pct" "bar votes"; column-gap: calc(var(--u) * 1.6); row-gap: calc(var(--u) * .5);
  padding: calc(var(--u) * 1) 0; border-bottom: 1px solid var(--line); }
.tvsb-row:last-child { border-bottom: none; }
.tvsb-name { grid-area: name; display: flex; flex-wrap: wrap; align-items: baseline; gap: calc(var(--u) * .3) calc(var(--u) * .9); min-width: 0; align-self: end; }
.tvsb-lead { font-family: var(--font-display); font-weight: 800; font-size: calc(var(--u) * 4.4); text-transform: uppercase; line-height: .95; box-shadow: inset 0 -.12em 0 color-mix(in srgb, var(--pc) 60%, transparent); }
.tvsb-party, .tvsb-inc { font-family: var(--font-mono); font-size: calc(var(--u) * 1.5); font-weight: 700; color: var(--ink-soft); }
.tvsb-inc { border: 1px solid var(--line-strong); padding: 0 calc(var(--u) * .4); }
.tvsb-call { color: var(--accent); font-weight: 900; font-size: calc(var(--u) * 3); }
.tvsb-mate { flex-basis: 100%; font-size: calc(var(--u) * 1.7); color: var(--ink-faint); }
.tvsb-pct { grid-area: pct; font-family: var(--font-display); font-weight: 900; font-size: calc(var(--u) * 8.4); line-height: .85; text-align: right; }
.tvsb-pct small { font-size: .42em; color: var(--ink-soft); }
.tvsb-row:not(.lead) .tvsb-pct { color: var(--ink-soft); }
.tvsb-bar { grid-area: bar; align-self: center; height: calc(var(--u) * 1.4); background: var(--bg-sunk); position: relative; }
.tvsb-bar i { display: block; height: 100%; background: var(--pc); transition: width 1s var(--ease); }
.tvsb-bar::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; background: var(--ink-faint); }
.tvsb-votes { grid-area: votes; font-family: var(--font-mono); font-size: calc(var(--u) * 1.8); color: var(--ink-soft); text-align: right; white-space: nowrap; }
.tvsb-foot { display: flex; justify-content: space-between; gap: calc(var(--u) * 1.2); padding-top: calc(var(--u) * .9); border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: calc(var(--u) * 1.6); color: var(--ink-soft); white-space: nowrap; }
.tvsb-md .tvsb-foot { font-size: calc(var(--u) * 1.45); }
.tvsb-md .tvsb-lead { font-size: calc(var(--u) * 3.6); }
.tvsb-md .tvsb-pct { font-size: calc(var(--u) * 6.4); }
.tvsb-md .tvsb-row { padding: calc(var(--u) * .7) 0; }
.tv-stack { display: flex; flex-direction: column; gap: calc(var(--u) * 2); flex: 1; min-height: 0; }

/* closest races */
.tvc { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; flex: 1; min-height: 0; justify-content: space-between; }
.tvc-row { display: grid; grid-template-columns: calc(var(--u) * 3.4) minmax(0, 1fr) auto; grid-template-areas: "rank race m" "rank cands m"; column-gap: calc(var(--u) * 1.2); row-gap: calc(var(--u) * .3);
  padding: calc(var(--u) * .8) 0; border-bottom: 1px solid var(--line); align-items: center; }
.tvc-row:last-child { border-bottom: none; }
.tvc-rank { grid-area: rank; font-family: var(--font-display); font-size: calc(var(--u) * 4); font-weight: 900; color: var(--ink-faint); line-height: 1; }
.tvc-race { grid-area: race; display: flex; align-items: baseline; gap: calc(var(--u) * .8); min-width: 0; white-space: nowrap; overflow: hidden; }
.tvc-race b { font-family: var(--font-display); font-size: calc(var(--u) * 2.7); font-weight: 800; text-transform: uppercase; line-height: 1; }
.tvc-race span { font-size: calc(var(--u) * 1.6); color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; }
.tvc-cands { grid-area: cands; display: flex; gap: calc(var(--u) * 1.6); font-size: calc(var(--u) * 2); white-space: nowrap; overflow: hidden; min-width: 0; }
.tvc-c { display: inline-flex; align-items: center; gap: calc(var(--u) * .5); min-width: 0; }
.tvc-c i { width: calc(var(--u) * 1.2); height: calc(var(--u) * 1.2); border-radius: 50%; background: var(--pc); flex: none; }
.tvc-c b { font-family: var(--font-mono); }
.tvc-b { color: var(--ink-soft); }
.tvc-m { grid-area: m; text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.tvc-m b { font-family: var(--font-display); font-size: calc(var(--u) * 4); font-weight: 900; line-height: .9; }
.tvc-m span { font-family: var(--font-mono); font-size: calc(var(--u) * 1.4); color: var(--ink-soft); white-space: nowrap; }

/* county map */
.tvm { display: flex; flex-direction: column; flex: 1; min-height: 0; gap: calc(var(--u) * 1.2); }
.tvm-map { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.tvm-map .svgmap { width: 100%; height: 100%; }
.tvm-map .svgmap svg { width: 100%; height: 100%; }
.tvm-map .svgmap-shape { cursor: inherit; }
.tvm-legend { display: flex; flex-wrap: wrap; gap: calc(var(--u) * .8) calc(var(--u) * 2.2); font-size: calc(var(--u) * 2.1); }
.tvm-leg { display: inline-flex; align-items: center; gap: calc(var(--u) * .7); white-space: nowrap; }
.tvm-leg i { width: calc(var(--u) * 2); height: calc(var(--u) * 2); border-radius: 2px; flex: none; }
.tvm-leg b { font-family: var(--font-display); font-size: calc(var(--u) * 2.8); }
.tvm-none { background: var(--line-strong); }
.tvm-foot { font-family: var(--font-mono); font-size: calc(var(--u) * 1.5); color: var(--ink-soft); }

/* statewide left to count */
.tvl { display: flex; flex-direction: column; flex: 1; min-height: 0; justify-content: space-between; }
.tvl-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name st" "counted counted" "left left"; row-gap: calc(var(--u) * .4); column-gap: calc(var(--u) * 1);
  padding: calc(var(--u) * .8) 0 calc(var(--u) * .8) calc(var(--u) * 1.4); border-left: calc(var(--u) * .6) solid var(--vt); border-bottom: 1px solid var(--line); }
.tvl-name { grid-area: name; display: flex; align-items: center; gap: calc(var(--u) * .7); font-family: var(--font-display); font-weight: 800; font-size: calc(var(--u) * 3); text-transform: uppercase; line-height: 1; }
.tvl-name .tv-sw { display: none; }
.tvl-st { grid-area: st; }
.tvl-counted { grid-area: counted; font-size: calc(var(--u) * 2); color: var(--ink-soft); }
.tvl-counted b { font-family: var(--font-display); font-size: calc(var(--u) * 3.2); color: var(--ink); font-weight: 800; }
.tvl-dim { color: var(--ink-faint); }
.tvl-left { grid-area: left; display: flex; flex-wrap: wrap; align-items: center; gap: calc(var(--u) * .6) calc(var(--u) * 1.2); font-size: calc(var(--u) * 1.8); }
.tvl-left:empty { display: none; }
.tvl-note { margin: calc(var(--u) * .6) 0 0; font-size: calc(var(--u) * 1.5); color: var(--ink-soft); }

/* projected-winner highlight (inside the panel) */
.tv-hl { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: calc(var(--u) * 2.2); min-height: 0; }
.hl-kicker { align-self: flex-start; font-family: var(--font-display); font-weight: 900; font-size: calc(var(--u) * 4.6); text-transform: uppercase; letter-spacing: .06em; line-height: 1;
  color: var(--accent-ink); background: var(--accent); padding: calc(var(--u) * .5) calc(var(--u) * 1.4); transform-origin: left center;
  animation: tv-slam .55s cubic-bezier(.2, 1.4, .4, 1) both; }
.hl-name-wrap { position: relative; padding-bottom: calc(var(--u) * 2); }
.hl-name { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; line-height: .9; transform-origin: left center;
  box-shadow: inset 0 -.1em 0 color-mix(in srgb, var(--pc) 70%, transparent); display: inline; animation: tv-scale .6s var(--ease) .9s both; }
.hl-name.xl1 { font-size: calc(var(--u) * 10); } .hl-name.xl2 { font-size: calc(var(--u) * 7.6); } .hl-name.xl3 { font-size: calc(var(--u) * 6); }
.hl-band { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--u) * 1.1); animation: tv-wipe .7s var(--ease) .8s both; }
.hl-race { font-family: var(--font-display); font-weight: 800; font-size: calc(var(--u) * 3.2); text-transform: uppercase; animation: tv-fade .5s ease 1.7s both; }
.hl-meta { font-family: var(--font-mono); font-size: calc(var(--u) * 2); color: var(--ink-soft); animation: tv-fade .5s ease 2s both; }
.hl-meta b { color: var(--ink); }
.hl-foot { font-family: var(--font-mono); font-size: calc(var(--u) * 1.4); color: var(--ink-faint); letter-spacing: .06em; text-transform: uppercase; animation: tv-fade .5s ease 2.2s both; }
@keyframes tv-slam { 0% { opacity: 0; transform: scale(2.6) rotate(-4deg); } 55% { opacity: 1; transform: scale(.94); } 100% { opacity: 1; transform: none; } }
@keyframes tv-scale { from { opacity: 0; transform: scale(.55); } to { opacity: 1; transform: none; } }
@keyframes tv-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* full-screen takeover */
.tv-takeover { position: absolute; inset: 0; z-index: 20; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: calc(var(--u) * 3); padding: calc(var(--u) * 6); animation: tv-fade .4s ease both; }
.tv-takeover[hidden] { display: none; }
.tv-takeover.to-out { animation: tv-out .6s ease both; }
@keyframes tv-out { to { opacity: 0; } }
.to-band { position: absolute; left: 0; right: 0; height: calc(var(--u) * 2.4); }
.to-band-top { top: 0; } .to-band-bot { bottom: 0; }
.to-kicker { font-family: var(--font-display); font-weight: 900; font-size: calc(var(--u) * 7); text-transform: uppercase; letter-spacing: .08em; line-height: 1;
  color: var(--accent-ink); background: var(--accent); padding: calc(var(--u) * .6) calc(var(--u) * 2.4); animation: tv-slam .6s cubic-bezier(.2, 1.4, .4, 1) .2s both; transform-origin: center; }
.to-name-wrap { position: relative; padding-bottom: calc(var(--u) * 2.6); }
.to-name { font-family: var(--font-display); font-weight: 900; font-size: calc(var(--u) * 17); line-height: .88; text-transform: uppercase; letter-spacing: -.005em;
  box-shadow: inset 0 -.08em 0 color-mix(in srgb, var(--pc) 75%, transparent); display: inline; animation: tv-scale .7s var(--ease) 1.1s both; }
.to-name.to-long { font-size: calc(var(--u) * 12); }
.to-wipe { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--u) * 1.6); animation: tv-wipe .8s var(--ease) 1s both; }
.to-sub { font-family: var(--font-display); font-weight: 800; font-size: calc(var(--u) * 6); text-transform: uppercase; letter-spacing: .03em; line-height: 1; animation: tv-fade .5s ease 1.9s both; }
.to-sub-top { animation-delay: .7s; }
.to-fig { font-family: var(--font-mono); font-size: calc(var(--u) * 3.4); color: var(--ink-soft); animation: tv-fade .5s ease 2.2s both; }
.to-for { color: #a98bd6; font-weight: 700; } .to-ag { color: #f08a45; }
.to-foot { font-family: var(--font-mono); font-size: calc(var(--u) * 1.8); color: var(--ink-faint); letter-spacing: .1em; text-transform: uppercase; animation: tv-fade .5s ease 2.4s both; }

/* bottom strip */
.tv-bottom { display: flex; align-items: center; gap: calc(var(--u) * 3); padding: 0 var(--pad); background: var(--bg-elev); border-top: 1px solid var(--line-strong); min-height: 0; }
.tvb-item { display: flex; align-items: center; gap: calc(var(--u) * 1.2); white-space: nowrap; }
.tvb-vt { display: inline-flex; align-items: center; gap: calc(var(--u) * .5); font-size: calc(var(--u) * 2); color: var(--ink-soft); }
.tvb-vt.on { color: var(--ink); }
.tvb-vt b { font-family: var(--font-mono); }
.tvb-num { font-family: var(--font-mono); font-size: calc(var(--u) * 2.2); }
.tvb-model { margin-left: auto; font-family: var(--font-mono); font-size: calc(var(--u) * 1.5); color: var(--ink-soft); text-transform: uppercase; letter-spacing: .08em; }

/* kiosk controls: visible only while the mouse is moving */
.tv-bottom-in { display: contents; }
.tv-fs { flex: none; font: 700 calc(var(--u) * 1.6) var(--font-mono); color: var(--ink);
  background: var(--bg-elev); border: 2px solid var(--line-strong); padding: calc(var(--u) * .6) calc(var(--u) * 1.2); cursor: pointer; transition: opacity .3s; }
.tv-fs kbd { font: inherit; border: 1px solid var(--ink-faint); padding: 0 .3em; margin-left: .3em; }
.tv-idle .tv-fs { opacity: 0; pointer-events: none; }

/* reduced motion: no slam / scale / slide; simple fades only (overrides app.css's global kill) */
@media (prefers-reduced-motion: reduce) {
  .tv-root .tv-card-in, .tv-root .hl-kicker, .tv-root .hl-name, .tv-root .hl-race, .tv-root .hl-meta, .tv-root .hl-foot,
  .tv-root .to-kicker, .tv-root .to-name, .tv-root .to-sub, .tv-root .to-fig, .tv-root .to-foot, .tv-root .tv-takeover {
    animation-name: tv-fade !important; animation-duration: .6s !important; animation-timing-function: ease !important; }
  .tv-root .hl-band, .tv-root .to-wipe { animation: none !important; }
  .tv-root .tv-takeover.to-out { animation-name: tv-out !important; }
}

/* Senate calls ticker (bottom strip): Decision Desk HQ calls; trimmed by JS to fit, hidden if nothing fits */
.tvb-calls { flex: 1 1 0; min-width: 0; overflow: hidden; }
.tvb-calls-in { display: flex; align-items: center; gap: calc(var(--u) * 1.4); min-width: 0; }
.tvb-call { display: inline-flex; align-items: center; gap: calc(var(--u) * .45); font-size: calc(var(--u) * 1.9); color: var(--ink); white-space: nowrap; flex: none; }
.tvb-call b { font-family: var(--font-mono); font-size: calc(var(--u) * 1.6); font-weight: 700; color: var(--ink-soft); margin-right: calc(var(--u) * .2); }
.tvb-call .tv-sw { width: calc(var(--u) * 1.2); height: calc(var(--u) * 1.2); }
.tvb-open { color: var(--ink-faint); }
.tvb-more { font-family: var(--font-mono); font-size: calc(var(--u) * 1.5); color: var(--ink-soft); }
.tvb-calls + .tvb-model { margin-left: 0; }

/* DDHQ Senate takeover */
.to-kicker-ddhq { font-size: calc(var(--u) * 5.6); }
.to-party { display: inline-flex; align-items: center; gap: calc(var(--u) * 1); color: var(--ink); font-weight: 700; }
.to-party .tv-sw { width: calc(var(--u) * 2.6); height: calc(var(--u) * 2.6); }
