:root {
  --ink: #042437;
  --muted: #496273;
  --paper: #e8f4fb;
  --surface: #ffffff;
  --brand-blue: #063956;
  --brand-blue-dark: #042437;
  --brand-red: #cc0126;
  --brand-red-dark: #990621;
  --accent: var(--brand-blue);
  --accent-dark: var(--brand-blue-dark);
  --accent-red: var(--brand-red);
  --accent-red-dark: var(--brand-red-dark);
  --sand: #dfeefa;
  --line: #c6d8e5;
  --warning: #8a3c12;
  --shadow: 0 24px 70px rgba(4, 36, 55, 0.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.55; }
a { color: inherit; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 20; background: var(--accent-red); color: #fff; padding: 10px 14px; border-radius: 8px; font-weight: 800; }
.skip-link:focus { top: 12px; }
.topbar { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 8px clamp(22px, 5vw, 76px); background: rgba(255, 255, 255, 0.96); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px); }
.brand { display: inline-flex; gap: 11px; align-items: center; text-decoration: none; font-weight: 850; letter-spacing: -0.02em; }
.brand-logo { display: block; width: 56px; height: 62px; object-fit: contain; }
.brand-logo-horizontal { width: 210px; height: 62px; object-position: left center; }
nav { display: flex; align-items: center; gap: 24px; }
nav a { text-decoration: none; font-size: 14px; font-weight: 720; }
.language-picker select { max-width: 128px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); padding: 8px; font: inherit; font-size: 13px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.nav-cta { background: var(--accent-red); color: white; padding: 10px 15px; border-radius: 9px; }
.hero { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr); gap: clamp(32px, 6vw, 92px); align-items: center; min-height: 770px; padding: clamp(72px, 10vw, 130px) clamp(22px, 6vw, 92px); background: var(--brand-blue-dark) url('/assets/matchmyvote-civic-hero.png') center / cover no-repeat; color: #fff; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(4,36,55,.93) 0%, rgba(4,36,55,.84) 42%, rgba(4,36,55,.15) 78%, rgba(4,36,55,.05) 100%); }
.eyebrow { color: var(--accent-red); text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 850; margin: 0 0 14px; }
h1, h2, h3 { line-height: 1.08; letter-spacing: -.035em; margin-top: 0; }
h1 { font-size: clamp(48px, 7vw, 92px); max-width: 850px; margin-bottom: 24px; }
h2 { font-size: clamp(34px, 4.4vw, 62px); }
h3 { font-size: 22px; }
.lede { max-width: 760px; font-size: clamp(18px, 2vw, 23px); color: #dbe9f3; }
.hero-powered { display: inline-flex; align-items: center; gap: 8px; margin: -6px 0 20px; color: #dbe9f3; font-size: 14px; font-weight: 720; }
.hero-powered img { width: 116px; height: auto; filter: brightness(0) invert(1); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 34px 0 20px; }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 13px 19px; border-radius: 10px; text-decoration: none; font-weight: 820; }
.primary-button { background: var(--accent-red); color: white; }
.secondary-button { border: 1px solid rgba(255,255,255,.62); color: #fff; background: rgba(4,36,55,.25); }
.primary-button:hover, .primary-button:focus-visible, .nav-cta:hover, .nav-cta:focus-visible { background: var(--accent-red-dark); }
.primary-button:focus-visible, .secondary-button:focus-visible, nav a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent-red); outline-offset: 3px; }
.privacy-line { color: #dbe9f3; font-size: 14px; }
.hero-sidebar { display: grid; gap: 18px; }
.hero-method-card { background: rgba(255,255,255,.66); color: var(--ink); border: 1px solid rgba(255,255,255,.56); border-radius: 24px; padding: clamp(20px, 3vw, 30px); box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.hero-method-card h2 { font-size: 29px; margin-bottom: 12px; }
.hero-method-card > p:not(.eyebrow) { color: var(--muted); }
.hero-party-card > .small { margin: 0 0 13px; }
.hero-how-card h2 { font-size: 25px; }
.hero-how-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0; margin: 0; list-style: none; }
.hero-how-steps li { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: center; padding: 10px; border: 1px solid rgba(4,36,55,.13); border-radius: 12px; background: rgba(255,255,255,.42); color: var(--ink); font-size: 12px; font-weight: 700; line-height: 1.25; }
.hero-how-steps strong { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-red); color: #fff; font-size: 11px; }
.hero-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 22px 0; }
.hero-stat-grid div { padding: 14px; border-radius: 14px; background: var(--paper); }
.hero-stat-grid dt { color: var(--muted); font-size: 12px; font-weight: 700; }
.hero-stat-grid dd { margin: 4px 0 0; font-size: 28px; font-weight: 850; color: var(--accent); }
.hero-status { margin: 0; border-top: 1px solid var(--line); padding-top: 17px; color: var(--muted); font-size: 13px; }
.section-shell { padding: clamp(76px, 10vw, 130px) clamp(22px, 7vw, 105px); }
.hero-lede { max-width: 760px; font-size: clamp(18px, 2vw, 23px); color: inherit; }
.method-card { align-self: start; padding: 28px; border-radius: 18px; background: var(--surface); color: var(--ink); }
.method-card h2 { font-size: 30px; }
.method-card li + li { margin-top: 10px; }
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.steps-grid article { padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.steps-grid article > span { display: inline-grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: var(--accent-red); color: #fff; font-weight: 850; }
.steps-grid article p { color: var(--muted); }
.notice-card { background: var(--sand); }
.notice-card > * { max-width: 960px; }
.section-heading { max-width: 820px; margin-bottom: 50px; }
.section-heading > p:last-child { color: var(--muted); font-size: 18px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.steps li { border-top: 2px solid var(--accent); padding: 22px 8px 0 0; }
.steps li > span { display: inline-grid; place-items: center; width: 31px; height: 31px; margin-bottom: 30px; border-radius: 50%; background: var(--accent-red); color: #fff; font-size: 13px; font-weight: 850; }
.steps p, .layer-list p { color: var(--muted); }
.split-section { display: grid; grid-template-columns: minmax(280px, .75fr) minmax(0, 1.25fr); gap: clamp(40px, 8vw, 120px); background: var(--accent); color: white; }
.split-section .eyebrow { color: #fff; }
.split-section .section-heading > p:last-child, .split-section .layer-list p { color: #dbe9f3; }
.sticky-heading { align-self: start; position: sticky; top: 125px; }
.layer-list article { display: grid; grid-template-columns: 60px 1fr; gap: 18px; padding: 30px 0; border-top: 1px solid rgba(255,255,255,.18); }
.layer-number { color: #fff; font-weight: 850; }
.layer-list strong { display: inline-block; color: #fff; margin-top: 8px; }
.evidence-section { display: grid; grid-template-columns: 1fr minmax(300px, .65fr); gap: clamp(40px, 8vw, 120px); padding: clamp(80px, 11vw, 145px) clamp(22px, 7vw, 105px); background: var(--sand); }
.evidence-copy { max-width: 760px; }
.evidence-copy > p:not(.eyebrow) { color: var(--muted); font-size: 18px; }
.check-list { list-style: none; padding: 0; display: grid; gap: 12px; }
.check-list li::before { content: "✓"; display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 10px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; font-weight: 900; }
.evidence-card { align-self: center; background: white; border-radius: 22px; padding: clamp(26px, 4vw, 42px); box-shadow: var(--shadow); }
.evidence-card h3 { font-size: 32px; }
.evidence-card > p:not(.eyebrow) { color: var(--muted); }
details { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 18px; }
summary { cursor: pointer; font-weight: 800; }
.local-section { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(34px, 8vw, 110px); }
.local-section > div > p:not(.eyebrow), .local-rule p { color: var(--muted); font-size: 17px; }
.local-rule { padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.local-rule strong { font-size: 21px; }
.local-rule .small { font-size: 14px; color: var(--warning); border-top: 1px solid var(--line); padding-top: 14px; }
.cta-section { text-align: center; padding: clamp(80px, 11vw, 145px) 22px; background: var(--accent); color: white; }
.cta-section .eyebrow { color: #fff; }
.cta-section h2 { max-width: 850px; margin-left: auto; margin-right: auto; }
.cta-section > p:not(.eyebrow) { color: #c8d7d1; font-size: 18px; }
.light-button { margin-top: 18px; background: #fff; color: var(--accent); }
.light-button:hover, .light-button:focus-visible { background: #f5faff; color: var(--accent); }
.party-directory { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.party-directory.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: none; overflow: visible; }
.party-tile-logo { width: min(100%, 102px); height: 72px; object-fit: contain; display: block; margin-inline: auto; }
.party-tile { min-height: 132px; display: grid; grid-template-rows: 72px 1fr auto; align-content: center; gap: 6px; position: relative; border: 1px solid rgba(4,36,55,.22); border-radius: 14px; padding: 11px 8px; color: var(--accent); background: rgba(255,255,255,.84); font-size: 11px; font-weight: 800; line-height: 1.15; text-align: center; text-decoration: none; overflow: hidden; }
.party-tile:hover, .party-tile:focus-visible { border-color: var(--accent-red); box-shadow: 0 10px 24px rgba(4,36,55,.11); transform: translateY(-2px); }
.party-tile-code { color: var(--accent-red); font-size: 12px; letter-spacing: .08em; }
.party-tile-arrow { position: absolute; right: 11px; top: 11px; color: var(--accent-red); }
.party-tile-status { justify-self: center; color: var(--accent); font-size: 9px; font-weight: 760; letter-spacing: .02em; }
.party-tile-status-review { color: var(--warning); }
.party-directory-note { margin: 18px 0 0; color: var(--muted); font-size: 13px; }
footer { display: grid; grid-template-columns: 180px minmax(0, 1.15fr) minmax(0, 1.2fr); gap: clamp(20px, 3vw, 28px); align-items: start; padding: 36px clamp(22px, 6vw, 92px); background: var(--accent-dark); color: #dbe9f3; font-size: 13px; }
footer > * { min-width: 0; }
footer a { color: white; }
.footer-brand { display: block; width: 180px; max-width: 100%; min-height: 70px; }
.footer-brand img { display: block; width: 100%; max-width: 180px; height: auto; }
.footer-meta p, footer > p { overflow-wrap: anywhere; }
.footer-meta { display: grid; gap: 12px; }
.footer-meta p { margin: 0; }
.release-detail { color: #bcd2e1; }
.powered-by { display: inline-flex; align-items: center; gap: 8px; color: #fff; }
.powered-by img { width: 110px; height: auto; }

@media (max-width: 940px) {
  nav > a:not(.nav-cta) { display: none; }
  .hero, .split-section, .evidence-section { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .steps, .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .sticky-heading { position: static; }
  footer { grid-template-columns: 1fr; }
  .party-directory.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .topbar { padding: 12px 16px; }
  .brand-logo-horizontal { width: 156px; height: 52px; }
  .brand > span:last-child { display: none; }
  .nav-cta { font-size: 12px; padding: 9px 11px; }
  .hero { padding-top: 62px; }
  h1 { font-size: 48px; }
  .hero-actions { display: grid; }
  .hero-stat-grid, .steps, .steps-grid, .local-section { grid-template-columns: 1fr; }
  .party-directory.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .party-tile { min-height: 126px; }
  .hero-how-steps { grid-template-columns: 1fr; }
  .layer-list article { grid-template-columns: 42px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
