:root {
  --paper: #f5f1e8;
  --card: #fffdf8;
  --ink: #15171c;
  --muted: #5d606a;
  --line: #dcd4c3;
  --line-strong: #b9ae97;
  --accent: #f2b705;
  --accent-soft: #fcefc4;
  --focus: #2457d6;
  --pos: #1f7a4d;
  --neg: #b4322b;
  --radius: 14px;
  --shadow: 0 1px 0 rgba(21, 23, 28, .06), 0 12px 32px -18px rgba(21, 23, 28, .35);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #13151a; --card: #1b1e25; --ink: #f1ede4; --muted: #a3a6b0;
    --line: #2d313b; --line-strong: #454a56; --accent-soft: #3a3115;
    --pos: #4fbf86; --neg: #f07a72; --focus: #7aa2ff; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #13151a; --card: #1b1e25; --ink: #f1ede4; --muted: #a3a6b0;
  --line: #2d313b; --line-strong: #454a56; --accent-soft: #3a3115;
  --pos: #4fbf86; --neg: #f07a72; --focus: #7aa2ff; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 17px/1.6 var(--sans); text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.12; letter-spacing: -.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.9rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.eyebrow { font: 600 .78rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .8em; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 99; }
.skip:focus { left: 8px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.logo { font: 800 1.35rem/1 var(--serif); text-decoration: none; display: inline-flex; align-items: baseline; gap: 1px; }
.logo b { background: var(--accent); color: #15171c; padding: 2px 6px 3px; border-radius: 6px; margin-left: 2px; font-weight: 800; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.nav a { text-decoration: none; font-size: .92rem; padding: 6px 10px; border-radius: 8px; color: var(--muted); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--card); }
@media (max-width: 720px) { .nav a:not(.nav-cta) { display: none; } }
.nav-cta { background: var(--ink); color: var(--paper) !important; font-weight: 600; }

/* Hero */
.hero { padding: clamp(40px, 8vw, 88px) 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; gap: 28px; } }
.hero h1 em { font-style: normal; background: linear-gradient(transparent 62%, var(--accent) 62% 92%, transparent 92%); }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 38em; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 26px 0 18px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  font: 600 1rem/1 var(--sans); padding: 15px 22px; border-radius: 12px; border: 1.5px solid var(--ink);
  background: var(--card); color: var(--ink); text-decoration: none; transition: transform .12s, background .12s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-accent { background: var(--accent); color: #15171c; border-color: #15171c; }
.btn-ghost { border-color: var(--line-strong); background: transparent; }
.btn-sm { padding: 10px 14px; font-size: .9rem; border-radius: 10px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 0; list-style: none; font-size: .92rem; color: var(--muted); }
.trust li::before { content: '✓ '; color: var(--pos); font-weight: 700; }

.countdown {
  background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 26px;
  box-shadow: 6px 6px 0 var(--ink); position: relative;
}
.countdown .big { font: 800 clamp(4rem, 12vw, 6.5rem)/.9 var(--serif); letter-spacing: -.04em; }
.countdown .date { font: 700 1.15rem/1.3 var(--serif); margin-top: 10px; }
.countdown ul { margin: 18px 0 0; padding: 16px 0 0; border-top: 1px dashed var(--line-strong); list-style: none; font-size: .92rem; display: grid; gap: 6px; }
.countdown li { display: flex; justify-content: space-between; gap: 12px; }
.countdown li span:last-child { font-weight: 600; text-align: right; }

/* Sections */
section { padding: 48px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.section-head h2 { margin: 0; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* Quiz */
.quiz-shell { background: var(--card); border: 1.5px solid var(--ink); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; scroll-margin-top: 76px; }
.quiz-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px dashed var(--line-strong); font-size: .9rem; color: var(--muted); }
.quiz-top strong { color: var(--ink); }
.progress { height: 6px; background: var(--line); }
.progress > i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .25s ease; }
.quiz-body { padding: clamp(20px, 4vw, 40px); }
.q-num { font: 800 .95rem/1 var(--serif); color: var(--muted); margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font: 600 .78rem/1 var(--sans); letter-spacing: .04em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); }
.q-text { font: 700 clamp(1.4rem, 3.6vw, 2rem)/1.22 var(--serif); margin: 0 0 22px; letter-spacing: -.01em; min-height: 2.5em; }
.q-info { margin: -6px 0 22px; font-size: .95rem; }
.q-info summary { cursor: pointer; color: var(--muted); font-weight: 600; list-style: none; display: inline-flex; gap: 6px; }
.q-info summary::-webkit-details-marker { display: none; }
.q-info summary::before { content: 'ⓘ'; }
.q-info p { margin: 10px 0 0; padding: 12px 14px; background: var(--paper); border-radius: 10px; border-left: 3px solid var(--accent); }
.answers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
@media (max-width: 720px) { .answers { grid-template-columns: 1fr; } }
.ans {
  display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; min-height: 56px;
  font: 600 .98rem/1.2 var(--sans); padding: 12px 14px; border-radius: 12px;
  border: 1.5px solid var(--line-strong); background: var(--paper); color: var(--ink); transition: border-color .12s, background .12s, transform .12s;
}
@media (min-width: 721px) { .ans { flex-direction: column; justify-content: center; text-align: center; min-height: 112px; } }
.ans:hover { border-color: var(--ink); transform: translateY(-1px); }
.box { width: 26px; height: 26px; flex: none; border: 2px solid var(--ink); border-radius: 5px; display: grid; place-items: center; font: 800 18px/1 var(--sans); background: var(--card); }
.ans[aria-pressed="true"] { border-color: var(--ink); background: var(--accent-soft); }
.ans[aria-pressed="true"] .box::after { content: '✕'; }
.ans kbd { display: none; }
@media (min-width: 721px) and (hover: hover) { .ans kbd { display: inline; font: 500 .72rem var(--sans); color: var(--muted); } }
.quiz-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; }
.quiz-actions .left { display: flex; gap: 8px; flex-wrap: wrap; }
.star { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: .95rem; padding: 10px 14px; border-radius: 10px; border: 1.5px dashed var(--line-strong); background: transparent; color: var(--ink); }
.star[aria-pressed="true"] { border-style: solid; border-color: var(--ink); background: var(--accent); color: #15171c; }
.linkish { background: none; border: 0; color: var(--muted); font: 600 .95rem var(--sans); cursor: pointer; padding: 10px 6px; text-decoration: underline; text-underline-offset: 3px; }
.linkish:hover { color: var(--ink); }
.linkish:disabled { opacity: .35; cursor: default; }

.intro-card { text-align: center; padding: clamp(28px, 5vw, 56px) 20px; }
.intro-card p { max-width: 34em; margin-left: auto; margin-right: auto; }
.topic-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px 0 26px; padding: 0; list-style: none; }

/* Results */
.result-hero { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; padding-bottom: 26px; border-bottom: 1px dashed var(--line-strong); margin-bottom: 26px; }
@media (max-width: 560px) { .result-hero { grid-template-columns: 1fr; } }
.badge { width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 800 1.4rem/1 var(--serif); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.result-hero h2 { margin-bottom: .2em; }
.result-hero .pct { font: 800 clamp(2.6rem, 8vw, 3.6rem)/1 var(--serif); }
.bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: 92px 1fr 52px; gap: 12px; align-items: center; font-size: .95rem; }
.bar .name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .track { height: 14px; background: var(--paper); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.bar .track { display: block; }
.bar .fill { display: block; height: 100%; border-radius: 99px; width: 0; transition: width .7s cubic-bezier(.2, .8, .2, 1); }
.bar .val { font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; }
.bar .scope { font-weight: 400; color: var(--muted); font-size: .78rem; display: block; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 34px; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--paper); }
.panel h3 { margin-bottom: 12px; }
.compass text { font: 600 11px var(--sans); fill: var(--muted); }
.compass .pl { font: 700 10.5px var(--sans); fill: var(--ink); }
.topic-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.topic-table td { padding: 9px 4px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.topic-table td:last-child { text-align: right; font-weight: 700; white-space: nowrap; }
.topic-table td:nth-child(2) { white-space: nowrap; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 0; border: 1px solid rgba(0,0,0,.25); }
.share { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.compare-q { padding: 14px 0; border-bottom: 1px solid var(--line); }
.compare-q p { margin: 0 0 8px; font-weight: 600; }
.compare-q .row { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .88rem; color: var(--muted); }
.compare-q .row b { color: var(--ink); }
.match { font-weight: 700; }
.match.ok { color: var(--pos); } .match.ko { color: var(--neg); }
.notice { background: var(--accent-soft); border-radius: 12px; padding: 12px 16px; font-size: .93rem; margin-bottom: 20px; }
select { font: inherit; padding: 8px 10px; border-radius: 10px; border: 1.5px solid var(--line-strong); background: var(--card); color: var(--ink); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-decoration: none; transition: border-color .12s, transform .12s; }
.card:hover { border-color: var(--ink); transform: translateY(-2px); }
.card h3 { margin: 8px 0 6px; }
.card p { font-size: .93rem; color: var(--muted); margin: 0; }
.card .ico { font: 700 1.5rem/1 var(--serif); width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft); }
.party-card { border-top: 5px solid var(--pc, var(--ink)); }

/* Topic / party pages */
.page-head { padding: 44px 0 20px; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 16px; }
.crumbs a { color: var(--muted); }
.qblock { padding: 28px 0; border-top: 1px solid var(--line); }
.qblock h2 { font-size: clamp(1.25rem, 2.6vw, 1.55rem); }
.stance-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
@media (max-width: 640px) { .stance-grid { grid-template-columns: 1fr; } }
.stance { border-radius: 12px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); }
.stance h3 { font: 700 .78rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; margin: 0 0 10px; color: var(--muted); }
.stance.yes h3 { color: var(--pos); } .stance.no h3 { color: var(--neg); }
.plist { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.plist li a, .plist li span { display: inline-flex; align-items: center; font-size: .88rem; font-weight: 600; padding: 4px 9px; border-radius: 99px; background: var(--paper); border: 1px solid var(--line); text-decoration: none; }
.plist .strong { border-color: var(--ink); }
.plist .dot, .bar .dot { flex: none; }
.pos-table { width: 100%; border-collapse: collapse; }
.pos-table th, .pos-table td { text-align: left; padding: 12px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.pos-table th { font: 700 .78rem var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.pos-table td:last-child { white-space: nowrap; font-weight: 700; }
.pill-pos { color: var(--pos); } .pill-neg { color: var(--neg); } .pill-neu { color: var(--muted); }
.cta-band { background: var(--ink); color: var(--paper); border-radius: 18px; padding: clamp(24px, 4vw, 40px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin: 40px 0; }
.cta-band h2 { margin: 0; color: var(--paper); }
.cta-band .btn { border-color: var(--paper); }
.prose h2 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--ink); }
.timeline li { position: relative; padding: 0 0 22px 22px; }
.timeline li::before { content: ''; position: absolute; left: -8px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 2px solid var(--ink); }
.timeline time { font: 700 1.05rem var(--serif); display: block; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font: 700 1.1rem/1.35 var(--serif); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 400 1.5rem/1 var(--sans); color: var(--muted); }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; margin-top: 40px; font-size: .9rem; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a { text-decoration: none; } .site-footer a:hover { text-decoration: underline; }
.site-footer h3 { font: 700 .8rem var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--ink); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
