:root {
  --navy: #071a36;
  --navy2: #0d2b57;
  --navy3: #123c77;

  --blue: #1677ff;
  --blue2: #45a3ff;
  --blue-soft: #e9f2ff;

  --red: #ef4444;
  --red2: #fb7185;
  --red-soft: #ffe9ec;

  --purple: #8b5cf6;
  --purple-soft: #f0ebff;

  --gold: #f5b942;
  --gold-soft: #fff4d9;

  --green: #16a36a;
  --green-soft: #e4f8f0;

  --ink: #17233b;
  --muted: #68758d;
  --muted2: #8a96aa;

  --line: #dce5f2;
  --line2: #e8eef6;

  --bg: #f4f7fb;
  --card: #ffffff;

  --dem-safe: #174ea6;
  --dem-likely: #3977c9;
  --dem-lean: #6da4df;
  --dem-tilt: #a9cff2;

  --rep-safe: #991f1f;
  --rep-likely: #c54545;
  --rep-lean: #df7777;
  --rep-tilt: #f3b4b4;

  --tossup: #8b8f97;
  --unrated: #cbd5e1;
  --not-up: #34435a;

  --shadow-small:
    0 7px 24px rgba(13, 36, 70, 0.055);

  --shadow:
    0 16px 45px rgba(10, 32, 66, 0.1);

  --shadow-large:
    0 25px 70px rgba(8, 29, 61, 0.16);

  --radius-small: 11px;
  --radius: 18px;
  --radius-large: 26px;
}


/* =========================================================
   RESET AND BASE
   ========================================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  color: var(--ink);

  background:
    linear-gradient(
      180deg,
      #f8faff 0,
      var(--bg) 260px
    );
}

body.modalOpen {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color:
    transparent;
}

button {
  touch-action: manipulation;
}

img,
svg,
canvas {
  max-width: 100%;
}

h1,
h2,
h3,
h4,
p {
  overflow-wrap: break-word;
}

::selection {
  color: #ffffff;
  background: var(--blue);
}


/* =========================================================
   NAVIGATION
   ========================================================= */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;

  color: #ffffff;

  background:
    linear-gradient(
      100deg,
      var(--navy),
      var(--navy2)
    );

  box-shadow:
    0 8px 24px rgba(4, 18, 41, 0.2);
}

.nav {
  display: flex;
  align-items: center;
  gap: 25px;

  width: 100%;
  max-width: 1280px;
  margin: auto;
  padding: 12px 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;

  flex-shrink: 0;
  margin-right: auto;

  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.brand img {
  width: 43px;
  height: 43px;

  object-fit: contain;

  border-radius: 10px;
  background: #ffffff;
}

.navlinks {
  display: flex;
  align-items: center;
  gap: 22px;

  font-size: 13px;
  font-weight: 800;
}

.navlinks a {
  position: relative;

  padding: 9px 0;

  opacity: 0.82;

  transition:
    color 0.18s ease,
    opacity 0.18s ease;
}

.navlinks a::after {
  content: "";

  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;

  height: 2px;

  border-radius: 999px;

  background: #83bdff;

  opacity: 0;

  transform: scaleX(0.5);

  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.navlinks a:hover,
.navlinks a.active {
  color: #9fd0ff;
  opacity: 1;
}

.navlinks a:hover::after,
.navlinks a.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.menuBtn {
  display: none;

  padding: 5px;
  border: 0;

  color: #ffffff;
  background: transparent;

  font-size: 26px;
  line-height: 1;

  cursor: pointer;
}


/* =========================================================
   PAGE AND TYPOGRAPHY
   ========================================================= */

.page {
  width: 100%;
  max-width: 1220px;
  margin: auto;
  padding: 34px 20px 74px;
}

.racePage {
  max-width: 1260px;
}

.kicker {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero .kicker,
.raceHero .kicker {
  color: #8ec5ff;
}

.subtle {
  color: var(--muted);
}

.loading,
.empty {
  padding: 40px;

  color: var(--muted);

  text-align: center;
}

.loading {
  animation:
    loadingPulse 1.6s ease-in-out infinite;
}

@keyframes loadingPulse {
  0%,
  100% {
    opacity: 0.55;
  }

  50% {
    opacity: 1;
  }
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
  position: relative;

  overflow: hidden;

  padding: 42px;

  border-radius: var(--radius-large);

  color: #ffffff;

  background:
    radial-gradient(
      circle at 88% 4%,
      rgba(76, 156, 255, 0.4),
      transparent 36%
    ),
    radial-gradient(
      circle at 4% 100%,
      rgba(37, 99, 235, 0.19),
      transparent 34%
    ),
    linear-gradient(
      120deg,
      var(--navy),
      var(--navy3)
    );

  box-shadow: var(--shadow-large);
}

.hero::after {
  content: "";

  position: absolute;
  top: -120px;
  right: -90px;

  width: 330px;
  height: 330px;

  border: 1px solid
    rgba(255, 255, 255, 0.1);

  border-radius: 50%;

  pointer-events: none;
}

.heroGrid {
  position: relative;
  z-index: 1;

  display: grid;
  grid-template-columns:
    minmax(0, 1.45fr)
    minmax(260px, 0.8fr);

  align-items: center;
  gap: 30px;
}

.hero h1 {
  margin: 10px 0 16px;

  font-size:
    clamp(
      35px,
      5vw,
      65px
    );

  line-height: 1.02;
  letter-spacing: -0.045em;
}

.hero p {
  max-width: 760px;
  margin: 0;

  color: #dceaff;

  font-size: 18px;
  line-height: 1.65;
}

.raceHeroBadges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;

  margin-top: 23px;
}


/* =========================================================
   HERO FORECAST AND PROBABILITY CARDS
   ========================================================= */

.probCard {
  padding: 27px;

  border:
    1px solid
    rgba(255, 255, 255, 0.18);

  border-radius: 22px;

  text-align: center;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.14),
      rgba(255, 255, 255, 0.07)
    );

  box-shadow:
    inset 0 1px 0
      rgba(255, 255, 255, 0.08),
    0 18px 45px
      rgba(0, 0, 0, 0.16);

  backdrop-filter: blur(10px);
}

.bigProb {
  font-size:
    clamp(
      52px,
      7vw,
      76px
    );

  font-weight: 950;
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.raceLeaderCard {
  position: relative;
  overflow: hidden;
}

.raceLeaderCard::before {
  content: "";

  position: absolute;
  inset: 0 auto 0 0;

  width: 6px;

  background: var(--blue);
}

.raceLeaderCard[data-party="R"]::before {
  background: var(--red);
}

.raceLeaderCard[data-party="I"]::before,
.raceLeaderCard[data-party="L"]::before,
.raceLeaderCard[data-party="G"]::before {
  background: var(--purple);
}

.raceLeaderCard b {
  display: block;

  margin-top: 12px;

  font-size: 20px;
}

.raceLeaderLabel {
  margin-top: 4px;

  color: #dceaff;
}

.raceLeaderVote {
  margin-top: 11px;

  color: #bcd9fb;

  font-size: 14px;
  font-weight: 700;
}


/* =========================================================
   FORECAST COUNTERS
   ========================================================= */

.forecastCounter {
  overflow: hidden;

  padding: 22px;

  border:
    1px solid
    rgba(255, 255, 255, 0.18);

  border-radius: 22px;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.13),
      rgba(255, 255, 255, 0.06)
    );

  box-shadow:
    inset 0 1px 0
      rgba(255, 255, 255, 0.08),
    0 15px 35px
      rgba(0, 0, 0, 0.16);

  backdrop-filter: blur(10px);
}

.forecastCounterTitle {
  margin-bottom: 13px;

  color: #dceaff;

  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.forecastCounterRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;

  min-height: 54px;
  margin-bottom: 8px;
  padding: 11px 14px;

  border-radius: 14px;

  font-weight: 850;
}

.forecastCounterRow:last-of-type {
  margin-bottom: 0;
}

.forecastCounterRow strong {
  font-size: 31px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.forecastCounterRow.republican {
  color: #ffffff;

  background:
    linear-gradient(
      100deg,
      rgba(153, 31, 31, 0.94),
      rgba(197, 69, 69, 0.88)
    );
}

.forecastCounterRow.tossup {
  color: #ffffff;

  background:
    linear-gradient(
      100deg,
      rgba(111, 118, 130, 0.95),
      rgba(150, 155, 165, 0.88)
    );
}

.forecastCounterRow.democratic {
  color: #ffffff;

  background:
    linear-gradient(
      100deg,
      rgba(23, 78, 166, 0.95),
      rgba(57, 119, 201, 0.9)
    );
}

.forecastCounterNote {
  margin-top: 13px;

  color: #c9d9ec;

  font-size: 12px;
  text-align: center;
}


/* =========================================================
   SECTIONS
   ========================================================= */

.section {
  margin-top: 34px;
}

.sectionHead,
.sectionHeading,
.raceSectionHeader,
.sectionMiniHead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;

  margin-bottom: 16px;
}

.sectionMiniHead {
  align-items: flex-start;
}

.sectionHead h2,
.sectionHeading h2,
.raceSectionHeader h2,
.sectionMiniHead h2 {
  margin: 4px 0 0;

  font-size: 27px;
  letter-spacing: -0.03em;
}

.sectionHead p,
.sectionHeading p,
.raceSectionHeader p,
.sectionMiniHead p {
  margin: 5px 0 0;

  color: var(--muted);
}

.mapInstructions {
  max-width: 390px;
  text-align: right;
}


/* =========================================================
   GRIDS AND CARDS
   ========================================================= */

.grid3 {
  display: grid;
  grid-template-columns:
    repeat(
      3,
      minmax(0, 1fr)
    );

  gap: 18px;
}

.grid2 {
  display: grid;
  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );

  gap: 18px;
}

.card,
.mapCard {
  border: 1px solid var(--line);
  border-radius: 20px;

  background: var(--card);

  box-shadow: var(--shadow-small);
}

.card {
  padding: 22px;
}

a.card,
.raceCard {
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

a.card:hover,
.raceCard:hover {
  transform: translateY(-3px);

  border-color: #bfd4f0;

  box-shadow: var(--shadow);
}

.mapCard {
  overflow: hidden;
}

.raceCard h3 {
  margin: 12px 0 5px;

  font-size: 20px;
}

.raceMeta {
  display: flex;
  justify-content: space-between;
  gap: 10px;

  color: var(--muted);

  font-size: 13px;
}

.candidates {
  margin: 15px 0;
}

.candidateLine {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  padding: 9px 0;

  border-bottom:
    1px solid
    #edf1f6;
}

.candidateLine:last-child {
  border-bottom: 0;
}

.candidateLine strong {
  text-align: right;
}

.partyDot {
  display: inline-block;

  width: 10px;
  height: 10px;
  margin-right: 8px;

  border-radius: 50%;

  vertical-align: 1px;
}

.party-D {
  background: var(--blue);
}

.party-R {
  background: var(--red);
}

.party-I {
  background: var(--purple);
}

.party-L {
  background: var(--gold);
}

.party-G {
  background: var(--green);
}

.party-OTHER {
  background: var(--unrated);
}
/* =========================================================
   BADGES AND BUTTONS
   ========================================================= */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 28px;
  padding: 6px 10px;

  border-radius: 999px;

  color: #1761ad;
  background: var(--blue-soft);

  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge.blue {
  color: #1761ad;
  background: var(--blue-soft);
}

.badge.red {
  color: #b9253d;
  background: var(--red-soft);
}

.badge.gold {
  color: #996700;
  background: var(--gold-soft);
}

.badge.green {
  color: #08744b;
  background: var(--green-soft);
}

.btn {
  padding: 11px 16px;
  border: 0;
  border-radius: 11px;

  color: #ffffff;
  background: var(--navy);

  font-weight: 850;

  cursor: pointer;

  transition:
    transform 0.15s ease,
    filter 0.15s ease,
    opacity 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.btn.blue {
  background: var(--blue);
}

.btn.red {
  background: var(--red);
}

.btn.light {
  color: #18345b;
  background: #e9eff8;
}

.btn.green {
  background: var(--green);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.linkBtn {
  color: var(--blue);
  font-weight: 800;
}

.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.raceToolbar {
  margin: 0;
}

.raceToolbar input {
  min-width: 280px;
}


/* =========================================================
   TABLES
   ========================================================= */

.tableWrap {
  overflow: auto;

  border: 1px solid var(--line);
  border-radius: 18px;

  background: #ffffff;
}

table {
  width: 100%;
  min-width: 760px;

  border-collapse: collapse;
}

th,
td {
  padding: 14px 15px;

  border-bottom:
    1px solid
    var(--line2);

  text-align: left;

  font-size: 14px;
}

th {
  color: #6d7890;
  background: #f8fafd;

  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: #fbfdff;
}

.pollCellDem,
.marginDem {
  color: var(--blue);
}

.pollCellRep,
.marginRep {
  color: var(--red);
}

.pollCellInd {
  color: var(--purple);
}


/* =========================================================
   FORMS
   ========================================================= */

.formGrid {
  display: grid;
  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );

  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: #4f5d74;

  font-size: 12px;
  font-weight: 850;
}

input,
select,
textarea {
  width: 100%;
  padding: 11px 12px;

  border: 1px solid #cfd9e8;
  border-radius: 11px;

  color: var(--ink);
  background: #ffffff;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #82b5ff;
  outline:
    3px solid
    rgba(22, 119, 255, 0.12);
}

textarea {
  min-height: 95px;
  resize: vertical;
}

hr {
  width: 100%;
  margin: 8px 0 2px;

  border: 0;
  border-top:
    1px solid
    var(--line);
}


/* =========================================================
   RACE PAGE — FORECAST CARD
   ========================================================= */

.forecastCard,
.pollingAverageCard {
  min-height: 100%;
}

.confidenceBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 28px;
  padding: 6px 10px;

  border-radius: 999px;

  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.confidence-low {
  color: #8a6200;
  background: #fff4d9;
}

.confidence-medium {
  color: #1761ad;
  background: #e9f2ff;
}

.confidence-high {
  color: #08744b;
  background: #e4f8f0;
}

.candidateForecastList {
  margin-top: 10px;
}

.candidateForecastRow {
  position: relative;

  padding: 16px 0 18px;

  border-bottom:
    1px solid
    var(--line2);
}

.candidateForecastRow:last-child {
  border-bottom: 0;
}

.candidateForecastIdentity {
  display: flex;
  align-items: center;
  gap: 8px;
}

.candidateForecastIdentity > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.candidateForecastIdentity strong {
  font-size: 16px;
}

.candidateForecastIdentity span {
  color: var(--muted);
  font-size: 12px;
}

.candidateForecastNumbers {
  display: grid;
  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );

  gap: 12px;

  margin-top: 12px;
}

.candidateForecastNumbers > div {
  padding: 10px 12px;

  border:
    1px solid
    var(--line2);

  border-radius: 12px;

  background: #f8fbff;
}

.candidateForecastNumbers span {
  display: block;

  color: var(--muted);

  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.candidateForecastNumbers strong {
  display: block;

  margin-top: 3px;

  font-size: 20px;
}

.candidateForecastMeter {
  overflow: hidden;

  height: 8px;
  margin-top: 12px;

  border-radius: 999px;

  background: #edf2f8;
}

.candidateForecastMeter span {
  display: block;

  height: 100%;

  border-radius: inherit;
}

.forecastMetaGrid {
  display: grid;
  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );

  gap: 12px;

  margin-top: 18px;
}

.forecastMetaItem {
  padding: 14px;

  border:
    1px solid
    var(--line2);

  border-radius: 14px;

  background: #f8fbff;
}

.forecastMetaItem span {
  display: block;

  color: var(--muted);

  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.forecastMetaItem strong {
  display: block;

  margin-top: 4px;

  font-size: 20px;
}


/* =========================================================
   RACE PAGE — POLLING AVERAGE CARD
   ========================================================= */

.pollingAverageCard {
  position: relative;
  overflow: hidden;
}

.pollingAverageCard::before {
  content: "";

  position: absolute;
  inset: 0 0 auto 0;

  height: 5px;

  background:
    linear-gradient(
      90deg,
      var(--blue) 0 50%,
      var(--red) 50% 100%
    );
}

.pollingAverageMargin {
  font-size: 34px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.04em;
}

.pollingAverageMargin.democratic {
  color: var(--blue);
}

.pollingAverageMargin.republican {
  color: var(--red);
}

.pollingCandidateRows {
  margin-top: 12px;
}

.pollingCandidateRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;

  padding: 13px 0;

  border-bottom:
    1px solid
    var(--line2);
}

.pollingCandidateRow:last-child {
  border-bottom: 0;
}

.pollingCandidateName {
  display: flex;
  align-items: center;
  gap: 6px;

  min-width: 0;
}

.pollingCandidateName span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  font-weight: 800;
}

.pollingCandidateRow strong {
  flex-shrink: 0;

  font-size: 20px;
}

.pollingShareBar {
  display: flex;

  overflow: hidden;

  width: 100%;
  height: 18px;
  margin-top: 20px;

  border-radius: 999px;

  background: #e8edf5;

  box-shadow:
    inset 0 1px 2px
      rgba(18, 47, 84, 0.1);
}

.pollingShareSegment {
  display: block;
  height: 100%;
}

.pollingBarLegend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;

  margin-top: 14px;
}

.pollingBarLegend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;

  color: var(--muted);

  font-size: 12px;
}

.pollingBarLegend i {
  width: 9px;
  height: 9px;

  border-radius: 50%;
}

.pollingBarLegend b {
  color: var(--ink);
}

.pollingAverageMeta {
  margin-top: 16px;

  color: var(--muted);

  font-size: 13px;
  line-height: 1.55;
}


/* =========================================================
   RUNNING-AVERAGE CHART
   ========================================================= */

.pollingTrendSection {
  scroll-margin-top: 95px;
}

.chartRangeControls {
  display: inline-flex;
  align-items: center;

  padding: 4px;

  border:
    1px solid
    var(--line);

  border-radius: 999px;

  background: #ffffff;

  box-shadow: var(--shadow-small);
}

.chartRangeControls button {
  min-width: 48px;
  padding: 8px 11px;

  border: 0;
  border-radius: 999px;

  color: var(--muted);
  background: transparent;

  font-size: 12px;
  font-weight: 850;

  cursor: pointer;
}

.chartRangeControls button:hover {
  color: var(--ink);
}

.chartRangeControls button.active {
  color: #ffffff;
  background: var(--navy);
}

.pollingChartCard {
  padding: 18px 20px 16px;
}

.pollingChartWrap {
  position: relative;

  width: 100%;
  height: 390px;
}

.pollingChartFooter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  margin-top: 12px;
  padding-top: 13px;

  border-top:
    1px solid
    var(--line2);

  color: var(--muted);

  font-size: 12px;
  font-weight: 700;
}


/* =========================================================
   RACE INFORMATION CARDS
   ========================================================= */

.raceInfoGrid {
  align-items: stretch;
}

.raceInfoCard {
  min-height: 170px;
}

.raceInfoLabel {
  display: block;

  color: var(--muted);

  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.raceInfoCard strong {
  display: block;

  margin-top: 8px;

  font-size:
    clamp(
      24px,
      4vw,
      36px
    );

  letter-spacing: -0.04em;
}

.raceInfoCard p {
  margin: 12px 0 0;

  color: var(--muted);

  line-height: 1.55;
}
/* =========================================================
   HOMEPAGE — CONTROL FORECASTS
   ========================================================= */

.controlForecasts {
  display: grid;
  gap: 12px;
}

.controlForecastCard {
  display: block;

  padding: 18px;

  border:
    1px solid
    rgba(255, 255, 255, 0.16);

  border-radius: 18px;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.13),
      rgba(255, 255, 255, 0.07)
    );

  box-shadow:
    inset 0 1px 0
      rgba(255, 255, 255, 0.08);

  transition:
    transform 0.18s ease,
    background 0.18s ease;
}

.controlForecastCard:hover {
  transform: translateY(-2px);

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.18),
      rgba(255, 255, 255, 0.1)
    );
}

.controlForecastLabel {
  color: #9ac9ff;

  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.controlForecastMessage {
  margin-top: 7px;

  color: #ffffff;

  font-size: 18px;
  font-weight: 850;
  line-height: 1.35;
}

.controlForecastLink {
  margin-top: 10px;

  color: #cfe5ff;

  font-size: 12px;
  font-weight: 800;
}


/* =========================================================
   HOMEPAGE — RACE OF THE DAY
   ========================================================= */

#raceOfTheDay {
  margin-top: 34px;
}

.raceOfDayCard {
  display: block;

  overflow: hidden;

  padding: 26px;

  border:
    1px solid
    #bfd4f0;

  border-radius: 24px;

  background:
    radial-gradient(
      circle at 90% 0%,
      rgba(22, 119, 255, 0.1),
      transparent 34%
    ),
    linear-gradient(
      145deg,
      #ffffff,
      #f7fbff
    );

  box-shadow: var(--shadow);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.raceOfDayCard:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-large);
}

.raceOfDayTopline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.raceOfDayBadge {
  display: inline-flex;
  align-items: center;

  padding: 7px 11px;

  border-radius: 999px;

  color: #8a6200;
  background: #fff4d9;

  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.raceOfDayGrid {
  display: grid;
  grid-template-columns:
    minmax(0, 1.3fr)
    minmax(180px, 0.7fr);

  align-items: center;
  gap: 28px;

  margin-top: 20px;
}

.raceOfDayGrid h2 {
  margin: 6px 0 10px;

  font-size:
    clamp(
      28px,
      4vw,
      44px
    );

  letter-spacing: -0.04em;
}

.raceOfDayGrid p {
  margin: 0;

  color: var(--muted);

  font-size: 16px;
  line-height: 1.6;
}

.raceOfDayNumbers {
  display: flex;
  flex-direction: column;
  align-items: center;

  padding: 22px;

  border:
    1px solid
    var(--line);

  border-radius: 20px;

  background: #ffffff;
}

.raceOfDayNumbers strong {
  font-size:
    clamp(
      42px,
      6vw,
      64px
    );

  line-height: 1;
  letter-spacing: -0.06em;
}

.raceOfDayNumbers span {
  margin-top: 8px;

  color: var(--muted);

  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.raceOfDayCandidates {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;

  margin-top: 22px;
  padding-top: 18px;

  border-top:
    1px solid
    var(--line2);
}

.raceOfDayCandidates span {
  display: inline-flex;
  align-items: center;

  color: var(--muted);

  font-size: 13px;
}

.raceOfDayCandidates b {
  margin-left: 7px;

  color: var(--ink);
}

.raceOfDayLink {
  margin-top: 18px;

  color: var(--blue);

  font-weight: 850;
}


/* =========================================================
   MAPS
   ========================================================= */

.mapSection {
  scroll-margin-top: 90px;
}

.forecastMap {
  min-height: 430px;
  padding: 14px;
}

.usMapSvg {
  display: block;

  width: 100%;
  height: auto;
}

.usMapState {
  stroke:
    rgba(255, 255, 255, 0.82);

  stroke-width: 0.8;

  transition:
    filter 0.14s ease,
    opacity 0.14s ease;
}

.usMapState.hasRace {
  cursor: pointer;
}

.usMapState.hasRace:hover,
.usMapState.hasRace:focus {
  filter:
    brightness(1.08)
    drop-shadow(
      0 2px 4px
      rgba(0, 0, 0, 0.18)
    );

  outline: none;
}

.usMapStateLabel {
  fill: #ffffff;

  font-size: 11px;
  font-weight: 900;
  text-anchor: middle;

  pointer-events: none;
}

.usMapStateLabel.dark {
  fill: #17233b;
}

.mapLegend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;

  padding: 14px 18px 18px;

  border-top:
    1px solid
    var(--line);

  color: var(--muted);

  font-size: 12px;
}

.mapLegend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legendDot {
  display: inline-block;

  width: 11px;
  height: 11px;

  border-radius: 50%;
}

.mapTooltip {
  position: fixed;
  z-index: 200;

  display: none;

  max-width: 260px;
  padding: 12px 14px;

  border:
    1px solid
    rgba(255, 255, 255, 0.12);

  border-radius: 12px;

  color: #ffffff;
  background:
    rgba(7, 26, 54, 0.96);

  box-shadow:
    0 14px 35px
    rgba(0, 0, 0, 0.24);

  pointer-events: none;
}

.mapTooltip.visible {
  display: block;
}

.mapTooltip strong,
.mapTooltip span {
  display: block;
}

.mapTooltip strong {
  margin-bottom: 5px;
}

.mapTooltip span {
  color: #dceaff;

  font-size: 12px;
  line-height: 1.45;
}

.map-dem-safe {
  fill: var(--dem-safe);
  background: var(--dem-safe);
}

.map-dem-likely {
  fill: var(--dem-likely);
  background: var(--dem-likely);
}

.map-dem-lean {
  fill: var(--dem-lean);
  background: var(--dem-lean);
}

.map-dem-tilt {
  fill: var(--dem-tilt);
  background: var(--dem-tilt);
}

.map-tossup {
  fill: #cfd4dc;
  background: #cfd4dc;
}

.map-rep-tilt {
  fill: var(--rep-tilt);
  background: var(--rep-tilt);
}

.map-rep-lean {
  fill: var(--rep-lean);
  background: var(--rep-lean);
}

.map-rep-likely {
  fill: var(--rep-likely);
  background: var(--rep-likely);
}

.map-rep-safe {
  fill: var(--rep-safe);
  background: var(--rep-safe);
}

.map-no-race,
.map-not-up,
.map-unrated {
  fill: #d8dee8;
  background: #d8dee8;
}

.houseMapCard {
  padding: 10px;
}


/* =========================================================
   AUTHENTICATION
   ========================================================= */

.authShell {
  display: grid;
  min-height: 100vh;
  place-items: center;

  padding: 25px;

  background:
    radial-gradient(
      circle at 20% 10%,
      #1c5aa7,
      transparent 35%
    ),
    #06152d;
}

.authCard {
  width: 100%;
  max-width: 440px;
  padding: 32px;

  border-radius: 24px;

  background: #ffffff;

  box-shadow:
    0 25px 80px
    rgba(0, 0, 0, 0.35);
}

.authCard .brand {
  margin-bottom: 24px;

  color: var(--navy);
}


/* =========================================================
   NOTICES
   ========================================================= */

.notice {
  margin: 12px 0;
  padding: 12px 14px;

  border-radius: 11px;

  color: #7a5700;
  background: #fff6dc;

  font-size: 13px;
}

.notice.error {
  color: #9c1730;
  background: #ffe7ec;
}

.notice.success {
  color: #0b704a;
  background: #e5f8ef;
}


/* =========================================================
   ADMIN
   ========================================================= */

.adminLayout {
  display: grid;
  grid-template-columns: 235px 1fr;

  min-height:
    calc(100vh - 68px);
}

.sidebar {
  padding: 22px 15px;

  color: #ffffff;
  background: #0a1e3d;
}

.sidebar button {
  width: 100%;
  margin-bottom: 4px;
  padding: 12px;

  border: 0;
  border-radius: 10px;

  color: #c8d7ed;
  background: transparent;

  text-align: left;
  font-weight: 750;

  cursor: pointer;
}

.sidebar button.active,
.sidebar button:hover {
  color: #ffffff;
  background: #163967;
}

.adminMain {
  min-width: 0;
  padding: 25px;
}

.adminHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;

  margin-bottom: 20px;
}

.adminPanel {
  display: none;
}

.adminPanel.active {
  display: block;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;

  display: none;
  place-items: center;

  padding: 22px;

  background:
    rgba(2, 13, 31, 0.68);
}

.modal.open {
  display: grid;
}

.modalCard {
  width: 100%;
  max-width: 780px;
  max-height: 90vh;

  overflow: auto;

  padding: 24px;

  border-radius: 20px;

  background: #ffffff;
}

.modalHead {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 16px;
}

.modalHead h2 {
  margin: 0;
}

.close {
  width: 36px;
  height: 36px;

  border: 0;
  border-radius: 50%;

  background: #edf1f7;

  font-size: 18px;

  cursor: pointer;
}

.statGrid {
  display: grid;
  grid-template-columns:
    repeat(
      4,
      minmax(0, 1fr)
    );

  gap: 14px;
}

.stat {
  padding: 18px;

  border:
    1px solid
    var(--line);

  border-radius: 16px;

  background: #ffffff;
}

.stat strong {
  display: block;

  font-size: 30px;
}
/* =========================================================
   FOOTER
   ========================================================= */

.footer {
  padding: 34px 20px;

  color: #b9c8df;
  background: #06152d;
}

.footerInner {
  display: flex;
  justify-content: space-between;
  gap: 25px;

  width: 100%;
  max-width: 1220px;
  margin: auto;
}

.footer p {
  margin: 7px 0 0;
}


/* =========================================================
   GENERAL CONTENT PAGES
   ========================================================= */

.contentHero {
  padding: 34px;

  border:
    1px solid
    var(--line);

  border-radius: 24px;

  background:
    linear-gradient(
      145deg,
      #ffffff,
      #f6faff
    );

  box-shadow: var(--shadow-small);
}

.contentHero h1 {
  margin: 8px 0 12px;

  font-size:
    clamp(
      36px,
      6vw,
      58px
    );

  letter-spacing: -0.05em;
}

.contentHero p {
  max-width: 780px;

  color: var(--muted);

  font-size: 17px;
  line-height: 1.65;
}

.proseCard {
  padding: 28px;
}

.proseCard h2 {
  margin-top: 0;
}

.proseCard h3 {
  margin-top: 28px;
}

.proseCard p,
.proseCard li {
  color: #4f5d74;
  line-height: 1.7;
}

.proseCard ul,
.proseCard ol {
  padding-left: 22px;
}


/* =========================================================
   DATA SUMMARY CARDS
   ========================================================= */

.dataSummaryGrid {
  display: grid;
  grid-template-columns:
    repeat(
      3,
      minmax(0, 1fr)
    );

  gap: 16px;
}

.dataSummaryCard {
  padding: 20px;

  border:
    1px solid
    var(--line);

  border-radius: 18px;

  background: #ffffff;

  box-shadow: var(--shadow-small);
}

.dataSummaryCard span {
  display: block;

  color: var(--muted);

  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dataSummaryCard strong {
  display: block;

  margin-top: 6px;

  font-size:
    clamp(
      30px,
      5vw,
      48px
    );

  letter-spacing: -0.05em;
}


/* =========================================================
   PRIMARY AND APPROVAL PAGE HELPERS
   ========================================================= */

.trackerTabs {
  display: inline-flex;
  gap: 5px;

  padding: 4px;

  border:
    1px solid
    var(--line);

  border-radius: 999px;

  background: #ffffff;
}

.trackerTabs button {
  padding: 9px 14px;

  border: 0;
  border-radius: 999px;

  color: var(--muted);
  background: transparent;

  font-size: 12px;
  font-weight: 850;

  cursor: pointer;
}

.trackerTabs button.active {
  color: #ffffff;
  background: var(--navy);
}

.approvalBar,
.primaryBar {
  display: flex;

  overflow: hidden;

  height: 18px;
  margin-top: 18px;

  border-radius: 999px;

  background: #e8edf5;
}

.approvalBar span,
.primaryBar span {
  display: block;
  height: 100%;
}

.trackerCandidateList {
  margin-top: 18px;
}

.trackerCandidateRow {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    auto;
  align-items: center;
  gap: 15px;

  padding: 13px 0;

  border-bottom:
    1px solid
    var(--line2);
}

.trackerCandidateRow:last-child {
  border-bottom: 0;
}

.trackerCandidateRow strong {
  font-size: 19px;
}


/* =========================================================
   RESPONSIVE DESIGN
   ========================================================= */

@media (
  max-width: 1050px
) {
  .navlinks {
    gap: 15px;
    font-size: 12px;
  }

  .grid3 {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }

  .statGrid {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }

  .dataSummaryGrid {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }
}

@media (
  max-width: 850px
) {
  .nav {
    position: relative;
  }

  .menuBtn {
    display: block;
  }

  .navlinks {
    position: absolute;
    top: calc(100% + 1px);
    right: 14px;
    left: 14px;

    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;

    padding: 12px;

    border:
      1px solid
      rgba(255, 255, 255, 0.1);

    border-radius: 14px;

    background:
      rgba(7, 26, 54, 0.98);

    box-shadow:
      0 18px 45px
      rgba(0, 0, 0, 0.28);
  }

  .navlinks.open {
    display: flex;
  }

  .navlinks a {
    padding: 11px 12px;

    border-radius: 9px;
  }

  .navlinks a::after {
    display: none;
  }

  .navlinks a:hover,
  .navlinks a.active {
    background:
      rgba(255, 255, 255, 0.08);
  }

  .heroGrid,
  .grid2,
  .raceOfDayGrid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 32px 26px;
  }

  .probCard,
  .forecastCounter {
    width: 100%;
  }

  .sectionHead,
  .sectionHeading,
  .raceSectionHeader {
    align-items: flex-start;
    flex-direction: column;
  }

  .mapInstructions {
    max-width: none;
    text-align: left;
  }

  .chartRangeControls {
    align-self: flex-start;
  }

  .adminLayout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: flex;
    overflow-x: auto;
    gap: 6px;

    padding: 10px;
  }

  .sidebar button {
    flex: 0 0 auto;

    width: auto;
    margin: 0;
  }

  .adminHead {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (
  max-width: 680px
) {
  .page {
    padding:
      24px 14px
      56px;
  }

  .hero {
    padding: 27px 20px;

    border-radius: 20px;
  }

  .hero p {
    font-size: 16px;
  }

  .grid3,
  .dataSummaryGrid,
  .statGrid,
  .formGrid,
  .forecastMetaGrid,
  .candidateForecastNumbers {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 18px;
  }

  .section {
    margin-top: 26px;
  }

  .sectionHead h2,
  .sectionHeading h2,
  .raceSectionHeader h2,
  .sectionMiniHead h2 {
    font-size: 23px;
  }

  .pollingAverageMargin {
    font-size: 29px;
  }

  .pollingChartWrap {
    height: 320px;
  }

  .pollingChartFooter {
    align-items: flex-start;
    flex-direction: column;
  }

  .raceToolbar,
  .raceToolbar input {
    width: 100%;
    min-width: 0;
  }

  .raceOfDayTopline {
    align-items: flex-start;
    flex-direction: column;
  }

  .footerInner {
    flex-direction: column;
  }

  .modal {
    padding: 10px;
  }

  .modalCard {
    padding: 18px;
  }
}

@media (
  max-width: 470px
) {
  .brand {
    font-size: 18px;
  }

  .brand img {
    width: 38px;
    height: 38px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .bigProb {
    font-size: 55px;
  }

  .chartRangeControls {
    width: 100%;
  }

  .chartRangeControls button {
    flex: 1;
    min-width: 0;
  }

  .pollingBarLegend {
    flex-direction: column;
    gap: 8px;
  }

  .raceInfoCard {
    min-height: 145px;
  }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (
  prefers-reduced-motion:
    reduce
) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;

    animation-duration:
      0.01ms !important;

    animation-iteration-count:
      1 !important;

    transition-duration:
      0.01ms !important;
  }
}


/* =========================================================
   ELECTIONLAB NEWSROOM — MODEL 2.0
   ========================================================= */

.modelDashboardGrid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.8fr);
  gap: 18px;
  margin-bottom: 20px;
}

.modelCardHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.modelCardHead h2,
.engineHealthCard h2 {
  margin: 4px 0 0;
}

.readinessPercent {
  color: var(--blue);
  font-size: 38px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.progressTrack {
  overflow: hidden;
  height: 16px;
  margin-top: 22px;
  border-radius: 999px;
  background: #e7edf6;
}

.progressTrack span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
  transition: width 0.35s ease;
}

.progressMeta {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
}

.readinessBreakdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.readinessBreakdown button {
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  background: #f8fbff;
  text-align: left;
  cursor: pointer;
}

.readinessBreakdown button:hover {
  border-color: #a9c8ef;
  background: #f2f7ff;
}

.readinessBreakdown strong,
.readinessBreakdown span {
  display: block;
}

.readinessBreakdown strong {
  font-size: 24px;
}

.readinessBreakdown span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.engineHealthLine {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 20px 0;
}

.statusDot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--tossup);
  box-shadow: 0 0 0 5px rgba(139, 143, 151, 0.13);
}

.statusDot.healthy {
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(22, 163, 106, 0.13);
}

.statusDot.warning {
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(245, 185, 66, 0.18);
}

.engineMeta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 20px;
}

.engineMeta div {
  padding: 11px;
  border: 1px solid var(--line2);
  border-radius: 12px;
  background: #f8fbff;
}

.engineMeta dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.engineMeta dd {
  margin: 4px 0 0;
  font-weight: 850;
}

.v2EngineStats {
  margin-top: 18px;
}

.engineToolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(150px, 0.32fr));
  gap: 10px;
}

.forecastEngineTable {
  min-width: 1180px;
}

.modeBadge,
.readinessBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 27px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.modeBadge.automatic {
  color: #1761ad;
  background: var(--blue-soft);
}

.modeBadge.manual {
  color: #6b3dc4;
  background: var(--purple-soft);
}

.readinessBadge.v2-ready {
  color: #08744b;
  background: var(--green-soft);
}

.readinessBadge.v2-review,
.readinessBadge.v2-model-ready {
  color: #1761ad;
  background: var(--blue-soft);
}

.readinessBadge.v2-attention {
  color: #996700;
  background: var(--gold-soft);
}

.readinessBadge.v2-missing {
  color: #b9253d;
  background: var(--red-soft);
}

.miniProgress {
  overflow: hidden;
  width: 110px;
  height: 6px;
  margin: 8px 0 4px;
  border-radius: 999px;
  background: #e8edf5;
}

.miniProgress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.v2WarningsCell {
  max-width: 280px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.tableActions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tableActions .btn {
  padding: 8px 10px;
  font-size: 11px;
}

.v2OverrideModalCard {
  max-width: 760px;
}

.modelComparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.modelComparison > div {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbff;
}

.modelComparison span,
.modelComparison strong {
  display: block;
}

.modelComparison span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.modelComparison strong {
  margin-top: 5px;
  font-size: 17px;
}

.overrideActions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 1050px) {
  .modelDashboardGrid {
    grid-template-columns: 1fr;
  }

  .engineToolbar {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .readinessBreakdown {
    grid-template-columns: 1fr 1fr;
  }

  .engineToolbar,
  .modelComparison {
    grid-template-columns: 1fr;
  }

  .progressMeta {
    flex-direction: column;
    gap: 3px;
  }

  .overrideActions {
    align-items: stretch;
    flex-direction: column;
  }

  .overrideActions .btn {
    width: 100%;
  }
}


/* =========================================================
   ELECTIONLAB MODEL 2.1 — PUBLIC FORECAST COMPONENTS
   ========================================================= */

.forecastCounterUpdated {
  margin-top: 9px;
  color: #bcd0e8;
  font-size: 11px;
  text-align: center;
}

.raceCardUpdateRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--line2);
  color: var(--muted);
  font-size: 11px;
}

.raceMomentum {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 850;
}

.raceMomentum.democratic {
  color: #1761ad;
  background: var(--blue-soft);
}

.raceMomentum.republican {
  color: #b9253d;
  background: var(--red-soft);
}

.raceMomentum.neutral {
  color: #596579;
  background: #edf1f6;
}

.publicForecastUpdated {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.modelFactorGrid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.modelFactor {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-small);
}

.modelFactor span,
.modelFactor strong,
.modelFactor small {
  display: block;
}

.modelFactor span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.modelFactor strong {
  margin-top: 6px;
  font-size: 24px;
  letter-spacing: -.035em;
}

.modelFactor small {
  margin-top: 5px;
  color: var(--muted);
}

.publicHistoryCard {
  padding: 18px;
}

.publicHistoryChartWrap {
  position: relative;
  height: 340px;
}

.fundraisingPublicCard {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.fundraisingPublicNumbers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.fundraisingPublicNumbers > div {
  padding: 12px;
  border: 1px solid var(--line2);
  border-radius: 13px;
  background: #f8fbff;
}

.fundraisingPublicNumbers span,
.fundraisingPublicNumbers strong {
  display: block;
}

.fundraisingPublicNumbers span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.fundraisingPublicNumbers strong {
  margin-top: 4px;
  font-size: 21px;
}

.developmentList {
  padding: 0;
  overflow: hidden;
}

.developmentItem {
  display: grid;
  grid-template-columns: 125px minmax(0, 1fr);
  gap: 18px;
  padding: 18px 21px;
  border-bottom: 1px solid var(--line2);
}

.developmentItem:last-child {
  border-bottom: 0;
}

.developmentItem time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.developmentItem p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 1100px) {
  .modelFactorGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .raceCardUpdateRow {
    align-items: flex-start;
    flex-direction: column;
  }

  .publicForecastUpdated {
    text-align: left;
  }

  .modelFactorGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .developmentItem {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 480px) {
  .modelFactorGrid,
  .fundraisingPublicNumbers {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   ELECTIONLAB MODEL DATA STUDIO
   ========================================================= */

.dataStudioSelector {
  display: grid;
  grid-template-columns: minmax(230px, .65fr) minmax(300px, 1fr);
  gap: 14px;
}

.dataStudioRaceSummary {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 15px;
  border: 1px solid var(--line2);
  border-radius: 14px;
  background: #f8fbff;
}

.dataStudioRaceSummary div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dataStudioRaceSummary span {
  color: var(--muted);
  font-size: 12px;
}

.dataStudioWorkspace[hidden] {
  display: none;
}

.dataStudioTabs {
  display: flex;
  overflow-x: auto;
  gap: 7px;
  margin-top: 20px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #ffffff;
}

.dataStudioTabs button {
  flex: 0 0 auto;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-weight: 850;
  cursor: pointer;
}

.dataStudioTabs button.active {
  color: #ffffff;
  background: var(--navy2);
}

.dataStudioTab {
  display: none;
}

.dataStudioTab.active {
  display: block;
}

.candidateScoreCard {
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.candidateScoreHead,
.candidateScoreActions,
.developmentAdminHeadline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
}

.candidateScoreHead small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.candidateScoreGrid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.candidateScoreActions {
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--line2);
}

.candidateScoreActions label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.candidateScoreActions input[type="checkbox"] {
  width: auto;
}

.developmentAdminList {
  padding: 0;
  overflow: hidden;
}

.developmentAdminItem {
  display: grid;
  grid-template-columns: 115px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line2);
}

.developmentAdminItem:last-child {
  border-bottom: 0;
}

.developmentAdminDate {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.developmentAdminItem p {
  margin: 6px 0;
  color: var(--muted);
  line-height: 1.55;
}

.developmentAdminItem small {
  color: var(--muted2);
}

@media (max-width: 900px) {
  .dataStudioSelector,
  .candidateScoreGrid {
    grid-template-columns: 1fr;
  }

  .developmentAdminItem {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .dataStudioRaceSummary,
  .candidateScoreHead,
  .candidateScoreActions {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* =========================================================
   ELECTIONLAB BULK MODEL IMPORT
   ========================================================= */

.modelImportDrop {
  display: grid;
  grid-template-columns: minmax(250px, .65fr) minmax(280px, 1fr);
  align-items: center;
  gap: 20px;
}

.modelImportDrop p {
  margin: 5px 0 0;
}

.modelImportSummary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.modelImportWarnings {
  margin-bottom: 14px;
}

.modelImportWarnings .notice {
  display: block;
}

.modelImportWarnings ul {
  max-height: 260px;
  overflow: auto;
  margin: 10px 0 0;
  padding-left: 20px;
}

@media (max-width: 1050px) {
  .modelImportSummary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .modelImportDrop,
  .modelImportSummary {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   FORECAST BREAKDOWN — REDESIGNED
   ========================================================= */

.forecastBreakdownCard {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-small);
}

.forecastBreakdownHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line2);
  background:
    linear-gradient(
      135deg,
      #f8fbff,
      #ffffff
    );
}

.forecastBreakdownEyebrow {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.forecastBreakdownMargin {
  display: block;
  margin-top: 4px;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -.05em;
}

.forecastBreakdownRating {
  min-width: 135px;
  padding: 11px 15px;
  border-radius: 999px;
  color: #1761ad;
  background: var(--blue-soft);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.forecastFactorList {
  display: flex;
  flex-direction: column;
}

.forecastFactorRow {
  display: grid;
  grid-template-columns: minmax(220px, .85fr) minmax(320px, 1.15fr);
  align-items: center;
  gap: 28px;
  padding: 19px 24px;
  border-bottom: 1px solid var(--line2);
}

.forecastFactorRow:last-child {
  border-bottom: 0;
}

.forecastFactorCopy {
  min-width: 0;
}

.forecastFactorTitle {
  font-size: 15px;
  font-weight: 900;
}

.forecastFactorDetail {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.forecastFactorVisual {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 88px;
  align-items: center;
  gap: 14px;
}

.forecastFactorScale {
  position: relative;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      rgba(239, 68, 68, .12) 0 50%,
      rgba(22, 119, 255, .12) 50% 100%
    );
}

.forecastFactorCenter {
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: 50%;
  width: 2px;
  border-radius: 999px;
  background: #9aa7b9;
  transform: translateX(-50%);
  z-index: 3;
}

.forecastFactorFill {
  position: absolute;
  top: 0;
  bottom: 0;
}

.forecastFactorFill.dem {
  left: 50%;
  background:
    linear-gradient(
      90deg,
      var(--blue2),
      var(--blue)
    );
}

.forecastFactorFill.rep {
  right: 50%;
  background:
    linear-gradient(
      90deg,
      var(--red),
      var(--red2)
    );
}

.forecastFactorEvenMark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  border: 3px solid #7d8796;
  border-radius: 50%;
  background: #ffffff;
  transform: translate(-50%, -50%);
  z-index: 4;
}

.forecastFactorValue {
  font-size: 15px;
  font-weight: 950;
  text-align: right;
}

.forecastFactorValue.dem {
  color: var(--blue);
}

.forecastFactorValue.rep {
  color: var(--red);
}

.forecastFactorValue.even {
  color: #667085;
}

.modelFactorGrid,
.modelFactor {
  display: none !important;
}

@media (max-width: 820px) {
  .forecastFactorRow {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .forecastFactorVisual {
    grid-template-columns: minmax(150px, 1fr) 78px;
  }
}

@media (max-width: 560px) {
  .forecastBreakdownHeader {
    align-items: flex-start;
    flex-direction: column;
  }

  .forecastBreakdownRating {
    min-width: 0;
  }

  .forecastFactorVisual {
    grid-template-columns: 1fr;
  }

  .forecastFactorValue {
    text-align: left;
  }
}


/* ElectionLab 2.0 visual system */
.el2{max-width:1240px}.elHero{background:linear-gradient(125deg,#091a33,#132f55 72%,#19436c);border-radius:22px;padding:clamp(35px,6vw,82px);color:#fff;margin-top:28px;position:relative;overflow:hidden}.elHero:after{content:"28";position:absolute;right:-18px;bottom:-115px;font-size:clamp(180px,30vw,400px);font-weight:900;color:#ffffff08;pointer-events:none}.elHero .kicker{color:#a6c8f5;letter-spacing:.14em}.elHero h1{font-size:clamp(48px,7.5vw,104px);line-height:1.04;letter-spacing:-.055em;max-width:820px;margin:22px 0}.elHero h1 em{color:#90b8ff;font-style:normal}.elHero p{font-size:clamp(16px,2vw,21px);line-height:1.6;max-width:690px;color:#cbd8e9}.elActions{display:flex;flex-wrap:wrap;gap:12px;margin:30px 0}.elButton{display:inline-flex;align-items:center;justify-content:center;padding:14px 21px;border-radius:10px;background:#fff;color:#10264b;text-decoration:none;font-weight:750}.elButton.ghost{background:transparent;border:1px solid #ffffff70;color:#fff}.elHeroNote{color:#a9bfd9;font-size:13px;margin-top:30px}.elCards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.elFeature{border-radius:16px;padding:clamp(24px,4vw,44px);min-height:260px;display:flex;flex-direction:column;text-decoration:none;color:#15243b;background:#fff;border:1px solid #e1e7f0;box-shadow:0 8px 30px #12243b0b;border-top:6px solid #2c70c9}.elFeature.rep{border-top-color:#c43f4d}.elFeature h2{font-size:clamp(25px,3vw,35px);margin:18px 0 10px}.elFeature p{line-height:1.65;color:#536278}.elFeature strong{margin-top:auto;padding-top:22px;color:#235ca8}.elFeature.rep strong{color:#ae3543}.elEyebrow{font-size:12px;letter-spacing:.13em;font-weight:800;color:#697a91}.elTiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.elTiles>a{padding:28px;border:1px solid #e0e7ef;border-radius:14px;text-decoration:none;color:#182943;background:#fff}.elTiles span{font-size:11px;letter-spacing:.12em;color:#7b8ca2;font-weight:750}.elTiles h3{font-size:24px;margin:16px 0}.elTiles p{line-height:1.55;color:#607086;min-height:76px}.elTiles b{color:#225caa}.elBanner{background:#122a4a;color:#fff;padding:35px;border-radius:16px;display:flex;gap:25px;align-items:center;justify-content:space-between;margin:40px 0}.elBanner p{max-width:650px;color:#d1ddec;line-height:1.6}.elNotice{padding:35px;background:#fff;border-radius:15px;border:1px solid #dce5ef;max-width:800px}.elNotice p{line-height:1.7;color:#56677b}@media(max-width:760px){.elCards,.elTiles{grid-template-columns:1fr}.elBanner{flex-direction:column;align-items:flex-start}.elHero{border-radius:14px}.elHero h1{font-size:52px}}


/* =========================================================
   ELECTIONLAB 2.0 | DISTINCT 2028 PRIMARY PARTY THEMES
   These styles only apply on democrats.html and republicans.html.
   Poll calculations, candidate line colors, and other pages are unchanged.
   ========================================================= */

body.primary-theme {
  /* Values are defined below for each party. */
  --party-ink: #132a4e;
  --party-surface: #f4f7fc;
  --party-tint: #eef4fb;
  --party-line: #cdd9e9;
  --party-glow: rgba(50, 117, 199, .12);
  --party-glow-strong: rgba(50, 117, 199, .22);
  --party-accent: #1f69c7;
  --party-accent-dark: #194f91;
  --party-header-start: #0a2547;
  --party-header-end: #154b80;
  --party-hero-start: #0c2a56;
  --party-hero-mid: #154981;
  --party-hero-end: #1c65a1;
  --party-hero-glow: rgba(114, 190, 255, .4);
  --party-hero-glow-2: rgba(44, 119, 228, .23);
  --party-selection: #226dbf;
  background-color: var(--party-surface);
  background-image:
    radial-gradient(ellipse 860px 550px at 2% 6%, var(--party-glow-strong), transparent 78%),
    radial-gradient(ellipse 900px 650px at 102% 48%, var(--party-glow), transparent 76%),
    linear-gradient(180deg, var(--party-surface), #fff 70%, var(--party-surface));
  background-attachment: scroll;
}

body.primary-theme.republican-theme {
  --party-ink: #4c1724;
  --party-surface: #fcf4f4;
  --party-tint: #fff0f0;
  --party-line: #edcfd3;
  --party-glow: rgba(185, 45, 69, .13);
  --party-glow-strong: rgba(183, 41, 62, .24);
  --party-accent: #bd3045;
  --party-accent-dark: #8f2337;
  --party-header-start: #380f20;
  --party-header-end: #80223b;
  --party-hero-start: #541026;
  --party-hero-mid: #951f3f;
  --party-hero-end: #b9314b;
  --party-hero-glow: rgba(255, 131, 148, .36);
  --party-hero-glow-2: rgba(255, 92, 111, .28);
  --party-selection: #b82d42;
}

body.primary-theme::selection,
body.primary-theme *::selection {
  color: #fff;
  background: var(--party-selection);
}

body.primary-theme .topbar {
  background: linear-gradient(110deg, var(--party-header-start) 2%, var(--party-header-end) 100%);
  border-bottom: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 9px 28px rgba(19, 19, 35, .15);
}

body.primary-theme .navlinks a::after {
  background: #fff;
}

body.primary-theme .navlinks a:hover,
body.primary-theme .navlinks a.active {
  color: #fff;
}

body.primary-theme .navlinks a.active {
  opacity: 1;
}

body.primary-theme .hero {
  isolation: isolate;
  border: 1px solid rgba(255,255,255,.15);
  min-height: 250px;
  background:
    radial-gradient(circle at 85% 6%, var(--party-hero-glow), transparent 43%),
    radial-gradient(circle at 3% 95%, var(--party-hero-glow-2), transparent 42%),
    linear-gradient(125deg, var(--party-hero-start) 6%, var(--party-hero-mid) 70%, var(--party-hero-end));
  box-shadow: 0 18px 45px rgba(30, 21, 45, .17);
}

body.primary-theme .hero::before {
  content: "2028";
  position: absolute;
  z-index: 0;
  right: 0;
  bottom: -70px;
  color: rgba(255,255,255,.085);
  font-size: clamp(145px, 21vw, 280px);
  line-height: .9;
  font-weight: 950;
  letter-spacing: -.09em;
  pointer-events: none;
}

body.primary-theme .hero .kicker {
  color: #fff;
}

body.primary-theme .hero p {
  color: rgba(255,255,255,.87);
}

body.primary-theme .probCard {
  background: linear-gradient(150deg, rgba(255,255,255,.19), rgba(255,255,255,.075));
  border-color: rgba(255,255,255,.27);
  box-shadow: 0 12px 30px rgba(18, 18, 30, .16);
}

body.primary-theme .hero .bigProb {
  color: #fff !important;
}

body.primary-theme .raceLeaderVote {
  color: rgba(255,255,255,.80);
}

body.primary-theme .partyTag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 19px;
  padding: 9px 13px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  background: rgba(255,255,255,.13);
  color: #fff;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: .085em;
  text-transform: uppercase;
}

body.primary-theme .partyTag::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255,255,255,.17);
}

body.primary-theme .sectionHead h2,
body.primary-theme .sectionMiniHead h2 {
  color: var(--party-ink);
}

body.primary-theme .section .kicker,
body.primary-theme .elEyebrow {
  color: var(--party-accent);
}

body.primary-theme .card,
body.primary-theme .tableWrap {
  border-color: var(--party-line);
  box-shadow: 0 8px 26px rgba(34, 32, 51, .045);
}

body.primary-theme .section .card {
  border-top: 3px solid var(--party-accent);
}

body.primary-theme .trackerTabs {
  border-color: var(--party-line);
  background: var(--party-tint);
}

body.primary-theme .trackerTabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s, color .2s;
}

body.primary-theme .trackerTabs a.active,
body.primary-theme .trackerTabs a[aria-current="page"] {
  color: #fff;
  background: var(--party-accent);
}

body.primary-theme .trackerTabs a:not(.active):hover {
  color: var(--party-ink);
  background: #fff;
}

body.primary-theme .chartRangeControls button.active {
  color: #fff;
  background: var(--party-accent);
}

body.primary-theme .chartRangeControls button:focus-visible,
body.primary-theme .trackerTabs a:focus-visible,
body.primary-theme .navlinks a:focus-visible {
  outline: 3px solid var(--party-accent);
  outline-offset: 3px;
}

body.primary-theme thead {
  background: var(--party-tint);
}

body.primary-theme .tableWrap th {
  color: var(--party-accent-dark);
}

body.primary-theme .footer {
  border-top-color: var(--party-line);
}

@media (max-width: 760px) {
  body.primary-theme .hero::before {
    bottom: -28px;
    right: 8px;
    font-size: 124px;
  }

  body.primary-theme .hero {
    min-height: auto;
  }

  body.primary-theme .trackerTabs {
    max-width: 100%;
    flex-wrap: wrap;
  }
}
