/* geoStrat — election night ------------------------------------------------------ */
:root {
  --bg: #f4f5f8; --surface: #ffffff; --surface-2: #f0f2f6; --border: #e2e5eb;
  --text: #14171d; --muted: #5f6b7d; --primary: #1B4FA0; --live: #d92d20; --demo: #7a5af8;
  --grid: #e8ebf0; --radius: 14px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1015; --surface: #161a21; --surface-2: #1e232b; --border: #2a303a;
    --text: #e9ecf1; --muted: #9aa4b2; --primary: #7FA6F5; --live: #ff6b5f; --demo: #a48bff; --grid: #232933;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1015; --surface: #161a21; --surface-2: #1e232b; --border: #2a303a;
  --text: #e9ecf1; --muted: #9aa4b2; --primary: #7FA6F5; --live: #ff6b5f; --demo: #a48bff; --grid: #232933;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 15px/1.5 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
h1 { font-size: 28px; line-height: 1.15; margin: 0 0 4px; letter-spacing: -0.02em; }
h2 { font-size: 15px; margin: 0; letter-spacing: -0.01em; }

.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; padding: 10px 20px;
       background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 8px; font-size: 18px; text-decoration: none; color: var(--text); }
.brand-mark { width: 22px; height: 22px; border-radius: 6px; background: conic-gradient(from 200deg, #1B4FA0, #00b5e2, #ff5605, #ed1b2e, #1B4FA0); }
.mode { display: flex; align-items: center; gap: 10px; flex: 1; font-size: 13px; }
.top nav { display: flex; gap: 6px; }
.pill { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; height: 32px; min-width: 32px; padding: 0 12px;
        border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
        text-decoration: none; font: inherit; font-size: 14px; cursor: pointer; }
.pill:hover { background: var(--surface-2); }
.live-pill { white-space: nowrap; font-size: 11px; font-weight: 700; letter-spacing: .08em; padding: 4px 9px; border-radius: 999px;
             background: var(--surface-2); color: var(--muted); }
.live-pill.on { background: var(--live); color: #fff; }
.live-pill.on::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #fff;
                        margin-right: 6px; animation: blink 1.4s infinite; vertical-align: 1px; }
.live-pill.demo { background: var(--demo); color: #fff; }
@keyframes blink { 50% { opacity: .25; } }

.wrap { max-width: 1280px; margin: 0 auto; padding: 20px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.head p { margin: 0; }
.count { min-width: 240px; text-align: right; }
.count-num { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.bar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin: 6px 0 4px; }
.bar i { display: block; height: 100%; background: var(--text); transition: width .6s; }

.demo-bar { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border);
            border-radius: var(--radius); padding: 10px 14px; }
.demo-bar input { flex: 1; accent-color: var(--demo); }
.demo-bar .play { width: 40px; }
.demo-bar #step-label { min-width: 170px; font-variant-numeric: tabular-nums; }
.banner { margin: 0; padding: 12px 16px; border-radius: var(--radius); background: color-mix(in srgb, var(--primary) 10%, var(--surface));
          border: 1px solid color-mix(in srgb, var(--primary) 25%, var(--border)); font-size: 14px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; min-width: 0; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.card-head .muted { font-size: 12.5px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; }
.maps { display: grid; gap: 12px; }
.map { margin: 0; background: var(--surface-2); border-radius: 10px; overflow: hidden; position: relative; }
.map svg { width: 100%; height: auto; display: block; }
.insets svg { aspect-ratio: 1.45; }
.insets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.map figcaption { position: absolute; top: 6px; left: 8px; padding: 1px 6px; border-radius: 5px; background: color-mix(in srgb, var(--surface) 80%, transparent); font-size: 12px; font-weight: 600; color: var(--muted); pointer-events: none; }
.sea { fill: var(--surface-2); }
.rid { stroke: var(--surface); stroke-width: .8; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill-opacity .5s; }
.rid.none { fill: var(--border); cursor: default; }
.rid:hover, .rid.sel { stroke: var(--text); stroke-width: 2; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; }

.verdict { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 4px; }
#hemi { width: 100%; height: auto; max-height: 600px; display: block; margin: 0 auto; }
.zone { fill: var(--text); fill-opacity: .07; stroke: var(--text); stroke-opacity: .18; stroke-dasharray: 2 3; }
.speaker { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 3 3; }
.side-t { font-size: 14px; fill: var(--muted); letter-spacing: .04em; }
.seat { cursor: pointer; stroke-width: 1.2; transition: fill-opacity .5s, fill .5s; }
.seat.final { stroke-width: 2.5; stroke: var(--text) !important; stroke-opacity: .55; }
.seat.tossup { stroke-dasharray: 3 2; }
.seat:hover, .seat.sel { stroke: var(--text) !important; stroke-width: 3.5; }
.maj-line { stroke: var(--text); stroke-opacity: .5; stroke-dasharray: 4 4; stroke-width: 1.5; }
.maj-text { font-size: 13px; fill: var(--muted); font-weight: 600; }
.hemi-big { font-size: 64px; font-weight: 800; letter-spacing: -0.04em; }
.hemi-sub { font-size: 13px; fill: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); justify-content: center; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend b { color: var(--text); }

.track { display: grid; grid-template-columns: 64px minmax(0, 1fr) 72px; gap: 10px; align-items: center; margin: 6px 0; }
.track-name { display: flex; align-items: center; gap: 7px; }
.track-name i, .pop-name i, .dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.track-bar { position: relative; height: 22px; background: var(--surface-2); border-radius: 6px; }
.track-bar .seg { position: absolute; top: 0; bottom: 0; transition: left .5s, width .5s, opacity .5s; }
.track-bar .seg:first-child { border-radius: 6px 0 0 6px; }
.track-bar .range { position: absolute; top: 50%; height: 2px; margin-top: 12px; background: var(--muted); opacity: .7; }
.track-bar .med { position: absolute; top: 100%; width: 7px; height: 7px; margin: 1px 0 0 -3.5px; border-radius: 50%; background: var(--text); }
.track-bar .maj { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--text); opacity: .7; }
.track { margin-bottom: 14px; }
.track-num { font-variant-numeric: tabular-nums; font-size: 18px; }
.track.axis { margin-top: -4px; }
.ticks { background: none; height: 16px; font-size: 11px; color: var(--muted); }
.ticks span { position: absolute; transform: translateX(-50%); }
.ticks .maj-lab { color: var(--text); font-weight: 700; top: -1px; background: var(--surface); padding: 0 3px; }

.party-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-top: 12px; }
.pcard { border: 1px solid var(--border); border-left: 4px solid var(--pc); border-radius: 10px; padding: 9px 11px; }
.pcard-top { display: flex; flex-direction: column; }
.pcard-top .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard-seats { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.pcard-seats .big { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.pcard-probs { display: flex; flex-direction: column; font-size: 12.5px; color: var(--muted); }
.pcard-probs b { color: var(--text); }

#timeline { width: 100%; height: auto; display: block; }
#timeline .grid { stroke: var(--grid); }
#timeline .axis-t { font-size: 11px; fill: var(--muted); }
#timeline .tl { fill: none; stroke-width: 2.5; stroke-linejoin: round; }
#timeline .tl.mean { stroke-width: 1.6; stroke-dasharray: 5 4; opacity: .8; }

.pop { display: grid; grid-template-columns: 70px minmax(0, 1fr) 120px; gap: 10px; align-items: center; margin: 9px 0; }
.pop-name { display: flex; gap: 7px; align-items: center; font-weight: 600; }
.pop-bars { position: relative; height: 18px; }
.pop-bars .b { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; transition: width .5s, left .5s; }
.pop-bars .counted { opacity: .85; }
.pop-bars .est { border: 2px solid; background: transparent; }
.pop-bars .prior { width: 2px; background: var(--text); top: -3px; bottom: -3px; opacity: .7; border-radius: 0; }
.pop-num { font-variant-numeric: tabular-nums; text-align: right; font-size: 13.5px; }

.wrap-row { align-items: center; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.chip { font: inherit; font-size: 12.5px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
        border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.chip.on { background: var(--text); color: var(--surface); border-color: var(--text); }
.chip b { font-weight: 600; opacity: .7; }
#search, #sort { font: inherit; font-size: 13.5px; height: 32px; border: 1px solid var(--border); border-radius: 8px;
                 background: var(--surface); color: var(--text); padding: 0 10px; }
#search { width: 220px; }

.table { font-size: 13.5px; }
.tr { display: grid; grid-template-columns: minmax(150px, 1.5fr) 140px 110px minmax(150px, 1.3fr) 90px minmax(160px, 1.3fr);
      gap: 10px; align-items: center; padding: 8px 6px; border-top: 1px solid var(--border); cursor: pointer; }
.tr:hover, .tr:focus { background: var(--surface-2); outline: none; }
.tr.th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); cursor: default;
         border-top: 0; position: sticky; top: 53px; background: var(--surface); z-index: 1; }
.tr.th:hover { background: var(--surface); }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; white-space: nowrap;
         background: color-mix(in srgb, var(--pc) 16%, transparent); color: var(--text); border: 1px solid color-mix(in srgb, var(--pc) 35%, transparent); }
.badge.final, .badge.called { background: var(--pc); color: #fff; border-color: var(--pc); }
.badge.safe { background: color-mix(in srgb, var(--pc) 55%, transparent); }
.badge.tossup { background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--pc) 22%, transparent) 0 4px, transparent 4px 8px); }
.cnt { display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.mini { width: 44px; height: 5px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.mini i { display: block; height: 100%; background: var(--text); opacity: .7; }
.pb { display: flex; align-items: center; gap: 8px; }
.pbar { flex: 1; display: flex; height: 10px; border-radius: 3px; overflow: hidden; background: var(--surface-2); min-width: 60px; }
.pbar i { height: 100%; }
.pb b { white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 76px; }

.notes dl { display: grid; grid-template-columns: 220px 1fr; gap: 8px 20px; margin: 10px 0; font-size: 14px; }
.notes dt { font-weight: 600; }
.notes dd { margin: 0; color: var(--muted); }

.drawer { position: fixed; right: 16px; bottom: 16px; width: min(420px, calc(100vw - 32px)); max-height: 70vh; overflow: auto;
          background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px;
          box-shadow: 0 18px 50px rgba(0, 0, 0, .25); z-index: 20; }
.drawer h3 { margin: 0 32px 6px 0; font-size: 18px; }
.drawer .x { position: absolute; top: 10px; right: 10px; border: 0; background: var(--surface-2); color: var(--text);
             width: 28px; height: 28px; border-radius: 50%; cursor: pointer; }
.dt { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; margin: 8px 0; }
.dt th { text-align: left; font-weight: 500; color: var(--muted); font-size: 11.5px; padding: 4px; }
.dt td { padding: 5px 4px; border-top: 1px solid var(--border); }
.dt .dot { margin-right: 6px; }
.tip { position: fixed; z-index: 30; pointer-events: none; background: var(--text); color: var(--surface); padding: 7px 10px;
       border-radius: 8px; font-size: 12.5px; line-height: 1.4; }
.tip .muted { color: color-mix(in srgb, var(--surface) 70%, transparent); }

@media (max-width: 960px) {
  .hero, .grid2 { grid-template-columns: 1fr; }
  .tr { grid-template-columns: minmax(0, 1fr) auto; }
  .tr > span:nth-child(3), .tr > span:nth-child(5) { display: none; }
  .tr > span:nth-child(4) { grid-column: 1; font-size: 12.5px; }
  .tr > span:nth-child(6) { grid-column: 1 / -1; }
  .tr.th { display: none; }
  .notes dl { grid-template-columns: 1fr; }
  #search { width: 100%; }
}
@media (max-width: 560px) {
  .wrap { padding: 12px 16px; }
  .top { padding: 10px 16px; gap: 8px; }
  .mode .muted { display: none; }
  h1 { font-size: 22px; }
  .count { text-align: left; min-width: 0; width: 100%; }
  .pop { grid-template-columns: 56px minmax(0, 1fr) 96px; }
  .track { grid-template-columns: 48px minmax(0, 1fr) 60px; }
}
@media (max-width: 560px) {
  .card-head.wrap-row { flex-direction: column; align-items: stretch; }
  .pop { grid-template-columns: 50px minmax(0, 1fr) 118px; }
  .pop-num { font-size: 12.5px; }
}
@media (max-width: 560px) {
  #theme { display: none; }
  .brand { font-size: 16px; }
  .mode { min-width: 0; overflow: hidden; }
}
@media (max-width: 960px) { .insets { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .insets { grid-template-columns: 1fr; } }

/* party marks and logos (official, static/night/parties) · candidate photos (official party websites) */
.pm { width: 18px; height: 18px; object-fit: contain; flex: none; display: inline-block; vertical-align: -4px; border-radius: 4px; }
.pm.xs { width: 14px; height: 14px; vertical-align: -3px; margin-right: 4px; }
.pm.chip-c { width: 10px; height: 10px; border-radius: 3px; margin: 0 4px; vertical-align: 0; }
.track { grid-template-columns: 76px minmax(0, 1fr) 72px; }
.pcard-top .plogo { height: 30px; max-width: 100%; object-fit: contain; object-position: left center; margin: 2px 0 4px; }
.av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: center top; flex: none;
      background: var(--surface-2); border: 1px solid var(--border); }
.av.xs { width: 22px; height: 22px; }
.av.sm { width: 32px; height: 32px; }
.av.lg { width: 64px; height: 64px; border: 2px solid var(--pc, var(--border)); }
.av.ini { display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; color: #fff;
          background: var(--pc); border: 0; }
.av.xs.ini { font-size: 9px; }
.av.lg.ini { font-size: 20px; }
.tr .name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fav-c { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fav { display: flex; gap: 12px; align-items: center; padding: 10px; margin: 6px 0 4px; border-radius: 10px;
       background: color-mix(in srgb, var(--pc) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--pc) 30%, var(--border)); }
.fav > div { display: flex; flex-direction: column; min-width: 0; }
.fav b { font-size: 16px; }
.dt td.who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dt td.who > span { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.dt .cn { font-weight: 600; }
.cp { font-size: 11.5px; color: var(--muted); display: inline-flex; align-items: center; }
.tip-row { display: flex; gap: 8px; align-items: flex-start; }

/* rivals circle */
.rivals-wrap { display: grid; grid-template-columns: minmax(0, 620px) minmax(200px, 1fr); gap: 24px; align-items: center; }
#rivals { width: 100%; height: auto; display: block; }
.rivals-read p { margin: 0 0 10px; line-height: 1.5; }
.rv-ring { fill: none; stroke: var(--border); stroke-width: 1; }
.rv-edge { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 4; }
.rv-core { fill: var(--surface-2); stroke: none; }
.rv-core-t { font-size: 11px; fill: var(--muted); letter-spacing: .04em; }
.rv-anchor { fill: var(--surface); stroke-width: 2.5; }
.rv-party { font-size: 14px; font-weight: 700; }
.rv-dot { cursor: pointer; stroke-width: 1.2; transition: r .1s; }
.rv-dot:hover, .rv-dot.sel { stroke-width: 2.5; stroke: var(--text); }
@media (max-width: 800px) { .rivals-wrap { grid-template-columns: 1fr; } }
.rv-spoke { stroke-width: 2; opacity: .5; }
.rv-dot { transition: cx .35s ease, cy .35s ease, fill-opacity .35s, fill .35s; }
.rivals-side { display: grid; gap: 18px; align-content: center; }
.whatif { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--surface-2); }
.wi-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 8px; }
.wi-reset { font: inherit; font-size: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.wi-row { display: grid; grid-template-columns: 70px 1fr 92px; align-items: center; gap: 10px; padding: 3px 0; }
.wi-p { display: flex; align-items: center; gap: 6px; }
.wi-row input { accent-color: var(--pc); width: 100%; }
.wi-v { font-variant-numeric: tabular-nums; text-align: right; font-size: 14px; }
.wi-v em, .wi-seat em { font-style: normal; font-size: 11px; margin-left: 3px; }
.up { color: #15803d; } .down { color: #b42318; }
.wi-seats { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; align-items: baseline; }
.wi-seats > div { flex-basis: 100%; }
.wi-est .wi-seats { opacity: .6; transition: opacity .15s; }
.wi-est .wi-seats > div::after { content: " · calcul en cours…"; }
.wi-seat { border-left: 3px solid var(--pc); padding-left: 6px; font-variant-numeric: tabular-nums; }
.wi-seat small { display: block; color: var(--muted); font-size: 11px; }
.whatif p { margin: 10px 0 0; }
.rv-seats .n { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.rv-seats .u { font-size: 12px; font-weight: 600; fill: var(--muted); }

/* followed ridings (night page): the visitor's own list, their fiches kept up to date */
.follow-sec #follow-add { width: min(420px, 100%); height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text); font: inherit; margin: 4px 0 12px; }
.follow-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 12px; }
.follow-card { border: 1px solid var(--border); border-left: 4px solid var(--pc); border-radius: 12px; padding: 12px 14px; background: var(--surface); min-width: 0; }
.follow-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.follow-card h3 { margin: 0; font-size: 16px; }
.follow-card h3 a { color: var(--text); text-decoration: none; }
.follow-card h3 a:hover { text-decoration: underline; }
.follow-card .dt { width: 100%; }
.follow-btn { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; font: inherit;
  font-size: 13px; padding: 3px 10px; cursor: pointer; white-space: nowrap; }
.follow-btn:hover { background: var(--surface-2); }
.follow-btn.on { color: #b7791f; border-color: color-mix(in srgb, #b7791f 50%, var(--border)); }
.follow-btn.ico { border: 0; background: none; padding: 0 6px 0 0; font-size: 16px; line-height: 1; color: var(--muted); }
.follow-btn.ico.on { color: #d69e2e; }
.drawer .follow-btn { margin: 0 0 8px; }

/* live pop-ups: a candidate just elected (bottom left) */
.toasts { position: fixed; left: 16px; bottom: 16px; z-index: 40; display: flex; flex-direction: column-reverse; gap: 8px;
  width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 10px 34px 10px 10px; position: relative;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-left: 5px solid var(--pc, var(--primary));
  border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.18); cursor: pointer; animation: toast-in .35s ease-out; transition: opacity .3s, transform .3s; }
.toast.out { opacity: 0; transform: translateX(-16px); }
.toast.followed { box-shadow: 0 0 0 2px color-mix(in srgb, #d69e2e 60%, transparent), 0 8px 24px rgba(0,0,0,.18); }
.toast > div { display: grid; min-width: 0; line-height: 1.3; }
.toast .t-k { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--pc, var(--primary)); }
.toast b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast .t-p { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast .av { width: 42px; height: 42px; flex: none; }
.toast .t-x { position: absolute; top: 6px; right: 6px; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 13px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; transition: none; } }
@media (max-width: 640px) { .toasts { left: 8px; bottom: 8px; width: calc(100vw - 16px); } }

/* riding list: stable rows, fixed widths, region headings, change marks */
@media (min-width: 961px) { .tr { grid-template-columns: minmax(190px, 1.5fr) 196px 100px minmax(170px, 1.2fr) 80px minmax(170px, 1.2fr); min-height: 48px; } }
.tr > span { min-width: 0; }
.tr .name { flex-direction: row; align-items: center; gap: 4px; }
.tr .nm { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tr .nm b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr .st { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; white-space: nowrap; }
.tr .badge { min-width: 100px; text-align: center; }
.tr .ld { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.tr .ls, .tr .cnt { font-variant-numeric: tabular-nums; }
.tr .pb { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.tr .pb b { min-width: 62px; text-align: right; font-variant-numeric: tabular-nums; }
.grp { padding: 14px 10px 6px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text); border-bottom: 2px solid var(--border); position: sticky; top: 56px; background: var(--surface); z-index: 1; }
.grp .muted { font-weight: 600; margin-left: 4px; }
.new-dot { font-style: normal; font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: #fff;
  background: #d69e2e; border-radius: 999px; padding: 1px 5px; flex: none; }
.flip { font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); }
.flash { animation: flash 2.2s ease-out; border-radius: 6px; }
@keyframes flash { 0%, 25% { background: color-mix(in srgb, #d69e2e 30%, transparent); } 100% { background: transparent; } }
.tb-pending { position: sticky; top: 56px; z-index: 2; display: flex; justify-content: center; padding: 6px 0; }
.tb-pending .pill { background: var(--text); color: var(--surface); border-color: var(--text); font-weight: 600; box-shadow: 0 4px 14px rgba(0,0,0,.15); }
@media (prefers-reduced-motion: reduce) { .flash { animation: none; } }
@media (max-width: 960px) { .tr .badge { min-width: 0; } .grp, .tb-pending { top: 0; } }
