/* Decision Desk. Scoped so a homepage that is not swapped does not move.
   Light tokens are the default; dark matches the news page. */

.dd-skip {
  position: absolute;
  left: -9999px;
  top: 0;
}

.dd-skip:focus {
  left: 1rem;
  top: 0.5rem;
  z-index: 3000;
  background: #fff;
  color: #000;
  padding: 0.5rem 1rem;
}

.dd-banner {
  position: relative;
  z-index: 980;
  margin-top: var(--header-height, 64px);
  background: #0d1f0e;
  color: #e7ffe4;
  border-bottom: 2px solid #39ff14;
}

.dd-banner__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.45rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.dd-preview-tag {
  flex: 0 0 auto;
  letter-spacing: 0.06em;
  font: 800 0.68rem/1 var(--dd-mono, "JetBrains Mono", monospace);
  background: #fff3bf;
  color: #3d2e00;
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
}

.dd-banner a {
  flex: 1 1 auto;
  min-width: 0;
  color: #c8ffb0;
  font-family: var(--font-heading, "Onest", "Inter", sans-serif);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.35;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.dd-banner button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: transparent;
  color: #fff;
  font: 700 0.78rem/1 var(--font-heading, "Onest", sans-serif);
  cursor: pointer;
}

.dd-banner--counting a {
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
  .dd-banner--counting .dd-banner__inner {
    align-items: flex-start;
  }

  .dd-banner--counting a {
    font-size: 0.84rem;
    padding-top: 0.2rem;
  }
}

body.dd-has-banner .nw-masthead {
  padding-top: 0;
}

.dd {
  --dd-bg: #f5f8f3;
  --dd-card: #ffffff;
  --dd-ink: #1d261d;
  --dd-muted: #55615a;
  --dd-line: #d4e4d4;
  --dd-green: #1b5e20;
  --dd-green-2: #2e7d32;
  --dd-lime: #39ff14;
  --dd-dark: #0d1f0e;
  --dd-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --dd-safe-r: #f6c1bb;
  --dd-safe-d: #b9d4ff;
  --dd-early: #c5ccc6;
  --dd-called-r: #d50000;
  --dd-called-d: #0d47a1;
  --dd-none: #e7eee8;
  --dd-map-line: rgba(10, 16, 12, 0.55);
  --dd-map-bg: #fbfcfb;
  --dd-inset: #5f6d64;
  --dd-check: #ffffff;
  background: var(--dd-bg);
  color: var(--dd-ink);
  font-size: 17px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

html[data-theme="dark"] body.dd-page .dd,
.dd.dd--dark {
  --dd-bg: #0a0a0a;
  --dd-card: #121412;
  --dd-ink: #e4e7e4;
  --dd-muted: #a3aea6;
  --dd-line: #24402a;
  --dd-green: #9be39a;
  --dd-green-2: #7ee07a;
  --dd-dark: #f3f7f3;
  --dd-safe-r: #f6c1bb;
  --dd-safe-d: #b9d4ff;
  --dd-early: #4e5852;
  --dd-called-r: #ff1744;
  --dd-called-d: #2979ff;
  --dd-none: #161b16;
  --dd-map-line: rgba(255, 255, 255, 0.35);
  --dd-map-bg: #070907;
  --dd-inset: #9be39a;
  --dd-check: #ffffff;
  color-scheme: dark;
}

body.dd-page {
  background: #f5f8f3;
  color: #1d261d;
}

html[data-theme="dark"] body.dd-page {
  background: #0a0a0a;
  color: #e4e7e4;
}

.dd a {
  color: var(--dd-green-2);
}

.dd a:hover,
.dd a:focus {
  text-decoration: underline;
}

.dd-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1rem 2.5rem;
}

.dd-mast {
  padding-top: 1.2rem;
  border-bottom: 1px solid var(--dd-line);
  margin-bottom: 1.25rem;
}

body.dd-page .dd-mast {
  padding-top: calc(var(--header-height, 64px) + 1.2rem);
}

body.dd-has-banner.dd-page .dd-mast,
body.dd-has-banner .dd-offline {
  padding-top: 1.2rem;
}

.dd-mast__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 1rem;
}

.dd-prompt,
.dd-stamp,
.dd-kicker,
.dd-tier,
.dd-byline,
.dd-close {
  font-family: var(--dd-mono);
}

.dd-prompt {
  margin: 0;
  color: var(--dd-green-2);
  font-weight: 700;
}

.dd h1,
.dd h2,
.dd h3 {
  color: var(--dd-dark);
  font-family: var(--font-heading, "Onest", "Inter", sans-serif);
  line-height: 1.2;
}

.dd h1 {
  margin: 0.2rem 0 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.dd h2 {
  margin: 0 0 0.8rem;
  font-size: 1.35rem;
}

.dd h3 {
  margin: 0.2rem 0 0.45rem;
  font-size: 1.12rem;
}

.dd-date,
.dd-note,
.dd-close,
.dd-context,
.dd-byline,
.dd-source,
.dd-reported,
.dd-close-note {
  color: var(--dd-muted);
}

.dd-date,
.dd-stamp {
  margin: 0.35rem 0 0;
}

.dd-stampwrap {
  text-align: right;
}

.dd-stamp--stale {
  border-left: 3px solid #a84f00;
  padding-left: 0.55rem;
}

.dd-theme,
.dd-status button,
.dd-field select {
  min-height: 44px;
  font: 700 0.78rem/1.2 var(--dd-mono);
}

.dd-theme {
  margin-top: 0.55rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--dd-green-2);
  background: var(--dd-card);
  color: var(--dd-ink);
  cursor: pointer;
}

.dd-preview {
  margin: 0;
  padding: 0.45rem 1rem;
  text-align: center;
  letter-spacing: 0.14em;
  font: 800 0.85rem/1.2 var(--dd-mono);
  background: #fff3bf;
  color: #3d2e00;
}

.dd-preview-note {
  display: block;
  margin-top: 0.2rem;
  letter-spacing: 0;
  font-weight: 600;
  font-size: 0.78rem;
  line-height: 1.35;
}

.dd-hidden {
  font: 700 0.78rem/1.3 var(--dd-mono);
  color: #8a5a00;
}

.dd.dd--dark .dd-hidden {
  color: #ffd27a;
}

.dd-follow,
.dd-chamber,
.dd-race,
.dd-closed,
.dd-past {
  background: var(--dd-card);
  border: 1px solid var(--dd-line);
  border-radius: 14px;
}

.dd-follow,
.dd-closed {
  padding: 1rem 1.1rem;
  margin-bottom: 1.1rem;
}

.dd-chamber-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.dd-chamber {
  padding: 0.9rem 1rem;
  min-width: 0;
}

.dd-chamber p,
.dd-follow p,
.dd-closed p,
.dd-race p {
  margin: 0.35rem 0;
}

.dd-chamber span,
.dd-outcome span {
  font-family: var(--dd-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dd-green-2);
}

.dd-outcome {
  margin-top: 0.7rem !important;
  padding: 0.55rem 0.7rem;
  border-left: 3px solid var(--dd-lime);
  background: rgba(57, 255, 20, 0.08);
}

.dd-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
  margin: 0.5rem 0 1rem;
}

.dd-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font: 700 0.75rem/1.2 var(--dd-mono);
  color: var(--dd-muted);
  min-width: 0;
}

.dd-field select {
  max-width: 100%;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--dd-line);
  background: var(--dd-card);
  color: var(--dd-ink);
}

.dd-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.dd-status button {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--dd-line);
  background: var(--dd-card);
  color: var(--dd-ink);
  cursor: pointer;
}

.dd-status button[aria-pressed="true"] {
  border-color: var(--dd-green-2);
  box-shadow: inset 0 0 0 1px var(--dd-green-2);
}

.dd-race {
  padding: 0.95rem 1rem 1rem;
  margin: 0 0 0.9rem;
  min-width: 0;
  scroll-margin-top: calc(var(--header-height, 64px) + 0.75rem);
}

.dd-race--target {
  box-shadow: 0 0 0 3px var(--dd-lime);
  animation: dd-race-flash 1.6s ease;
}

@keyframes dd-race-flash {
  0% { box-shadow: 0 0 0 0 var(--dd-lime); background-color: rgba(57, 255, 20, 0.32); }
  30% { box-shadow: 0 0 0 4px var(--dd-lime); background-color: rgba(57, 255, 20, 0.16); }
  100% { box-shadow: 0 0 0 3px var(--dd-lime); background-color: transparent; }
}

.dd-kicker {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dd-green-2);
}

.dd-tier {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.35rem;
  border: 1px solid var(--dd-line);
  border-radius: 4px;
  color: var(--dd-muted);
  letter-spacing: 0;
  text-transform: none;
}

.dd-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.dd-pill {
  display: inline-block;
  max-width: 100%;
  padding: 0.28rem 0.5rem;
  border-radius: 4px;
  border: 1px solid transparent;
  font: 700 0.78rem/1.35 var(--dd-mono);
  color: #1d261d;
  background: #e7eee7;
}

.dd-pill--too_early { background: #e7eee7; color: #1d261d; }
.dd-pill--leaning { background: #fff3bf; color: #3d2e00; }
.dd-pill--projected { background: #d9f5d4; color: #0d1f0e; }
.dd-pill--called { background: #39ff14; color: #041404; }
.dd-pill--under_review { background: #f3d27a; color: #2a2108; }
.dd-pill--flag { background: #ece7f5; color: #241838; }

.dd-pill a {
  color: inherit;
  text-decoration: underline;
}

.dd-rule {
  font-size: 0.88rem;
  color: var(--dd-muted);
}

.dd-votes {
  list-style: none;
  margin: 0.6rem 0;
  padding: 0;
}

.dd-votes li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.2rem 0.8rem;
  padding: 0.35rem 0;
  border-top: 1px dashed var(--dd-line);
}

.dd-party,
.dd-nums,
.dd-source,
.dd-reported,
.dd-byline {
  font-family: var(--dd-mono);
  font-size: 0.82rem;
}

/* Party chip beside the full name. R #b91c1c and D #1d4ed8 match the map card.
   I and other parties share #6b7280. White text on that gray is about 4.8:1.
   The chip can wrap. It has no max-width and is never hidden. */
.dd-party--r,
.dd-party--d,
.dd-party--other {
  display: inline;
  padding: 0 0.28em;
  border-radius: 3px;
  font-weight: 700;
  color: #fff;
  white-space: normal;
  overflow: visible;
}

.dd-party--r { background: #b91c1c; }
.dd-party--d { background: #1d4ed8; }
.dd-party--other { background: #6b7280; }

.dd-nums {
  font-weight: 700;
  color: var(--dd-dark);
}

.dd-correction {
  margin: 0.7rem 0 0;
  padding: 0.5rem 0.65rem;
  background: #fff8e8;
  color: #4d3a00;
  border-left: 3px solid #d39b00;
  border-radius: 0 6px 6px 0;
}

html[data-theme="dark"] body.dd-page .dd-correction,
.dd.dd--dark .dd-correction {
  background: #2a2210;
  color: #f3dfa4;
}

.dd-history {
  margin-top: 0.8rem;
}

.dd-history summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.dd-past {
  margin-top: 0.6rem;
  padding: 0.75rem 0.8rem;
}

.dd-official,
.dd-byline {
  margin-top: 0.6rem;
}

.dd-foot {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--dd-line);
  color: var(--dd-muted);
  font-size: 0.92rem;
}

.dd-legend {
  margin: 0;
  padding-left: 1.1rem;
}

.dd-legend li,
.dd-closed li,
.dd-follow li {
  margin: 0.35rem 0;
}

.dd-schedule {
  margin: 0 0 0.35rem;
  padding-left: 1.15rem;
}

.dd-schedule li {
  margin: 0.12rem 0;
}

.dd-close-notes {
  margin: 0 0 0.85rem;
}

.dd-close-notes summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 700;
}

.dd-close-note {
  display: block;
  font-size: 0.85rem;
}

.dd-bar {
  margin: 0.7rem 0 0.4rem;
}

.dd-bar__badge {
  display: inline-block;
  margin: 0 0 0.35rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #fff3bf;
  color: #3d2e00;
  font: 800 0.72rem/1.2 var(--dd-mono);
  letter-spacing: 0.04em;
}

.dd-bar__track {
  display: flex;
  height: 1.7rem;
  border-radius: 999px;
  overflow: hidden;
  background: #d7ddd4;
}

.dd-bar__seg {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  color: #102018;
  font: 700 0.72rem/1 var(--dd-mono);
}

.dd-bar__seg--safe-d { background: #b9d4ff; }
.dd-bar__seg--safe-r { background: #f6c1bb; }
.dd-bar__seg--called-d { background: #1d4e89; color: #fff; }
.dd-bar__seg--called-r { background: #8d2424; color: #fff; }
.dd-bar__seg--proj-d { background: #5d93d6; color: #fff; }
.dd-bar__seg--proj-r { background: #d06a6a; color: #fff; }
.dd-bar__seg--open { background: #e4e0d6; }
.dd-bar__seg--other { background: #8d8a84; color: #fff; }

.dd-bar__legend,
.dd-bar__sources,
.dd-bar__note {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
}

.dd-bar__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.8rem;
}

.dd-bar__note {
  color: var(--dd-muted);
}

.dd-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dd-offline {
  max-width: 40rem;
  margin: 0 auto;
  padding: calc(var(--header-height, 64px) + 2.5rem) 1.25rem 3rem;
}

.dd-offline h1 {
  font-family: var(--font-heading, "Onest", "Inter", sans-serif);
  color: inherit;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.2;
}

.dd a:focus-visible,
.dd button:focus-visible,
.dd select:focus-visible,
.dd summary:focus-visible,
.dd-banner a:focus-visible,
.dd-banner button:focus-visible,
.dd-hero-auth a:focus-visible {
  outline: 3px solid #39ff14;
  outline-offset: 2px;
}

body.dd-home-swap [data-news-promo],
body.dd-home-swap main.site-main {
  display: none !important;
}

body.dd-home-swap .hero.hero--dd {
  min-height: 0;
  height: 0;
  margin-top: var(--header-height, 64px);
  padding: 0;
  background: transparent;
  background-image: none;
  overflow: hidden;
}

body.dd-has-banner.dd-home-swap .hero.hero--dd {
  margin-top: 0;
}

/* Flag banner (.eb) already clears the fixed header, so the results need no second 64px band. Pages without .eb keep it. */
body.dd-home-swap .eb ~ .hero.hero--dd {
  margin-top: 0;
}

body.dd-home-swap .hero.hero--dd::before,
body.dd-home-swap .hero.hero--dd .hero-static,
body.dd-home-swap .hero.hero--dd .hero-matrix,
body.dd-home-swap .hero.hero--dd .hero-copy,
body.dd-home-swap .hero.hero--dd .hero-inner,
body.dd-home-swap .hero.hero--dd .scroll-cue {
  display: none !important;
}

.dd-hero-auth {
  position: relative;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  gap: 0.75rem;
}

.dd-map {
  background: var(--dd-card);
  border: 1px solid var(--dd-line);
  border-radius: 14px;
  padding: 0.9rem 0.75rem 1rem;
  margin: 0 0 1.1rem;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.dd-map h2 {
  margin: 0 0 0.35rem;
}

.dd-map-note,
.dd-map-status,
.dd-map-forecast,
.dd-map-called-note,
.dd-map-insets {
  margin: 0.35rem 0;
  color: var(--dd-muted);
  font-size: 0.92rem;
}

.dd-map-status {
  min-height: 1.4em;
  font-weight: 700;
  color: var(--dd-ink);
}

.dd-map-forecast,
.dd-map-called-note {
  font-weight: 700;
  color: var(--dd-ink);
}

.dd-map-toggle {
  display: flex;
  gap: 0.45rem;
  margin: 0.55rem 0 0.7rem;
  min-width: 0;
}

.dd-map-tab {
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  padding: 0.4rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--dd-line);
  background: var(--dd-card);
  color: var(--dd-ink);
  font: 700 0.85rem/1.2 var(--font-heading, "Onest", sans-serif);
  cursor: pointer;
}

.dd-map-tab[aria-selected="true"] {
  border-color: var(--dd-green-2);
  box-shadow: inset 0 0 0 1px var(--dd-green-2);
}

.dd-house-fit {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.dd-map-svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  overflow: hidden;
  background: var(--dd-map-bg);
  border-radius: 10px;
  touch-action: manipulation;
}

.dd-hex-label,
.dd-hex-num {
  text-anchor: middle;
  pointer-events: none;
}

.dd-hex-label {
  font: 700 14px/1 var(--font-heading, "Onest", sans-serif);
  fill: var(--dd-ink);
}

.dd-hex-num {
  font: 700 8px/1 var(--dd-mono, ui-monospace, monospace);
  dominant-baseline: central;
  fill: #142018;
}

.dd-map-state--called-r .dd-hex-num,
.dd-map-state--called-d .dd-hex-num {
  fill: #fff;
}

.dd-map-state--safe-r .dd-hex-num,
.dd-map-state--safe-d .dd-hex-num {
  fill: #142018;
}

.dd--dark .dd-hex-num,
html[data-theme="dark"] .dd-hex-num {
  fill: #f4f7f4;
}

.dd--dark .dd-map-state--safe-r .dd-hex-num,
.dd--dark .dd-map-state--safe-d .dd-hex-num,
html[data-theme="dark"] .dd-map-state--safe-r .dd-hex-num,
html[data-theme="dark"] .dd-map-state--safe-d .dd-hex-num {
  fill: #142018;
}

.dd-map-shape {
  stroke: var(--dd-map-line);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.dd-map-state {
  cursor: pointer;
}

.dd-map-state:focus {
  outline: none;
}

.dd-map-state:focus-visible .dd-map-shape {
  stroke: var(--dd-lime);
  stroke-width: 3px;
}

.dd-map-state--safe-r .dd-map-shape { fill: var(--dd-safe-r); }
.dd-map-state--safe-d .dd-map-shape { fill: var(--dd-safe-d); }
.dd-map-state--gray .dd-map-shape { fill: var(--dd-early); }
.dd-map-state--called-r .dd-map-shape { fill: var(--dd-called-r); }
.dd-map-state--called-d .dd-map-shape { fill: var(--dd-called-d); }
.dd-map-state--none .dd-map-shape { fill: var(--dd-none); }

.dd-map-check {
  stroke: var(--dd-check);
  stroke-width: 2.5px;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.dd-map-check-halo {
  stroke: #111;
  stroke-width: 4.5px;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.dd-map-inset {
  fill: none;
  stroke: var(--dd-inset);
  stroke-width: 1.6;
  pointer-events: none;
}

.dd-map-panel {
  position: relative;
}

.dd-mapcard {
  position: absolute;
  z-index: 5;
  box-sizing: border-box;
  width: min(17.5rem, calc(100% - 12px));
  max-height: min(16rem, calc(100% - 12px));
  overflow: auto;
  margin: 0;
  padding: 0.45rem 0.55rem 0.5rem;
  background: var(--dd-card);
  color: var(--dd-ink);
  border: 1px solid var(--dd-line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  font-size: 0.82rem;
  line-height: 1.35;
}

.dd-mapcard--tap {
  position: static;
  left: auto;
  right: auto;
  top: auto;
  width: auto;
  max-height: none;
  margin: 0.45rem 0 0;
  box-shadow: none;
}

.dd-mapcard__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.35rem;
}

.dd-mapcard__title {
  margin: 0.35rem 0 0;
  font-weight: 700;
  font-size: 0.95rem;
}

.dd-mapcard__close {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  margin: -0.2rem -0.15rem 0 0;
  padding: 0.2rem 0.45rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--dd-ink);
  font: 700 0.78rem/1 var(--font-heading, "Onest", sans-serif);
  cursor: pointer;
}

.dd-mapcard__close:focus-visible,
.dd-mapcard__view:focus-visible {
  outline: 2px solid var(--dd-lime);
  outline-offset: 2px;
}

.dd:not(.dd--dark) .dd-mapcard__close:focus-visible,
.dd:not(.dd--dark) .dd-mapcard__view:focus-visible {
  outline-color: var(--dd-green);
}

.dd-mapcard__view {
  display: none;
}

.dd-mapcard--tap .dd-mapcard__view {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin: 0.45rem 0 0.1rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--dd-line);
  border-radius: 8px;
  background: var(--dd-card);
  color: var(--dd-ink);
  font: 700 0.85rem/1.2 var(--font-heading, "Onest", sans-serif);
  cursor: pointer;
}

.dd-mapcard__list {
  list-style: none;
  margin: 0.3rem 0 0;
  padding: 0;
}

.dd-mapcard__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0.28rem 0;
  font-weight: 400;
}

.dd-mapcard__row--lead {
  font-weight: 700;
}

.dd-mapcard__name {
  flex: 1 1 auto;
  min-width: 0;
}

.dd-mapcard__tag,
.dd-mapcard__votes,
.dd-mapcard__pct {
  flex: 0 0 auto;
  max-width: 100%;
  font-variant-numeric: tabular-nums;
  overflow: visible;
  white-space: normal;
}

/* Same red and blue fills as the initials. I and every other party use one
   neutral gray. White on #6b7280 is about 4.8:1. A long tag such as
   (Libertarian) stays on the row; it is not clipped or dropped. */
.dd-mapcard__tag {
  padding: 0 0.28em;
  border-radius: 3px;
  font-weight: 700;
  color: #fff;
}

.dd-mapcard__tag--r { background: #b91c1c; }
.dd-mapcard__tag--d { background: #1d4ed8; }
.dd-mapcard__tag--other { background: #6b7280; }

.dd-mapcard__mark {
  flex: 0 0 auto;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
}

.dd-mapcard__mark--r { background: #b91c1c; }
.dd-mapcard__mark--d { background: #1d4ed8; }
.dd-mapcard__mark--other { background: #6b7280; }

.dd-mapcard__check {
  flex: 0 0 auto;
  font-weight: 700;
  color: var(--dd-called-d, #1d4ed8);
}
.dd-mapcard__row[data-party="r"] .dd-mapcard__check { color: var(--dd-called-r, #b91c1c); }
.dd-mapcard__row[data-party="other"] .dd-mapcard__check { color: #6b7280; }

.dd-mapcard__foot {
  margin: 0.35rem 0 0.15rem;
  color: var(--dd-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.dd-expected {
  margin: 0.35rem 0 0.15rem;
}

.dd-expected__label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  font-weight: 700;
  cursor: pointer;
}

.dd-expected__label input {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  accent-color: var(--dd-green-2);
}

.dd-expected__label input:focus-visible {
  outline: 2px solid var(--dd-lime);
  outline-offset: 3px;
}

/* Neon lime disappears on the light map. Dark green stays visible. */
.dd:not(.dd--dark) .dd-expected__label input:focus-visible {
  outline-color: var(--dd-green);
}

.dd-expected--locked .dd-expected__label {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Opacity 0.55 on light paper drops the label under WCAG AA. Muted ink stays grayed and readable. */
.dd:not(.dd--dark) .dd-expected--locked .dd-expected__label {
  opacity: 1;
  color: var(--dd-muted);
}

.dd:not(.dd--dark) .dd-expected--locked .dd-expected__label input {
  accent-color: var(--dd-muted);
}

.dd-expected__note {
  margin: 0 0 0.35rem;
  color: var(--dd-muted);
  font-size: 0.9rem;
}

.dd-map-legend ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  margin: 0.6rem 0 0;
  padding: 0;
}

.dd-map-legend li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.92rem;
}

.dd-swatch {
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  border: 1px solid var(--dd-map-line);
  border-radius: 3px;
}

.dd-swatch--safe-r { background: var(--dd-safe-r); }
.dd-swatch--safe-d { background: var(--dd-safe-d); }
.dd-swatch--early { background: var(--dd-early); }
.dd-swatch--none { background: var(--dd-none); }
.dd-swatch--called {
  background: linear-gradient(90deg, var(--dd-called-d) 0 50%, var(--dd-called-r) 50% 100%);
  position: relative;
}
.dd-swatch--called::after {
  content: "\2713";
  position: absolute;
  inset: 0;
  color: #fff;
  font: 700 0.72rem/1.15rem var(--dd-mono, ui-monospace, monospace);
  text-align: center;
}

.dd-stage,
.dd-aside,
.dd-rail,
.dd-results,
.dd-chambers,
.dd-calls,
.dd-winner-row {
  min-width: 0;
  max-width: 100%;
}

.dd-winner-row {
  margin: 0 0 0.9rem;
}

.dd-winner-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.dd-chambers {
  margin: 0 0 1.1rem;
}

.dd-stage {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Phones and anything under the desktop split: map, then seat bars, then cards. */
@media (max-width: 1023px) {
  .dd-chamber-grid {
    grid-template-columns: 1fr;
  }

  .dd-stampwrap,
  .dd-mast__inner {
    text-align: left;
  }

  .dd {
    font-size: 16px;
  }
}

.dd-calls {
  display: none;
  background: var(--dd-card);
  border: 1px solid var(--dd-line);
  border-radius: 14px;
  padding: 0.85rem 0.9rem 1rem;
  margin: 0 0 1rem;
}

.dd-calls h2 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
}

.dd-calls__note,
.dd-calls__empty {
  margin: 0 0 0.55rem;
  color: var(--dd-muted);
  font-size: 0.88rem;
}

.dd-calls__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dd-calls__list li {
  margin: 0;
  border-top: 1px solid var(--dd-line);
}

.dd-calls__list a {
  display: block;
  padding: 0.45rem 0;
  color: var(--dd-ink);
  text-decoration: none;
}

.dd-calls__kind {
  font: 700 0.72rem/1.2 var(--dd-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dd-green-2);
}

.dd-calls__when {
  display: block;
  color: var(--dd-muted);
  font-size: 0.82rem;
}

/* Desktop. Stack is the live default: full-width map, seat bars and latest
   calls below it, race cards in a full-width grid.
   Grid and side stay available as ?layout= in the local mock. */
@media (min-width: 1024px) {
  .dd.dd-layout-grid .dd-stage {
    display: grid;
    grid-template-columns: minmax(0, 60%) minmax(0, 1fr);
    grid-template-areas:
      "map rail"
      "results results";
    align-items: start;
    gap: 1rem;
  }

  .dd.dd-layout-grid .dd-map { grid-area: map; }
  .dd.dd-layout-grid .dd-aside { display: contents; }
  .dd.dd-layout-grid .dd-rail { grid-area: rail; }
  .dd.dd-layout-grid .dd-results { grid-area: results; }
  .dd.dd-layout-grid .dd-calls { display: block; }
  .dd.dd-layout-grid .dd-chamber-grid { grid-template-columns: 1fr; }

  .dd.dd-layout-grid .dd-chamber-races,
  .dd.dd-layout-stack .dd-chamber-races {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    margin-bottom: 1rem;
  }

  .dd.dd-layout-grid .dd-chamber-races > h2,
  .dd.dd-layout-stack .dd-chamber-races > h2 {
    grid-column: 1 / -1;
    margin: 0;
  }

  .dd.dd-layout-grid .dd-race,
  .dd.dd-layout-stack .dd-race {
    margin: 0;
  }

  .dd.dd-layout-side .dd-stage {
    display: grid;
    grid-template-columns: minmax(0, 55%) minmax(0, 1fr);
    align-items: start;
    gap: 1rem;
  }

  .dd.dd-layout-side .dd-map {
    position: sticky;
    top: calc(var(--header-height, 64px) + 0.6rem);
  }

  .dd.dd-layout-side .dd-aside {
    max-height: calc(100vh - var(--header-height, 64px) - 2rem);
    overflow-x: hidden;
    overflow-y: auto;
  }

  .dd.dd-layout-side .dd-chamber-grid {
    grid-template-columns: 1fr;
  }

  /* Side mock: keep the seat bars beside the map. Banners follow them. */
  .dd.dd-layout-side .dd-rail {
    display: flex;
    flex-direction: column;
  }

  .dd.dd-layout-side .dd-winner-row {
    order: 2;
  }

  .dd.dd-layout-stack .dd-stage {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  /* Stack (live default): full-width map, then seat bars beside Latest calls,
     then the race-card grid. */
  .dd.dd-layout-stack .dd-map { width: 100%; }
  .dd.dd-layout-stack .dd-map-svg { width: 100%; max-height: 72vh; }
  .dd.dd-layout-stack .dd-rail {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
  }
  .dd.dd-layout-stack .dd-calls { display: block; margin: 0; }
  .dd.dd-layout-stack .dd-winner-row { grid-column: 1 / -1; }
  .dd.dd-layout-stack .dd-winner-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1400px) {
  .dd-mast .dd-wrap,
  .dd-wrap.dd-sheet {
    max-width: 1360px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dd-banner,
  .dd-banner button,
  .dd-theme,
  .dd-race,
  .dd-race--target,
  .dd-status button {
    transition: none;
    animation: none;
  }
}

/* Admin preview only: app.css caps .app-main--wide at 720px, which shrank the
   map. Match the public page width instead. */
body[data-dd-preview-page] .app-main {
  min-width: 0;
  max-width: 1360px;
}

/* Admin preview only (election-preview.html): race cards wrap into a grid on desktop.
   Scoped by body[data-dd-preview-page] so www/election.html and phones are unchanged. */
@media (min-width: 601px) {
  body[data-dd-preview-page] .dd-chamber-races {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.9rem;
    align-items: start;
  }

  body[data-dd-preview-page] .dd-chamber-races > h2 {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  body[data-dd-preview-page] .dd-chamber-races > .dd-race {
    margin: 0;
  }
}

/* Election Day pre-results panel. Hidden unless the homepage forecast view is mounted. */
.dd-eday-wrap {
  padding-top: 1rem;
  padding-bottom: 0.25rem;
}

.dd-eday {
  background: #071207;
  color: #e7f6e4;
  border: 2px solid #39ff14;
  border-radius: 18px;
  padding: 1.15rem 1.2rem 1rem;
}

.dd-eday__kicker {
  margin: 0 0 0.45rem;
  color: #39ff14;
  font-family: var(--dd-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.dd-eday__title {
  margin: 0 0 0.45rem;
  color: #fff;
  font-family: var(--font-heading, "Onest", "Inter", sans-serif);
  font-size: clamp(1.7rem, 4vw, 2.55rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.dd-eday__title span {
  color: #39ff14;
}

.dd-eday > p {
  margin: 0 0 1rem;
  max-width: 46rem;
  color: #d5e6d4;
  font-size: 1.02rem;
  line-height: 1.45;
}

.dd-eday__bars {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.dd-eday__label {
  margin: 0 0 0.35rem;
  color: #fff;
  font-size: 0.98rem;
}

.dd-eday__label strong {
  font-weight: 700;
}

.dd-eday__track {
  display: flex;
  width: 100%;
  min-height: 2.35rem;
  overflow: hidden;
  border-radius: 8px;
  background: #2a2f2c;
}

.dd-eday__seg {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  padding: 0 0.15rem;
  color: #fff;
  font-family: var(--font-heading, "Onest", sans-serif);
  font-size: clamp(0.68rem, 1.6vw, 0.95rem);
  font-weight: 800;
  line-height: 1;
}

.dd-eday__seg--solid_d { background: #1565c0; }
.dd-eday__seg--likely_d { background: #1e88e5; }
.dd-eday__seg--lean_d { background: #90caf9; color: #0b1d33; }
.dd-eday__seg--toss { background: #8d9390; color: #111; }
.dd-eday__seg--lean_r { background: #ffcdd2; color: #3b0a0a; }
.dd-eday__seg--likely_r { background: #e53935; }
.dd-eday__seg--solid_r { background: #c62828; }

.dd-eday__source,
.dd-eday__note,
.dd-eday__mapnote {
  margin: 0.35rem 0 0;
  color: #b7c4b8;
  font-size: 0.82rem;
  line-height: 1.35;
}

.dd-eday__source a {
  color: #c8ffb0;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.dd-eday__mapnote {
  margin-top: 0.9rem;
}

.dd:not(.dd--dark) .dd-eday {
  background: #f4fff2;
  color: #142018;
  border-color: #1b5e20;
}

.dd:not(.dd--dark) .dd-eday__kicker,
.dd:not(.dd--dark) .dd-eday__title span {
  color: #1b5e20;
}

.dd:not(.dd--dark) .dd-eday__title,
.dd:not(.dd--dark) .dd-eday__label {
  color: #142018;
}

.dd:not(.dd--dark) .dd-eday > p,
.dd:not(.dd--dark) .dd-eday__source,
.dd:not(.dd--dark) .dd-eday__note,
.dd:not(.dd--dark) .dd-eday__mapnote {
  color: #243028;
}

.dd:not(.dd--dark) .dd-eday__source a {
  color: #1b5e20;
}

@media (min-width: 800px) {
  .dd-eday__bars {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 1.5rem;
  }

  .dd-eday__mapnote {
    grid-column: 1 / -1;
  }
}

/* Winner banners. Dark is the default. Party blue on #041151 is #2d7cff,
   about 4.52:1. The line stays at least 18.75px bold at every width.
   Words stay whole: overflow-wrap and word-break stay normal, and a narrow
   card drops the line size instead of splitting a word. */
.dd-winner-banner {
  box-sizing: border-box;
  container-type: inline-size;
  max-width: 100%;
  margin: 0;
  padding: 0.9rem 0.95rem 0.75rem;
  border-radius: 12px;
  background: #1a1d1a;
  color: #e4e7e4;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: manual;
}

.dd-winner-banner__contest {
  margin: 0 0 0.35rem;
  font: 700 0.78rem/1.2 var(--dd-mono, ui-monospace, monospace);
  letter-spacing: 0.04em;
  text-transform: none;
  color: #f3f6fb;
  overflow-wrap: normal;
  word-break: normal;
}

.dd-winner-banner__line {
  margin: 0;
  font-family: var(--font-heading, "Onest", "Inter", sans-serif);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.15;
  letter-spacing: 0;
  text-transform: none;
  color: inherit;
  overflow-wrap: normal;
  word-break: normal;
}

.dd-winner-banner__check {
  display: inline-block;
  margin-right: 0.28rem;
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 0.85;
  vertical-align: -0.12em;
  text-transform: none;
  color: inherit;
}

.dd-winner-banner__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin: 0.55rem 0 0;
}

.dd-winner-banner__pill {
  display: inline-block;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  background: #2c332e;
  color: #e4e7e4;
  font: 700 0.78rem/1.2 var(--dd-mono, ui-monospace, monospace);
  letter-spacing: 0;
  text-transform: none;
}

.dd-winner-banner__time {
  font: 600 0.95rem/1.3 var(--dd-mono, ui-monospace, monospace);
  letter-spacing: 0;
  text-transform: none;
  color: #e4e7e4;
  overflow-wrap: normal;
  word-break: normal;
}

.dd-winner-banner__credit {
  margin: 0.6rem 0 0;
  font: 600 0.82rem/1.3 var(--dd-mono, ui-monospace, monospace);
  letter-spacing: 0;
  text-transform: none;
  color: #a3aea6;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.dd-winner-banner--r {
  background: #2a0610;
  color: #ff1744;
}

.dd-winner-banner--d {
  background: #041151;
  color: #2d7cff;
}

.dd-winner-banner--r .dd-winner-banner__line,
.dd-winner-banner--r .dd-winner-banner__check,
.dd-winner-banner--d .dd-winner-banner__line,
.dd-winner-banner--d .dd-winner-banner__check {
  color: inherit;
}

@container (max-width: 17rem) {
  .dd-winner-banner__line { font-size: 1.35rem; }
  .dd-winner-banner__check { font-size: 2.1rem; }
}

@container (max-width: 13rem) {
  .dd-winner-banner__line { font-size: 18.75px; }
  .dd-winner-banner__check { font-size: 1.55rem; }
  .dd-winner-banner__credit {
    font-size: 0.72rem;
    white-space: normal;
  }
}

html[data-theme="light"] .dd-winner-banner,
.dd:not(.dd--dark) .dd-winner-banner {
  background: #f3f5f3;
  color: #1d261d;
}

html[data-theme="light"] .dd-winner-banner__contest,
.dd:not(.dd--dark) .dd-winner-banner__contest {
  color: #1d261d;
}

html[data-theme="light"] .dd-winner-banner__pill,
.dd:not(.dd--dark) .dd-winner-banner__pill {
  background: #e1e6e1;
  color: #1d261d;
}

html[data-theme="light"] .dd-winner-banner__time,
.dd:not(.dd--dark) .dd-winner-banner__time {
  color: #1d261d;
}

html[data-theme="light"] .dd-winner-banner__credit,
.dd:not(.dd--dark) .dd-winner-banner__credit {
  color: #3e4c44;
}

html[data-theme="light"] .dd-winner-banner--r,
.dd:not(.dd--dark) .dd-winner-banner--r {
  background: #fff5f6;
  color: #c4001d;
}

html[data-theme="light"] .dd-winner-banner--d,
.dd:not(.dd--dark) .dd-winner-banner--d {
  background: #f4f8ff;
  color: #1a5fd6;
}

/* 097: editor stamp, same check as the news byline. Dark is the default. */
.dd-bar__signoff { margin: 0.35rem 0 0; font-size: 0.85rem; }
.dd-signoff { display: inline-flex; align-items: center; gap: .3rem; color: #9be39a; background: #102614; border: 1px solid #2e7d32; padding: .15rem .45rem .15rem .25rem; border-radius: 999px; }
.dd-check { width: 14px; height: 14px; flex: 0 0 auto; }
.dd-check circle { fill: #2e7d32; }
.dd-check path { fill: none; stroke: #39ff14; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
html[data-theme="light"] .dd-signoff { color: #1b5e20; background: #e6f6e3; border-color: #b6deb3; }
html[data-theme="light"] .dd-check path { stroke: #e6f6e3; }

/* Senate running total (holdovers plus calls). Wraps on phones. */
.dd-chamber p.dd-senate-total {
  margin: 0.5rem 0 0.2rem;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

/* Automatic flip counter (prev-party.json). */
.dd-flips {
  font-weight: 700;
}
.dd-flip-tag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0 0.4rem;
  border: 1px solid currentColor;
  border-radius: 0.3rem;
  font-size: 0.78em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dd-flips__note {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  opacity: 0.8;
}

/* Called-race bars (House, Senate, Governors). Uncalled is grey. */
.dd-cbars { margin: 0 0 1rem; grid-column: 1 / -1; }
.dd-cbar { margin: 0.6rem 0 0.9rem; }
.dd-cbar__title { font-weight: 700; font-size: 1.05rem; }
.dd-cbar__summary { margin: 0.15rem 0; font-size: 0.9rem; overflow-wrap: anywhere; }
.dd-cbar__flips { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; font-weight: 700; font-size: 0.85rem; margin: 0.2rem 0 1.1rem; }
/* Long D flip lists wrap; the R side never shrinks into a one-letter column. */
.dd-cbar__flip--d { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.dd-cbar__flip--r { flex: 0 0 auto; min-width: max-content; white-space: nowrap; text-align: right; }
@media (max-width: 600px) {
  .dd-cbar__flips { flex-wrap: wrap; }
  .dd-cbar__flip--r { margin-left: auto; }
}
.dd-cbar__flip--d { color: #4a90ff; }
.dd-cbar__flip--r { color: #ff5a5a; }
.dd-cbar__scale { position: relative; }
.dd-cbar__majnum { position: absolute; top: -1.05rem; transform: translateX(-50%); font-size: 0.72rem; font-weight: 700; }
.dd-cbar__track { position: relative; display: flex; height: 28px; border-radius: 4px; overflow: hidden; background: #8a8f8a; }
.dd-cbar__seg { display: flex; align-items: center; justify-content: center; min-width: 0; color: #fff; font-weight: 700; font-size: 0.8rem; }
.dd-cbar__seg--d { background: #1f5fd1; }
.dd-cbar__seg--r { background: #c62828; }
.dd-cbar__seg--open { background: #8a8f8a; }
.dd-cbar__seg--other { background: #7b5ea7; }
.dd-cbar__maj { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px #000; }
.dd-cbar__legend { display: flex; gap: 0.8rem; flex-wrap: wrap; font-size: 0.8rem; }
.dd-cbar__key::before { content: ""; display: inline-block; width: 0.8em; height: 0.8em; margin-right: 0.3em; border-radius: 2px; vertical-align: -0.05em; }
.dd-cbar__key--d::before { background: #1f5fd1; }
.dd-cbar__key--open::before { background: #8a8f8a; }
.dd-cbar__key--r::before { background: #c62828; }
.dd-cbar__source { font-size: 0.75rem; opacity: 0.85; }
html[data-theme="light"] .dd-cbar__flip--d { color: #1f5fd1; }
html[data-theme="light"] .dd-cbar__flip--r { color: #c62828; }
.dd-cbar__newmap { font-weight: 400; font-size: 0.8rem; }
.dd-cbar__list { font-weight: 600; }
.dd-mapcard__flip { display: inline-flex; align-items: center; gap: 0.3rem; white-space: nowrap; flex-shrink: 0; margin-left: auto; margin-right: 0.5rem; align-self: center; }
/* Map hover-card flip badge: top = new winner, bottom = previous party.
   Fills keep white text >= 4.5:1 on their own (D 5.17, R 4.83, gray 4.83);
   the #1a1a1a stroke is extra (white vs stroke 17.4:1). */
.dd-flipbadge { --dd-flip-top: #6b7280; --dd-flip-bot: #6b7280; display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 2px solid #111; box-shadow: 0 0 0 1px rgba(255,255,255,0.35); background: linear-gradient(to bottom, var(--dd-flip-top) 0 50%, var(--dd-flip-bot) 50% 100%); color: #fff; font: 800 0.85rem/1 system-ui, sans-serif; letter-spacing: 0.02em; text-transform: lowercase; -webkit-text-stroke: 2px #1a1a1a; paint-order: stroke fill; text-shadow: 1px 0 0 #1a1a1a, -1px 0 0 #1a1a1a, 0 1px 0 #1a1a1a, 0 -1px 0 #1a1a1a; box-sizing: border-box; }
.dd-flipbadge--top-d { --dd-flip-top: #2563eb; }
.dd-flipbadge--top-r { --dd-flip-top: #dc2626; }
.dd-flipbadge--top-other { --dd-flip-top: #6b7280; }
.dd-flipbadge--bot-d { --dd-flip-bot: #2563eb; }
.dd-flipbadge--bot-r { --dd-flip-bot: #dc2626; }
.dd-flipbadge--bot-other { --dd-flip-bot: #6b7280; }
.dd-mapcard__flip-note { font-size: 0.7rem; font-weight: 600; opacity: 0.9; }
html[data-theme="light"] .dd-flipbadge { border-color: #222; box-shadow: none; }
html[data-theme="light"] .dd-mapcard__flip-note { color: #333; opacity: 1; }
/* Running bars: held/called/Safe in party color, the rest grey. */
.dd-run { margin: 0.5rem 0; }
.dd-chamber p.dd-run__line { font-weight: 700; margin: 0.2rem 0; }
.dd-run__track { display: flex; height: 1.5rem; border-radius: 4px; overflow: hidden; background: #555; }
.dd-run__seg { display: flex; align-items: center; justify-content: center; min-width: 2px; color: #fff; font-size: 0.7rem; overflow: hidden; }
.dd-run__seg--hold-d, .dd-run__seg--called-d { background: #1d4ed8; }
.dd-run__seg--safe-d { background: repeating-linear-gradient(45deg, #93c5fd 0 4px, #bfdbfe 4px 8px); color: #1e3a8a; }
.dd-run__seg--hold-r, .dd-run__seg--called-r { background: #b91c1c; }
.dd-run__seg--safe-r { background: repeating-linear-gradient(45deg, #fca5a5 0 4px, #fecaca 4px 8px); color: #7f1d1d; }
.dd-run__seg--open { background: #8a8a8a; }
.dd-run__seg--other { background: #7c3aed; }
.dd-run__seg--called-d, .dd-run__seg--called-r { box-shadow: inset 0 0 0 2px #fff; }
.dd-chamber p.dd-run__key { font-size: 0.75rem; opacity: 0.8; }
@media (max-width: 480px) { .dd-run__n { display: none; } }
.dd-run__sw { display: inline-block; width: 0.8em; height: 0.8em; margin: 0 0.25em 0 0.6em; vertical-align: -0.1em; border-radius: 2px; }
.dd-run__sw--called { background: linear-gradient(90deg, #1d4ed8 50%, #b91c1c 50%); }
.dd-run__sw--safe { background: repeating-linear-gradient(45deg, #93c5fd 0 3px, #fca5a5 3px 6px); }
.dd-run__sw--open { background: #8a8a8a; }

/* Picks table */
.dd-picks { margin: 0.5rem 0; font-size: 0.8rem; }
.dd-picks summary { cursor: pointer; font-weight: 700; }
.dd-picks__table { width: 100%; border-collapse: collapse; }
.dd-picks__table th, .dd-picks__table td { text-align: left; padding: 0.15rem 0.3rem; border-bottom: 1px solid rgba(128,128,128,0.3); }
.dd-pick { display: inline-block; padding: 0 0.35em; border-radius: 3px; color: #fff; background: #8a8a8a; }
.dd-pick--called-d { background: #1d4ed8; }
.dd-pick--called-r { background: #b91c1c; }
.dd-pick--safe-d { background: repeating-linear-gradient(45deg, #93c5fd 0 4px, #bfdbfe 4px 8px); color: #1e3a8a; }
.dd-pick--safe-r { background: repeating-linear-gradient(45deg, #fca5a5 0 4px, #fecaca 4px 8px); color: #7f1d1d; }
.dd-pick--other { background: #7c3aed; }
@media (max-width: 640px) { .dd-picks__table { font-size: 0.75rem; } }

/* Small-state bubbles beside each chamber map. Fill comes from the same
   .dd-map-state--* classes as the map shapes. */
.dd-map-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dd-map-main {
  flex: 1 1 auto;
  min-width: 0;
}

.dd-map-bubbles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 auto;
}

.dd-map-bubble {
  display: block;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
}

.dd-map-bubble svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.dd-map-bubble .dd-map-shape {
  stroke-width: 1.5px;
}

.dd-map-bubble:focus {
  outline: none;
}

.dd-map-bubble:focus-visible .dd-map-shape,
.dd-map-bubble[data-dd-map-open] .dd-map-shape {
  stroke: var(--dd-lime);
  stroke-width: 3px;
}

.dd-bubble-text {
  font: 700 12px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
  text-anchor: middle;
  dominant-baseline: central;
  fill: #142018;
  pointer-events: none;
}

.dd-map-state--called-r .dd-bubble-text,
.dd-map-state--called-d .dd-bubble-text {
  fill: #fff;
}

.dd--dark .dd-map-state--gray .dd-bubble-text,
.dd--dark .dd-map-state--none .dd-bubble-text,
html[data-theme="dark"] .dd-map-state--gray .dd-bubble-text,
html[data-theme="dark"] .dd-map-state--none .dd-bubble-text {
  fill: #f4f7f4;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .dd-map-bubble { transition: transform 0.12s ease; }
  .dd-map-bubble:hover { transform: scale(1.08); }
}

/* Phones: the column moves under the map as a wrapping row of 40px targets. */
@media (max-width: 600px) {
  .dd-map-row {
    flex-direction: column;
    align-items: stretch;
  }
  .dd-map-bubbles {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }
  .dd-map-bubble {
    width: 40px;
    height: 40px;
  }
}
