:root {
  color-scheme: light;
  --ink: #17221d;
  --muted: #63706a;
  --paper: #f4f1e9;
  --panel: #fffdf7;
  --line: #d9d5ca;
  --green: #0c684b;
  --red: #a6382f;
  --blue: #28658f;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
main { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 48px 0 80px; }
header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-family: Georgia, serif; font-size: clamp(3rem, 8vw, 6.5rem); font-weight: 500; letter-spacing: -0.06em; line-height: .85; }
h2 { margin-bottom: 0; font-family: Georgia, serif; font-size: clamp(1.7rem, 4vw, 2.7rem); font-weight: 500; letter-spacing: -.035em; }
.eyebrow { margin-bottom: 13px; color: var(--green); font-size: .72rem; font-weight: 800; letter-spacing: .16em; }
.intro, .explanation { max-width: 730px; color: var(--muted); line-height: 1.55; }
.api-link, button { border: 1px solid var(--ink); background: var(--ink); color: white; padding: 11px 16px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.header-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.site-navigation { max-width: 650px; }
.site-navigation .api-link { padding: 9px 12px; font-size: .8rem; }
.secondary-link { background: transparent; color: var(--ink); }
.secondary-link.current-link { border-color: var(--green); background: var(--green); color: white; }
.filters { display: flex; align-items: end; gap: 18px; margin: 42px 0 58px; padding: 22px; border: 1px solid var(--line); background: rgba(255,255,255,.45); }
.filters label { display: grid; gap: 8px; color: var(--muted); font-size: .82rem; font-weight: 650; }
input, .filters select { width: 150px; border: 1px solid var(--line); background: var(--panel); padding: 10px; color: var(--ink); font: inherit; }
section { margin-top: 58px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 20px; }
.section-heading > span { color: var(--muted); font-size: .86rem; }
.table-wrap { overflow-x: auto; border-top: 2px solid var(--ink); }
table { width: 100%; border-collapse: collapse; background: var(--panel); }
th, td { padding: 14px 13px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
td { font-variant-numeric: tabular-nums; }
td small { display: block; max-width: 250px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; }
.near-representation-table th { padding: 9px 10px; font-size: .66rem; }
.near-representation-table td { padding: 8px 10px; font-size: .82rem; line-height: 1.2; vertical-align: middle; }
.near-representation-table tbody tr:nth-child(even) { background: #faf8f1; }
.near-representation-table tbody tr:hover { background: #eef3ed; }
.near-representation-table td small { margin-top: 2px; font-size: .67rem; }
.near-representation-table .election-type-cell,
.near-representation-table .party-abbreviation-cell { width: 1%; }
.near-representation-table .area-name-cell { min-width: 140px; }
.near-representation-table .party-name-cell { min-width: 170px; }
.near-representation-table .type { min-width: 32px; margin-right: 0; padding: 3px 5px; text-align: center; }
.near-representation-table .party-abbreviation-cell strong { font-size: .9rem; }
.near-representation-table .decisive-boundary strong { font-size: .78rem; }
.result-link { color: inherit; text-decoration-color: #8ea197; text-underline-offset: .18em; }
.result-link:hover, .result-link:focus-visible { color: var(--green); text-decoration-thickness: 2px; }
.party-result-link { display: inline-block; }
.type { display: inline-block; margin-right: 6px; padding: 3px 5px; background: #e3e7de; color: var(--green); font-size: .68rem; font-weight: 800; }
.below { color: var(--red); font-weight: 750; }
.above { color: var(--green); font-weight: 750; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 13px; }
article { border: 1px solid var(--line); background: var(--panel); padding: 18px; }
.party-row, article li, .sources li { display: flex; justify-content: space-between; gap: 14px; }
.party-row { padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.party-row strong { font-size: 1.35rem; }
.party-row span { color: var(--muted); font-size: .8rem; }
article ol { margin: 14px 0 0; padding-left: 22px; }
article li { padding: 7px 0; }
article code { color: var(--green); font-weight: 700; }
.sources ul { margin: 0; padding: 0; border-top: 2px solid var(--ink); list-style: none; }
.sources li { padding: 12px 4px; border-bottom: 1px solid var(--line); color: var(--muted); }
.sources em { margin-left: 6px; color: var(--red); font-size: .68rem; font-style: normal; font-weight: 800; }
.empty { border: 1px solid var(--line); background: var(--panel); padding: 30px; }
.empty code { display: block; overflow-x: auto; padding: 14px; background: #e8e5dc; }
.muted { color: var(--muted); }
.data-note { margin-top: 12px; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.page-title { max-width: 900px; font-size: clamp(3rem, 7vw, 5.8rem); }
.compact-page-title { font-size: clamp(2.7rem, 6vw, 4.6rem); }
.registry-summary { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 42px; border: 1px solid var(--line); background: var(--panel); }
.registry-summary-wide { grid-template-columns: repeat(4, 1fr); }
.registry-summary div { display: grid; gap: 4px; padding: 20px; border-right: 1px solid var(--line); }
.registry-summary div:last-child { border-right: 0; }
.registry-summary strong { font-family: Georgia, serif; font-size: 1.8rem; font-weight: 500; }
.registry-summary span { color: var(--muted); font-size: .78rem; }
.party-search { margin-top: 22px; padding: 20px; background: #e7e3d9; }
.party-search label { display: block; margin-bottom: 8px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.party-search div { display: flex; align-items: center; gap: 8px; }
.party-search input { width: min(520px, 100%); }
.party-search a { margin-left: 4px; color: var(--ink); }
.party-registry { margin-top: 52px; }
.registry-cards { display: grid; gap: 12px; }
.registry-card { padding: 0; }
.registry-card-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 20px; }
.registry-card h3 { margin: 6px 0 2px; font-family: Georgia, serif; font-size: 1.45rem; font-weight: 500; }
.registry-card-heading p { margin: 0; color: var(--green); font-weight: 800; }
.party-code { color: var(--muted); font-size: .7rem; font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.party-stat-groups { display: flex; gap: 28px; }
.party-stat-groups > div { display: grid; align-content: start; gap: 7px; }
.party-stat-groups small, .election-period-label { color: var(--muted); font-size: .62rem; font-weight: 800; letter-spacing: .1em; }
.area-counts { display: flex; gap: 22px; color: var(--muted); font-size: .76rem; text-align: right; }
.area-counts span { display: grid; }
.area-counts strong { color: var(--ink); font-family: Georgia, serif; font-size: 1.35rem; font-weight: 500; }
.area-counts .participation-status-yes { color: var(--green); }
.area-counts .participation-status-no { color: var(--muted); }
.registry-card details { border-top: 1px solid var(--line); }
.registry-card summary { padding: 13px 20px; color: var(--green); font-weight: 750; cursor: pointer; }
.election-period-label { padding: 9px 20px; border-top: 1px solid var(--line); background: #efede5; }
.historical-label { background: #e6eee9; color: var(--green); }
.change-label { background: #dce9e1; color: var(--green); }
.change-map-hint { margin: 0; padding: 10px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; }
.change-map-key { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px 12px; color: var(--muted); font-size: .7rem; }
.change-map-key span { display: inline-flex; align-items: center; gap: 5px; }
.key-change-gained { background: var(--green); }
.key-change-lost { background: var(--red); }
.key-change-retained { background: var(--blue); }
.key-change-absent { background: #fffdf7; }
.key-change-no-data { background: #dedad0; }
.change-counts i { font-style: normal; }
.change-gain, .change-gained { color: var(--green); }
.change-loss, .change-lost { color: var(--red); }
.change-area-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; }
.change-area-list li small { grid-column: 1 / -1; }
.change-status { font-size: .74rem; }
.historical-map-hint { margin: 0; padding: 10px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; }
.historical-empty { padding: 8px 0; }
.area-list { columns: 3 220px; margin: 0; padding: 4px 20px 20px; list-style: none; }
.area-list li { break-inside: avoid; padding: 4px 0; color: var(--muted); font-size: .83rem; }
.area-list code { display: inline-block; min-width: 42px; color: var(--ink); font-size: .73rem; }
.registry-card details > .muted { padding: 0 20px 14px; }
.representation-unavailable { padding-top: 14px !important; }
.represented-area-list { padding-top: 4px; }
.represented-area-list li { align-items: baseline; }
.represented-area-list code { min-width: 62px; }
.live-result-key { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 18px; padding: 12px 16px; border: 1px solid var(--line); background: #fffdf7; }
.live-result-key span { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; }
.live-result-key small { flex-basis: 100%; color: var(--muted); }
.key-swatch { display: inline-block; width: 17px; height: 13px; border: 1px solid #0c684b; }
.key-partial { background: #8fc8b5; }
.key-complete { background: #0c684b; }
.key-zero { background: #fffdf7; }
.area-list li small { display: block; color: var(--muted); font-size: .68rem; }
.area-map-layout { display: grid; grid-template-columns: minmax(210px, 300px) 1fr; gap: 28px; padding: 6px 20px 22px; }
.area-map-panel { position: relative; display: grid; align-content: start; justify-items: center; gap: 8px; }
.area-map-host { display: grid; width: min(100%, 260px); height: 460px; place-items: center; }
.area-map-host svg { display: block; width: 100%; height: 100%; }
.area-map-host path.area-text-highlight { fill: #e2ac3b; stroke: var(--ink); stroke-width: 1px; }
.map-loading { color: var(--muted); font-size: .75rem; text-align: center; }
.area-map-panel a { color: var(--green); font-size: .78rem; font-weight: 750; }
.map-tooltip {
  position: absolute;
  z-index: 2;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, .3);
  background: var(--ink);
  color: white;
  box-shadow: 0 3px 12px rgba(23, 34, 29, .22);
  font-size: .75rem;
  font-weight: 750;
  line-height: 1;
  pointer-events: none;
  white-space: nowrap;
}
.area-map-layout .area-list { columns: 2 180px; padding: 8px 0 0; }
.registry-source { margin-top: 30px; }
.registry-source a { color: var(--green); }
.data-warning { margin-top: 22px; padding: 16px 18px; border: 1px solid #d5aa72; background: #fff3de; color: #6d4716; line-height: 1.5; }
.data-warning code { white-space: nowrap; }
.local-party-registry { padding-top: 8px; border-top: 2px solid var(--ink); }
.local-party-registry > .explanation { margin-bottom: 22px; }
.party-index { margin-top: 42px; }
.compact-section-heading { margin-bottom: 14px; }
.party-index-table-wrap { overflow-x: auto; border: 1px solid #c5cbc6; }
.party-index-table { background: transparent; }
.party-index-table th {
  padding: 10px 14px;
  border-bottom: 2px solid var(--ink);
  background: var(--ink);
  color: white;
}
.party-index-table th:last-child { width: 180px; }
.party-index-table td { padding: 0; border-bottom-color: #c5cbc6; }
.party-index-table td:last-child { padding: 8px 14px; }
.party-index-table tbody tr:nth-child(odd) { background: #fffdf7; }
.party-index-table tbody tr:nth-child(even) { background: #e4ebe6; }
.party-index-table tbody tr:hover { background: #ceddd3; }
.party-index-link {
  display: block;
  padding: 8px 14px;
  color: var(--ink);
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}
.party-index-link:hover, .party-index-link:focus-visible {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.party-index-abbreviation {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}
.national-status { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 42px; border: 1px solid var(--line); background: var(--panel); }
.national-status > div { display: grid; gap: 6px; padding: 18px; border-right: 1px solid var(--line); }
.national-status > div:last-child { border-right: 0; }
.national-status span { color: var(--muted); font-size: .7rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.national-status strong { font-size: .95rem; font-variant-numeric: tabular-nums; }
.match-ok { color: var(--green); }
.match-warning { color: var(--red); }
.test-badge { color: var(--red) !important; font-size: .7rem !important; font-weight: 850; letter-spacing: .09em; }
.election-selector { display: flex; align-items: end; gap: 12px; margin-top: 42px; padding: 18px; border: 1px solid var(--line); background: rgba(255,255,255,.45); }
.election-selector label { display: grid; gap: 7px; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.election-selector select, .election-selector input { min-width: 260px; border: 1px solid var(--line); background: var(--panel); padding: 10px 12px; color: var(--ink); font: inherit; }
.election-selector button { border: 1px solid var(--green); background: var(--green); padding: 10px 16px; color: white; font: inherit; font-weight: 800; cursor: pointer; }
.local-election-selector { flex-wrap: wrap; }
.local-area-search { flex: 1; }
.local-area-search input { width: 100%; }
.area-search-results { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; padding: 14px 18px; border: 1px solid var(--line); background: var(--panel); }
.area-search-results a { border: 1px solid var(--line); background: #e4ebe6; padding: 6px 10px; color: var(--ink); font-size: .82rem; font-weight: 750; text-decoration: none; }
.area-search-results a:hover, .area-search-results a:focus-visible { border-color: var(--green); color: var(--green); }
.section-heading-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.copy-data-button { border-color: var(--green); background: transparent; padding: 8px 11px; color: var(--green); font-size: .76rem; }
.copy-data-button:hover, .copy-data-button:focus-visible, .copy-data-button[data-copy-state="success"] { background: var(--green); color: white; }
.copy-data-button[data-copy-state="error"] { border-color: var(--red); color: var(--red); }
.table-copy-toolbar { display: flex; justify-content: flex-end; margin: 0 0 8px; }
.seat-distribution { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); border-top: 2px solid var(--ink); border-left: 1px solid var(--line); }
.seat-distribution div { display: grid; gap: 4px; padding: 15px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel); }
.seat-distribution div.seat-missed { background: #f1efe9; }
.seat-distribution div.seat-missed span,
.seat-distribution div.seat-missed strong { color: var(--muted); }
.seat-distribution span { overflow: hidden; color: var(--muted); font-size: .76rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.seat-distribution .seat-share { color: var(--green); font-size: .82rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.seat-distribution strong { font-family: Georgia, serif; font-size: 1.8rem; font-weight: 500; }
.national-seat-table-wrap { max-height: 70vh; }
.national-seat-table thead { position: sticky; z-index: 2; top: 0; background: var(--panel); box-shadow: 0 1px var(--line); }
.national-seat-table td:nth-child(n+3) { text-align: right; }
.national-seat-table th:nth-child(n+3) { text-align: right; }
.national-seat-table code { color: var(--green); font-weight: 750; }
.national-seat-table .shadow-seat { background: #e4ebe6; }
.national-seat-table .shadow-seat:hover { background: #ceddd3; }
.shadow-divider td { position: sticky; z-index: 1; top: 43px; padding: 10px 13px; background: var(--ink); color: white; font-size: .78rem; letter-spacing: .03em; }
.returned-seat-note { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 18px 0; padding: 14px 16px; border: 1px solid #d5aa72; background: #fff3de; font-size: .8rem; }
.constituency-party-list { border-top: 2px solid var(--ink); }
.constituency-party { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--panel); }
.constituency-party > summary { display: flex; justify-content: space-between; gap: 20px; padding: 15px 18px; cursor: pointer; }
.constituency-party > summary > span:last-child { color: var(--green); font-weight: 800; text-align: right; }
.constituency-party > summary small { display: block; margin-top: 3px; color: var(--muted); font-size: .7rem; font-weight: 600; }
.constituency-party[open] > summary { border-bottom: 1px solid var(--line); background: #e4ebe6; }
.constituency-layout { display: grid; grid-template-columns: minmax(210px, 270px) 1fr; gap: 24px; padding: 20px; }
.constituency-map-panel { min-width: 0; }
.constituency-map-host { height: 500px; }
.constituency-map-key { display: grid; gap: 6px; color: var(--muted); font-size: .7rem; }
.constituency-map-key span { display: flex; align-items: center; gap: 7px; }
.constituency-map-key i { width: 16px; height: 12px; border: 1px solid var(--ink); }
.fixed-seat-swatch { background: var(--green); }
.adjustment-seat-swatch { background: #e2ac3b; }
.constituency-table-wrap { align-self: start; max-height: 520px; }
.constituency-table thead { position: sticky; z-index: 1; top: 0; background: var(--panel); }
.constituency-table th:nth-child(n+2), .constituency-table td:nth-child(n+2) { text-align: right; }
.constituency-table td { padding-top: 11px; padding-bottom: 11px; }
.constituency-table code { color: var(--green); font-weight: 750; }
.constituency-table tr:hover { background: #edf1ee; }
.constituency-table tr.map-row-highlight { background: #f5dfad; }
.last-adjustment { color: #8a5a00; font-weight: 800; }
.race-status { grid-template-columns: repeat(3, 1fr); }
.race-method-note { padding: 14px 16px; border: 1px solid var(--line); background: #fffdf7; }
.race-section { margin-top: 46px; }
.race-heading { align-items: center; }
.race-cutoff {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: baseline;
  gap: 5px 14px;
  margin-bottom: 18px;
  padding: 17px 19px;
  border: 1px solid var(--line);
  background: #e4ebe6;
}
.race-cutoff > span { grid-row: 1 / 3; align-self: center; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.race-cutoff > strong { font-family: Georgia, serif; font-size: 2rem; font-weight: 500; }
.race-cutoff > small { color: var(--muted); }
.race-cutoff dl { display: flex; grid-row: 1 / 3; grid-column: 4; gap: 22px; margin: 0; }
.race-cutoff dl div { display: grid; gap: 3px; text-align: right; }
.race-cutoff dt { color: var(--muted); font-size: .65rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.race-cutoff dd { margin: 0; font-weight: 750; font-variant-numeric: tabular-nums; }
.race-table th:nth-child(n+3), .race-table td:nth-child(n+3) { text-align: right; }
.race-table tbody tr:nth-child(even) { background: #faf8f1; }
.race-table tbody tr:hover { background: #eef3ed; }
.race-gap strong { color: var(--ink); font-size: 1.08rem; }
.race-trend { font-weight: 800; }
.race-trend.closer { color: var(--green); }
.race-trend.farther { color: var(--red); }
.race-trend.unchanged, .race-trend.unavailable, .race-trend.same-party { color: var(--muted); }
.race-empty { margin-top: 0; }
.race-embed-option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.race-embed-option { display: grid; gap: 12px; }
.race-embed-option h3 { margin: 0; font-family: Georgia, serif; font-size: 1.45rem; font-weight: 500; }
.race-embed-option textarea { width: 100%; resize: vertical; border: 1px solid var(--line); background: #f4f1e9; padding: 11px; color: var(--ink); font: .75rem/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; }
.race-embed-option-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.race-embed-option a, .race-embed-footer a { color: var(--green); font-size: .8rem; font-weight: 750; }
.race-embed-code-panel summary { display: inline-block; border: 1px solid var(--green); padding: 8px 11px; color: var(--green); font-size: .76rem; font-weight: 750; cursor: pointer; list-style: none; }
.race-embed-code-panel summary::-webkit-details-marker { display: none; }
.race-embed-code-panel summary:hover, .race-embed-code-panel summary:focus-visible, .race-embed-code-panel[open] summary { background: var(--green); color: white; }
.race-embed-code-panel .embed-code-hide { display: none; }
.race-embed-code-panel[open] .embed-code-show { display: none; }
.race-embed-code-panel[open] .embed-code-hide { display: inline; }
.race-embed-code-body { display: grid; justify-items: start; gap: 10px; margin-top: 10px; }
.race-embed-body { background: transparent; }
.race-embed-main { width: min(900px, 100%); padding: 0; }
.race-embed-shell { overflow: hidden; border: 1px solid var(--line); background: var(--paper); padding: 10px; }
.race-embed-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-bottom: 6px; color: var(--muted); font-size: .62rem; font-weight: 750; }
.race-embed-section { margin-top: 0; }
.race-embed-section .race-heading { margin-bottom: 6px; }
.race-embed-section .race-heading .eyebrow { margin-bottom: 3px; font-size: .58rem; }
.race-embed-section .race-heading h1 { margin: 0; font-size: clamp(1.25rem, 4vw, 1.8rem); letter-spacing: -.025em; line-height: 1; }
.race-embed-cutoff { display: flex; align-items: baseline; gap: 7px; margin-bottom: 6px; padding: 6px 8px; background: #e4ebe6; color: var(--muted); font-size: .65rem; }
.race-embed-cutoff strong { color: var(--ink); font-family: Georgia, serif; font-size: 1rem; font-weight: 600; }
.race-embed-section .race-table th { padding: 5px 7px; font-size: .57rem; }
.race-embed-section .race-table td { padding: 6px 7px; font-size: .72rem; }
.race-embed-section .race-table th:nth-child(n+2), .race-embed-section .race-table td:nth-child(n+2) { text-align: right; }
.race-embed-section .race-gap strong { font-size: .85rem; }
.race-embed-section .race-trend { font-size: .68rem; }
.race-embed-footer { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; color: var(--muted); font-size: .62rem; }
.race-embed-footer a { font-size: .68rem; }

@media (max-width: 720px) {
  main { width: min(100% - 24px, 1180px); padding-top: 28px; }
  header, .filters { align-items: stretch; flex-direction: column; }
  .header-links { align-items: stretch; flex-direction: column; }
  .site-navigation { width: 100%; max-width: none; }
  .api-link { align-self: flex-start; }
  .filters input { width: 100%; }
  .sources li { flex-direction: column; }
  .registry-summary { grid-template-columns: 1fr; }
  .registry-summary div { border-right: 0; border-bottom: 1px solid var(--line); }
  .registry-summary div:last-child { border-bottom: 0; }
  .registry-card-heading { flex-direction: column; }
  .party-stat-groups { width: 100%; flex-wrap: wrap; }
  .area-counts { text-align: left; }
  .area-map-layout { grid-template-columns: 1fr; }
  .area-map-host { height: min(460px, 120vw); }
  .party-index-table th:last-child { width: 120px; }
  .national-status { grid-template-columns: 1fr 1fr; }
  .national-status > div:nth-child(2) { border-right: 0; }
  .national-status > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .election-selector { align-items: stretch; flex-direction: column; }
  .election-selector select, .election-selector input { width: 100%; min-width: 0; }
  .election-selector button { align-self: flex-start; }
  .constituency-party > summary { flex-direction: column; gap: 7px; }
  .constituency-party > summary > span:last-child { text-align: left; }
  .constituency-layout { grid-template-columns: 1fr; padding: 14px; }
  .constituency-map-host { height: min(500px, 130vw); }
  .race-status { grid-template-columns: 1fr; }
  .race-status > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .race-status > div:last-child { border-bottom: 0; }
  .race-cutoff { grid-template-columns: auto 1fr; }
  .race-cutoff > span { grid-row: auto; }
  .race-cutoff dl { grid-row: auto; grid-column: 1 / -1; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--line); }
  .race-embed-option-grid { grid-template-columns: 1fr; }
  .race-embed-shell { padding: 8px; }
  .race-embed-section .race-heading { align-items: flex-start; }
}
