/* Design tokens: type, colour (light + dark), spacing, motion. */

:root {
  color-scheme: light dark;

  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;

  /* surfaces and labels */
  --page: #f2f2f7;
  --card: #ffffff;
  --grouped: #f2f2f7;
  --elevated: #ffffff;            /* tooltips, popovers */
  --sheet: #f2f2f7;               /* sheet background (grouped) */
  --fill: rgba(118, 118, 128, .12);
  --fill-2: rgba(118, 118, 128, .2);
  --hover: rgba(118, 118, 128, .07);
  --label: #1d1d1f;
  --label-2: #6e6e73;
  --label-3: #8e8e93;
  --label-2f: #5e5e63;            /* secondary text on --fill (chips, tags, placeholders): 5:1 on the page and card */
  --sep: rgba(60, 60, 67, .18);
  --grid: rgba(60, 60, 67, .12);
  --thumb: #ffffff;
  --focus: #1d1d1f;
  --scrim: rgba(0, 0, 0, .3);
  --bar-bg: rgba(242, 242, 247, .78);
  --bar-bg: color-mix(in srgb, var(--page) 72%, transparent);
  --shadow-float: 0 12px 40px rgba(0, 0, 0, .14), 0 2px 8px rgba(0, 0, 0, .06);
  --shadow-thumb: 0 3px 8px rgba(0, 0, 0, .12), 0 3px 1px rgba(0, 0, 0, .04), 0 0 0 .5px rgba(0, 0, 0, .04);

  /* party ramps: solid / likely / lean; toss-up */
  --D: #1668E3; --D-likely: #5890EE; --D-lean: #8FB6F6;
  --R: #DA3128; --R-likely: #E86A60; --R-lean: #F09C95;
  --I: #1B9E77; --I-likely: #57B899; --I-lean: #95D2BE;
  --toss: #AEAEB2;
  /* text on fills, all at least 4.5:1: each party's solid step has its own ink; the lighter steps take --ink-tint */
  --D-ink: #ffffff; --R-ink: #ffffff; --I-ink: #1d1d1f;
  --ink-solid: #ffffff;           /* solid fills where the party is not known */
  --ink-tint: #1d1d1f;            /* text on likely / lean / toss-up fills */

  /* layout */
  --gutter: 16px;
  --maxw: 1080px;
  --radius: 18px;
  --gap: 12px;
  --bar-h: 52px;
  --tab-h: 49px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --tab-space: calc(var(--tab-h) + var(--safe-b));

  /* motion */
  --ease: cubic-bezier(.32, .72, 0, 1);
  --t-press: 100ms;
  --t-sheet: 250ms;
}

@media (min-width: 768px) {
  :root { --gutter: 24px; --gap: 16px; --tab-space: 0px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #000000;
    --card: #1c1c1e;
    --grouped: #2c2c2e;
    --elevated: #2c2c2e;
    --sheet: #1c1c1e;
    --fill: rgba(118, 118, 128, .24);
    --fill-2: rgba(118, 118, 128, .36);
    --hover: rgba(118, 118, 128, .12);
    --label: #f5f5f7;
    --label-2: #98989d;
    --label-3: #636366;
    --label-2f: #aeaeb2;
    --sep: rgba(84, 84, 88, .55);
    --grid: rgba(235, 235, 245, .10);
    --thumb: #636366;
    --focus: #f5f5f7;
    --scrim: rgba(0, 0, 0, .55);
    --bar-bg: rgba(0, 0, 0, .72);
    --bar-bg: color-mix(in srgb, var(--page) 72%, transparent);
    --shadow-float: 0 12px 40px rgba(0, 0, 0, .5), 0 0 0 .5px rgba(255, 255, 255, .08);
    --shadow-thumb: 0 3px 8px rgba(0, 0, 0, .3), 0 3px 1px rgba(0, 0, 0, .1);

    --D: #4A93FF; --D-likely: #3A70C9; --D-lean: #2F538D;
    --R: #F2554A; --R-likely: #BA473E; --R-lean: #823732;
    --I: #26A987; --I-likely: #1F8069; --I-lean: #1B5A4A;
    --toss: #636366;
    --D-ink: #000000; --R-ink: #000000; --I-ink: #000000;   /* the dark-mode solid steps are bright */
    --ink-solid: #000000;
    --ink-tint: #ffffff;
  }
}

/* Category fills (--c) and their ink (--ci): class from Race.cat(r).cls */
.c-D-solid { --c: var(--D); --ci: var(--D-ink); }
.c-D-likely { --c: var(--D-likely); --ci: var(--ink-tint); }
.c-D-lean { --c: var(--D-lean); --ci: var(--ink-tint); }
.c-R-solid { --c: var(--R); --ci: var(--R-ink); }
.c-R-likely { --c: var(--R-likely); --ci: var(--ink-tint); }
.c-R-lean { --c: var(--R-lean); --ci: var(--ink-tint); }
.c-I-solid { --c: var(--I); --ci: var(--I-ink); }
.c-I-likely { --c: var(--I-likely); --ci: var(--ink-tint); }
.c-I-lean { --c: var(--I-lean); --ci: var(--ink-tint); }
.c-tossup { --c: var(--toss); --ci: var(--ink-tint); }

/* Party colour (--c) for dots, bars and hero numerals; --ink-solid becomes that party's ink for text on --c */
.p-D { --c: var(--D); --ink-solid: var(--D-ink); }
.p-R { --c: var(--R); --ink-solid: var(--R-ink); }
.p-I { --c: var(--I); --ink-solid: var(--I-ink); }
.p-none { --c: var(--toss); }
.t-D { color: var(--D); }
.t-R { color: var(--R); }
.t-I { color: var(--I); }

/* Base: reset, typography, page layout, top bar, tab bar, footer, focus, skip link. */

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--page);
  scroll-padding-top: calc(var(--bar-h) + var(--safe-t) + 12px);
  scroll-padding-bottom: calc(var(--tab-space) + 12px);   /* focused controls stay clear of the phone tab bar */
}
html { scrollbar-gutter: stable; }
html.has-sheet { overflow: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--label);
  font: 400 17px/22px var(--font-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: var(--tab-space);
}
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; opacity: .5; }
img, svg { display: block; }
svg.ico { flex: none; }
kbd { font: inherit; }
[hidden] { display: none !important; }
::selection { background: rgba(118, 118, 128, .28); }

/* type scale */
.t-large { font: 700 34px/41px var(--font-display); letter-spacing: -.02em; }
.t-title1 { font: 700 28px/34px var(--font-display); letter-spacing: -.02em; }
.t-title2 { font: 700 22px/28px var(--font-display); letter-spacing: -.01em; }
.t-title3 { font: 600 20px/25px var(--font-display); letter-spacing: -.01em; }
.t-headline { font: 600 17px/22px var(--font-text); letter-spacing: -.01em; }
.t-body { font: 400 17px/22px var(--font-text); letter-spacing: -.01em; }
.t-callout { font: 400 16px/21px var(--font-text); }
.t-subhead { font: 400 15px/20px var(--font-text); }
.t-footnote { font: 400 13px/18px var(--font-text); }
.t-caption { font: 400 12px/16px var(--font-text); }
.t-2 { color: var(--label-2); }
.t-3 { color: var(--label-3); }
.num { font-variant-numeric: tabular-nums; }
.sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* focus */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.lt-title:focus-visible { outline: none; }

/* skip link */
.skip {
  position: fixed; z-index: 200; left: 12px; top: calc(var(--safe-t) + 8px);
  padding: 10px 16px; border-radius: 12px; background: var(--card); color: var(--label);
  font: 600 15px/20px var(--font-text);
  transform: translateY(calc(-100% - var(--safe-t) - 40px)); transition: transform .2s var(--ease);
}
.skip:focus { transform: none; box-shadow: var(--shadow-float); }

/* layout */
.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: max(var(--gutter), var(--safe-l));
  padding-right: max(var(--gutter), var(--safe-r));
}
main { flex: 1 0 auto; display: block; outline: none; }
.page { padding-bottom: 40px; display: flex; flex-direction: column; gap: var(--gap); }
.page > * { min-width: 0; }
.noscript { padding: 40px 16px; text-align: center; color: var(--label-2); }
.loading { display: grid; place-items: center; min-height: 50vh; }
/* the page shells' static content (seldon/web/snapshot.py), shown until the app has drawn the page */
.st-links { padding: 0 var(--row-x, 16px) 14px; font: 400 15px/24px var(--font-text); color: var(--label-3); }
.st-links a { color: var(--label-2); }
.row-v { flex: none; font: 600 15px/20px var(--font-text); font-variant-numeric: tabular-nums; }

/* large title (page header) */
.lt { padding: 14px 0 10px; }
.lt-title { font: 700 34px/41px var(--font-display); letter-spacing: -.02em; text-wrap: balance; }
.lt-sub { margin-top: 4px; font: 400 15px/20px var(--font-text); color: var(--label-2); }
.lt-eyebrow { font: 600 15px/20px var(--font-text); color: var(--label-2); margin-bottom: 2px; }
.lt-chips { margin-top: 12px; }
.back {
  position: relative;
  display: inline-flex; align-items: center; gap: 1px; margin: 0 0 6px -8px; padding: 4px 8px 4px 2px;
  border-radius: 10px; font: 400 17px/22px var(--font-text); color: var(--label);
  transition: opacity var(--t-press);
}
.back:active { opacity: .5; }
@media (hover: hover) { .back:hover { background: var(--hover); } }
@media (min-width: 1024px) {
  .lt { padding: 28px 0 14px; }
  .lt-title { font-size: 40px; line-height: 46px; }
  .lt-sub { font-size: 17px; line-height: 22px; }
}

/* section title between cards */
.sec-title { font: 700 22px/28px var(--font-display); letter-spacing: -.01em; margin: 16px 0 -2px; }

/* ---------------------------------------------------------------------------------------------- top bar */

.bar {
  position: sticky; top: 0; z-index: 50;
  padding-top: var(--safe-t);
  background: var(--bar-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid transparent;
  transition: border-color .2s linear;
  view-transition-name: bar;
}
.bar.scrolled { border-bottom-color: var(--sep); }
.bar-in {
  height: var(--bar-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}
.brand {
  justify-self: start; display: inline-flex; align-items: center; gap: 9px;
  font: 600 17px/22px var(--font-display); letter-spacing: -.01em;
  padding: 4px 6px 4px 0; border-radius: 10px;
}
.brand .app-icon { border-radius: 6px; }
@media (prefers-color-scheme: dark) { .brand .app-icon { box-shadow: 0 0 0 .5px rgba(255, 255, 255, .22); } }

.nav { display: none; gap: 4px; }
.nav a {
  position: relative; padding: 6px 12px; border-radius: 99px;
  font: 500 15px/20px var(--font-text); color: var(--label-2);
  transition: color var(--t-press), background-color var(--t-press);
}
.nav a span { display: inline-flex; flex-direction: column; align-items: center; }
.nav a span::after { content: attr(data-label); font-weight: 600; height: 0; visibility: hidden; overflow: hidden; }
.nav a[aria-current="page"] { color: var(--label); font-weight: 600; }
@media (hover: hover) { .nav a:hover { color: var(--label); background: var(--hover); } }
.nav a:active { background: var(--fill); }

.bar-title {
  grid-column: 2; font: 600 17px/22px var(--font-text); letter-spacing: -.01em; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw;
  opacity: 0; transform: translateY(4px); transition: opacity .2s linear, transform .2s var(--ease);
}
.bar.titled .bar-title { opacity: 1; transform: none; }
.bar-end { grid-column: 3; justify-self: end; display: flex; align-items: center; }
.search-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 36px; height: 36px; border-radius: 50%; color: var(--label);
  transition: background-color var(--t-press);
}
.search-btn:active { background: var(--fill); }
.search-btn-l, .search-btn kbd { display: none; }
@media (pointer: coarse) { .search-btn { position: relative; } }   /* its 44px tap area: see .btn-round */

@media (min-width: 768px) {
  .nav { display: flex; grid-column: 2; }
  .bar-title { display: none; }
  .search-btn {
    width: auto; min-width: 200px; height: 34px; padding: 0 8px 0 10px; border-radius: 10px; justify-content: flex-start;
    background: var(--fill); color: var(--label-2f); font: 400 15px/20px var(--font-text);
  }
  .search-btn:hover { background: var(--fill-2); }
  .search-btn-l { display: inline; flex: 1; text-align: left; }
  .search-btn kbd {
    display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px;
    font: 500 12px/1 var(--font-text); color: var(--label-2); background: var(--card); box-shadow: 0 0 0 .5px var(--sep);
  }
}
@media (min-width: 768px) and (max-width: 1023.98px) {
  .search-btn { min-width: 0; width: 36px; padding: 0; justify-content: center; border-radius: 50%; }
  .search-btn-l, .search-btn kbd { display: none; }
  .nav a { padding: 6px 9px; }
}

/* ---------------------------------------------------------------------------------------------- tab bar (phones) */

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  height: var(--tab-space);
  padding: 0 max(4px, var(--safe-l)) var(--safe-b) max(4px, var(--safe-r));
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--bar-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-top: .5px solid var(--sep);
  view-transition-name: tabbar;
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding-top: 3px; color: var(--label-2);
  font: 500 10px/12px var(--font-text); letter-spacing: .01em;
  transition: opacity var(--t-press);
}
.tab svg { width: 25px; height: 25px; }
.tab[aria-current="page"] { color: var(--label); }
.tab:active { opacity: .55; }
@media (min-width: 768px) { .tabbar { display: none; } }
/* short screens (landscape phones, 200% zoom): a compact bar with each icon beside its label, as iOS does */
@media (max-width: 767px) and (max-height: 500px) {
  :root { --tab-h: 34px; }
  .tab { flex-direction: row; gap: 6px; padding-top: 0; font-size: 12px; line-height: 16px; }
  .tab svg { width: 20px; height: 20px; }
}

/* ---------------------------------------------------------------------------------------------- footer */

.foot { padding: 8px 0 28px; }
.foot-in {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 8px;
  font: 400 13px/18px var(--font-text); color: var(--label-2); text-align: center;
}
.foot a {
  color: var(--label-2); text-decoration: underline; text-decoration-color: var(--sep); text-underline-offset: 3px;
  padding: 12px 6px; margin: -12px -6px;   /* a bigger tap area without moving the text */
}
.foot a:hover { color: var(--label); }
.foot-sep { color: var(--label-3); }

/* ---------------------------------------------------------------------------------------------- motion */

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 200ms; animation-timing-function: ease; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; scroll-behavior: auto !important; }
}

/* Components: cards, lists and rows, pills, bars, segmented control, stats, chips, tags, buttons, tooltip, sheets,
   search, toast, share sheet. */

/* ---------------------------------------------------------------------------------------------- cards */

.card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  min-width: 0;
}
.card.flush { padding: 0; overflow: clip; }
.card.flush > .card-h { padding: 16px 16px 10px; margin: 0; }
.card-pad { padding: 0 16px 12px; }
@media (min-width: 768px) {
  .card { padding: 20px; }
  .card.flush { --row-x: 20px; }   /* list rows and group headers line up with the card title */
  .card.flush > .card-h { padding: 18px 20px 10px; }
  .card-pad { padding: 0 20px 12px; }
}
.card-h { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.card-ht { flex: 1; min-width: 0; }
.card-title { font: 600 20px/25px var(--font-display); letter-spacing: -.01em; }
.card-cap { margin-top: 2px; font: 400 13px/18px var(--font-text); color: var(--label-2); }
.card-h > .btn-round { margin-top: -3px; margin-right: -4px; }

/* whole-card link: the title link stretches over the card; controls sit above it */
.card-link { display: inline-flex; align-items: center; gap: 3px; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 0; }
.card-link:focus-visible { outline: none; }
.card:has(.card-link:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.card-link-chev { color: var(--label-3); margin-top: 1px; }
.card:has(.card-link) .btn-round, .card:has(.card-link) .seg { position: relative; z-index: 1; }
.card:has(.card-link) { transition: transform var(--t-press) ease; }
.card:has(.card-link:active) { transform: scale(.985); }

/* ---------------------------------------------------------------------------------------------- buttons */

.btn-round {
  position: relative;
  flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--fill); color: var(--label);
  transition: background-color var(--t-press);
}
.btn-round:active { background: var(--fill-2); }
@media (hover: hover) { .btn-round:hover { background: var(--fill-2); } }
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; padding: 7px 16px; border-radius: 99px;
  background: var(--fill); color: var(--label);
  font: 600 15px/20px var(--font-text); letter-spacing: -.01em; white-space: nowrap;
  transition: background-color var(--t-press);
}
.btn:active { background: var(--fill-2); }
@media (hover: hover) { .btn:hover { background: var(--fill-2); } }
.btn-s { min-height: 30px; padding: 5px 12px; font-size: 13px; line-height: 18px; }
/* touch: small buttons keep their look but take taps over at least 44 × 44px (Apple's minimum) */
@media (pointer: coarse) {
  .btn::after, .btn-round::after, .search-btn::after, .back::after {
    content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: max(100%, 44px);
    transform: translate(-50%, -50%); border-radius: 99px;
  }
}

/* ---------------------------------------------------------------------------------------------- lists and rows */

.list { container-type: inline-size; }
.row {
  position: relative; display: flex; align-items: stretch; width: 100%;
  min-height: 60px; padding-left: var(--row-x, 16px); text-align: left; color: var(--label);
  transition: background-color var(--t-press);
}
.row-in {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px;
  padding: 9px var(--row-x, 16px) 9px 0; border-top: .5px solid var(--sep);
}
.list > .row:first-child > .row-in, .list-h + .row > .row-in { border-top-color: transparent; }
a.row:active, button.row:active, .row.active { background: var(--fill); }
@media (hover: hover) { a.row:hover, button.row:hover { background: var(--hover); } a.row:active { background: var(--fill); } }
a.row:focus-visible, button.row:focus-visible { outline-offset: -2px; border-radius: 10px; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-title {
  font: 600 17px/22px var(--font-text); letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row-sub, .row-meta {
  font: 400 15px/20px var(--font-text); color: var(--label-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row-meta { font-size: 13px; line-height: 18px; margin-top: 1px; }
.chev { flex: none; color: var(--label-3); margin-right: -6px; display: grid; place-items: center; }
.row-ico { flex: none; align-self: center; display: grid; place-items: center; width: 30px; height: 30px; margin-right: 12px; border-radius: 8px; background: var(--fill); color: var(--label); }
.row-more { min-height: 48px; }
.row-more .row-title { font-weight: 400; }
.list-h {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding: 16px var(--row-x, 16px) 6px; font: 600 15px/20px var(--font-text); color: var(--label);
}
.list-hc { font-weight: 400; color: var(--label-2); font-variant-numeric: tabular-nums; }
.list > .list-h:first-child { padding-top: 6px; }

/* race rows */
.race-row .rs-l { display: none; }
.row-spark { display: none; flex: none; }
.inc {
  display: inline-block; margin-left: 4px; padding: 0 4px; border-radius: 4px;
  font: 600 11px/16px var(--font-text); color: var(--label-2f); background: var(--fill); vertical-align: 1px;
}
@container (min-width: 420px) { .row-spark { display: block; } }
@container (min-width: 560px) { .race-row .rs-s { display: none; } .race-row .rs-l { display: inline; } }

/* ---------------------------------------------------------------------------------------------- pill */

.pill {
  flex: none; display: inline-flex; align-items: center; justify-content: flex-end;
  min-width: 68px; height: 28px; padding: 0 8px; border-radius: 6px;
  background: var(--c, var(--toss)); color: var(--ci, var(--label));
  font: 700 15px/1 var(--font-text); letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.pill-s { min-width: 0; height: 22px; padding: 0 7px; border-radius: 5px; font-size: 13px; justify-content: center; font-weight: 600; }

/* ---------------------------------------------------------------------------------------------- probability bar, meter */

.pbar { display: flex; gap: 2px; height: 10px; }
.pbar-s { height: 6px; gap: 1.5px; }
.pbar-l { height: 12px; }
.pseg { flex: 1 1 0; min-width: 3px; background: var(--c); border-radius: 2px; }
.pseg:first-child { border-top-left-radius: 99px; border-bottom-left-radius: 99px; }
.pseg:last-child { border-top-right-radius: 99px; border-bottom-right-radius: 99px; }

.meter { display: block; height: 6px; border-radius: 99px; background: var(--fill); overflow: hidden; }
.meter-f { display: block; height: 100%; border-radius: 99px; background: var(--c); min-width: 3px; }

.dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 6px; vertical-align: 1px; }

/* ---------------------------------------------------------------------------------------------- hero numerals */

.hero {
  display: inline-flex; align-items: flex-start;
  font: 700 56px/1 var(--font-rounded); letter-spacing: -.03em;
  font-variant-numeric: proportional-nums;
}
.hero-xl { font-size: 64px; }
.hero-m { font-size: 40px; }
.hero-pct { font-size: .5em; line-height: 1; margin: .12em 0 0 .04em; letter-spacing: 0; }
.hero-cmp { font-size: .55em; line-height: 1; margin: .1em .04em 0 0; }

/* ---------------------------------------------------------------------------------------------- segmented control */

.seg {
  position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  height: 32px; padding: 2px; border-radius: 9px; background: var(--fill);
  user-select: none; -webkit-user-select: none;
}
.seg-thumb {
  position: absolute; top: 2px; bottom: 2px; left: 2px;
  width: calc((100% - 4px) / var(--n));
  transform: translateX(calc(var(--i) * 100%));
  border-radius: 7px; background: var(--thumb); box-shadow: var(--shadow-thumb);
  transition: transform .25s var(--ease);
}
.seg button {
  position: relative; z-index: 1; min-width: 0; padding: 0 8px; border-radius: 7px;
  font: 500 15px/20px var(--font-text); letter-spacing: -.01em; color: var(--label-2f);
  white-space: nowrap;
  transition: opacity var(--t-press), color .2s linear;
}
.seg button > [data-label] { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* the selected segment reads darker and bolder, not only by its thumb */
.seg button[aria-checked="true"] { color: var(--label); font-weight: 600; }
.seg button:not([aria-checked="true"]):active { opacity: .55; }
.seg button + button::before {
  content: ""; position: absolute; left: -.5px; top: 7px; bottom: 7px; width: 1px; border-radius: 1px;
  background: var(--sep); transition: opacity .2s;
}
.seg button[aria-checked="true"]::before, .seg button[aria-checked="true"] + button::before { opacity: 0; }
.seg button:focus-visible { outline-offset: -2px; }
.seg-s { height: 28px; }
.seg-s button { font-size: 13px; }
@media (pointer: coarse) {
  .seg-s { height: 32px; }
  .seg button::after { content: ""; position: absolute; inset: -8px 0; }   /* 44px tall tap area */
}

/* views of one card switched by a segmented control (UI.views): stacked in one grid cell, so the card keeps the
   height of its tallest view and switching never moves the page; each view's chart sits at the bottom */
.vw-seg { max-width: 360px; margin: -2px 0 14px; }
.vw-stack { display: grid; grid-template-columns: minmax(0, 1fr); }
.vw-pane { grid-area: 1 / 1; min-width: 0; display: flex; flex-direction: column; }
.vw-pane > .chart { margin-top: auto; }
.vw-cap { display: inline-grid; }
.vw-cap > * { grid-area: 1 / 1; }
.vw-pane[data-off], .vw-cap > [data-off] { visibility: hidden; }

/* ---------------------------------------------------------------------------------------------- stats */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px 16px; }
.stat { min-width: 0; }
.stat-l { font: 400 13px/18px var(--font-text); color: var(--label-2); }
.stat-v { font: 700 22px/28px var(--font-display); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.stat-t1 .stat-v { font-size: 28px; line-height: 34px; letter-spacing: -.02em; }
.stat-s { font: 400 12px/16px var(--font-text); color: var(--label-2); margin-top: 1px; }

/* ---------------------------------------------------------------------------------------------- chips, tags, deltas */

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 99px;
  background: var(--fill); color: var(--label); font: 500 15px/20px var(--font-text); white-space: nowrap;
  transition: background-color var(--t-press), color var(--t-press);
}
button.chip:active { background: var(--fill-2); }
.chip[aria-pressed="true"] { background: var(--label); color: var(--card); }
.chip-static { height: 28px; padding: 0 11px; font-size: 13px; line-height: 18px; color: var(--label-2f); }
.tag {
  display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 4px;
  font: 600 11px/16px var(--font-text); letter-spacing: .01em; color: var(--label-2f); background: var(--fill);
  vertical-align: 2px; white-space: nowrap;
}
.tag-new { color: var(--label); }
/* [s8-band] a chance's model range, under its number */
.band {
  display: block; margin-top: 4px; font: 400 13px/18px var(--font-text); color: var(--label-2);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.rp-num .band { margin-top: 6px; }
.ch-cap .band { margin-top: 0; }
/* [s8-beta] the Beta badge (by the wordmark, in the footer) */
.beta {
  display: inline-block; padding: 0 7px; border-radius: 99px;
  font: 600 11px/18px var(--font-text); letter-spacing: .02em; color: var(--label-2f); background: var(--fill);
  white-space: nowrap;
}
.brand .beta { margin-left: -3px; }
.delta { display: inline-flex; align-items: center; gap: 2px; color: var(--label-2); font-variant-numeric: tabular-nums; }
.delta .ico { width: 10px; height: 10px; }

/* ---------------------------------------------------------------------------------------------- legend, grids */

.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 12px; font: 400 15px/20px var(--font-text); }
.legend li { display: inline-flex; align-items: center; }
.legend-l { color: var(--label-2); }
.legend b { margin-left: 6px; font-weight: 600; font-variant-numeric: tabular-nums; }

.grid-2, .grid-3 { display: grid; grid-template-columns: 1fr; gap: var(--gap); align-items: start; }
.grid-2 > *, .grid-3 > * { min-width: 0; }
@media (min-width: 900px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ---------------------------------------------------------------------------------------------- empty / error */

.empty { font: 400 15px/20px var(--font-text); color: var(--label-2); }
.error-state { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 12px; text-align: center; color: var(--label-2); }
.error-state p { font: 400 15px/20px var(--font-text); max-width: 34ch; }
.spin {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid var(--fill-2); border-top-color: var(--label-2);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------------------------------------- tooltip */

.tip {
  position: fixed; left: 0; top: 0; z-index: 120; pointer-events: none;
  max-width: 260px; padding: 8px 11px; border-radius: 10px;
  background: var(--elevated); color: var(--label); box-shadow: var(--shadow-float);
  font: 400 13px/18px var(--font-text); font-variant-numeric: tabular-nums;
  opacity: 0; transition: opacity .12s linear;
}
.tip.on { opacity: 1; }
.tip > b { display: block; font: 600 15px/20px var(--font-text); }
.tip > span { display: block; color: var(--label-2); }
.tip .tip-sub { font-size: 12px; line-height: 16px; }
.tip .tip-row { display: flex; align-items: center; gap: 6px; color: var(--label); }
.tip .tip-row b { margin-left: auto; padding-left: 10px; font-weight: 600; }
.tip-sw { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
/* touch "select, then open": the tip holds an "Open race" link */
.tip.tip-act.on { pointer-events: auto; }
.tip .tip-go {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  margin: 8px -11px -8px; padding: 12px 11px; min-height: 44px; border-top: .5px solid var(--sep);
  font: 600 15px/20px var(--font-text); color: var(--label);
}
.tip .tip-go .ico { color: var(--label-3); }
.tip .tip-go:active { background: var(--fill); border-radius: 0 0 10px 10px; }

/* ---------------------------------------------------------------------------------------------- sheets */

.sheet-scrim {
  position: fixed; inset: 0; z-index: 90; background: var(--scrim);
  opacity: 0; transition: opacity var(--t-sheet) linear;
}
.sheet-scrim.open { opacity: 1; }
.sheet {
  position: fixed; z-index: 100; left: 0; right: 0; bottom: 0;
  max-height: calc(100% - var(--safe-t) - 40px);
  display: flex; flex-direction: column;
  background: var(--sheet); color: var(--label);
  border-radius: 14px 14px 0 0;
  padding-bottom: var(--safe-b);
  box-shadow: var(--shadow-float);
  transform: translateY(100%);
  transition: transform var(--t-sheet) var(--ease);
  outline: none;
  overscroll-behavior: contain;
}
.sheet.open { transform: none; }
.sheet-grab { width: 36px; height: 5px; border-radius: 3px; background: var(--label-3); opacity: .5; margin: 6px auto 0; flex: none; }
.sheet-h { display: flex; align-items: center; gap: 12px; padding: 10px 16px 12px; flex: none; touch-action: none; }
.sheet-title { flex: 1; min-width: 0; font: 600 17px/22px var(--font-text); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-x { width: 30px; height: 30px; color: var(--label-2); }
.sheet-b { flex: 1; min-height: 0; overflow: auto; padding: 0 16px 16px; -webkit-overflow-scrolling: touch; }
@media (min-width: 768px) {
  .sheet {
    left: 50%; right: auto; bottom: auto; top: 50%;
    width: min(560px, calc(100% - 48px)); max-height: min(760px, calc(100% - 64px));
    border-radius: 18px; padding-bottom: 0;
    transform: translate(-50%, -47%) scale(.97); opacity: 0;
    transition: transform var(--t-sheet) var(--ease), opacity .18s linear;
  }
  .sheet.open { transform: translate(-50%, -50%); opacity: 1; }
  .sheet-grab { display: none; }
  .sheet-h { padding: 16px 16px 12px 20px; }
  .sheet-b { padding: 0 20px 20px; }
}

/* ---------------------------------------------------------------------------------------------- share sheet */

.share-prev {
  position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 12px; background: #ffffff; box-shadow: 0 0 0 .5px var(--sep), 0 2px 10px rgba(0, 0, 0, .06);
}
.share-prev img { width: 100%; height: 100%; object-fit: contain; }
.share-prev img:not([hidden]) + .spin { display: none; }
.share-prev .spin { border-color: rgba(118, 118, 128, .2); border-top-color: #6e6e73; }
.share-prev .empty { padding: 16px; text-align: center; color: #6e6e73; }
.share-acts { margin-top: 16px; background: var(--card); border-radius: 12px; overflow: hidden; }
.share-acts .row { min-height: 50px; }
.share-acts .row .ico { color: var(--label); }
.share-acts .row-title { font-weight: 400; }
.share-acts .row > .row-in { border-top-color: var(--sep); }
.share-acts .row:first-child > .row-in, .share-acts .row[hidden] + .row > .row-in { border-top-color: transparent; }
.share-acts .row:not([hidden]) ~ .row:not([hidden]) > .row-in { border-top-color: var(--sep); }
.share-name { margin-top: 10px; text-align: center; font: 400 12px/16px var(--font-text); color: var(--label-2); word-break: break-all; }
@media (prefers-color-scheme: dark) { .sheet-share { --card: #2c2c2e; } .sheet-share .row:active { background: #3a3a3c; } }

/* ---------------------------------------------------------------------------------------------- search sheet */

.sheet-search { top: 0; max-height: none; border-radius: 0; padding-top: var(--safe-t); background: var(--page); transform: none; opacity: 0; transition: opacity .18s linear; }
.sheet-search.open { opacity: 1; }
.sheet-search .sheet-b { padding: 0; display: flex; flex-direction: column; }
.search-top { display: flex; align-items: center; gap: 12px; padding: 8px max(16px, var(--safe-r)) 8px max(16px, var(--safe-l)); flex: none; }
.search-field {
  flex: 1; display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: 10px;
  background: var(--fill); color: var(--label-2);
}
.search-field input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--label);
  font: 400 17px/22px var(--font-text); letter-spacing: -.01em; -webkit-appearance: none; appearance: none;
}
.search-field input::placeholder { color: var(--label-2f); opacity: 1; }
.search-field input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-field:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.search-cancel { font: 400 17px/22px var(--font-text); color: var(--label); padding: 6px 0; }
.search-res { flex: 1; overflow: auto; padding: 0 max(16px, var(--safe-r)) 24px max(16px, var(--safe-l)); overscroll-behavior: contain; }
.search-res .list { background: var(--card); border-radius: 12px; overflow: clip; }
.search-res .list-h { padding: 18px 4px 6px; font-size: 13px; line-height: 18px; color: var(--label-2); font-weight: 600; }
.search-res > .sr-group:first-child > .list-h { padding-top: 8px; }
.search-empty { padding: 32px 8px; text-align: center; color: var(--label-2); font: 400 15px/20px var(--font-text); }
@media (min-width: 768px) {
  .sheet-search {
    top: 10vh; bottom: auto; left: 50%; right: auto; width: min(560px, calc(100% - 48px));
    max-height: min(640px, 80vh); padding-top: 0;
    border-radius: 18px; background: var(--sheet);
    transform: translate(-50%, -8px); opacity: 0;
    transition: transform .2s var(--ease), opacity .15s linear;
  }
  .sheet-search.open { transform: translate(-50%, 0); opacity: 1; }
  .search-top { padding: 12px 12px 10px 14px; }
  .search-cancel { display: none; }
  .search-res { padding: 0 12px 14px; }
}
@media (min-width: 768px) and (prefers-color-scheme: dark) { .sheet-search { --card: #2c2c2e; background: #1c1c1e; } }

/* ---------------------------------------------------------------------------------------------- toast */

.toast {
  position: fixed; z-index: 130; left: 50%; bottom: calc(var(--tab-space) + 20px);
  display: flex; align-items: center; gap: 8px; padding: 11px 18px 11px 14px; border-radius: 99px;
  background: var(--elevated); color: var(--label); box-shadow: var(--shadow-float);
  font: 600 15px/20px var(--font-text);
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  transition: transform .25s var(--ease), opacity .2s linear;
}
.toast.on { transform: translate(-50%, 0); opacity: 1; }

/* ---------------------------------------------------------------------------------------------- not found */

.nf-text { font: 400 17px/22px var(--font-text); color: var(--label-2); }
.nf-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

@media (max-width: 359.98px) {
  .seg button { padding: 0 4px; font-size: 14px; letter-spacing: -.02em; }
}

/* ---------------------------------------------------------------------------------------------- forced colours */
/* Windows high-contrast themes drop backgrounds: keep the data fills, draw control edges and mark what is selected */

@media (forced-colors: active) {
  .pill, .pseg, .meter-f, .dot, .tip-sw { forced-color-adjust: none; }
  .seg-thumb { display: none; }
  .seg, .btn, .btn-round, .chip, .search-field, .search-btn { border: 1px solid ButtonText; }
  .seg button[aria-checked="true"], .chip[aria-pressed="true"] {
    forced-color-adjust: none; background: Highlight; color: HighlightText;
  }
  .seg button + button::before { background: ButtonText; }
  .meter { border: 1px solid CanvasText; }
  .tip, .sheet, .toast { border: 1px solid CanvasText; }
}

/* Charts: slots, SVG text, interaction. */

.chart { position: relative; width: 100%; min-width: 0; }
.chart > svg { display: block; overflow: visible; width: 100%; height: 100%; }
.chart text { font-variant-numeric: tabular-nums; }
.chart svg:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 6px; }
.c-line, .c-seats, .c-margin, .c-polls, .c-waffle { touch-action: pan-y; }
.c-line { cursor: crosshair; }
.c-map a.tile, .c-waffle a { cursor: pointer; }
.c-map .tile-r, .c-waffle a > rect { transition: opacity var(--t-press); }
@media (hover: hover) {
  .c-map a.tile:hover > .tile-r, .c-waffle a:hover > rect { opacity: .78; }
}
.c-map a.tile:focus-visible { outline: none; }
.c-map a.tile:focus-visible > .tile-r { stroke: var(--focus); stroke-width: 2px; }
.spark { display: block; overflow: visible; }

/* Stocks-style headline above a scrubbable chart */
.hl { margin-bottom: 8px; }
.hl-v { font: 700 28px/34px var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hl-c { font: 400 13px/18px var(--font-text); color: var(--label-2); font-variant-numeric: tabular-nums; }
.hl.scrubbing .hl-c { color: var(--label); }

/* Overview page. */

/* chamber cards */
.ov-chambers { display: grid; grid-template-columns: 1fr; gap: var(--gap); }
@media (min-width: 900px) { .ov-chambers { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 600px) and (max-width: 899.98px) { .ov-chambers { grid-template-columns: repeat(2, 1fr); } .ov-chambers > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
.ch-card { display: flex; flex-direction: column; }
.ch-card .card-h { margin-bottom: 6px; }
.ch-card .card-title { font: 600 20px/25px var(--font-display); }
.ch-main { display: flex; align-items: flex-end; gap: 16px; }
.ch-num { flex: none; }
.ch-party { font: 600 17px/22px var(--font-text); letter-spacing: -.01em; }
.ch-num .hero { margin: 4px 0 2px -2px; }
.ch-cap { margin: 2px 0 14px; font: 400 13px/18px var(--font-text); color: var(--label-2); }
/* the change in chance sits with the chance it describes, under its caption */
.ch-chg { display: flex; align-items: center; gap: 4px; margin-top: 1px; font-variant-numeric: tabular-nums; }
.ch-chg .delta { gap: 3px; }
.ch-spark { flex: 1; min-width: 0; max-width: 260px; margin-left: auto; padding-bottom: 1px; pointer-events: none; }
.ch-spark-l { display: flex; justify-content: space-between; margin-top: 4px; font: 400 11px/13px var(--font-text); color: var(--label-2); }
/* bars and median lines stay level across a row of cards when only some show a change */
.ch-card .pbar { margin-top: auto; }
.ch-foot { margin-top: 12px; font: 500 13px/18px var(--font-text); color: var(--label); font-variant-numeric: tabular-nums; }

/* both chambers */
.jt-card .card-h { margin-bottom: 14px; }
@media (min-width: 900px) {
  .jt-card { display: grid; grid-template-columns: minmax(200px, 1fr) 2fr; column-gap: 32px; align-items: center; }
  .jt-card .card-h { margin: 0; grid-row: 1 / 3; }
  .jt-card .pbar { align-self: end; }
  .jt-card .jt-legend { margin-top: 10px; align-self: start; }
}

/* columns: races to watch + changes | latest polls */
.ov-cols { display: grid; grid-template-columns: 1fr; gap: var(--gap); align-items: start; }
.ov-col { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
@media (min-width: 900px) { .ov-cols { grid-template-columns: 1.1fr 1fr; } }
.seg-wrap { padding-top: 2px; padding-bottom: 8px; }

/* keeps a name and its number, or a date range, together when a line wraps */
.ov-nw { white-space: nowrap; }

/* latest changes */
.mv { display: inline-flex; align-items: center; gap: 6px; font: 400 15px/20px var(--font-text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mv-a { color: var(--label-2); }
.mv-arrow { color: var(--label-3); }
.mv-b { font-weight: 600; }
.mv-tri { width: 12px; height: 12px; color: var(--label-2); margin-left: 1px; }
.mv-row .row-title, .mv-row .row-sub { white-space: normal; }
.mv-row .row-sub .dot { margin-right: 5px; }

/* latest polls */
.poll-row .row-sub { color: var(--label); }
.poll-m { flex: none; display: inline-flex; align-items: center; font: 600 15px/20px var(--font-text); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* results wrap rather than cut off a candidate's number on narrow screens and at high zoom */
.poll-row .row-title, .poll-row .row-sub, .poll-row .row-meta { white-space: normal; }

/* national picture */
.nat-row { min-height: 64px; }
.nat-row .row-sub { font-size: 13px; line-height: 18px; white-space: normal; }
.nat-viz { display: none; flex: none; }
.nat-v { flex: none; min-width: 58px; text-align: right; font: 600 20px/25px var(--font-display); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
@container (min-width: 340px) { .nat-viz { display: block; } }

/* Chamber pages (/senate/, /house/, /governors/). */

/* ---------------------------------------------------------------------------------------------- hero */

.chm-hero-in { container-type: inline-size; }
.chm-cap { font: 400 13px/18px var(--font-text); color: var(--label-2); margin-bottom: 8px; }
.chm-nums {
  display: grid; grid-template-columns: 1fr auto 1fr; grid-template-areas: "d n r";
  align-items: end; gap: 6px 16px; margin-bottom: 14px;
}
.chm-side { min-width: 0; }
.chm-side-D { grid-area: d; }
.chm-side-R { grid-area: r; text-align: right; }
.chm-party { font: 600 17px/22px var(--font-text); letter-spacing: -.01em; }
.chm-side .hero { margin-top: 4px; }
.chm-side-D .hero { margin-left: -2px; }
.chm-none { grid-area: n; text-align: center; padding-bottom: 9px; }
.chm-none b { display: block; font: 700 24px/28px var(--font-rounded); letter-spacing: -.01em; }
.chm-none span { display: block; font: 400 13px/18px var(--font-text); color: var(--label-2); }
.chm-stats {
  margin-top: 18px; padding-top: 14px; border-top: .5px solid var(--sep);
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
}
.chm-stats .stat-s { max-width: 30ch; }
.chm-nw { white-space: nowrap; }
@container (max-width: 459.98px) {
  .chm-nums { grid-template-columns: 1fr 1fr; grid-template-areas: "d r" "n n"; }
  .chm-side .hero { font-size: 56px; }
  .chm-none { display: flex; justify-content: center; align-items: baseline; gap: 5px; padding: 2px 0 0; }
  .chm-none b { display: inline; font: 600 15px/20px var(--font-text); }
  .chm-none span { display: inline; font-size: 15px; line-height: 20px; }
  .chm-none-0 { display: none; }
}

/* ---------------------------------------------------------------------------------------------- chart cards */

.chm-hl .hl-v { display: flex; flex-wrap: wrap; gap: 2px 24px; font: inherit; }
.chm-hl-i { display: inline-flex; flex-direction: column; min-width: 0; }
.chm-hl-l { font: 400 13px/18px var(--font-text); color: var(--label-2); white-space: nowrap; }
.chm-hl .hero { margin: 2px 0 2px -1px; }
.chm-hl .hl-c { margin-top: 2px; }
.chm-na { color: var(--label-3); }
/* forecast over time, seats view: "52 seats" (the numeral and its unit on one baseline) */
.chm-seat { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; }
.chm-seat-u { font: 600 17px/22px var(--font-text); letter-spacing: -.01em; color: var(--label-2); white-space: nowrap; }
@media (max-width: 379.98px) {
  .chm-hl .hl-v { column-gap: 18px; }
  .chm-hl .hero-m { font-size: 34px; }
}

/* map: "Pick winners" toggle */
.chm-pickbtn { height: 30px; padding: 0 12px; font-size: 14px; line-height: 18px; margin-top: -2px; }
.chm-map.picking .c-map a.tile { cursor: pointer; }
.chm-mapsum { margin-top: 14px; padding-top: 12px; border-top: .5px solid var(--sep); }

/* ---------------------------------------------------------------------------------------------- pick the winners */

.chm-psum {
  position: sticky; top: calc(var(--bar-h) + var(--safe-t)); z-index: 3;
  padding: 2px 16px 12px; background: var(--card); border-bottom: .5px solid var(--sep);
}
@media (min-width: 768px) { .chm-psum { padding: 2px 20px 14px; } }
/* short viewports (landscape phones, 200% zoom): a stuck summary would cover too much of the list */
@media (max-height: 500px) { .chm-psum { position: static; } }
/* a control that takes keyboard focus scrolls clear of the stuck summary (about 104px tall) */
.chm-prow :is(a, button, input, [tabindex]) { scroll-margin-top: 112px; }
@media (max-height: 500px) { .chm-prow :is(a, button, input, [tabindex]) { scroll-margin-top: 0; } }

.chm-sum-row { display: flex; align-items: center; gap: 12px; }
.chm-sum-bar { flex: 1; min-width: 0; }
.chm-sum-v { flex: none; min-width: 60px; display: flex; }
.chm-sum-v[data-v="R"] { justify-content: flex-end; }
.chm-sum .hero { font-size: 30px; }
.chm-sum-labs {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; margin-top: 1px;
  font: 400 12px/16px var(--font-text); color: var(--label-2);
}
.chm-sum-labs > :nth-child(2) { text-align: center; }
.chm-sum-labs > :last-child { text-align: right; }
.chm-sum-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: 10px;
  font: 400 13px/18px var(--font-text); color: var(--label-2); font-variant-numeric: tabular-nums;
}
.chm-sum-st { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.chm-sum-st b { font-weight: 600; color: var(--label); }
.chm-sum-st .ico { flex: none; color: var(--label); }
.chm-sum[data-kind="few"] .chm-sum-st, .chm-sum[data-kind="empty"] .chm-sum-st, .chm-sum[data-kind="error"] .chm-sum-st { color: var(--label); }
.chm-sum[data-kind="loading"] .chm-sum-row, .chm-sum[data-kind="loading"] .chm-sum-labs { opacity: .4; transition: opacity .2s linear; }
.chm-spin { width: 14px; height: 14px; border-width: 2px; }
.chm-sum .btn[aria-disabled="true"] { opacity: .5; cursor: default; background: var(--fill); }
.chm-retry { font-weight: 600; color: var(--label); text-decoration: underline; text-underline-offset: 2px; }
.chm-pseg-na { opacity: .5; }

.chm-ptools { padding: 12px 16px 4px; }
@media (min-width: 768px) { .chm-ptools { padding: 14px 20px 4px; } }

.chm-plist { display: grid; grid-template-columns: minmax(0, 1fr); }
.chm-prow { position: relative; container-type: inline-size; min-width: 0; padding: 0 16px; }
.chm-prow + .chm-prow::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--sep); }
.chm-prow-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 11px 0 12px; }
.chm-prow-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.chm-prow-t { min-width: 0; font: 600 17px/22px var(--font-text); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chm-prow-h .pill { flex: none; }
@container (min-width: 440px) {
  .chm-prow-in { grid-template-columns: minmax(0, 1fr) minmax(220px, 280px); align-items: center; column-gap: 14px; }
}
@media (min-width: 768px) {
  .chm-prow { padding: 0 20px; }
  .chm-prow + .chm-prow::before { left: 20px; }
}
@media (min-width: 900px) {
  /* two columns, read left to right */
  .chm-plist { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; padding: 0 20px; }
  .chm-prow { padding: 0; }
  .chm-prow + .chm-prow::before { left: 0; }
  .chm-prow:nth-child(2)::before { display: none; }
}
.chm-pmore { display: flex; justify-content: center; padding: 6px 16px 16px; }
.chm-pempty { padding: 14px 16px 18px; }

/* the 3-state pick control: [D-side | – | R-side]; the picked side's thumb takes the candidate's party colour */
.chm-ps { height: 32px; grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr); }
.chm-ps .seg-thumb {
  transform: none; width: calc((100% - 40px) / 2);
  transition: left .25s var(--ease), width .25s var(--ease), background-color .2s linear;
}
.chm-ps[data-i="0"] .seg-thumb { left: 2px; }
.chm-ps[data-i="1"] .seg-thumb { left: calc(2px + (100% - 40px) / 2); width: 36px; }
.chm-ps[data-i="2"] .seg-thumb { left: calc(2px + (100% - 40px) / 2 + 36px); }
.chm-ps.picked .seg-thumb { background: var(--c); }
.chm-ps button { padding: 0 6px; font-size: 14px; }
.chm-ps.picked button[aria-checked="true"] { color: var(--ink-solid); }
.chm-ps.picked button[aria-checked="true"] .dot { background: var(--ink-solid); }
.chm-ps-n { display: flex; align-items: center; justify-content: center; min-width: 0; max-width: 100%; }
.chm-ps-n > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chm-ps-n .dot { margin-right: 5px; transition: background-color .2s linear; }
.chm-ps-x { color: var(--label-2); font-weight: 500; }

/* ---------------------------------------------------------------------------------------------- tipping point */

.chm-tp { flex: none; display: inline-flex; align-items: center; gap: 10px; }
.chm-tp-m { width: 64px; }
.chm-tp-v { min-width: 36px; text-align: right; font: 600 15px/20px var(--font-text); font-variant-numeric: tabular-nums; }
@container (min-width: 400px) { .chm-tp-m { width: 96px; } }
@container (min-width: 640px) { .chm-tp-m { width: 180px; } }

/* ---------------------------------------------------------------------------------------------- all races */

.chm-rtools { display: flex; flex-wrap: wrap; gap: 10px 12px; padding: 2px 16px 8px; }
@media (min-width: 768px) { .chm-rtools { padding: 2px 20px 8px; } }
.chm-rtools .seg { flex: 1 1 220px; max-width: 420px; }
.chm-filter {
  flex: 1 1 200px; display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 9px;
  background: var(--fill); color: var(--label-2);
}
.chm-rtools .chm-filter { max-width: 420px; }
.chm-filter input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--label);
  font: 400 16px/20px var(--font-text); -webkit-appearance: none; appearance: none;
}
.chm-filter input::placeholder { color: var(--label-2f); opacity: 1; }
.chm-filter input::-webkit-search-cancel-button { -webkit-appearance: none; }
.chm-filter:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
/* a race's runoff chance: its own line under the matchup */
.chm-sub1, .chm-runoff { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chm-runoff { font-size: 13px; line-height: 18px; margin-top: 1px; }

/* Race page. */

/* the race's facts under the title: one line of secondary text (capsules are for controls) */
.view-race .lt-chips { display: block; margin-top: 4px; }
.rp-meta { font: 400 15px/20px var(--font-text); color: var(--label-2); text-wrap: pretty; }
.rp-meta .dot { margin-right: 5px; }
.rp-fact { display: inline-block; }
@media (min-width: 1024px) { .rp-meta { font-size: 17px; line-height: 22px; } }

/* ---------------------------------------------------------------------------------------------- hero */

.rp-hero > .card-h { margin-bottom: 4px; }
.rp-hero > .card-h .card-title { padding-top: 2px; font: 400 13px/18px var(--font-text); letter-spacing: 0; color: var(--label-2); }
.view-race .card-cap { text-wrap: pretty; }
.rp-cands {
  display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr));
  grid-template-rows: auto auto auto; column-gap: 16px;
}
.rp-cand { display: grid; grid-row: span 3; grid-template-rows: subgrid; align-content: start; min-width: 0; }
.rp-s-R { text-align: right; justify-items: end; }
.rp-s-T { text-align: center; justify-items: center; }
.rp-name { font: 600 17px/22px var(--font-text); letter-spacing: -.01em; overflow-wrap: anywhere; }
.rp-party { margin-top: 2px; font: 400 13px/18px var(--font-text); color: var(--label-2); }
.rp-party .dot { margin-right: 5px; }
.rp-pn { white-space: nowrap; }
.rp-party .rp-inc { margin-left: 6px; vertical-align: 1px; }
.rp-caucus { display: block; font-size: 12px; line-height: 16px; }
.rp-num { margin-top: 8px; align-self: end; line-height: 1; }
.rp-num .hero { margin: 0 -2px; }
.rp-bar { margin-top: 16px; }
.rp-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 16px;
  margin: 16px 0 0; padding-top: 14px; border-top: .5px solid var(--sep);
}
.rp-facts dt { font: 400 13px/18px var(--font-text); color: var(--label-2); }
.rp-facts dd { margin: 1px 0 0; font: 600 17px/22px var(--font-text); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
@media (min-width: 768px) {
  .rp-hero .hero { font-size: 64px; }
  .rp-facts { grid-template-columns: repeat(auto-fit, minmax(220px, max-content)); column-gap: 48px; }
}
/* three candidates on a phone: smaller numerals so three fit side by side */
@media (max-width: 519.98px) {
  .rp-cands[style*="--n:3"] { column-gap: 10px; }
  .rp-cands[style*="--n:3"] .hero { font-size: 40px; }
  .rp-cands[style*="--n:3"] .rp-name { font-size: 15px; line-height: 20px; }
  .rp-cands[style*="--n:3"] .rp-party .rp-inc { display: none; }
}

/* uncontested */
.rp-hero-hold .rp-cands { row-gap: 0; }
.rp-hold { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding-top: 16px; border-top: .5px solid var(--sep); }
.rp-hold .pill { min-width: 0; }
.rp-hold-t { min-width: 0; }
.rp-hold-s { font: 700 22px/28px var(--font-display); letter-spacing: -.01em; }
.rp-hold-w { font: 400 15px/20px var(--font-text); color: var(--label-2); }

/* ---------------------------------------------------------------------------------------------- grids */

/* pairs of like cards: a two-column grid (an odd last card spans both columns) */
.rp-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); }
/* cards of uneven heights: two balanced columns, each card at its own height (no stretched, half-empty cards) */
.rp-cols > * + * { margin-top: var(--gap); }
@media (min-width: 900px) {
  .rp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rp-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .rp-cols { column-count: 2; column-gap: var(--gap); }
  .rp-cols > * { break-inside: avoid; margin: 0 0 var(--gap); }
  .rp-cols > :last-child { margin-bottom: 0; }
}

/* ---------------------------------------------------------------------------------------------- chance over time */

.rp-hl .hl-v { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px 28px; }
.rp-hlc { display: inline-flex; flex-direction: column; }
.rp-hln { font: 600 13px/18px var(--font-text); color: var(--label-2); letter-spacing: 0; }
.rp-hln .dot { margin-right: 5px; }
.rp-hl .hero { margin-left: -1px; }
@media (max-width: 519.98px) {
  .rp-hl-3 .hl-v { gap: 4px 16px; }
  .rp-hl-3 .hero { font-size: 32px; }
}

/* ---------------------------------------------------------------------------------------------- polls */

.rp-polls { container-type: inline-size; }
.rp-plegend {
  display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 6px;
  font: 400 12px/16px var(--font-text); color: var(--label-2);
}
.rp-plegend li { display: inline-flex; align-items: center; gap: 6px; }
.rp-lg-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--label-2); opacity: .7; }
.rp-lg-dot.rp-lg-out { background: var(--label-3); opacity: .45; }
.rp-lg-line { width: 16px; height: 2px; border-radius: 1px; background: var(--label-2); }

/* the table runs to the card's edges; --rp-in is the card's text inset */
.rp-tscroll { margin: 16px -16px 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (min-width: 768px) { .rp-tscroll { margin-left: -20px; margin-right: -20px; } }
.rp-table {
  --rp-in: 16px; width: 100%; border-collapse: separate; border-spacing: 0;
  font: 400 15px/20px var(--font-text); font-variant-numeric: tabular-nums;
}
@media (min-width: 768px) { .rp-table { --rp-in: 20px; } }
.rp-table th {
  padding: 6px 8px; text-align: left; white-space: nowrap;
  font: 600 12px/16px var(--font-text); color: var(--label-2);
}
.rp-table td { padding: 10px 8px; vertical-align: top; border-top: .5px solid var(--sep); }
.rp-table th:first-child, .rp-table td:first-child { padding-left: var(--rp-in); }
.rp-table th:last-child, .rp-table td:last-child { padding-right: var(--rp-in); }
/* hairlines start at the text inset and run to the right edge, like the lists: the row's first visible cell
   draws its part inset */
.rp-table td:first-child { position: relative; border-top: 0; }
.rp-table td:first-child::before {
  content: ""; position: absolute; top: 0; left: var(--rp-in); right: 0; border-top: .5px solid var(--sep);
}
.rp-c-date, .rp-c-n, .rp-c-res { white-space: nowrap; }
.rp-c-date { color: var(--label-2); }
.rp-c-n { color: var(--label-2); }
.rp-c-m { text-align: right; white-space: nowrap; }
.rp-table th.rp-c-m { text-align: right; }
.rp-who { font-weight: 500; }
.rp-pollster { color: var(--label); }
a.rp-pollster { text-decoration: none; }
.rp-nw { white-space: nowrap; }
.rp-ext { display: inline-block; margin-left: 4px; vertical-align: 0; color: var(--label-2); }
@media (hover: hover) {
  a.rp-pollster:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
}
.rp-partisan { color: var(--label-2); font-weight: 400; }
.rp-who .tag { margin-left: 0; vertical-align: 1px; }
.rp-sponsor { font: 400 13px/18px var(--font-text); color: var(--label-2); }
.rp-marg { display: inline-flex; align-items: center; font-weight: 600; }
.rp-m-res, .rp-m-meta { display: none; }
/* polls left out of the average: secondary text, a gray dot and the "Not in average" tag */
.rp-out td, .rp-out .rp-pollster { color: var(--label-2); }
.rp-out .rp-marg .dot { background: var(--toss); }
.rp-out .rp-marg { font-weight: 500; }
/* narrow cards: dates, sample and result move under the pollster, which becomes the first visible cell */
@container (max-width: 599.98px) {
  .rp-table .rp-c-date, .rp-table .rp-c-n, .rp-table .rp-c-res { display: none; }
  .rp-table th.rp-c-who, .rp-table td.rp-c-who { padding-left: var(--rp-in); }
  .rp-table td.rp-c-who { position: relative; border-top: 0; }
  .rp-table td.rp-c-who::before {
    content: ""; position: absolute; top: 0; left: var(--rp-in); right: 0; border-top: .5px solid var(--sep);
  }
  .rp-m-res { display: block; margin-top: 2px; color: var(--label); }
  .rp-m-meta { display: block; font: 400 13px/18px var(--font-text); color: var(--label-2); }
  .rp-out .rp-m-res { color: var(--label-2); }
  .rp-table td.rp-c-m { vertical-align: middle; }
}
.rp-more { display: flex; justify-content: center; padding-top: 12px; }
.rp-note { margin-top: 12px; font: 400 13px/18px var(--font-text); color: var(--label-2); text-wrap: pretty; }

/* ---------------------------------------------------------------------------------------------- ratings */

.rp-rrow .row-sub { font-size: 13px; line-height: 18px; }

/* ---------------------------------------------------------------------------------------------- the state / district */

.rp-prof { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 18px 24px; }
@media (min-width: 900px) { .rp-prof { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); column-gap: 32px; } }
.rp-pi { min-width: 0; }
.rp-pl { font: 400 13px/18px var(--font-text); color: var(--label-2); }
.rp-pv { margin: 1px 0 8px; font: 700 20px/25px var(--font-display); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.rp-pi .pbar { max-width: 260px; }
.rp-ps { margin-top: 6px; font: 400 12px/16px var(--font-text); color: var(--label-2); font-variant-numeric: tabular-nums; }
.rp-pv + .rp-ps { margin-top: -4px; }

/* ---------------------------------------------------------------------------------------------- footer line */

.rp-others { padding: 4px 4px 0; font: 400 13px/18px var(--font-text); color: var(--label-2); }

/* Polls page (/polls/) and About page (/about/). */

/* ---------------------------------------------------------------------------------------------- polls: controls */

.pl-tabs .seg { max-width: 440px; }
.pl-panel, .pl-list { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.pl-tools { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pl-search { flex: none; }
.pl-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
/* the clear button: an 18px gray disc in a 24px button (44px tap area on touch) */
.pl-clear {
  flex: none; position: relative; display: grid; place-items: center; width: 24px; height: 24px; margin-right: -5px;
  border-radius: 50%; color: var(--card);
}
.pl-clear::before { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--label-3); }
.pl-clear > .ico { position: relative; }
.pl-clear:active { opacity: .6; }
@media (pointer: coarse) {
  .pl-clear::after { content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); border-radius: 50%; }
}
/* a horizontal scroller also clips vertically: 4px of padding (cancelled by the margin) keeps the chips' focus
   ring (2px outline + 2px offset) visible */
.pl-chips {
  flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
  margin: -4px calc(-1 * var(--gutter)); padding: 4px var(--gutter);
}
.pl-chips::-webkit-scrollbar { display: none; }
.pl-chips .chip { flex: none; }
.pl-count { margin: -2px 0 -4px 2px; font: 400 13px/18px var(--font-text); color: var(--label-2); font-variant-numeric: tabular-nums; }
@media (max-width: 359.98px) {
  .pl-chips { gap: 6px; }
  .pl-chips .chip { padding: 0 11px; }
}
@media (min-width: 768px) {
  .pl-tools { flex-direction: row-reverse; align-items: center; justify-content: space-between; gap: 16px; }
  .pl-search { width: 320px; }
  .pl-chips { margin: 0; padding: 0; overflow: visible; }
}

/* ---------------------------------------------------------------------------------------------- polls: rows */

/* phones: name and lead on the first line (like Mail's sender and date), result and meta lines at full width */
.pl-row .row-in { padding-top: 10px; padding-bottom: 10px; }
.pl-row .row-title { display: flex; align-items: baseline; gap: 10px; white-space: normal; overflow: visible; }
.pl-h { flex: 1; min-width: 0; }
.pl-row .row-sub { color: var(--label); white-space: normal; margin-top: 1px; }
.pl-row .row-meta { white-space: normal; margin-top: 2px; }
.pl-row .chev { align-self: flex-start; margin-top: 2px; }
.pl-m {
  flex: none; display: inline-flex; align-items: center;
  font: 600 15px/20px var(--font-text); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.pl-mk { font-weight: 400; color: var(--label-2); margin-right: 5px; }

/* wide lists read as a table: race | pollster, dates, sample | result | lead */
@container (min-width: 800px) {
  .pl-row .row-in { padding-top: 9px; padding-bottom: 9px; }
  .pl-row .row-main {
    display: grid; grid-template-columns: minmax(0, 12.5rem) minmax(0, 1fr) minmax(0, 13.5rem) 9.5rem;
    column-gap: 20px; align-items: center; min-height: 40px;
  }
  .pl-row .row-title { display: contents; }
  .pl-h { grid-column: 1; grid-row: 1; }
  .pl-row .pl-meta { grid-column: 2; grid-row: 1; margin: 0; }
  .pl-row .row-sub { grid-column: 3; grid-row: 1; margin: 0; }
  .pl-m { grid-column: 4; grid-row: 1; }
  .pl-row .chev { align-self: center; margin-top: 0; }
  .pl-sep { display: none; }
  .pl-who, .pl-when { display: block; }
  .pl-who { font-size: 15px; line-height: 20px; color: var(--label); }
  /* national polls: pollster over dates | result | lead */
  .pl-nat .row-main { grid-template-columns: minmax(0, 1fr) minmax(0, 16rem) 7rem; }
  .pl-nat .pl-meta { grid-column: 1; grid-row: 2; margin-top: 1px; }
  .pl-nat .row-sub { grid-column: 2; grid-row: 1 / 3; }
  .pl-nat .pl-m { grid-column: 3; grid-row: 1 / 3; }
}

/* ---------------------------------------------------------------------------------------------- polls: more, charts */

.pl-more { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0 4px; }
.pl-of { font: 400 13px/18px var(--font-text); color: var(--label-2); font-variant-numeric: tabular-nums; }
.pl-none { padding-top: 20px; padding-bottom: 20px; }
.pl-hl { margin-bottom: 10px; }
.pl-hl .hl-v { font-family: var(--font-rounded); font-size: 34px; line-height: 40px; letter-spacing: -.02em; }

/* ---------------------------------------------------------------------------------------------- about */

/* one readable column, centred like a support article */
.view-about { max-width: calc(760px + 2 * var(--gutter)); }
.ab-cards { display: flex; flex-direction: column; gap: var(--gap); }
.ab-card .card-h { margin-bottom: 10px; }
.ab-card .card-title { display: flex; align-items: center; gap: 10px; }
.ab-ico {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  background: var(--fill); color: var(--label);
}
.ab-p { font: 400 17px/24px var(--font-text); letter-spacing: -.01em; color: var(--label); text-wrap: pretty; }
.ab-p + .ab-p, .ab-list + .ab-p, .ab-p + .ab-list, .ab-p + .ab-table, .ab-p + .ab-stats { margin-top: 10px; }
.ab-cap { margin-top: 12px; font: 400 13px/18px var(--font-text); color: var(--label-2); }
.ab-inline {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--fill); color: var(--label); vertical-align: -4px; margin: 0 1px;
}

/* rating table */
.ab-table { width: 100%; border-collapse: collapse; margin-top: 10px; font: 400 15px/20px var(--font-text); font-variant-numeric: tabular-nums; }
.ab-table th, .ab-table td { padding: 9px 0; text-align: left; border-top: .5px solid var(--sep); vertical-align: middle; }
.ab-table thead th { padding-top: 0; border-top: 0; font: 400 13px/18px var(--font-text); color: var(--label-2); }
.ab-table td { text-align: right; color: var(--label); white-space: nowrap; }
.ab-table thead th:last-child { text-align: right; }
.ab-pills { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.ab-pills .pill-s { min-width: 64px; }
.ab-notes { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; font: 400 13px/18px var(--font-text); color: var(--label-2); }
.ab-notes li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }

/* inset list inside a padded card: a grouped fill panel */
.ab-list { margin: 0; border-radius: 12px; background: var(--grouped); overflow: clip; }
.ab-row { min-height: 0; padding-left: 14px; }
.ab-row .row-in { padding: 10px 14px 10px 0; }
.ab-row .row-title { font-size: 16px; line-height: 21px; }
.ab-row .row-sub { white-space: normal; font-size: 14px; line-height: 19px; margin-top: 1px; }
.ab-stats { margin-top: 12px; }
.ab-stats .stat-v { font-size: 20px; line-height: 25px; }
@media (max-width: 559.98px) {
  .ab-notes { gap: 10px; }
  .ab-notes li { flex-direction: column; align-items: flex-start; gap: 4px; }
}
