/*
Theme Name: Bexar Election Night
Theme URI: https://example.com/
Author: Election Night Data Site
Description: A modern, broadcast-inspired election-night presentation theme for the Bexar Election Engine.
Version: 0.1.77
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: bexar-election-night
*/

:root {
  --en-bg: #07101f;
  --en-bg-2: #0b1628;
  --en-panel: rgba(17, 31, 53, 0.94);
  --en-panel-strong: #12213a;
  --en-panel-soft: #101d31;
  --en-line: rgba(255,255,255,.10);
  --en-line-strong: rgba(255,255,255,.18);
  --en-text: #f8fbff;
  --en-muted: #98a9be;
  --en-accent: #4ea1ff;
  --en-accent-2: #7bc2ff;
  --en-live: #ff435f;
  --en-good: #47d7a1;
  --en-warn: #ffbf59;
  --en-shadow: 0 18px 60px rgba(0,0,0,.28);
  --en-radius: 24px;
  --en-radius-sm: 15px;
  --en-max: 1480px;
}

* { box-sizing: border-box; }
html { background: var(--en-bg); scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--en-text);
  background:
    radial-gradient(circle at 10% -10%, rgba(63, 126, 255, .22), transparent 34rem),
    radial-gradient(circle at 90% 0%, rgba(102, 74, 255, .15), transparent 30rem),
    linear-gradient(180deg, #07101f 0%, #091427 45%, #07101f 100%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}
body.en-modal-open { overflow: hidden; }
a { color: inherit; }
button, input { font: inherit; }

.en-shell { min-height: 100vh; }
.en-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--en-line);
  background: rgba(7,16,31,.82);
  backdrop-filter: blur(20px);
}
.en-topbar-inner {
  width: min(calc(100% - 36px), var(--en-max));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.en-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.en-brand-mark {
  width: 42px; height: 42px; border-radius: 13px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #2e73ff, #7b5cff);
  box-shadow: 0 9px 28px rgba(70, 111, 255, .36);
  font-weight: 900; letter-spacing: -.04em;
}
.en-brand-copy { min-width: 0; }
.en-brand-title { font-weight: 850; letter-spacing: -.03em; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.en-brand-subtitle { color: var(--en-muted); font-size: .77rem; margin-top: 2px; }
.en-live-chip {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 999px;
  border: 1px solid rgba(255,67,95,.32);
  background: rgba(255,67,95,.09);
  color: #ffd5dc; font-size: .76rem; font-weight: 800; letter-spacing: .08em;
}
.en-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--en-live); box-shadow: 0 0 0 0 rgba(255,67,95,.55); animation: enPulse 2s infinite; }
.en-updated { color: var(--en-muted); font-size: .8rem; white-space: nowrap; }

.en-main { width: min(calc(100% - 36px), var(--en-max)); margin: 0 auto; padding: 36px 0 80px; }
.en-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .55fr);
  gap: 22px;
  margin-bottom: 24px;
}
.en-hero-primary,
.en-hero-stats,
.en-status-banner,
.en-race-card,
.en-empty-card {
  border: 1px solid var(--en-line);
  background: linear-gradient(160deg, rgba(18,33,58,.98), rgba(11,24,43,.95));
  box-shadow: var(--en-shadow);
}
.en-hero-primary { border-radius: 30px; padding: 34px; min-height: 250px; position: relative; overflow: hidden; }
.en-hero-primary::after {
  content: ""; position: absolute; width: 440px; height: 440px; border-radius: 50%; right: -170px; top: -240px;
  background: radial-gradient(circle, rgba(78,161,255,.30), rgba(78,161,255,0)); pointer-events: none;
}
.en-eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #b8c8db; font-size: .76rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.en-hero-title { margin: 14px 0 9px; max-width: 900px; font-size: clamp(2rem, 4.4vw, 4.5rem); line-height: .98; letter-spacing: -.055em; }
.en-hero-subtitle { color: var(--en-muted); max-width: 760px; font-size: 1rem; line-height: 1.65; }
.en-progress-wrap { margin-top: 26px; }
.en-progress-copy { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 10px; }
.en-progress-label { color: #c8d6e7; font-size: .8rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.en-progress-number { font-weight: 900; font-size: 1.45rem; letter-spacing: -.03em; }
.en-progress-track { height: 10px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.en-progress-bar { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--en-accent), #7f68ff); transition: width .65s cubic-bezier(.2,.8,.2,1); }

.en-hero-stats { border-radius: 30px; padding: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.en-stat { padding: 20px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.06); border-radius: 20px; min-height: 102px; display: flex; flex-direction: column; justify-content: space-between; }
.en-stat-label { color: var(--en-muted); font-size: .73rem; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }
.en-stat-value { font-size: 1.6rem; font-weight: 880; letter-spacing: -.045em; }

.en-status-banner { display: none; border-radius: 18px; padding: 14px 18px; margin-bottom: 22px; align-items: center; gap: 12px; }
.en-status-banner.is-visible { display: flex; }
.en-status-icon { width: 10px; height: 10px; border-radius: 50%; background: var(--en-warn); flex: 0 0 auto; }
.en-status-title { font-weight: 850; margin-right: 6px; }
.en-status-message { color: var(--en-muted); }

.en-controls { display: flex; align-items: center; gap: 12px; margin: 26px 0 18px; flex-wrap: wrap; }
.en-filter-group { display: flex; gap: 7px; flex-wrap: wrap; }
.en-filter-btn {
  appearance: none; border: 1px solid var(--en-line); background: rgba(255,255,255,.035); color: #c9d6e7;
  padding: 10px 14px; border-radius: 12px; cursor: pointer; font-weight: 760; font-size: .83rem;
}
.en-filter-btn:hover, .en-filter-btn.is-active { color: white; background: rgba(78,161,255,.13); border-color: rgba(78,161,255,.45); }
.en-search { margin-left: auto; position: relative; min-width: min(360px, 100%); }
.en-search input { width: 100%; border-radius: 12px; border: 1px solid var(--en-line); background: rgba(255,255,255,.045); color: white; padding: 11px 14px 11px 40px; outline: none; }
.en-search input:focus { border-color: rgba(78,161,255,.55); box-shadow: 0 0 0 3px rgba(78,161,255,.09); }
.en-search::before { content: "⌕"; position: absolute; left: 14px; top: 50%; transform: translateY(-54%); color: var(--en-muted); font-size: 1.2rem; }

.en-section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 18px 0 16px; }
.en-section-title { font-size: 1.3rem; margin: 0; letter-spacing: -.025em; }
.en-section-count { color: var(--en-muted); font-size: .82rem; }
.en-race-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.en-race-card { border-radius: var(--en-radius); overflow: hidden; position: relative; transition: transform .22s ease, border-color .22s ease; }
.en-race-card:hover { transform: translateY(-2px); border-color: var(--en-line-strong); }
.en-race-card.is-projected { border-color: rgba(71,215,161,.42); box-shadow: 0 18px 70px rgba(16,96,78,.24); }
.en-race-card-head { padding: 20px 22px 16px; border-bottom: 1px solid var(--en-line); }
.en-race-kicker { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; min-height: 24px; }
.en-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 5px 8px; border-radius: 999px; font-size: .67rem; font-weight: 880; letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--en-line); color: #cad8e9; background: rgba(255,255,255,.035); }
.en-badge-live { border-color: rgba(255,67,95,.32); background: rgba(255,67,95,.10); color: #ffd1d9; }
.en-badge-projected { border-color: rgba(71,215,161,.34); background: rgba(71,215,161,.10); color: #bff9e5; }
.en-badge-final { border-color: rgba(78,161,255,.35); background: rgba(78,161,255,.11); color: #cfe6ff; }
.en-badge-waiting { border-color: rgba(255,193,92,.32); background: rgba(255,193,92,.09); color: #ffe0a8; }
.en-race-title { margin: 0; font-size: 1.25rem; line-height: 1.25; letter-spacing: -.025em; }
.en-race-meta { color: var(--en-muted); font-size: .78rem; margin-top: 8px; }
.en-race-progress { margin-top: 14px; }
.en-race-progress .en-progress-track { height: 6px; }
.en-race-progress-line { display: flex; justify-content: space-between; color: var(--en-muted); font-size: .72rem; margin-bottom: 7px; }
.en-race-progress-line strong { color: #dce8f7; }
.en-candidates { padding: 8px 14px 14px; }
.en-candidate-row { display: grid; grid-template-columns: 64px minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 13px 9px; border-bottom: 1px solid rgba(255,255,255,.055); }
.en-candidate-row:last-child { border-bottom: 0; }
.en-candidate-photo { width: 64px; height: 74px; object-fit: cover; border-radius: 15px; background: #1d2d44; border: 1px solid rgba(255,255,255,.10); }
.en-candidate-placeholder { width: 64px; height: 74px; border-radius: 15px; display: grid; place-items: center; background: linear-gradient(145deg,#223651,#16263e); border: 1px solid rgba(255,255,255,.09); color: #d5dfed; font-weight: 900; font-size: 1.05rem; }
.en-candidate-main { min-width: 0; }
.en-candidate-name-line { display: flex; align-items: center; gap: 7px; min-width: 0; }
.en-candidate-name { font-weight: 850; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.015em; }
.en-party { color: var(--en-muted); font-size: .68rem; font-weight: 850; letter-spacing: .08em; }
.en-vote-total { margin-top: 6px; color: var(--en-muted); font-size: .78rem; }
.en-candidate-percent { font-size: 1.65rem; font-weight: 900; letter-spacing: -.05em; min-width: 76px; text-align: right; font-variant-numeric: tabular-nums; }
.en-projected-hero { display: grid; grid-template-columns: 112px minmax(0,1fr) auto; gap: 18px; align-items: center; margin: 14px 14px 0; padding: 18px; border-radius: 20px; background: linear-gradient(130deg, rgba(71,215,161,.14), rgba(78,161,255,.08)); border: 1px solid rgba(71,215,161,.20); }
.en-projected-hero .en-candidate-photo, .en-projected-hero .en-candidate-placeholder { width: 112px; height: 126px; border-radius: 19px; }
.en-projected-label { color: #a6f1d8; text-transform: uppercase; letter-spacing: .12em; font-weight: 900; font-size: .73rem; }
.en-projected-name { font-size: 1.55rem; font-weight: 920; letter-spacing: -.035em; margin-top: 5px; }
.en-projected-votes { color: var(--en-muted); margin-top: 7px; font-size: .82rem; }
.en-projected-percent { font-size: 2.25rem; font-weight: 920; letter-spacing: -.06em; }
.en-card-footer { padding: 12px 18px 16px; display: flex; justify-content: flex-end; }
.en-details-btn { border: 0; background: transparent; color: var(--en-accent-2); cursor: pointer; padding: 6px 2px; font-weight: 800; font-size: .79rem; }

.en-empty-card { border-radius: var(--en-radius); padding: 36px; text-align: center; color: var(--en-muted); grid-column: 1 / -1; }
.en-empty-title { color: white; font-size: 1.12rem; font-weight: 850; margin-bottom: 8px; }

.en-skeleton { position: relative; overflow: hidden; background: rgba(255,255,255,.05); border-radius: 10px; }
.en-skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent); animation: enShimmer 1.6s infinite; }
.en-skeleton-card { height: 430px; border-radius: var(--en-radius); border: 1px solid var(--en-line); background: rgba(17,31,53,.68); }

.en-modal { position: fixed; inset: 0; z-index: 100; display: none; }
.en-modal.is-open { display: block; }
.en-modal-backdrop { position: absolute; inset: 0; background: rgba(2,7,15,.78); backdrop-filter: blur(8px); }
.en-modal-panel { position: relative; width: min(760px, calc(100% - 30px)); max-height: calc(100vh - 44px); overflow: auto; margin: 22px auto; border-radius: 26px; border: 1px solid var(--en-line-strong); background: #0d1a2d; box-shadow: 0 28px 100px rgba(0,0,0,.55); padding: 26px; }
.en-modal-close { position: sticky; float: right; top: 0; border: 1px solid var(--en-line); width: 38px; height: 38px; border-radius: 12px; background: rgba(255,255,255,.06); color: white; cursor: pointer; }
.en-detail-title { font-size: 1.65rem; margin: 4px 50px 5px 0; letter-spacing: -.035em; }
.en-detail-subtitle { color: var(--en-muted); margin-bottom: 20px; }
.en-detail-breakdown { margin-top: 7px; display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; color: var(--en-muted); font-size: .7rem; }
.en-detail-breakdown span { background: rgba(255,255,255,.035); padding: 7px 8px; border-radius: 9px; }

.en-footer { width: min(calc(100% - 36px), var(--en-max)); margin: 0 auto; padding: 0 0 34px; color: #72839a; font-size: .72rem; text-align: center; }

@keyframes enPulse { 0% { box-shadow: 0 0 0 0 rgba(255,67,95,.55); } 70% { box-shadow: 0 0 0 9px rgba(255,67,95,0); } 100% { box-shadow: 0 0 0 0 rgba(255,67,95,0); } }
@keyframes enShimmer { 100% { transform: translateX(100%); } }
@keyframes enFlash { 0% { background-color: rgba(78,161,255,.16); } 100% { background-color: transparent; } }
.en-value-changed { animation: enFlash .9s ease-out; }


.en-data-update-toast {
  position: fixed;
  z-index: 95;
  top: 86px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(92vw, 390px);
  padding: 11px 15px;
  border: 1px solid color-mix(in srgb, var(--en-good) 48%, var(--en-line));
  border-radius: 999px;
  background: var(--en-panel-strong);
  color: var(--en-text);
  box-shadow: 0 14px 38px rgba(0,0,0,.22);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -12px) scale(.98);
  transition: opacity .2s ease, transform .22s ease;
}
.en-data-update-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}
.en-data-update-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: var(--en-good);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--en-good) 44%, transparent);
  animation: enDataPulse 1s ease-out 2;
}
.en-data-update-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.15;
}
.en-data-update-copy strong {
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .01em;
}
.en-data-update-copy span {
  color: var(--en-muted);
  font-size: .67rem;
  font-weight: 700;
}
@keyframes enDataPulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--en-good) 48%, transparent); }
  100% { box-shadow: 0 0 0 9px transparent; }
}
@media (max-width: 760px) {
  .en-data-update-toast { top: 72px; padding: 10px 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .en-data-update-toast { transition: opacity .12s linear; transform: translate(-50%, 0); }
  .en-data-update-toast.is-visible { transform: translate(-50%, 0); }
  .en-data-update-dot { animation: none; }
  .en-value-changed { animation: none; }
}

@media (max-width: 1040px) {
  .en-hero { grid-template-columns: 1fr; }
  .en-hero-stats { grid-template-columns: repeat(4, 1fr); }
  .en-race-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .en-topbar-inner, .en-main, .en-footer { width: min(calc(100% - 24px), var(--en-max)); }
  .en-topbar-inner { min-height: 64px; }
  .en-brand-mark { width: 38px; height: 38px; }
  .en-brand-subtitle, .en-updated { display: none; }
  .en-live-chip { padding: 7px 10px; }
  .en-main { padding-top: 18px; }
  .en-hero-primary { border-radius: 22px; padding: 24px 20px; min-height: 0; }
  .en-hero-title { font-size: clamp(2rem, 11vw, 3.15rem); }
  .en-hero-stats { border-radius: 22px; padding: 12px; grid-template-columns: 1fr 1fr; }
  .en-stat { padding: 15px; min-height: 88px; }
  .en-stat-value { font-size: 1.35rem; }
  .en-controls { align-items: stretch; }
  .en-search { order: -1; margin-left: 0; width: 100%; min-width: 0; }
  .en-filter-group { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .en-filter-btn { flex: 0 0 auto; }
  .en-race-card { border-radius: 19px; }
  .en-race-card-head { padding: 18px 16px 14px; }
  .en-candidates { padding: 6px 8px 10px; }
  .en-candidate-row { grid-template-columns: 54px minmax(0,1fr) auto; gap: 11px; padding: 11px 7px; }
  .en-candidate-photo, .en-candidate-placeholder { width: 54px; height: 64px; border-radius: 13px; }
  .en-candidate-percent { font-size: 1.35rem; min-width: 62px; }
  .en-party { display: block; }
  .en-projected-hero { grid-template-columns: 82px minmax(0,1fr); margin: 10px 8px 0; padding: 13px; gap: 13px; }
  .en-projected-hero .en-candidate-photo, .en-projected-hero .en-candidate-placeholder { width: 82px; height: 94px; border-radius: 15px; }
  .en-projected-percent { grid-column: 1 / -1; font-size: 1.7rem; text-align: right; margin-top: -6px; }
  .en-projected-name { font-size: 1.2rem; }
  .en-detail-breakdown { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .en-candidate-row { grid-template-columns: 50px minmax(0,1fr) 58px; }
  .en-candidate-photo, .en-candidate-placeholder { width: 50px; height: 59px; }
  .en-candidate-name { font-size: .91rem; }
  .en-vote-total { font-size: .72rem; }
  .en-candidate-percent { font-size: 1.18rem; }
}

/* v0.1.3 landing page + cache-separated results route */
.en-brand-link { text-decoration: none; }
.en-nav-results {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(78,161,255,.35);
  background: rgba(78,161,255,.10);
  color: #ddecff;
  text-decoration: none;
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .03em;
}
.en-home-main { width: min(calc(100% - 36px), var(--en-max)); margin: 0 auto; padding: 48px 0 82px; }
.en-home-hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  padding: clamp(38px, 6vw, 82px);
  border-radius: 34px;
  border: 1px solid var(--en-line);
  background:
    linear-gradient(125deg, rgba(18,33,58,.98), rgba(9,21,40,.96)),
    radial-gradient(circle at 80% 20%, rgba(78,161,255,.18), transparent 28rem);
  box-shadow: var(--en-shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.en-home-hero-glow { position: absolute; width: 640px; height: 640px; border-radius: 50%; right: -180px; top: -300px; background: radial-gradient(circle, rgba(83,118,255,.30), rgba(83,118,255,0) 65%); pointer-events: none; }
.en-home-eyebrow, .en-home-kicker { position: relative; z-index: 1; color: #b8c8db; font-size: .76rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.en-home-eyebrow { display: inline-flex; align-items: center; gap: 9px; }
.en-home-hero h1 { position: relative; z-index: 1; max-width: 1040px; margin: 18px 0 18px; font-size: clamp(3rem, 7.4vw, 7.7rem); line-height: .9; letter-spacing: -.068em; }
.en-home-hero h1 span { color: #a8c8f4; }
.en-home-hero > p { position: relative; z-index: 1; max-width: 800px; margin: 0; color: var(--en-muted); font-size: clamp(1rem, 1.4vw, 1.22rem); line-height: 1.65; }
.en-home-actions { position: relative; z-index: 1; display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.en-home-cta { display: inline-flex; align-items: center; justify-content: center; gap: 15px; padding: 14px 19px; border-radius: 14px; text-decoration: none; font-weight: 880; font-size: .9rem; transition: transform .2s ease, border-color .2s ease; }
.en-home-cta:hover { transform: translateY(-2px); }
.en-home-cta-primary { background: linear-gradient(135deg,#3f8cff,#7666ff); color: white; box-shadow: 0 13px 35px rgba(66,111,255,.28); }
.en-home-cta-secondary { border: 1px solid var(--en-line-strong); background: rgba(255,255,255,.045); color: #d9e8fb; }
.en-home-trust-row { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; max-width: 920px; margin-top: 52px; }
.en-home-trust-row span { padding: 14px 16px; border: 1px solid rgba(255,255,255,.07); border-radius: 15px; background: rgba(255,255,255,.03); }
.en-home-trust-row strong, .en-home-trust-row small { display: block; }
.en-home-trust-row strong { font-size: .83rem; }
.en-home-trust-row small { color: var(--en-muted); margin-top: 4px; font-size: .72rem; }
.en-home-feature-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; margin: 24px 0 58px; }
.en-home-feature-grid article { padding: 26px; border-radius: 22px; border: 1px solid var(--en-line); background: rgba(17,31,53,.76); box-shadow: var(--en-shadow); }
.en-home-feature-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: rgba(78,161,255,.12); border: 1px solid rgba(78,161,255,.22); color: #cfe6ff; font-weight: 900; font-size: 1.1rem; }
.en-home-feature-grid h2 { margin: 18px 0 8px; font-size: 1.08rem; }
.en-home-feature-grid p { margin: 0; color: var(--en-muted); font-size: .86rem; line-height: 1.6; }
.en-home-races { scroll-margin-top: 92px; margin: 12px 0 62px; }
.en-home-section-head { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 18px; }
.en-home-section-head h2 { margin: 6px 0 4px; font-size: clamp(1.8rem,3vw,3rem); letter-spacing: -.04em; }
.en-home-section-head p { margin: 0; color: var(--en-muted); }
.en-home-section-head > a { color: var(--en-accent-2); font-weight: 850; text-decoration: none; white-space: nowrap; }
.en-home-race-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.en-home-race-card { overflow: hidden; border-radius: var(--en-radius); border: 1px solid var(--en-line); background: linear-gradient(160deg, rgba(18,33,58,.98), rgba(11,24,43,.95)); box-shadow: var(--en-shadow); }
.en-home-race-head { padding: 20px 22px 16px; border-bottom: 1px solid var(--en-line); }
.en-home-race-head h3 { margin: 9px 0 5px; font-size: 1.22rem; letter-spacing: -.025em; }
.en-home-race-head > span:last-child { color: var(--en-muted); font-size: .75rem; }
.en-home-candidates { padding: 8px 14px; }
.en-home-candidate { display: grid; grid-template-columns: 54px minmax(0,1fr); gap: 12px; align-items: center; padding: 10px 8px; border-bottom: 1px solid rgba(255,255,255,.055); }
.en-home-candidate:last-child { border-bottom: 0; }
.en-home-candidate img, .en-home-candidate-placeholder { width: 54px; height: 62px; border-radius: 13px; object-fit: cover; border: 1px solid rgba(255,255,255,.1); background: linear-gradient(145deg,#223651,#16263e); }
.en-home-candidate-placeholder { display: grid; place-items: center; font-weight: 900; }
.en-home-candidate strong, .en-home-candidate span { display: block; }
.en-home-candidate strong { font-size: .92rem; }
.en-home-candidate span { color: var(--en-muted); margin-top: 4px; font-size: .68rem; font-weight: 850; letter-spacing: .08em; }
.en-home-race-link { display: flex; align-items: center; justify-content: space-between; margin: 0 14px 14px; padding: 11px 12px; border-radius: 12px; background: rgba(78,161,255,.08); color: #cfe6ff; text-decoration: none; font-size: .8rem; font-weight: 850; }
.en-home-bottom-cta { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 32px; border-radius: 26px; border: 1px solid var(--en-line); background: linear-gradient(135deg,rgba(78,161,255,.13),rgba(113,89,255,.09)); }
.en-home-bottom-cta h2 { margin: 7px 0 0; max-width: 850px; font-size: clamp(1.45rem,3vw,2.7rem); letter-spacing: -.04em; }
.en-home-footer strong { color: #93a6be; }
.en-race-card { scroll-margin-top: 94px; }

@media (max-width: 900px) {
  .en-home-hero { min-height: 0; }
  .en-home-trust-row, .en-home-feature-grid { grid-template-columns: 1fr; }
  .en-home-race-grid { grid-template-columns: 1fr; }
  .en-home-section-head, .en-home-bottom-cta { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 760px) {
  .en-home-main { width: min(calc(100% - 24px), var(--en-max)); padding-top: 18px; }
  .en-home-hero { border-radius: 24px; padding: 34px 22px; }
  .en-home-hero h1 { font-size: clamp(2.7rem,15vw,4.8rem); }
  .en-home-trust-row { margin-top: 34px; }
  .en-home-feature-grid { margin-top: 16px; margin-bottom: 42px; }
  .en-home-bottom-cta { padding: 24px; }
  .en-nav-results { padding: 8px 11px; font-size: .73rem; }
}

/* v0.1.4 minimalist cache-friendly homepage */
.en-home-minimal {
  background:
    radial-gradient(circle at 50% -12%, rgba(63,126,255,.14), transparent 34rem),
    linear-gradient(180deg, #07101f 0%, #091427 55%, #07101f 100%);
}
.en-min-home-main {
  width: min(calc(100% - 36px), 1120px);
  margin: 0 auto;
  padding: clamp(54px, 8vw, 108px) 0 72px;
}
.en-min-home-header {
  text-align: center;
  margin: 0 auto clamp(46px, 6vw, 72px);
}
.en-min-home-header h1 {
  margin: 0;
  font-size: clamp(2.35rem, 5.4vw, 5.25rem);
  line-height: .98;
  letter-spacing: -.055em;
  font-weight: 920;
}
.en-min-home-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 58px;
  margin-top: 30px;
  padding: 0 25px;
  border-radius: 16px;
  background: linear-gradient(135deg,#3f8cff,#7666ff);
  box-shadow: 0 14px 38px rgba(66,111,255,.27);
  color: white;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 900;
  transition: transform .2s ease, box-shadow .2s ease;
}
.en-min-home-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(66,111,255,.34);
}
.en-min-home-arrow { font-size: 1.25rem; line-height: 1; }
.en-min-featured { margin-top: 0; }
.en-min-section-label {
  margin: 0 0 16px;
  color: #aebed1;
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.en-min-featured-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.en-min-featured-grid:has(> :only-child) {
  grid-template-columns: minmax(0, 720px);
  justify-content: center;
}
.en-home-preview-card:hover { transform: none; }
.en-home-preview-card .en-card-footer { border-top: 1px solid rgba(255,255,255,.055); }
.en-home-preview-link {
  color: var(--en-accent-2);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 850;
}
.en-min-home-footer { padding-bottom: 30px; }

@media (max-width: 860px) {
  .en-min-featured-grid { grid-template-columns: 1fr; }
  .en-min-featured-grid:has(> :only-child) { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .en-min-home-main {
    width: min(calc(100% - 24px), 1120px);
    padding-top: 42px;
  }
  .en-min-home-header { margin-bottom: 42px; }
  .en-min-home-header h1 { font-size: clamp(2.45rem, 13vw, 4rem); }
  .en-min-home-cta { width: 100%; min-height: 58px; margin-top: 25px; }
  .en-min-section-label { margin-left: 2px; }
}


/* v0.1.16 welcoming minimalist homepage */
.en-home-welcome {
  background:
    radial-gradient(circle at 50% -8%, rgba(66, 123, 255, .18), transparent 32rem),
    radial-gradient(circle at 78% 36%, rgba(101, 78, 255, .08), transparent 28rem),
    linear-gradient(180deg, #07101f 0%, #091427 58%, #07101f 100%);
}
.en-welcome-home-main {
  display: flex;
  align-items: center;
  min-height: calc(100vh - 92px);
  min-height: calc(100dvh - 92px);
  padding-top: clamp(34px, 6vh, 72px);
  padding-bottom: clamp(44px, 7vh, 86px);
}
.en-welcome-hero {
  width: min(100%, 940px);
  margin: 0 auto;
  text-align: center;
}
.en-welcome-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(34px, 5vw, 54px);
  text-align: left;
}
.en-welcome-brand .en-brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
}
.en-welcome-brand-copy { display: flex; flex-direction: column; gap: 2px; }
.en-welcome-brand-copy strong { font-size: .97rem; font-weight: 900; letter-spacing: -.02em; }
.en-welcome-brand-copy span { color: #8699b1; font-size: .67rem; font-weight: 720; letter-spacing: .025em; }
.en-welcome-copy { max-width: 790px; margin: 0 auto; }
.en-welcome-eyebrow {
  margin: 0 0 13px;
  color: #9db0c8;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.en-welcome-copy h1 {
  margin: 0;
  font-size: clamp(3.35rem, 7.4vw, 6.7rem);
  line-height: .9;
  letter-spacing: -.067em;
  font-weight: 930;
}
.en-welcome-copy h1 span { color: #a8c8f4; }
.en-welcome-intro {
  max-width: 660px;
  margin: 24px auto 0;
  color: #9eb0c5;
  font-size: clamp(.96rem, 1.4vw, 1.08rem);
  line-height: 1.68;
}
.en-welcome-primary { margin-top: 31px; min-width: 226px; }
.en-welcome-explore {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 720px;
  margin: clamp(48px, 6vw, 66px) auto 0;
  text-align: left;
}
.en-welcome-resource {
  min-width: 0;
  min-height: 84px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid rgba(255,255,255,.095);
  border-radius: 17px;
  background: rgba(255,255,255,.035);
  color: #edf5ff;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
a.en-welcome-resource:hover {
  transform: translateY(-2px);
  border-color: rgba(123,194,255,.3);
  background: rgba(78,161,255,.07);
}
.en-welcome-resource-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(78,161,255,.1);
  color: #a9d2ff;
  font-size: 1rem;
  font-weight: 900;
}
.en-welcome-resource-copy { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.en-welcome-resource-copy strong { font-size: .87rem; font-weight: 880; }
.en-welcome-resource-copy small { color: #8fa1b7; font-size: .7rem; line-height: 1.35; }
.en-welcome-resource-arrow { color: #8abfee; font-size: 1.08rem; }
.en-welcome-resource.is-coming-soon { grid-template-columns: 38px minmax(0, 1fr); opacity: .72; }
.en-welcome-resource-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.en-welcome-resource-title em {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  color: #a8b8ca;
  font-size: .57rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.en-welcome-footer { color: #72849a; }

@media (max-width: 760px) {
  .en-welcome-home-main {
    min-height: auto;
    padding-top: 38px;
    padding-bottom: 54px;
  }
  .en-welcome-brand { margin-bottom: 36px; }
  .en-welcome-copy h1 { font-size: clamp(3rem, 16.5vw, 4.6rem); }
  .en-welcome-intro { margin-top: 20px; font-size: .94rem; }
  .en-welcome-primary { width: 100%; margin-top: 27px; }
  .en-welcome-explore { grid-template-columns: 1fr; margin-top: 42px; }
  .en-welcome-resource { min-height: 78px; }
}

@media (max-height: 700px) and (min-width: 761px) {
  .en-welcome-home-main { align-items: flex-start; min-height: auto; padding-top: 38px; }
  .en-welcome-brand { margin-bottom: 28px; }
  .en-welcome-copy h1 { font-size: clamp(3.1rem, 7vw, 5.4rem); }
  .en-welcome-explore { margin-top: 38px; }
}


/* v0.1.9 race finder + permanent election archive */
.en-topbar-link {
  color: #b9c9dc;
  text-decoration: none;
  font-size: .78rem;
  font-weight: 820;
  white-space: nowrap;
}
.en-topbar-link:hover { color: #fff; }

.en-race-finder {
  margin: 26px 0 20px;
  padding: 20px;
  border: 1px solid var(--en-line);
  border-radius: 20px;
  background: linear-gradient(150deg, rgba(16,29,49,.88), rgba(10,22,40,.78));
  box-shadow: 0 12px 34px rgba(0,0,0,.16);
}
.en-race-finder-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 15px;
}
.en-race-finder-label,
.en-archive-eyebrow {
  color: #9eb2ca;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.en-race-finder h2 { margin: 5px 0 3px; font-size: 1.18rem; letter-spacing: -.025em; }
.en-race-finder p { margin: 0; color: var(--en-muted); font-size: .78rem; }
.en-race-finder-search { min-width: min(420px, 46%); }
.en-race-finder .en-filter-group { gap: 7px; }
.en-race-finder .en-filter-btn { padding: 8px 12px; border-radius: 999px; font-size: .76rem; }

.en-min-home-secondary {
  display: inline-block;
  margin-top: 16px;
  color: #aabbd0;
  text-decoration: none;
  font-size: .8rem;
  font-weight: 800;
}
.en-min-home-secondary:hover { color: #fff; }

.en-archive-main {
  width: min(calc(100% - 36px), var(--en-max));
  margin: 0 auto;
  padding: 38px 0 80px;
}
.en-archive-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
  padding: 34px;
  border: 1px solid var(--en-line);
  border-radius: 28px;
  background: linear-gradient(155deg, rgba(18,33,58,.96), rgba(10,22,40,.94));
  box-shadow: var(--en-shadow);
}
.en-archive-hero::after {
  content: "";
  position: absolute;
  right: -160px;
  top: -220px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(78,161,255,.2), transparent 68%);
  pointer-events: none;
}
.en-archive-hero-compact { max-width: 980px; margin-left: auto; margin-right: auto; text-align: center; }
.en-archive-hero h1 {
  position: relative;
  z-index: 1;
  margin: 10px 0 8px;
  font-size: clamp(2.2rem, 5vw, 4.7rem);
  line-height: .98;
  letter-spacing: -.055em;
}
.en-archive-hero p { position: relative; z-index: 1; margin: 0; color: var(--en-muted); font-size: .95rem; }
.en-archive-eyebrow { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; }
.en-archive-hero-compact .en-archive-eyebrow { justify-content: center; }
.en-archive-back {
  position: relative;
  z-index: 2;
  display: inline-block;
  margin-bottom: 20px;
  color: var(--en-accent-2);
  text-decoration: none;
  font-size: .8rem;
  font-weight: 850;
}
.en-archive-meta { position: relative; z-index: 1; margin-top: 14px; color: #8296ae; font-size: .72rem; }
.en-archive-section-head { margin-top: 0; }
.en-archive-list { display: grid; gap: 14px; max-width: 1080px; margin: 0 auto; }
.en-archive-list-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 24px 26px;
  border: 1px solid var(--en-line);
  border-radius: 20px;
  background: linear-gradient(155deg, rgba(18,33,58,.9), rgba(10,22,40,.86));
  box-shadow: 0 14px 44px rgba(0,0,0,.18);
  color: inherit;
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease;
}
.en-archive-list-card:hover { transform: translateY(-2px); border-color: var(--en-line-strong); }
.en-archive-list-card h2 { margin: 9px 0 4px; font-size: 1.2rem; letter-spacing: -.025em; }
.en-archive-list-card p { margin: 0; color: var(--en-muted); font-size: .78rem; }
.en-archive-list-stats { display: flex; align-items: center; gap: 26px; color: var(--en-muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; }
.en-archive-list-stats span { display: flex; flex-direction: column; gap: 3px; }
.en-archive-list-stats strong { color: #fff; font-size: 1.15rem; letter-spacing: -.03em; }
.en-archive-list-arrow { color: var(--en-accent-2); font-size: 1.5rem; }
.en-archive-empty { max-width: 980px; margin: 0 auto; }
.en-archive-race-card { transform: none !important; }
.en-archive-race-card .en-candidate-row.is-winner { background: linear-gradient(90deg, rgba(71,215,161,.08), transparent 80%); }
.en-archive-race-card .en-candidate-name-line .en-badge { margin-left: 4px; }

@media (max-width: 900px) {
  .en-race-finder-head { align-items: stretch; flex-direction: column; gap: 14px; }
  .en-race-finder-search { min-width: 100%; margin-left: 0; }
  .en-archive-list-card { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 760px) {
  .en-topbar-link { font-size: .69rem; }
  .en-topbar-inner { gap: 10px; }
  .en-race-finder { padding: 16px; border-radius: 17px; }
  .en-race-finder .en-filter-group { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; scrollbar-width: none; }
  .en-race-finder .en-filter-group::-webkit-scrollbar { display: none; }
  .en-race-finder .en-filter-btn { flex: 0 0 auto; }
  .en-archive-main { width: min(calc(100% - 24px), var(--en-max)); padding-top: 22px; }
  .en-archive-hero { padding: 25px 21px; border-radius: 22px; }
  .en-archive-hero-compact { text-align: left; }
  .en-archive-hero-compact .en-archive-eyebrow { justify-content: flex-start; }
  .en-archive-list-card { padding: 20px; }
  .en-archive-list-stats { width: 100%; justify-content: space-between; gap: 14px; }
  .en-archive-race-grid { grid-template-columns: 1fr; }
}

/* v0.1.10: full Texas/district result + Bexar County comparison */
.en-badge-scope {
  border-color: rgba(123,194,255,.34);
  background: rgba(78,161,255,.09);
  color: #d9ecff;
}
.en-race-card.is-combined-scope .en-race-card-head {
  background: linear-gradient(180deg, rgba(78,161,255,.035), transparent 76%);
}
.en-bexar-comparison {
  margin: 0 14px 14px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px;
  background: rgba(6,16,31,.46);
  overflow: hidden;
}
.en-comparison-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.en-comparison-kicker {
  display: block;
  color: #8ea5c0;
  font-size: .61rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.en-comparison-head h4 {
  margin: 0;
  font-size: .95rem;
  letter-spacing: -.02em;
}
.en-comparison-report {
  color: #a9bbd0;
  font-size: .7rem;
  font-weight: 800;
  white-space: nowrap;
}
.en-comparison-rows { padding: 4px 12px 7px; }
.en-comparison-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto 58px;
  align-items: center;
  gap: 10px;
  padding: 9px 4px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  font-size: .75rem;
}
.en-comparison-row:last-child { border-bottom: 0; }
.en-comparison-row > span:first-child {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #e7eff9;
  font-weight: 780;
}
.en-comparison-row > span:nth-child(2) { color: var(--en-muted); font-variant-numeric: tabular-nums; }
.en-comparison-row > strong { text-align: right; font-size: .82rem; font-variant-numeric: tabular-nums; }
.en-comparison-empty {
  padding: 13px 16px 15px;
  color: var(--en-muted);
  font-size: .75rem;
}
.en-bexar-comparison.is-waiting .en-comparison-head { border-bottom: 0; padding-bottom: 4px; }
.en-modal-panel .en-bexar-comparison { margin-top: 16px; margin-left: 0; margin-right: 0; }

@media (max-width: 760px) {
  .en-bexar-comparison { margin: 0 8px 10px; border-radius: 14px; }
  .en-comparison-head { align-items: flex-start; padding: 12px 12px 10px; }
  .en-comparison-head h4 { font-size: .9rem; }
  .en-comparison-report { font-size: .64rem; }
  .en-comparison-rows { padding: 3px 8px 6px; }
  .en-comparison-row { grid-template-columns: minmax(0,1fr) 54px; gap: 8px; }
  .en-comparison-row > span:nth-child(2) { display: none; }
}


/* v0.1.11: compact results density + editorial masthead + 210Election mark */
.en-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: transparent;
  box-shadow: 0 8px 24px rgba(58, 105, 255, .25);
  overflow: hidden;
  flex: 0 0 auto;
}
.en-brand-mark-image { display: block; width: 100%; height: 100%; }

.en-main { padding-top: 26px; }
.en-results-masthead {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(430px, .7fr);
  gap: 30px;
  align-items: end;
  margin: 0 0 18px;
  padding: 4px 2px 18px;
  border-bottom: 1px solid var(--en-line);
}
.en-masthead-copy { min-width: 0; }
.en-results-masthead .en-hero-title {
  margin: 8px 0 5px;
  max-width: none;
  font-size: clamp(2.1rem, 3.6vw, 3.7rem);
  line-height: 1;
}
.en-results-masthead .en-hero-subtitle {
  max-width: 820px;
  font-size: .92rem;
  line-height: 1.45;
}
.en-masthead-progress { margin-top: 15px; max-width: 860px; }
.en-masthead-progress .en-progress-copy { margin-bottom: 6px; }
.en-masthead-progress .en-progress-number { font-size: 1.08rem; }
.en-masthead-progress .en-progress-track { height: 7px; }
.en-masthead-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.en-masthead-stats .en-stat {
  min-height: 68px;
  padding: 11px 13px;
  border-radius: 14px;
  background: rgba(255,255,255,.028);
}
.en-masthead-stats .en-stat-label { font-size: .65rem; }
.en-masthead-stats .en-stat-value { font-size: 1.25rem; margin-top: 5px; }
.en-masthead-stats .en-stat-value-time { font-size: .88rem; letter-spacing: -.02em; }

.en-race-grid { gap: 16px; }
.en-race-card-head { padding: 15px 18px 12px; }
.en-race-kicker { gap: 6px; margin-bottom: 6px; min-height: 22px; }
.en-badge { min-height: 22px; padding: 4px 7px; font-size: .62rem; }
.en-race-title { font-size: 1.16rem; line-height: 1.2; }
.en-race-meta { margin-top: 5px; font-size: .73rem; }
.en-race-progress { margin-top: 10px; }
.en-race-progress .en-progress-track { height: 5px; }
.en-race-progress-line { margin-bottom: 5px; font-size: .69rem; }
.en-candidates { padding: 5px 10px 9px; }
.en-candidate-row {
  grid-template-columns: 52px minmax(0,1fr) auto;
  gap: 11px;
  padding: 9px 7px;
}
.en-candidate-photo,
.en-candidate-placeholder { width: 52px; height: 60px; border-radius: 12px; }
.en-candidate-placeholder { font-size: .92rem; }
.en-candidate-name { font-size: .95rem; }
.en-vote-total { margin-top: 4px; font-size: .73rem; }
.en-candidate-percent { font-size: 1.42rem; min-width: 66px; }
.en-projected-hero {
  grid-template-columns: 88px minmax(0,1fr) auto;
  gap: 14px;
  margin: 10px 10px 0;
  padding: 12px;
  border-radius: 16px;
}
.en-projected-hero .en-candidate-photo,
.en-projected-hero .en-candidate-placeholder { width: 88px; height: 98px; border-radius: 15px; }
.en-projected-name { font-size: 1.3rem; }
.en-projected-votes { margin-top: 5px; font-size: .76rem; }
.en-projected-percent { font-size: 1.85rem; }
.en-card-footer { padding: 7px 14px 10px; }
.en-details-btn { padding: 4px 2px; font-size: .75rem; }

.en-bexar-comparison { margin: 0 10px 10px; border-radius: 14px; }
.en-comparison-head { gap: 12px; padding: 9px 12px 8px; }
.en-comparison-kicker { font-size: .57rem; margin-bottom: 2px; }
.en-comparison-head h4 { font-size: .86rem; }
.en-comparison-report { font-size: .66rem; }
.en-comparison-rows { padding: 2px 9px 5px; }
.en-comparison-row { gap: 8px; padding: 6px 3px; font-size: .71rem; }
.en-comparison-row > strong { font-size: .77rem; }
.en-comparison-empty { padding: 6px 12px 10px; font-size: .71rem; }
.en-bexar-comparison.is-waiting .en-comparison-head { padding-bottom: 3px; }

.en-skeleton-card { height: 330px; }

@media (max-width: 1040px) {
  .en-results-masthead { grid-template-columns: 1fr; gap: 16px; }
  .en-masthead-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .en-brand-mark { width: 38px; height: 38px; }
  .en-main { padding-top: 16px; }
  .en-results-masthead { gap: 14px; padding: 2px 0 15px; }
  .en-results-masthead .en-hero-title { font-size: clamp(1.9rem, 9.5vw, 2.8rem); margin-top: 7px; }
  .en-results-masthead .en-hero-subtitle { font-size: .86rem; }
  .en-masthead-progress { margin-top: 13px; }
  .en-masthead-stats { grid-template-columns: 1fr 1fr; gap: 7px; }
  .en-masthead-stats .en-stat { min-height: 60px; padding: 9px 11px; }
  .en-masthead-stats .en-stat-value { font-size: 1.12rem; }
  .en-race-card-head { padding: 14px 14px 11px; }
  .en-candidates { padding: 4px 7px 8px; }
  .en-candidate-row { grid-template-columns: 48px minmax(0,1fr) auto; gap: 9px; padding: 8px 5px; }
  .en-candidate-photo, .en-candidate-placeholder { width: 48px; height: 56px; border-radius: 11px; }
  .en-candidate-percent { font-size: 1.24rem; min-width: 58px; }
  .en-projected-hero { grid-template-columns: 74px minmax(0,1fr); margin: 8px 7px 0; padding: 10px; gap: 11px; }
  .en-projected-hero .en-candidate-photo, .en-projected-hero .en-candidate-placeholder { width: 74px; height: 84px; border-radius: 13px; }
  .en-bexar-comparison { margin: 0 7px 8px; }
  .en-comparison-head { padding: 8px 10px 7px; }
  .en-comparison-empty { padding: 5px 10px 8px; }
}
@media (max-width: 420px) {
  .en-candidate-row { grid-template-columns: 46px minmax(0,1fr) 54px; }
  .en-candidate-photo, .en-candidate-placeholder { width: 46px; height: 54px; }
}


/* v0.1.12 public simulated election-night demo */
.en-demo-page .en-demo-chip {
  border-color: rgba(255,191,89,.38);
  background: rgba(255,191,89,.10);
  color: #ffe2a8;
}
.en-demo-page .en-demo-chip .en-live-dot { background: var(--en-warn); box-shadow: 0 0 0 5px rgba(255,191,89,.12); }
.en-demo-banner {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(255,191,89,.30);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,191,89,.12), rgba(255,255,255,.035));
  color: #f8fbff;
}
.en-demo-banner-badge {
  flex: 0 0 auto;
  padding: 7px 9px;
  border-radius: 9px;
  background: rgba(255,191,89,.18);
  color: #ffe0a0;
  font-size: .68rem;
  font-weight: 950;
  letter-spacing: .09em;
}
.en-demo-banner strong, .en-demo-banner span { display: block; }
.en-demo-banner strong { font-size: .9rem; }
.en-demo-banner span { margin-top: 3px; color: #c5d0de; font-size: .78rem; line-height: 1.45; }
.en-status-banner.is-demo-status { border-color: rgba(255,191,89,.25); background: rgba(255,191,89,.075); }
.en-demo-page .en-footer { color: #c9b989; }
@media (max-width: 680px) {
  .en-demo-banner { align-items: flex-start; flex-direction: column; gap: 9px; }
}

/* v0.1.13: projected-winner checkmark + clearer modal source breakdown */
.en-projected-hero {
  grid-template-columns: 88px minmax(0,1fr) 50px auto;
}
.en-projected-check {
  width:46px;
  height:46px;
  border-radius:50%;
  display:grid;
  place-items:center;
  justify-self:center;
  background:rgba(71,215,161,.16);
  border:2px solid rgba(71,215,161,.78);
  color:#72efc2;
  font-size:1.8rem;
  font-weight:950;
  line-height:1;
  box-shadow:0 8px 30px rgba(31,178,128,.18);
}
.en-bexar-comparison.is-detail-comparison {
  margin-top:18px;
  border-color:rgba(78,161,255,.20);
  background:rgba(8,22,42,.72);
}
.en-bexar-comparison.is-detail-comparison .en-comparison-head {
  padding:13px 15px 11px;
}
.en-bexar-comparison.is-detail-comparison .en-comparison-detail-candidates {
  padding:5px 10px 10px;
}
.en-bexar-comparison.is-detail-comparison .en-detail-breakdown span {
  background:rgba(78,161,255,.055);
}

@media (max-width:760px) {
  .en-projected-hero {
    grid-template-columns:74px minmax(0,1fr) 42px;
  }
  .en-projected-hero .en-candidate-photo,
  .en-projected-hero .en-candidate-placeholder { grid-column:1; grid-row:1 / 3; }
  .en-projected-hero > div:nth-child(2) { grid-column:2; grid-row:1; }
  .en-projected-check { grid-column:3; grid-row:1; width:40px; height:40px; font-size:1.5rem; }
  .en-projected-percent { grid-column:2 / 4; grid-row:2; font-size:1.7rem; text-align:right; margin-top:-4px; }
  .en-bexar-comparison.is-detail-comparison .en-comparison-head { padding:11px 12px 9px; }
}


/* v0.1.17: alternate data-first results list view */
.en-section-tools { display:flex; align-items:center; justify-content:flex-end; gap:12px; flex-wrap:wrap; }
.en-view-switcher { display:inline-flex; align-items:center; gap:3px; padding:3px; border:1px solid var(--en-line); border-radius:11px; background:rgba(255,255,255,.025); }
.en-view-btn { appearance:none; border:0; background:transparent; color:var(--en-muted); min-height:32px; padding:6px 10px; border-radius:8px; font:inherit; font-size:.72rem; font-weight:800; cursor:pointer; }
.en-view-btn:hover { color:#fff; }
.en-view-btn.is-active { background:rgba(78,161,255,.14); color:#eaf4ff; box-shadow:inset 0 0 0 1px rgba(78,161,255,.24); }

.en-race-grid.is-list-view { display:block; }
.en-race-list-item { margin:0 0 10px; border:1px solid var(--en-line); border-radius:15px; background:rgba(255,255,255,.026); overflow:hidden; scroll-margin-top:94px; }
.en-race-list-item.is-projected { border-color:rgba(71,215,161,.36); }
.en-list-race-head { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:18px; align-items:start; padding:13px 15px 10px; border-bottom:1px solid rgba(255,255,255,.055); }
.en-list-race-copy { min-width:0; }
.en-list-badges { display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-bottom:6px; }
.en-list-race-title { margin:0; color:#f8fbff; font-size:1rem; line-height:1.25; letter-spacing:-.018em; }
.en-list-reporting { min-width:105px; text-align:right; }
.en-list-reporting span { display:block; color:var(--en-muted); font-size:.62rem; font-weight:800; text-transform:uppercase; letter-spacing:.08em; }
.en-list-reporting strong { display:block; margin-top:3px; color:#eaf4ff; font-size:.95rem; }
.en-list-reporting small { display:block; margin-top:2px; color:var(--en-muted); font-size:.62rem; }
.en-list-candidates { padding:2px 15px 4px; }
.en-list-candidate { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(110px,.7fr) 78px; gap:14px; align-items:center; min-height:43px; padding:7px 0; border-bottom:1px solid rgba(255,255,255,.045); }
.en-list-candidate:last-child { border-bottom:0; }
.en-list-candidate.is-projected { background:linear-gradient(90deg,rgba(71,215,161,.07),transparent 58%); }
.en-list-candidate-name { display:flex; align-items:center; gap:7px; min-width:0; flex-wrap:wrap; }
.en-list-candidate-name > span { color:#f5f8fd; font-size:.88rem; font-weight:820; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.en-list-candidate-name small { color:var(--en-muted); font-size:.62rem; font-weight:850; letter-spacing:.07em; }
.en-list-projected-mark { display:inline-flex; align-items:center; gap:4px; color:#9cf0c4; font-size:.62rem; font-weight:850; letter-spacing:.035em; white-space:nowrap; }
.en-list-projected-mark span { display:inline-grid; place-items:center; width:17px; height:17px; border-radius:50%; background:rgba(71,215,161,.16); color:#74e39f; font-size:.7rem; }
.en-list-votes { color:#cbd7e6; font-size:.78rem; text-align:right; }
.en-list-percent { color:#f8fbff; font-size:1rem; font-weight:900; text-align:right; font-variant-numeric:tabular-nums; }
.en-list-candidate.is-projected .en-list-percent { color:#74e39f; }
.en-list-race-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:7px 15px 9px; border-top:1px solid rgba(255,255,255,.045); color:var(--en-muted); font-size:.65rem; }
.en-list-race-footer .en-details-btn { flex:0 0 auto; }

@media (max-width:760px) {
  .en-section-head { align-items:flex-start; }
  .en-section-tools { flex-direction:column; align-items:flex-end; gap:7px; }
  .en-view-btn { min-height:30px; padding:5px 8px; font-size:.68rem; }
  .en-list-race-head { grid-template-columns:minmax(0,1fr) auto; gap:10px; padding:11px 12px 9px; }
  .en-list-race-title { font-size:.94rem; }
  .en-list-reporting { min-width:76px; }
  .en-list-reporting small { display:none; }
  .en-list-candidates { padding:1px 12px 3px; }
  .en-list-candidate { grid-template-columns:minmax(0,1fr) 92px 58px; gap:8px; min-height:40px; padding:7px 0; }
  .en-list-candidate-name > span { font-size:.83rem; }
  .en-list-votes { font-size:.7rem; }
  .en-list-percent { font-size:.9rem; }
  .en-list-projected-mark { width:100%; }
  .en-list-race-footer { padding:6px 12px 8px; }
}

@media (max-width:480px) {
  .en-section-head { gap:10px; }
  .en-section-tools { gap:5px; }
  .en-section-count { font-size:.72rem; }
  .en-view-switcher { padding:2px; }
  .en-view-btn { min-height:28px; padding:4px 7px; }
  .en-list-race-head { grid-template-columns:1fr; }
  .en-list-reporting { display:flex; align-items:baseline; gap:6px; text-align:left; }
  .en-list-reporting span, .en-list-reporting strong { display:inline; }
  .en-list-candidate { grid-template-columns:minmax(0,1fr) 58px; gap:8px; }
  .en-list-votes { grid-column:1; text-align:left; margin-top:-4px; }
  .en-list-percent { grid-column:2; grid-row:1 / span 2; align-self:center; }
  .en-list-race-footer > span { display:none; }
  .en-list-race-footer { justify-content:flex-end; }
}

/* v0.1.18: live election reports, historical trends, and latest-update deltas */
.en-page-tabs {
  display:flex;
  align-items:center;
  gap:5px;
  width:max-content;
  max-width:100%;
  margin:22px 0 6px;
  padding:4px;
  border:1px solid var(--en-line);
  border-radius:14px;
  background:rgba(255,255,255,.025);
}
.en-page-tab {
  appearance:none;
  border:0;
  min-height:38px;
  padding:8px 13px;
  border-radius:10px;
  background:transparent;
  color:var(--en-muted);
  font:inherit;
  font-size:.78rem;
  font-weight:850;
  cursor:pointer;
}
.en-page-tab:hover { color:#fff; }
.en-page-tab.is-active { color:#eef7ff; background:rgba(78,161,255,.14); box-shadow:inset 0 0 0 1px rgba(78,161,255,.24); }
.en-page-tab-icon { margin-right:4px; color:var(--en-accent-2); }
.en-page-panel[hidden] { display:none !important; }

.en-vote-delta {
  display:inline-flex;
  align-items:center;
  margin-left:7px;
  padding:2px 6px;
  border-radius:999px;
  background:rgba(71,215,161,.10);
  color:#8be9c4;
  font-size:.64rem;
  font-weight:850;
  white-space:nowrap;
  vertical-align:1px;
}
.en-vote-delta.is-compact { margin-left:6px; font-size:.6rem; }
.en-projected-votes .en-vote-delta { margin-top:5px; margin-left:0; }
.en-list-votes .en-vote-delta { display:inline-flex; }

.en-live-reports { margin-top:26px; scroll-margin-top:90px; }
.en-reports-heading {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:24px;
  margin:0 0 18px;
  padding:0 2px;
}
.en-reports-heading h2 { margin:7px 0 4px; font-size:clamp(2rem,4vw,3.4rem); letter-spacing:-.055em; }
.en-reports-heading p { margin:0; max-width:740px; color:var(--en-muted); font-size:.9rem; line-height:1.55; }
.en-reports-updated { color:#8da2ba; font-size:.72rem; font-weight:760; white-space:nowrap; }
.en-report-loading,
.en-report-waiting {
  border:1px solid var(--en-line);
  border-radius:20px;
  background:linear-gradient(150deg,rgba(16,29,49,.88),rgba(10,22,40,.78));
  box-shadow:0 12px 34px rgba(0,0,0,.16);
}
.en-report-loading { display:flex; align-items:center; gap:10px; padding:22px; color:#b9c8da; }
.en-report-waiting { display:flex; align-items:flex-start; gap:16px; padding:26px; }
.en-report-waiting-icon { display:grid; place-items:center; flex:0 0 auto; width:46px; height:46px; border-radius:14px; background:rgba(78,161,255,.12); color:var(--en-accent-2); font-size:1.35rem; }
.en-report-waiting h3 { margin:0 0 6px; font-size:1.12rem; }
.en-report-waiting p { margin:0; color:var(--en-muted); line-height:1.55; }

.en-report-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:14px; }
.en-report-metric {
  min-width:0;
  padding:17px 18px;
  border:1px solid var(--en-line);
  border-radius:17px;
  background:rgba(255,255,255,.03);
}
.en-report-metric > span { display:block; color:var(--en-muted); font-size:.66rem; font-weight:850; letter-spacing:.08em; text-transform:uppercase; }
.en-report-metric > strong { display:block; margin-top:6px; color:#f8fbff; font-size:1.55rem; letter-spacing:-.045em; }
.en-report-metric > small { display:block; margin-top:4px; color:#7f93aa; font-size:.67rem; line-height:1.35; }

.en-report-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-bottom:14px; }
.en-report-grid-trends { align-items:stretch; }
.en-report-card {
  min-width:0;
  padding:20px;
  border:1px solid var(--en-line);
  border-radius:20px;
  background:linear-gradient(150deg,rgba(17,31,53,.92),rgba(10,22,40,.86));
  box-shadow:0 14px 42px rgba(0,0,0,.17);
}
.en-report-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:16px; }
.en-report-kicker { display:block; color:#91a6bf; font-size:.64rem; font-weight:900; letter-spacing:.12em; }
.en-report-card h3 { margin:5px 0 0; font-size:1.08rem; letter-spacing:-.025em; }
.en-report-scope { color:#8195ad; font-size:.66rem; line-height:1.35; text-align:right; }
.en-report-note { margin:14px 0 0; color:#7f92a9; font-size:.68rem; line-height:1.5; }
.en-report-secondary { margin:10px 0 0; color:#a7b8cb; font-size:.72rem; }

.en-party-totals { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.en-party-total { padding:14px 15px; border:1px solid rgba(255,255,255,.07); border-radius:15px; background:rgba(255,255,255,.025); }
.en-party-total > span { display:block; font-size:.72rem; font-weight:850; }
.en-party-total > strong { display:block; margin-top:5px; font-size:1.55rem; letter-spacing:-.045em; }
.en-party-total > small { display:block; margin-top:3px; color:#8497ae; font-size:.66rem; }
.en-party-total.is-rep > span,
.en-party-total.is-rep > strong { color:#ff8b88; }
.en-party-total.is-dem > span,
.en-party-total.is-dem > strong { color:#82c2ff; }
.en-party-share { display:flex; height:12px; overflow:hidden; margin-top:14px; border-radius:999px; background:rgba(255,255,255,.06); }
.en-party-share .is-rep { background:#e96967; }
.en-party-share .is-dem { background:#4ea1ff; }
.en-party-share-labels { display:flex; justify-content:space-between; margin-top:6px; color:#aebed0; font-size:.68rem; font-weight:850; }

.en-method-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.en-method-total { padding:14px 12px; border:1px solid rgba(255,255,255,.07); border-radius:14px; background:rgba(255,255,255,.025); }
.en-method-total span { display:block; color:#98a9be; font-size:.68rem; font-weight:800; }
.en-method-total strong { display:block; margin-top:5px; font-size:1.26rem; letter-spacing:-.035em; }
.en-method-total small { display:block; margin-top:3px; color:#7bc2ff; font-size:.72rem; font-weight:850; }
.en-report-unavailable { padding:18px; border:1px dashed rgba(255,255,255,.12); border-radius:14px; background:rgba(255,255,255,.018); color:#8599b0; font-size:.75rem; line-height:1.55; }
.en-report-unavailable strong,
.en-report-unavailable span { display:block; }
.en-report-unavailable strong { color:#c9d7e7; margin-bottom:4px; }

.en-report-list { display:grid; gap:2px; }
.en-report-list-row { display:grid; grid-template-columns:28px minmax(0,1fr) auto; gap:10px; align-items:center; min-height:53px; padding:8px 2px; border-bottom:1px solid rgba(255,255,255,.055); }
.en-report-list-row:last-child { border-bottom:0; }
.en-report-rank,
.en-report-delta-icon { display:grid; place-items:center; width:26px; height:26px; border-radius:9px; background:rgba(255,255,255,.045); color:#98a9be; font-size:.72rem; font-weight:900; }
.en-report-delta-icon { color:#7be3bb; background:rgba(71,215,161,.10); }
.en-report-list-row > div:nth-child(2) { min-width:0; }
.en-report-list-row strong { display:block; color:#eef5fc; font-size:.8rem; line-height:1.3; }
.en-report-list-row small { display:block; margin-top:2px; color:#8094ab; font-size:.66rem; line-height:1.35; }
.en-report-list-value { text-align:right; }
.en-report-list-value strong { font-size:.82rem; font-variant-numeric:tabular-nums; }
.en-report-list-value.is-positive strong { color:#7be3bb; }
.en-lead-change-block { margin-top:14px; padding-top:13px; border-top:1px solid rgba(255,255,255,.07); }
.en-lead-change-block p { margin:9px 0 0; color:#dce8f5; font-size:.74rem; line-height:1.4; }
.en-lead-change-block p span { color:#8ea2b8; }

.en-report-chart { min-width:0; }
.en-trend-svg { display:block; width:100%; height:auto; max-height:210px; overflow:visible; }
.en-chart-gridline { stroke:rgba(255,255,255,.07); stroke-width:1; }
.en-chart-line { fill:none; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }
.en-chart-line.is-reporting { stroke:#7bc2ff; }
.en-chart-line.is-rep { stroke:#e96967; }
.en-chart-line.is-dem { stroke:#4ea1ff; }
.en-chart-axis { display:flex; justify-content:space-between; margin-top:-2px; color:#71859d; font-size:.62rem; }
.en-chart-legend { display:flex; gap:14px; flex-wrap:wrap; margin-top:10px; color:#8ea2b8; font-size:.68rem; font-weight:780; }
.en-chart-legend span::before { content:""; display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:6px; background:#7bc2ff; }
.en-chart-legend .is-rep::before { background:#e96967; }
.en-chart-legend .is-dem::before { background:#4ea1ff; }
.en-report-chart-empty { padding:30px 18px; color:#8094ab; text-align:center; font-size:.74rem; }

@media (max-width: 980px) {
  .en-report-metrics { grid-template-columns:1fr 1fr; }
  .en-report-grid { grid-template-columns:1fr; }
}
@media (max-width: 760px) {
  .en-topbar-link[data-page-link="reports"] { display:none; }
  .en-page-tabs { width:100%; }
  .en-page-tab { flex:1 1 0; }
  .en-reports-heading { align-items:flex-start; flex-direction:column; gap:8px; }
  .en-reports-updated { white-space:normal; }
  .en-report-metrics { gap:8px; }
  .en-report-metric { padding:14px; }
  .en-report-metric > strong { font-size:1.28rem; }
  .en-report-card { padding:16px; border-radius:17px; }
  .en-report-card-head { flex-direction:column; gap:7px; }
  .en-report-scope { text-align:left; }
  .en-party-totals { grid-template-columns:1fr 1fr; }
  .en-method-grid { grid-template-columns:1fr; }
  .en-vote-delta { display:flex; width:max-content; margin:4px 0 0; }
  .en-list-votes .en-vote-delta { margin:2px 0 0 auto; }
}
@media (max-width: 520px) {
  .en-topbar-link { display:none; }
  .en-report-metrics { grid-template-columns:1fr 1fr; }
  .en-party-totals { grid-template-columns:1fr; }
  .en-report-list-row { grid-template-columns:26px minmax(0,1fr) auto; gap:8px; }
  .en-report-list-value strong { font-size:.76rem; }
}

/* v0.1.24: compact race cards, prominent results/report navigation, lead-change alerts */
.en-race-card-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:15px 18px 8px;
  border-bottom:0;
}
.en-race-head-copy { min-width:0; }
.en-race-head-copy .en-race-kicker { margin-bottom:6px; }
.en-race-reporting {
  flex:0 0 auto;
  min-width:70px;
  padding:7px 10px;
  border:1px solid rgba(78,161,255,.20);
  border-radius:12px;
  background:rgba(78,161,255,.08);
  color:#dcecff;
  text-align:center;
  font-size:.76rem;
  font-weight:900;
  letter-spacing:-.01em;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.en-race-reporting.is-waiting {
  border-color:rgba(255,193,92,.22);
  background:rgba(255,193,92,.08);
  color:#ffe0a8;
}
.en-race-card > .en-candidates { padding-top:0; }
.en-race-card > .en-projected-hero + .en-candidates { padding-top:5px; }

.en-list-reporting {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  min-width:82px;
}
.en-list-reporting strong {
  margin-top:0;
  padding:6px 9px;
  border:1px solid rgba(78,161,255,.20);
  border-radius:10px;
  background:rgba(78,161,255,.08);
  color:#dcecff;
  font-size:.78rem;
  line-height:1;
  white-space:nowrap;
}

.en-page-tabs {
  width:100%;
  max-width:none;
  gap:8px;
  margin:24px 0 18px;
  padding:6px;
  border-radius:20px;
  background:rgba(255,255,255,.035);
  box-shadow:0 12px 34px rgba(0,0,0,.10);
}
.en-page-tab {
  flex:1 1 0;
  min-height:64px;
  padding:9px 14px;
  border:1px solid transparent;
  border-radius:15px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:11px;
  text-align:left;
}
.en-page-tab-icon {
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  margin:0;
  border-radius:11px;
  background:rgba(78,161,255,.09);
  color:#8fcbff;
  font-size:1rem;
  flex:0 0 auto;
}
.en-page-tab-copy { display:flex; flex-direction:column; min-width:0; line-height:1.12; }
.en-page-tab-copy strong { color:inherit; font-size:.92rem; font-weight:900; letter-spacing:-.015em; }
.en-page-tab-copy small { margin-top:4px; color:#8094ab; font-size:.65rem; font-weight:720; letter-spacing:0; }
.en-page-tab.is-active {
  border-color:rgba(78,161,255,.28);
  background:linear-gradient(135deg,rgba(78,161,255,.18),rgba(123,194,255,.09));
  box-shadow:inset 0 0 0 1px rgba(78,161,255,.12),0 7px 18px rgba(0,0,0,.08);
}
.en-page-tab.is-active .en-page-tab-icon { background:rgba(78,161,255,.18); color:#d9eeff; }
.en-page-tab.is-active .en-page-tab-copy small { color:#9fb5cb; }
.en-page-tab-reports:not(.is-active) { background:rgba(71,215,161,.025); }

.en-lead-change-card {
  margin-bottom:14px;
  border-color:rgba(255,191,89,.34);
  background:linear-gradient(135deg,rgba(255,191,89,.12),rgba(17,31,53,.95) 42%,rgba(10,22,40,.90));
  box-shadow:0 18px 48px rgba(113,72,13,.14);
}
.en-lead-change-card .en-report-kicker { color:#ffc76c; }
.en-lead-change-grid { display:grid; gap:10px; }
.en-lead-change-event {
  display:grid;
  grid-template-columns:42px minmax(0,1fr);
  gap:12px;
  align-items:center;
  padding:13px 14px;
  border:1px solid rgba(255,191,89,.18);
  border-radius:15px;
  background:rgba(255,191,89,.055);
}
.en-lead-change-icon {
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  border-radius:12px;
  background:rgba(255,191,89,.13);
  color:#ffd68d;
  font-size:1.15rem;
  font-weight:900;
}
.en-lead-change-copy { min-width:0; }
.en-lead-change-copy > strong { display:block; color:#fff3dd; font-size:.88rem; letter-spacing:-.015em; }
.en-lead-change-copy > span { display:block; margin-top:4px; color:#d8c7a9; font-size:.76rem; line-height:1.4; }
.en-lead-change-copy > span b { color:#ffd68d; }
.en-lead-change-copy > small { display:block; margin-top:5px; color:#a99573; font-size:.68rem; font-weight:760; }

@media (max-width:760px) {
  .en-race-card-head { padding:13px 14px 6px; gap:10px; }
  .en-race-reporting { min-width:62px; padding:6px 8px; font-size:.71rem; }
  .en-race-card > .en-candidates { padding-top:0; }
  .en-page-tabs { margin:18px 0 14px; gap:6px; padding:5px; border-radius:17px; }
  .en-page-tab { min-height:58px; padding:7px 9px; gap:8px; border-radius:13px; }
  .en-page-tab-icon { width:32px; height:32px; border-radius:10px; }
  .en-page-tab-copy strong { font-size:.84rem; }
  .en-page-tab-copy small { font-size:.59rem; }
  .en-lead-change-card { padding:15px; }
  .en-lead-change-event { grid-template-columns:36px minmax(0,1fr); padding:11px 12px; gap:10px; }
  .en-lead-change-icon { width:36px; height:36px; border-radius:10px; }
}

@media (max-width:430px) {
  .en-page-tab { justify-content:flex-start; }
  .en-page-tab-copy small { max-width:130px; }
  .en-race-reporting { min-width:auto; }
}

/* v0.1.25: button-forward primary navigation + deliberately plain technical list view */
.en-page-tab {
  border-color:rgba(255,255,255,.11);
  background:rgba(255,255,255,.045);
  box-shadow:0 5px 14px rgba(0,0,0,.08), inset 0 0 0 1px rgba(255,255,255,.015);
  cursor:pointer;
  transition:transform .16s ease,border-color .16s ease,background .16s ease,box-shadow .16s ease,color .16s ease;
}
.en-page-tab:not(.is-active):hover {
  transform:translateY(-1px);
  border-color:rgba(78,161,255,.30);
  background:rgba(78,161,255,.085);
  box-shadow:0 8px 20px rgba(0,0,0,.11), inset 0 0 0 1px rgba(78,161,255,.06);
}
.en-page-tab:not(.is-active) .en-page-tab-icon {
  border:1px solid rgba(78,161,255,.13);
  background:rgba(78,161,255,.075);
}
.en-page-tab-reports:not(.is-active) {
  border-color:rgba(71,215,161,.14);
  background:rgba(71,215,161,.045);
}
.en-page-tab-reports:not(.is-active):hover {
  border-color:rgba(71,215,161,.30);
  background:rgba(71,215,161,.085);
}

/* List View is intentionally a restrained data sheet rather than a second card design. */
.en-race-grid.is-list-view {
  display:block;
  border-top:2px solid rgba(255,255,255,.14);
  border-bottom:1px solid rgba(255,255,255,.10);
}
.en-race-grid.is-list-view .en-race-list-item {
  margin:0;
  border:0;
  border-bottom:1px solid rgba(255,255,255,.12);
  border-radius:0;
  background:transparent;
  box-shadow:none;
  overflow:visible;
}
.en-race-grid.is-list-view .en-race-list-item:last-child { border-bottom:0; }
.en-race-grid.is-list-view .en-race-list-item.is-projected { border-color:rgba(255,255,255,.12); }
.en-race-grid.is-list-view .en-list-race-head {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:18px;
  align-items:end;
  padding:17px 8px 10px;
  border-bottom:1px solid rgba(255,255,255,.08);
  background:transparent;
}
.en-race-grid.is-list-view .en-list-badges {
  gap:9px;
  margin:0 0 5px;
}
.en-race-grid.is-list-view .en-list-badges .en-badge {
  padding:0;
  border:0;
  border-radius:0;
  background:none;
  box-shadow:none;
  font-size:.59rem;
  font-weight:850;
  letter-spacing:.075em;
}
.en-race-grid.is-list-view .en-list-race-title {
  margin:0;
  color:var(--en-text);
  font-size:1rem;
  font-weight:850;
  line-height:1.25;
  letter-spacing:-.012em;
}
.en-race-grid.is-list-view .en-list-reporting {
  min-width:auto;
  justify-content:flex-end;
  text-align:right;
}
.en-race-grid.is-list-view .en-list-reporting strong {
  margin:0;
  padding:0;
  border:0;
  border-radius:0;
  background:none;
  color:var(--en-text);
  font-size:.76rem;
  font-weight:800;
  line-height:1.2;
}
.en-list-column-head {
  display:grid;
  grid-template-columns:minmax(0,1fr) 130px 72px;
  gap:14px;
  padding:7px 8px 6px;
  border-bottom:1px solid rgba(255,255,255,.07);
  color:var(--en-muted);
  font-size:.56rem;
  font-weight:850;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.en-list-column-head span:nth-child(2),
.en-list-column-head span:nth-child(3) { text-align:right; }
.en-race-grid.is-list-view .en-list-candidates { padding:0 8px; }
.en-race-grid.is-list-view .en-list-candidate {
  display:grid;
  grid-template-columns:minmax(0,1fr) 130px 72px;
  gap:14px;
  align-items:center;
  min-height:39px;
  padding:7px 0;
  border-bottom:1px solid rgba(255,255,255,.055);
  background:none;
}
.en-race-grid.is-list-view .en-list-candidate:last-child { border-bottom:0; }
.en-race-grid.is-list-view .en-list-candidate.is-projected { background:none; }
.en-race-grid.is-list-view .en-list-candidate-name {
  display:flex;
  align-items:baseline;
  gap:7px;
  min-width:0;
  flex-wrap:wrap;
}
.en-race-grid.is-list-view .en-list-candidate-name > span {
  color:var(--en-text);
  font-size:.82rem;
  font-weight:680;
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
}
.en-race-grid.is-list-view .en-list-candidate-name small {
  color:var(--en-muted);
  font-size:.58rem;
  font-weight:800;
  letter-spacing:.07em;
}
.en-race-grid.is-list-view .en-list-projected-mark {
  display:inline;
  color:var(--en-good);
  font-size:.59rem;
  font-weight:850;
  letter-spacing:.02em;
  white-space:nowrap;
}
.en-race-grid.is-list-view .en-list-votes,
.en-race-grid.is-list-view .en-list-percent {
  color:var(--en-text);
  font-size:.76rem;
  font-weight:620;
  text-align:right;
  font-variant-numeric:tabular-nums;
}
.en-race-grid.is-list-view .en-list-percent { font-weight:760; }
.en-race-grid.is-list-view .en-list-candidate.is-projected .en-list-percent { color:var(--en-text); }
.en-race-grid.is-list-view .en-list-votes .en-vote-delta {
  display:block;
  width:max-content;
  margin:2px 0 0 auto;
  font-size:.56rem;
}
.en-race-grid.is-list-view .en-list-race-footer {
  min-height:34px;
  padding:6px 8px 9px;
  border-top:1px solid rgba(255,255,255,.07);
  color:var(--en-muted);
  background:transparent;
  font-size:.60rem;
}
.en-race-grid.is-list-view .en-list-race-footer .en-details-btn {
  min-height:auto;
  padding:2px 0;
  border:0;
  background:none;
  box-shadow:none;
  color:var(--en-accent-2);
  font-size:.64rem;
  text-decoration:underline;
  text-underline-offset:2px;
}

@media (max-width:760px) {
  .en-list-column-head,
  .en-race-grid.is-list-view .en-list-candidate {
    grid-template-columns:minmax(0,1fr) 82px 54px;
    gap:8px;
  }
  .en-race-grid.is-list-view .en-list-race-head { padding:14px 4px 9px; gap:10px; }
  .en-list-column-head { padding:6px 4px; }
  .en-race-grid.is-list-view .en-list-candidates { padding:0 4px; }
  .en-race-grid.is-list-view .en-list-race-footer { padding:6px 4px 8px; }
  .en-race-grid.is-list-view .en-list-candidate-name > span { font-size:.78rem; }
  .en-race-grid.is-list-view .en-list-votes,
  .en-race-grid.is-list-view .en-list-percent { font-size:.70rem; }
}

@media (max-width:430px) {
  .en-race-grid.is-list-view .en-list-race-head { grid-template-columns:minmax(0,1fr) auto; }
  .en-race-grid.is-list-view .en-list-reporting { display:block; text-align:right; }
  .en-race-grid.is-list-view .en-list-votes { grid-column:auto; margin-top:0; text-align:right; }
  .en-race-grid.is-list-view .en-list-percent { grid-column:auto; grid-row:auto; align-self:auto; }
  .en-race-grid.is-list-view .en-list-race-footer > span { display:block; }
  .en-race-grid.is-list-view .en-list-race-footer { justify-content:space-between; }
}

/* v0.1.29: Live Reports homepage promo + List View workbook export. */
.en-welcome-reports-promo {
  max-width: 690px;
  margin: 18px auto 0;
  color: #9eb0c5;
  font-size: .86rem;
  line-height: 1.55;
  font-weight: 700;
}
.en-welcome-reports-promo::before {
  content: '↗';
  display: inline-block;
  margin-right: 7px;
  color: #74e39f;
  font-weight: 950;
}
.en-welcome-reports-promo + .en-welcome-explore {
  margin-top: clamp(34px, 4.5vw, 48px);
}
.en-export-results-btn {
  appearance: none;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid rgba(71,215,161,.28);
  border-radius: 10px;
  background: rgba(71,215,161,.075);
  color: #baf4d7;
  font: inherit;
  font-size: .72rem;
  font-weight: 850;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.en-export-results-btn[hidden] { display: none !important; }
.en-export-results-btn:hover {
  border-color: rgba(71,215,161,.48);
  background: rgba(71,215,161,.13);
  transform: translateY(-1px);
}
.en-export-results-btn > span { font-size: 1rem; line-height: 1; }

@media (max-width:760px) {
  .en-welcome-reports-promo { margin-top: 16px; font-size: .8rem; }
  .en-welcome-reports-promo + .en-welcome-explore { margin-top: 32px; }
  .en-export-results-btn { min-height: 34px; padding: 7px 10px; }
}

/* v0.1.36: keep projected winner party affiliation present at all sizes. */
.en-projected-party { display:block; margin-top:4px; color:var(--en-muted); font-size:.78rem; font-weight:750; line-height:1.4; overflow-wrap:anywhere; }
@media (max-width:520px) { .en-projected-party { font-size:.75rem; margin-top:3px; } }


/* v0.1.36: restrained public party accents for rows/cards after design discussion. */
:root {
  --en-party-rep: #e46a6a;
  --en-party-dem: #63a9ff;
  --en-party-ind: #7fd7c6;
  --en-party-other: #aeb8c7;
}
.en-candidate-row,
.en-list-candidate,
.en-projected-hero { position: relative; overflow: hidden; }
.en-candidate-row::before,
.en-list-candidate::before,
.en-projected-hero::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 999px;
  opacity: 0;
  transform: scaleY(.78);
  transform-origin: center;
  transition: opacity .18s ease, transform .18s ease;
}
.en-candidate-row.en-party-tone-rep::before,
.en-list-candidate.en-party-tone-rep::before,
.en-projected-hero.en-party-tone-rep::before { background: var(--en-party-rep); opacity: .95; transform: scaleY(1); }
.en-candidate-row.en-party-tone-dem::before,
.en-list-candidate.en-party-tone-dem::before,
.en-projected-hero.en-party-tone-dem::before { background: var(--en-party-dem); opacity: .95; transform: scaleY(1); }
.en-candidate-row.en-party-tone-ind::before,
.en-list-candidate.en-party-tone-ind::before,
.en-projected-hero.en-party-tone-ind::before { background: var(--en-party-ind); opacity: .95; transform: scaleY(1); }
.en-candidate-row.en-party-tone-other::before,
.en-list-candidate.en-party-tone-other::before,
.en-projected-hero.en-party-tone-other::before { background: var(--en-party-other); opacity: .8; transform: scaleY(1); }
.en-candidate-row.en-party-tone-rep .en-party,
.en-list-candidate.en-party-tone-rep .en-list-candidate-name small,
.en-projected-hero.en-party-tone-rep .en-projected-party { color: var(--en-party-rep); }
.en-candidate-row.en-party-tone-dem .en-party,
.en-list-candidate.en-party-tone-dem .en-list-candidate-name small,
.en-projected-hero.en-party-tone-dem .en-projected-party { color: var(--en-party-dem); }
.en-candidate-row.en-party-tone-ind .en-party,
.en-list-candidate.en-party-tone-ind .en-list-candidate-name small,
.en-projected-hero.en-party-tone-ind .en-projected-party { color: var(--en-party-ind); }
.en-candidate-row.en-party-tone-other .en-party,
.en-list-candidate.en-party-tone-other .en-list-candidate-name small,
.en-projected-hero.en-party-tone-other .en-projected-party { color: #d0d7e3; }
.en-candidate-row .en-party,
.en-list-candidate .en-list-candidate-name small,
.en-projected-party { transition: color .18s ease; }
.en-candidate-row.is-projected { background: linear-gradient(90deg, rgba(71,215,161,.07), transparent 70%); }
@media (max-width: 520px) {
  .en-candidate-row::before,
  .en-list-candidate::before,
  .en-projected-hero::before { width: 2px; }
}


/* v0.1.38 — public Results list spacing, mobile numbers and party-forward projections. */
.en-race-grid.is-list-view .en-list-candidate {
  padding-inline: 13px 8px; /* room for the 3px decorative party rail */
  min-width: 0;
}
.en-race-grid.is-list-view .en-list-candidate-name,
.en-race-grid.is-list-view .en-list-candidate-name > span { min-width: 0; }
.en-race-grid.is-list-view .en-list-candidate-name > span {
  overflow-wrap: anywhere; white-space: normal;
}
.en-race-grid.is-list-view .en-list-projected-mark { white-space: normal; }
.en-candidate-row { min-width: 0; padding-right: 12px; }
.en-candidate-row .en-candidate-main { min-width: 0; }
.en-candidate-row .en-candidate-name-line { flex-wrap: wrap; row-gap: 2px; }
.en-candidate-row .en-candidate-percent {
  min-width: 0; white-space: nowrap; justify-self: end;
  padding-right: 2px;
}
.en-projected-hero {
  --en-winner-rgb: 118, 157, 204;
  --en-winner-color: #92aed1;
  background: linear-gradient(120deg, rgba(var(--en-winner-rgb), .105), rgba(var(--en-winner-rgb), .035) 72%);
  border-color: rgba(var(--en-winner-rgb), .38);
  box-shadow: inset 0 0 0 1px rgba(var(--en-winner-rgb), .055);
}
.en-projected-hero.en-party-tone-rep { --en-winner-rgb: 228, 106, 106; --en-winner-color: #df6666; }
.en-projected-hero.en-party-tone-dem { --en-winner-rgb: 99, 169, 255; --en-winner-color: #4d91e5; }
.en-projected-hero.en-party-tone-ind { --en-winner-rgb: 127, 215, 198; --en-winner-color: #26917e; }
.en-projected-hero.en-party-tone-other { --en-winner-rgb: 158, 168, 184; --en-winner-color: #75849a; }
.en-projected-hero.en-party-tone-rep::before,
.en-projected-hero.en-party-tone-dem::before,
.en-projected-hero.en-party-tone-ind::before,
.en-projected-hero.en-party-tone-other::before { width: 5px; opacity: 1; }
.en-projected-hero .en-projected-check {
  color: var(--en-winner-color);
  border-color: rgba(var(--en-winner-rgb), .8);
  background: rgba(var(--en-winner-rgb), .12);
  box-shadow: 0 7px 22px rgba(var(--en-winner-rgb), .10);
}
/* The projection remains a status, not an endorsement; use neutral status type. */
.en-projected-hero .en-projected-label { color: var(--en-text); }
.en-projected-hero .en-projected-percent { white-space: nowrap; min-width: 0; }
@media (max-width: 760px) {
  .en-candidate-row {
    grid-template-columns: 48px minmax(0,1fr) minmax(76px,max-content);
    column-gap: 8px; padding-left: 7px; padding-right: 8px;
  }
  .en-candidate-row .en-candidate-name { white-space: normal; overflow-wrap: anywhere; }
  .en-candidate-row .en-candidate-percent { font-size: clamp(1.01rem,4.35vw,1.24rem); letter-spacing: -.045em; }
  .en-race-grid.is-list-view .en-list-candidate { padding-inline: 12px 5px; }
}
@media (max-width: 390px) {
  .en-candidate-row {
    grid-template-columns: 42px minmax(0,1fr) minmax(70px,max-content);
    gap: 6px; padding-left: 6px; padding-right: 7px;
  }
  .en-candidate-row .en-candidate-photo,
  .en-candidate-row .en-candidate-placeholder { width: 42px; height: 50px; }
  .en-candidate-row .en-candidate-percent { font-size: 1.05rem; }
}
/* readable on both Appearance modes: party labels remain colored, without light-mode green overlay */
body.en-light .en-projected-hero, body[data-appearance="light"] .en-projected-hero {
  background: linear-gradient(120deg, rgba(var(--en-winner-rgb),.09), rgba(var(--en-winner-rgb),.025));
}

.en-source-freshness { padding: 0 2px 16px; color: var(--en-muted); font-size: .72rem; line-height: 1.5; }
.en-source-freshness[hidden] { display: none !important; }
.en-source-freshness.is-delayed { color: #c7812d; }
html[data-en-theme="dark"] .en-source-freshness.is-delayed { color: #ffd28d; }

/* Winner status stays clear while the card's main highlight reflects affiliation. */
.en-race-card.is-projected.en-party-tone-rep { border-color: rgba(228,106,106,.38); }
.en-race-card.is-projected.en-party-tone-dem { border-color: rgba(99,169,255,.38); }
.en-race-card.is-projected.en-party-tone-ind { border-color: rgba(127,215,198,.38); }
.en-race-card.is-projected.en-party-tone-other { border-color: rgba(158,168,184,.33); }
/* Election projected status chips inherit the called candidate's party tone, not green. */
.en-race-card.is-projected.en-party-tone-rep .en-badge-projected,
.en-race-grid.is-list-view .en-race-list-item.is-projected.en-party-tone-rep .en-badge-projected {
  color: #ed9393; border-color: rgba(228,106,106,.42); background: rgba(228,106,106,.11);
}
.en-race-card.is-projected.en-party-tone-dem .en-badge-projected,
.en-race-grid.is-list-view .en-race-list-item.is-projected.en-party-tone-dem .en-badge-projected {
  color: #8bc3ff; border-color: rgba(99,169,255,.42); background: rgba(99,169,255,.10);
}
.en-race-card.is-projected.en-party-tone-ind .en-badge-projected,
.en-race-grid.is-list-view .en-race-list-item.is-projected.en-party-tone-ind .en-badge-projected {
  color: #a3d8d1; border-color: rgba(127,215,198,.42); background: rgba(127,215,198,.10);
}
.en-race-card.is-projected.en-party-tone-other .en-badge-projected,
.en-race-grid.is-list-view .en-race-list-item.is-projected.en-party-tone-other .en-badge-projected {
  color: #cad3df; border-color: rgba(158,168,184,.35); background: rgba(158,168,184,.08);
}
.en-race-grid.is-list-view .en-race-list-item.is-projected.en-party-tone-rep .en-list-projected-mark { color: var(--en-party-rep); }
.en-race-grid.is-list-view .en-race-list-item.is-projected.en-party-tone-dem .en-list-projected-mark { color: var(--en-party-dem); }
.en-race-grid.is-list-view .en-race-list-item.is-projected.en-party-tone-ind .en-list-projected-mark { color: var(--en-party-ind); }
.en-race-grid.is-list-view .en-race-list-item.is-projected.en-party-tone-other .en-list-projected-mark { color: var(--en-party-other); }


/* v0.1.41 TEST CANDIDATE — operator-only desktop snapshot actions. */
.en-race-head-tools { display:flex; flex:0 0 auto; justify-content:flex-end; align-items:flex-start; gap:8px; }
.en-snapshot-trigger { display:none; }
@media (min-width:1025px) and (hover:hover) and (pointer:fine) {
  .en-snapshot-trigger {
    display:inline-flex; align-items:center; justify-content:center; min-height:33px;
    padding:7px 10px; border:1px solid var(--en-line-strong); border-radius:10px;
    font:inherit; font-size:.69rem; font-weight:850; line-height:1.1;
    background:var(--en-panel-soft); color:var(--en-accent-2); cursor:pointer;
    white-space:nowrap; transition:background .15s ease,border-color .15s ease;
  }
  .en-snapshot-trigger:hover,.en-snapshot-trigger:focus-visible {
    border-color:var(--en-accent); background:var(--en-panel); outline-offset:2px;
  }
}
.en-snapshot-modal { position:fixed; inset:0; z-index:9999; display:none; padding:22px;
  background:rgba(4,13,27,.80); align-items:center; justify-content:center; }
.en-snapshot-modal.is-open { display:flex; }
.en-snapshot-dialog { box-sizing:border-box; width:min(660px,100%); max-height:calc(100vh - 44px);
  overflow:auto; border:1px solid var(--en-line-strong); border-radius:20px;
  box-shadow:0 24px 90px rgba(0,0,0,.35); background:var(--en-panel-strong);
  color:var(--en-text); padding:20px; }
.en-snapshot-dialog-head { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:12px; }
.en-snapshot-dialog h2 { margin:0; font-size:1.15rem; }
.en-snapshot-close { background:transparent; border:1px solid var(--en-line); border-radius:10px;
  color:var(--en-text); cursor:pointer; width:34px; height:34px; font-size:1.3rem; }
.en-snapshot-message { margin:8px 0 14px; color:var(--en-muted); font-size:.82rem; line-height:1.5; }
.en-snapshot-preview { display:block; width:100%; max-width:460px; max-height:48vh; object-fit:contain;
  margin:0 auto 16px; border-radius:12px; border:1px solid var(--en-line); }
.en-snapshot-preview[hidden],.en-snapshot-actions[hidden] { display:none !important; }
.en-snapshot-actions { display:flex; flex-wrap:wrap; gap:9px; }
.en-snapshot-actions button,.en-snapshot-actions a { display:inline-flex; align-items:center; justify-content:center;
  box-sizing:border-box; padding:11px 15px; min-height:40px; border-radius:10px;
  background:var(--en-accent); color:#fff; border:1px solid var(--en-accent); font:inherit;
  font-size:.78rem; font-weight:850; text-decoration:none; cursor:pointer; }
.en-snapshot-actions a { background:var(--en-panel-soft); color:var(--en-accent-2); border-color:var(--en-line-strong); }
.en-snapshot-actions button:disabled { opacity:.56; cursor:default; }
@media (max-width:1024px), (hover:none), (pointer:coarse) {
  .en-race-card .en-snapshot-trigger { display:none !important; }
}


.en-badge-too-early { border-color: rgba(255,196,92,.34); background: rgba(255,196,92,.10); color: #ffd991; }
.en-badge-too-close { border-color: rgba(245,154,93,.34); background: rgba(245,154,93,.10); color: #ffd0b1; }
.en-race-card.is-too-early,
.en-race-grid.is-list-view .en-race-list-item.is-too-early { border-color: rgba(255,196,92,.34); }
.en-race-card.is-too-close,
.en-race-grid.is-list-view .en-race-list-item.is-too-close { border-color: rgba(245,154,93,.34); }


/* v0.1.47 TEST CANDIDATE — prominent centered race-call banners on card view. */
.en-race-call-banner {
  margin: 12px 14px 0;
  padding: 9px 14px;
  border-radius: 999px;
  text-align: center;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
  border: 1px solid var(--en-line);
  background: rgba(255,255,255,.035);
  color: #dce7f7;
}
.en-race-call-banner.is-too-early {
  border-color: rgba(255,191,76,.72);
  background: rgba(255,191,76,.22);
  color: #ffe8b0;
}
.en-race-call-banner.is-too-close {
  border-color: rgba(245,144,76,.70);
  background: rgba(245,144,76,.22);
  color: #ffdbc5;
}
.en-race-call-banner.is-projected {
  border-color: rgba(71,215,161,.40);
  background: rgba(71,215,161,.12);
  color: #c8f7e7;
}
.en-race-call-banner.is-projected.en-party-tone-rep {
  border-color: rgba(228,106,106,.65);
  background: rgba(228,106,106,.20);
  color: #ffd0d0;
}
.en-race-call-banner.is-projected.en-party-tone-dem {
  border-color: rgba(99,169,255,.65);
  background: rgba(99,169,255,.20);
  color: #d0e8ff;
}
.en-race-call-banner.is-projected.en-party-tone-ind {
  border-color: rgba(127,215,198,.65);
  background: rgba(127,215,198,.19);
  color: #dbfff7;
}
.en-race-call-banner.is-projected.en-party-tone-other {
  border-color: rgba(158,168,184,.57);
  background: rgba(158,168,184,.19);
  color: #f1f5fb;
}
.en-race-card > .en-race-call-banner + .en-projected-hero { margin-top: 12px; }
.en-race-card > .en-race-call-banner + .en-candidates { padding-top: 12px; }
html[data-en-theme="light"] .en-race-call-banner {
  background: #eaf3fc;
  color: #173b60;
}
html[data-en-theme="light"] .en-race-call-banner.is-too-early {
  border-color: #dca23b;
  background: #fff0bf;
  color: #765000;
}
html[data-en-theme="light"] .en-race-call-banner.is-too-close {
  border-color: #e9925e;
  background: #ffe0ce;
  color: #913a13;
}
html[data-en-theme="light"] .en-race-call-banner.is-projected {
  border-color: #5eb99d;
  background: #d9f4ea;
  color: #14634e;
}
html[data-en-theme="light"] .en-race-call-banner.is-projected.en-party-tone-rep {
  border-color: #db868a;
  background: #ffe0e0;
  color: #982a34;
}
html[data-en-theme="light"] .en-race-call-banner.is-projected.en-party-tone-dem {
  border-color: #76b0ee;
  background: #dcecff;
  color: #18558e;
}
html[data-en-theme="light"] .en-race-call-banner.is-projected.en-party-tone-ind {
  border-color: #77c2b7;
  background: #daf7ee;
  color: #206c5f;
}
html[data-en-theme="light"] .en-race-call-banner.is-projected.en-party-tone-other {
  border-color: #9eabbd;
  background: #e9eef5;
  color: #485970;
}
@media (max-width: 900px) {
  .en-race-call-banner { margin: 10px 8px 0; padding: 8px 12px; font-size: .72rem; }
}
@media (max-width: 640px) {
  .en-race-call-banner { margin: 8px 7px 0; padding: 7px 10px; font-size: .69rem; }
}

/* v0.1.48 archived presentation — frozen Card/List views, never live-refreshed. */
.en-archive-race-grid:not(.is-list-view) > .en-archive-list-item { display: none !important; }
.en-archive-race-grid.is-list-view > .en-archive-race-card { display: none !important; }
.en-archive-race-grid.is-list-view > .en-archive-list-item { display: block; }
.en-archive-race-grid .en-archive-race-card { transform: none !important; }
.en-archive-race-grid .en-archive-race-card:hover { transform:none; }
.en-archive-race-grid .en-archive-race-card.is-projected { box-shadow: 0 12px 38px rgba(16,96,78,.13); }
.en-archive-race-grid .en-candidate-row.en-party-tone-rep::before,
.en-archive-race-grid .en-candidate-row.en-party-tone-dem::before,
.en-archive-race-grid .en-candidate-row.en-party-tone-ind::before,
.en-archive-race-grid .en-candidate-row.en-party-tone-other::before { transform: scaleY(1); }
.en-archive-race-grid .en-race-reporting.is-waiting { font-size:.66rem; white-space:normal; max-width:118px; text-align:center; }
.en-archive-race-grid .en-archive-list-item .en-bexar-comparison { margin:8px 6px 13px; }
.en-archive-race-grid .en-archive-list-item .en-list-reporting strong { white-space:normal; }
.en-archive-race-grid .en-list-race-title { color:var(--en-text); }
.en-archive-hero .en-archive-frozen-note { position:relative; z-index:1; margin-top:8px; font-size:.76rem; color:var(--en-muted); }
.en-archive-hero .en-archive-meta { margin-top:7px; }
.en-archive-race-grid .en-archive-race-card .en-projected-party { font-weight:850; }
.en-archive-race-grid .en-archive-race-card.is-combined-scope .en-comparison-report { white-space:normal; text-align:right; }
@media (max-width:760px) {
  .en-archive-race-grid { grid-template-columns:1fr; }
  .en-archive-race-grid .en-archive-list-item .en-bexar-comparison { margin:5px 0 10px; }
}

.en-archive-race-grid .en-archive-list-item .en-list-reporting { display:flex; flex-direction:column; align-items:flex-end; gap:4px; }
.en-archive-race-grid .en-archive-list-item .en-list-reporting span { display:block; }
.en-archive-race-grid .en-archive-list-item .en-list-reporting strong { display:block; text-align:right; line-height:1.3; }
@media (max-width:430px) { .en-archive-race-grid .en-archive-list-item .en-list-reporting strong { font-size:.64rem; } }

/* v0.1.53: clear report disclaimer; v0.1.54: homepage sidebar credits. */
.en-report-kicker-aside { color:#c6d4e5; font-weight:750; letter-spacing:0; text-transform:none; }
.en-report-party .en-report-note strong { color:var(--en-text); font-weight:850; }
.en-welcome-footer p { margin:0; }

/* v0.1.56: center the homepage hero again and present the credits as a
   third compact resource tile, rather than an off-axis right sidebar. */
.en-welcome-home-main {
  width:min(calc(100% - 36px), 1120px);
  display:flex;
  align-items:center;
}
.en-welcome-home-main .en-welcome-hero {
  width:min(100%, 1000px);
  margin-inline:auto;
  transform:none;
}
.en-welcome-explore {
  max-width:1000px;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:14px;
  align-items:stretch;
}
.en-welcome-explore .en-welcome-resource {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:flex-start;
  gap:13px;
  min-height:205px;
  padding:22px;
}
.en-welcome-explore .en-welcome-resource-copy { gap:6px; }
.en-welcome-explore .en-welcome-resource-arrow {
  margin-top:auto;
  align-self:flex-end;
}
.en-home-project-card {
  box-sizing:border-box;
  min-width:0;
  width:100%;
  padding:22px;
  border:1px solid rgba(255,255,255,.095);
  border-radius:17px;
  background:rgba(255,255,255,.035);
  text-align:left;
}
.en-home-project-card h2 {
  margin:0 0 13px;
  color:var(--en-text);
  font-size:.9rem;
  font-weight:850;
  letter-spacing:.01em;
}
.en-home-project-card p {
  margin:0 0 4px;
  color:#b9cadd;
  font-size:.76rem;
  line-height:1.55;
}
.en-home-project-card p strong { color:var(--en-text); font-weight:850; white-space:nowrap; }
.en-home-project-card a {
  color:#b6dcff;
  text-decoration:underline;
  text-underline-offset:3px;
  overflow-wrap:anywhere;
}
.en-home-project-card a:hover,
.en-home-project-card a:focus-visible { color:#fff; }
.en-home-project-email { font-size:.75rem; line-height:1.5; }
.en-home-project-rule { height:1px; margin:12px 0; background:rgba(255,255,255,.12); }
html[data-en-theme="light"] .en-home-project-card {
  border-color:rgba(35,59,86,.14);
  background:rgba(255,255,255,.76);
  box-shadow:0 9px 28px rgba(43,65,89,.06);
}
html[data-en-theme="light"] .en-home-project-card p { color:#536b83; }
html[data-en-theme="light"] .en-home-project-card a { color:#286aa7; }
html[data-en-theme="light"] .en-home-project-card a:hover,
html[data-en-theme="light"] .en-home-project-card a:focus-visible { color:#184d7c; }
html[data-en-theme="light"] .en-home-project-rule { background:rgba(35,59,86,.13); }
@media (max-width: 920px) and (min-width: 761px) {
  .en-welcome-explore { grid-template-columns:repeat(2, minmax(0, 1fr)); max-width:720px; }
  .en-welcome-explore .en-welcome-resource { min-height:155px; }
  .en-home-project-card { grid-column:auto; }
  .en-welcome-explore .en-welcome-resource:last-child { grid-column:1 / -1; }
}
@media (max-width: 760px) {
  .en-welcome-home-main { width:min(calc(100% - 24px), 1120px); }
  .en-welcome-explore { grid-template-columns:1fr; max-width:720px; gap:12px; }
  .en-welcome-explore .en-welcome-resource {
    display:grid;
    grid-template-columns:38px minmax(0, 1fr) auto;
    min-height:78px;
    padding:15px 16px;
    align-items:center;
    gap:12px;
  }
  .en-welcome-explore .en-welcome-resource-arrow { margin:0; align-self:center; }
  .en-home-project-card { padding:22px 20px; }
}

/* v0.1.57 — guest-friendly Favorites, purely browser-local and election-scoped. */
.en-filter-favorites { display:inline-flex; align-items:center; justify-content:center; gap:7px; }
.en-favorites-count { border-radius:999px; min-width:22px; padding:2px 6px;
  background:var(--en-panel-soft); color:var(--en-text); font-size:.72rem; font-variant-numeric:tabular-nums; }
.en-filter-favorites.is-active { border-color:var(--en-accent); }
.en-favorite-toggle { appearance:none; width:39px; height:39px; min-width:39px;
  display:inline-flex; align-items:center; justify-content:center; border-radius:11px;
  border:1px solid var(--en-line-strong); background:var(--en-panel-soft);
  color:var(--en-muted); cursor:pointer; font:inherit; font-size:1.55rem; line-height:1;
  -webkit-tap-highlight-color:transparent; }
.en-favorite-toggle:hover,.en-favorite-toggle:focus-visible { border-color:var(--en-accent); color:var(--en-accent-2); outline-offset:2px; }
.en-favorite-toggle.is-favorite { color:#f0bb52; border-color:rgba(240,187,82,.52); background:rgba(240,187,82,.10); }
.en-list-race-tools { display:flex; justify-content:flex-end; align-items:center; gap:9px; }
@media (max-width:480px) {
  .en-race-head-tools { gap:6px; }
  .en-favorite-toggle { width:36px; height:36px; min-width:36px; font-size:1.45rem; }
  .en-list-race-tools { justify-content:flex-start; }
}


/* v0.1.59 — Result-first header density. Keep every live metric and its DOM ID,
   reduce presentation weight instead of hiding election-night information. */
.en-results-page .en-live-chip {
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .16s ease, border-color .16s ease;
}
.en-results-page .en-live-chip:hover { background: rgba(255,67,95,.16); border-color: rgba(255,67,95,.60); }
.en-results-page .en-live-chip:focus-visible {
  outline: 3px solid var(--en-accent);
  outline-offset: 3px;
}
.en-results-page.en-demo-page .en-live-chip:hover { background:rgba(255,191,89,.16); border-color:rgba(255,191,89,.55); }
.en-results-page .en-main { padding-top: 15px; }
.en-results-page .en-results-masthead {
  grid-template-columns:minmax(0,1.7fr) minmax(400px,.8fr);
  align-items:center;
  gap:20px;
  margin-bottom:6px;
  padding:2px 2px 12px;
}
.en-results-page .en-results-masthead .en-hero-title {
  font-size:clamp(1.9rem,2.45vw,2.65rem);
  line-height:1.08;
  letter-spacing:-.045em;
  margin:6px 0 4px;
}
.en-results-page .en-results-masthead .en-hero-subtitle { font-size:.83rem; line-height:1.35; }
.en-results-page .en-results-masthead .en-eyebrow { font-size:.65rem; }
.en-results-page .en-masthead-progress { margin-top:10px; max-width:none; }
.en-results-page .en-masthead-progress .en-progress-copy { margin-bottom:4px; }
.en-results-page .en-masthead-progress .en-progress-number { font-size:.96rem; }
.en-results-page .en-masthead-progress .en-progress-label { font-size:.7rem; }
.en-results-page .en-masthead-progress .en-progress-track { height:5px; }
.en-results-page .en-masthead-stats { gap:6px; }
.en-results-page .en-masthead-stats .en-stat {
  min-height:56px;
  padding:8px 11px;
  border-radius:12px;
}
.en-results-page .en-masthead-stats .en-stat-label { font-size:.62rem; }
.en-results-page .en-masthead-stats .en-stat-value { font-size:1.13rem; margin-top:3px; }
.en-results-page .en-masthead-stats .en-stat-value-time { font-size:.8rem; }
.en-results-page .en-source-freshness { padding:7px 2px 8px; font-size:.7rem; }
.en-results-page .en-status-banner { padding:10px 14px; margin-bottom:8px; }
.en-results-page .en-page-tabs {
  margin:9px 0 10px;
  padding:5px;
  gap:7px;
  border-radius:16px;
}
.en-results-page .en-page-tab { min-height:51px; padding:7px 12px; border-radius:12px; gap:9px; }
.en-results-page .en-page-tab-icon { width:31px; height:31px; border-radius:9px; }
.en-results-page .en-page-tab-copy strong { font-size:.85rem; }
.en-results-page .en-page-tab-copy small { font-size:.63rem; margin-top:3px; }
.en-results-page .en-race-finder {
  margin:10px 0 11px;
  padding:13px 15px;
  border-radius:16px;
}
.en-results-page .en-race-finder-head { gap:14px; margin-bottom:10px; align-items:center; }
.en-results-page .en-race-finder-label { font-size:.6rem; }
.en-results-page .en-race-finder h2 { font-size:1.03rem; margin:3px 0 0; }
.en-results-page .en-race-finder .en-filter-btn { padding:7px 11px; }
.en-results-page .en-race-finder-search input { padding-top:9px; padding-bottom:9px; }
.en-results-page .en-section-head { margin:11px 0 12px; }
/* Keep active labels readable in Light appearance. A legacy base rule sets
   pale text for dark tabs; the more specific Light override wins here. */
html[data-en-theme="light"] .en-results-page .en-page-tab.is-active { color:#174c83; }

@media (max-width: 1100px) {
  .en-results-page .en-results-masthead { grid-template-columns:1fr; gap:10px; }
  .en-results-page .en-masthead-stats { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .en-results-page .en-main { padding-top:11px; }
  .en-results-page .en-results-masthead { gap:10px; padding:0 0 10px; }
  .en-results-page .en-results-masthead .en-hero-title {
    font-size:clamp(1.62rem,6.75vw,2.15rem);
    line-height:1.1;
    margin:5px 0 3px;
  }
  .en-results-page .en-results-masthead .en-hero-subtitle { font-size:.76rem; line-height:1.35; }
  .en-results-page .en-masthead-progress { margin-top:9px; }
  .en-results-page .en-masthead-stats { grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
  .en-results-page .en-masthead-stats .en-stat { min-height:49px; padding:7px 10px; }
  .en-results-page .en-masthead-stats .en-stat-label { font-size:.59rem; }
  .en-results-page .en-masthead-stats .en-stat-value { font-size:1.02rem; }
  .en-results-page .en-page-tabs { margin:9px 0 8px; padding:4px; gap:5px; }
  .en-results-page .en-page-tab { min-height:50px; gap:7px; padding:6px 7px; }
  .en-results-page .en-page-tab-icon { width:28px; height:28px; }
  .en-results-page .en-page-tab-copy strong { font-size:.76rem; }
  .en-results-page .en-page-tab-copy small { font-size:.57rem; }
  .en-results-page .en-race-finder { margin:8px 0 10px; padding:11px 12px; }
  .en-results-page .en-race-finder-head { gap:8px; margin-bottom:8px; align-items:stretch; }
  .en-results-page .en-race-finder-search { order:0; }
  .en-results-page .en-race-finder h2 { font-size:.98rem; }
  .en-results-page .en-race-finder .en-filter-btn { padding:7px 10px; }
}
@media (max-width: 360px) {
  .en-results-page .en-page-tab-copy small { display:none; }
  .en-results-page .en-page-tab-copy strong { font-size:.75rem; }
}

/* v0.1.60 Build 4 — independent Bexar/Texas candidate ranking reports */
.en-vote-ranking-section { margin:20px 0 16px; }
.en-vote-ranking-heading { margin:0 0 12px; }
.en-vote-ranking-heading h3 { margin:0 0 5px; font-size:1.04rem; letter-spacing:-.02em; color:var(--en-text); }
.en-vote-ranking-heading p { margin:0; color:var(--en-muted); font-size:.72rem; line-height:1.55; }
.en-vote-ranking-grid { margin-bottom:0; }
.en-top-votes-card .en-report-list-row { align-items:start; }
.en-top-votes-card .en-report-list-row strong { overflow-wrap:anywhere; }
.en-top-votes-card .en-report-list-value { white-space:nowrap; }
/* Operator-only snapshots have a separate desktop script. Never show controls on phones. */
#en-reports-root .en-report-card,
#en-reports-root .en-report-metric { position:relative; }
.en-report-snapshot-trigger {
  display:inline-flex; align-items:center; gap:5px; margin-top:12px;
  padding:7px 10px; border:1px solid var(--en-line-strong); border-radius:9px;
  background:rgba(78,161,255,.08); color:var(--en-text); cursor:pointer;
  font:800 .68rem/1.2 system-ui,-apple-system,Segoe UI,sans-serif;
}
.en-report-snapshot-trigger:hover, .en-report-snapshot-trigger:focus-visible { background:rgba(78,161,255,.2); border-color:var(--en-accent); }
.en-report-snapshot-modal { position:fixed; inset:0; z-index:900000; display:none; align-items:center; justify-content:center; padding:25px; background:rgba(3,8,17,.86); }
.en-report-snapshot-modal.is-open { display:flex; }
.en-report-snapshot-dialog { width:min(800px,100%); max-height:92vh; overflow:auto; background:#12213a; color:#eef5fc; border:1px solid #3c5673; border-radius:20px; padding:20px; box-shadow:0 25px 75px rgba(0,0,0,.45); }
.en-report-snapshot-dialog-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; }
.en-report-snapshot-dialog-head h2 { margin:0; font-size:1.1rem; }
.en-report-snapshot-close { padding:6px 12px; border:1px solid #59718b; border-radius:10px; color:#fff; background:transparent; cursor:pointer; font-size:1.1rem; }
.en-report-snapshot-message { margin:0 0 12px; color:#b8cade; font-size:.8rem; }
.en-report-snapshot-preview { display:block; max-width:100%; height:auto; max-height:56vh; margin:0 auto 15px; border:1px solid #435f7d; border-radius:8px; }
.en-report-snapshot-actions { display:flex; gap:10px; flex-wrap:wrap; }
.en-report-snapshot-actions button, .en-report-snapshot-actions a { display:inline-flex; align-items:center; text-decoration:none; padding:10px 16px; border:1px solid #4ea1ff; border-radius:10px; background:#176bba; color:#fff; cursor:pointer; font-weight:850; font-size:.78rem; }
.en-report-snapshot-actions button:disabled { opacity:.4; cursor:not-allowed; }
@media (max-width:1024px) { .en-report-snapshot-trigger { display:none !important; } }
@media (max-width:760px) { .en-vote-ranking-section { margin:18px 0 12px; } .en-top-votes-card .en-report-list-row { grid-template-columns:26px minmax(0,1fr) auto; } }

/* v0.1.63: Public Texas Districts link in existing Results page tabs. Demo retains two tabs. */
.en-results-page .en-page-tab-texas { text-decoration:none; }
@media (max-width:720px) {
 .en-results-page:not(.en-demo-page) .en-page-tab-texas { min-width:0; }
 .en-results-page:not(.en-demo-page) .en-page-tab-texas .en-page-tab-copy strong { font-size:.71rem; }
 .en-results-page:not(.en-demo-page) .en-page-tab-texas .en-page-tab-icon { display:none; }
}

/* v0.1.75 — iOS/Android search usability; only public election search fields. */
@media (max-width: 760px) {
  /* iPhone Safari auto-zooms inputs with computed font sizes below 16px.
     Keep normal pinch zoom available; do not change the viewport meta tag. */
  #en-race-search,
  #en-texas-search { font-size: 16px; line-height: 1.35; }
  /* Leave room for the sticky site header during native focus scrolling. */
  .en-race-finder-search,
  .en-texas-finder-header .en-search { scroll-margin-top: 90px; }
}

/* v0.1.77: signed correction badges in both approved appearance modes. */
.en-vote-delta.is-correction { background:rgba(237,176,67,.15); color:#f5c873; }
.en-report-list-value.is-correction strong { color:#f5c873; }
html[data-en-theme="light"] .en-vote-delta.is-correction,
html[data-en-theme="light"] .en-report-list-value.is-correction strong { color:#885400; }
