

:root {
  --page: #FFFFFF;
  --panel: #F4F4F2;
  --ink: #121212;
  --ink-2: #3D3D3D;
  --ink-3: #5C5C5C;
  --rule: #D9D9D9;
  --rule-strong: #121212;
  --flag-bg: #FFF3E0;
  --flag-ink: #6B3A00;
  --flag-edge: #C77700;
  --focus: var(--ink);
  --serif: "Newsreader", Georgia, serif;
  --sans: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --gutter: 16px;
  --wrap: 1200px;

  
  --party-nat-mark: #0057B8;
  --party-nat-text: #0057B8;
  --party-nat-on: #FFFFFF;
  --party-lab-mark: #D3212D;
  --party-lab-text: #C01C27;
  --party-lab-on: #FFFFFF;
  --party-grn-mark: #11823B;
  --party-grn-text: #107A37;
  --party-grn-on: #FFFFFF;
  --party-act-mark: #B08400;
  --party-act-text: #7A5A00;
  --party-act-on: #000000;
  --party-nzf-mark: #1F1F1F;
  --party-nzf-text: #1F1F1F;
  --party-nzf-on: #FFFFFF;
  --party-tpm-mark: #8C1D40;
  --party-tpm-text: #8C1D40;
  --party-tpm-on: #FFFFFF;
  --party-top-mark: #007C89;
  --party-top-text: #00788A;
  --party-top-on: #FFFFFF;
  --party-ttt-mark: #6B3FA0;
  --party-ttt-text: #6B3FA0;
  --party-ttt-on: #FFFFFF;
  --party-fpl-mark: #8C4A12;
  --party-fpl-text: #8C4A12;
  --party-fpl-on: #FFFFFF;
  --party-oth-mark: #767676;
  --party-oth-text: #5C5C5C;
  --party-oth-on: #FFFFFF;
  --party-unregistered-mark: #475569;
  --party-unregistered-text: #475569;
  --party-unregistered-on: #FFFFFF;
}

:root[data-theme="dark"] {
  --page: #141414;
  --panel: #1F1F1F;
  --ink: #EDEDED;
  --ink-2: #C2C2C2;
  --ink-3: #A3A3A3;
  --rule: #3A3A3A;
  --rule-strong: #EDEDED;
  --flag-bg: #2E2110;
  --flag-ink: #FFD9A8;
  --flag-edge: #E0952E;
  --focus: var(--ink);

  --party-nat-mark: #4F8FD6;
  --party-nat-text: #7DAEE8;
  --party-nat-on: #000000;
  --party-lab-mark: #EF5A5F;
  --party-lab-text: #F27A7E;
  --party-lab-on: #000000;
  --party-grn-mark: #3DAE63;
  --party-grn-text: #5CC07D;
  --party-grn-on: #000000;
  --party-act-mark: #D9A800;
  --party-act-text: #E3B730;
  --party-act-on: #000000;
  --party-nzf-mark: #D6D3CC;
  --party-nzf-text: #D6D3CC;
  --party-nzf-on: #000000;
  --party-tpm-mark: #D45FB8;
  --party-tpm-text: #E487CF;
  --party-tpm-on: #000000;
  --party-top-mark: #32DAC3;
  --party-top-text: #32DAC3;
  --party-top-on: #000000;
  --party-ttt-mark: #B08FE0;
  --party-ttt-text: #B08FE0;
  --party-ttt-on: #000000;
  --party-fpl-mark: #D9884A;
  --party-fpl-text: #D9884A;
  --party-fpl-on: #000000;
  --party-oth-mark: #9A9A9A;
  --party-oth-text: #ABABAB;
  --party-oth-on: #000000;
  --party-unregistered-mark: #8A96A8;
  --party-unregistered-text: #A5AFBF;
  --party-unregistered-on: #000000;
}

html { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }


@font-face {
  font-family: "Newsreader";
  src: url("fonts/Newsreader-Variable.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("fonts/Newsreader-Italic-Variable.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Libre Franklin";
  src: url("fonts/LibreFranklin-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  font-optical-sizing: auto;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 2px var(--page); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

@media (width <= 720px) {
  body { font-size: 17px; }
}

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


.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 8px; top: 8px; background: var(--page); color: var(--ink); padding: 8px; z-index: 9; }


.mast { border-bottom: 1px solid var(--rule); background: var(--page); position: sticky; top: 0; z-index: 5; }
.mast-top { position: relative; max-width: var(--wrap); margin: 0 auto; padding: 14px var(--gutter) 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.wordmark { font-family: var(--serif); font-weight: 700; font-size: 30px; letter-spacing: -0.02em; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; font-variation-settings: "opsz" 72; line-height: 1.1; color: var(--ink); }
.wordmark .mark { width: 32px; height: 24px; flex: none; }
.mark-ink { fill: var(--ink); }
.mark-faint { opacity: 0.3; }
.mark-accent { fill: var(--ink-2); }
.mast-date { margin: 0; max-width: none; font-family: var(--sans); font-size: 13px; color: var(--ink-3); letter-spacing: 0.005em; }
.countdown { color: var(--ink); font-weight: 700; }
.theme-toggle {
  position: absolute; right: var(--gutter); top: 18px;
  appearance: none; font: inherit; font-family: var(--sans); font-size: 12px; color: var(--ink-2);
  background: transparent; border: 1px solid var(--rule); border-radius: 3px;
  padding: 3px 8px; cursor: pointer;
}
.theme-toggle:hover { border-color: var(--ink); color: var(--ink); }


.sections { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sections a { font-family: var(--sans); font-size: 14px; font-weight: 600; text-decoration: none; color: var(--ink-2); padding: 10px 14px 9px; border-bottom: 3px solid transparent; white-space: nowrap; }
.sections a:hover { color: var(--ink); border-bottom-color: var(--rule); }
.sections a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }


.page { display: block; max-width: var(--wrap); margin: 0 auto; padding: 28px var(--gutter) 0; }
.page-title { font-family: var(--serif); font-weight: 600; font-size: 44px; line-height: 1.08; letter-spacing: -0.02em; margin: 8px 0 20px; font-variation-settings: "opsz" 72; text-wrap: balance; }


.foot { margin-top: 72px; border-top: 1px solid var(--rule-strong); background: var(--page); }
.foot-in { max-width: 760px; margin: 0 auto; padding: 22px var(--gutter) 40px; font-family: var(--sans); font-size: 13.5px; color: var(--ink-3); text-align: center; }
.foot-in p { margin: 0 0 10px; max-width: none; }
.foot-caveat { color: var(--ink-2); font-size: 14.5px; }
.foot-caveat strong { color: var(--ink); }

.foot-version { font-size: 12px; }


@media (width <= 1023px) {
  .sections a { padding-left: 10px; padding-right: 10px; }
}

@media (width <= 720px) {
  .mast { position: static; }
  
  .mast-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "word toggle" "date date"; align-items: center; gap: 4px 10px; padding: 10px var(--gutter) 6px; }
  .wordmark { grid-area: word; justify-self: start; white-space: nowrap; font-size: 22px; gap: 6px; }
  .wordmark .mark { width: 24px; height: 18px; }
  .mast-date { grid-area: date; font-size: 12px; line-height: 1.35; text-align: left; }
  .mast-date .countdown { display: block; }
  .theme-toggle { grid-area: toggle; position: static; font-size: 11px; padding: 1px 6px; }
  
  .sections { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 0 2px; padding: 0 var(--gutter); }
  .sections a { padding: 9px 7px 7px; font-size: 13px; white-space: nowrap; }
  .page { padding-top: 20px; }
  .page-title { font-size: 32px; }
  .foot-in { text-align: left; }
}


:root {
  --font-display: var(--serif);
  --font-sans: var(--sans);
  --font-mono: var(--sans);

  --paper: var(--page);
  --paper-deep: var(--panel);
  --paper-well: var(--panel);
  --rule-soft: var(--rule);
  --fern: var(--ink);
  --fern-wash: var(--panel);
  --caution: var(--flag-ink);
  --caution-wash: var(--flag-bg);
  --alarm: #8C2F1E;
  --alarm-wash: rgba(140, 47, 30, 0.08);

  --bg-canvas: var(--page);
  --bg-surface: var(--panel);
  --bg-card: var(--panel);
  --bg-card-hover: var(--panel);
  --bg-subtle: var(--panel);
  --border-main: var(--rule);
  --border-highlight: var(--ink-3);
  --border-accent: var(--ink);
  --text-primary: var(--ink);
  --text-secondary: var(--ink-2);
  --text-muted: var(--ink-3);
  --color-accent: var(--ink);
  --color-accent-hover: var(--ink-2);
  --color-success: var(--ink);
  --color-warning: var(--flag-ink);
  --color-danger: var(--alarm);

  --size-1: 0.75rem;   
  --size-2: 0.875rem;  
  --size-3: 1rem;      
  --size-4: 1.375rem;  
  --size-5: 2.125rem;  
  --size-6: 3.4375rem; 
  --measure: 68ch;
  --radius: 3px;

  
  --chart-mark-nat: var(--party-nat-mark);
  --chart-mark-lab: var(--party-lab-mark);
  --chart-mark-grn: var(--party-grn-mark);
  --chart-mark-act: var(--party-act-mark);
  --chart-mark-nzf: var(--party-nzf-mark);
  --chart-mark-tpm: var(--party-tpm-mark);
  --chart-mark-top: var(--party-top-mark);
  --chart-mark-ttt: var(--party-ttt-mark);
  --chart-mark-fpl: var(--party-fpl-mark);
  --chart-mark-oth: var(--party-oth-mark);
  --chart-mark-unregistered: var(--party-unregistered-mark);
}

:root[data-theme="dark"] {
  --alarm: #D47B68;
  --alarm-wash: rgba(212, 123, 104, 0.10);
}


* { margin: 0; padding: 0; }
p { max-width: var(--measure); }
a { text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
code { font-family: var(--font-sans); font-size: 0.92em; color: var(--text-secondary); overflow-wrap: break-word; }
strong { font-weight: 600; }
h1, h2, h3, h4 { font-weight: 500; letter-spacing: 0; }
h2 {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 40;
  font-size: var(--size-4);
  font-weight: 500;
  line-height: 1.2;
  color: var(--text-primary);
}
h3 {
  font-size: var(--size-3);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}


.section-title, .explainer-card .explainer-content .explainer-title {
  font-family: var(--sans);
  font-variation-settings: normal;
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 6px;
}
.subhead { font-family: var(--sans); font-weight: 700; font-size: 17px; line-height: 1.3; color: var(--ink); margin: 0 0 10px; }
@media (width <= 720px) {
  .section-title, .explainer-card .explainer-content .explainer-title { font-size: 19px; }
  .subhead { font-size: 16px; }
}



.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.warning-card {
  display: flex;
  gap: 1rem;
  background: var(--alarm-wash);
  border-left: 3px solid var(--alarm);
  padding: 0.85rem 1rem;
  margin: 1rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.warning-title { font-weight: 600; color: var(--alarm); }
.warning-desc { color: var(--text-secondary); font-size: var(--size-2); }


.release-banner {
  background: var(--alarm-wash);
  border: 1px solid var(--alarm);
  padding: 0.85rem 1rem;
  margin: 1rem 0;
  border-radius: var(--radius);
}
.release-banner-text { margin: 0; font-weight: 600; color: var(--alarm); }
.release-banner-text .copy-detail { font-weight: 400; color: var(--text-secondary); font-size: var(--size-2); }


.proofs-claims { list-style: none; margin: 0.75rem 0 0; padding: 0; display: grid; gap: 0.9rem; }
.proofs-claim { border-top: 1px solid var(--rule-soft); padding-top: 0.75rem; }
.proofs-claim .copy { margin: 0; }
.proofs-list { padding-left: 1.1rem; display: grid; gap: 0.5rem; }
.proofs-versions { color: var(--text-secondary); font-size: var(--size-2); margin-top: 1.5rem; }


.proofs-proved > summary { cursor: pointer; font-weight: 700; color: var(--text-primary); padding: 0.5rem 0; }


.proofs-area .explainer-content { flex: 1 1 auto; min-width: 0; max-width: 70ch; }
.proofs-list { list-style: none; padding-left: 0; gap: 0.4rem; font-family: var(--sans); font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.proofs-section p[data-result-label] { font-family: var(--sans); font-size: 14.5px; line-height: 1.45; color: var(--ink-3); max-width: 62ch; margin: 0 0 0.5rem; }
.method-section.proofs-section { padding-bottom: 0.5rem; }

p[data-result-label] {
  margin-bottom: 1rem;
}


.chamber-section, .parliament-bar-section, .coalitions-section, .map-section {
  padding: 1.5rem 0 2rem;
  margin-bottom: 1rem;
  border-top: 1px solid var(--rule-soft);
}

.probabilistic-section, .demographics-section, .method-section {
  padding: 14px 0 2rem;
  margin-bottom: 1rem;
  border-top: 1px solid var(--rule-strong);
}

.table-container { margin: 1rem 0 1.5rem; }
.section-head, .chamber-header, .prob-header, .map-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.chamber-badges, .prob-badges { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0 2rem;
  margin: 0.5rem 0 2rem;
  border-top: 1px solid var(--rule-soft);
}
.kpi-card { padding: 1rem 0 1.25rem; border-bottom: 1px solid var(--rule-soft); }
.kpi-label { font-size: var(--size-2); color: var(--text-secondary); margin-bottom: 0.25rem; }
.kpi-value {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 72, "SOFT" 30;
  font-size: var(--size-5);
  font-weight: 400;
  line-height: 1.05;
  color: var(--text-primary);
}
.kpi-unit { font-family: var(--font-sans); font-size: var(--size-2); color: var(--text-muted); font-weight: 400; margin-left: 0.15rem; }
.kpi-sub { font-size: var(--size-2); color: var(--text-muted); margin-top: 0.35rem; }



.summary-card { margin: 0.5rem 0 2rem; padding: 1rem 0 1.25rem; border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); }
.summary-card h2 { margin: 0 0 0.75rem; }
.summary-groupings { list-style: none; margin: 0; padding: 0; }
.summary-grouping { padding: 0.25rem 0; color: var(--text-primary); }
.summary-runs { display: block; font-size: var(--size-2); color: var(--text-muted); }
.summary-kingmaker, .summary-since { margin: 0.5rem 0 0; color: var(--text-primary); }
.summary-chances { list-style: none; margin: 0.25rem 0 0; padding: 0; color: var(--text-secondary); }
.summary-card .copy-detail, .summary-caveat { display: block; margin: 0.5rem 0 0; font-size: var(--size-2); color: var(--text-muted); }

.hemicycle-container { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.hemicycle-svg { width: 100%; max-width: 680px; height: auto; overflow: visible; }
.svg-label-chair { font-family: var(--font-sans); font-size: 8px; font-weight: 600; fill: var(--ink-2); }
.seat-dot { cursor: pointer; transition: stroke-width 0.15s ease; }

.seat-dot:hover { stroke: var(--ink); stroke-width: 2; }
.overhang-dot { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 2, 2; }
.chamber-legend {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.25rem;
  padding-top: 0.75rem; border-top: 1px solid var(--rule-soft); width: 100%;
}
.chamber-legend-item { display: inline-flex; align-items: center; gap: 0.4rem; font-size: var(--size-2); color: var(--text-secondary); }
.legend-party { font-weight: 500; color: var(--text-primary); }
.legend-count { font-weight: 600; color: var(--text-primary); }


.spectrum-container {
  position: relative; height: 18px; display: flex; overflow: hidden;
  margin-bottom: 0.75rem; border-radius: var(--radius);
}
.seat-segment { height: 100%; }
.spectrum-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; font-size: var(--size-2); color: var(--text-secondary); }
.legend-item { display: inline-flex; align-items: center; gap: 0.4rem; }
.legend-dot { width: 10px; height: 10px; border-radius: 2px; }


.table-container { overflow-x: auto; overflow-y: hidden; }

table { width: 100%; border-collapse: collapse; text-align: left; font-family: var(--sans); font-size: var(--size-2); font-variant-numeric: tabular-nums; }
th {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.6rem 0.75rem;
  vertical-align: bottom;
}

thead th { border-bottom: 1px solid var(--ink); hyphens: manual; overflow-wrap: break-word; }
td { padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--rule-soft); vertical-align: middle; }

tbody th { padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--rule-soft); vertical-align: middle; }

tbody tr:last-child > td, tbody tr:last-child > th { border-bottom: none; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
.party-cell { display: flex; align-items: center; gap: 0.6rem; }
.party-avatar {
  font-size: var(--size-1); font-weight: 600; width: 34px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 2px; letter-spacing: 0.02em;
}
.party-name { font-weight: 500; color: var(--text-primary); display: block; }
.num-col, thead th.num-col { text-align: right; }
.nowrap { white-space: nowrap; }


.party-table table { font-variant-numeric: tabular-nums; }
.party-table th { white-space: nowrap; }
.party-table .party-name { white-space: nowrap; }
.party-table .party-avatar { flex-shrink: 0; }
.party-table .share-col { width: 42%; }
.party-table .num-col { width: 1%; white-space: nowrap; }
.share-cell { display: grid; grid-template-columns: 3.25rem minmax(4rem, 1fr); align-items: center; gap: 0.75rem; }
.share-val { font-weight: 500; color: var(--text-primary); text-align: right; }
.share-bar { position: relative; display: block; height: 8px; background: var(--rule-soft); }
.share-fill { position: absolute; left: 0; top: 0; bottom: 0; }
.share-rule { position: absolute; top: -4px; bottom: -4px; width: 1px; margin-left: -0.5px; background: var(--ink); }
.share-note { display: block; margin: 0.3rem 0 0 4rem; font-size: var(--size-1); color: var(--text-muted); white-space: nowrap; }

.share-axis { margin-top: 0.35rem; }
.share-track { position: relative; display: block; height: 1rem; }
.share-rule-label { position: absolute; bottom: 0; transform: translateX(-50%); font-size: var(--size-1); font-weight: 400; line-height: 1; color: var(--text-muted); }
.num-zero { color: var(--text-muted); }
.seat-total { white-space: nowrap; font-weight: 600; color: var(--text-primary); }
.seat-mark { font-weight: 400; color: var(--text-muted); margin-left: 1px; }

.table-footnote { margin: 0.4rem 0 0; max-width: var(--measure); font-size: var(--size-1); color: var(--text-muted); }
table + .table-footnote { margin-top: 1rem; }
.party-row-residual .party-name, .party-row-residual .share-val { color: var(--text-muted); }
.party-row-residual .party-avatar { opacity: 0.6; }
@media (width <= 560px) {
  .party-table .seat-split { display: none; }
  .party-table .party-name { white-space: normal; }
  .party-table td:not(:first-child), .party-table th:not(:first-child) { padding-left: 0.35rem; }
  .party-table td:not(:last-child), .party-table th:not(:last-child) { padding-right: 0.35rem; }
  .party-table .party-cell { gap: 0.35rem; }
  .party-table .party-avatar { width: 26px; height: 18px; font-size: 0.625rem; }
  .party-table .party-name { font-size: 0.8125rem; }
  .party-table .party-col { width: 48%; }
  .party-table .share-col { width: auto; }
  .share-axis .share-val { display: none; }
  .share-cell { grid-template-columns: minmax(5rem, 1fr); gap: 0.35rem; }
  .share-val { text-align: left; }
  .share-note { margin-left: 0; font-size: 0.65rem; }
}


.badge {
  display: inline-flex; align-items: center;
  font-size: var(--size-1); font-weight: 500;
  padding: 0.1rem 0.45rem; border-radius: var(--radius);
  border: 1px solid var(--rule); color: var(--text-secondary); background: transparent;
  white-space: nowrap;
}
.badge-success { border-color: var(--fern); color: var(--fern); background: var(--fern-wash); }
.badge-warning { border-color: var(--caution); color: var(--caution); background: var(--caution-wash); }
.badge-info { border-color: var(--rule); color: var(--text-secondary); }
.badge-accent { border-color: var(--fern); color: var(--fern); }
.badge-muted { border-color: var(--rule-soft); color: var(--text-muted); }
.badge-micro { font-size: 0.65rem; color: var(--caution); padding: 0 0.25rem; }
.badge-majority-won { border-color: var(--fern); background: var(--fern); color: var(--paper); font-weight: 600; }
.badge-majority-lost { border-color: var(--rule); color: var(--text-secondary); }
.badge-conditional-calc { border-color: var(--caution); color: var(--caution); }



.what-if-seats { margin-top: 1.5rem; }
.what-if-seats td[data-majority="true"] { font-weight: 600; color: var(--text-primary); }
.what-if-same { font-size: var(--size-1); color: var(--text-muted); }


@media (width <= 720px) {
  table[data-stack] thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  table[data-stack], table[data-stack] tbody { display: block; }
  table[data-stack] tr { display: grid; grid-template-columns: repeat(var(--stack-cols, 2), minmax(0, 1fr)); gap: 0.5rem 1rem; padding: 0.75rem 0; border-bottom: 1px solid var(--rule-soft); }
  table[data-stack] tr:last-child { border-bottom: none; }
  table[data-stack] td, table[data-stack] tbody th { display: block; min-width: 0; padding: 0; border: 0; text-align: left; }
  table[data-stack] .x-stack-head, table[data-stack] tbody th[scope="row"] { grid-column: 1 / -1; }
  table[data-stack] td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 0.15rem; font-size: var(--size-1); font-weight: 400; color: var(--text-muted); }
}

.mini-party-chip { font-size: var(--size-1); color: var(--text-secondary); border: 1px solid var(--rule-soft); padding: 0.05rem 0.4rem; border-radius: var(--radius); }
.dossier-tag, .summary-title, .canvas-title, .sidebar-title {
  font-size: var(--size-2); font-weight: 600; color: var(--text-primary);
}

.prob-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 2rem; margin-bottom: 1.25rem; border-top: 1px solid var(--rule-soft); }
.prob-kpi-card { padding: 0.9rem 0 1rem; border-bottom: 1px solid var(--rule-soft); }
.prob-coalitions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem 2rem; margin-bottom: 1.5rem; }
.prob-coalition-card { display: flex; flex-direction: column; gap: 0.4rem; }
.prob-coalition-name { font-size: var(--size-2); font-weight: 500; color: var(--text-primary); }
.prob-gauge-container { display: block; width: 100%; height: 5px; background: var(--rule-soft); overflow: hidden; }
.prob-gauge-bar { display: block; height: 100%; }
.prob-coalition-val { display: flex; justify-content: space-between; align-items: baseline; }
.prob-num { font-family: var(--font-display); font-variation-settings: "opsz" 40, "SOFT" 30; font-size: var(--size-4); color: var(--text-primary); }
.prob-coalitions-heading { margin: 1.25rem 0 0.75rem; }
.ci-range { font-weight: 500; color: var(--text-primary); }
.ci-sub { font-size: var(--size-1); color: var(--text-muted); margin-top: 0.1rem; }
.prob-seat-badge { font-weight: 600; padding: 0.1rem 0.45rem; border-radius: 2px; display: inline-block; }
.prob-disclaimer { font-size: var(--size-2); color: var(--text-secondary); margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid var(--rule-soft); }
.prob-disclaimer p { max-width: var(--measure); }



.probabilistic-section .prob-caveat { margin: 0 0 0.6rem; max-width: 62ch; text-wrap: balance; }
.probabilistic-section .prob-poll-miss { margin: 0 0 1.75rem; max-width: 62ch; text-wrap: pretty; }
.probabilistic-section .prob-table-container { border-top: 0; padding-top: 0; margin-top: 0.5rem; }
.probabilistic-section .prob-middle-run, .probabilistic-section .prob-overhang-note {
  font-family: var(--sans); font-size: 13.5px; line-height: 1.5; color: var(--ink-3); max-width: 70ch; margin: 0.35rem 0 0;
}
@media (width <= 720px) {
  
  .prob-table-container td[data-label]::before { text-wrap: balance; }
}

.explainer-card { display: flex; gap: 1rem; padding: 1.25rem 0; border-top: 1px solid var(--rule-soft); }
.explainer-badge-icon {
  flex-shrink: 0; width: 2.4rem; height: 2.4rem; border: 1px solid var(--rule); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; font-size: var(--size-1); font-weight: 600; color: var(--text-secondary);
}
.explainer-content h3 { margin-bottom: 0.3rem; }

.explainer-content .explainer-title { font-family: inherit; font-variation-settings: normal; font-size: var(--size-3); font-weight: 600; line-height: inherit; margin-bottom: 0.3rem; }
.explainer-content p { font-size: var(--size-2); color: var(--text-secondary); }

.explainer-badge-icon .legend-dot { display: inline-block; width: 8px; height: 8px; margin-right: 0.25rem; flex: none; }
.explainer-badge-icon:has(.legend-dot) { width: auto; min-width: 2.4rem; padding: 0 0.4rem; }
.overhang-card .explainer-badge-icon { border-color: var(--caution); color: var(--caution); }
.unavailable-card { flex-direction: column; gap: 0.5rem; }
.provenance-note { margin-top: 0.75rem; font-size: var(--size-2); color: var(--text-muted); }



.explainer-badge-icon:has(.legend-dot) { width: auto; min-width: 0; height: auto; padding: 0.1rem 0.35rem; align-self: flex-start; margin-top: 0.15rem; }

.copy-detail, .th-detail {
  display: block; font-family: var(--font-sans); font-style: normal; font-size: var(--size-1);
  font-weight: 400; line-height: 1.45; color: var(--text-muted); margin-top: 0.3rem;
}
.th-detail { margin-top: 0.15rem; text-transform: none; letter-spacing: 0; }

.method-flow-wrap { margin: 1rem 0 0; }
.method-flow { width: 100%; height: auto; display: block; }

.method-flow[data-layout="narrow"] { display: none; }
@media (width <= 1023px) {
  .method-flow[data-layout="wide"] { display: none; }
  .method-flow[data-layout="narrow"] { display: block; max-width: 24rem; }
}
@media (width <= 760px) {
  .method-flow-wrap { margin: 0.75rem 0 0; }
}
.method-flow .flow-box rect { fill: none; stroke: var(--rule); stroke-width: 1; }
.method-flow .flow-title { font-family: var(--font-sans); font-size: 15px; font-weight: 600; fill: var(--ink); }
.method-flow .flow-body { font-family: var(--font-sans); font-size: 12.5px; fill: var(--text-secondary); }
.method-flow .flow-arrow { stroke: var(--fern); stroke-width: 1.5; fill: none; }
.method-flow marker path { fill: var(--fern); }
.method-flow .flow-note { font-family: var(--font-sans); font-size: 12.5px; fill: var(--text-muted); }

.coalition-progress-fill.progress-majority { background-color: var(--fern); }
.coalition-progress-fill.progress-short { background-color: var(--alarm); }


.assoc-caveat { margin-bottom: 1.25rem; font-size: var(--size-2); color: var(--text-secondary); }
.assoc-caveat p + p { margin-top: 0.5rem; }
.assoc-lede { font-size: var(--size-2); color: var(--text-secondary); margin: 0.25rem 0 0.75rem; }
.assoc-legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin: 0.25rem 0 0.75rem; font-size: var(--size-2); }
.assoc-legend-item { display: inline-flex; align-items: center; gap: 0.35rem; }
.assoc-table th[scope="row"] { text-align: left; white-space: nowrap; font-weight: 400; color: var(--text-primary); border-bottom: 1px solid var(--rule-soft); }
.assoc-table thead th { text-align: center; }
.assoc-table thead th:first-child { text-align: left; }
.assoc-predictor { font-weight: 500; }
.assoc-cell { text-align: center; padding: 0.3rem 0.2rem; }
.assoc-num { font-size: var(--size-1); color: var(--text-muted); margin-top: -0.2rem; }
.tilt-stroke { display: block; margin: 0 auto; }
.tilt-axis { stroke: var(--rule); stroke-width: 1; }
.assoc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr)); gap: 1.5rem 2.5rem; margin-top: 2rem; }


@media (width <= 720px) {
  .assoc-table { --stack-cols: 4; }
  .assoc-table .assoc-cell { text-align: center; }
  .assoc-table th[scope="row"] { white-space: normal; border-bottom: 0; }
}


.assoc-table th[scope="row"] { vertical-align: middle; }
.assoc-table tbody tr:last-child th[scope="row"] { border-bottom: 0; }
.demographics-section .assoc-key, .demographics-section .census-source {
  font-family: var(--sans); font-size: 13.5px; line-height: 1.5; color: var(--ink-3); max-width: 70ch;
}
.demographics-section .census-source { margin-top: 1.5rem; }
.demographics-section p.assoc-key:not(.census-source) { margin: 0 0 1rem; }
.assoc-grid > div { display: grid; grid-template-rows: subgrid; grid-row: span 3; row-gap: 0; align-content: start; min-width: 0; }
.assoc-grid > div > .table-container { grid-row: 3; }
:root[data-theme="dark"] .tilt-line[stroke-opacity="0.5"] { stroke-opacity: 0.8; }

@media (width <= 1023px) {
  .assoc-grid > div { display: block; }
}

.history-chart { margin: 1rem 0 1.5rem; max-width: 100%; }
.history-chart-title { font-size: var(--size-2); font-weight: 500; color: var(--text-primary); margin-bottom: 0.25rem; }
.history-chart-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25em 1em; padding: 0; margin: 0 0 0.5em; font-size: var(--size-1); color: var(--text-secondary); }
.history-chart-legend li { display: inline-flex; align-items: center; gap: 0.35em; }
.history-chart-swatch { display: inline-block; width: 1em; height: 0.2em; }
.history-chart-svg { display: block; width: 100%; height: auto; font-family: var(--font-sans); }
.history-chart-large { display: none; }
.history-chart-medium { display: none; }
.history-chart-narrow { display: none; }

@media (640px < width <= 900px) {
  .history-chart-wide { display: none; }
  .history-chart-medium { display: block; }
}

@media (900px < width <= 1030px) {
  .history-chart-wide { display: none; }
  .history-chart-large { display: block; }
}
.history-chart-swatch-dot { width: 0.6em; height: 0.6em; border: 1.5px solid var(--ink-2); border-radius: 50%; background: transparent; }
.history-chart-swatch-poll { width: 0.45em; height: 0.45em; border-radius: 50%; background: var(--ink-2); opacity: 0.45; }
.history-chart-swatch-secondary { width: 1em; height: 1px; background: var(--ink-2); opacity: 0.7; }
.history-chart-swatch-forecast { width: 0.6em; height: 0.6em; border: 1.5px solid var(--ink-2); background: transparent; }
.history-chart .grid { color: var(--rule-soft); }
.history-chart .x-axis { color: var(--rule); }
.history-chart .y-ticks, .history-chart .x-ticks, .history-chart .ref-line { color: var(--ink-3); }
.history-chart .steps-line, .history-chart .marker, .history-chart .move-marker { color: var(--ink-2); }
.history-chart .halo { stroke: var(--paper); }


.history-section .section-title { margin: 0.25rem 0 0.5rem; }
.history-warning { color: var(--caution); font-size: var(--size-2); margin: 0.75rem 0; max-width: var(--measure); }
.history-band-note { color: var(--text-secondary); font-size: var(--size-1); margin: 0.75rem 0 0.5rem; max-width: var(--measure); }
.history-table { margin: -0.75rem 0 2rem; }
.history-table > summary { cursor: pointer; font-size: var(--size-2); color: var(--text-secondary); padding: 0.25rem 0; }
.history-table-scroll { max-height: 24rem; overflow-x: auto; overflow-y: auto; }
.history-table-scroll th, .history-table-scroll td { padding: 0.35rem 0.75rem 0.35rem 0; white-space: nowrap; }
.history-table-scroll thead th { position: sticky; top: 0; background: var(--paper); }


.history-chances-scope { color: var(--text-secondary); font-size: var(--size-1); margin: 0.5rem 0; max-width: var(--measure); }

.polls-table .num-col { white-space: nowrap; }
.polls-reason { display: block; font-size: var(--size-1); color: var(--text-secondary); margin-top: 0.15rem; }
.polls-filter { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1rem; margin: 0.75rem 0; }
.polls-filter[hidden] { display: none; }
.polls-count { margin: 0; font-size: var(--size-1); color: var(--text-secondary); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media (width >= 2000px) {
  html { font-size: 18px; }
}
@media (width <= 640px) {
  .history-chart-wide { display: none; }
  .history-chart-narrow { display: block; }
  
}


.pl svg.pl-m, .pl ul.pl-m { display: none; }


.pl .hero { padding: 16px 0 8px; }
.pl .hero-text { max-width: 820px; margin: 0 auto; text-align: center; }
.pl .hero h1 { font-family: var(--serif); font-weight: 600; font-size: 58px; line-height: 1.04; letter-spacing: -0.022em; margin: 0 0 18px; font-variation-settings: "opsz" 72; text-wrap: balance; }
.pl .dek { font-family: var(--serif); font-size: 22px; line-height: 1.45; color: var(--ink-2); margin: 0 auto 16px; max-width: 700px; text-wrap: pretty; }
.pl .update { font-family: var(--sans); font-size: 13.5px; color: var(--ink-3); margin: 0; text-align: center; }


.pl .meter { margin: 36px 0 0; }
.pl .meter-svg { width: 100%; height: auto; display: block; overflow: visible; }
.pl .meter figcaption { font-family: var(--sans); font-size: 13px; color: var(--ink-3); text-align: center; margin-top: 14px; }
.pl .seat { stroke: var(--page); stroke-opacity: 0.38; stroke-width: 1; }
.pl .pl-m .seat { stroke: none; }
.pl .majority { stroke: var(--ink); stroke-width: 2; }
.pl .m-tick { fill: none; stroke-width: 1.5; }
.pl .m-group { font-family: var(--sans); font-size: 16px; font-weight: 600; fill: var(--ink-2); }
.pl .m-big { font-family: var(--sans); font-size: 56px; font-weight: 800; fill: var(--ink); letter-spacing: -0.03em; }
.pl .m-unit { font-family: var(--sans); font-size: 18px; font-weight: 500; fill: var(--ink-3); }
.pl .m-line { font-family: var(--sans); font-size: 14px; font-weight: 700; fill: var(--ink); }
.pl .m-name, .pl .m-num, .pl .m-num-s { font-family: var(--sans); paint-order: stroke; stroke-linejoin: round; }
.pl .m-name { font-size: 14px; font-weight: 600; stroke-width: 5; }
.pl .m-num { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; stroke-width: 6; }
.pl .m-num-s { font-size: 13px; font-weight: 700; stroke-width: 3; }
.pl .m-ann-h { font-family: var(--sans); font-size: 16px; font-weight: 700; }
.pl .m-ann { font-family: var(--serif); font-style: italic; font-size: 16px; fill: var(--ink-2); }
.pl .meter-key { list-style: none; padding: 0; margin: 4px 0 0; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 16px; font-family: var(--sans); font-size: 14px; }
.pl .meter-key b { font-weight: 800; margin-left: 4px; }
.pl .sw, .pl .sq { display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px; flex: none; }


.pl .mod { border-top: 1px solid var(--rule-strong); padding-top: 14px; margin-top: 48px; min-width: 0; }
.pl .mod-head h2 { font-family: var(--sans); font-weight: 800; font-size: 21px; letter-spacing: -0.01em; line-height: 1.2; margin: 0 0 6px; }
.pl .mod-head p { font-family: var(--sans); font-size: 14.5px; line-height: 1.45; color: var(--ink-3); margin: 0 0 18px; max-width: 62ch; text-wrap: pretty; }
.pl .fine { font-family: var(--sans); font-size: 13px; line-height: 1.45; color: var(--ink-3); margin: 12px 0 0; max-width: 70ch; }
.pl .more { display: inline-block; margin-top: 16px; font-family: var(--sans); font-weight: 700; font-size: 14px; text-decoration: none; border-bottom: 2px solid var(--ink); padding-bottom: 1px; }
.pl .more:hover { border-bottom-color: var(--ink); color: var(--ink); }
.pl .caveat { font-family: var(--sans); font-size: 14px; color: var(--ink-2); margin: 24px 0 0; padding-top: 14px; border-top: 1px solid var(--rule); }
.pl .grid2 { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; }
.pl .grid2-b { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }


.pl .band { background: var(--panel); margin-top: 44px; padding: 8px 24px 32px; }
.pl .band .mod-head { padding-top: 20px; }
.pl .waffles { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
.pl .wf h3 { font-family: var(--sans); font-size: 17px; font-weight: 700; margin: 0 0 14px; }
.pl .wf-body { display: flex; gap: 28px; align-items: center; }
.pl .waffle { flex: none; display: block; }
.pl .waffle .alone { fill: var(--ink); }
.pl .waffle .rest { fill: var(--rule); }
.pl .wf dl { margin: 0; display: grid; gap: 16px; font-family: var(--sans); }
.pl .wf dt { font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.pl .wf dd { margin: 2px 0 0; font-size: 40px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; white-space: nowrap; }


.pl .parties { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 15px; }
.pl .parties thead th { font-size: 12.5px; font-weight: 600; color: var(--ink-3); text-align: left; padding: 0 0 8px; border-bottom: 1px solid var(--rule); vertical-align: bottom; }
.pl .parties td, .pl .parties tbody th { padding: 10px 0; border-bottom: 1px solid var(--rule); text-align: left; font-weight: 600; }
.pl .parties tbody th { padding-right: 12px; overflow-wrap: normal; white-space: nowrap; }
.pl .parties .num { text-align: right; font-variant-numeric: tabular-nums; padding-left: 10px; white-space: nowrap; }
.pl .parties .range, .pl .parties .delta { color: var(--ink-3); font-weight: 500; }

.pl .barcell { display: grid; grid-template-columns: minmax(0, 1fr) 3.4em; align-items: center; column-gap: 8px; }
.pl .barcell .hbar { grid-column: 1; height: 16px; display: block; }
.pl .barcell > .num { grid-column: 2; padding-left: 0; }

.pl .parties thead th.num { white-space: normal; }
.pl .parties .share { width: 30%; }

.pl .parties td.seat-total, .pl .parties thead th:nth-child(3) { padding-right: 1.1em; }
.pl .parties td.seat-total { position: relative; }
.pl .seat-mark { position: absolute; margin-left: 1px; }

.pl .parties tr:has(+ .p-note-row) > * { border-bottom: 0; padding-bottom: 2px; }
.pl .parties .p-note-row td { padding: 0 0 10px; font-weight: 500; }


.pl .lean-sensitivity { margin-top: 20px; font-family: var(--sans); font-size: 13.5px; color: var(--ink-2); }
.pl .lean-sensitivity summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.pl .lean-sensitivity .table-footnote { margin: 6px 0 0; }
.pl .lean-sensitivity table { width: 100%; table-layout: fixed; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.pl .lean-sensitivity th, .pl .lean-sensitivity td { white-space: normal; overflow-wrap: break-word; padding: 4px 4px 4px 0; text-align: left; }
.pl .lean-sensitivity .num-col { text-align: right; font-variant-numeric: tabular-nums; }
.pl .lean-sensitivity th:first-child { width: 34%; }
.pl .p-note { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-3); }


.pl table.diff { width: auto; }
.pl .diff { margin: 0 auto; border-collapse: collapse; font-family: var(--sans); font-size: 13.5px; color: var(--ink-2); }
.pl .diff caption { font-weight: 700; color: var(--ink); padding-bottom: 4px; }
.pl .diff th, .pl .diff td { padding: 3px 8px; border-bottom: 1px solid var(--rule); text-align: left; font-weight: 500; }
.pl .diff td { font-variant-numeric: tabular-nums; }


.pl .seats { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 20px; font-family: var(--sans); }
.pl .seat-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; padding: 8px 0 8px 12px; border-left: 4px solid var(--pc); border-bottom: 1px solid var(--rule); text-decoration: none; margin-bottom: 6px; }
.pl .seat-link:hover .seat-n { text-decoration: underline; }
.pl .seat-n { font-weight: 700; font-size: 14.5px; overflow-wrap: break-word; }
.pl .seat-a { grid-row: 2; font-size: 12.5px; color: var(--ink-3); }
.pl .seat-c { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.pl .seat-why { grid-row: 3; grid-column: 1 / -1; font-size: 12px; color: var(--ink-3); overflow-wrap: break-word; }


.pl .latest { list-style: none; padding: 0; margin: 0; font-family: var(--sans); }
.pl .latest li { padding: 10px 0 12px; border-bottom: 1px solid var(--rule); }
.pl .lp-h { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 12px; font-size: 14px; margin-bottom: 7px; }
.pl .lp-who { font-weight: 700; }
.pl .lp-when { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.pl .stack { display: flex; height: 14px; gap: 1px; }
.pl .stack span { display: block; height: 100%; }


.pl .ways { width: 100%; height: auto; display: block; overflow: visible; }

.pl .w-row { font-family: var(--sans); font-size: 14.5px; font-weight: 600; fill: var(--ink); paint-order: stroke; stroke: var(--page); stroke-width: 4px; stroke-linejoin: round; }
.pl .w-total { font-family: var(--sans); font-size: 14px; font-weight: 800; fill: var(--ink); }
.pl .w-in { font-family: var(--sans); font-size: 11.5px; font-weight: 700; }
.pl .w-line { stroke: var(--ink); stroke-width: 1.5; }
.pl .w-line-halo { stroke: var(--page); stroke-width: 4.5; }
.pl .w-rule { stroke: var(--rule); }
.pl .w-head { font-family: var(--sans); font-size: 12.5px; font-weight: 700; fill: var(--ink); }


@media (width <= 1023px) {
  .pl .waffles { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .pl .grid2, .pl .grid2-b { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pl .seats { grid-template-columns: minmax(0, 1fr); }
  .pl svg.ways.pl-d { display: none; }
  .pl svg.ways.pl-m { display: block; max-width: 440px; }
}

@media (width <= 720px) {
  .pl svg.pl-d { display: none; }
  .pl svg.pl-m { display: block; }
  .pl ul.meter-key.pl-m { display: grid; }
  .pl .hero { padding-top: 4px; }
  .pl .hero-text { text-align: left; }
  .pl .hero h1 { font-size: 34px; line-height: 1.06; margin-bottom: 12px; }
  .pl .dek { font-size: 18.5px; margin-bottom: 12px; }
  .pl .update { text-align: left; }
  .pl .diff { margin-left: 0; }
  .pl .meter { margin-top: 26px; }
  .pl .meter figcaption { text-align: left; }
  .pl .m-group { font-size: 13px; }
  .pl .m-big { font-size: 34px; }
  .pl .m-unit { font-size: 13px; }
  .pl .m-line { font-size: 12px; }
  .pl .m-ann-h { font-size: 14px; }
  .pl .m-ann { font-size: 14px; }
  .pl .band { margin-top: 28px; padding: 4px 12px 24px; }
  .pl .waffles { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .pl .wf-body { gap: 20px; }
  .pl .wf dd { font-size: 32px; }
  .pl .wf dt, .pl .wf dd { white-space: normal; }
  .pl svg.ways.pl-m { max-width: none; }
  .pl .wf h3 { font-size: 16px; margin-bottom: 10px; }
  .pl .grid2, .pl .grid2-b { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pl .mod { margin-top: 36px; }
  .pl .mod-head h2 { font-size: 19px; }
  
  .pl .parties, .pl .parties tbody { display: block; font-size: 14px; }
  .pl .parties thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  
  .pl .parties tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr); gap: 4px 10px; padding: 9px 0; border-bottom: 1px solid var(--rule); align-items: end; }
  
  .pl .parties tr:has(+ .p-note-row) { border-bottom: 0; padding-bottom: 4px; }
  .pl .parties tbody tr.p-note-row { display: block; padding: 0 0 9px; }
  .pl .parties .p-note-row td::before { content: none; }
  .pl .parties td.seat-total { padding-right: 0; }
  .pl .parties tbody th { grid-column: 1 / -1; padding: 0; border: 0; overflow-wrap: normal; }
  .pl .parties td { display: block; padding: 0; border: 0; text-align: left; }
  .pl .parties .num { padding-left: 0; text-align: left; white-space: normal; }
  .pl .parties .share { width: auto; }
  .pl .parties td::before { content: attr(data-label); display: block; font-size: 11.5px; font-weight: 500; color: var(--ink-3); line-height: 1.3; }
  .pl .barcell { display: block; }
  .pl .barcell .hbar { display: none; }
  .pl .seats { gap: 0 12px; }
  .pl .seat-link { padding-left: 8px; grid-template-columns: minmax(0, 1fr); }
  .pl .seat-c { grid-row: 3; grid-column: 1; font-size: 14px; }
  .pl .seat-why { grid-row: 4; }
  .pl .seat-n { font-size: 14px; }
}


.pl-intro { font-size: 20px; color: var(--ink-2); margin: -8px 0 8px; max-width: 46em; }

.pl-mod { margin-top: 40px; border-top: 1px solid var(--rule-strong); padding-top: 12px; }
.pl-head { margin-bottom: 14px; }
.pl-head h2 { font-family: var(--sans); font-weight: 800; font-size: 21px; line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 4px; }
.pl-head p { font-family: var(--sans); font-size: 14.5px; color: var(--ink-3); margin: 0; max-width: 46em; }


svg.dot-strip { display: block; width: 100%; height: auto; font-family: var(--sans); }
svg.dot-strip.ds-phone { display: none; }
.dot-strip .ds-grid { stroke: var(--rule); }
.dot-strip .ds-axis text { font-size: 12px; fill: var(--ink-3); }
.dot-strip .ds-threshold { stroke: var(--ink-3); stroke-dasharray: 3 3; }
.dot-strip .ds-rule { stroke: var(--rule); stroke-opacity: 0.5; }
.dot-strip .ds-label { font-size: 14px; font-weight: 700; fill: var(--pt); }
.dot-strip .ds-dot { fill: var(--pc); fill-opacity: 0.38; stroke: var(--pc); stroke-width: 1; }
.dot-strip .ds-tick { fill: var(--ink); }
.dot-strip .ds-value { font-size: 13px; font-weight: 800; fill: var(--ink); paint-order: stroke; stroke: var(--page); stroke-width: 3px; stroke-linejoin: round; }
.dot-strip .ds-note { font-family: var(--serif); font-style: italic; font-size: 13px; fill: var(--ink-2); }
.dot-strip .ds-lead { stroke: var(--ink); fill: none; }


@media (width <= 1023px) {
  svg.dot-strip.ds-desktop { display: none; }
  svg.dot-strip.ds-phone { display: block; max-width: 30rem; }
}
@media (width <= 720px) {
  .pl-intro { font-size: 18px; }
  .pl-head h2 { font-size: 19px; }
}


.polls-filter { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin: 0 0 14px; font-family: var(--sans); font-size: 14px; }
.polls-filter[hidden] { display: none; }
.polls-filter label { font-weight: 700; }
.polls-filter select { font: inherit; color: var(--ink); background: var(--page); border: 1px solid var(--rule); border-radius: 3px; padding: 3px 6px; max-width: 100%; }
.polls-count { margin: 0; color: var(--ink-3); }


.polls-table { display: block; width: 100%; font-family: var(--sans); font-size: 14px; font-variant-numeric: tabular-nums; border-collapse: collapse; }
.polls-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.polls-table tbody { display: block; }
.polls-table tr.pl-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 10px; padding: 12px; margin: 0 0 10px; border: 1px solid var(--rule); }
.polls-table tr.pl-row[hidden] { display: none; }
.polls-table tr.pl-counted { background: var(--panel); }
.polls-table tbody th, .polls-table td { display: block; padding: 0; border-bottom: 0; text-align: left; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.polls-table .pl-who { grid-column: 1 / -1; }
.polls-table .pl-when, .polls-table .pl-n, .polls-table .pl-avg, .polls-table .pl-src { grid-column: span 2; color: var(--ink-2); font-size: 13px; }
.polls-table .pl-avg { grid-column: span 3; }
.polls-table .pl-src { grid-column: span 1; }

.polls-table .pl-n::before { content: attr(data-label) " "; content: attr(data-label) " " / ""; color: var(--ink-3); }
.polls-table .pl-src { text-align: right; }
.polls-table .pl-share { display: flex; justify-content: space-between; gap: 4px; border-left: 3px solid var(--pc); padding-left: 6px; font-weight: 600; }
.polls-table .pl-share::before { content: attr(data-label); content: attr(data-label) / ""; font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.pl-pollster { display: block; font-weight: 700; }
.pl-commissioner { display: block; font-size: 12.5px; color: var(--ink-3); }
.pl-status { display: block; }
.pl-note { display: block; font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.pl-bar { display: block; width: 100%; height: 10px; margin-top: 8px; }
.pl-short { display: none; }


@media (width >= 960px) {
  .polls-table { display: table; table-layout: fixed; }
  .polls-table thead { position: static; width: auto; height: auto; overflow: visible; clip: auto; clip-path: none; white-space: normal; display: table-header-group; }
  .polls-table tbody { display: table-row-group; }
  .polls-table tr.pl-row { display: table-row; padding: 0; margin: 0; border: 0; }
  .polls-table tr.pl-row[hidden] { display: none; }
  .polls-table thead th, .polls-table tbody th, .polls-table td { display: table-cell; padding: 9px 5px; vertical-align: top; border-bottom: 1px solid var(--rule); color: var(--ink); font-size: 14px; }
  
  
  .polls-table thead th { font-size: 12.5px; font-weight: 700; vertical-align: bottom; padding-bottom: 8px; border-bottom: 2px solid var(--rule-strong); hyphens: manual; overflow-wrap: normal; }
  .polls-table thead th.pl-party .pl-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .polls-table thead th.pl-party .pl-short { display: inline; }
  .polls-table tbody tr:last-child th { border-bottom: 0; }
  .polls-table thead th.pl-party { border-bottom: 4px solid var(--pc); }
  .polls-table .pl-who { width: 17%; padding-left: 8px; }
  .polls-table .pl-when { width: 9%; }
  .polls-table .pl-n { width: 6.5%; text-align: right; }
  .polls-table .pl-avg { width: 15%; }
  .polls-table .pl-src { width: 6.5%; text-align: left; }
  .polls-table .pl-n::before, .polls-table .pl-share::before { content: none; }
  .polls-table .pl-share { display: table-cell; text-align: right; border-left: 0; padding-left: 5px; font-weight: 500; }
  .polls-table thead th.pl-party { text-align: right; }
  .polls-table tbody tr.pl-counted th, .polls-table tbody tr.pl-counted td { background: var(--panel); }
  .polls-table tbody tr:not(.pl-counted) td, .polls-table tbody tr:not(.pl-counted) th { color: var(--ink-2); }
}


.pm-years { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0 0 10px; padding: 0; font-family: var(--sans); font-size: 14px; color: var(--ink-2); }
.pm-years li { display: inline-flex; align-items: center; gap: 6px; }
.pm-key { width: 12px; height: 12px; }
svg.poll-misses { display: block; width: 100%; height: auto; font-family: var(--sans); }
svg.poll-misses.pm-phone { display: none; }
.poll-misses .pm-grid { stroke: var(--rule); }
.poll-misses .pm-zero { stroke: var(--ink); stroke-width: 1.5; }
.poll-misses .pm-axis text { font-size: 12px; fill: var(--ink-3); }
.poll-misses .pm-head { font-size: 13.5px; font-weight: 700; fill: var(--ink); }
.poll-misses .pm-note { font-family: var(--serif); font-style: italic; font-size: 14px; fill: var(--ink-2); }
.poll-misses .pm-label { font-size: 15px; font-weight: 700; fill: var(--pt); }
.poll-misses .pm-today { font-size: 12px; font-weight: 600; fill: var(--ink-3); }
.poll-misses .pm-span { fill: var(--pc); fill-opacity: 0.22; }
.poll-misses .pm-year { font-size: 11.5px; font-weight: 700; fill: var(--ink-3); }

.poll-misses .pm-range { font-size: 13.5px; fill: var(--ink-3); font-weight: 500; }
.poll-misses .pm-range-head { font-size: 13px; fill: var(--ink-3); font-weight: 600; }
.pm-dot { stroke: var(--page); stroke-width: 1.5; }
.pm-dot.pm-y0 { fill: var(--ink); }
.pm-dot.pm-y1 { fill: var(--ink-3); }
.pm-dot.pm-y2 { fill: var(--page); stroke: var(--ink-3); stroke-width: 2; }

@media (width <= 1023px) {
  svg.poll-misses.pm-desktop { display: none; }
  svg.poll-misses.pm-phone { display: block; max-width: 30rem; }
}
.pm-phone .pm-range { font-size: 12.5px; }



.history-chart .end-label { color: var(--ink); font-weight: 600; }
.history-chart .chart-note { color: var(--ink); }
.history-chart .ref-line-heavy { color: var(--ink); }


.history-section .history-chart-title {
  font-family: var(--sans); font-weight: 800; font-size: 21px; line-height: 1.25; letter-spacing: -0.01em; color: var(--ink);
  margin: 0 0 6px; padding-top: 12px; border-top: 1px solid var(--rule-strong);
}
.history-section .history-chart { margin-top: 40px; }
.history-section .pollster-leans { margin-top: 40px; }
.history-section .history-band-note,
.history-section .history-moves-note,
.history-section .history-chances-scope { font-family: var(--sans); font-size: 13px; line-height: 1.4; color: var(--ink-3); margin: 0 0 12px; max-width: 46em; }
.history-section .history-chart > .history-band-note,
.history-section .history-chart > .history-moves-note { margin: 6px 0 0; }
.history-section .history-table { margin: 0 0 1rem; }
.history-section .history-chart-legend { font-family: var(--sans); font-size: 13px; color: var(--ink-3); }

.history-chart-swatch-tick { width: 0; height: 0.7em; border-left: 1px solid var(--ink-2); background: none; }


.history-section .history-table-scroll table { width: 100%; table-layout: auto; border-collapse: collapse; font-family: var(--sans); font-variant-numeric: tabular-nums; }
.history-section .history-table-scroll th,
.history-section .history-table-scroll td { padding: 0.3rem 0.35rem 0.3rem 0; font-size: 12.5px; white-space: normal; overflow-wrap: normal; hyphens: manual; }
.history-section .history-table-scroll td { white-space: nowrap; }
.history-section .history-table-scroll thead th { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.history-section .history-table-scroll thead th:not(:first-child) { text-align: right; }
.history-section .history-table-scroll .th-range { display: inline-block; font-weight: 600; color: var(--ink-3); }

.history-section .history-table-scroll .group-start { padding-left: 0.6rem; }
.history-section .history-table-scroll tbody th[scope="row"] { white-space: nowrap; }
.history-section .history-table-scroll .th-range { font-size: 11.5px; line-height: 1.25; }

.history-section .pollster-leans .history-table-scroll { max-height: none; overflow: visible; }

.history-section .history-table .history-table-scroll {
  background:
    linear-gradient(transparent, var(--page) 70%) 0 100% / 100% 40px no-repeat local,
    linear-gradient(to top, color-mix(in srgb, var(--ink) 16%, transparent), transparent) 0 100% / 100% 16px no-repeat scroll;
}
@media (width <= 1023px) {
  .history-section .history-table .history-table-scroll thead { position: absolute; max-width: 1px; max-height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .history-section .history-table .history-table-scroll :is(table, tbody, tr, th, td) { display: block; width: auto; }
  .history-section .history-table .history-table-scroll tr { padding: 0.4rem 0; border-bottom: 1px solid var(--rule-soft); }
  .history-section .history-table .history-table-scroll th[scope="row"] { font-weight: 700; padding: 0 0 0.2rem; border-bottom: 0; }
  .history-section .history-table .history-table-scroll td { display: flex; justify-content: space-between; gap: 1rem; padding: 0.1rem 0; text-align: right; border-bottom: 0; }
  .history-section .history-table .history-table-scroll td::before { content: attr(data-label); color: var(--ink-2); text-align: left; white-space: normal; }
}
@media (width <= 720px) {
  .history-section .history-chart-title { font-size: 19px; }
  .history-section .pollster-leans .history-table-scroll thead { position: absolute; max-width: 1px; max-height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .history-section .pollster-leans .history-table-scroll :is(table, tbody, tr, th, td) { display: block; width: auto; }
  .history-section .pollster-leans .history-table-scroll tr { padding: 0.4rem 0; border-bottom: 1px solid var(--rule-soft); }
  .history-section .pollster-leans .history-table-scroll th[scope="row"] { font-weight: 700; padding: 0 0 0.2rem; border-bottom: 0; }
  .history-section .pollster-leans .history-table-scroll td { display: flex; justify-content: space-between; gap: 1rem; padding: 0.1rem 0; text-align: right; border-bottom: 0; }
  .history-section .pollster-leans .history-table-scroll td::before { content: attr(data-label); color: var(--ink-2); text-align: left; white-space: normal; }
}


:root[data-theme="dark"] .history-chart path.band { mix-blend-mode: screen; }



.seat-head { text-align: center; margin: 4px auto 28px; }
.seat-crumb { margin: 0 0 6px; max-width: none; font-family: var(--sans); font-size: 13px; color: var(--ink-3); }
.seat-crumb a { color: var(--ink); font-weight: 600; }
.seat-title { font-family: var(--serif); font-weight: 600; font-size: 64px; line-height: 1.02; letter-spacing: -0.025em; margin: 0; font-variation-settings: "opsz" 72; text-wrap: balance; overflow-wrap: break-word; }
.seat-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 352px); gap: 56px; align-items: start; }

.seat-grid.seat-grid-single { grid-template-columns: minmax(0, 1fr); }
.seat-grid-single .seat-main { width: 100%; max-width: 760px; margin: 0 auto; }
.seat-main, .seat-side { min-width: 0; }
.seat-flag { background: var(--flag-bg); color: var(--flag-ink); border-left: 4px solid var(--flag-edge); padding: 14px 18px; margin: 0 0 20px; font-family: var(--sans); font-size: 14.5px; line-height: 1.5; }
.seat-flag p { margin: 0; }
.seat-flag p + p { margin-top: 6px; }
.seat-flag-title { font-weight: 700; }
.seat-line { font-family: var(--sans); font-size: 14.5px; color: var(--ink-2); margin: 0 0 14px; overflow-wrap: break-word; }

.seat-facts { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); column-gap: 28px; margin: 0; padding: 0; border-top: 1px solid var(--rule); font-family: var(--sans); }
.seat-fact { min-width: 0; }
.seat-facts .seat-fact { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: baseline; row-gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.seat-fact dt { font-size: 13px; color: var(--ink-3); line-height: 1.35; margin-bottom: 4px; hyphens: manual; overflow-wrap: break-word; }
.seat-fact dd { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.3; overflow-wrap: break-word; }
.seat-facts dt { margin: 0; font-size: 14px; }
.seat-facts dd { min-width: 0; }
.seat-fact-note { display: block; margin-top: 2px; font-size: 14px; font-weight: 400; line-height: 1.4; color: var(--ink-2); }
.seat-status { display: block; font-size: 13px; font-weight: 400; color: var(--ink-3); margin-top: 2px; }
.seat-status-warning { color: var(--flag-ink); font-weight: 600; }
.seat-runs-caveat, .seat-what-if-caveat, .close-seats-caveat, .seat-record-note { font-family: var(--sans); font-size: 13px; color: var(--ink-3); margin: 8px 0 0; }
.seat-mod { margin-top: 40px; padding-top: 14px; border-top: 1px solid var(--rule-strong); }
.seat-mod h2 { font-family: var(--sans); font-size: 21px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 4px; }
.seat-unavailable { font-family: var(--sans); font-size: 14.5px; color: var(--ink-2); margin: 8px 0 0; }
.seat-majority-chart { display: block; width: 100%; height: auto; font-family: var(--sans); overflow: visible; }
.seat-majority-chart .chart-base { stroke: var(--ink); stroke-width: 1; }
.seat-majority-chart .bar-value { fill: var(--ink); font-weight: 700; }
.seat-majority-chart .bar-axis { fill: var(--ink-3); }
.seat-majority-chart .bracket-label { font-weight: 700; }
.seat-chart-narrow { display: none; }
.seat-table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 14.5px; margin-top: 8px; }
.seat-table th, .seat-table td { text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--rule); vertical-align: top; overflow-wrap: break-word; }
.seat-table th:last-child, .seat-table td:last-child { padding-right: 0; }
.seat-table thead th { font-size: 13px; font-weight: 600; color: var(--ink-3); border-bottom-color: var(--rule-strong); white-space: nowrap; }

.seat-table abbr[title] { text-decoration: none; }

.seat-history-rows :is(th, td):nth-child(3) { text-align: right; font-variant-numeric: tabular-nums; }
.seat-history-rows :is(th, td):nth-child(4) { padding-left: 16px; }

.seat-nobreak { white-space: nowrap; }
.seat-table tbody th { font-weight: 700; }
.seat-table tbody tr:last-child > * { border-bottom: 1px solid var(--rule); }

.dossier-cell-note { display: block; margin-top: 2px; font-weight: 400; font-size: 0.92em; line-height: 1.35; color: var(--text-muted); overflow-wrap: break-word; }
.seat-side .seat-mod { margin-top: 0; }
.seat-record-facts { margin: 8px 0 0; font-family: var(--sans); }
.seat-record-facts .seat-fact { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.seat-record-facts dd { font-size: 16px; }
.seat-history-table { margin-top: 16px; font-family: var(--sans); font-size: 14.5px; }
.seat-history-table summary { cursor: pointer; font-weight: 600; }

.seat-what-if-gap { font-family: var(--sans); font-size: 14.5px; color: var(--ink-2); margin: 0 0 8px; }
.seat-what-if-table .num-col { text-align: right; font-variant-numeric: tabular-nums; }
.seat-what-if-table td[data-majority="true"] { font-weight: 700; color: var(--ink); }
.seat-what-if-table .seat-what-if-line th, .seat-what-if-table .seat-what-if-line td { color: var(--ink-3); font-weight: 400; }


.map-section .map-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--rule); padding-bottom: 10px; }
.map-section .map-header .page-title { margin: 0; }
.map-controls { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.layer-toggles, .inspector-filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.map-layer-btn, .table-filter-btn {
  appearance: none; border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--paper-well); color: var(--text-secondary);
  padding: 0.35rem 0.65rem; font: inherit; font-family: var(--sans); font-size: var(--size-1); font-weight: 500; cursor: pointer;
}
.map-layer-btn:hover, .table-filter-btn:hover { border-color: var(--ink); color: var(--text-primary); }
.map-layer-btn.active, .table-filter-btn.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.electorates-summary-bar { display: flex; align-items: center; gap: 0.75rem 1.25rem; padding: 0.6rem 0; border-bottom: 1px solid var(--rule-soft); margin-bottom: 1.5rem; flex-wrap: wrap; font-family: var(--sans); }
.summary-chips-container { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.electorate-summary-chip { display: inline-flex; align-items: center; gap: 0.4rem; font-size: var(--size-2); color: var(--text-primary); }
.summary-count { font-weight: 600; }
.assumptions-basis { flex-basis: 100%; margin: 0; font-size: var(--size-2); color: var(--text-secondary); }
.map-section .legend-dot { display: inline-block; width: 10px; height: 10px; }
.legend-stripes { flex: none; }
.legend-stripes-base { fill: var(--ink-3); }
.uncertain-key { color: var(--ink); }

.view-count { font-weight: 600; }


.map-workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; align-items: start; }
.map-sidebar { min-width: 0; }
.map-canvas-card { display: flex; flex-direction: column; }

.map-plate { display: grid; grid-template-columns: repeat(40, 1fr); grid-template-rows: repeat(64, 1fr); aspect-ratio: 5 / 8; width: 100%; }
.map-plate > .svg-map-wrapper { grid-area: 1 / 1 / -1 / -1; display: block; width: 100%; }
.nz-geo-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.inset-figure { grid-area: var(--panel-area); margin: 0; min-width: 0; min-height: 0; }
.inset-figure[hidden] { display: none; }
.inset-map { width: 100%; height: 100%; display: block; border: 1px solid var(--rule); background: var(--page); }
.map-sea, .inset-sea { fill: var(--paper); }
.chathams-inset-frame { fill: var(--paper); stroke: var(--rule); stroke-width: 1; vector-effect: non-scaling-stroke; }
.inset-caption { font-family: var(--sans); font-weight: 600; fill: var(--ink); paint-order: stroke; stroke: var(--page); stroke-width: 0.32em; stroke-linejoin: round; pointer-events: none; }
.inset-locator { fill: none; stroke: var(--ink); stroke-width: 1; stroke-opacity: 0.55; vector-effect: non-scaling-stroke; pointer-events: none; }
.coastline { fill: none; stroke: var(--ink); stroke-width: 1.2; stroke-opacity: 0.6; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; }

.electorate-feature { fill: var(--electorate-fill); cursor: pointer; outline: none; }
.electorate-feature[hidden], .electorates-layer[hidden] { display: none; }
.electorate-boundary-shape { fill: inherit; stroke: var(--paper); stroke-width: 0.8; vector-effect: non-scaling-stroke; }
:root[data-theme="dark"] .electorate-boundary-shape { stroke: var(--rule); }
.electorate-feature:hover .electorate-boundary-shape,
.electorate-feature:focus .electorate-boundary-shape { stroke: var(--ink); stroke-width: 2; }
.electorate-feature:focus-visible .electorate-boundary-shape { stroke: var(--focus); stroke-width: 3; }

.focus-ring { pointer-events: none; }
.focus-ring use { fill: none; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.focus-ring use:not([href]) { display: none; }
.focus-ring-under { stroke: var(--paper); stroke-width: 6px; }
.focus-ring-over { stroke: var(--ink); stroke-width: 2.5px; }

.stripe { fill: var(--page); fill-opacity: 0.6; }
.seat-stripes { pointer-events: none; }
.seat-stripes use { stroke: none; }

.map-labels { pointer-events: none; }
.map-labels .electorate-label { font-family: var(--sans); font-weight: 600; fill: var(--ink); stroke: var(--page); stroke-opacity: 0.85; stroke-width: 0.3em; paint-order: stroke; stroke-linejoin: round; }
.main-label { letter-spacing: 0.01em; }
.map-section:not([data-layer="maori"]) #nz-electorates-svg .map-labels .maori-label { display: none; }
.map-section[data-layer="maori"] #nz-electorates-svg .map-labels .electorate-label:not(.maori-label),
.map-section[data-layer="maori"] .inset-map .map-labels { display: none; }

.map-section[data-layer="maori"] :is(.inset-wellington, .inset-christchurch, .inset-hamilton),
.map-section[data-layer="maori"] .inset-locator:is([data-for="wellington"], [data-for="christchurch"], [data-for="hamilton"]) { display: none; }

@media (width <= 640px) {
  
  .map-plate { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; gap: 0.75rem; aspect-ratio: auto; }
  .map-plate > .svg-map-wrapper { grid-area: auto; grid-column: 1 / -1; }
  .nz-geo-svg { height: auto; }
  .inset-figure { grid-area: auto; width: 100%; justify-self: center; }
  .inset-maori { width: calc(275 / 375 * 100%); }
  .inset-hamilton { width: calc(200 / 375 * 100%); }
  .inset-map { height: auto; }
}


.close-seats { border-top: 2px solid var(--rule-strong); padding-top: 12px; }
.close-seats h2 { font-family: var(--sans); font-size: 21px; font-weight: 700; margin: 0 0 12px; }
.close-seats-chart { display: block; width: 100%; height: auto; font-family: var(--sans); }
.close-chart-wide { max-width: 760px; }
.close-chart-narrow { display: none; }
.close-name { font-size: 13px; font-weight: 700; fill: var(--ink); }
.close-seats-chart a .close-name { text-decoration: underline; }
.close-sub, .close-flip, .close-axis { font-size: 11px; fill: var(--ink-3); }
.close-flip { fill: var(--ink-2); }

.close-sub, .close-flip { paint-order: stroke; stroke: var(--page); stroke-width: 4px; stroke-linejoin: round; }
.close-label { font-size: 13px; font-weight: 700; paint-order: stroke; stroke: var(--page); stroke-width: 4px; stroke-linejoin: round; }
.close-grid { stroke: var(--rule); stroke-width: 1; }
.close-axis-line { stroke: var(--ink); stroke-width: 1; }
.close-stem { stroke-width: 1.5; stroke-opacity: 0.5; }

@media (width >= 960px) {
  .map-section .map-workspace { grid-template-columns: minmax(0, 720px) minmax(0, 1fr); gap: 40px; }
  
  .map-section .map-canvas-card { position: sticky; top: min(8.5rem, calc(100vh - 78rem)); }
  .close-chart-wide { display: none; }
  .close-chart-narrow { display: block; }
}


.tables-note { font-family: var(--sans); font-size: 13.5px; color: var(--ink-3); margin: 32px 0 12px; max-width: 72ch; }
.inspector-toolbar-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem; padding: 0 0 0.75rem; }
.inspector-search-input {
  background: var(--paper-well); border: 1px solid var(--rule); color: var(--text-primary);
  font: inherit; font-family: var(--sans); font-size: var(--size-2); padding: 0.35rem 0.6rem; border-radius: var(--radius); min-width: min(100%, 30ch); max-width: 100%;
}
.inspector-search-input:focus { border-color: var(--ink); outline: none; }
.inspector-toolbar-header .inspector-filter-group { flex: 1 1 auto; }
.inspector-table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 14px; }
.inspector-table caption { caption-side: top; text-align: left; padding: 0 0 10px; }
.inspector-table .table-title { display: block; font-size: 21px; font-weight: 700; color: var(--ink); }
.inspector-table .table-note { display: block; font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.inspector-table th, .inspector-table td { text-align: left; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--rule); vertical-align: top; overflow-wrap: break-word; }
.inspector-table th:last-child, .inspector-table td:last-child { padding-right: 0; }

.inspector-table .num-col + :is(th, td) { padding-left: 16px; }

.inspector-table col.col-name { width: 20%; }
.inspector-table col.col-result { width: 17%; }
.inspector-table col.col-margin { width: 10%; }
.inspector-table col.col-status { width: 18%; }
.inspector-table col.col-assumed { width: 23%; }
.inspector-table col.col-runs { width: 12%; }
.inspector-table thead th { font-size: 13px; font-weight: 600; color: var(--ink-3); border-bottom-color: var(--rule-strong); }
.inspector-table tbody th { font-weight: 400; }
.inspector-table .num-col { text-align: right; }
.inspector-table .badge { white-space: normal; display: inline-block; }
.inspector-table .mini-party-chip { padding: 0 0 0 6px; }
.electorate-row-link { font-weight: 700; color: var(--ink); }
.elec-name-wrap, .two-party-winner { display: flex; flex-direction: column; gap: 0.1rem; }
.elec-region-tag, .runner-up-label, .margin-votes { font-size: var(--size-1); color: var(--text-muted); }
.result-basis-tag { font-style: italic; }
.margin-val { font-weight: 600; color: var(--text-primary); }
.assumed-winner-cell { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.assumed-name { font-size: var(--size-2); font-weight: 500; color: var(--text-primary); }
.uncertain-row .assumed-name { font-style: italic; }

.inspector-table tbody th, .inspector-table thead th:first-child { padding-left: 0.5rem; }
.uncertain-row > th { box-shadow: inset 0.2rem 0 0 var(--caution); }
.seat-uncertain-badge { margin-left: 0.4rem; white-space: normal; }
.party-swatch { display: inline-block; width: 10px; height: 10px; flex: none; }
.maori-table-container { margin-top: 32px; }


@media (width <= 1023px) {
  .seat-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .seat-side .seat-mod { margin-top: 0; }
}

@media (width <= 720px) {
  .seat-head { margin-bottom: 20px; }
  .seat-title { font-size: 40px; }
  .seat-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  
  .seat-facts { grid-template-columns: minmax(0, 1fr); }
  .seat-facts .seat-fact { padding: 10px 0; }
  
  #nz-electorates-svg .map-labels { display: none; }
  .seat-chart-wide, .close-chart-wide { display: none; }
  .seat-chart-narrow, .close-chart-narrow { display: block; }
  
  .inspector-table thead, .seat-what-if-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .inspector-table, .inspector-table caption, .inspector-table tbody, .inspector-table tr, .inspector-table td,
  .seat-what-if-table, .seat-what-if-table tbody, .seat-what-if-table tr { display: block; width: 100%; }
  .inspector-table colgroup { display: none; }
  
  .inspector-table tr { padding: 10px 0 10px 0.6rem; border-bottom: 1px solid var(--rule); }
  .inspector-table tbody th { display: block; border: 0; padding: 2px 0; }
  .inspector-table tr.uncertain-row { box-shadow: inset 0.2rem 0 0 var(--caution); }
  .inspector-table .uncertain-row > th { box-shadow: none; }
  .inspector-table td > .badge { justify-self: start; }
  .inspector-table .num-col + :is(th, td) { padding-left: 0; }
  .inspector-table td { border: 0; padding: 2px 0; text-align: left; display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 0 8px; }
  .inspector-table td > * { grid-column: 2; }
  .inspector-table td[data-label]::before, .seat-what-if-table td[data-label]::before { content: attr(data-label); color: var(--ink-3); font-size: 13px; font-weight: 400; }
  .inspector-table .num-col { text-align: left; }
  .inspector-table td.status-col:empty { display: none; }
  .seat-what-if-table tr { padding: 8px 0; border-bottom: 1px solid var(--rule); }
  
  .seat-table:not(.seat-what-if-table) :is(th, td):not(:last-child) { padding-right: 8px; }
  .seat-history-rows :is(th, td):nth-child(4) { padding-left: 8px; }
  .seat-what-if-table th, .seat-what-if-table td { border: 0; padding: 2px 0; text-align: left; }
  .seat-table.seat-what-if-table tbody tr > * { border: 0; }
  .seat-what-if-table th { display: block; }
  .seat-what-if-table td { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .seat-what-if-table .num-col { text-align: left; }
}


.assumption-grid { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }
.assumption-chip { display: inline-flex; align-items: center; gap: 0.4rem; border: 1px solid var(--rule-soft); padding: 0.2rem 0.55rem; border-radius: var(--radius); font-size: var(--size-2); color: var(--text-secondary); }


.hsw .page-title { text-align: center; font-size: 48px; margin: 16px auto 18px; max-width: 820px; }
.vts-dek { font-family: var(--serif); font-size: 22px; line-height: 1.45; color: var(--ink-2); margin: 0 auto 16px; max-width: 700px; text-align: center; text-wrap: pretty; }
.vts-unavailable { font-family: var(--sans); font-size: 15px; color: var(--ink-2); }

.vts { position: relative; border-top: 1px solid var(--rule-strong); padding-top: 14px; margin-top: 48px; }
.vts-head h2 { font-family: var(--sans); font-weight: 800; font-size: 21px; letter-spacing: -0.01em; line-height: 1.2; margin: 0 0 6px; }
.vts-head p { font-family: var(--sans); font-size: 14.5px; line-height: 1.45; color: var(--ink-3); margin: 0 0 18px; max-width: 62ch; text-wrap: pretty; }

.vts-chart { width: 100%; height: auto; display: block; overflow: visible; }
.vts-phone { display: none; }
.vts-h { font-family: var(--sans); font-size: 14px; font-weight: 700; fill: var(--ink); }
.vts-s { font-family: var(--sans); font-size: 12.5px; fill: var(--ink-3); }
.vts-name { font-family: var(--sans); font-weight: 700; font-size: 14px; }
.vts-vote { font-family: var(--sans); font-size: 13px; font-weight: 700; fill: var(--ink); font-variant-numeric: tabular-nums; }
.vts-gate { font-family: var(--sans); font-size: 13.5px; font-weight: 600; fill: var(--ink-2); }
.vts-out { fill: var(--ink-3); font-weight: 500; font-style: italic; }
.vts-count { font-family: var(--sans); font-weight: 800; font-size: 13px; fill: var(--ink); }
.vts-note { font-family: var(--serif); font-style: italic; font-size: 15px; fill: var(--ink-2); }
.vts-kept { font-family: var(--sans); font-weight: 700; font-size: 13px; fill: var(--ink); }
.vts-count, .vts-note, .vts-kept { paint-order: stroke; stroke: var(--page); stroke-width: 4px; stroke-linejoin: round; }
.vts-chart .seat-vote { fill-opacity: 0.28; stroke-width: 1.5; }
.vts-chart .share-tick { stroke: var(--ink); stroke-width: 2; }

.vts-chart .share-gap { stroke: var(--page); stroke-width: 5; }
.vts-chart .kept-bracket { fill: none; stroke: var(--ink); }
.vts-rule-strong { stroke: var(--rule-strong); }
.vts-rule { stroke: var(--rule); }


.vts-table { position: absolute; left: 0; top: 0; width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 1px; line-height: 1; overflow-wrap: anywhere; clip-path: inset(50%); pointer-events: none; }

.vts-tally { display: flex; align-items: flex-start; gap: 20px; margin: 18px 0 0; padding: 18px 0; border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule); font-family: var(--sans); }
.vts-tally > div:not(.vts-op) { flex: 1; min-width: 0; }
.vts-n { display: block; font-size: 44px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.vts-l { display: block; font-size: 14px; color: var(--ink-2); margin-top: 6px; max-width: 26ch; }

.vts-op { display: flex; align-items: center; height: 44px; font-size: 36px; font-weight: 300; color: var(--ink-3); line-height: 1; }

.vts-key { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-family: var(--sans); font-size: 13.5px; color: var(--ink-2); }
.vts-k { display: inline-block; width: 13px; height: 13px; margin-right: 7px; vertical-align: -2px; }
.vts-k-electorate { background: var(--ink); }
.vts-k-vote { background: color-mix(in srgb, var(--ink) 28%, transparent); box-shadow: inset 0 0 0 1.5px var(--ink); }
.vts-k-share { width: 2px; height: 18px; background: var(--ink); vertical-align: -4px; }


@media (width <= 1023px) {
  .vts-wide { display: none; }
  .vts-phone { display: block; max-width: 440px; }
}

@media (width <= 720px) {
  .hsw .page-title { text-align: left; font-size: 34px; }
  .vts-dek { font-size: 18.5px; text-align: left; margin-bottom: 12px; }
  .vts-wide { display: none; }
  .vts-phone { display: block; }
  .vts-tally { gap: 8px; }
  .vts-op { font-size: 22px; height: 30px; }
  .vts-phone { max-width: none; }
  .vts-n { font-size: 30px; }
  .vts-l { font-size: 12.5px; }
  .vts-key { gap: 6px 14px; font-size: 12.5px; }
}


.vts-phone .vts-name { font-size: 16px; }
.vts-phone .vts-gate, .vts-phone .vts-vote, .vts-phone .vts-count, .vts-phone .vts-kept { font-size: 15px; }



.more-pages { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-strong); font-family: var(--sans); }
.more-pages li { padding: 14px 0 16px; border-bottom: 1px solid var(--rule); }
.more-pages a { font-weight: 700; font-size: 19px; line-height: 1.25; letter-spacing: -0.01em; text-decoration: none; color: var(--ink); }
.more-pages a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.more-pages p { margin: 4px 0 0; font-size: 14.5px; line-height: 1.45; color: var(--ink-3); }

.more-sources { margin-top: 48px; padding-top: 14px; border-top: 1px solid var(--rule-strong); font-family: var(--sans); font-size: 13.5px; line-height: 1.6; color: var(--ink-3); }
.more-sources h2 { font-family: var(--sans); font-weight: 800; font-size: 21px; letter-spacing: -0.01em; line-height: 1.2; margin: 0 0 10px; color: var(--ink); }
.more-sources p { margin: 0 0 10px; max-width: 70ch; }
.more-sources a { text-underline-offset: 2px; }

@media (width <= 720px) {
  .more-pages a { font-size: 18px; }
  .more-sources { margin-top: 36px; }
  .more-sources h2 { font-size: 19px; }
}


.more-pages li:last-child { border-bottom: 0; }


.results-section .results-standfirst { font-family: var(--serif); font-size: 20px; line-height: 1.45; color: var(--ink-2); max-width: 62ch; margin: 0; text-wrap: pretty; }
@media (width <= 720px) {
  .results-section .results-standfirst { font-size: 18px; }
}
