:root {
  color-scheme: light;
  --ink: #1c2035;
  --ink-soft: #40435a;
  --subtle: #5b5c6d;
  --navy: #1c2035;
  --cream: #f9f6ee;
  --faint: #f2eee5;
  --white: #fffefa;
  --purple: #d3c7fa;
  --purple-dark: #54378e;
  --line: #ded8cb;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 1rem/1.65 var(--sans); }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: .23em; }
button, input { font: inherit; }
button { color: inherit; }
:focus-visible { outline: 3px solid #805ac9; outline-offset: 4px; }
section[id] { scroll-margin-top: 1.5rem; }
strong { font-weight: 700; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.12; }
.wrap { width: min(var(--max), calc(100% - 5rem)); margin-inline: auto; }
.eyebrow { font-size: .78rem; font-weight: 750; line-height: 1.35; letter-spacing: .12em; text-transform: uppercase; }
.skip-link { position: absolute; left: 1rem; top: -10rem; z-index: 4; padding: .65rem 1rem; background: white; }
.skip-link:focus { top: 1rem; }

.masthead { background: var(--cream); }
.header-inner, .footer-inner { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wordmark { display: inline-flex; gap: .65rem; align-items: center; font-weight: 775; letter-spacing: -.027em; text-decoration: none; white-space: nowrap; }
.brand-icon { position: relative; display: inline-flex; flex: 0 0 23px; width: 23px; height: 23px; border: 1.7px solid currentColor; border-radius: 4px; }
.brand-icon::after { content: ''; position: absolute; left: 6px; top: 3px; width: 7px; height: 11px; border: solid currentColor; border-width: 0 1.8px 1.8px 0; transform: rotate(40deg); }
nav { display: flex; align-items: center; gap: clamp(.8rem, 3vw, 2.3rem); }
nav a { font-size: .93rem; font-weight: 650; text-decoration: none; }
nav a:hover, .wordmark:hover { text-decoration: underline; }

.hero { color: var(--cream); background: var(--navy); overflow: hidden; }
.hero-inner { position: relative; min-height: 487px; display: grid; grid-template-columns: 1.27fr 1fr; align-items: center; }
.hero-copy { z-index: 1; padding: 3.7rem 0 4rem; }
.hero-kicker { color: #f3edf9; display: flex; align-items: center; flex-wrap: wrap; gap: .63rem; margin-bottom: 1.45rem; }
.hero-kicker > span:first-child { width: .5rem; height: .5rem; border-radius: 50%; background: var(--purple); }
.kicker-divider { width: 1px; height: .83rem; background: #77768b; margin-inline: .15rem; }
.hero h1 { color: var(--cream); font: 400 clamp(4rem, 7.6vw, 7.1rem)/.9 var(--serif); letter-spacing: -.07em; margin: 0 0 1.5rem; }
.hero h1 em { color: var(--purple); font-weight: 400; }
.hero-intro { color: #e5e3ed; font-size: clamp(1rem, 1.7vw, 1.18rem); max-width: 31rem; margin-bottom: 1.7rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem 1.5rem; align-items: center; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; padding: .65rem 1.16rem; border: 1px solid transparent; border-radius: .35rem; background: var(--navy); color: var(--cream); font-weight: 720; line-height: 1.35; text-decoration: none; cursor: pointer; }
.button:hover { background: #383859; }
.button:disabled { cursor: default; color: #666475; border-color: #e0dcd4; background: #eeebe4; }
.button.primary { background: var(--purple); color: var(--navy); padding: .78rem 1.2rem; }
.button.primary:hover { background: #eee4ff; }
.button.secondary { color: var(--navy); background: transparent; border-color: #c5bdcf; }
.button.secondary:hover { background: #f1eaf9; }
.hero-browse { color: var(--cream); font-weight: 660; }
.hero-browse:hover { color: var(--purple); }
.hero-art { position: relative; height: 100%; min-height: 360px; isolation: isolate; }
.art-arc { position: absolute; z-index: -1; border: 1px solid #54516e; border-radius: 50%; width: 570px; height: 570px; top: -42px; right: -57px; }
.arc-two { width: 510px; height: 510px; top: -12px; right: -27px; }
.arc-three { width: 450px; height: 450px; top: 18px; right: 3px; }
.art-paper { position: absolute; width: min(78%, 320px); min-height: 330px; top: 50%; left: 49%; border-radius: .46rem; }
.paper-back { background: #ada5d4; transform: translate(-47%, -48%) rotate(13deg); box-shadow: 0 18px 38px #14152555; }
.paper-front { transform: translate(-52%, -50%) rotate(-9deg); padding: 1.7rem; color: var(--ink); background: #faf7eb; box-shadow: 0 10px 40px #14152530; display: flex; flex-direction: column; }
.paper-kicker { font-size: .65rem; line-height: 1.3; font-weight: 800; letter-spacing: .1em; color: var(--subtle); }
.paper-title { font: 400 clamp(1.3rem, 2.35vw, 1.95rem)/1.03 var(--serif); letter-spacing: -.05em; margin: .45rem 0 .65rem; }
.paper-rule { height: 2px; background: var(--ink); margin-bottom: .35rem; }
.paper-item { display: flex; gap: .65rem; align-items: center; min-height: 2.45rem; font-weight: 640; border-bottom: 1px solid #dad4c9; }
.paper-box { width: 1.18rem; height: 1.18rem; border: 1px solid #8a8397; border-radius: 2px; position: relative; }
.paper-box.tick::after { position: absolute; content: ''; left: .33rem; top: .01rem; height: .79rem; width: .43rem; border: solid var(--purple-dark); border-width: 0 2px 2px 0; transform: rotate(35deg); }
.paper-footer { display: flex; gap: .35rem; margin: 1.04rem 0 0; }
.paper-footer span { width: 1.3rem; height: .28rem; background: #b8afd4; border-radius: 2px; }
.paper-footer span:nth-child(2) { width: 2.2rem; }
.paper-footer span:nth-child(3) { width: .8rem; }
.election-strip { border-bottom: 1px solid var(--line); background: #f1ecdf; }
.strip-inner { min-height: 60px; display: flex; justify-content: space-between; align-items: center; gap: .5rem 1.5rem; flex-wrap: wrap; padding-block: .65rem; font-size: .91rem; }
.strip-inner strong { margin-right: .4rem; }
.strip-inner a { font-weight: 680; }

.page-section { padding-block: clamp(3.1rem, 7vw, 6rem); }
.section-heading { margin-bottom: 1.6rem; }
.section-kicker { color: var(--purple-dark); margin-bottom: .6rem; }
.section-heading h2 { font: 400 clamp(2.45rem, 5vw, 4.05rem)/1.02 var(--serif); letter-spacing: -.061em; margin: 0 0 .65rem; }
.section-heading p:last-child { color: var(--subtle); margin: 0; font-size: 1.02rem; }
.quiz-shell { max-width: 810px; border: 1px solid var(--line); border-radius: .9rem; background: var(--white); padding: clamp(1rem, 4vw, 2.1rem); box-shadow: 0 9px 0 #ded5e233; }
.quiz-meta { display: flex; gap: 1rem; justify-content: space-between; align-items: baseline; color: var(--subtle); font-size: .9rem; font-weight: 630; }
.progress-track { height: .42rem; border-radius: 1rem; background: #eee8f4; overflow: hidden; margin: .5rem 0 1.53rem; }
.progress-fill { height: 100%; border-radius: inherit; background: #8568ba; }
.question-topic { color: var(--purple-dark); margin: 0 0 .35rem; }
.question-title { font: 400 clamp(1.6rem, 3.5vw, 2.52rem)/1.12 var(--serif); letter-spacing: -.045em; margin-bottom: .6rem; }
.question-context { color: var(--subtle); margin-bottom: 1.35rem; }
.answers { padding: 0; margin: 0 0 1rem; border: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .35rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip: rect(0,0,0,0); overflow: hidden; white-space: nowrap; border: 0; }
.answer-option { position: relative; cursor: pointer; }
.answer-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.answer-option span { min-height: 3.45rem; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--cream); text-align: center; font-size: .94rem; line-height: 1.23; font-weight: 650; padding: .55rem .35rem; border-radius: .32rem; border: 1px solid var(--line); }
.answer-option span:hover { border-color: #ac98c6; background: #f5eefb; }
.answer-option input:checked + span { background: #e8def8; color: #2e1e4e; border-color: #7254a4; box-shadow: inset 0 0 0 1px #7254a4; }
.answer-option input:focus-visible + span { outline: 3px solid #805ac9; outline-offset: 2px; }
.priority { display: inline-flex; align-items: center; gap: .53rem; min-height: 40px; margin-bottom: .55rem; cursor: pointer; font-size: .94rem; font-weight: 620; }
.priority input { width: 1.13rem; height: 1.13rem; margin: 0; accent-color: #7656a7; }
.priority-note { color: var(--subtle); font-weight: 400; }
.quiz-footer { border-top: 1px solid var(--line); padding-top: 1rem; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.quiz-footer .quiz-forward { margin-left: auto; }
.text-button { color: var(--purple-dark); background: none; border: 0; font-weight: 680; padding: .45rem .55rem; min-height: 44px; cursor: pointer; text-underline-offset: .23em; }
.text-button:hover { text-decoration: underline; }
.notice { border-left: 3px solid #805ac9; padding: .65rem .9rem; background: #f1edf9; margin: .7rem 0 0; color: var(--ink); }

.results { max-width: 930px; scroll-margin-top: 1.2rem; margin-top: 3rem; }
.results:focus { outline: 0; }
.results-header { display: flex; align-items: flex-start; gap: .8rem 1.5rem; flex-wrap: wrap; justify-content: space-between; }
.results-header h3 { margin: 0; font: 400 clamp(2.1rem, 4vw, 3rem)/1.07 var(--serif); letter-spacing: -.057em; }
.results-intro { color: var(--subtle); max-width: 45rem; margin: .65rem 0 1rem; }
.result-group { margin-top: 1.45rem; }
.result-group > h4 { margin: 0 0 .6rem; font-size: 1.06rem; }
.result-group > p { color: var(--subtle); margin: 0 0 .8rem; }
.result-card { border-radius: .55rem; border: 1px solid var(--line); background: var(--white); margin-bottom: .55rem; overflow: clip; }
.result-card summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) 6.8rem 1.1rem; align-items: center; gap: .4rem .8rem; padding: .73rem .9rem; }
.result-card summary::marker, .candidate-card summary::marker { content: ''; }
.result-card summary::-webkit-details-marker, .candidate-card summary::-webkit-details-marker { display: none; }
.result-card summary:hover, .candidate-card summary:hover { background: #f4effa; }
.result-card summary:focus-visible, .candidate-card summary:focus-visible { outline-offset: -4px; }
.result-rank { display: grid; place-items: center; min-width: 2.1rem; height: 2.1rem; border-radius: .26rem; background: #eee6f6; color: #4c3670; font-weight: 760; }
.result-rank.empty { color: var(--subtle); background: var(--faint); }
.result-name { display: block; line-height: 1.25; font-size: 1.05rem; }
.result-party, .result-coverage { display: block; font-size: .82rem; line-height: 1.4; color: var(--subtle); }
.result-score { text-align: right; font-weight: 760; }
.result-score strong { font-size: 1.12rem; }
.result-body { padding: .95rem 1rem 1.2rem; border-top: 1px solid var(--line); }
.result-actions { display: flex; gap: .75rem; align-items: baseline; flex-wrap: wrap; justify-content: space-between; margin-bottom: .7rem; }
.result-actions a { color: var(--purple-dark); font-weight: 670; font-size: .93rem; }
.filters { display: flex; gap: .3rem; flex-wrap: wrap; }
.filter-button { cursor: pointer; background: transparent; border: 1px solid var(--line); border-radius: .25rem; min-height: 40px; padding: .34rem .56rem; font-size: .84rem; font-weight: 660; }
.filter-button:hover, .filter-button[aria-pressed="true"] { background: #eee5f8; border-color: #baa6d5; color: #3e265f; }
.issue-row { padding-block: .68rem; border-top: 1px solid var(--line); }
.issue-row h5 { margin: 0 0 .15rem; font-size: .98rem; line-height: 1.35; }
.issue-row p { color: var(--ink-soft); font-size: .93rem; margin-bottom: .35rem; }
.issue-row .issue-compare { color: var(--subtle); font-size: .85rem; }
.empty-filter { color: var(--subtle); margin: .5rem 0; }

.candidates-section { background: #eeeadf; border-block: 1px solid var(--line); }
.candidate-heading { display: flex; justify-content: space-between; gap: .45rem 2rem; align-items: end; }
.candidate-heading > p { max-width: 24rem; padding-bottom: .65rem; }
.candidate-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: .75rem; }
.candidate-card { background: var(--white); border: 1px solid var(--line); border-radius: .55rem; overflow: clip; scroll-margin-top: 1rem; }
.candidate-card summary { cursor: pointer; display: flex; align-items: center; gap: .85rem; padding: .85rem 1rem; list-style: none; min-height: 82px; }
.candidate-mark { display: grid; border-radius: .3rem; place-items: center; width: 2.66rem; height: 2.66rem; flex: 0 0 2.66rem; color: var(--ink); border: 1px solid #d4c9e5; background: #eee8f6; box-shadow: inset 0 -3px 0 var(--candidate-accent, #9875bf); font-size: .84rem; font-weight: 790; letter-spacing: .025em; }
.candidate-name { display: block; font: 400 clamp(1.19rem, 2.36vw, 1.56rem)/1.03 var(--serif); letter-spacing: -.038em; margin: 0 0 .2rem; }
.candidate-party { display: block; color: var(--subtle); font-size: .87rem; line-height: 1.3; }
.expander { width: .55rem; height: .55rem; justify-self: center; margin-left: auto; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translateY(-2px); flex: 0 0 .55rem; }
[open] > summary .expander { transform: rotate(225deg) translate(-2px, -2px); }
.candidate-body { border-top: 1px solid var(--line); padding: .95rem 1rem 1.15rem; }
.candidate-body h3 { font: 725 1.05rem/1.3 var(--sans); margin: 1.1rem 0 .4rem; }
.candidate-body h3:first-child { margin-top: 0; }
.candidate-body p { font-size: .95rem; color: var(--ink-soft); margin-bottom: .38rem; }
.policy-list { margin: 0; padding: 0; list-style: none; }
.policy-list li { border-top: 1px solid var(--line); padding-top: .58rem; margin-top: .62rem; }
.policy-label { font-size: .94rem; font-weight: 750; }
.evidence-kind { font-size: .75rem; line-height: 1.15; font-weight: 730; color: #563d7c; background: #f0e8f8; border-radius: .25rem; padding: .21rem .38rem; display: inline-block; vertical-align: .09em; margin: 0 .2em .2em .25em; }
.source-links { display: flex; flex-wrap: wrap; gap: .15rem .7rem; font-size: .86rem; line-height: 1.4; color: var(--purple-dark); font-weight: 610; }
.source-links a { padding-block: .18rem; overflow-wrap: anywhere; }
.source-links a:hover { color: var(--navy); }

.method-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.method-card, .source-panel { border: 1px solid var(--line); background: var(--white); border-radius: .55rem; padding: 1.1rem 1.25rem; }
.method-card h3, .source-panel h3 { margin: 0 0 .4rem; font-size: 1.06rem; }
.method-card p, .source-panel p { margin: 0 0 .5rem; color: var(--ink-soft); font-size: .94rem; }
.method-card p:last-child, .source-panel p:last-child { margin-bottom: 0; }
.source-panel { margin-top: 1rem; display: flex; justify-content: space-between; align-items: center; gap: .55rem 1rem; flex-wrap: wrap; }
.site-footer { background: var(--navy); color: var(--cream); }
.footer-inner { min-height: 82px; }
.footer-inner p { color: #e4e1ed; font-size: .89rem; margin: 0; }

@media (max-width: 850px) {
  .wrap { width: min(var(--max), calc(100% - 3rem)); }
  .hero-inner { min-height: 430px; }
  .hero h1 { font-size: clamp(3.55rem, 8.5vw, 5.6rem); }
  .art-paper { width: min(81%, 280px); min-height: 285px; }
  .paper-front { padding: 1.05rem; }
  .paper-item { min-height: 2.15rem; font-size: .88rem; }
  .art-arc { right: -140px; }
  .arc-two { right: -110px; }
  .arc-three { right: -80px; }
  .strip-inner { justify-content: flex-start; }
}

@media (max-width: 620px) {
  .wrap { width: calc(100% - 2rem); }
  .header-inner { min-height: 64px; row-gap: .25rem; flex-wrap: wrap; padding-block: .6rem; }
  nav { gap: .9rem; }
  nav a { font-size: .85rem; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-copy { padding-block: 2.65rem 1.2rem; }
  .hero h1 { font-size: clamp(3.35rem, 10.9vw, 5.15rem); margin-bottom: 1.1rem; }
  .desktop-break { display: none; }
  .hero-kicker { letter-spacing: .08em; margin-bottom: .95rem; }
  .hero-intro { margin-bottom: 1.2rem; }
  .hero-art { min-height: 164px; height: 164px; margin-top: .5rem; overflow: clip; margin-inline: -1rem; }
  .art-paper { width: 210px; min-height: 250px; top: 104%; }
  .paper-front { padding: .8rem; }
  .paper-title { font-size: 1.37rem; }
  .paper-kicker { font-size: .53rem; }
  .paper-item { min-height: 1.8rem; }
  .art-arc { width: 400px; height: 400px; top: -12px; right: calc(50% - 200px); }
  .arc-two { width: 354px; height: 354px; top: 11px; right: calc(50% - 177px); }
  .arc-three { width: 308px; height: 308px; top: 34px; right: calc(50% - 154px); }
  .strip-inner { gap: .15rem .85rem; font-size: .82rem; }
  .candidate-heading { flex-direction: column; align-items: start; }
  .candidate-heading > p { padding-bottom: 0; }
  .candidate-grid, .method-grid { grid-template-columns: 1fr; }
  .answers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .answer-option:last-child { grid-column: 1 / -1; }
  .answer-option span { min-height: 44px; }
  .priority { flex-wrap: wrap; gap: .35rem; }
  .quiz-footer .quiz-forward { margin-left: 0; }
  .result-card summary { grid-template-columns: 1.8rem minmax(0, 1fr) 5.3rem .8rem; gap: .32rem .45rem; padding-inline: .55rem; }
  .result-rank { min-width: 1.8rem; height: 1.8rem; }
  .result-coverage { font-size: .75rem; }
  .footer-inner { align-items: start; justify-content: center; flex-direction: column; gap: .3rem; padding-block: .75rem; }
}

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