* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: rgb(var(--color-base)); color: rgb(var(--color-bone)); font-family: Inter, system-ui, sans-serif; line-height: 1.55; }
a { color: inherit; text-underline-offset: .2em; }
button, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled, select:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 3px solid rgb(var(--color-brass)); outline-offset: 3px; }
.skip { position: fixed; left: 1rem; top: -5rem; z-index: 100; padding: .75rem 1rem; background: rgb(var(--color-panel)); border: 1px solid rgb(var(--color-border)); }
.skip:focus { top: 1rem; }
.site-header { position: sticky; top: 0; z-index: 40; background: rgb(var(--color-base) / .95); border-bottom: 1px solid rgb(var(--color-border)); backdrop-filter: blur(8px); }
.header-inner { max-width: 1280px; margin: auto; padding: .9rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.header-brand, .brand { display: flex; align-items: center; gap: .65rem; }
.brand { color: inherit; text-decoration: none; font-family: Oswald, sans-serif; font-size: 1.35rem; letter-spacing: .035em; white-space: nowrap; }
.brand img { object-fit: contain; }
.brand em { color: rgb(var(--color-ember)); font-style: normal; }
.desktop-nav { display: flex; gap: 1.4rem; align-items: center; font-family: Oswald, sans-serif; font-size: .85rem; letter-spacing: .055em; text-transform: uppercase; }
.desktop-nav a { color: rgb(var(--color-bone) / .8); text-decoration: none; }
.desktop-nav a:hover, .desktop-nav [aria-current] { color: rgb(var(--color-ember)); }
.theme-toggle, .menu-toggle, .drawer-head button { border: 1px solid rgb(var(--color-border)); border-radius: 4px; background: transparent; min-width: 2.4rem; min-height: 2.4rem; }
.menu-toggle { display: none; border: 0; font-size: 1.25rem; }
.drawer-overlay, .mobile-drawer { display: none; }
.central { max-width: 1280px; margin: auto; padding: 0 1.5rem 5rem; }
.coverage-header { padding: 2.7rem 0 1.5rem; border-bottom: 3px solid rgb(var(--color-olive)); }
.eyebrow { margin: 0 0 .35rem; color: rgb(var(--color-brass)); font: 600 .72rem/1.3 Oswald, sans-serif; letter-spacing: .15em; }
h1, h2, h3 { font-family: Oswald, sans-serif; }
h1 { margin: 0; font-size: clamp(2.5rem, 5vw, 4.5rem); line-height: 1; letter-spacing: -.025em; }
h1 span { color: rgb(var(--color-ember)); }
h2 { margin: 0; font-size: clamp(1.75rem, 3vw, 2.35rem); line-height: 1.12; letter-spacing: -.015em; }
h3 { font-size: 1.2rem; line-height: 1.25; }
.coverage-deck { margin: .8rem 0 0; font-size: 1.08rem; }
.phase-caption { margin: .25rem 0 0; color: rgb(var(--color-bone) / .62); font-size: .86rem; }
.section-nav { display: flex; flex-wrap: wrap; gap: .35rem 1.5rem; padding: .9rem 0; border-bottom: 1px solid rgb(var(--color-border)); font-family: Oswald, sans-serif; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; }
.section-nav a { color: rgb(var(--color-bone) / .75); text-decoration: none; }
.section-nav a:hover { color: rgb(var(--color-ember)); }
.result-controls { display: flex; justify-content: flex-end; align-items: end; gap: .8rem; padding: 1.25rem 0 .25rem; }
.result-controls label, .state-picker { display: grid; gap: .3rem; color: rgb(var(--color-bone) / .65); font-size: .75rem; font-weight: 600; }
select { min-width: 9rem; padding: .55rem 2rem .55rem .65rem; background: rgb(var(--color-panel)); border: 1px solid rgb(var(--color-border)); border-radius: 4px; }
.result-controls button { padding: .58rem .9rem; border: 1px solid rgb(var(--color-olive-light)); border-radius: 4px; background: rgb(var(--color-olive)); color: white; font-size: .8rem; font-weight: 600; }
.modules { display: grid; grid-template-columns: minmax(0, 1fr); }
.editorial-section { min-width: 0; padding: 2.3rem 0; border-bottom: 1px solid rgb(var(--color-border)); scroll-margin-top: 5rem; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.source-status { color: rgb(var(--color-olive-light)); font-size: .74rem; font-weight: 600; white-space: nowrap; }
.source-status[data-status="STALE"], .source-status[data-status="UNAVAILABLE"] { color: rgb(var(--color-ember)); }
.result-message { margin: .6rem 0; color: rgb(var(--color-bone) / .72); font-size: .88rem; }
.result-header { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 1.1rem 0 .25rem; }
.result-header strong { font: 600 clamp(1.75rem, 4vw, 3rem)/1 Oswald, sans-serif; }
.result-header span { color: rgb(var(--color-bone) / .65); font-size: .8rem; }
.totalization-track { height: 4px; margin: .65rem 0 1.25rem; background: rgb(var(--color-border)); overflow: hidden; }
.totalization-track span { display: block; height: 100%; background: rgb(var(--color-olive-light)); }
.candidates { list-style: none; margin: 0; padding: 0; }
.candidate { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .15rem 1.2rem; padding: 1.05rem 0; border-top: 1px solid rgb(var(--color-border)); }
.candidate:first-child { border-top-color: rgb(var(--color-bone) / .55); }
.candidate-name { font: 600 clamp(1.18rem, 2.2vw, 1.65rem)/1.25 Oswald, sans-serif; }
.candidate-meta, .candidate-votes { color: rgb(var(--color-bone) / .62); font-size: .78rem; }
.candidate-numbers { grid-row: 1 / span 2; grid-column: 2; text-align: right; }
.candidate-percent { display: block; font: 600 clamp(1.35rem, 2.6vw, 2rem)/1.15 Oswald, sans-serif; }
.candidate-bar { grid-column: 1 / -1; height: 3px; margin-top: .45rem; background: rgb(var(--color-border)); }
.candidate-bar span { display: block; height: 100%; background: rgb(var(--color-olive-light)); }
.candidate:nth-child(2) .candidate-bar span { background: rgb(var(--color-brass)); }
.result-source { display: flex; flex-wrap: wrap; gap: .25rem .8rem; margin-top: 1rem; color: rgb(var(--color-bone) / .56); font-size: .72rem; }
.result-source a { color: rgb(var(--color-olive-light)); }
.state-picker { max-width: 25rem; margin-bottom: 1rem; }
.state-picker select { width: 100%; font-size: .9rem; }
#governor-result .source-status { display: inline-block; margin-bottom: .25rem; }
.empty-state { color: rgb(var(--color-bone) / .58); font-size: .88rem; }
.news .section-heading { align-items: end; }
.all-news { color: rgb(var(--color-olive-light)); font-size: .8rem; white-space: nowrap; }
.news-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(16rem, .8fr); gap: 1.5rem 2rem; }
.lead-story { grid-row: 1 / span 2; }
.lead-story a, .secondary-story a, .news-brief a { text-decoration: none; }
.lead-image { width: 100%; aspect-ratio: 16 / 9; display: block; object-fit: cover; background: rgb(var(--color-panel)); }
.news-kicker, .news-layout time { display: block; margin-top: .7rem; color: rgb(var(--color-brass)); font: 500 .68rem/1.4 Oswald, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.lead-story h3 { margin: .35rem 0 .45rem; font-size: clamp(1.55rem, 3vw, 2.35rem); }
.lead-story p { margin: 0; color: rgb(var(--color-bone) / .68); }
.secondary-stories { display: grid; gap: 1rem; }
.secondary-story { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .9rem; padding-bottom: 1rem; border-bottom: 1px solid rgb(var(--color-border)); }
.secondary-story img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.secondary-story h3 { margin: .2rem 0; font-size: 1.08rem; }
.secondary-story time { margin: 0; }
.news-briefs { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; padding-top: 1.1rem; border-top: 1px solid rgb(var(--color-border)); }
.news-brief h3 { margin: .25rem 0; font-size: 1rem; }
.statistics-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; border-top: 1px solid rgb(var(--color-bone) / .5); }
.stat { padding: .85rem .8rem .3rem 0; }
.stat + .stat { padding-left: .8rem; border-left: 1px solid rgb(var(--color-border)); }
.stat dt { color: rgb(var(--color-bone) / .58); font-size: .72rem; }
.stat dd { margin: .2rem 0 0; font: 600 1.1rem/1.2 Oswald, sans-serif; }
.service-layout { display: grid; grid-template-columns: minmax(15rem, .65fr) minmax(0, 1.35fr); gap: 2rem; }
.service-layout article { border-right: 1px solid rgb(var(--color-border)); padding-right: 2rem; }
.service-layout h3 { margin-top: 0; }.service-layout p { margin: .35rem 0; font-size: .88rem; }.service-layout a { color: rgb(var(--color-olive-light)); font-size: .82rem; }
.service-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.4rem; }
.service-links a { display: grid; gap: .15rem; padding: .8rem 0; border-top: 1px solid rgb(var(--color-border)); color: inherit; text-decoration: none; }
.service-links strong { font-family: Oswald, sans-serif; }.service-links span { color: rgb(var(--color-bone) / .6); font-size: .75rem; }
.modules[data-phase="before"] .presidential, .modules[data-phase="before"] .governors, .modules[data-phase="before"] .statistics { color: rgb(var(--color-bone) / .85); }
.site-footer { border-top: 1px solid rgb(var(--color-border)); background: rgb(var(--color-panel) / .6); }
.footer-inner { max-width: 1280px; margin: auto; padding: 3rem 1.5rem; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; }
.footer-about p { max-width: 30rem; color: rgb(var(--color-bone) / .65); font-size: .78rem; }
.footer-inner nav { display: grid; align-content: start; gap: .55rem; font-size: .78rem; }
.footer-inner nav strong { font-family: Oswald, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.footer-inner nav a { color: rgb(var(--color-bone) / .65); text-decoration: none; }
.footer-bottom { max-width: 1280px; margin: auto; padding: 1rem 1.5rem; border-top: 1px solid rgb(var(--color-border)); display: flex; justify-content: space-between; gap: 1rem; color: rgb(var(--color-bone) / .5); font-size: .72rem; }
[data-theme='dark'] .source-status,
[data-theme='dark'] .result-source a,
[data-theme='dark'] .all-news,
[data-theme='dark'] .service-layout a { color: rgb(var(--color-brass)); }
.hidden, [hidden] { display: none !important; }

@media (min-width: 900px) {
  .modules { grid-template-columns: minmax(0, 1fr); }
  .presidential { grid-row: 1; }
  .governors { grid-row: 2; }
  .news { grid-row: 3; }
  .statistics { grid-row: 4; }
  .services { grid-row: 5; }
  .modules[data-phase="before"] .news { grid-row: 1; }
  .modules[data-phase="before"] .services { grid-row: 2; }
  .modules[data-phase="before"] .presidential { grid-row: 3; }
  .modules[data-phase="before"] .governors { grid-row: 4; }
  .modules[data-phase="before"] .statistics { grid-row: 5; }
}
@media (max-width: 899px) {
  .desktop-nav { display: none; }.menu-toggle { display: inline-block; }
  .drawer-overlay { display: block; position: fixed; inset: 0; z-index: 50; background: rgb(0 0 0 / .62); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .drawer-overlay.opacity-100 { opacity: 1; pointer-events: auto; }
  .mobile-drawer { display: flex; position: fixed; inset: 0 auto 0 0; z-index: 51; width: min(18rem, 85vw); flex-direction: column; background: rgb(var(--color-panel)); border-right: 1px solid rgb(var(--color-border)); transform: translateX(-100%); transition: transform .2s; }
  .mobile-drawer.translate-x-0 { transform: translateX(0); }
  .drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem; border-bottom: 1px solid rgb(var(--color-border)); }
  .mobile-drawer nav { display: grid; padding: 1rem; }.mobile-drawer nav a { padding: .7rem; text-decoration: none; font-family: Oswald, sans-serif; text-transform: uppercase; }
  .drawer-foot { margin-top: auto; padding: 1rem; border-top: 1px solid rgb(var(--color-border)); color: rgb(var(--color-bone) / .62); font-size: .75rem; }
  .news-layout { grid-template-columns: 1fr; }.lead-story { grid-row: auto; }.news-briefs { grid-column: auto; }
}
@media (max-width: 640px) {
  .header-inner, .central { padding-left: 1rem; padding-right: 1rem; }.header-inner { padding-top: .7rem; padding-bottom: .7rem; }.brand { font-size: 1.05rem; }.brand img { width: 34px; height: 34px; }
  .coverage-header { padding-top: 2rem; }.coverage-deck { font-size: .98rem; }.section-nav { gap: .4rem 1rem; }
  .result-controls { justify-content: space-between; align-items: end; }.result-controls label { flex: 1; }.result-controls select { width: 100%; }.result-controls button { white-space: nowrap; }
  .editorial-section { padding: 1.8rem 0; }.section-heading { align-items: start; }.source-status { white-space: normal; text-align: right; }
  .candidate { gap: .15rem .65rem; }.candidate-name { font-size: 1.18rem; }.candidate-percent { font-size: 1.38rem; }.candidate-meta, .candidate-votes { font-size: .7rem; }
  .news .section-heading { display: block; }.all-news { display: inline-block; margin-top: .55rem; }
  .secondary-story { grid-template-columns: 6.2rem minmax(0, 1fr); }.news-briefs { grid-template-columns: 1fr; gap: .2rem; }.news-brief { padding-bottom: .7rem; border-bottom: 1px solid rgb(var(--color-border)); }
  .statistics-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }.stat:nth-child(odd) { padding-left: 0; border-left: 0; }.stat:nth-child(n+3) { border-top: 1px solid rgb(var(--color-border)); }
  .service-layout { grid-template-columns: 1fr; gap: 1.4rem; }.service-layout article { border-right: 0; border-bottom: 1px solid rgb(var(--color-border)); padding: 0 0 1.4rem; }.service-links { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; padding: 2.3rem 1rem; }.footer-about { grid-column: 1 / -1; }.footer-bottom { padding: 1rem; display: block; }.footer-bottom p { margin: .25rem 0; }
}
@media (max-width: 350px) {
  h1 { font-size: 2.2rem; }.brand span { font-size: .95rem; }.theme-toggle { min-width: 2.2rem; }.result-controls { display: grid; grid-template-columns: 1fr; }.result-controls button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
