:root {
  --navy: #10284f;
  --navy-mid: #173763;
  --navy-card: #ffffff;
  --navy-card-hover: #eef4fb;
  --red: #9f2f23;
  --red-bright: #c74432;
  --blue: #0d4f8f;
  --blue-mid: #1d5fd0;
  --blue-bright: #005ea8;
  --blue-glow: rgba(0,94,168,0.12);
  --slate: #40597b;
  --white: #ffffff;
  --text-primary: #10284f;
  --text-muted: #304766;
  --border: rgba(16,40,79,0.14);
  --border-accent: rgba(0,94,168,0.35);
  --accent: #005ea8;
  --accent-strong: #004b86;
  --success-soft: #edf5ff;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: "DM Sans", sans-serif; background: #ffffff; color: var(--text-primary); overflow-x: hidden; }

/* ── HEADER ── */
header {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  text-align: center; padding: 2rem; overflow: hidden;
}
.header-bg {
  position: absolute; inset: 0;
  background: #ffffff;
}
.stars { display: none; }
.stripe-bar {
  position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: repeating-linear-gradient(90deg,
    var(--red) 0px, var(--red) 40px,
    var(--white) 40px, var(--white) 80px,
    var(--blue) 80px, var(--blue) 120px);
}
.site-nav {
  position: absolute; top: 1.5rem; left: 2rem;
  z-index: 10; animation: fadeUp 0.6s ease both;
}
.logo-img { height: 56px; width: auto; }
.header-content {
  position: relative; z-index: 2;
  animation: fadeUp 1s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.badge {
  display: inline-block; font-family: "DM Mono", monospace;
  font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--border-accent);
  padding: 0.35rem 1.1rem; border-radius: 2px;
  background: var(--blue-glow); margin-bottom: 1.5rem;
  animation: fadeUp 1s 0.2s ease both;
}
.header-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900; line-height: 0.95;
  letter-spacing: -0.02em; margin-bottom: 1rem;
  color: var(--navy); animation: fadeUp 1s 0.3s ease both;
}
.header-title span { color: var(--accent); }
.tagline {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--text-muted); max-width: 500px;
  line-height: 1.7; margin: 0 auto 2.5rem;
  animation: fadeUp 1s 0.4s ease both;
}
.election-pill {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: rgba(0,191,255,0.08); border: 1px solid rgba(0,191,255,0.35);
  padding: 0.65rem 1.4rem; border-radius: 100px;
  font-size: 0.88rem; font-weight: 600; color: var(--accent);
  margin-bottom: 2.5rem; animation: fadeUp 1s 0.5s ease both;
}
.election-pill .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.5; }
}
.nav-pills {
  display: flex; flex-wrap: wrap; gap: 0.6rem;
  justify-content: center; animation: fadeUp 1s 0.6s ease both;
}
.nav-pill {
  display: inline-block; padding: 0.55rem 1.3rem;
  border-radius: 100px; font-size: 0.82rem; font-weight: 500;
  cursor: pointer; text-decoration: none; transition: all 0.2s;
  border: 1px solid rgba(16,40,79,0.16); color: var(--text-primary);
  background: rgba(16,40,79,0.04);
}
.nav-pill:hover { background: rgba(26,86,160,0.1); color: var(--navy); transform: translateY(-2px); }
.nav-pill.featured {
  background: rgba(0,94,168,0.1); border-color: rgba(0,94,168,0.35);
  color: var(--accent-strong); font-weight: 700;
}
.nav-pill.featured:hover { background: rgba(0,94,168,0.18); }
.scroll-hint {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  font-size: 0.68rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: #6b84a4; animation: fadeUp 1s 1.2s ease both;
}
.scroll-line {
  width: 1px; height: 36px;
  background: linear-gradient(to bottom, var(--slate), transparent);
  animation: scrollAnim 2s ease-in-out infinite;
}
@keyframes scrollAnim {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ── LAYOUT ── */
main { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; border-top: 1px solid var(--border); }
.section-compact { padding-top: 4rem; }
.section-label {
  font-family: "DM Mono", monospace; font-size: 0.65rem;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.6rem;
}
.section-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700; line-height: 1.15; margin-bottom: 0.8rem; color: var(--text-primary);
}
.section-desc {
  color: var(--text-muted); max-width: 580px;
  line-height: 1.7; margin-bottom: 2.5rem; font-size: 0.95rem;
}

/* ── ZIP LOOKUP ── */
.lookup-section {
  padding: 4rem 0; border-top: none;
  background: linear-gradient(180deg, rgba(26,86,160,0.06) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.lookup-inner { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.lookup-box {
  background: #ffffff; border: 1px solid var(--border-accent);
  border-radius: 16px; padding: 2.5rem;
  box-shadow: 0 18px 50px rgba(16, 40, 79, 0.08);
}
.lookup-title {
  font-family: "Playfair Display", serif;
  font-size: 1.8rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.5rem;
}
.lookup-desc { color: var(--text-muted); margin-bottom: 2rem; font-size: 0.92rem; line-height: 1.6; }
.coverage-note {
  background: var(--success-soft);
  border: 1px solid rgba(0, 94, 168, 0.18);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.82rem;
  line-height: 1.6;
  padding: 0.85rem 1rem;
  margin-bottom: 1.35rem;
}
.coverage-note strong { color: var(--accent-strong); }
.lookup-form { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1.5rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group-wide { min-width: min(100%, 340px); flex: 1 1 320px; }
.form-group label {
  font-size: 0.72rem; font-family: "DM Mono", monospace;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent);
}
.form-group input {
  background: #f0f6ff; border: 1px solid rgba(26,86,160,0.25);
  border-radius: 8px; padding: 0.75rem 1rem; color: var(--text-primary);
  font-family: "DM Sans", sans-serif; font-size: 1rem; outline: none;
  transition: border-color 0.2s; min-width: 180px;
}
.form-group input:focus { border-color: var(--accent); background: #e8f0ff; }
.form-group input::placeholder { color: #8aaac8; }
#state-input { text-transform: uppercase; }
.lookup-btn {
  background: var(--accent); color: var(--white); border: none;
  padding: 0.75rem 2rem; border-radius: 8px; font-weight: 700;
  font-family: "DM Sans", sans-serif; font-size: 0.95rem;
  cursor: pointer; transition: all 0.2s; white-space: nowrap; align-self: flex-end;
}
.lookup-btn:hover { background: var(--accent-strong); transform: translateY(-1px); }
.lookup-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.api-note {
  font-size: 0.78rem; color: var(--text-muted); line-height: 1.5;
}
.api-note a { color: var(--accent); text-decoration: none; }
.api-note a:hover { text-decoration: underline; }
#lookup-results { margin-top: 2rem; }
.lookup-mode-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
  line-height: 1.6;
}
.results-header { font-family: "Playfair Display", serif; font-size: 1.3rem; color: var(--text-primary); margin-bottom: 1.2rem; }
.results-location { font-family: "DM Mono", monospace; font-size: 0.75rem; color: var(--accent); letter-spacing: 0.1em; margin-bottom: 1.5rem; text-transform: uppercase; }
.live-results {
  background: #f8fbff;
  border: 1px solid rgba(0, 94, 168, 0.18);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.live-results-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.9rem;
  margin-bottom: 0.8rem;
}
.live-results-title {
  font-family: "Playfair Display", serif;
  font-size: 1.2rem;
  color: var(--text-primary);
  font-weight: 700;
}
.live-results-meta {
  font-size: 0.76rem;
  font-family: "DM Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.live-results-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}
.contest-grid {
  display: grid;
  gap: 1rem;
}
.contest-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1rem 0.95rem;
}
.contest-office {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}
.contest-type {
  font-size: 0.74rem;
  font-family: "DM Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 0.7rem;
}
.candidate-list {
  display: grid;
  gap: 0.7rem;
}
.candidate-item {
  border-top: 1px solid rgba(16,40,79,0.08);
  padding-top: 0.7rem;
}
.candidate-item:first-child {
  border-top: none;
  padding-top: 0;
}
.candidate-name {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}
.candidate-party,
.candidate-channels {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.candidate-channels a {
  color: var(--accent);
  text-decoration: none;
}
.candidate-channels a:hover {
  text-decoration: underline;
}
.candidate-missing {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}
.lookup-divider {
  margin: 1.5rem 0 1rem;
  border: none;
  border-top: 1px solid rgba(16,40,79,0.12);
}
.lookup-subhead {
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.office-group { margin-bottom: 2rem; }
.office-group-label {
  font-family: "DM Mono", monospace; font-size: 0.65rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--slate); padding: 0.4rem 0;
  border-bottom: 1px solid rgba(26,86,160,0.15); margin-bottom: 1rem;
}
.rep-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.rep-card {
  background: #ffffff; border: 1px solid var(--border);
  border-radius: 10px; padding: 1.25rem; transition: all 0.2s;
  box-shadow: 0 10px 25px rgba(16, 40, 79, 0.05);
}
.rep-card:hover { background: #eaf2ff; border-color: rgba(26,86,160,0.25); }
.rep-name { font-weight: 700; font-size: 1rem; color: var(--text-primary); margin-bottom: 0.2rem; }
.rep-office { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.6rem; line-height: 1.4; }
.rep-party {
  display: inline-block; font-family: "DM Mono", monospace;
  font-size: 0.65rem; letter-spacing: 0.08em; padding: 0.2rem 0.55rem;
  border-radius: 3px; margin-bottom: 0.8rem; font-weight: 700;
}
.party-D { background: rgba(13,79,143,0.1); color: #0d4f8f; border: 1px solid rgba(13,79,143,0.28); }
.party-R { background: rgba(159,47,35,0.1); color: #9f2f23; border: 1px solid rgba(159,47,35,0.28); }
.party-I { background: rgba(0,94,168,0.08); color: var(--accent-strong); border: 1px solid var(--border-accent); }
.rep-links { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.rep-link {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.72rem; font-family: "DM Mono", monospace;
  padding: 0.3rem 0.7rem; border-radius: 4px; text-decoration: none;
  transition: all 0.2s; border: 1px solid;
}
.rep-link.website { background: rgba(0,191,255,0.08); color: var(--accent); border-color: rgba(0,191,255,0.3); }
.rep-link.website:hover { background: rgba(0,191,255,0.18); }
.rep-link.youtube { background: rgba(255,0,0,0.1); color: #ff8888; border-color: rgba(255,0,0,0.3); }
.rep-link.youtube:hover { background: rgba(255,0,0,0.2); }
.rep-link.facebook { background: rgba(59,89,182,0.15); color: #8aadff; border-color: rgba(59,89,182,0.35); }
.rep-link.facebook:hover { background: rgba(59,89,182,0.25); }
.rep-link.twitter { background: rgba(29,161,242,0.1); color: #5bc0ff; border-color: rgba(29,161,242,0.3); }
.rep-link.twitter:hover { background: rgba(29,161,242,0.2); }
.rep-link.votes { background: rgba(16,40,79,0.04); color: var(--text-primary); border-color: var(--border); }
.rep-link.votes:hover { color: var(--text-primary); background: rgba(16,40,79,0.08); }
.rep-status {
  margin-top: 0.65rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.phone-num { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.5rem; font-family: "DM Mono", monospace; }
.fallback-links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.fallback-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.6rem 1.2rem; border-radius: 8px; font-size: 0.83rem;
  text-decoration: none; font-weight: 600; transition: all 0.2s;
  background: #ffffff; color: var(--text-primary);
  border: 1px solid rgba(26,86,160,0.2);
}
.fallback-btn:hover { background: #eef5ff; color: var(--navy); transform: translateY(-1px); box-shadow: 0 2px 8px rgba(26,86,160,0.12); }
.error-msg { background: rgba(159,47,35,0.08); border: 1px solid rgba(159,47,35,0.25); border-radius: 8px; padding: 1rem 1.25rem; color: #7b2219; font-size: 0.88rem; line-height: 1.6; }
.loading-msg { color: var(--text-muted); font-size: 0.92rem; padding: 1rem 0; display: flex; align-items: center; gap: 0.75rem; }
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(0,191,255,0.2); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── STATS GRID ── */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px; background: rgba(26,86,160,0.12);
  border: 1px solid rgba(26,86,160,0.15); border-radius: 12px;
  overflow: hidden; margin-bottom: 2.5rem;
}
.stat-box {
  background: var(--navy-card); padding: 2rem 1.5rem;
  text-align: center; transition: background 0.2s;
}
.stat-box:hover { background: var(--navy-card-hover); }
.stat-num {
  font-family: "Playfair Display", serif; font-size: 2.8rem;
  font-weight: 900; color: var(--accent); line-height: 1; margin-bottom: 0.4rem;
}
.stat-label { font-size: 0.75rem; color: var(--slate); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; }

/* ── RACE CARDS ── */
.race-grid { display: grid; gap: 1.25rem; }
.race-grid-2 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.race-card {
  background: var(--navy-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.5rem 1.75rem;
  transition: all 0.25s; position: relative; overflow: hidden;
}
.race-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
}
.race-card.tossup::before { background: linear-gradient(180deg, var(--accent), #0080aa); }
.race-card.lean-d::before { background: var(--blue-mid); }
.race-card.lean-r::before { background: var(--red-bright); }
.race-card.likely-d::before { background: rgba(37,99,235,0.6); }
.race-card.likely-r::before { background: rgba(192,57,43,0.6); }
.race-card.safe-d::before { background: rgba(37,99,235,0.3); }
.race-card.safe-r::before { background: rgba(192,57,43,0.3); }
.race-card:hover { background: #eef5ff; transform: translateY(-2px); border-color: rgba(26,86,160,0.25); box-shadow: 0 4px 12px rgba(26,86,160,0.1); }
.race-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.75rem; gap: 0.5rem; flex-wrap: wrap; }
.race-state { font-family: "Playfair Display", serif; font-size: 1.25rem; font-weight: 700; color: var(--text-primary); }
.chip {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 0.22rem 0.6rem; border-radius: 4px;
  font-family: "DM Mono", monospace;
}
.chip-tossup { background: rgba(0,191,255,0.15); color: var(--accent); border: 1px solid rgba(0,191,255,0.35); }
.chip-lean-d { background: rgba(29,95,208,0.12); color: #1d5fd0; border: 1px solid rgba(29,95,208,0.32); }
.chip-lean-r { background: rgba(199,68,50,0.12); color: #9f2f23; border: 1px solid rgba(199,68,50,0.32); }
.chip-likely-d { background: rgba(37,99,235,0.15); color: #6aa8ee; border: 1px solid rgba(37,99,235,0.3); }
.chip-likely-r { background: rgba(192,57,43,0.15); color: #ee9080; border: 1px solid rgba(192,57,43,0.3); }
.chip-d { background: rgba(26,86,160,0.25); color: #8dc3f8; border: 1px solid rgba(26,86,160,0.4); }
.chip-r { background: rgba(159,47,35,0.12); color: #9f2f23; border: 1px solid rgba(159,47,35,0.28); }
.chip-open { background: rgba(0,94,168,0.08); color: var(--accent-strong); border: 1px solid rgba(0,94,168,0.25); }
.race-meta { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.6rem; line-height: 1.5; }
.race-meta strong { color: var(--text-primary); }
.race-candidates { margin-top: 0.75rem; }
.candidate-row { display: flex; justify-content: space-between; align-items: center; padding: 0.45rem 0; border-top: 1px solid rgba(255,255,255,0.05); font-size: 0.83rem; }
.candidate-name { color: var(--text-primary); font-weight: 500; }
.candidate-info { font-size: 0.75rem; color: var(--text-muted); font-family: "DM Mono", monospace; }
.race-link { display: inline-block; font-size: 0.73rem; font-family: "DM Mono", monospace; color: var(--accent); text-decoration: none; margin-top: 0.75rem; transition: opacity 0.2s; }
.race-link:hover { opacity: 0.7; text-decoration: underline; }
.race-desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.55; margin-top: 0.5rem; }
.incumbent-badge { font-size: 0.62rem; background: rgba(255,255,255,0.08); color: var(--slate); padding: 0.15rem 0.45rem; border-radius: 3px; font-family: "DM Mono", monospace; margin-left: 0.4rem; vertical-align: middle; }
.open-badge { font-size: 0.62rem; background: rgba(0,191,255,0.1); color: var(--accent); padding: 0.15rem 0.45rem; border-radius: 3px; font-family: "DM Mono", monospace; vertical-align: middle; }

/* ── NOTICE ── */
.notice {
  background: rgba(0,119,204,0.07); border: 1px solid rgba(0,119,204,0.25);
  border-radius: 8px; padding: 0.9rem 1.2rem;
  font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 2rem;
}
.notice strong { color: var(--accent); }
.notice a { color: var(--accent); }

/* ── RESOURCES ── */
.resources-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.1rem; }
.resource-card {
  background: var(--navy-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.6rem; text-decoration: none;
  color: inherit; transition: all 0.25s; display: block;
}
.resource-card:hover { background: #eef5ff; transform: translateY(-3px); border-color: var(--border-accent); box-shadow: 0 4px 12px rgba(26,86,160,0.1); }
.resource-icon { font-size: 1.8rem; margin-bottom: 0.9rem; display: block; }
.resource-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.35rem; color: var(--text-primary); }
.resource-desc { font-size: 0.8rem; color: var(--text-muted); line-height: 1.55; margin-bottom: 0.65rem; }
.resource-link { font-size: 0.74rem; color: var(--accent); font-family: "DM Mono", monospace; letter-spacing: 0.04em; font-weight: 600; }

/* ── TIMELINE ── */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 0; bottom: 0; width: 1px; background: rgba(0,191,255,0.2); }
.timeline-item { position: relative; padding-bottom: 2rem; }
.timeline-dot { position: absolute; left: -1.65rem; top: 4px; width: 13px; height: 13px; border-radius: 50%; background: #ddeeff; border: 2px solid var(--accent); }
.timeline-date { font-family: "DM Mono", monospace; font-size: 0.73rem; color: var(--accent); letter-spacing: 0.1em; margin-bottom: 0.25rem; font-weight: 600; }
.timeline-title { font-weight: 600; font-size: 0.93rem; margin-bottom: 0.2rem; color: var(--text-primary); }
.timeline-desc { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.guide-card {
  display: block;
  text-decoration: none;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.35rem;
  box-shadow: 0 12px 28px rgba(16, 40, 79, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.guide-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(16, 40, 79, 0.08);
  border-color: rgba(0, 94, 168, 0.28);
}
.guide-card-label {
  font-family: "DM Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.55rem;
}
.guide-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.35;
}
.guide-card-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.guide-page {
  background: linear-gradient(180deg, rgba(0, 94, 168, 0.04) 0%, rgba(255, 255, 255, 0) 18rem);
}
.guide-hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
}
.guide-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}
.guide-home-link {
  color: var(--accent);
  text-decoration: none;
  font-family: "DM Mono", monospace;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.guide-home-link:hover {
  text-decoration: underline;
}
.guide-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.guide-nav a {
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.82rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(16, 40, 79, 0.03);
}
.guide-nav a:hover {
  border-color: rgba(0, 94, 168, 0.26);
  color: var(--accent-strong);
}
.guide-kicker {
  font-family: "DM Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.85rem;
}
.guide-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.02;
  color: var(--text-primary);
  margin-bottom: 0.9rem;
}
.guide-intro {
  max-width: 760px;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.75;
}
.guide-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}
.guide-section {
  padding: 2rem 0 0;
}
.guide-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.75rem;
}
.guide-meta-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}
.guide-meta-label {
  font-family: "DM Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 0.4rem;
}
.guide-meta-value {
  color: var(--text-primary);
  font-weight: 700;
}
.guide-list {
  display: grid;
  gap: 1rem;
}
.guide-list-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.35rem;
}
.guide-list-card h3 {
  font-size: 1.02rem;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}
.guide-list-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
}
.guide-list-card a {
  color: var(--accent);
  text-decoration: none;
}
.guide-list-card a:hover {
  text-decoration: underline;
}
.guide-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.guide-callout {
  background: #f7fbff;
  border: 1px solid rgba(0, 94, 168, 0.16);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  color: var(--text-primary);
  line-height: 1.6;
}

/* ── FOOTER ── */
footer { border-top: 1px solid rgba(26,86,160,0.15); background: #edf4fb; padding: 3rem 1.5rem; text-align: center; color: var(--text-muted); font-size: 0.82rem; line-height: 1.7; }
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ── TABS ── */
.tab-bar { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 2rem; }
.tab {
  padding: 0.6rem 1.2rem; font-size: 0.82rem; font-weight: 500;
  cursor: pointer; color: var(--slate); border: none; background: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all 0.2s; font-family: "DM Sans", sans-serif;
}
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

@media (max-width: 640px) {
  .lookup-form { flex-direction: column; }
  .form-group input { min-width: 100%; }
  .lookup-btn { width: 100%; }
  .logo-img { height: 44px; }
}

.race-badge {
  display: inline-block;
  font-size: 0.68rem; font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 20px;
  margin-left: 0.5rem;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.race-badge.open    { background: rgba(255,200,50,0.18);  color: #f5c842; border: 1px solid rgba(255,200,50,0.35); }
.race-badge.toss-up { background: rgba(255,120,60,0.18);  color: #ff9060; border: 1px solid rgba(255,120,60,0.35); }
.race-badge.safe    { background: rgba(80,200,120,0.15);  color: #60cc88; border: 1px solid rgba(80,200,120,0.3); }
.rep-district { font-size: 0.72rem; color: var(--accent); letter-spacing: 0.03em; margin-bottom: 0.3rem; }
.rep-note { font-size: 0.72rem; color: #f5c842; margin-top: 0.35rem; font-style: italic; }
.delegation-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem 1.3rem;
  margin-top: 0.75rem;
}
.delegation-bar {
  height: 10px; border-radius: 5px;
  overflow: hidden; display: flex;
  margin: 0.6rem 0;
}
.delegation-bar .r-seg { background: rgba(192,57,43,0.7); }
.delegation-bar .d-seg { background: rgba(26,86,160,0.7); }
.delegation-stats { display: flex; gap: 1.5rem; font-size: 0.82rem; margin-top: 0.3rem; }
.delegation-stats .r-num { color: #9f2f23; font-weight: 700; }
.delegation-stats .d-num { color: #0d4f8f; font-weight: 700; }
.find-rep-btn {
  display: inline-block;
  margin-top: 0.9rem;
  padding: 0.55rem 1.2rem;
  background: rgba(0,191,255,0.12);
  border: 1px solid rgba(0,191,255,0.35);
  border-radius: 8px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}
.find-rep-btn:hover { background: rgba(0,191,255,0.22); }


.race2026-card {
  background: linear-gradient(135deg, rgba(26,86,160,0.08), rgba(0,0,0,0));
  border: 1px solid rgba(26,86,160,0.25);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin-top: 0.75rem;
}
.race2026-label {
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 0.5rem;
}
.race2026-note {
  font-size: 0.82rem; color: var(--text-muted);
  line-height: 1.5; margin-bottom: 0.75rem;
}
.race2026-open-badge {
  display: inline-block; font-size: 0.7rem; font-weight: 700;
  padding: 0.2rem 0.6rem; border-radius: 20px; margin-bottom: 0.6rem;
  background: rgba(255,200,50,0.15); color: #f5c842;
  border: 1px solid rgba(255,200,50,0.35); letter-spacing: 0.05em;
  text-transform: uppercase;
}
.cand-party-block { margin-top: 0.6rem; }
.cand-party-block .party-head {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; margin-bottom: 0.25rem;
}
.cand-party-block.r-block .party-head { color: #9f2f23; }
.cand-party-block.d-block .party-head { color: #0d4f8f; }
.cand-list { list-style: none; padding: 0; margin: 0; }
.cand-list li { font-size: 0.83rem; color: var(--text-muted);
  padding: 0.18rem 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.cand-list li:last-child { border-bottom: none; }
.race2026-bp-link {
  display: inline-block; margin-top: 0.75rem; font-size: 0.8rem;
  color: var(--accent); text-decoration: none;
  padding: 0.35rem 0.85rem;
  background: rgba(0,191,255,0.08); border: 1px solid rgba(0,191,255,0.25);
  border-radius: 6px;
}
.race2026-bp-link:hover { background: rgba(0,191,255,0.16); }
