:root {
  --navy: #0b3ccc;
  --navy-dark: #072a96;
  --red: #e3120b;
  --ink: #1c1f26;
  --muted: #5d6270;
  --line: #d9dce3;
  --bg: #f5f6f9;
  --card: #ffffff;
  --header: #5f6166;
  --radius: 10px;
  --a: #0b3ccc;
  --b: #e3120b;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
a { color: var(--navy); }
.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 20px; }
main { flex: 1; padding-top: 32px; padding-bottom: 56px; outline: none; }

/* Header (white, as in the original design) */
.site-header { background: #fff; box-shadow: 0 1px 0 var(--line); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { display: flex; align-items: center; text-decoration: none; }
.logo-imgs { display: flex; align-items: center; gap: 10px; }
.logo-imgs + .logo-text { display: none; }
.logo-icon { height: 48px; width: auto; display: block; }
.logo-word { height: 30px; width: auto; display: block; }
.logo-text { font-weight: 900; font-size: 22px; letter-spacing: .5px; line-height: 1; }
.logo-whats { color: var(--navy); }
.logo-vote { color: var(--red); }
.logo-text small { color: var(--navy); font-size: 10px; letter-spacing: 3px; margin-left: 2px; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: .4px; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--navy); }
.nav a.active { border-bottom-color: var(--red); }
.nav .nav-cta { background: var(--navy); color: #fff; border-radius: 999px; padding: 10px 22px; border: 0; text-transform: none; letter-spacing: 0; font-size: 15px; }
.nav .nav-cta:hover { background: var(--navy-dark); color: #fff; }
.menu-btn { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.menu-btn span { display: block; width: 28px; height: 3px; background: var(--ink); margin: 5px 0; border-radius: 2px; }

@media (max-width: 940px) {
  .header-inner { height: 64px; }
  .logo-icon { height: 40px; }
  .logo-word { height: 24px; }
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 18px; box-shadow: 0 8px 16px rgba(0,0,0,.12); }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav a.active { border-bottom-color: var(--line); color: var(--red); }
  .nav .nav-cta { margin-top: 12px; text-align: center; padding: 14px; }
}

/* Navy page-title band */
.band { background: var(--navy); color: #fff; text-align: center; padding: 56px 0; }
.band h1 { margin: 0; text-transform: uppercase; letter-spacing: 1px; }
.band-sub { margin: 14px auto 0; max-width: 640px; font-size: 18px; color: #dfe4f5; }
.band-sub:empty { display: none; }
.band.hidden { display: none; }
.band.hero-band { padding: 72px 0; }
.band.hero-band h1 { text-transform: none; font-size: clamp(32px, 6vw, 54px); }
@media (max-width: 720px) { .band { padding: 36px 0; } .band.hero-band { padding: 48px 0; } }

/* Footer (red, as in the original design) */
.site-footer { background: var(--red); color: #fff; padding: 26px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.footer-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.footer-inner nav { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-inner nav a { color: #fff; text-decoration: none; font-weight: 600; font-size: 14px; text-transform: uppercase; }
.footer-inner nav a:hover { text-decoration: underline; }
.subfooter { background: #363a45; color: #fff; font-size: 13px; padding: 14px 0; }
.subfooter-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.subfooter a { color: #fff; }

/* Type */
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: clamp(28px, 5vw, 44px); }
h2 { font-size: clamp(22px, 3.5vw, 30px); }
.section-title { text-align: center; text-transform: uppercase; letter-spacing: 1px; }
.section-title::after { content: ""; display: block; width: 120px; height: 3px; background: var(--red); margin: 14px auto 0; }
.lead { font-size: 18px; color: var(--muted); }
.center { text-align: center; }

/* Cards & buttons */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.btn {
  display: inline-block; border: 0; border-radius: 999px; padding: 14px 28px; font-size: 16px; font-weight: 700;
  cursor: pointer; text-decoration: none; background: var(--red); color: #fff; transition: transform .1s, background .15s;
}
.btn:hover { background: #b81e32; }
.btn:active { transform: scale(.98); }
.btn.secondary { background: #fff; color: var(--navy); border: 2px solid var(--navy); }
.btn.secondary:hover { background: #eef1fa; }
.btn.small { padding: 9px 18px; font-size: 14px; }
.btn:focus-visible, .answer:focus-visible, a:focus-visible { outline: 3px solid #f3b400; outline-offset: 2px; }

/* Home */
.hero { text-align: center; padding: 8px 0 24px; }
.hero .lead { max-width: 620px; margin: 0 auto 28px; }
.mode-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; max-width: 640px; margin: 0 auto; }
.mode { text-align: left; }
.mode h3 { margin-bottom: 4px; }
.mode p { color: var(--muted); margin: 0 0 16px; }
.dims { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 40px; }
.dims .card { padding: 16px; }
.dims h3 { font-size: 16px; margin-bottom: 6px; }
.dims p { font-size: 14px; color: var(--muted); margin: 0; }
.resume { margin: 20px auto 0; max-width: 640px; }

/* Quiz */
.quiz { max-width: 680px; margin: 0 auto; }
.progress-strip { display: flex; align-items: center; gap: 16px; background: var(--navy); color: #fff; padding: 14px 20px; border-radius: var(--radius) var(--radius) 0 0; font-size: 15px; }
.progress { flex: 1; height: 10px; background: #fff; border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: var(--red); transition: width .25s; }
.quiz-body { background: #fff; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); padding: 24px; }
.progress-label { font-size: 13px; color: var(--navy); margin: 0 0 6px; }
.statement { margin-top: 4px; font-size: clamp(20px, 3.6vw, 26px); font-weight: 700; min-height: 3.2em; margin-bottom: 24px; animation: slide .25s ease; }
@keyframes slide { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.answers { display: grid; gap: 10px; }
.answer {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font-size: 17px; padding: 14px 18px;
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius); cursor: pointer; color: var(--ink);
}
.answer:hover { border-color: var(--navy); }
.answer.selected { border-color: var(--navy); background: #eef1fa; font-weight: 700; }
.answer .key { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; background: var(--bg); font-size: 13px; color: var(--muted); flex: none; }
.answer.dk { color: var(--muted); }
.quiz-nav { display: flex; justify-content: space-between; margin-top: 20px; }
.linkbtn { background: none; border: 0; color: var(--navy); font-weight: 600; cursor: pointer; padding: 8px 0; font-size: 15px; }
.linkbtn:disabled { color: var(--line); cursor: default; }
.dimtag { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--red); }

/* Results */
.results-head { text-align: center; margin-bottom: 28px; }
.match-card { border-top: 6px solid var(--navy); text-align: center; }
.match-name { font-size: clamp(28px, 5vw, 40px); font-weight: 900; margin: 4px 0; }
.match-pct { color: var(--muted); font-weight: 600; }
.spectrum-list { display: grid; gap: 22px; margin-top: 8px; }
.spectrum h3 { font-size: 16px; margin-bottom: 10px; }
.spectrum h3 span { display: block; color: var(--muted); font-weight: 600; font-size: 13px; margin-top: 2px; }
.bar { position: relative; height: 14px; border-radius: 99px; background: linear-gradient(90deg, var(--a), #c9cde0 50%, var(--b)); }
.bar .you { position: absolute; top: 50%; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 4px solid var(--ink); transform: translate(-50%, -50%); box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.bar .ghost { position: absolute; top: 50%; width: 14px; height: 14px; transform: translate(-50%, -50%) rotate(45deg); border: 2px dashed var(--ink); background: rgba(255,255,255,.6); }
.ends { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 6px; gap: 12px; }
.ends span:last-child { text-align: right; }
.na { font-size: 14px; color: var(--muted); font-style: italic; }
.legend { display: flex; gap: 18px; justify-content: center; font-size: 13px; color: var(--muted); margin-bottom: 18px; flex-wrap: wrap; }
.legend i { display: inline-block; vertical-align: middle; margin-right: 6px; }
.legend .l-you { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--ink); }
.legend .l-ghost { width: 10px; height: 10px; border: 2px dashed var(--ink); transform: rotate(45deg); }
.ranks { display: grid; gap: 10px; }
.rank { display: grid; grid-template-columns: 130px 1fr 48px; align-items: center; gap: 12px; font-size: 15px; }
.rank .meter { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; }
.rank .meter div { height: 100%; }
.rank b { text-align: right; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 20px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 24px; }
.notice { background: #fff8e1; border: 1px solid #f0d58a; border-radius: var(--radius); padding: 12px 16px; font-size: 14px; }

/* Forms */
label { display: block; font-weight: 600; margin: 14px 0 6px; }
input, select { width: 100%; font: inherit; padding: 12px 14px; border: 1px solid #c4c8d2; border-radius: 8px; background: #fff; }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.checkbox input { width: auto; margin-top: 5px; }
.muted { color: var(--muted); font-size: 14px; }

/* Content pages */
.page { max-width: 720px; margin: 0 auto; }
.page h2 { margin-top: 28px; font-size: 22px; }
.placeholder { border-left: 4px solid #f0d58a; background: #fffdf3; padding: 10px 14px; color: var(--muted); font-size: 14px; }
.coming { text-align: center; padding: 60px 0; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 99px; font-size: 14px; z-index: 50; }
@media (min-width: 900px) { .dims { grid-template-columns: repeat(5, 1fr); } }

/* ===== V2 additions ===== */
.mode-grid.three { max-width: 900px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.mode-desc { font-size: 14px; }
.dim-card { border-top: 5px solid var(--navy); }
.steps { max-width: 640px; margin: 0 auto 20px; padding-left: 22px; display: grid; gap: 10px; font-size: 16px; }
.rounded { border-top: 1px solid var(--line); border-radius: var(--radius); }
.small-print { font-size: 13px; margin-top: 14px; }
.linkbtn.inline { display: inline; padding: 0; font-size: inherit; text-decoration: underline; }
.subfooter-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* Top-issues picker */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.topic { text-align: left; font-size: 16px; padding: 14px 16px; background: #fff; border: 2px solid var(--line); border-radius: var(--radius); cursor: pointer; color: var(--ink); }
.topic:hover { border-color: var(--navy); }
.topic.selected { border-color: var(--navy); background: #eef1fa; font-weight: 700; }
.topic.selected::before { content: "✓ "; color: var(--red); }

/* Signup form */
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.field label { margin-top: 12px; }
details.more { margin: 18px 0 6px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; }
details.more summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.checkbox { margin-top: 16px; font-size: 15px; line-height: 1.45; }
.checkbox span { flex: 1; }
.form-error { color: var(--red); font-weight: 600; min-height: 1.2em; margin: 14px 0 6px; }
#signup .btn { width: 100%; }

/* Results extras */
.notice.ok { background: #e8f6ee; border-color: #9ed3b3; }
.notice { margin-bottom: 18px; }
.stack { display: grid; gap: 20px; align-content: start; }
.chips { list-style: none; padding: 0; margin: 8px 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { background: #eef1fa; color: var(--navy); border-radius: 99px; padding: 6px 12px; font-size: 14px; font-weight: 600; }
.center-chips { justify-content: center; }
.soon { border-style: dashed; }
.spectrum h3 .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.rank small { color: var(--muted); }

/* Media & elections */
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 20px 0; }
.date { color: var(--red); font-weight: 800; font-size: 14px; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.party p { color: var(--muted); font-size: 15px; }
.ad-slot { border: 2px dashed #c4c8d2; border-radius: var(--radius); padding: 22px; text-align: center; color: var(--muted); margin: 8px 0 28px; background: #fafbfd; }
.ad-slot span { display: block; font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: #9aa0ad; margin-bottom: 6px; }
.page.wide { max-width: 900px; }
.filters { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.filters label { margin: 0; font-weight: 600; }
.filters select { width: auto; min-width: 200px; margin-top: 6px; display: block; }
.ctable { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 26px; font-size: 15px; }
.ctable th, .ctable td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.ctable th { background: #eef1fa; color: var(--navy); font-size: 13px; text-transform: uppercase; letter-spacing: .4px; }
@media (max-width: 560px) { .ctable { font-size: 13px; } .ctable th, .ctable td { padding: 8px; } }
.page ul { padding-left: 22px; }

/* ---------- V3: new logo, signup unlock, radar, political map, About ---------- */
.logo-full { height: 46px; width: auto; display: block; }
.footer-logo .logo-full { height: 40px; }
@media (max-width: 600px) { .logo-full { height: 36px; } }
.req { color: var(--red); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-left: 6px; }
.opt { color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; margin-left: 6px; }
.unlock { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
.teaser { text-align: center; position: relative; overflow: hidden; }
.teaser .match-name { font-size: 30px; font-weight: 800; color: var(--navy); }
.blurred { filter: blur(7px); user-select: none; pointer-events: none; }
.teaser::after { content: "🔒 Unlocks when you submit"; position: absolute; left: 0; right: 0; top: 46%; font-weight: 700; color: var(--navy-dark); }
@media (max-width: 760px) { .unlock { grid-template-columns: 1fr; } .teaser { max-width: 340px; margin: 0 auto; } }
.radar { width: 100%; max-width: 360px; display: block; margin: 0 auto; overflow: visible; }
.radar text { font-size: 11px; font-weight: 700; }
.r-ring { fill: none; stroke: var(--line); }
.r-ring.mid { stroke-dasharray: 3 3; stroke: #b8bdc9; }
.r-spoke { stroke: var(--line); }
.r-you { fill: rgba(11, 60, 204, .18); stroke: var(--navy); stroke-width: 2; }
.r-ghost { fill: none; stroke: #9aa0ad; stroke-width: 1.5; stroke-dasharray: 5 4; }
.pmap-card { text-align: center; }
.pmap { width: 100%; max-width: 520px; display: block; margin: 8px auto; }
.pmap .reg { stroke: #fff; stroke-width: 1.5; cursor: pointer; transition: opacity .15s; }
.pmap .reg:hover, .pmap .reg.on { opacity: .75; }
.pmap text { pointer-events: none; font-weight: 700; fill: #1c1f26; }
.pmap .you-dot { fill: var(--red); stroke: #fff; stroke-width: 3; }
.pmap-info { min-height: 3em; max-width: 560px; margin: 0 auto; }
.pmap-info b { color: var(--navy); }
.subnav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.subnav a { padding: 6px 12px; border-radius: 999px; background: #e8ecf8; text-decoration: none; font-weight: 600; font-size: 14px; }
.about section { scroll-margin-top: 90px; }
.group-title { margin: 28px 0 4px; color: var(--navy); }
.pstatus { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; margin: -4px 0 8px; }
.topic-card h3 { margin: 0 0 4px; }
.linkcard { text-decoration: none; color: inherit; display: block; }
.linkcard:hover h3 { text-decoration: underline; }
.radar-wrap { margin: 6px 0 4px; }

/* Survey screens: smaller header so all six answers fit on a phone screen */
.band.compact { padding: 28px 0; }
@media (max-width: 720px) {
  .band.compact { padding: 14px 0; }
  .band.compact h1 { font-size: 20px; }
  .answer { padding-top: 11px; padding-bottom: 11px; }
  main { padding-top: 18px; padding-bottom: 80px; }
}
