:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI Variable Text", "Segoe UI", "Helvetica Neue", sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", sans-serif;

  --bg: #ffffff;
  --fg: #1d1d1f;
  --fg2: #424245;
  --muted: #86868b;
  --line: #e8e8ed;
  --soft: #f5f5f7;
  --accent: #0071e3;
  --live: #e3204b;
  --live-bg: #fde9ee;
  --soon: #b8590b;
  --soon-bg: #fdf1e5;
  --up: #1a8245;
  --down: #c9302c;

  --space: #f2f3f6;
  --ocean: #dfe6ef;
  --ocean-edge: #ccd6e3;
  --land: #fbfbfc;
  --land-line: #d2d8e0;
  --land-dim: #eef0f3;
  --tracked-dim: #d5e0ee;
  --grat: rgba(70, 90, 120, .10);
  --tracked: #b7cdea;
  --tracked-soon: #f5c89f;
  --tracked-live: #f3a0b3;
  --hover: #7aa7e3;
  --uncalled: #d8dce3;
  --hatch-bg: #eef0f3;
  --hatch-line: #c4cad3;
  --shade-mid: rgba(30, 45, 70, 0);
  --shade-lo: rgba(30, 45, 70, .16);
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .08);

  --panel-w: clamp(400px, 34vw, 540px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101012;
    --fg: #f5f5f7;
    --fg2: #d1d1d6;
    --muted: #8e8e93;
    --line: #2a2a2e;
    --soft: #1c1c1f;
    --accent: #2997ff;
    --live: #ff4d6d;
    --live-bg: #3b1520;
    --soon: #ffa45c;
    --soon-bg: #3a2414;
    --up: #45c27a;
    --down: #ff6a5f;

    --space: #050506;
    --ocean: #0d1520;
    --ocean-edge: #1b2737;
    --land: #2a2e36;
    --land-line: #14181e;
    --land-dim: #1d2026;
    --tracked-dim: #26354a;
    --grat: rgba(255, 255, 255, .045);
    --tracked: #2e4c78;
    --tracked-soon: #7a4523;
    --tracked-live: #7f2640;
    --hover: #3f80d8;
    --uncalled: #3a3e46;
    --hatch-bg: #23262c;
    --hatch-line: #343943;
    --shade-mid: rgba(0, 0, 0, 0);
    --shade-lo: rgba(0, 0, 0, .45);
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 24px rgba(0, 0, 0, .4);
  }
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font: 400 15px/1.47 var(--font);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, p, dl, dd, figure, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.muted { color: var(--muted); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; vertical-align: -1px; }
.sw.empty { background: transparent; box-shadow: inset 0 0 0 1px var(--muted); }
.sw.hatch { background: repeating-linear-gradient(45deg, var(--hatch-line) 0 2px, var(--hatch-bg) 2px 5px); }

.live-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .3; } }

/* ---------- shell ---------- */

.shell { flex: 1; min-height: 0; display: grid; grid-template-columns: var(--panel-w) minmax(0, 1fr); }

.panel {
  overflow-y: auto;
  overscroll-behavior: contain;
  border-right: 1px solid var(--line);
  background: var(--bg);
  scrollbar-gutter: stable;
}

/* Scroll position as a slim pill: no track, a small rounded thumb. */
.panel::-webkit-scrollbar, html::-webkit-scrollbar { width: 10px; }
.panel::-webkit-scrollbar-track, html::-webkit-scrollbar-track { background: transparent; }
.panel::-webkit-scrollbar-thumb, html::-webkit-scrollbar-thumb {
  min-height: 36px;
  border: 3px solid transparent;
  border-radius: 999px;
  background: color-mix(in srgb, var(--fg) 28%, transparent) padding-box;
}
.panel::-webkit-scrollbar-thumb:hover, html::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--fg) 45%, transparent); }
@supports not selector(::-webkit-scrollbar) {
  .panel, html { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--fg) 25%, transparent) transparent; }
}
.panel.enter > * { animation: rise .35s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

.home, .country { padding: 36px 32px 40px; }

.globe-pane { position: relative; overflow: hidden; background: var(--space); }
canvas.globe { position: absolute; inset: 0; display: block; cursor: grab; touch-action: none; user-select: none; }
canvas.globe.pointing { cursor: pointer; }
canvas.globe.grabbing { cursor: grabbing; }

.markers { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.marker { position: absolute; left: 0; top: 0; width: 0; height: 0; will-change: transform; }
.marker .dot, .marker .ring { position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%; }
.marker .dot { background: var(--accent); box-shadow: 0 0 0 1.6px var(--bg); }
.marker .ring { border: 1.5px solid var(--live); opacity: 0; }
.marker[data-status="soon"] .dot, .marker[data-status="today"] .dot { background: var(--soon); }
.marker[data-status="live"] .dot { background: var(--live); }
.marker[data-status="live"] .ring { animation: ring 1.8s ease-out infinite; }
@keyframes ring { 0% { transform: scale(.8); opacity: .9; } 100% { transform: scale(3.4); opacity: 0; } }

.tooltip {
  position: absolute; z-index: 3; pointer-events: none;
  min-width: 140px; max-width: 260px;
  padding: 9px 12px;
  border-radius: 9px;
  background: var(--bg);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  font-size: 13px; line-height: 1.4;
  transform: translate(-50%, calc(-100% - 14px));
}
.tooltip.below { transform: translate(-50%, 18px); }
.tooltip[hidden] { display: none; }
.tooltip strong { display: block; font-size: 14px; font-weight: 600; }
.tooltip span { display: block; color: var(--fg2); }
.tooltip em { display: block; margin-top: 4px; font-style: normal; color: var(--accent); font-size: 12px; }
.tooltip .tip-muted { color: var(--muted); }
.tooltip .tip-row { display: flex; align-items: center; gap: 7px; margin-top: 3px; font-size: 12.5px; }
.tooltip .tip-row b { margin-left: auto; padding-left: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }

.globe-hint {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  padding: 5px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  font-size: 12.5px; color: var(--muted);
  pointer-events: none; transition: opacity .6s;
}
.globe-hint.gone { opacity: 0; }

.globe-legend {
  position: absolute; left: 16px; bottom: 16px; max-width: calc(100% - 88px);
  display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center;
  padding: 8px 12px; border-radius: 9px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  font-size: 12.5px; color: var(--fg2);
  pointer-events: none;
}
.globe-legend:empty { display: none; }
.globe-legend span { display: inline-flex; align-items: center; gap: 6px; }
.globe-legend .k { width: 11px; height: 11px; border-radius: 3px; background: var(--tracked); }
.globe-legend .k.soon { background: var(--tracked-soon); }
.globe-legend .k.live { background: var(--tracked-live); }
.globe-legend .k.uncalled { background: var(--uncalled); }
.globe-legend .k.not-up { background: repeating-linear-gradient(45deg, var(--hatch-line) 0 2px, var(--hatch-bg) 2px 5px); }

.globe-controls {
  position: absolute; right: 16px; bottom: 16px;
  display: flex; flex-direction: column;
  border-radius: 9px; overflow: hidden;
  background: var(--bg);
  box-shadow: var(--shadow);
}
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; color: var(--fg2); }
.icon-btn + .icon-btn { border-top: 1px solid var(--line); }
.icon-btn:hover { background: var(--soft); color: var(--fg); }
.icon-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }

/* ---------- shared panel pieces ---------- */

.eyebrow { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }

.block { margin-top: 40px; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.block-head .muted { font-size: 13px; }
.block-title { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.sub-title { margin-top: 24px; font-size: 13px; font-weight: 600; color: var(--muted); }
.sub-title.row { display: flex; justify-content: space-between; align-items: center; }
.sub-title h3 { font-size: inherit; font-weight: inherit; }
.note { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.prose { margin-top: 12px; color: var(--fg2); font-size: 15px; line-height: 1.55; }
.fineprint { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.loading, .error { padding: 48px 32px; color: var(--muted); }

.pill {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 4px 10px; border-radius: 999px;
  background: var(--soft); color: var(--fg2);
  font-size: 12.5px; font-weight: 600;
}
.pill.live { background: var(--live); color: #fff; }
.pill.soon { background: var(--soon-bg); color: var(--soon); }

.tag { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--up); }

.btn {
  padding: 8px 16px; border-radius: 8px; white-space: nowrap;
  background: var(--fg); color: var(--bg);
  font-size: 14px; font-weight: 500;
}
.btn:hover { opacity: .85; }
.link-btn { margin-top: 10px; color: var(--accent); font-size: 13.5px; }
.link-btn:hover { text-decoration: underline; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 12px 20px; margin-top: 18px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { margin-top: 1px; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.facts.mini { margin-top: 14px; padding: 10px 0; }
.facts.mini dd { font-size: 14px; }

/* ---------- home ---------- */

.intro h1 { font: 600 38px/1.08 var(--font-display); letter-spacing: -0.035em; }


.feature { display: block; margin-top: 28px; }
.feature .count { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
.feature .num { font: 600 64px/1 var(--font-display); letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.feature .unit { font-size: 20px; font-weight: 500; color: var(--muted); }
.feature .what { margin-top: 12px; font-size: 17px; font-weight: 600; letter-spacing: -0.015em; }
.feature .when { margin-top: 2px; color: var(--muted); font-size: 14px; }
.feature:hover .what { color: var(--accent); }
.feature.is-live .eyebrow, .feature.is-live .num { color: var(--live); }

.calendar { margin-top: 10px; }
.calendar a { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 14px; padding: 9px 8px; margin: 0 -8px; border-radius: 8px; }
.calendar a:hover { background: var(--soft); }
.calendar time { display: flex; flex-direction: column; align-items: center; line-height: 1.1; padding: 5px 0; border-radius: 8px; background: var(--soft); }
.calendar a:hover time { background: var(--bg); }
.calendar .mo { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--live); }
.calendar .dy { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.calendar time.tentative .mo { color: var(--muted); }
.cal-main b { display: block; font-weight: 600; font-size: 14.5px; }
.cal-main span { display: block; font-size: 13px; color: var(--muted); }
.cal-when { font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

.roster { margin-top: 10px; }
.roster a { display: grid; grid-template-columns: 1fr auto; column-gap: 16px; align-items: center; padding: 10px 8px; margin: 0 -8px; border-radius: 8px; }
.roster a:hover, .roster a.hl { background: var(--soft); }
.r-name { font-weight: 600; font-size: 14.5px; }
.r-sub { grid-column: 1; font-size: 13px; color: var(--muted); }
.r-status { grid-column: 2; grid-row: 1 / span 2; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.r-status.live { color: var(--live); font-weight: 600; }
.r-status.soon, .r-status.today { color: var(--soon); font-weight: 600; }

.recent { margin-top: 10px; }
.recent li.muted { padding: 10px 0; font-size: 13.5px; }
.recent a { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.recent li:last-child a { border-bottom: 0; }
.recent a:hover b { color: var(--accent); }
.rc-main b { display: block; font-weight: 600; font-size: 14.5px; }
.rc-main span { font-size: 13px; color: var(--muted); }
.rc-win { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--fg2); text-align: right; }

/* ---------- country ---------- */

.crumb { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-size: 14px; }
.crumb svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.crumb:hover { text-decoration: underline; }

.c-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-top: 14px; }
.c-head h1 { font: 600 40px/1.05 var(--font-display); letter-spacing: -0.035em; }
.c-head .sub { margin-top: 6px; color: var(--muted); font-size: 15px; }
.head-status { padding-top: 8px; }

.segmented { display: flex; margin-top: 26px; padding: 3px; border-radius: 9px; background: var(--soft); }
.segmented[hidden] { display: none; }
.segmented button {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 7px 10px; border-radius: 7px;
  font-size: 13.5px; font-weight: 500; color: var(--muted); white-space: nowrap;
}
.segmented button.on { background: var(--bg); color: var(--fg); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.segmented .live-dot { color: var(--live); }

.years { position: relative; display: flex; gap: 2px; margin: 10px -4px 0; padding: 0 4px 6px; overflow-x: auto; }
.years[hidden] { display: none; }
.years button {
  flex: none; display: grid; justify-items: center; gap: 5px;
  padding: 6px 7px; border-radius: 7px;
  font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.years button i { width: 100%; min-width: 16px; height: 3px; border-radius: 2px; opacity: .55; }
.years button:hover { color: var(--fg); background: var(--soft); }
.years button.on { color: var(--fg); font-weight: 600; background: var(--soft); }
.years button.on i { opacity: 1; }
.years::-webkit-scrollbar { height: 6px; }
.years::-webkit-scrollbar-track { background: transparent; }
.years::-webkit-scrollbar-thumb { border-radius: 999px; background: color-mix(in srgb, var(--fg) 22%, transparent); }

.el { margin-top: 30px; }
.el-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.el-head h2 { font: 600 24px/1.2 var(--font-display); letter-spacing: -0.025em; }
.el-head h2 span { color: var(--muted); font-weight: 500; }
.el-system { margin-top: 3px; font-size: 13.5px; color: var(--muted); }

.progress { height: 3px; margin-top: -1px; background: var(--line); }
.progress i { display: block; height: 100%; background: var(--live); transition: width .4s; }

.rounds { display: flex; gap: 8px; margin-top: 20px; }
.rounds button { flex: 1; padding: 8px 12px; border-radius: 8px; text-align: left; font-size: 14px; font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.rounds button small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.rounds button.on { box-shadow: inset 0 0 0 1.5px var(--fg); }

.chamber { position: relative; margin: 28px auto 0; max-width: 440px; }
.chamber svg { display: block; width: 100%; }
.chamber circle.empty { fill: var(--line); }
.chamber circle { transition: fill .3s; }
.arc { position: relative; }
.chamber-center { position: absolute; left: 50%; bottom: 0; width: 44%; transform: translateX(-50%); text-align: center; }
.chamber-center .big { display: block; font: 600 clamp(30px, 3.4vw, 44px)/1 var(--font-display); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.chamber-center .lbl { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 14px; font-weight: 600; }
.chamber-caption { margin-top: 10px; text-align: center; font-size: 12.5px; color: var(--muted); }

.duel { margin-top: 28px; }
.duel-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.duel-side .big { display: block; font: 600 clamp(32px, 3.6vw, 48px)/1 var(--font-display); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.duel-side .nm { display: flex; align-items: center; gap: 7px; margin-top: 8px; font-size: 15px; font-weight: 600; }
.duel-side small { display: block; margin-top: 1px; font-size: 12.5px; color: var(--muted); }
.duel-side.right { text-align: right; }
.duel-side.right .nm { justify-content: flex-end; }
.duel-track { position: relative; margin-top: 16px; }
.duel-bar { display: flex; height: 12px; border-radius: 4px; overflow: hidden; background: var(--soft); }
.duel-bar span { height: 100%; transition: width .4s; }
.duel-bar span + span { box-shadow: -1px 0 0 var(--bg); }
.duel-bar .gap { flex: 1; }
.duel-tick { position: absolute; left: 50%; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: var(--fg); }
.duel-caption { margin-top: 10px; text-align: center; font-size: 12.5px; color: var(--muted); }

table.results { width: 100%; margin-top: 28px; border-collapse: collapse; font-size: 14.5px; }
.results th { padding: 0 0 8px; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); }
.results td { padding: 11px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.results tr:last-child td { border-bottom: 0; }
.results .num { text-align: right; padding-left: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.results .strong { font-weight: 600; }
.change.up { color: var(--up); }
.change.down { color: var(--down); }
.p-cell { display: flex; align-items: center; gap: 10px; }
.p-name { font-weight: 500; line-height: 1.3; }
.p-name small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }

/* regions */

.tally { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: 13.5px; color: var(--fg2); }
.tally li { display: inline-flex; align-items: center; gap: 7px; }
.tally b { font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; }

.region-detail { margin-top: 18px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); scroll-margin: 24px; }
.rd-hint { font-size: 13.5px; color: var(--muted); }
.rd-head { display: flex; justify-content: space-between; align-items: baseline; }
.rd-head h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.rd-head .link-btn { margin: 0; }
.rd-call { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 14px; color: var(--fg2); }
.rd-call b { font-weight: 600; color: var(--fg); }
.region-detail.on { animation: rise .25s ease both; }

.bars { margin-top: 12px; display: grid; gap: 8px; }
.bars li { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 48px auto; align-items: center; gap: 10px; font-size: 13.5px; }
.b-name { display: flex; align-items: center; gap: 7px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.b-bar { height: 6px; border-radius: 3px; background: var(--soft); overflow: hidden; }
.b-bar i { display: block; height: 100%; border-radius: 3px; }
.bars b { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.bars em { min-width: 26px; text-align: right; font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; }

.closest { margin-top: 8px; display: grid; gap: 2px; }
.closest button { display: grid; grid-template-columns: minmax(0, 1fr) 84px 8.5em 3.2em; align-items: center; gap: 12px; width: calc(100% + 16px); padding: 7px 8px; margin: 0 -8px; border-radius: 7px; text-align: left; font-size: 14px; }
.closest button:hover, .closest button.hover, .closest button.sel { background: var(--soft); }
.cr-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.split { position: relative; display: flex; height: 6px; border-radius: 3px; overflow: hidden; }
.split b { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--bg); }
.cr-p { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-m { font-size: 13px; color: var(--fg2); white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }

.sorter { display: inline-flex; gap: 12px; }
.sorter button { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.sorter button.on { color: var(--fg); }

.region-table { width: 100%; margin-top: 6px; border-collapse: collapse; font-size: 14px; }
.region-table td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.region-table td:first-child { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.region-table td.muted { padding-left: 12px; font-size: 13px; }
.region-table .num { text-align: right; padding-left: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.region-table tr { cursor: pointer; }
.region-table tr:hover td, .region-table tr.hover td { background: var(--soft); }
.region-table tr.sel td { background: var(--soft); box-shadow: inset 0 -1px 0 var(--fg); }
.region-table tr.off td:first-child { color: var(--muted); font-weight: 400; }

/* polls, history, about */

.polls { margin-top: 14px; }
.polls svg { display: block; width: 100%; height: auto; overflow: visible; }
.polls .grid { stroke: var(--line); stroke-width: 1; }
.polls .axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.polls .end { stroke: var(--bg); stroke-width: 2; }
.poll-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; margin-top: 12px; }
.poll-legend li { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 8px; font-size: 13.5px; }
.poll-legend span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poll-legend b { font-weight: 600; font-variant-numeric: tabular-nums; }
.poll-legend em { min-width: 34px; text-align: right; font-style: normal; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.poll-legend em.up { color: var(--up); }
.poll-legend em.down { color: var(--down); }

.hist { margin-top: 14px; display: grid; gap: 10px; }
.hist-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) minmax(0, 150px); align-items: center; gap: 12px; font-size: 13.5px; }
.hist-yr { color: var(--muted); font-variant-numeric: tabular-nums; }
.hist-row.current .hist-yr { color: var(--fg); font-weight: 600; }
button.hist-row { width: calc(100% + 12px); margin: 0 -6px; padding: 3px 6px; border-radius: 6px; text-align: left; }
button.hist-row:hover, button.hist-row.current { background: var(--soft); }
.hist-bar { position: relative; display: flex; height: 14px; border-radius: 3px; overflow: hidden; background: var(--soft); }
.hist-bar span + span { box-shadow: -1px 0 0 var(--bg); }
.hist-bar i { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--bg); opacity: .8; }
.hist-win { display: flex; align-items: center; gap: 7px; overflow: hidden; white-space: nowrap; }
.hist-win b { margin-left: auto; padding-left: 8px; font-weight: 600; font-variant-numeric: tabular-nums; }

.spec { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.spec dt { font-size: 12px; color: var(--muted); }
.spec dd { margin-top: 1px; font-size: 14px; font-weight: 500; line-height: 1.4; }

.upcoming { margin-top: 10px; }
.upcoming li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.upcoming li:last-child { border-bottom: 0; }
.upcoming .muted { font-size: 13px; text-align: right; }

.sim-block { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px 0 0; border-top: 1px solid var(--line); }
.sim-block .block-title { font-size: 16px; }
.sim-block p { margin-top: 2px; font-size: 13.5px; }

/* ---------- small screens ---------- */

@media (max-width: 900px) {
  html, body { height: auto; }
  body { display: block; overflow: auto; }
  .shell { display: flex; flex-direction: column-reverse; }
  .globe-pane { height: 56vh; min-height: 340px; }
  .panel { overflow: visible; border-right: 0; border-top: 1px solid var(--line); }
  .home, .country { padding: 28px 20px 32px; }
  .intro h1 { font-size: 30px; }
  .c-head h1 { font-size: 32px; }
  .globe-legend { font-size: 11.5px; left: 10px; bottom: 10px; }
  .globe-controls { right: 10px; bottom: 10px; }
}

@media (max-width: 520px) {
  .hide-sm { display: none; }
  .closest button { grid-template-columns: minmax(0, 1fr) 56px 6.5em 3.2em; gap: 8px; }
  .spec, .poll-legend { grid-template-columns: 1fr; }
  .bars li { grid-template-columns: minmax(0, 1fr) 70px 46px auto; }
  .c-head { flex-direction: column; gap: 8px; }
  .head-status { padding-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* calls and sources */

.el-call { margin-top: 14px; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.el-call.called { color: var(--fg); }
.el-call.muted { color: var(--muted); font-weight: 500; }
.el-source { margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.el-source a, .spec a { color: var(--accent); }
.el-source a:hover, .spec a:hover { text-decoration: underline; }
.rd-by { margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.tag.runoff { color: var(--soon); }
.globe-legend .k.lead { background: color-mix(in srgb, var(--fg) 22%, var(--uncalled)); }

.layer-toggle { margin-top: 12px; display: inline-flex; gap: 2px; padding: 3px; border-radius: 8px; background: var(--soft); }
.layer-toggle button { padding: 4px 12px; border-radius: 6px; font-size: 13px; color: var(--muted); }
.layer-toggle button.on { background: var(--bg); color: var(--fg); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.unit-filter {
  width: 100%; margin-top: 12px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--fg); font: inherit; font-size: 14px;
}
.unit-filter:focus { outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); outline-offset: 0; border-color: var(--accent); }
