:root {
  --paper: #f5f1e9;
  --paper-strong: #fffdf8;
  --ink: #172321;
  --muted: #66726e;
  --line: #d9d8ce;
  --accent: #e4573f;
  --accent-dark: #a83a2c;
  --teal: #1e6d68;
  --soft-teal: #dcebe6;
  --soft-red: #f9e2dc;
  --similarity-high: #1e6d68;
  --similarity-middle: #a8791d;
  --similarity-low: #b44b3c;
  --shadow: 0 12px 34px rgba(23, 35, 33, 0.07);
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 85% 0%, rgba(228, 87, 63, 0.1), transparent 25rem),
    var(--paper);
}

button, a { font: inherit; }
button { cursor: pointer; }

.site-header,
.site-footer,
.app-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0;
}

.site-nav { display: flex; align-items: center; gap: 22px; }

.brand {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.brand span { color: var(--accent); }

.text-button,
.link-button,
.nav-button {
  padding: 0;
  border: 0;
  color: var(--teal);
  background: transparent;
  font-weight: 700;
}

.nav-button { position: relative; }
.nav-button::after { position: absolute; right: 0; bottom: -8px; left: 0; height: 2px; background: var(--accent); content: ""; opacity: 0; transform: scaleX(0.5); transition: opacity 160ms ease, transform 160ms ease; }
.nav-button.is-active::after, .nav-button:hover::after { opacity: 1; transform: scaleX(1); }

.text-button:hover,
.link-button:hover { color: var(--accent-dark); }

.app-shell { min-height: calc(100vh - 150px); }
.site-footer { padding: 22px 0 34px; color: var(--muted); font-size: 0.82rem; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: clamp(2rem, 7vw, 7rem);
  align-items: center;
  min-height: 520px;
  padding: 38px 0 72px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; letter-spacing: -0.045em; }
h1 { max-width: 680px; margin-bottom: 20px; font-size: clamp(2.55rem, 4.8vw, 4.45rem); line-height: 0.98; }
h2 { margin-bottom: 12px; font-size: clamp(1.8rem, 3.6vw, 2.7rem); line-height: 1.02; }
h3 { margin-bottom: 8px; font-size: 1.05rem; }
.lead { max-width: 600px; color: #45534f; font-size: clamp(1rem, 1.5vw, 1.15rem); line-height: 1.6; }

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fffdf8;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease;
}

.button:hover { transform: translateY(-2px); background: var(--teal); }
.button.secondary { border-color: var(--line); background: transparent; color: var(--ink); }
.button.secondary:hover { background: var(--paper-strong); }
.button.small { min-height: 40px; padding: 0 15px; font-size: 0.9rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.hero-note {
  max-width: 420px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.5;
}
.public-source-link { display: inline-block; margin-top: 8px; color: var(--teal); font-weight: 800; text-decoration: none; }
.public-source-link:hover { color: var(--accent-dark); text-decoration: underline; }

.hero-card,
.question-card,
.result-card,
.method-card,
.summary-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.78);
  box-shadow: var(--shadow);
}

.hero-card { padding: 28px; }
.hero-card .card-number { color: var(--accent); font: 700 2.8rem/1 Georgia, serif; }
.hero-card h3 { margin-top: 10px; font: 700 1.45rem/1.08 Georgia, serif; }
.hero-card p { color: var(--muted); line-height: 1.55; }
.rule-list { margin: 24px 0 0; padding: 0; list-style: none; }
.rule-list li { padding: 15px 0; border-top: 1px solid var(--line); color: #40504c; line-height: 1.4; }
.hero-card-link { margin-top: 22px; }

.quiz-wrap { max-width: 880px; margin: 0 auto; padding: 40px 0 72px; }
.progress-line { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 12px; color: var(--muted); font-size: 0.82rem; font-weight: 800; }
.progress-track { height: 5px; overflow: hidden; border-radius: 99px; background: #ddddd4; }
.progress-value { height: 100%; border-radius: inherit; background: var(--accent); transition: width 220ms ease; }
.question-card { margin-top: 28px; padding: clamp(24px, 4vw, 40px); }
.question-card h1 { max-width: 700px; margin-bottom: 16px; font-size: clamp(2.05rem, 3.9vw, 3.25rem); line-height: 1.01; }
.question-context { max-width: 680px; color: var(--muted); line-height: 1.55; }
.question-explainer { max-width: 680px; margin-top: 20px; border: 1px solid var(--line); border-radius: 12px; background: rgba(245, 241, 233, 0.72); }
.question-explainer summary { display: flex; justify-content: space-between; gap: 14px; padding: 12px 14px; font-size: 0.82rem; }
.question-explainer summary small { color: var(--muted); font-size: 0.76rem; font-weight: 600; }
.question-explainer-content { display: grid; gap: 15px; padding: 0 14px 2px; }
.explainer-section { display: grid; gap: 6px; }
.question-explainer-content p { margin: 0; color: #4d5b56; font-size: 0.88rem; line-height: 1.5; }
.explainer-list { display: grid; gap: 7px; margin: 0; padding-left: 18px; color: #4d5b56; font-size: 0.88rem; line-height: 1.5; }
.explainer-meta { color: var(--muted) !important; font-size: 0.76rem !important; }
.explainer-callout { padding: 12px 14px; border-left: 3px solid var(--accent); background: rgba(249, 226, 220, 0.55); }
.explainer-callout strong { display: block; margin-bottom: 5px; font-size: 0.8rem; }
.question-explainer-content a,
.inline-source { color: var(--teal); font-size: 0.78rem; font-weight: 800; text-decoration: none; }
.question-explainer .details-close { margin: 0 14px 12px auto; }
.question-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 24px 0 30px; color: var(--muted); font-size: 0.86rem; }
.question-meta a { color: var(--teal); font-weight: 800; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 30px; }
.choice {
  min-height: 110px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper-strong);
  color: var(--ink);
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}
.choice:hover { border-color: var(--teal); background: var(--soft-teal); transform: translateY(-2px); }
.choice strong { display: block; margin-bottom: 8px; font-size: 1.2rem; }
.choice span { color: var(--muted); font-size: 0.88rem; }
.question-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 28px; }

.result-wrap { padding: 40px 0 72px; }
.result-heading { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 34px; align-items: start; margin-bottom: 24px; }
.result-heading h1 { max-width: 760px; margin-bottom: 12px; font-size: clamp(2.55rem, 4.4vw, 4.15rem); }
.result-intro { max-width: 680px; margin-bottom: 0; color: var(--muted); line-height: 1.55; }
.summary-card { padding: 20px; }
.summary-card strong { display: block; margin: 5px 0 5px; font: 700 2rem/1 Georgia, serif; }
.summary-card p { margin-bottom: 0; color: var(--muted); line-height: 1.45; }
.results-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.result-card { padding: 22px; box-shadow: none; }
.result-card.top { border-color: rgba(228, 87, 63, 0.55); box-shadow: 0 12px 28px rgba(228, 87, 63, 0.08); }
.party-head { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.party-name { margin-bottom: 6px; font: 700 1.65rem/1 Georgia, serif; }
.party-rank { color: var(--accent-dark); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.party-score { font: 700 2rem/1 Georgia, serif; color: var(--teal); white-space: nowrap; }
.score-note { margin-bottom: 15px; color: var(--muted); font-size: 0.84rem; }
.score-bar { height: 8px; margin: 10px 0 18px; overflow: hidden; border-radius: 99px; background: #e7e4db; }
.score-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.question-mini { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid #e6e3da; font-size: 0.82rem; }
.question-mini span { color: var(--muted); }
.mini-status { font-weight: 800; }
.mini-status.good { color: var(--teal); }
.mini-status.neutral { color: var(--muted); }
.mini-status.warn { color: var(--accent-dark); }
details { margin-top: 18px; border-top: 1px solid var(--line); }
summary { padding-top: 16px; color: var(--teal); cursor: pointer; font-size: 0.88rem; font-weight: 800; list-style: none; }
summary::-webkit-details-marker { display: none; }
.accordion-icon { flex: 0 0 auto; width: 20px; color: var(--teal); font: 700 1.25rem/1 system-ui, sans-serif; text-align: center; }
.accordion-icon::before { content: "+"; }
details[open] > summary .accordion-icon::before { content: "−"; }
.question-explainer summary .accordion-icon { margin-left: auto; }
.featured-party details > summary { display: flex; align-items: center; gap: 12px; }
.featured-party details > summary .accordion-icon { margin-left: auto; }
.nominal-details summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.details-close { display: block; margin: 14px 0 0 auto; padding: 0; border: 0; color: var(--teal); background: transparent; font-size: 0.78rem; font-weight: 800; cursor: pointer; }
.details-close:hover { color: var(--accent-dark); }
.nominal-group { padding: 13px 0 0; }
.nominal-group h4 { margin: 0 0 7px; font-size: 0.82rem; }
.nominal-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.nominal-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #ebe8df; font-size: 0.82rem; }
.nominal-list small { color: var(--muted); text-align: right; }
.vote-supports { color: var(--teal); font-weight: 800; }
.vote-opposes { color: var(--accent-dark); font-weight: 800; }
.vote-obstruction, .vote-absent { color: var(--muted); font-weight: 800; }
.method-card { margin-top: 18px; padding: 24px; box-shadow: none; }
.method-card h3 { font: 700 1.35rem/1.1 Georgia, serif; }
.method-card p { margin-bottom: 0; color: var(--muted); line-height: 1.55; }
.method-card .public-source-link { margin-top: 16px; font-size: 0.86rem; }
.answer-review { display: grid; gap: 8px; margin: 22px 0; }
.answer-review div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.answer-review span { color: var(--muted); }
.error-box { margin-top: 80px; padding: 28px; border: 1px solid #e3b5ab; border-radius: var(--radius); background: var(--soft-red); }

.metric-label,
.detail-label {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.metrics-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 46px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.metrics-strip > div { padding: 16px 18px 15px 0; }
.metrics-strip > div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.metrics-strip strong { display: inline-block; margin: 6px 8px 0 0; font: 700 1.65rem/1 Georgia, serif; }
.metrics-strip small { color: var(--muted); font-size: 0.82rem; }
.result-section, .limited-section, .vote-distribution { margin-top: 48px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 18px; }
.section-heading .eyebrow { margin-bottom: 8px; }
.section-heading h2 { margin-bottom: 0; }
.section-heading > p { max-width: 420px; margin-bottom: 2px; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.similarity-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: -2px 0 16px; color: var(--muted); font-size: 0.76rem; font-weight: 700; }
.similarity-legend span { display: inline-flex; align-items: center; gap: 7px; }
.similarity-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.similarity-legend .high i { background: var(--similarity-high); }
.similarity-legend .middle i { background: var(--similarity-middle); }
.similarity-legend .low i { background: var(--similarity-low); }
.featured-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.featured-party { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 253, 248, 0.82); }
.featured-party.is-leading { border-color: rgba(228, 87, 63, 0.6); box-shadow: 0 10px 28px rgba(228, 87, 63, 0.07); }
.featured-party.similarity-high { border-color: color-mix(in srgb, var(--similarity-high) 42%, var(--line)); }
.featured-party.similarity-middle { border-color: color-mix(in srgb, var(--similarity-middle) 42%, var(--line)); }
.featured-party.similarity-low { border-color: color-mix(in srgb, var(--similarity-low) 42%, var(--line)); }
.featured-top { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.featured-top h3 { margin: 6px 0 0; font: 700 1.45rem/1 Georgia, serif; }
.featured-top > strong { color: var(--teal); font: 700 1.7rem/1 Georgia, serif; }
.featured-party.similarity-high .featured-top > strong, .featured-party.similarity-high .similarity-tier-label { color: var(--similarity-high); }
.featured-party.similarity-middle .featured-top > strong, .featured-party.similarity-middle .similarity-tier-label { color: var(--similarity-middle); }
.featured-party.similarity-low .featured-top > strong, .featured-party.similarity-low .similarity-tier-label { color: var(--similarity-low); }
.similarity-tier-label { margin: -4px 0 12px !important; font-size: 0.72rem !important; font-weight: 800; }
.featured-party > p { margin: 12px 0; color: var(--muted); font-size: 0.82rem; }
.coverage-note { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 0.76rem !important; line-height: 1.4; }
.coverage-note.is-sufficient { border-color: rgba(30, 109, 104, 0.25); background: rgba(30, 109, 104, 0.06); color: var(--teal); }
.coverage-note.is-limited { border-color: rgba(228, 87, 63, 0.28); background: rgba(249, 226, 220, 0.45); color: var(--accent-dark); }
.score-dots { display: flex; gap: 5px; margin: 16px 0 6px; }
.score-dot { width: 100%; height: 5px; border-radius: 99px; background: var(--teal); }
.score-dot.is-warn { background: var(--accent); }
.score-dot.is-muted { background: #c5c6bd; }
.featured-party details { margin-top: 14px; }
.featured-party .party-row-detail { grid-template-columns: 1fr; gap: 24px; margin-top: 16px; padding: 16px 0 4px; }
.featured-party .breakdown-row { align-items: flex-start; }
.featured-party .breakdown-row .mini-status { align-self: flex-start; }
.party-table-heading { display: flex; justify-content: space-between; margin: 32px 0 8px; color: var(--muted); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.party-table { border-top: 1px solid var(--line); }
.party-row { border-bottom: 1px solid var(--line); }
.party-row > summary { display: grid; grid-template-columns: 42px minmax(160px, 1fr) minmax(80px, 0.65fr) 70px 24px; gap: 14px; align-items: center; padding: 15px 4px; list-style: none; }
.party-row > summary::-webkit-details-marker { display: none; }
.party-rank-cell { color: var(--muted); font-variant-numeric: tabular-nums; }
.party-cell { display: grid; gap: 3px; }
.party-cell strong { font-size: 0.95rem; }
.party-cell small { color: var(--muted); font-size: 0.77rem; }
.party-progress { height: 6px; overflow: hidden; border-radius: 99px; background: #e4e3d9; }
.party-progress > span { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.party-row.similarity-high .party-score-cell { color: var(--similarity-high); }
.party-row.similarity-middle .party-score-cell { color: var(--similarity-middle); }
.party-row.similarity-low .party-score-cell { color: var(--similarity-low); }
.party-row.similarity-high .similarity-fill { background: var(--similarity-high); }
.party-row.similarity-middle .similarity-fill { background: var(--similarity-middle); }
.party-row.similarity-low .similarity-fill { background: var(--similarity-low); }
.party-score-cell { font: 700 1.1rem/1 Georgia, serif; text-align: right; }
.row-caret { color: var(--teal); font-size: 1.25rem; text-align: right; }
.party-row-detail { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 28px; padding: 16px 16px 22px 56px; background: rgba(245, 241, 233, 0.55); }
.party-lineage-note { grid-column: 1 / -1; margin: 0; padding: 11px 13px; border-left: 3px solid var(--accent); background: rgba(249, 226, 220, 0.5); color: #6d5b42; font-size: 0.8rem; line-height: 1.45; }
.party-lineage-note strong { color: var(--ink); }
.breakdown-list { margin-top: 10px; border-top: 1px solid var(--line); }
.breakdown-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.breakdown-row strong { display: block; font-size: 0.84rem; }
.breakdown-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 0.74rem; line-height: 1.35; }
.breakdown-row .vote-counts { color: var(--ink); font-weight: 700; }
.breakdown-row .party-history-note { color: #6d5b42; }
.breakdown-row .party-composition { color: #6d5b42; }
.breakdown-row .vote-interpretation { color: var(--teal); }
.muted-copy { color: var(--muted); font-size: 0.82rem; line-height: 1.5; }
.nominal-details { margin-top: 12px; }
.limited-list { border-top: 1px solid var(--line); }
.limited-party { margin: 0; border-top: 0; border-bottom: 1px solid var(--line); }
.limited-party > summary { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 15px 4px; list-style: none; }
.limited-party > summary::-webkit-details-marker { display: none; }
.limited-party > summary > span:first-child { display: grid; gap: 4px; }
.limited-party > summary strong { font-size: 0.94rem; }
.limited-party > summary small { color: var(--muted); font-size: 0.78rem; }
.limited-party-detail { padding: 0 4px 18px 4px; }
.coverage-explanation { max-width: 720px; padding: 13px 15px; border-left: 3px solid var(--accent); background: rgba(249, 226, 220, 0.5); color: #5c4b46; font-size: 0.83rem; line-height: 1.5; }
.coverage-explanation strong { display: block; margin-bottom: 5px; color: var(--ink); }
.coverage-explanation p { margin: 0; }
.coverage-reasons { display: grid; gap: 4px; margin: 9px 0 0; padding-left: 18px; }
.limited-votes { margin-top: 22px; }
.limited-votes > .detail-label { margin-bottom: 9px; }
.limited-vote-row { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); font-size: 0.82rem; }
.limited-vote-row > div { display: grid; gap: 3px; }
.limited-vote-row strong { font-size: 0.84rem; }
.limited-vote-row small { color: var(--muted); font-size: 0.74rem; line-height: 1.35; }
.limited-vote-row .vote-counts { color: var(--ink); font-weight: 700; }
.limited-vote-row > span { flex: 0 0 auto; color: var(--teal); font-weight: 800; text-align: right; }
.vote-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.vote-chart-card { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 253, 248, 0.82); }
.vote-chart-heading { display: flex; justify-content: space-between; align-items: start; gap: 14px; }
.vote-chart-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.vote-chart-heading h3 { margin: 6px 0 0; font: 700 1.25rem/1.1 Georgia, serif; }
.vote-chart-heading a { color: var(--teal); font-size: 0.78rem; font-weight: 800; text-decoration: none; }
.vote-chart-content { display: flex; align-items: center; gap: 28px; margin: 24px 0 16px; }
.donut { display: grid; flex: 0 0 126px; place-items: center; width: 126px; height: 126px; border-radius: 50%; background: conic-gradient(var(--donut)); }
.donut::before { grid-area: 1 / 1; width: 78px; height: 78px; border-radius: 50%; background: var(--paper-strong); content: ""; }
.donut span { z-index: 1; grid-area: 1 / 1; color: var(--ink); font: 700 1.35rem/1 Georgia, serif; text-align: center; }
.donut small { display: block; margin-top: 4px; color: var(--muted); font: 700 0.6rem/1 system-ui, sans-serif; letter-spacing: 0.06em; text-transform: uppercase; }
.chart-legend { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 0.8rem; width: 100%; }
.chart-legend li { display: grid; grid-template-columns: 9px 1fr auto; gap: 8px; align-items: center; }
.chart-legend strong { font-size: 0.76rem; }
.legend-swatch { width: 8px; height: 8px; border-radius: 50%; }
.chart-note { margin-bottom: 14px; color: var(--muted); font-size: 0.76rem; line-height: 1.45; }
.vote-party-details { margin-top: 0; }
.vote-party-list { margin-top: 12px; border-top: 1px solid var(--line); }
.vote-party-row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 0.8rem; }
.vote-party-row span { display: grid; gap: 2px; }
.vote-party-row small { color: var(--muted); }
.vote-party-row > strong { max-width: 230px; color: var(--muted); font-size: 0.78rem; text-align: right; }
.vote-history { margin-top: 14px; }
.vote-history-list { display: grid; gap: 8px; margin-top: 12px; border-top: 1px solid var(--line); }
.vote-history-list > div { display: grid; gap: 3px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 0.8rem; }
.vote-history-list span { color: var(--muted); line-height: 1.4; }

.candidate-page { padding: 40px 0 72px; }
.candidate-heading { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 34px; align-items: start; margin-bottom: 24px; }
.candidate-heading h1 { max-width: 720px; margin-bottom: 12px; font-size: clamp(2.45rem, 4.2vw, 3.8rem); }
.candidate-intro { max-width: 650px; margin-bottom: 0; color: var(--muted); line-height: 1.55; }
.candidate-summary { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 253, 248, 0.78); box-shadow: var(--shadow); }
.candidate-summary strong { display: block; margin: 6px 0 4px; color: var(--teal); font: 700 2.2rem/1 Georgia, serif; }
.candidate-summary p { margin: 0; color: var(--muted); font-size: 0.84rem; }
.candidate-notice { display: grid; grid-template-columns: minmax(140px, 0.32fr) minmax(0, 1fr); gap: 20px; margin-bottom: 28px; padding: 16px 18px; border-left: 3px solid var(--accent); background: rgba(249, 226, 220, 0.55); color: #5c4b46; font-size: 0.86rem; line-height: 1.5; }
.candidate-directory { border-top: 1px solid var(--line); }
.directory-toolbar { display: grid; grid-template-columns: minmax(230px, 1.35fr) minmax(160px, 0.75fr) minmax(220px, 1fr); gap: 12px; padding: 20px 0 18px; border-bottom: 1px solid var(--line); }
.search-field, .select-field { display: grid; gap: 7px; }
.search-field span, .select-field span { color: var(--muted); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.search-field input, .select-field select { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper-strong); color: var(--ink); font: inherit; }
.search-field input:focus, .select-field select:focus { border-color: var(--teal); outline: 3px solid rgba(30, 109, 104, 0.14); }
.directory-heading { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 20px 0 8px; color: var(--muted); font-size: 0.84rem; }
.directory-heading p { margin: 0; }
.directory-note { margin: 0 0 14px; color: var(--muted); font-size: 0.8rem; line-height: 1.45; }
.directory-heading strong { color: var(--ink); }
.candidate-row { margin: 0; border-top: 1px solid var(--line); }
.candidate-row:last-child { border-bottom: 1px solid var(--line); }
.candidate-row > summary { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto 24px; gap: 13px; align-items: center; padding: 16px 4px; list-style: none; }
.candidate-row > summary::-webkit-details-marker { display: none; }
.candidate-avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--soft-teal); color: var(--teal); font: 700 1rem/1 Georgia, serif; }
.candidate-main { display: grid; gap: 4px; }
.candidate-main strong { font-size: 0.98rem; }
.candidate-main small, .candidate-count { color: var(--muted); font-size: 0.8rem; }
.candidate-count { white-space: nowrap; }
.candidate-row-detail { padding: 4px 4px 20px 55px; }
.candidate-row-detail .detail-label { margin-bottom: 10px; }
.candidate-direct-row { display: grid; grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr); gap: 20px; padding: 16px 4px; border-top: 1px solid var(--line); }
.candidate-direct-row:last-child { border-bottom: 1px solid var(--line); }
.candidate-direct-head { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 13px; align-content: start; }
.candidate-direct-head .candidate-main strong { color: var(--teal); }
.candidate-direct-head .candidate-preview { grid-column: 2; color: var(--muted); font-size: 0.76rem; line-height: 1.4; }
.candidate-vote-list.is-direct { border-top: 0; }
.candidate-vote-list.is-direct .candidate-vote-row { padding-top: 0; }
.candidate-vote-list { margin: 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.candidate-vote-row { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 12px 0; border-bottom: 1px solid #ebe8df; }
.candidate-vote-row > div:first-child { display: grid; gap: 3px; }
.candidate-vote-row strong { font-size: 0.86rem; }
.candidate-vote-row small { color: var(--muted); font-size: 0.75rem; }
.candidate-vote-side { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; align-items: center; text-align: right; }
.candidate-vote-side span { font-size: 0.82rem; font-weight: 800; }
.candidate-vote-side a { color: var(--teal); font-size: 0.76rem; font-weight: 800; text-decoration: none; }
.empty-state { margin-top: 10px; padding: 28px 0; border-top: 1px solid var(--line); color: var(--muted); }
.empty-state strong { display: block; margin-bottom: 5px; color: var(--ink); }
.empty-state p { margin: 0; font-size: 0.86rem; }

:focus-visible { outline: 3px solid rgba(30, 109, 104, 0.45); outline-offset: 3px; }

@media (max-width: 760px) {
  .site-header, .site-footer, .app-shell { width: min(100% - 28px, 680px); }
  .site-header { padding: 20px 0; }
  .hero { display: block; min-height: auto; padding: 58px 0 70px; }
  h1 { font-size: clamp(2.75rem, 12vw, 4rem); }
  .hero h1 { font-size: clamp(2.65rem, 11.8vw, 4.05rem); }
  .hero-card { margin-top: 46px; }
  .choice-grid, .results-grid, .result-heading, .featured-grid, .vote-chart-grid, .party-row-detail, .candidate-heading, .candidate-notice, .directory-toolbar { grid-template-columns: 1fr; }
  .metrics-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metrics-strip > div { padding-right: 10px; }
  .metrics-strip > div + div { padding-left: 10px; }
  .metrics-strip strong { display: block; margin-right: 0; font-size: 1.35rem; }
  .metrics-strip small { font-size: 0.7rem; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 12px; }
  .question-card { padding: 26px 20px; }
  .question-card h1 { font-size: clamp(2rem, 8vw, 3rem); }
  .question-foot { align-items: flex-start; flex-direction: column-reverse; }
  .question-foot .button { width: 100%; }
  .result-wrap { padding-top: 34px; }
  .result-heading h1 { font-size: clamp(2.55rem, 10.5vw, 3.8rem); }
  .party-row > summary { grid-template-columns: 32px minmax(0, 1fr) 62px 20px; gap: 10px; }
  .party-row > summary .party-progress { display: none; }
  .party-row-detail { padding: 16px 4px 22px 32px; }
  .limited-list { grid-template-columns: 1fr; }
  .limited-vote-row { align-items: flex-start; flex-direction: column; gap: 6px; }
  .limited-vote-row > span { text-align: left; }
  .vote-chart-content { gap: 20px; }
  .site-nav { gap: 12px; }
  .site-nav .text-button, .site-nav .nav-button { font-size: 0.82rem; }
  .candidate-page { padding-top: 34px; }
  .candidate-heading h1 { font-size: clamp(2.35rem, 10vw, 3.5rem); }
  .candidate-notice { gap: 8px; }
  .candidate-direct-row { grid-template-columns: 1fr; gap: 10px; }
  .candidate-direct-row .candidate-vote-row { padding-top: 12px; }
  .candidate-row > summary { grid-template-columns: 34px minmax(0, 1fr) 20px; gap: 10px; }
  .candidate-count { grid-column: 2; grid-row: 2; }
  .candidate-row > summary .row-caret { grid-column: 3; grid-row: 1 / span 2; }
  .candidate-row-detail { padding-left: 44px; }
  .candidate-vote-row { align-items: flex-start; flex-direction: column; gap: 8px; }
  .candidate-vote-side { justify-content: flex-start; text-align: left; }
}

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