:root {
  color-scheme: light;
  --background: #fff;
  --surface: #fff;
  --ink: #202428;
  --muted: #687078;
  --line: #dfe2e4;
  --line-soft: #eceeef;
  --old: #aeb5bc;
  --new: #315b7d;
  --new-soft: #e7eff5;
  font-family: Arial, Helvetica, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}

.page-shell { width: min(1160px, calc(100% - 40px)); margin: 0 auto; padding: 38px 0 32px; }
h1, h2, p { margin-top: 0; }
h1 { margin: 0; font-size: 1.8rem; line-height: 1.2; letter-spacing: -0.025em; }
h2 { margin-bottom: 0; font-size: 1.3rem; line-height: 1.25; letter-spacing: -0.015em; }
h3 { margin: 0; }

.site-title { display: flex; align-items: center; }
.site-title img { display: block; width: auto; height: 90px; margin: -18px 0; }
.heading-primary { min-width: 0; }
.data-freshness { margin: 7px 0 0; color: var(--muted); font-size: 0.72rem; line-height: 1.3; }
.data-freshness time { color: var(--ink); font-weight: 700; }
.data-freshness.is-stale,
.data-freshness.is-stale time { color: #a15c00; }

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.summary { display: flex; align-items: center; gap: 24px; }
.summary p { margin: 0; color: var(--muted); font-size: 0.78rem; white-space: nowrap; }
.summary strong { color: var(--ink); font-size: 1rem; }

.progress-section { padding: 26px 0 28px; border-bottom: 1px solid var(--line); }
.progress-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 18px; }
.progress-heading > p { max-width: 420px; margin: 0; color: var(--muted); font-size: 0.76rem; text-align: right; }
.eyebrow { margin-bottom: 3px; color: var(--new); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.075em; text-transform: uppercase; }
.progress-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.progress-card { min-width: 0; padding: 15px 16px 14px; border: 1px solid #d9dfe3; border-radius: 6px; background: #fafbfc; }
.progress-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.progress-card-heading p { margin-bottom: 1px; color: var(--muted); font-size: 0.67rem; }
.progress-card-heading h3 { font-size: 0.92rem; line-height: 1.25; }
.progress-card-heading strong { flex: 0 0 auto; color: var(--new); font-size: 1.08rem; letter-spacing: -0.02em; }
.progress-track { height: 7px; margin-top: 15px; overflow: hidden; border-radius: 10px; background: #dfe6eb; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--new); }
.progress-note { margin: 7px 0 0; color: var(--muted); font-size: 0.64rem; line-height: 1.35; }

.chart-section { padding: 26px 0 30px; border-bottom: 1px solid var(--line); }
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.chart-controls { display: flex; align-items: flex-end; gap: 14px; }
.control-group { display: grid; gap: 3px; }
.control-label { padding-left: 4px; color: #7d858b; font-size: 0.58rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }

.scope-tabs, .view-tabs {
  display: inline-flex;
  padding: 3px;
  border: 1px solid #ccd2d6;
  border-radius: 7px;
  background: #f2f4f5;
}
.scope-tab, .view-tab {
  padding: 7px 11px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #59636b;
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
}
.scope-tab:hover, .view-tab:hover { color: var(--ink); }
.scope-tab.is-active, .view-tab.is-active { background: #fff; color: var(--new); box-shadow: 0 1px 3px rgb(28 39 48 / 14%); }
.scope-tab:focus-visible, .view-tab:focus-visible { outline: 2px solid #90b5d1; outline-offset: 1px; }

.scope-label { margin: 10px 0 0; color: var(--muted); font-size: 0.76rem; }
.chart-context { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.block-details-trigger {
  flex: 0 0 auto;
  margin-top: 10px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #91a9ba;
  background: transparent;
  color: var(--new);
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
}
.block-details-trigger:hover { border-color: var(--new); }
.block-details-trigger:focus-visible { outline: 2px solid #90b5d1; outline-offset: 3px; }
.chart {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 72px;
  margin-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.chart::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 50%;
  width: 1px;
  background: #d8dde0;
}
.chart-row {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
}
.bar-line {
  display: grid;
  grid-template-columns: 55px minmax(145px, 42%) 1fr;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 22px;
}
.period { color: var(--muted); font-size: 0.63rem; }
.bar-label { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 0.7rem; }
.bar-label-empty { color: #a2a8ad; }
.nuance-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nuance-code {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 17px;
  padding: 0 5px;
  border: 1px solid #d6e0e6;
  border-radius: 3px;
  background: #edf2f5;
  color: #41627a;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.block-label { color: #34414a; font-weight: 700; }
.block-dot { width: 7px; height: 7px; border-radius: 50%; background: #698197; }
.zero { color: #a2a8ad; font-size: 0.76rem; }

.bar-hit {
  position: relative;
  display: block;
  width: calc(100% - 24px);
  height: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: help;
  text-align: left;
}
.bar { position: absolute; inset: 2px auto 2px 0; border-radius: 2px; }
.bar-old { background: var(--old); }
.bar-new { background: var(--new); }
.bar-value { position: absolute; top: -2px; margin-left: 5px; color: #30363b; font-size: 0.66rem; font-weight: 700; }
.bar-hit:focus-visible { outline: 2px solid #90b5d1; outline-offset: 3px; }

.tooltip {
  position: absolute;
  z-index: 20;
  left: min(48%, 320px);
  bottom: calc(100% + 8px);
  display: none;
  width: min(360px, 75vw);
  max-height: min(360px, 65vh);
  overflow: auto;
  padding: 10px 12px;
  border: 1px solid #d5dadd;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 5px 18px rgb(31 38 43 / 12%);
  color: var(--ink);
  font-size: 0.73rem;
  line-height: 1.4;
}
.tooltip strong, .tooltip span { display: block; }
.tooltip span { margin-top: 4px; color: var(--muted); font-weight: 400; }
.tooltip-sources { display: grid; gap: 8px; margin-top: 8px; }
.tooltip-source a { color: #315f80; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.tooltip-source a span { display: inline; margin: 0; color: inherit; font-weight: inherit; }
.tooltip-source p { margin: 2px 0 0; color: #7b8388; font-size: 0.65rem; }
.tooltip-source ul { margin: 1px 0 0; padding-left: 17px; color: var(--muted); }
.tooltip-source li { margin: 1px 0; }
.bar-hit:hover .tooltip, .bar-hit:focus .tooltip { display: block; }

.chart-blocks {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding: 24px 0 2px;
}
.chart-blocks::before { display: none; }
.stacked-period { min-width: 0; }
.stacked-period-heading { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 7px; }
.stacked-period-heading h3 { font-size: 0.82rem; }
.stacked-period-heading span { color: var(--muted); font-size: 0.68rem; }
.stacked-bar { display: flex; width: 100%; height: 34px; overflow: visible; border-radius: 4px; background: #edf0f2; box-shadow: inset 0 0 0 1px rgb(32 36 40 / 8%); }
.stack-segment { position: relative; min-width: 2px; height: 34px; padding: 0; border: 0; border-right: 1px solid rgb(255 255 255 / 70%); }
.stack-segment-hit { display: grid; place-items: center; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; }
.stack-segment:first-child { border-radius: 4px 0 0 4px; }
.stack-segment:last-child { border-right: 0; border-radius: 0 4px 4px 0; }
.stack-segment-hit:focus-visible { position: relative; z-index: 3; outline: 3px solid #202428; outline-offset: 2px; }
.stack-segment-hit:hover, .stack-segment.is-tooltip-open .stack-segment-hit { background: rgb(255 255 255 / 10%); }
.stack-segment.is-tooltip-open .tooltip { display: block; }
.stack-segment .tooltip { left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); text-align: left; }
.stack-segment.tooltip-align-start .tooltip { left: 0; transform: none; }
.stack-segment.tooltip-align-end .tooltip { right: 0; left: auto; transform: none; }
.stack-segment .tooltip::after { position: absolute; top: 100%; left: 0; width: 100%; height: 8px; content: ""; }
.stack-segment-code { overflow: hidden; max-width: 100%; padding: 0 3px; font-size: 0.58rem; font-weight: 700; line-height: 1; text-overflow: clip; white-space: nowrap; }
.stacked-label-area { position: relative; height: 54px; }
.stacked-leaders { position: absolute; inset: 0 0 auto; width: 100%; height: 26px; overflow: visible; pointer-events: none; }
.stacked-leaders path { fill: none; stroke: #aeb5ba; stroke-width: 1; vector-effect: non-scaling-stroke; }
.stacked-labels { position: absolute; inset: 22px 0 auto; height: 31px; }
.stacked-label-area-top .stacked-labels { inset: 0 0 auto; }
.stacked-label-area-top .stacked-leaders { inset: 0 0 auto; }
.stack-label { position: absolute; top: 0; display: grid; justify-items: center; padding: 0; border: 0; background: transparent; color: #3b4247; cursor: help; font: inherit; line-height: 1.15; white-space: nowrap; }
.stack-label[hidden] { display: none; }
.stack-label > span { display: flex; align-items: center; gap: 4px; font-size: 0.66rem; font-weight: 700; }
.stack-label i, .block-details-card h3 i { width: 7px; height: 7px; border-radius: 50%; }
.stack-label strong { margin-top: 2px; color: var(--ink); font-size: 0.72rem; }
.stack-label-nuance > span { font-size: 0.58rem; }
.stack-label-nuance strong { font-size: 0.65rem; }
.chart-nuances-stacked .stacked-period { min-width: 0; }

.block-details {
  width: min(860px, calc(100% - 32px));
  max-height: min(720px, calc(100% - 32px));
  padding: 22px;
  border: 1px solid #ccd3d8;
  border-radius: 8px;
  box-shadow: 0 18px 60px rgb(24 35 43 / 24%);
}
.block-details::backdrop { background: rgb(26 35 42 / 42%); }
.block-details-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.block-details-heading .eyebrow { margin-bottom: 3px; }
.dialog-close { display: grid; place-items: center; width: 31px; height: 31px; padding: 0; border: 1px solid #d5dade; border-radius: 50%; background: #fff; color: #566068; cursor: pointer; font: inherit; font-size: 1.25rem; line-height: 1; }
.dialog-close:hover { background: #f1f4f5; color: var(--ink); }
.dialog-close:focus-visible { outline: 2px solid #90b5d1; outline-offset: 2px; }
.block-details-intro { margin: 10px 0 18px; color: var(--muted); font-size: 0.76rem; }
.block-details-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.block-details-card { padding: 12px; border: 1px solid var(--line); border-radius: 5px; }
.block-details-card h3 { display: flex; align-items: center; gap: 7px; font-size: 0.8rem; }
.block-details-card ul { display: flex; flex-wrap: wrap; gap: 6px 9px; margin: 9px 0 0; padding: 0; list-style: none; }
.block-details-card li { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 0.63rem; }

.table-section { padding-top: 26px; }
.place-link { color: inherit; text-decoration: none; }
.place-link:hover { color: var(--new); }
.table-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 13px; }
.table-heading .scope-label { margin: 0; }
.table-wrap { overflow: hidden; border: 1px solid #d7dde1; border-radius: 8px; box-shadow: 0 3px 16px rgb(38 57 70 / 5%); }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th:first-child { width: 22%; }
th {
  padding: 10px 12px 9px;
  border-bottom: 1px solid var(--line);
  background: #f4f7f9;
  color: #41484e;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-align: left;
  text-transform: uppercase;
}
th span { display: block; margin-top: 1px; color: #7d858b; font-size: 0.65rem; font-weight: 400; letter-spacing: 0; text-transform: none; }
td { padding: 9px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
.result-row { cursor: pointer; transition: background-color 120ms ease, box-shadow 120ms ease; }
.result-row:hover { background: #f8fbfd; box-shadow: inset 3px 0 0 #6d97b7; }
.result-row:focus-visible { position: relative; z-index: 1; outline: 2px solid #5485aa; outline-offset: -2px; }
.place-heading { display: flex; align-items: baseline; gap: 6px; }
.place-name { display: inline; font-size: 0.96rem; font-weight: 750; letter-spacing: -0.012em; }
.department-code { color: #8a949b; font-size: 0.59rem; font-weight: 700; }
.new-badge { display: inline-flex; align-items: center; min-height: 16px; padding: 1px 6px; border-radius: 99px; background: #e5f1f8; color: #286889; font-size: 0.52rem; font-weight: 800; letter-spacing: 0.015em; }
.place-facts { display: flex; align-items: center; gap: 7px; margin-top: 3px; }
.place-freshness { display: block; margin-top: 5px; color: var(--muted); font-size: 0.63rem; }
.place-freshness time { color: #4a555d; font-weight: 700; }
.place-freshness.is-stale,
.place-freshness.is-stale time { color: #a15c00; }
.place-freshness.is-missing { color: #8d9499; font-style: italic; }
.place-meta { color: var(--muted); font-size: 0.63rem; white-space: nowrap; }
.voting-mode { display: inline-flex; align-items: center; color: #747d83; font-size: 0.61rem; font-weight: 650; }
.voting-mode::after { content: "·"; margin-left: 7px; color: #b1b7bb; }
.election-status { display: flex; align-items: center; gap: 5px; margin-top: 5px; color: #416e8a; font-size: 0.61rem; font-weight: 700; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #4d8db6; box-shadow: 0 0 0 2px #e8f1f6; }
.election-status.is-complete { color: #347151; }
.election-status.is-complete .status-dot { background: #438463; box-shadow: 0 0 0 2px #e7f1eb; }
.people-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 14px; margin: 0; padding: 0; list-style: none; }
.people-list li { min-width: 0; }
.person-entry, .person-result { display: grid; grid-template-columns: 14px minmax(0, 1fr); align-items: start; gap: 5px; }
.list-marker { width: 4px; height: 4px; margin: 5px 0 0 4px; border-radius: 50%; background: #98a3aa; }
.person-copy { display: grid; min-width: 0; }
.person-name { overflow: hidden; color: #2d3439; font-size: 0.71rem; font-weight: 680; line-height: 1.22; text-overflow: ellipsis; white-space: nowrap; }
.person-secondary { display: flex; align-items: baseline; gap: 4px; min-width: 0; margin-top: 2px; color: #707a81; font-size: 0.56rem; line-height: 1.2; white-space: nowrap; }
.senate-group { max-width: 55%; overflow: hidden; font-weight: 650; text-overflow: ellipsis; }
.meta-separator { color: #aab1b6; }
.candidacy-status { overflow: hidden; color: #377355; text-overflow: ellipsis; }
.candidacy-status.is-not-running { color: #7b8388; }
.candidacy-status.is-unknown { color: #8a681b; }
.current-people li { grid-template-columns: 16px minmax(0, 1fr); }
.result-icon { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: #23845a; color: #fff; font-size: 0.58rem; font-weight: 900; line-height: 1; }
.mi-nuance { color: #4e6e83; font-weight: 700; }
.senate-nuance { color: #626e76; font-weight: 650; }
.outgoing-status { color: #557080; }
.defeated-people { margin-top: 7px; }
.person-result.is-defeated .result-icon { background: #c94b4b; }
.person-result.is-defeated .person-name { color: #9d3434; }
.person-result.is-defeated .outcome-status { color: #a74343; }
.empty { color: #8a9196; font-size: 0.78rem; font-style: italic; }

footer { display: flex; justify-content: space-between; gap: 30px; margin-top: 18px; color: var(--muted); font-size: 0.7rem; }
footer p { max-width: 700px; margin-bottom: 0; }

.detail-shell { width: min(1180px, calc(100% - 40px)); }
.back-link { margin-bottom: 22px; font-size: 0.78rem; }
.back-link a { color: var(--new); text-decoration: none; }
.back-link a:hover { text-decoration: underline; }
.detail-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.detail-header .eyebrow { margin-bottom: 4px; }
.detail-summary { display: grid; justify-items: end; gap: 3px; color: var(--muted); font-size: 0.78rem; }
.detail-summary strong { color: var(--ink); font-size: 0.9rem; }
.detail-section { padding: 25px 0 27px; border-bottom: 1px solid var(--line); }
.detail-section > h2 { margin-bottom: 15px; }
.detail-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 15px; }
.detail-section-heading p { margin: 0; color: var(--muted); font-size: 0.7rem; }
.candidate-list { margin: 0; padding: 0; border: 1px solid var(--line); list-style: none; }
.candidate-row { display: grid; grid-template-columns: minmax(180px, 1.1fr) minmax(160px, 1fr) 110px auto; align-items: center; gap: 14px; padding: 9px 11px; border-bottom: 1px solid var(--line-soft); }
.candidate-row:last-child { border-bottom: 0; }
.candidate-name { font-weight: 600; }
.candidate-meta { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 6px; min-width: 0; color: var(--muted); font-size: 0.7rem; }
.candidate-nuance { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.candidate-score { display: grid; justify-items: center; align-content: center; gap: 1px; color: var(--muted); font-variant-numeric: tabular-nums; }
.candidate-percent { color: var(--ink); font-size: 1.05rem; font-weight: 800; letter-spacing: -0.015em; white-space: nowrap; }
.candidate-votes { font-size: 0.65rem; white-space: nowrap; }
.candidate-status { color: var(--muted); font-size: 0.68rem; font-weight: 600; white-space: nowrap; }
.candidate-status.is-elected { color: #23613f; }
.candidate-status.is-qualified { padding: 3px 7px; border-radius: 4px; background: #e8f1fb; color: #245b8f; }
.candidate-status.is-withdrawn { color: #59636b; }
.status-icon { display: inline-grid; place-items: center; width: 16px; height: 16px; margin-right: 4px; border-radius: 50%; background: #c94b4b; color: #fff; font-size: 0.62rem; line-height: 1; }
.candidate-status.is-elected .status-icon { background: #2f855a; }
.candidate-status.is-withdrawn .status-icon { background: #7b8790; }
.candidate-list > .is-elected { box-shadow: inset 4px 0 0 #2f855a; background: #e9f7ee; }
.candidate-list > .is-elected .candidate-name { color: #174d30; }
.candidate-list > .is-qualified { box-shadow: inset 4px 0 0 #4385c1; background: #f2f7fc; }
.candidate-list > .is-qualified .candidate-name { color: #214f78; }
.candidate-list > .is-withdrawn { box-shadow: inset 4px 0 0 #8a949c; background: #f3f5f6; }
.candidate-list > .is-withdrawn .candidate-name { color: #465159; }
.candidate-list > .is-not-elected-final { box-shadow: inset 4px 0 0 #c94b4b; background: #fcecec; }
.candidate-list > .is-not-elected-final .candidate-name { color: #7b2424; }
.candidate-list > .is-not-elected-final .candidate-status { color: #a33232; font-weight: 800; }
.round-grid, .list-grid { display: grid; gap: 16px; }
.round-comparison { position: relative; display: grid; gap: 16px; }
.comparison-round { position: relative; z-index: 2; min-width: 0; }
.comparison-round > .round-card { height: 100%; }
.round-connectors { display: none; position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.flow-line { fill: none; stroke: #4385c1; stroke-width: 1.5; opacity: 0.55; }
.flow-line.flow-neutral { stroke: #8a949c; stroke-dasharray: 3 3; opacity: 0.45; }
.flow-line.flow-elected { stroke: #2f855a; }
.flow-line.flow-disqualified, .flow-line.flow-defeated { stroke: #c94b4b; }
.flow-end { stroke: #fff; stroke-width: 2; }
.flow-end.flow-elected { fill: #2f855a; }
.flow-end.flow-disqualified, .flow-end.flow-defeated { fill: #c94b4b; }
.flow-end.flow-neutral { fill: #8a949c; }
.flow-symbol { fill: #fff; font-size: 11px; font-weight: 800; text-anchor: middle; dominant-baseline: central; }
.candidature-block { display: grid; gap: 10px; margin-top: 16px; }
.candidature-block > h3 { font-size: 0.9rem; }
.round-card, .list-card { border: 1px solid var(--line); }
.round-heading, .list-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 11px 12px; border-bottom: 1px solid var(--line); background: #f7f8f8; }
.round-heading h3, .list-heading h3 { font-size: 0.9rem; }
.round-kind { display: block; margin-bottom: 3px; color: var(--new); font-size: 0.58rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.round-heading span { color: var(--muted); font-size: 0.68rem; }
.round-heading .round-kind { color: var(--new); font-size: 0.58rem; }
.round-meta { display: grid; justify-items: end; gap: 2px; }
.round-card .candidate-list { border: 0; }
.candidature-card { border-color: #dfe3e6; }
.candidature-card .round-heading { background: #fbfbfb; }
.candidature-card .round-heading .round-kind { color: #747d84; }
.candidature-card .candidate-row { background: #fff; box-shadow: none; }
.candidature-card .candidate-name { color: var(--ink); }
.list-identity h3 { display: flex; align-items: center; gap: 7px; }
.list-heading p { margin: 4px 0 0; color: var(--muted); font-size: 0.67rem; font-weight: 400; }
.list-result { display: grid; justify-items: end; gap: 3px; white-space: nowrap; }
.list-result > strong { color: var(--new); font-size: 0.8rem; }
.list-card.has-elected .list-heading { box-shadow: inset 4px 0 0 #2f855a; background: #e3f4e9; }
.list-card.has-elected .list-heading h3, .list-card.has-elected .list-result > strong { color: #174d30; }
.list-card.has-no-elected .list-heading { box-shadow: inset 4px 0 0 #c94b4b; background: #fcecec; }
.list-card.has-no-elected .list-heading h3, .list-card.has-no-elected .list-result > strong { color: #7b2424; }
.list-candidates { margin: 0; padding: 0; list-style: none; counter-reset: candidates; }
.list-candidates li { counter-increment: candidates; display: grid; grid-template-columns: 25px 1fr auto; gap: 7px; padding: 7px 11px; border-bottom: 1px solid var(--line-soft); font-size: 0.76rem; }
.list-candidates li::before { content: counter(candidates) "."; color: var(--muted); }
.list-candidates li:last-child { border-bottom: 0; }
.list-candidates li strong { color: var(--muted); font-size: 0.68rem; }
.list-candidates li.is-elected { box-shadow: inset 4px 0 0 #2f855a; background: #e3f4e9; }
.list-candidates li.is-elected span { color: #174d30; font-weight: 700; }
.list-candidates li.is-elected strong { color: #17643a; font-weight: 800; }
.list-candidates li.is-not-elected-final { box-shadow: inset 4px 0 0 #c94b4b; background: #fcecec; }
.list-candidates li.is-not-elected-final span { color: #7b2424; font-weight: 600; }
.list-candidates li.is-not-elected-final strong { color: #a33232; font-weight: 800; }

.incumbent-badge, .list-candidates li .incumbent-badge {
  display: inline-block;
  padding: 1px 5px;
  border: 1px solid #cbd8e3;
  border-radius: 4px;
  background: #eff4f8;
  color: #456077;
  font-size: 0.61rem;
  font-weight: 600;
  vertical-align: middle;
  white-space: nowrap;
}
.incumbents-table th:first-child { width: 38%; }
.incumbents-table td { font-size: 0.78rem; vertical-align: middle; overflow-wrap: anywhere; }
.incumbents-table td:first-child { font-weight: 600; }
.incumbent-status { display: inline-block; padding: 3px 7px; border-radius: 4px; font-size: 0.7rem; font-weight: 600; }
.incumbent-status.reelected { background: #e3f4e9; color: #17643a; }
.incumbent-status.not-reelected { background: #fcecec; color: #a33232; }
.incumbent-status.not-running { background: #edf0f2; color: #59636b; }
.incumbent-status.pending { background: #fff4db; color: #785911; }

@media (min-width: 980px) {
  .round-comparison { grid-template-columns: minmax(0, 1fr) 78px minmax(0, 1fr); gap: 0; }
  .comparison-left { grid-column: 1; }
  .comparison-right { grid-column: 3; }
  .round-connectors { display: block; }
  .round-comparison .candidate-row { grid-template-columns: minmax(0, 1fr) 110px 94px; grid-template-rows: auto auto; gap: 3px 10px; min-height: 61px; }
  .round-comparison .candidate-name { grid-column: 1; grid-row: 1; }
  .round-comparison .candidate-meta { grid-column: 1; grid-row: 2; }
  .round-comparison .candidate-score { grid-column: 2; grid-row: 1 / span 2; }
  .round-comparison .candidate-status { grid-column: 3; grid-row: 1 / span 2; justify-self: end; }
  .round-comparison .round-heading { min-height: 68px; }
}

@media (max-width: 800px) {
  .page-shell { width: min(100% - 24px, 1160px); padding-top: 24px; }
  .site-title img { height: 78px; margin: -15px 0; }
  .detail-shell { width: min(100% - 24px, 900px); }
  .page-header, .section-header, footer { flex-direction: column; align-items: flex-start; }
  .page-header { gap: 14px; }
  .summary { align-items: flex-start; gap: 8px 18px; flex-wrap: wrap; }
  .progress-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
  .progress-heading > p { text-align: left; }
  .progress-grid { grid-template-columns: 1fr; gap: 9px; }
  .section-header { gap: 14px; }
  .chart-context { align-items: flex-start; flex-direction: column; gap: 0; }
  .chart-controls { width: 100%; align-items: stretch; flex-direction: column; gap: 8px; }
  .scope-tabs, .view-tabs { width: 100%; }
  .scope-tab, .view-tab { flex: 1; white-space: normal; }
  .chart { grid-template-columns: 1fr; }
  .chart::before { display: none; }
  .bar-line { grid-template-columns: 54px minmax(120px, 42%) 1fr; }
  .tooltip { left: 0; }
  .chart-blocks { gap: 28px; padding-top: 18px; }
  .stacked-bar, .stack-segment { height: 28px; }
  .stacked-label-area { height: 51px; }
  .stack-label > span { font-size: 0.62rem; }
  .stack-label strong { font-size: 0.68rem; }
  .stack-label-nuance > span { font-size: 0.61rem; }
  .stack-label-nuance strong { display: none; }
  .stack-segment-code { font-size: 0.61rem; }
  .block-details { padding: 17px; }
  .block-details-grid { grid-template-columns: 1fr; }
  .table-heading { align-items: flex-start; flex-direction: column; gap: 0; }
  .table-wrap { overflow: visible; border: 0; }
  table, tbody, tr, td { display: block; width: 100%; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tbody { display: grid; gap: 10px; }
  tr { overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
  td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
  td::before { display: block; margin-bottom: 7px; color: #7a8389; font-size: 0.63rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
  td:nth-child(2)::before { content: "2020–2021 · sortants, groupe et candidature"; }
  td:nth-child(3)::before { content: "Élus 2026 · nuance MI"; }
  .people-list { grid-template-columns: 1fr; gap: 6px; }
  .person-name { font-size: 0.74rem; }
  .incumbents-table td::before { content: attr(data-label); }
  footer { gap: 6px; }
  .detail-header { align-items: flex-start; flex-direction: column; gap: 10px; }
  .detail-summary { justify-items: start; }
  .detail-section-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .candidate-row { grid-template-columns: 1fr auto; gap: 5px 10px; }
  .candidate-name { grid-column: 1; grid-row: 1; }
  .candidate-status { grid-column: 2; grid-row: 1; }
  .candidate-meta { grid-column: 1; grid-row: 2; }
  .candidate-score { grid-column: 2; grid-row: 2; }
}

@media (min-width: 761px) and (max-width: 1040px) {
  .chart { grid-template-columns: 1fr; }
  .chart::before { display: none; }
}

@media (min-width: 761px) and (max-width: 900px) {
  .people-list { grid-template-columns: 1fr; gap: 5px; }
}
