/* Nevada Big Board: dark broadcast board, sized for a landscape wall screen first. */
:root {
  --bg: #060c1a;
  --bg-2: #0a1428;
  --panel: #0d1a33;
  --panel-2: #12234a;
  --panel-3: #183060;
  --line: rgba(150, 175, 230, 0.14);
  --line-2: rgba(150, 175, 230, 0.26);
  --ink: #f3f6ff;
  --ink-2: #b9c4de;
  --ink-3: #7d8db0;
  --focus: #ffd34d;
  --accent: #ffd34d;

  --dem: #2f6fe4;
  --rep: #e0393e;
  --lib: #e2b73a;
  --iap: #9b6bd6;
  --npp: #3fb8a8;
  --other: #8a94ab;
  --yes: #36c98e;
  --no: #ef6a4c;
  --neutral: #3a4560;
  --nodata: #1a2644;
  --nodata-line: #2b3a60;

  --radius: 10px;
  --gap: 14px;
  --font: "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-num: "Barlow Condensed", "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: radial-gradient(1200px 700px at 30% -10%, #12285a 0%, transparent 60%), var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.35;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }

#sim-banner {
  position: sticky; top: 0; z-index: 50;
  background: repeating-linear-gradient(135deg, #5a3b00 0 14px, #6b4700 14px 28px);
  color: #ffe9b0; text-align: center; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; font-size: 14px; padding: 6px 12px;
}

/* ---------- masthead ---------- */
.masthead {
  display: flex; align-items: center; gap: 20px;
  padding: 12px 22px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 20, 40, .9), rgba(6, 12, 26, .6));
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 26px; height: 34px; background: var(--ink);
  clip-path: polygon(0 0, 62% 0, 62% 46%, 100% 74%, 100% 100%, 70% 100%, 0 62%);
}
.brand-text { font-size: 24px; letter-spacing: .04em; text-transform: uppercase; font-weight: 500; }
.brand-text strong { font-weight: 700; }
.election { color: var(--ink-2); font-size: 17px; }
.live { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--ink-2); }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); }
.live.is-live .live-dot { background: #ff3b3b; box-shadow: 0 0 0 0 rgba(255, 59, 59, .6); animation: pulse 2s infinite; }
.live.is-stale .live-dot { background: var(--accent); }
.live.is-error .live-dot { background: var(--rep); }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(255, 59, 59, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 59, 59, 0); } }

/* ---------- tabs ---------- */
.tabs {
  display: flex; gap: 4px; padding: 8px 18px 0; overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; text-decoration: none; padding: 9px 14px 10px; border-radius: 8px 8px 0 0;
  color: var(--ink-2); font-weight: 600; font-size: 16px; letter-spacing: .02em; white-space: nowrap;
  border-bottom: 3px solid transparent; display: flex; align-items: center; gap: 7px;
}
.tab:hover { color: var(--ink); background: rgba(255, 255, 255, .04); }
.tab[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); background: rgba(255, 255, 255, .06); }
.tab .pip { width: 8px; height: 8px; border-radius: 50%; background: var(--nodata-line); }
.tab-sep { flex: none; width: 1px; background: var(--line); margin: 8px 6px 10px; }

/* ---------- board layout ---------- */
main { padding: var(--gap) 18px; }
.board {
  display: grid; gap: var(--gap);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  align-items: start;
}
.board.no-map { grid-template-columns: minmax(0, 1fr); }
.right { display: grid; gap: var(--gap); align-content: start; min-width: 0; }
.panel {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius);
}
.panel-pad { padding: 16px 18px; }
.panel h2, .panel h3 { margin: 0; }
.eyebrow { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }

/* ---------- map ---------- */
.map-panel { position: relative; padding: 12px 14px 14px; }
.map-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.map-tools .eyebrow { margin-right: auto; }
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.seg button {
  border: 0; background: transparent; padding: 5px 11px; border-radius: 6px; cursor: pointer;
  color: var(--ink-2); font-weight: 600; font-size: 14px;
}
.seg button[aria-pressed="true"] { background: var(--panel-3); color: var(--ink); }
.seg button:disabled { opacity: .4; cursor: default; }
.map-wrap { position: relative; }
.map-svg { display: block; width: 100%; height: auto; max-height: calc(100vh - 250px); touch-action: manipulation; }
.map-svg .county { stroke: var(--bg); stroke-width: 1.6; stroke-linejoin: round; cursor: pointer; transition: fill .5s ease; }
.map-svg .county.is-out { fill: #0f1830 !important; cursor: default; }
.map-svg .county:hover:not(.is-out) { filter: brightness(1.15); }
.map-svg .county.is-selected { stroke: var(--ink); stroke-width: 3.2; }
.map-svg .outline { fill: none; stroke: rgba(220, 230, 255, .35); stroke-width: 1.4; pointer-events: none; }
.map-svg .lbl { pointer-events: none; text-anchor: middle; font-family: var(--font); paint-order: stroke; stroke: rgba(6, 12, 26, .75); stroke-width: 3.5px; stroke-linejoin: round; }
/* label font sizes are set inline by board.js so they stay constant on screen when the map zooms */
.map-svg .lbl-name { fill: var(--ink); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.map-svg .lbl-val { fill: var(--ink); font-weight: 700; font-family: var(--font-num); }
.map-svg .lbl-sub { fill: var(--ink-2); font-weight: 500; }
.map-svg .callout-line { stroke: rgba(220, 230, 255, .5); stroke-width: 1; fill: none; pointer-events: none; }
.map-svg .lbl.left { text-anchor: end; }
.zoom-reset {
  position: absolute; top: 8px; left: 8px; border: 1px solid var(--line-2); background: rgba(10, 20, 40, .85);
  border-radius: 8px; padding: 6px 10px; cursor: pointer; font-weight: 600; font-size: 14px;
}
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.legend-row { display: flex; align-items: center; gap: 6px; }
.legend-swatches { display: inline-flex; gap: 2px; }
.legend-swatches i { width: 22px; height: 12px; border-radius: 2px; display: inline-block; }
.legend-scale { display: inline-flex; gap: 2px; align-items: center; }
.legend-ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); }
.legend-note { color: var(--ink-3); font-size: 12px; width: 100%; }

/* ---------- county card (Kornacki zoom) ---------- */
.county-card {
  /* bottom-left: the empty corner southwest of the state, so the card never hides Clark */
  position: absolute; left: 12px; bottom: 12px; width: min(330px, 48%); max-height: calc(100% - 24px); overflow-y: auto;
  background: rgba(10, 20, 42, .96); border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55); padding: 14px 16px; backdrop-filter: blur(6px);
}
.county-card.on-right { left: auto; right: 12px; }
.county-card h3 { font-size: 24px; font-weight: 700; letter-spacing: .02em; line-height: 1.05; }
.county-card .close {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 6px; border: 0;
  background: transparent; color: var(--ink-2); cursor: pointer; font-size: 20px; line-height: 1;
}
.county-card .close:hover { background: rgba(255, 255, 255, .08); color: var(--ink); }
.cc-meta { color: var(--ink-2); font-size: 14px; margin: 2px 0 10px; }
.cc-section { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; }
.county-card .zoom { position: absolute; top: 9px; right: 44px; padding: 4px 10px; font-size: 13px; }
.cc-section .eyebrow { font-size: 11.5px; margin-bottom: 6px; }
.cc-row { display: grid; grid-template-columns: 10px 1fr auto auto; gap: 8px; align-items: center; font-size: 15px; padding: 3px 0; }
.cc-row .sw { width: 10px; height: 10px; border-radius: 2px; }
.cc-row .num { font-variant-numeric: tabular-nums; color: var(--ink-2); text-align: right; }
.cc-row .pct { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 52px; text-align: right; }
.cc-row.win .nm::after { content: " ✓"; color: var(--ink); }
.btn {
  border: 1px solid var(--line-2); background: var(--panel-2); border-radius: 8px; padding: 7px 12px;
  cursor: pointer; font-weight: 600; font-size: 14px;
}
.btn:hover { background: var(--panel-3); }
.kv { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 2px 0; color: var(--ink-2); }
.kv b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

/* stacked share bar (early vote, ballot type) */
.sharebar { display: flex; gap: 2px; height: 12px; border-radius: 3px; overflow: hidden; margin: 4px 0 2px; }
.sharebar i { display: block; height: 100%; min-width: 2px; }
.sharebar-legend { display: flex; gap: 10px; font-size: 12.5px; color: var(--ink-2); flex-wrap: wrap; }
.sharebar-legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; background: var(--c); }

/* ---------- topline ---------- */
.race-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.race-head h1 { margin: 0; font-size: 34px; line-height: 1.05; font-weight: 700; letter-spacing: .01em; }
.race-sub { color: var(--ink-2); font-size: 15px; margin-top: 4px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; justify-content: flex-end; }
.chip {
  border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 10px; font-size: 13px; font-weight: 600;
  color: var(--ink-2); white-space: nowrap;
}
.chip.call { border-color: transparent; background: var(--ink); color: var(--bg); }
.chip.test { border-color: var(--accent); color: var(--accent); }

.cands { display: grid; gap: 8px; }
.cand {
  display: grid; grid-template-columns: 6px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  background: rgba(255, 255, 255, .03); border-radius: 8px; padding: 8px 14px 8px 0; position: relative; overflow: hidden;
}
.cand .bar-bg { position: absolute; inset: 0 auto 0 6px; opacity: .2; transition: width .8s ease; }
.cand .stripe { align-self: stretch; }
.cand-name { position: relative; font-size: 24px; font-weight: 700; line-height: 1.1; }
.cand-party { position: relative; font-size: 14px; color: var(--ink-2); font-weight: 500; }
.cand-nums { position: relative; text-align: right; }
.cand-pct { font-family: var(--font-num); font-size: 40px; font-weight: 700; line-height: 1; }
.cand-votes { font-size: 15px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cand.lead .cand-name { color: var(--ink); }
.cand.trail .cand-pct { color: var(--ink-2); }
.win-badge {
  display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; vertical-align: middle;
  background: var(--ink); color: var(--bg); border-radius: 4px; padding: 1px 7px; font-size: 13px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
}
.cands.compact .cand-name { font-size: 18px; }
.cands.compact .cand-pct { font-size: 26px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; margin-top: 12px; border-radius: 8px; overflow: hidden; }
.stat { background: rgba(255, 255, 255, .04); padding: 10px 12px; }
.stat .eyebrow { font-size: 11.5px; }
.stat-val { font-family: var(--font-num); font-size: 30px; font-weight: 700; line-height: 1.05; margin-top: 2px; }
.stat-sub { font-size: 13px; color: var(--ink-2); }

/* path to victory */
.path { margin-top: 12px; padding: 14px 16px; border-radius: 8px; background: rgba(255, 255, 255, .035); border: 1px solid var(--line); }
.path-head { display: flex; align-items: center; gap: 10px; }
.path-head .eyebrow { margin-right: auto; }
.path-line { font-size: 21px; font-weight: 600; margin-top: 6px; line-height: 1.25; }
.path-line b { font-family: var(--font-num); font-size: 26px; }
.path-note { color: var(--ink-3); font-size: 13px; margin-top: 6px; }
.whatif-out { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }

/* county table */
.table-wrap { margin-top: var(--gap); overflow-x: auto; }
table.ct { width: 100%; border-collapse: collapse; font-size: 15px; }
.ct th {
  text-align: right; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3); padding: 8px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; cursor: pointer; user-select: none;
}
.ct th:first-child, .ct td:first-child { text-align: left; }
.ct th[aria-sort="descending"]::after { content: " ▾"; }
.ct th[aria-sort="ascending"]::after { content: " ▴"; }
.ct td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ct tbody tr { cursor: pointer; }
.ct tbody tr:hover { background: rgba(255, 255, 255, .04); }
.ct tbody tr.is-selected { background: rgba(255, 255, 255, .08); box-shadow: inset 3px 0 0 var(--ink); }
.ct .county-name { font-weight: 600; }
.ct .mchip { display: inline-block; min-width: 58px; padding: 1px 6px; border-radius: 4px; text-align: center; font-weight: 700; color: #fff; }
.ct .muted { color: var(--ink-3); }
.ct input[type="range"] { width: 120px; vertical-align: middle; accent-color: var(--ink); }
.ct .split-lbl { display: inline-block; width: 70px; text-align: right; font-size: 13px; color: var(--ink-2); }
.ct tfoot td { font-weight: 700; border-top: 1px solid var(--line-2); border-bottom: 0; }

/* ballot-type context */
.methods { margin-top: var(--gap); }
.methods-grid { display: grid; gap: 10px; margin-top: 10px; }
.method-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 90px; gap: 10px; align-items: center; font-size: 14px; }
.method-row .lbl { color: var(--ink-2); }
.method-row .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.methods select {
  background: var(--bg); color: var(--ink); border: 1px solid var(--line-2); border-radius: 6px; padding: 4px 8px; font: inherit; font-size: 14px;
}

/* pre-results */
.pre {
  margin-top: 12px; padding: 14px 16px; border-radius: 8px; border: 1px dashed var(--line-2); color: var(--ink-2); font-size: 16px;
}
.pre strong { color: var(--ink); }
.countdown { font-family: var(--font-num); font-size: 44px; font-weight: 700; color: var(--ink); line-height: 1; margin: 4px 0; }

/* ---------- legislature ---------- */
.leg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.chamber h2 { font-size: 30px; }
.seatbar-wrap { position: relative; margin: 26px 0 8px; }
.seatbar { display: flex; gap: 2px; height: 46px; }
.seatbar .seat { flex: 1; border-radius: 3px; }
.seatbar .seat.lead { opacity: .55; }
.seat-marker { position: absolute; top: -20px; bottom: -6px; border-left: 2px solid var(--ink); }
.seat-marker span { position: absolute; top: -2px; left: 4px; font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.seat-marker.super { border-left-style: solid; border-left-color: var(--ink-3); }
.seat-totals { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; }
.seat-total .big { font-family: var(--font-num); font-size: 48px; font-weight: 700; line-height: 1; }
.seat-total.right { text-align: right; }
.seat-total .sub { color: var(--ink-2); font-size: 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 4px; margin-top: 14px; }
.tile {
  aspect-ratio: 1.15; border-radius: 6px; display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-decoration: none; background: var(--nodata); border: 1px solid var(--nodata-line); font-weight: 700; font-size: 18px; position: relative;
}
.tile small { font-size: 11px; font-weight: 600; color: rgba(255, 255, 255, .8); }
.tile.won::after { content: "✓"; position: absolute; top: 2px; right: 5px; font-size: 12px; }
.tile.holdover { opacity: .45; border-style: dashed; }
.tile:hover { filter: brightness(1.2); }

/* ---------- all races ---------- */
.races-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: var(--gap); }
.races-tools input[type="search"] {
  flex: 1 1 280px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 8px; color: var(--ink);
  padding: 10px 14px; font: inherit; font-size: 17px;
}
.race-group h2 { font-size: 15px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin: 18px 0 8px; }
.race-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.race-card { display: block; text-decoration: none; padding: 12px 14px; }
.race-card:hover { border-color: var(--line-2); background: var(--panel-2); }
.race-card h3 { font-size: 17px; font-weight: 600; margin: 0 0 6px; }
.rc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; font-size: 14px; color: var(--ink-2); }
.rc-row .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-row.win { color: var(--ink); font-weight: 600; }
.rc-row.win .nm::after { content: " ✓"; }
.rc-bar { display: flex; gap: 2px; height: 5px; border-radius: 3px; overflow: hidden; margin: 2px 0 6px; background: var(--nodata); }
.rc-meta { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }

/* ---------- ticker ---------- */
.ticker {
  position: sticky; bottom: 0; z-index: 20; display: flex; align-items: stretch; gap: 12px;
  background: rgba(6, 12, 26, .96); border-top: 1px solid var(--line-2); padding: 8px 18px; backdrop-filter: blur(6px);
}
.ticker-head { display: flex; flex-direction: column; gap: 6px; justify-content: center; flex: none; }
.ticker-label { font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--bg); background: var(--accent); padding: 2px 8px; border-radius: 4px; text-align: center; font-size: 14px; }
.ticker .seg button { font-size: 12.5px; padding: 3px 8px; }
.ticker-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; overflow-x: auto; flex: 1; scrollbar-width: thin; }
.drop {
  flex: none; min-width: 250px; max-width: 320px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 11px; font-size: 14px; cursor: pointer;
}
.drop:hover { border-color: var(--line-2); }
.drop.is-new { animation: dropin 1.2s ease; border-color: var(--accent); }
@keyframes dropin { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.drop-top { display: flex; gap: 8px; align-items: baseline; }
.drop-top .t { color: var(--ink-3); font-size: 12.5px; }
.drop-top .r { font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.drop-top .n { margin-left: auto; font-family: var(--font-num); font-weight: 700; font-size: 18px; }
.drop-race { color: var(--ink-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drop-split { color: var(--ink-2); font-size: 13.5px; }
.drop-split b { color: var(--ink); }
.ticker-empty { color: var(--ink-3); font-size: 14px; align-self: center; }

/* ---------- tooltip & footer ---------- */
.tip {
  position: fixed; z-index: 60; pointer-events: none; background: rgba(8, 16, 34, .97); border: 1px solid var(--line-2);
  border-radius: 8px; padding: 8px 11px; font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); min-width: 180px;
}
.tip h4 { margin: 0 0 4px; font-size: 16px; }
.tip .cc-row { font-size: 14px; padding: 1px 0; }
.foot { color: var(--ink-3); font-size: 13px; padding: 10px 18px 16px; }
.foot a { color: var(--ink-2); }

.loading { color: var(--ink-3); padding: 40px; text-align: center; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  /* one column: headline numbers first, then the map, then the county table */
  .board { display: flex; flex-direction: column; align-items: stretch; }
  .board > * { min-width: 0; }
  .right { display: contents; }
  #topline { order: 1; } .map-panel { order: 2; } #county-table { order: 3; } #methods { order: 4; }
  .map-svg { max-height: 70vh; }
  .leg { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  main { padding: 10px 16px; }
  .masthead { flex-wrap: wrap; gap: 4px 12px; padding: 10px 16px; }
  .election { order: 3; width: 100%; font-size: 14px; }
  .brand-text { font-size: 20px; }
  .tabs { padding: 6px 10px 0; }
  .race-head { flex-direction: column; }
  .chips { margin-left: 0; justify-content: flex-start; }
  .race-head h1 { font-size: 28px; }
  .cand-name { font-size: 19px; }
  .cand-pct { font-size: 32px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .county-card { position: static; width: 100%; margin-top: 10px; box-shadow: none; max-height: none; }
  .ticker { position: static; flex-direction: column; }
  .ticker-head { flex-direction: row; align-items: center; }
  .ticker-list { flex-direction: column; }
  .drop { max-width: none; min-width: 0; }
  .method-row { grid-template-columns: 90px minmax(0, 1fr) 70px; }
  .race-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- telestrator ---------- */
.ink { position: absolute; top: 0; left: 0; z-index: 40; pointer-events: none; }
body.inking .ink { pointer-events: auto; cursor: crosshair; touch-action: none; }
body.inking { user-select: none; -webkit-user-select: none; }
.ink-bar { position: relative; flex: none; display: flex; align-items: center; }
body > .ink-bar { position: fixed; right: 18px; bottom: 18px; z-index: 45; }
body.inking .ticker { z-index: 41; }   /* keep the pen controls above the ink canvas */
.ink-toggle {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line-2); border-radius: 999px;
  background: rgba(13, 26, 51, .94); color: var(--ink); padding: 10px 16px; font-weight: 700; font-size: 16px;
  cursor: pointer; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); min-height: 44px;
}
.ink-toggle[aria-pressed="true"] { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.ink-tools {
  position: absolute; right: 0; bottom: calc(100% + 14px); white-space: nowrap;
  display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 999px;
  background: rgba(13, 26, 51, .96); border: 1px solid var(--line-2); box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}
.ink-pen {
  width: 32px; height: 32px; border-radius: 50%; border: 3px solid transparent; background: var(--pen); cursor: pointer;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .35);
}
.ink-pen[aria-pressed="true"] { border-color: var(--ink); outline: 2px solid var(--bg); outline-offset: -5px; }
.ink-btn {
  border: 0; background: transparent; color: var(--ink-2); font-weight: 600; font-size: 14px; padding: 7px 10px;
  border-radius: 999px; cursor: pointer; min-height: 36px;
}
.ink-btn:hover { color: var(--ink); background: rgba(255, 255, 255, .06); }
.ink-btn[aria-pressed="true"] { color: var(--ink); background: var(--panel-3); }
.ink-sep { width: 1px; height: 22px; background: var(--line-2); }
@media (max-width: 640px) {
  .ticker .ink-bar { position: fixed; right: 12px; bottom: 12px; z-index: 45; }
  .ink-tools { flex-wrap: wrap; justify-content: flex-end; border-radius: 14px; width: max-content; max-width: calc(100vw - 24px); white-space: normal; }
}
