/* Central Florida Values Voter Guide — America theme */
:root {
  --navy: #0a1f44;
  --navy-mid: #112a5c;
  --navy-light: #1a3a7a;
  --old-glory-blue: #002868;
  --old-glory-red: #bf0a30;
  --red: #bf0a30;
  --red-bright: #e01840;
  --red-soft: #fce8ec;
  --white: #ffffff;
  --star-white: #f8fafc;
  --cream: #f4f6fa;
  --cream-dark: #e2e8f0;
  --gold: #c9a227;
  --gold-bright: #f0d060;
  --gold-dim: #8a7020;
  --text: #0f172a;
  --text-muted: #475569;
  --border: #cbd5e1;
  --success: #166534;
  --danger: #991b1b;
  --trump: #b91c1c;
  --musk: #0284c7;
  --r-party: #bf0a30;
  --d-party: #002868;
  --shadow: 0 4px 20px rgba(0, 40, 104, 0.12);
  --radius: 12px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Georgia", "Times New Roman", "Palatino Linotype", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background-color: var(--cream);
  /* Soft starfield + light stripe wash */
  background-image:
    radial-gradient(circle at 12% 8%, rgba(0, 40, 104, 0.06) 0 1px, transparent 2px),
    radial-gradient(circle at 48% 22%, rgba(191, 10, 48, 0.05) 0 1px, transparent 2px),
    radial-gradient(circle at 82% 14%, rgba(0, 40, 104, 0.06) 0 1px, transparent 2px),
    linear-gradient(
      180deg,
      #ffffff 0%,
      #f8fafc 40%,
      #eef2f8 100%
    );
  background-size: 48px 48px, 64px 64px, 56px 56px, 100% 100%;
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}

/* ── Patriotic stripe bar (top of page) ── */
body::before {
  content: "";
  display: block;
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    var(--old-glory-red) 0 28px,
    var(--white) 28px 40px,
    var(--old-glory-blue) 40px 68px,
    var(--white) 68px 80px
  );
  position: sticky;
  top: 0;
  z-index: 110;
}

/* ── Header ── */
.site-header {
  background:
    linear-gradient(180deg, rgba(0, 40, 104, 0.15) 0%, transparent 100%),
    linear-gradient(135deg, #001a44 0%, var(--old-glory-blue) 45%, #0a2f6b 100%);
  color: var(--white);
  padding: 0;
  position: sticky;
  top: 6px;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 20, 60, 0.35);
  border-bottom: 3px solid var(--old-glory-red);
}

/* Stars field on header */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 8% 30%, rgba(255, 255, 255, 0.85), transparent),
    radial-gradient(1.5px 1.5px at 18% 55%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1px 1px at 28% 22%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1.5px 1.5px at 42% 70%, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(1px 1px at 55% 35%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1.5px 1.5px at 68% 18%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1px 1px at 78% 60%, rgba(255, 255, 255, 0.65), transparent),
    radial-gradient(1.5px 1.5px at 90% 40%, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(1px 1px at 95% 75%, rgba(255, 255, 255, 0.5), transparent);
  pointer-events: none;
  opacity: 0.9;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.25rem 0.75rem;
  position: relative;
  z-index: 1;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 1 1 auto;
}

/* Main logo — replaces old star brand-mark on the left */
.site-logo {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
  border: 3px solid var(--old-glory-red);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.9),
    0 2px 10px rgba(0, 0, 0, 0.35);
  background: var(--old-glory-blue);
  display: block;
}

.site-logo--brand {
  width: 60px;
  height: 60px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #3b5b9a, var(--old-glory-blue) 70%);
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  color: var(--star-white);
  border: 3px solid var(--old-glory-red);
  box-shadow:
    0 0 0 2px var(--white),
    0 2px 8px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
  line-height: 1;
  overflow: hidden;
  padding: 0;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: none;
  box-shadow: none;
  border-radius: 50%;
}

@media (max-width: 640px) {
  .site-logo,
  .site-logo--brand {
    width: 52px;
    height: 52px;
  }
}

.brand-text {
  min-width: 0;
}

.brand h1 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.brand-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  margin-top: 0.22rem;
  line-height: 1.25;
}

/* Red capsule / pill for selected state (e.g. Florida) */
.brand-state {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--star-white);
  background: rgba(191, 10, 48, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  padding: 0.14rem 0.6rem;
  line-height: 1.35;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.brand .tagline {
  font-size: 0.78rem;
  opacity: 0.95;
  color: #fca5a5;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* Right cluster: selected-state emblem + election date */
.header-aside {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.state-emblem {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 50%;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.35),
    0 2px 8px rgba(0, 0, 0, 0.3);
  background: transparent;
  display: block;
}

.election-badge {
  background: rgba(191, 10, 48, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: var(--white);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(191, 10, 48, 0.35);
}

@media (max-width: 640px) {
  .state-emblem {
    width: 44px;
    height: 44px;
  }
  .header-aside {
    gap: 0.5rem;
  }
  .election-badge {
    font-size: 0.72rem;
    padding: 0.4rem 0.7rem;
  }
}

.nav-tabs {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.9rem;
  overflow-x: auto;
  padding-bottom: 0.1rem;
  -webkit-overflow-scrolling: touch;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 0.15rem;
}

.nav-tab {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.78);
  padding: 0.65rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  font-family: inherit;
}

.nav-tab:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
}

.nav-tab.active {
  color: #fff;
  border-bottom-color: var(--old-glory-red);
  background: rgba(191, 10, 48, 0.15);
}

/* ── Layout ── */
.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3rem;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ── Controls ── */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 1.25rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--old-glory-red);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 140px;
  flex: 1;
}

.control-group label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--old-glory-blue);
}

.control-group select,
.control-group input[type="search"] {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.92rem;
  background: #f8fafc;
  color: var(--text);
  font-family: inherit;
}

.control-group select:focus,
.control-group input:focus {
  outline: 2px solid var(--old-glory-blue);
  outline-offset: 1px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f8fafc;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
}

.chip:hover {
  border-color: var(--old-glory-red);
}

.chip.active,
.chip:has(input:checked) {
  background: var(--old-glory-blue);
  color: var(--white);
  border-color: var(--old-glory-blue);
}

.chip input {
  accent-color: var(--old-glory-red);
}

/* ── Hero / intro ── */
.hero-card {
  background:
    linear-gradient(135deg, rgba(191, 10, 48, 0.12) 0%, transparent 40%),
    linear-gradient(135deg, #001a44 0%, var(--old-glory-blue) 50%, #123a7a 100%);
  color: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Stripe accent on hero */
.hero-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 8px;
  background: repeating-linear-gradient(
    180deg,
    var(--old-glory-red) 0 10px,
    var(--white) 10px 14px,
    var(--old-glory-red) 14px 24px
  );
}

.hero-card::after {
  content: "★★★";
  position: absolute;
  right: 1.25rem;
  top: 1rem;
  font-size: 0.95rem;
  letter-spacing: 0.25em;
  color: rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.hero-card h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  margin-bottom: 0.5rem;
  color: #fff;
  padding-left: 0.5rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hero-card p {
  opacity: 0.95;
  max-width: 65ch;
  font-size: 0.95rem;
  padding-left: 0.5rem;
}

.priority-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-left: 0.5rem;
}

.priority-pill {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.priority-pill span {
  color: #fca5a5;
  margin-right: 0.25rem;
  font-weight: 800;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  box-shadow: var(--shadow);
  border-bottom: 3px solid var(--old-glory-blue);
}

.stat-card:nth-child(even) {
  border-bottom-color: var(--old-glory-red);
}

.stat-card .num {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--old-glory-blue);
  line-height: 1;
}

.stat-card .lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Race sections ── */
.race-block {
  margin-bottom: 1.75rem;
}

.race-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px double var(--old-glory-blue);
  position: relative;
}

.race-header h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--old-glory-blue);
}

.race-header h3::before {
  content: "★ ";
  color: var(--old-glory-red);
  font-size: 0.9em;
}

.race-header .race-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.race-summary {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}

.candidate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.9rem;
  /* Let card tooltips stack above later grid cells */
  isolation: auto;
  overflow: visible;
  position: relative;
  z-index: 0;
}

/* ── Candidate card ── */
.candidate-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
  position: relative;
  z-index: 1;
  border-left: 4px solid var(--old-glory-blue);
  /* Allow score tooltips to paint outside the card */
  overflow: visible;
}

.candidate-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 40, 104, 0.18);
  z-index: 5;
}

/* When an (i) tip is open, lift this card above neighbors */
.candidate-card.tip-open {
  z-index: 40;
}

.candidate-card.top-pick {
  border-color: var(--old-glory-red);
  border-left-width: 4px;
  border-width: 2px 2px 2px 4px;
  background: linear-gradient(180deg, #fff5f6 0%, var(--white) 45%);
  box-shadow: 0 4px 24px rgba(191, 10, 48, 0.15);
}

.top-pick-badge {
  position: absolute;
  top: -10px;
  right: 12px;
  background: linear-gradient(90deg, var(--old-glory-red), #d4143a);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(191, 10, 48, 0.4);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.cand-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--old-glory-blue);
  line-height: 1.25;
}

.cand-aka {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b4f00;
  margin-top: 0.12rem;
}
.cand-status {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.party-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  color: white;
  flex-shrink: 0;
}

.party-badge.R {
  background: var(--r-party);
}
.party-badge.D {
  background: var(--d-party);
}
.party-badge.L,
.party-badge.NPA,
.party-badge.I {
  background: #555;
}

.score-ring-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.score-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--old-glory-blue);
  background: conic-gradient(var(--old-glory-red) calc(var(--pct) * 1%), var(--cream-dark) 0);
  position: relative;
  flex-shrink: 0;
}

.score-ring::before {
  content: "";
  position: absolute;
  inset: 6px;
  background: var(--white);
  border-radius: 50%;
}

.score-ring span {
  position: relative;
  z-index: 1;
}

.score-bars {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}

.bar-row {
  display: grid;
  grid-template-columns: 7.25rem 1fr 1.75rem;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.7rem;
}

/* Label + value above the bar — ⓘ never sits on the colored fill */
.bar-row-stack {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  align-items: stretch;
}

.bar-row-stack .bar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 1.1rem;
}

.bar-row .bl {
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  min-width: 0;
}

.bar-track {
  height: 8px;
  background: var(--cream-dark);
  border-radius: 999px;
  overflow: hidden;
  min-width: 0;
  width: 100%;
}

.bar-row-stack .bv {
  font-weight: 700;
  color: var(--old-glory-blue);
  font-size: 0.72rem;
  text-align: right;
  flex-shrink: 0;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--navy);
}

.bar-fill.christian {
  background: linear-gradient(90deg, #5b21b6, #7c3aed);
}
.bar-fill.paleo {
  background: linear-gradient(90deg, #166534, #22c55e);
}
.bar-fill.republican {
  background: linear-gradient(90deg, #9f1239, var(--old-glory-red));
}

.bar-row .bv {
  font-weight: 700;
  text-align: right;
  color: var(--old-glory-blue);
}

.callout-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.callout {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.28rem 0.6rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.callout.trump {
  background: #fef2f2;
  color: var(--trump);
  border: 1px solid #fecaca;
}

.callout.musk {
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.callout.desantis {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fdba74;
}

.callout.maha {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.callout.limited {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

.callout.incumbent {
  background: #eff6ff;
  color: var(--old-glory-blue);
  border: 1px solid #bfdbfe;
}

.card-bio {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  font-size: 0.75rem;
  color: var(--old-glory-red);
  font-weight: 600;
  margin-top: auto;
}

/* ── Measure cards ── */
.measure-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--old-glory-red);
}

.measure-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--old-glory-blue);
  margin-bottom: 0.35rem;
}

.measure-type {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.rec-badge {
  display: inline-block;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

.rec-badge.yes,
.rec-badge.lean-yes {
  background: #dcfce7;
  color: var(--success);
  border: 1px solid #86efac;
}

.rec-badge.no,
.rec-badge.lean-no {
  background: #fee2e2;
  color: var(--danger);
  border: 1px solid #fca5a5;
}

.measure-card p {
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}

.yn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 0.75rem 0;
}

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

.yn-box {
  background: #f8fafc;
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 0.85rem;
  border: 1px solid var(--border);
}

.yn-box strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--old-glory-blue);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Policy tracker ── */
.timeline {
  position: relative;
  padding-left: 1.5rem;
  border-left: 3px solid var(--old-glory-red);
}

.timeline-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-bottom: 0.9rem;
  margin-left: 0.5rem;
  box-shadow: var(--shadow);
  position: relative;
}

.timeline-item::before {
  content: "★";
  position: absolute;
  left: -1.95rem;
  top: 1rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--old-glory-blue);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 2px var(--old-glory-red);
  color: var(--white);
  font-size: 0.55rem;
  display: grid;
  place-items: center;
  line-height: 1;
}

.timeline-date {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--old-glory-red);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.timeline-item h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--old-glory-blue);
  margin: 0.25rem 0 0.4rem;
}

.impact-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.6rem;
}

.impact-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: var(--cream-dark);
  color: var(--text-muted);
}

.impact-tag.positive {
  background: #dcfce7;
  color: var(--success);
}
.impact-tag.lean-positive {
  background: #ecfdf5;
  color: #047857;
}
.impact-tag.neutral {
  background: #f3f4f6;
  color: #6b7280;
}

/* ── Methodology ── */
.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.method-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--old-glory-blue);
}

.method-card:nth-child(2) {
  border-top-color: var(--old-glory-red);
}

.method-card:nth-child(3) {
  border-top-color: var(--old-glory-blue);
}

.method-card h3 {
  font-family: var(--font-display);
  color: var(--old-glory-blue);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.weight-badge {
  background: var(--old-glory-red);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.method-card ol,
.method-card ul {
  margin: 0.6rem 0 0 1.1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.method-card li {
  margin-bottom: 0.3rem;
}

.disclaimer-box {
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-left: 4px solid var(--old-glory-red);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  font-size: 0.88rem;
  margin: 1rem 0;
  color: #7c2d12;
}

/* ── Modal ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 26, 68, 0.6);
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-y: auto;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 640px;
  width: 100%;
  padding: 1.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  position: relative;
  margin: auto 0;
  border-top: 4px solid var(--old-glory-red);
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  background: #f1f5f9;
  border: 1px solid var(--border);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--old-glory-blue);
}

.modal h2 {
  font-family: var(--font-display);
  color: var(--old-glory-blue);
  padding-right: 2rem;
  margin-bottom: 0.35rem;
}

.modal .section-title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--old-glory-red);
  margin: 1rem 0 0.4rem;
}

.modal ul {
  margin-left: 1.1rem;
  font-size: 0.9rem;
}

.modal p {
  font-size: 0.92rem;
  color: var(--text);
}

/* ── Vote info ── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.info-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--old-glory-blue);
}

.info-card:nth-child(even) {
  border-top-color: var(--old-glory-red);
}

.info-card h3 {
  font-family: var(--font-display);
  color: var(--old-glory-blue);
  margin-bottom: 0.5rem;
}

.info-card a {
  color: var(--old-glory-blue);
  font-weight: 600;
}

.info-card ul {
  margin: 0.5rem 0 0 1.1rem;
  font-size: 0.9rem;
}

/* ── Footer ── */
.site-footer {
  background:
    linear-gradient(180deg, transparent, rgba(191, 10, 48, 0.15)),
    linear-gradient(135deg, #001a44 0%, var(--old-glory-blue) 100%);
  color: rgba(255, 255, 255, 0.8);
  padding: 1.75rem 1.25rem;
  text-align: center;
  font-size: 0.82rem;
  margin-top: 2rem;
  border-top: 4px solid var(--old-glory-red);
  position: relative;
}

.site-footer::before {
  content: "★★★★★";
  display: block;
  letter-spacing: 0.4em;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 0.65rem;
  font-size: 0.75rem;
}

.site-footer a {
  color: #fca5a5;
}

.site-footer .footer-inner {
  max-width: 800px;
  margin: 0 auto;
}

/* ── Empty ── */
.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
  background: var(--white);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

code {
  background: #f1f5f9;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--old-glory-blue);
}

/* ── ZIP multi-county picker ── */
/* Inline in form row: Look up | County: [Orange] [Lake] | Clear ZIP */
.zip-county-inline {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.25rem 0.45rem;
  background: #fff8e8;
  border: 2px solid #e8b923;
  border-radius: 10px;
  max-width: 100%;
}
.zip-county-inline[hidden] {
  display: none !important;
}
.zip-county-inline-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: #6b4f00;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 0.15rem;
  white-space: nowrap;
}
.zip-form .zip-county-btn-inline {
  font-size: 0.82rem;
  padding: 0.4rem 0.75rem;
  line-height: 1.2;
}
.zip-county-picker {
  margin: 0.65rem 0 0.85rem;
  padding: 0.75rem 0.85rem;
  background: #fff8e8;
  border: 1px solid #f0d78c;
  border-radius: 10px;
}
.zip-county-picker-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 0.5rem;
  line-height: 1.4;
}
.zip-county-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.zip-county-btn {
  appearance: none;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  border: 2px solid var(--old-glory-blue);
  background: #fff;
  color: var(--old-glory-blue);
  cursor: pointer;
}
.zip-county-btn:hover {
  background: #eef4ff;
}
.zip-county-btn-active {
  background: linear-gradient(135deg, var(--old-glory-blue), #1a3a7a);
  color: #fff !important;
  border-color: var(--old-glory-blue);
}
.zip-county-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0.55rem 0 0;
  line-height: 1.4;
}

/* Compact poll table (print + optional screen denser view) */
.poll-print-mast {
  display: none;
}
.poll-table {
  display: none;
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin: 0.5rem 0 0.75rem;
}
.poll-table th,
.poll-table td {
  border-bottom: 1px solid #dbe3ef;
  padding: 0.28rem 0.35rem;
  text-align: left;
  vertical-align: top;
}
.poll-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--old-glory-blue);
  border-bottom: 2px solid var(--old-glory-blue);
}
.poll-td-office {
  font-weight: 600;
  color: var(--navy);
  width: 38%;
}
.poll-td-name {
  font-weight: 700;
}
.poll-td-score {
  white-space: nowrap;
  font-weight: 700;
  color: var(--old-glory-blue);
}

/* ── Print ── */
@media print {
  body::before {
    display: none;
  }
  .site-header {
    position: static;
  }
  .nav-tabs,
  .controls,
  .modal-backdrop:not(.poll-backdrop) {
    display: none !important;
  }
  .panel {
    display: block !important;
  }
  .candidate-card {
    break-inside: avoid;
  }
}

/* ── Ask Grok panel ── */
.grok-panel {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 2px solid var(--old-glory-blue);
  background: linear-gradient(180deg, #f0f4fb 0%, #ffffff 100%);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 1rem;
  border: 1px solid var(--border);
  border-top: 3px solid var(--old-glory-blue);
}

.grok-panel .section-title {
  margin-top: 0;
  color: var(--old-glory-blue);
  font-size: 0.85rem;
}

.grok-intro {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0.35rem 0 0.65rem;
}

.grok-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.grok-chip {
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: var(--old-glory-blue);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.grok-chip:hover {
  background: #dbeafe;
  border-color: var(--old-glory-blue);
}

.grok-log {
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
  min-height: 0;
}

.grok-log:empty {
  display: none;
}

.grok-msg {
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  font-size: 0.88rem;
}

.grok-msg-user {
  background: var(--old-glory-blue);
  color: #fff;
  align-self: flex-end;
  max-width: 92%;
  margin-left: auto;
}

.grok-msg-assistant {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 3px solid var(--old-glory-red);
  max-width: 100%;
}

.grok-msg-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.grok-msg-pending {
  opacity: 0.7;
  font-style: italic;
}

.grok-msg-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
  opacity: 0.85;
}

.grok-msg-user .grok-msg-label {
  color: #fca5a5;
}

.grok-msg-assistant .grok-msg-label {
  color: var(--old-glory-red);
}

.grok-msg-body p {
  margin: 0 0 0.35rem;
  line-height: 1.45;
  font-size: 0.88rem;
}

.grok-msg-body p:last-child {
  margin-bottom: 0;
}

.grok-msg-user .grok-msg-body p {
  color: #fff;
}

.grok-form {
  display: flex;
  gap: 0.5rem;
}

.grok-input {
  flex: 1;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  background: #fff;
}

.grok-input:focus {
  outline: 2px solid var(--old-glory-blue);
  outline-offset: 1px;
}

.grok-submit {
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--old-glory-blue), #1a3a7a);
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 40, 104, 0.25);
}

.grok-submit:hover:not(:disabled) {
  background: linear-gradient(135deg, #003080, var(--old-glory-blue));
}

.grok-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.grok-status {
  font-size: 0.75rem;
  margin-top: 0.45rem;
  min-height: 1.1em;
  color: var(--text-muted);
}

.grok-status.thinking {
  color: var(--old-glory-blue);
  font-weight: 600;
}

.grok-status.ok {
  color: #64748b;
}

/* Measure status badges */
.status-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  margin: 0 0.4rem 0.55rem 0;
}

.status-badge-certified {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.status-badge-not-on-ballot {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.status-badge-local {
  background: #eff6ff;
  color: #1e3a8a;
  border: 1px solid #93c5fd;
}

.measure-card.status-not-on-ballot {
  opacity: 0.95;
  border-left-color: #94a3b8;
}

.measure-card.status-local {
  border-left-color: var(--old-glory-blue);
}

.rec-badge.sample {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

/* ── ZIP bar ── */
.zip-bar {
  margin-bottom: 1rem;
}

.zip-bar-inner {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 4px solid var(--old-glory-red);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow);
}

.zip-bar-title {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.zip-bar-title strong {
  color: var(--old-glory-blue);
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.zip-bar-warn {
  font-size: 0.8rem;
  color: #9a3412;
  font-weight: 600;
  line-height: 1.4;
}

.zip-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.zip-form input {
  width: 8rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-family: inherit;
}

.zip-form input:focus {
  outline: 2px solid var(--old-glory-blue);
  outline-offset: 1px;
}

.zip-submit {
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.55rem 1.1rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--old-glory-blue), #1a3a7a);
  color: #fff;
  cursor: pointer;
}

/* Links that reuse .zip-submit (county/about pages) — beat .legal-card a blue */
a.zip-submit,
.legal-card a.zip-submit,
.seo-article a.zip-submit {
  color: #fff !important;
  text-decoration: none;
}
a.zip-submit:hover,
.legal-card a.zip-submit:hover,
.seo-article a.zip-submit:hover {
  color: #fff !important;
  filter: brightness(1.08);
  text-decoration: none;
}
a.zip-submit:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.zip-clear {
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text-muted);
  cursor: pointer;
}

/* In-form poll checklist button (right of Clear ZIP; shown after successful lookup) */
.zip-form .zip-clear[hidden],
.zip-form .zip-poll-btn[hidden] {
  display: none !important;
}
.zip-form .zip-poll-btn {
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.55rem 0.9rem;
  border: 2px solid var(--old-glory-blue);
  border-radius: 8px;
  background: #fff;
  color: var(--old-glory-blue);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0, 40, 104, 0.12);
  pointer-events: auto;
  position: relative;
  z-index: 2;
}
.zip-form .zip-poll-btn:hover {
  background: var(--old-glory-blue);
  color: #fff;
}
.zip-form .zip-poll-btn:focus-visible {
  outline: 2px solid var(--old-glory-red);
  outline-offset: 2px;
}

.zip-result {
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
}

.zip-result.zip-ok {
  background: #eff6ff;
  border: 1px solid #93c5fd;
}

.zip-result.zip-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.zip-ok-title {
  font-weight: 800;
  color: var(--old-glory-blue);
  margin-bottom: 0.35rem;
}

.zip-note,
.zip-disclaimer {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.zip-disclaimer {
  color: #9a3412;
  font-weight: 600;
}

.zip-soe-links {
  margin-top: 0.55rem;
  font-size: 0.88rem;
}

.zip-soe-links a {
  color: var(--old-glory-blue);
  font-weight: 700;
}

.zip-legend {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.race-scope {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  margin-bottom: 0.75rem;
  display: inline-block;
}

.race-scope-likely {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.race-scope-maybe {
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fde047;
}

.race-scope-district {
  background: #ffedd5;
  color: #9a3412;
  border: 1px solid #fdba74;
}

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

/* ── Footer expanded ── */
.site-footer .footer-brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
}

.site-footer .footer-tag,
.site-footer .footer-motto {
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.85);
}

.site-footer .footer-motto {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

/* Crawlable SEO block on homepage (visible to users + bots) */
.seo-crawl {
  margin: 1.5rem auto 0;
  max-width: 920px;
  padding: 1.25rem 1.35rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--text);
  line-height: 1.55;
}
.seo-crawl h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--old-glory-blue);
  margin-bottom: 0.75rem;
}
.seo-crawl h3 {
  font-size: 1.05rem;
  color: var(--navy);
  margin: 1.1rem 0 0.45rem;
}
.seo-crawl p,
.seo-crawl li {
  font-size: 0.95rem;
  color: var(--text);
}
.seo-crawl ul {
  margin: 0.4rem 0 0.6rem 1.2rem;
}
.seo-crawl a {
  color: var(--old-glory-blue);
  font-weight: 600;
}
.seo-crawl-note {
  margin-top: 1rem;
  font-size: 0.88rem !important;
  color: var(--text-muted) !important;
}
.seo-article h4 {
  margin: 1rem 0 0.35rem;
  color: var(--navy);
  font-size: 1rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  margin: 1.15rem 0 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-nav a {
  color: #fca5a5;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
}

.footer-nav a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-legal,
.footer-links-official,
.footer-copy {
  margin-top: 0.65rem;
  font-size: 0.78rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
}

.footer-copy {
  margin-top: 1rem;
  opacity: 0.85;
}

/* ── Legal / static pages ── */
.legal-page .site-header {
  position: relative;
  top: 0;
}

.legal-main {
  max-width: 760px;
}

.legal-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem 2rem;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--old-glory-red);
}

.legal-card h2 {
  font-family: var(--font-display);
  color: var(--old-glory-blue);
  font-size: 1.65rem;
  margin-bottom: 0.35rem;
}

.legal-card h3 {
  font-family: var(--font-display);
  color: var(--old-glory-blue);
  font-size: 1.1rem;
  margin: 1.35rem 0 0.45rem;
}

.legal-card p,
.legal-card li {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 0.65rem;
}

.legal-card ul,
.legal-card ol {
  margin: 0.4rem 0 0.8rem 1.25rem;
}

.legal-card a {
  color: var(--old-glory-blue);
  font-weight: 600;
}

.legal-updated {
  font-size: 0.82rem !important;
  color: var(--text-muted) !important;
  margin-bottom: 1rem !important;
}

/* ── Score bar info (i) — floating tip on body ── */
.score-info-wrap {
  display: inline-flex;
  vertical-align: middle;
  flex-shrink: 0;
}

.score-info-btn {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--old-glory-blue);
  background: #eff6ff;
  color: var(--old-glory-blue);
  font-size: 0.62rem;
  font-weight: 800;
  font-style: italic;
  font-family: Georgia, serif;
  line-height: 1;
  padding: 0;
  cursor: help;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.score-info-btn:hover,
.score-info-btn[aria-expanded="true"] {
  background: var(--old-glory-blue);
  color: #fff;
}

/* Fixed to viewport — always above every candidate card */
.score-info-tip-fixed {
  position: fixed !important;
  z-index: 99999 !important;
  left: 0;
  top: 0;
  width: min(300px, calc(100vw - 16px));
  max-height: min(70vh, 420px);
  overflow-y: auto;
  background: #0b1f3a;
  color: #f8fafc;
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  text-align: left;
  white-space: normal;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  pointer-events: auto;
}

.score-info-tip-title {
  font-weight: 800;
  font-size: 0.88rem;
  color: #fff;
  margin-bottom: 0.2rem;
}

.score-info-tip-max {
  font-size: 0.7rem;
  color: #fca5a5;
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.score-info-tip-blurb {
  font-size: 0.78rem !important;
  line-height: 1.4;
  color: #e2e8f0 !important;
  margin: 0 0 0.45rem !important;
}

.score-info-tip-list {
  margin: 0 0 0.4rem 0.95rem;
  padding: 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: #cbd5e1;
}

.score-info-tip-list li {
  margin-bottom: 0.25rem;
}

.score-info-note {
  list-style: none;
  margin-left: -0.85rem;
  font-style: italic;
  color: #fde68a;
}

.score-info-tip-more {
  font-size: 0.68rem !important;
  color: #93c5fd !important;
  margin: 0.35rem 0 0 !important;
}

.modal-score-bars {
  margin: 0.65rem 0 0.25rem;
}

/* ── Welcome / vision modal ── */
.welcome-backdrop {
  z-index: 200;
}
.welcome-modal {
  max-width: 34rem;
  border-top: 5px solid var(--old-glory-red);
}
.welcome-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--old-glory-blue);
  background: #e8eef8;
  border: 1px solid #c5d0e6;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  margin-bottom: 0.65rem;
}
.welcome-modal h2 {
  font-family: var(--font-display);
  color: var(--old-glory-blue);
  font-size: 1.55rem;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}
.welcome-lead {
  margin-bottom: 0.85rem;
  color: var(--text);
}
.welcome-list {
  margin: 0 0 1rem 1.1rem;
  color: var(--text);
}
.welcome-list li {
  margin-bottom: 0.55rem;
}
.welcome-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  background: var(--cream);
  border-left: 3px solid var(--gold);
  padding: 0.65rem 0.85rem;
  margin-bottom: 1.1rem;
}
.welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: stretch;
}
.welcome-primary {
  appearance: none;
  border: none;
  cursor: pointer;
  background: linear-gradient(180deg, var(--old-glory-blue), var(--navy));
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 40, 104, 0.25);
}
.welcome-primary:hover {
  filter: brightness(1.08);
}
.welcome-dont {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

.zip-coverage-note {
  margin-top: 0.55rem;
  font-size: 0.85rem;
  color: #6b4f00;
  background: #fff8e6;
  border: 1px solid #f0d78c;
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
}

/* ── Poll sheet modal ── */
.poll-backdrop {
  z-index: 320;
  background: rgba(0, 20, 55, 0.55);
  backdrop-filter: blur(3px);
}
.poll-backdrop.open {
  display: flex !important;
  align-items: flex-start;
  justify-content: center;
  padding: 1.25rem 0.85rem 2rem;
}
.poll-modal {
  max-width: 28rem;
  width: 100%;
  max-height: min(92vh, 900px);
  overflow: auto;
  border-top: 5px solid var(--old-glory-red);
  background: linear-gradient(180deg, #fafbfd 0%, #fff 120px);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0, 26, 68, 0.28);
}
.poll-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
  padding-right: 1.5rem;
}
.poll-header h2 {
  font-family: var(--font-display);
  color: var(--old-glory-blue);
  font-size: 1.45rem;
  letter-spacing: 0.01em;
}
.poll-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  line-height: 1.4;
}
.poll-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.poll-btn:hover {
  border-color: var(--old-glory-blue);
  color: var(--old-glory-blue);
}
.poll-sheet {
  border-top: 1px solid var(--cream-dark);
  padding-top: 0.9rem;
}
.poll-summary {
  font-size: 0.88rem;
  line-height: 1.45;
  margin-bottom: 0.85rem;
  color: var(--text);
  background: #f0f5ff;
  border: 1px solid #d7e4fb;
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
}
.poll-summary p + p {
  margin-top: 0.35rem;
}
.poll-soe {
  font-size: 0.88rem;
  margin-bottom: 1.1rem;
  padding: 0.6rem 0.8rem;
  background: #eef4ff;
  border: 1px solid #d4e0f7;
  border-radius: 10px;
}
.poll-soe a {
  color: var(--old-glory-blue);
  font-weight: 600;
  text-decoration: none;
}
.poll-soe a:hover {
  text-decoration: underline;
}
.poll-race {
  margin-bottom: 1rem;
  padding-bottom: 0.15rem;
  border-bottom: none;
}
.poll-race + .poll-race {
  margin-top: 0.15rem;
}
.poll-race-head {
  margin-bottom: 0.4rem;
  padding-left: 0.15rem;
}
.poll-race-title {
  font-family: var(--font-display);
  font-size: 0.98rem;
  color: var(--old-glory-blue);
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.poll-race-title::before {
  content: "★ ";
  color: var(--old-glory-red);
  font-size: 0.85em;
}
.poll-race-sum {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 0.45rem;
  line-height: 1.4;
  padding-left: 0.15rem;
}
.poll-pick {
  position: relative;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.55rem;
  box-shadow: 0 2px 10px rgba(0, 40, 104, 0.06);
}
.poll-pick-best {
  border: 2px solid rgba(191, 10, 48, 0.45);
  border-left: 4px solid var(--old-glory-red);
  background: linear-gradient(180deg, #fff5f6 0%, #ffffff 55%);
  box-shadow: 0 4px 18px rgba(191, 10, 48, 0.1);
  padding-top: 1.15rem;
  padding-right: 0.95rem;
  overflow: visible;
}
.poll-pick-tie {
  border-color: rgba(0, 40, 104, 0.35);
  border-left-color: var(--old-glory-blue);
  background: linear-gradient(180deg, #f3f7ff 0%, #ffffff 55%);
  box-shadow: 0 4px 18px rgba(0, 40, 104, 0.08);
}
/* Matches candidate-card “Top score” badge style */
.poll-top-badge {
  position: absolute;
  top: -9px;
  right: 0.75rem;
  background: linear-gradient(90deg, var(--old-glory-red), #d4143a);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(191, 10, 48, 0.4);
}
.poll-pick-tie .poll-top-badge {
  background: linear-gradient(90deg, var(--old-glory-blue), #1a3a7a);
  box-shadow: 0 2px 6px rgba(0, 40, 104, 0.35);
}
.poll-pick-main {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.poll-name-row {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  flex-wrap: wrap;
  line-height: 1.3;
}
.poll-check {
  color: var(--success);
  font-size: 1.05rem;
  flex-shrink: 0;
}
.poll-cand-name {
  font-size: 1.05rem;
  color: var(--navy);
  font-weight: 700;
  letter-spacing: 0.01em;
}
.poll-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.poll-party-chip {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.poll-party-chip.party-r {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}
.poll-party-chip.party-d {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.poll-party-chip.party-npa {
  background: #f8fafc;
  color: #475569;
  border-color: #e2e8f0;
}
.poll-score-pill {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--old-glory-blue);
  background: #eef4ff;
  border: 1px solid #c7d9f5;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
}
.poll-callouts {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.poll-chip {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.poll-chip-trump {
  background: #fee2e2;
  color: #991b1b;
}
.poll-chip-desantis {
  background: #e0e7ff;
  color: #3730a3;
}
.poll-chip-musk {
  background: #e0f2fe;
  color: #0369a2;
}
.poll-chip-maha {
  background: #d1fae5;
  color: #047857;
}
.poll-party {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--old-glory-red);
  margin-bottom: 0.2rem;
}
.poll-top {
  font-size: 1rem;
  line-height: 1.35;
}
.poll-score {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
}
.poll-badges {
  font-size: 0.78rem;
  color: var(--navy-mid);
  font-weight: 600;
}
.poll-alt,
.poll-limited {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  line-height: 1.35;
}
.poll-limited {
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 0.3rem 0.45rem;
}
.poll-pick-measure {
  border-left: 4px solid var(--old-glory-blue);
  background: #fbfdff;
}
.poll-measure-title {
  font-size: 0.95rem;
  color: var(--navy);
}
.poll-measure-rec {
  font-weight: 700;
  color: var(--old-glory-blue);
  margin-top: 0.3rem;
  font-size: 0.88rem;
}
.poll-disclaimer,
.poll-footer-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.85rem;
  line-height: 1.45;
}
.poll-empty {
  color: var(--danger);
  font-weight: 600;
}

/* One-pager checklist: hide rest of site (visibility:hidden still paginates!) */
@media print {
  body.printing-poll {
    background: #fff !important;
    color: #000;
    font-size: 10pt;
  }
  body.printing-poll > *:not(.poll-backdrop) {
    display: none !important;
  }
  body.printing-poll .poll-backdrop {
    display: block !important;
    position: static !important;
    inset: auto !important;
    background: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
    backdrop-filter: none !important;
    max-height: none !important;
    overflow: visible !important;
  }
  body.printing-poll .poll-modal {
    box-shadow: none !important;
    max-width: none !important;
    width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    border: none !important;
    border-radius: 0 !important;
    background: #fff !important;
    padding: 0.15in 0.2in !important;
  }
  body.printing-poll .modal-close,
  body.printing-poll .poll-actions-top,
  body.printing-poll .welcome-badge,
  body.printing-poll .poll-footer-note,
  body.printing-poll .poll-race-cards,
  body.printing-poll .poll-race-sum,
  body.printing-poll .poll-soe,
  body.printing-poll .poll-summary,
  body.printing-poll .poll-top-badge {
    display: none !important;
  }
  body.printing-poll .poll-header {
    margin: 0 0 0.15in;
    padding: 0;
  }
  body.printing-poll .poll-header h2 {
    font-size: 13pt;
    margin: 0;
  }
  body.printing-poll .poll-sub {
    font-size: 8pt;
    margin: 0.1rem 0 0;
  }
  body.printing-poll .poll-print-mast {
    display: block !important;
    font-size: 9pt;
    margin: 0 0 0.12in;
    padding-bottom: 0.08in;
    border-bottom: 2px solid #002868;
  }
  body.printing-poll .poll-table {
    display: table !important;
    font-size: 9pt;
    margin: 0;
  }
  body.printing-poll .poll-table th,
  body.printing-poll .poll-table td {
    padding: 0.08rem 0.2rem;
    border-bottom: 0.5pt solid #bbb;
  }
  body.printing-poll .poll-table th {
    font-size: 7.5pt;
    padding-bottom: 0.12rem;
  }
  body.printing-poll .poll-measures {
    margin-top: 0.12in;
    font-size: 8.5pt;
  }
  body.printing-poll .poll-measures .poll-pick {
    padding: 0.1rem 0;
    margin: 0;
    border: none;
    box-shadow: none;
    background: none;
    border-radius: 0;
    border-bottom: 0.5pt solid #ccc;
  }
  body.printing-poll .poll-disclaimer {
    font-size: 7.5pt;
    margin-top: 0.12in;
    color: #444;
  }
  body.printing-poll .poll-sheet {
    border: none;
    padding: 0;
  }
}

/* ── Florida county map (schematic navigation — Map tab panel) ── */
#panel-map.panel {
  padding-top: 0.25rem;
}
.fl-map-section {
  margin: 0 0 1.15rem;
}
#panel-map .fl-map-section {
  margin: 0;
}
.fl-map-section-inner {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 4px solid var(--old-glory-blue);
  border-radius: var(--radius);
  padding: 1rem 1.15rem 1.15rem;
  box-shadow: var(--shadow);
}
.fl-map-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.fl-map-section h2 {
  font-family: var(--font-display);
  color: var(--old-glory-blue);
  font-size: 1.25rem;
  margin: 0 0 0.35rem;
}
.fl-map-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
  max-width: 40rem;
}
.fl-map-live-badge {
  flex-shrink: 0;
  background: linear-gradient(90deg, var(--old-glory-blue), #1a3a7a) !important;
}
.fl-map-status {
  font-size: 0.9rem;
  margin: 0.55rem 0 0.75rem;
  padding: 0.5rem 0.75rem;
  background: #f0f5ff;
  border: 1px solid #d4e0f7;
  border-radius: 8px;
  color: var(--text);
  min-height: 1.4em;
}
.fl-map-status a {
  color: var(--old-glory-blue);
  font-weight: 700;
}
.fl-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(11rem, 0.75fr);
  gap: 0.85rem;
  align-items: stretch;
}
@media (max-width: 800px) {
  .fl-map-layout {
    grid-template-columns: 1fr;
  }
}
.fl-map-svg-wrap {
  background: linear-gradient(180deg, #e8f1fb 0%, #d6e6f7 100%);
  border: 1px solid #c5d6eb;
  border-radius: 12px;
  overflow: hidden;
  min-height: 280px;
}
.fl-map-svg {
  width: 100%;
  height: auto;
  display: block;
  max-height: 480px;
}
.fl-map-bg {
  fill: #cfe0f4;
}
.fl-map-outline {
  fill: #f7fafc;
  stroke: var(--old-glory-blue);
  stroke-width: 2.2;
  stroke-linejoin: round;
}
.fl-map-dot {
  fill: var(--old-glory-blue);
  stroke: #fff;
  stroke-width: 1.2;
  cursor: pointer;
  transition: r 0.12s ease, fill 0.12s ease;
}
.fl-map-dot-hot {
  fill: #c9a227;
  stroke: #5c4a0a;
  stroke-width: 1.4;
}
.fl-map-dot.is-active,
.fl-map-county:focus .fl-map-dot,
.fl-map-county:hover .fl-map-dot {
  fill: var(--old-glory-red);
  stroke: #fff;
  stroke-width: 2;
}
.fl-map-county {
  cursor: pointer;
  outline: none;
}
.fl-map-county:focus .fl-map-dot {
  outline: 2px solid var(--gold);
}
.fl-map-label {
  font-size: 8px;
  font-weight: 700;
  fill: var(--navy);
  pointer-events: none;
  font-family: var(--font);
}
.fl-map-list-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 420px;
}
.fl-map-list-title {
  font-weight: 800;
  color: var(--old-glory-blue);
  font-size: 0.9rem;
  margin: 0 0 0.2rem;
}
.fl-map-list-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0 0 0.45rem;
  line-height: 1.35;
}
.fl-map-list {
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-right: 0.2rem;
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.4rem;
  background: #fafbfd;
}
.fl-map-list-btn {
  appearance: none;
  text-align: left;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.fl-map-list-btn:hover {
  background: #eef4ff;
  border-color: #c7d9f5;
}
.fl-map-list-btn-hot {
  color: #6b4f00;
  background: #fff8e8;
}
.fl-map-list-btn.is-active {
  background: var(--old-glory-blue);
  color: #fff;
  border-color: var(--old-glory-blue);
}
.fl-map-list-btn-hot.is-active {
  background: #8a7020;
  border-color: #8a7020;
  color: #fff;
}
.fl-map-actions {
  margin-top: 0.65rem;
}
.fl-map-disclaimer,
.fl-map-us-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0.35rem 0 0;
}
.fl-map-us-note {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--border);
}

/* Multi-state / interactive map teaser */
.roadmap-card {
  margin: 1.25rem 0 1.5rem;
  padding: 1rem 1.15rem 1.1rem;
  background:
    linear-gradient(135deg, rgba(0, 40, 104, 0.06) 0%, rgba(191, 10, 48, 0.04) 100%),
    #fff;
  border: 1px solid #c7d4ea;
  border-left: 5px solid var(--old-glory-blue);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 40, 104, 0.06);
}
.roadmap-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(90deg, var(--old-glory-red), #d4143a);
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.45rem;
}
.roadmap-title {
  font-family: var(--font-display);
  color: var(--old-glory-blue);
  font-size: 1.15rem;
  margin: 0 0 0.45rem;
}
.roadmap-card p {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text);
  margin: 0 0 0.55rem;
}
.roadmap-list {
  margin: 0.35rem 0 0.65rem 1.15rem;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.45;
}
.roadmap-list li {
  margin-bottom: 0.25rem;
}
.roadmap-note {
  font-size: 0.82rem !important;
  color: var(--text-muted) !important;
  margin-bottom: 0 !important;
}

.county-disclaimer {
  background: #fef2f2;
  border-left: 4px solid var(--old-glory-red);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  font-size: 0.95rem;
}
.county-landing h4 {
  margin: 1.15rem 0 0.35rem;
  color: var(--old-glory-blue);
  font-size: 1.05rem;
}
.county-race-meta {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.county-landing ul {
  margin: 0.35rem 0 0.75rem 1.2rem;
}
