:root {
  --runoff-ink: #172033;
  --runoff-muted: #5a6676;
  --runoff-line: #d7dee7;
  --runoff-paper: #fffef7;
  --runoff-panel: #ffffff;
  --runoff-navy: #17375e;
  --runoff-blue: #245ea8;
  --runoff-live: #13745c;
  --runoff-warn: #9a5b05;
  --runoff-danger: #a23838;
  --candidate-a: #0f766e;
  --candidate-b: #7c3aed;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.runoff-page {
  margin: 0;
  background: var(--runoff-paper);
  color: var(--runoff-ink);
}

.runoff-command {
  min-height: 100vh;
  padding: 7.75rem 0 4rem;
  background:
    linear-gradient(180deg, rgba(219, 230, 242, 0.62) 0, rgba(255, 254, 247, 0) 28rem),
    var(--runoff-paper);
}

.runoff-shell {
  width: min(100% - 2rem, 92rem);
  margin: 0 auto;
}

.runoff-breadcrumb {
  margin-bottom: 2rem;
  font-size: 0.875rem;
}

.runoff-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.runoff-breadcrumb a,
.runoff-source-line a {
  color: #174f93;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.runoff-breadcrumb a:hover,
.runoff-breadcrumb a:focus-visible,
.runoff-source-line a:hover,
.runoff-source-line a:focus-visible {
  color: #0e315e;
}

.runoff-demo-banner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: -0.7rem 0 1.6rem;
  padding: 0.85rem 1rem;
  border: 2px solid #7f1d1d;
  border-radius: 0.55rem;
  background:
    repeating-linear-gradient(135deg, rgba(127, 29, 29, 0.08) 0 10px, transparent 10px 20px),
    #fff4d6;
  color: #571515;
  box-shadow: 0 0.6rem 1.8rem rgba(87, 21, 21, 0.2);
}

.runoff-demo-corner-badge {
  position: fixed;
  right: 0.9rem;
  bottom: 0.9rem;
  z-index: 80;
  display: grid;
  gap: 0.08rem;
  min-width: 10.5rem;
  padding: 0.55rem 0.7rem;
  border: 2px solid #fff;
  border-radius: 0.45rem;
  background: #7f1d1d;
  color: #fff;
  box-shadow: 0 0.45rem 1.3rem rgba(33, 12, 12, 0.38);
  text-decoration: none;
}

.runoff-demo-corner-badge strong {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}

.runoff-demo-corner-badge span {
  font-size: 0.66rem;
  font-weight: 700;
}

.runoff-demo-corner-badge:hover,
.runoff-demo-corner-badge:focus-visible {
  background: #571515;
  outline: 3px solid #f1a722;
  outline-offset: 2px;
}

.runoff-demo-banner div {
  display: grid;
  gap: 0.12rem;
}

.runoff-demo-banner strong {
  font-size: 0.9rem;
  letter-spacing: 0.075em;
}

.runoff-demo-banner span {
  font-size: 0.82rem;
  line-height: 1.35;
}

.runoff-demo-banner a {
  flex: 0 0 auto;
  padding: 0.55rem 0.7rem;
  border-radius: 0.35rem;
  background: #7f1d1d;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.runoff-demo-banner a:hover,
.runoff-demo-banner a:focus-visible {
  background: #571515;
  outline: 3px solid #f1a722;
  outline-offset: 2px;
}

.runoff-page--demo .election-status--live {
  border-color: #d59b2d;
  border-left-color: #7f1d1d;
  background: #fffaf0;
}

.runoff-page--demo .election-status--live .election-status__signal {
  background: #7f1d1d;
  box-shadow: 0 0 0 2px #7f1d1d;
  animation: none;
}

.runoff-hero {
  max-width: 64rem;
  margin: 0 auto 2rem;
  text-align: center;
}

.runoff-eyebrow,
.section-heading__kicker,
.election-status__kicker,
.race-card__party {
  margin: 0;
  color: #2d5d92;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.runoff-hero h1 {
  max-width: 57rem;
  margin: 0.45rem auto 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(2.35rem, 6vw, 5.4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.runoff-deck {
  max-width: 53rem;
  margin: 1.25rem auto 0;
  color: #3e4b5c;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.05rem, 2.1vw, 1.35rem);
  line-height: 1.55;
}

.runoff-source-line {
  margin: 1rem auto 0;
  color: var(--runoff-muted);
  font-size: 0.875rem;
}

.election-status {
  display: grid;
  grid-template-columns: minmax(16rem, 1.25fr) minmax(28rem, 1fr);
  gap: 1.25rem 2rem;
  margin: 2rem 0 3rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid #aebed0;
  border-left: 0.4rem solid var(--runoff-blue);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0.6rem 1.8rem rgba(23, 55, 94, 0.08);
}

.election-status--live {
  border-left-color: var(--runoff-live);
}

.election-status--stale {
  border-color: #d69b3e;
  border-left-color: var(--runoff-warn);
  background: #fff9e9;
}

.election-status--complete {
  border-left-color: var(--runoff-navy);
}

.election-status__lead {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.election-status__signal {
  flex: 0 0 auto;
  width: 0.8rem;
  height: 0.8rem;
  margin-top: 0.35rem;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--runoff-blue);
  box-shadow: 0 0 0 2px var(--runoff-blue);
}

.election-status--live .election-status__signal {
  background: var(--runoff-live);
  box-shadow: 0 0 0 2px var(--runoff-live);
  animation: runoff-pulse 2.2s ease-out infinite;
}

.election-status--stale .election-status__signal {
  background: var(--runoff-warn);
  box-shadow: 0 0 0 2px var(--runoff-warn);
  animation: none;
}

.election-status__lead h2 {
  margin: 0.15rem 0 0.15rem;
  font-size: 1.15rem;
  line-height: 1.25;
}

.election-status__lead p:last-child {
  margin: 0;
  color: var(--runoff-muted);
  font-size: 0.875rem;
  line-height: 1.45;
}

.election-status__times {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 0;
}

.election-status__times div {
  min-width: 0;
  padding-left: 0.8rem;
  border-left: 1px solid var(--runoff-line);
}

.election-status__times dt {
  margin-bottom: 0.25rem;
  color: var(--runoff-muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.election-status__times dd {
  margin: 0;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1.35;
}

.election-status__stale {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0.65rem 0.8rem;
  border-radius: 0.4rem;
  background: #f6e6bd;
  color: #563505;
  font-size: 0.9rem;
}

.runoff-countdown {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-left: 2rem;
}

.runoff-countdown[hidden],
[hidden] {
  display: none !important;
}

.runoff-countdown__label {
  color: var(--runoff-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.runoff-countdown strong {
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.25rem;
}

.section-heading h2,
.command-panel h2,
.model-note h2 {
  margin: 0.25rem 0 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.section-heading > p {
  max-width: 35rem;
  margin: 0;
  color: var(--runoff-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.race-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.race-card {
  --candidate-a: #0f766e;
  --candidate-b: #7c3aed;
  position: relative;
  overflow: hidden;
  min-width: 0;
  border: 1px solid #ced7e2;
  border-radius: 0.6rem;
  background: var(--runoff-panel);
  box-shadow: 0 0.35rem 1.1rem rgba(23, 55, 94, 0.06);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.runoff-page--demo .race-card::before {
  content: 'SIMULATED';
  position: absolute;
  top: 0;
  right: 0;
  z-index: 4;
  padding: 0.2rem 0.38rem;
  border-bottom-left-radius: 0.3rem;
  background: #7f1d1d;
  color: #fff;
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  line-height: 1;
  pointer-events: none;
}

.race-card[data-race-id='superintendent'] {
  --candidate-a: #0369a1;
  --candidate-b: #c2410c;
}

.race-card[data-race-id='labor'] {
  --candidate-a: #166534;
  --candidate-b: #be123c;
}

.race-card[data-race-id='insurance'] {
  --candidate-a: #1d4ed8;
  --candidate-b: #a16207;
}

.race-card.is-selected {
  border-color: var(--runoff-navy);
  box-shadow: 0 0 0 2px var(--runoff-navy), 0 0.55rem 1.4rem rgba(23, 55, 94, 0.14);
  transform: translateY(-2px);
}

.race-card.is-updated:not(.is-selected) {
  animation: race-card-update 1.4s ease-out;
}

.race-card__select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 4.8rem;
  gap: 0.75rem;
  padding: 0.9rem 1rem 0.75rem;
  border: 0;
  border-bottom: 1px solid #e3e8ef;
  background: #f7f9fb;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.race-card__select:hover {
  background: #eef3f8;
}

.race-card__select:focus-visible,
.map-mode-tabs button:focus-visible,
.county-search input:focus-visible,
.runoff-map:focus-visible {
  outline: 3px solid #f1a722;
  outline-offset: 2px;
}

.race-card__office {
  display: block;
  margin-top: 0.15rem;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
}

.race-card__action {
  flex: 0 0 auto;
  color: #315878;
  font-size: 0.72rem;
  font-weight: 800;
}

.race-card__candidates {
  padding: 0.85rem 1rem 0.2rem;
}

.candidate-total {
  margin-bottom: 0.85rem;
}

.candidate-total__name,
.candidate-total__numbers {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.candidate-total__name {
  justify-content: flex-start;
  min-height: 2.2rem;
  font-size: 0.86rem;
  line-height: 1.2;
}

.candidate-leading {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 0.12rem 0.32rem;
  border: 1px solid #7391ad;
  border-radius: 999px;
  background: #edf4fa;
  color: #234e76;
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.candidate-mark {
  display: inline-grid;
  flex: 0 0 auto;
  width: 1.45rem;
  height: 1.45rem;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  color: var(--candidate-a);
  font-size: 0.65rem;
  font-weight: 900;
}

.candidate-total:nth-child(2) .candidate-mark {
  border-radius: 0.2rem;
  color: var(--candidate-b);
}

.candidate-total__numbers {
  margin: 0.2rem 0 0.28rem 1.95rem;
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
}

.candidate-total__numbers span:first-child {
  font-weight: 800;
}

.candidate-total__numbers span:last-child {
  color: var(--runoff-muted);
}

.candidate-total__bar {
  display: block;
  height: 0.28rem;
  margin-left: 1.95rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e9ee;
}

.candidate-total__bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--candidate-a);
  transition: width 500ms ease;
}

.candidate-total:nth-child(2) .candidate-total__bar i {
  background: var(--candidate-b);
}

.race-card__reporting {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border-top: 1px solid #edf0f3;
  color: var(--runoff-muted);
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
}

.race-card__margin {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-top: 1px solid #edf0f3;
  color: var(--runoff-muted);
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
}

.race-card__margin strong {
  color: var(--runoff-ink);
  font-size: 0.72rem;
  text-align: right;
  text-transform: none;
}

.race-card__reporting strong {
  color: var(--runoff-ink);
}

.race-card__methods {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0.65rem 1rem;
  border-top: 1px solid #edf0f3;
  background: #fbfcfd;
}

.race-card__methods div + div {
  padding-left: 0.45rem;
  border-left: 1px solid #e5e9ee;
}

.race-card__methods dt {
  color: var(--runoff-muted);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.race-card__methods dd {
  margin: 0.15rem 0 0;
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.race-card__forecast {
  min-height: 4rem;
  padding: 0.7rem 1rem 0.85rem;
  border-top: 1px solid #e3e8ef;
  font-size: 0.72rem;
  line-height: 1.35;
}

.race-card__forecast strong,
.race-card__forecast span {
  display: block;
}

.race-card__forecast strong {
  margin-bottom: 0.2rem;
  color: #315878;
}

.race-card__forecast span {
  color: var(--runoff-muted);
}

.race-explorer {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 2px solid var(--runoff-navy);
}

.map-mode-tabs {
  display: flex;
  gap: 0.45rem;
  margin: 0 0 0.8rem;
  padding: 0.3rem;
  overflow-x: auto;
  border: 1px solid #cfd7e1;
  border-radius: 0.55rem;
  background: #eef2f6;
  scrollbar-width: thin;
}

.map-mode-tabs button {
  flex: 0 0 auto;
  padding: 0.58rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 0.35rem;
  background: transparent;
  color: #34475b;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.map-mode-tabs button:hover {
  background: rgba(255, 255, 255, 0.75);
}

.map-mode-tabs button.is-active {
  border-color: #bdc8d4;
  background: #fff;
  color: var(--runoff-navy);
  box-shadow: 0 0.15rem 0.35rem rgba(23, 55, 94, 0.12);
}

.race-explorer__layout {
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(17rem, 0.85fr);
  gap: 1rem;
}

.map-stage,
.precinct-detail,
.command-panel,
.model-note,
.no-script-note {
  border: 1px solid #ced7e2;
  border-radius: 0.6rem;
  background: #fff;
  box-shadow: 0 0.35rem 1.1rem rgba(23, 55, 94, 0.06);
}

.map-stage {
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.runoff-page--demo .map-stage::after {
  content: 'SIMULATED RESULTS — NOT LIVE DATA';
  position: absolute;
  top: 0.8rem;
  left: 50%;
  z-index: 5;
  transform: translateX(-50%);
  padding: 0.32rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 0.3rem;
  background: rgba(87, 21, 21, 0.92);
  color: #fff;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  white-space: nowrap;
  pointer-events: none;
}

.runoff-map {
  position: relative;
  width: 100%;
  height: clamp(31rem, 62vw, 45rem);
  max-height: 45rem;
  background: #e9eef2;
}

.runoff-map__fallback {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(22rem, calc(100% - 3rem));
  margin: 0;
  transform: translate(-50%, -50%);
  color: #455465;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.runoff-map .maplibregl-canvas {
  outline: 0;
}

.runoff-map .maplibregl-ctrl-group button {
  width: 2.4rem;
  height: 2.4rem;
}

.map-keyboard-help {
  margin: 0;
  padding: 0.55rem 0.8rem;
  border-top: 1px solid #dce2e9;
  color: var(--runoff-muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.map-legend {
  position: absolute;
  bottom: 3.2rem;
  left: 0.75rem;
  z-index: 3;
  max-width: min(17rem, calc(100% - 1.5rem));
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(23, 55, 94, 0.22);
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 0.35rem 1rem rgba(23, 55, 94, 0.14);
  backdrop-filter: blur(0.25rem);
}

.map-legend p {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 900;
}

.map-legend ul {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.map-legend li {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  color: #445163;
  font-size: 0.68rem;
}

.legend-swatch {
  flex: 0 0 auto;
  width: 0.82rem;
  height: 0.82rem;
  border: 1px solid #455465;
  border-radius: 50%;
  background: var(--candidate-a);
}

.legend-swatch--b {
  border-radius: 0.12rem;
  background: var(--candidate-b);
}

.legend-swatch--none {
  border-radius: 0;
  background: #d8dee6;
}

.precinct-detail {
  align-self: stretch;
  min-width: 0;
  padding: 1.15rem;
}

.precinct-detail h3 {
  margin: 0.25rem 0 1rem;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.45rem;
  line-height: 1.15;
}

.precinct-detail p {
  color: var(--runoff-muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.precinct-detail__county {
  margin: -0.65rem 0 0.85rem !important;
}

.precinct-candidate-list,
.precinct-metrics {
  margin: 0;
}

.precinct-candidate-list > div,
.precinct-metrics > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem;
  padding: 0.6rem 0;
  border-top: 1px solid #e7ebef;
}

.precinct-candidate-list dt,
.precinct-metrics dt {
  font-size: 0.8rem;
  line-height: 1.35;
}

.precinct-candidate-list dd,
.precinct-metrics dd {
  margin: 0;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  text-align: right;
}

.precinct-candidate-list small {
  display: block;
  color: var(--runoff-muted);
  font-weight: 400;
}

.central-bucket-note {
  margin-top: 1.25rem;
  padding: 0.7rem;
  border-radius: 0.35rem;
  background: #f0f4f8;
  font-size: 0.72rem !important;
}

.command-detail-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.command-panel {
  min-width: 0;
  padding: 1.1rem;
}

.command-panel h2 {
  font-size: 1.45rem;
}

.command-panel__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.county-search {
  display: grid;
  flex: 0 0 min(14rem, 48%);
  gap: 0.2rem;
  color: var(--runoff-muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.county-search input {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid #aeb9c6;
  border-radius: 0.35rem;
  background: #fff;
  color: var(--runoff-ink);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: none;
}

.table-scroll {
  max-height: 26rem;
  overflow: auto;
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.result-table th,
.result-table td {
  padding: 0.55rem 0.45rem;
  border-bottom: 1px solid #e4e8ed;
  text-align: right;
  vertical-align: top;
}

.result-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f2f5f8;
  color: #405064;
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.result-table th:first-child,
.result-table td:first-child {
  text-align: left;
}

.result-table td:first-child {
  font-weight: 800;
}

.ranked-list,
.activity-list {
  display: grid;
  gap: 0;
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: rank;
}

.ranked-list li,
.activity-list li {
  position: relative;
  padding: 0.65rem 0;
  border-bottom: 1px solid #e5e9ee;
  color: #354356;
  font-size: 0.78rem;
  line-height: 1.35;
}

.ranked-list li:not(.ranked-list__empty) {
  min-height: 2.1rem;
  padding-left: 1.75rem;
  counter-increment: rank;
}

.ranked-list li:not(.ranked-list__empty)::before {
  content: counter(rank);
  position: absolute;
  top: 0.62rem;
  left: 0;
  display: grid;
  width: 1.2rem;
  height: 1.2rem;
  place-items: center;
  border-radius: 50%;
  background: #e4eaf0;
  color: #334b64;
  font-size: 0.64rem;
  font-weight: 900;
}

.ranked-list strong,
.activity-list strong {
  display: block;
  color: var(--runoff-ink);
}

.ranked-list span,
.activity-list span {
  color: var(--runoff-muted);
}

.activity-badge {
  display: inline-block !important;
  margin-left: 0.35rem;
  padding: 0.1rem 0.32rem;
  border: 1px solid #85a4c2;
  border-radius: 999px;
  background: #eaf2f9;
  color: #244c72 !important;
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.activity-badge--correction {
  border-color: #c18a3e;
  background: #fff0cf;
  color: #70430b !important;
}

.model-note {
  margin-top: 1rem;
  padding: 1.2rem 1.35rem;
  border-left: 0.3rem solid var(--runoff-navy);
}

.model-note h2 {
  font-size: 1.35rem;
}

.model-note p {
  max-width: 77rem;
  margin: 0.65rem 0 0;
  color: #465466;
  font-size: 0.82rem;
  line-height: 1.55;
}

.no-script-note {
  margin-top: 1rem;
  padding: 1rem;
  border-left: 0.3rem solid var(--runoff-warn);
}

.no-script-note h2,
.no-script-note p {
  margin: 0;
}

.no-script-note p {
  margin-top: 0.35rem;
}

@keyframes runoff-pulse {
  0% { box-shadow: 0 0 0 2px var(--runoff-live), 0 0 0 3px rgba(19, 116, 92, 0.28); }
  65%, 100% { box-shadow: 0 0 0 2px var(--runoff-live), 0 0 0 10px rgba(19, 116, 92, 0); }
}

@keyframes race-card-update {
  0% { box-shadow: 0 0 0 4px rgba(36, 94, 168, 0.34); }
  100% { box-shadow: 0 0 0 0 rgba(36, 94, 168, 0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 1180px) {
  .race-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .command-panel--counties {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .runoff-command {
    padding-top: 6.8rem;
  }

  .election-status {
    grid-template-columns: 1fr;
  }

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

  .runoff-countdown {
    margin-left: 1.55rem;
  }

  .race-explorer__layout {
    grid-template-columns: 1fr;
  }

  .precinct-detail {
    min-height: 15rem;
  }

  .runoff-map {
    height: min(67svh, 39rem);
  }
}

@media (max-width: 660px) {
  .runoff-shell {
    width: min(100% - 1rem, 92rem);
  }

  .runoff-command {
    padding-top: 6rem;
  }

  .runoff-breadcrumb {
    margin-bottom: 1.35rem;
    padding: 0 0.25rem;
  }

  .runoff-demo-banner {
    display: grid;
    margin: 0 0 1.35rem;
    padding: 0.75rem;
  }

  .runoff-demo-corner-badge {
    right: 0.45rem;
    bottom: 0.45rem;
    min-width: 0;
    max-width: calc(100% - 0.9rem);
    padding: 0.45rem 0.55rem;
  }

  .runoff-demo-banner a {
    justify-self: stretch;
    text-align: center;
  }

  .runoff-page--demo .map-stage::after {
    top: 0.55rem;
    max-width: calc(100% - 7rem);
    overflow: hidden;
    font-size: 0.56rem;
    text-overflow: ellipsis;
  }

  .runoff-hero {
    padding: 0 0.35rem;
  }

  .runoff-hero h1 {
    font-size: clamp(2.2rem, 12vw, 3.55rem);
  }

  .runoff-deck {
    font-size: 1rem;
  }

  .election-status {
    margin: 1.4rem 0 2.35rem;
    padding: 0.9rem;
  }

  .election-status__times {
    grid-template-columns: 1fr;
  }

  .election-status__times div {
    padding: 0.45rem 0 0;
    border-top: 1px solid var(--runoff-line);
    border-left: 0;
  }

  .section-heading {
    display: block;
  }

  .section-heading > p {
    margin-top: 0.55rem;
  }

  .race-card-grid,
  .command-detail-grid {
    grid-template-columns: 1fr;
  }

  .command-panel--counties {
    grid-column: auto;
  }

  .race-card.is-selected {
    transform: none;
  }

  .race-explorer {
    margin-top: 2.7rem;
  }

  .section-heading--explorer {
    margin-bottom: 0.8rem;
  }

  .map-mode-tabs {
    margin-right: -0.5rem;
    margin-left: -0.5rem;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .runoff-map {
    height: 62svh;
    min-height: 27rem;
  }

  .map-legend {
    bottom: 3.8rem;
  }

  .command-panel__heading {
    display: block;
  }

  .county-search {
    margin-top: 0.8rem;
  }
}
