/* NZ Election: multi-page site after the vote.
 * Builds on styles.css tokens (--paper, --panel, --ink, --accent, .p → --pc). */

/* ── Header: path navigation (desktop) and hamburger (phones) ── */
.pg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.site-nav { display: none; align-items: center; gap: 0.25rem 1.6rem; flex-wrap: wrap; }
.sn-home { font-weight: 700; font-size: 0.9375rem; color: var(--ink); text-decoration: none; padding: 0.35rem 0.1rem; }
.sn-path { display: grid; gap: 0.1rem; }
.sn-label { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); text-decoration: none; }
.sn-label b, .sm-label b, .pg-path b, .pg-steps b, .pc-n { display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--accent); color: var(--paper); font-size: 0.6875rem; letter-spacing: 0; }
.sn-links { display: flex; gap: 0.15rem; }
.sn-links a { font-size: 0.9375rem; font-weight: 650; color: var(--ink); text-decoration: none; padding: 0.25rem 0.55rem; border-radius: 8px; white-space: nowrap; }
.sn-links a:hover, .sn-home:hover { background: var(--panel-2); }
.site-nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.sn-path:has(a[aria-current="page"]) .sn-label { color: var(--accent); }

.menu-btn { margin-left: auto; display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel); color: var(--ink); cursor: pointer; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 1.15rem; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.2s ease, opacity 0.2s ease; }
.menu-btn span { position: relative; }
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; }
.menu-btn span::before { top: -6px; } .menu-btn span::after { top: 6px; }
.menu-btn[aria-expanded="true"] span { background: transparent; }
.menu-btn[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

.site-menu { display: none; }
.site-menu.open { display: block; position: absolute; left: 0; right: 0; top: 100%; z-index: 60; max-height: calc(100dvh - 4rem); overflow-y: auto; overscroll-behavior: contain;
  background: var(--paper); border-bottom: 1px solid var(--line-2); box-shadow: 0 24px 40px -24px rgb(0 0 0 / 0.45); }
html.menu-open { overflow: hidden; }
.sm-in { display: grid; gap: 1.1rem; padding-block: 1rem 1.5rem; }
.sm-home { display: grid; font-size: 1.25rem; font-weight: 800; color: var(--ink); text-decoration: none; padding-bottom: 0.9rem; border-bottom: 1px solid var(--line-2); }
.sm-home small { font-size: 0.8125rem; font-weight: 500; color: var(--ink-2); }
.sm-label { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); text-decoration: none; }
.sm-path ul { list-style: none; margin: 0.5rem 0 0; padding: 0; display: grid; gap: 0.15rem; }
.sm-path li a { display: grid; padding: 0.6rem 0.75rem; border-radius: 12px; font-size: 1.1rem; font-weight: 750; color: var(--ink); text-decoration: none; }
.sm-path li a:hover, .sm-path li a[aria-current="page"] { background: var(--panel); }
.sm-path li a small { font-size: 0.8125rem; font-weight: 500; color: var(--ink-2); }
.sm-more { display: flex; flex-wrap: wrap; gap: 0.5rem; padding-top: 0.9rem; border-top: 1px solid var(--line-2); }
.sm-more a { padding: 0.45rem 0.8rem; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink); text-decoration: none; font-weight: 650; font-size: 0.9375rem; }

@media (min-width: 64rem) {
  .site-nav { display: flex; }
  .menu-btn { display: none; }
  .site-menu.open { display: none; }
  html.menu-open { overflow: auto; }
}

/* Subpage header */
.pg-mast { position: sticky; top: 0; z-index: 50; }
.pg-mast .mast-row { gap: 1.25rem; }
.pg-mast .sponsor { order: 9; }
@media (min-width: 64rem) { .pg-mast .sponsor { margin-left: auto; } }

/* ── Page hero, path label and step flow ─────────────────── */
.pg { display: block; }
.pg-hero { position: relative; padding-block: 2rem 1.5rem; border-bottom: 1px solid var(--line-2);
  background: radial-gradient(90% 140% at 100% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%); }
.pg-hero.path-2 { background: radial-gradient(90% 140% at 100% 0%, color-mix(in srgb, var(--accent-2, #22A3B8) 14%, transparent), transparent 60%); }
.pg-hero .wrap { display: grid; gap: 0.55rem; }
.pg-crumb { margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; font-size: 0.8125rem; color: var(--ink-2); }
.pg-crumb a { color: var(--ink-2); }
.pg-path { margin: 0.4rem 0 0; display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.pg-hero h1 { margin: 0; font-size: clamp(2rem, 1.3rem + 3.2vw, 3.6rem); line-height: 1.02; letter-spacing: -0.02em; font-weight: 850; max-width: 22ch; }
.pg-lede { margin: 0.2rem 0 0; max-width: 44rem; font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.3rem); line-height: 1.5; color: var(--ink-2); }
.pg-steps { list-style: none; margin: 0.9rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; counter-reset: s; }
.pg-steps a { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.8rem 0.4rem 0.45rem; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); text-decoration: none; font-weight: 650; font-size: 0.9375rem; }
.pg-steps b { background: var(--line-2); color: var(--ink); }
.pg-steps li[aria-current="step"] a { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pg-steps li[aria-current="step"] b { background: var(--accent); color: var(--paper); }
.pg-steps li + li { position: relative; }

.pg-body { display: grid; gap: 2rem; padding-block: 2rem 1rem; }
.pg-sec { display: grid; gap: 0.75rem; }
.pg-sec h2, .el-group h2 { margin: 0; font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); letter-spacing: -0.01em; }
.pg-sub { margin: -0.3rem 0 0; color: var(--ink-2); font-size: 0.9375rem; max-width: 46rem; }
.pg-src { margin: 0; font-size: 0.8125rem; color: var(--ink-2); }
.pg-kick { margin: 0; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.pg-wait { margin: 0; padding: 1rem; border-radius: 12px; background: var(--panel); color: var(--ink-2); }

/* Prev / next along the path */
.pg-next { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; padding-block: 1.5rem 3rem; }
.pg-next a { display: grid; gap: 0.15rem; padding: 1rem 1.15rem; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); text-decoration: none; font-size: 1.15rem; font-weight: 800; }
.pg-next a small { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.pg-next .pn-next { text-align: right; border-color: color-mix(in srgb, var(--accent) 45%, var(--line-2)); }
.pg-next .pn-switch { background: color-mix(in srgb, var(--accent) 12%, var(--panel)); }
.pg-next a:hover { border-color: var(--accent); }

/* Landing cards */
.pg-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.85rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pg-cards a { height: 100%; box-sizing: border-box; display: grid; align-content: start; gap: 0.45rem; padding: 1.2rem 1.25rem; border-radius: 16px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); text-decoration: none; }
.pg-cards a:hover { border-color: var(--accent); transform: translateY(-2px); }
.pg-cards b { font-size: 1.35rem; font-weight: 850; }
.pg-cards span:not(.pc-n) { color: var(--ink-2); line-height: 1.5; }
.pg-cards em { font-style: normal; font-weight: 750; color: var(--accent); margin-top: 0.3rem; }
.pc-n { width: 1.8rem !important; height: 1.8rem !important; font-size: 0.875rem !important; }

/* Parliament chart and seat key */
.hemi { margin: 0; }
.hemi svg { display: block; width: 100%; max-width: 30rem; margin-inline: auto; overflow: visible; }
.hemi circle { fill: var(--pc); }
.hemi line { stroke: var(--ink-2); stroke-width: 0.008; stroke-dasharray: 0.03 0.025; }
.hemi figcaption { text-align: center; font-size: 0.875rem; color: var(--ink-2); margin-top: 0.35rem; }
.hemi figcaption b { color: var(--ink); }
.pg-seatkey { list-style: none; margin: 0.75rem 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35rem 0.9rem; font-size: 0.875rem; }
.pg-seatkey li { display: inline-flex; align-items: center; gap: 0.35rem; }
.pg-seatkey i, .el-tally i, .co-chips i, .co-build i, .el-list i, .ed-near i, .mp-group h3 i, .mo-live i, .mp-split i, .po-compare i, .po-table th i { display: inline-block; width: 0.65rem; height: 0.65rem; border-radius: 3px; background: var(--pc); flex: none; }

/* ── After the vote landing ── */
.af-top { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 1.5rem; align-items: center; }
.af-count, .af-parl { padding: 1.4rem 1.5rem; border-radius: 18px; background: var(--panel); border: 1px solid var(--line-2); display: grid; gap: 0.4rem; align-content: start; }
.af-count p { margin: 0; color: var(--ink-2); }
.af-big { display: flex; align-items: baseline; gap: 0.4rem; font-size: clamp(3.5rem, 2.5rem + 4vw, 6rem); font-weight: 850; font-stretch: var(--xcond); line-height: 0.9; color: var(--accent) !important; }
.af-big small { font-size: 1.25rem; font-weight: 700; color: var(--ink-2); }

/* ── Special votes (reuses the report styles in styles.css) ── */
.sv-close { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); }
.sv-close a { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name map" "m map" "bar bar" "who who"; gap: 0.25rem 0.75rem; padding: 0.85rem 1rem; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); text-decoration: none; }
.sv-close a:hover { border-color: var(--pc); }
.sv-c-name { grid-area: name; font-size: 1.15rem; font-weight: 800; }
.sv-c-m { grid-area: m; color: var(--ink-2); font-size: 0.875rem; }
.sv-c-m b { font-size: 1.5rem; font-weight: 850; color: var(--pc); font-variant-numeric: tabular-nums; }
.sv-c-bar { grid-area: bar; display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--line); margin-top: 0.3rem; }
.sv-c-bar i { display: block; background: var(--pc); }
.sv-c-who { grid-area: who; font-size: 0.8125rem; color: var(--ink-2); }
.sv-close .pg-map { grid-area: map; height: 4.6rem; }
.pg-map { width: auto; overflow: hidden; border-radius: 8px; }
.pg-map use { fill: color-mix(in srgb, var(--ink) 22%, transparent); stroke: color-mix(in srgb, var(--ink) 50%, transparent); stroke-width: 3.5; }
.pg-map .pg-dot { fill: var(--pc); stroke: #fff; stroke-width: 7; }
.pg-map .pg-glow { fill: var(--pc); opacity: 0.45; filter: blur(14px); transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) { .pg-map .pg-glow { animation: pg-glow 1.8s ease-in-out infinite; } @keyframes pg-glow { 50% { opacity: 0.9; transform: scale(1.5); } } }

/* ── Coalition ── */
.co-top { padding: 1.4rem; border-radius: 18px; background: var(--panel); border: 1px solid var(--line-2); display: grid; gap: 0.6rem; }
.co-combos { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.co-combos li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; padding: 0.75rem 1rem; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); }
.co-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.co-chips > span { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.25rem 0.6rem; border-radius: 999px; background: color-mix(in srgb, var(--pc) 14%, var(--paper)); font-weight: 650; font-size: 0.9rem; }
.co-chips em { font-style: normal; color: var(--ink-2); font-weight: 700; }
.co-sum { font-size: 0.875rem; color: var(--ink-2); } .co-sum b { font-size: 1.15rem; color: var(--ink); }
.co-build { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.co-build button { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 0.85rem; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--panel); color: var(--ink); font: inherit; font-weight: 650; cursor: pointer; }
.co-build button[aria-pressed="true"] { border-color: var(--pc); background: color-mix(in srgb, var(--pc) 18%, var(--panel)); }
.co-meter { height: 1.5rem; border-radius: 6px; }
.co-timeline { list-style: none; margin: 0; padding: 0 0 0 1.2rem; display: grid; gap: 1rem; border-left: 2px solid var(--line-2); }
.co-timeline li { position: relative; display: grid; gap: 0.15rem; }
.co-timeline li::before { content: ""; position: absolute; left: calc(-1.2rem - 7px); top: 0.3rem; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 2px var(--ink-2); }
.co-timeline li.done::before { background: var(--accent); box-shadow: none; }
.co-timeline .tl-date { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.co-timeline b { font-size: 1.05rem; } .co-timeline p { margin: 0; color: var(--ink-2); font-size: 0.9375rem; max-width: 44rem; }

/* ── Government watch ── */
.gw-counts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 1px solid var(--line-2); }
.gw-counts li { padding: 0.9rem 1rem 0.9rem 0; display: grid; gap: 0.2rem; font-size: 0.8125rem; color: var(--ink-2); }
.gw-counts li + li { padding-left: 1rem; border-left: 1px solid var(--line-2); }
.gw-counts b { font-size: 2rem; font-weight: 850; color: var(--ink); line-height: 1; }
.gw-empty { padding: 1.6rem 1.75rem; border-radius: 18px; background: var(--panel); border: 1px dashed var(--line-2); display: grid; gap: 0.4rem; }
.gw-empty h2 { margin: 0; } .gw-empty p:not(.pg-kick) { margin: 0; color: var(--ink-2); max-width: 44rem; line-height: 1.55; }
.gw-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.gw-list li { padding: 0.85rem 1rem; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); display: grid; gap: 0.2rem; }
.gw-st { justify-self: start; display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; background: var(--line-2); color: var(--ink); }
.gw-done .gw-st { background: #1F8A4C; color: #fff; } .gw-progress .gw-st { background: #D9A400; color: #111; } .gw-dropped .gw-st { background: #B3261E; color: #fff; }
.gw-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; color: var(--ink-2); }
.gw-legend li { display: flex; gap: 0.6rem; align-items: baseline; }

/* ── Explore ── */
.ex-stats { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--line-2); }
.ex-stats > div { padding: 1rem 1rem 1.1rem 0; display: grid; gap: 0.2rem; }
.ex-stats > div + div { padding-left: 1rem; border-left: 1px solid var(--line-2); }
.ex-stats dt { order: 2; font-size: 0.8125rem; color: var(--ink-2); }
.ex-stats dd { order: 1; margin: 0; font-size: clamp(2rem, 1.5rem + 2vw, 3rem); font-weight: 850; font-stretch: var(--xcond); line-height: 1; }

/* Electorates list */
.el-tally { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; font-size: 0.9375rem; }
.el-tally li { display: inline-flex; align-items: center; gap: 0.4rem; }
.el-tools { display: grid; gap: 0.6rem; }
.el-tools input { width: 100%; max-width: 26rem; font: inherit; font-size: 1rem; padding: 0.65rem 0.9rem; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); }
.el-filter { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.el-filter button { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.75rem; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); font: inherit; font-size: 0.875rem; font-weight: 650; cursor: pointer; }
.el-filter button i { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--pc); }
.el-filter button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.el-group { display: grid; gap: 0.6rem; }
.el-group[hidden] { display: none; }
.el-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); gap: 0 2rem; }
.el-list li[hidden] { display: none; }
.el-list a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "dot name m" "dot who m"; gap: 0 0.6rem; align-items: center; padding: 0.6rem 0.25rem; border-bottom: 1px solid var(--line-2); color: var(--ink); text-decoration: none; }
.el-list a:hover { background: var(--panel); }
.el-list a > i { grid-area: dot; width: 0.75rem; height: 0.75rem; border-radius: 50%; }
.el-n { grid-area: name; font-weight: 750; }
.el-w { grid-area: who; font-size: 0.8125rem; color: var(--ink-2); } .el-w small { color: var(--pc); font-weight: 700; margin-left: 0.2rem; }
.el-m { grid-area: m; font-size: 0.8125rem; color: var(--ink-2); text-align: right; white-space: nowrap; }

/* Electorate page */
.ed-hero-in { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.ed-hero h1 { max-width: none; }
.ed-mapbox .pg-map { height: 9rem; display: block; }
.ed-win { padding: 1.2rem 1.35rem; border-radius: 16px; background: color-mix(in srgb, var(--pc) 13%, var(--panel)); box-shadow: inset 5px 0 0 var(--pc); display: grid; gap: 0.15rem; }
.ed-badge { justify-self: start; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; box-shadow: inset 0 0 0 1.5px var(--pc); margin-bottom: 0.35rem; }
.ed-who { margin: 0; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); font-weight: 850; line-height: 1.1; }
.ed-party { margin: 0; font-weight: 700; color: var(--pc); }
.ed-nums { margin: 0.3rem 0 0; color: var(--ink-2); } .ed-nums b { color: var(--ink); }
.ed-count { margin: 0; color: var(--ink-2); font-size: 0.9375rem; }
.ed-h { margin: 0.5rem 0 0; font-size: 1.35rem; }
.ed-cands { list-style: none; margin: 0; padding: 0; display: grid; }
.ed-cands li { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto; grid-template-areas: "r c v" "r bar bar"; gap: 0.3rem 0.6rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line-2); align-items: center; }
.ed-rank { grid-area: r; align-self: start; font-weight: 800; color: var(--ink-2); }
.ed-c { grid-area: c; display: grid; } .ed-c small { color: var(--ink-2); }
.ed-v { grid-area: v; display: grid; text-align: right; font-variant-numeric: tabular-nums; } .ed-v small { color: var(--ink-2); }
.ed-bar { grid-area: bar; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; } .ed-bar i { display: block; height: 100%; background: var(--pc); }
.ed-near { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.ed-near a { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.45rem 0.8rem; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); text-decoration: none; font-weight: 650; }

/* MPs */
.mp-tablewrap, .po-tablewrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line-2); }
.mp-split, .po-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.mp-split th, .mp-split td, .po-table th, .po-table td { padding: 0.55rem 0.8rem; text-align: right; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.mp-split th:first-child, .po-table th:first-child, .po-table td:nth-child(2) { text-align: left; }
.mp-split thead th, .po-table thead th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); background: var(--panel); }
.mp-split tbody th { display: flex; align-items: center; gap: 0.45rem; font-weight: 700; }
.mp-groups { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); }
.mp-group { padding: 1rem; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel); border-top: 4px solid var(--pc); }
.mp-group h3 { margin: 0 0 0.5rem; display: flex; align-items: center; gap: 0.45rem; font-size: 1.1rem; }
.mp-group h3 small { font-size: 0.8125rem; color: var(--ink-2); font-weight: 600; margin-left: auto; }
.mp-group ul { list-style: none; margin: 0; padding: 0; display: grid; }
.mp-group a { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.4rem 0; border-bottom: 1px solid var(--line-2); color: var(--ink); text-decoration: none; font-size: 0.9375rem; }
.mp-group a span { color: var(--ink-2); font-size: 0.8125rem; text-align: right; }
.mp-group a:hover b { text-decoration: underline; }
.mp-out { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.mp-out > li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.8rem; padding: 0.95rem; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel); box-shadow: inset 4px 0 0 var(--pc); }
.mp-out b { font-size: 1.1rem; } .mp-out small { display: block; color: var(--ink-2); font-size: 0.8125rem; }
.mp-out p { margin: 0.4rem 0 0; font-size: 0.875rem; color: var(--ink-2); line-height: 1.45; }
.mo-ini { width: 2.7rem; height: 2.7rem; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: var(--pc); box-shadow: inset 0 0 0 2px var(--pc); background: color-mix(in srgb, var(--pc) 12%, transparent); }
.mo-live { display: flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.55rem; border-radius: 8px; background: color-mix(in srgb, var(--pc) 12%, transparent); color: var(--ink) !important; }

/* Polls */
.po-key { margin: 0; display: flex; gap: 1.2rem; font-size: 0.8125rem; color: var(--ink-2); }
.po-key i { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 3px; margin-right: 0.35rem; vertical-align: -0.1rem; }
.po-key .poll, .pc-b.poll { background: color-mix(in srgb, var(--pc, var(--ink)) 35%, transparent); }
.po-key .poll { background: color-mix(in srgb, var(--ink) 30%, transparent); }
.po-key .res { background: var(--ink); }
.po-compare { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.po-compare li { display: grid; grid-template-columns: 9rem minmax(0, 1fr) 3.5rem; gap: 0.75rem; align-items: center; }
.pc-name { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 700; }
.pc-bars { display: grid; gap: 3px; }
.pc-b { display: block; height: 1rem; border-radius: 3px; position: relative; min-width: 2.5rem; }
.pc-b.res { background: var(--pc); }
.pc-b em { position: absolute; right: 0.35rem; top: 50%; translate: 0 -50%; font-style: normal; font-size: 0.6875rem; font-weight: 800; color: var(--ink); }
.pc-b.res em { color: #fff; text-shadow: 0 0 3px rgb(0 0 0 / 0.5); }
.pc-diff { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.po-table th i { margin-right: 0.3rem; vertical-align: -0.05rem; }
.po-table tbody th a { color: var(--ink); }

/* ── Phones ── */
@media (max-width: 47.99rem) {
  .pg-hero { padding-block: 1.4rem 1.1rem; }
  .pg-steps a { font-size: 0.875rem; padding: 0.35rem 0.7rem 0.35rem 0.4rem; }
  .pg-body { gap: 1.6rem; padding-block: 1.4rem 0.5rem; }
  .pg-cards { grid-template-columns: 1fr; }
  .pg-next { grid-template-columns: 1fr; }
  .pg-next .pn-next { text-align: left; }
  .af-top { grid-template-columns: 1fr; }
  .gw-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gw-counts li:nth-child(3) { padding-left: 0; border-left: 0; }
  .gw-counts li:nth-child(n+3) { border-top: 1px solid var(--line-2); }
  .ex-stats > div { padding: 0.8rem 0.6rem 0.9rem 0; } .ex-stats > div + div { padding-left: 0.6rem; }
  .ex-stats dt { font-size: 0.75rem; }
  .ed-hero-in { grid-template-columns: minmax(0, 1fr) auto; }
  .ed-mapbox .pg-map { height: 6.5rem; }
  .po-compare li { grid-template-columns: 6.5rem minmax(0, 1fr) 3rem; gap: 0.5rem; }
  .el-list { grid-template-columns: 1fr; }
}

/* ── Home page (index.html) ─────────────────────────────────
   Before 5am Sunday the home page keeps its election layouts; from the
   morning after it uses the new header, path cards and menu. */
:root:not([data-morning]) body[data-page="home"] :is(.site-nav, .menu-btn, .site-menu, #paths) { display: none !important; }
[data-morning] body[data-page="home"] :is(.nav, .mast-blog, .chip-in, #tabbar, #more-sheet) { display: none !important; }
[data-morning] body[data-page="home"] .masthead { position: sticky; top: 0; z-index: 50; }
[data-morning] body[data-page="home"] .layout { display: none !important; }
[data-morning] body[data-page="home"] :is(#specials-report, #all-races) { display: none !important; }
[data-morning] body[data-page="home"] { padding-bottom: 0; }

.home-paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; padding-block: 2.25rem 1rem; }
.hp-card { display: grid; grid-template-rows: auto 1fr; border-radius: 20px; border: 1px solid var(--line-2); background: var(--panel); overflow: hidden; }
.hp-head { display: grid; gap: 0.45rem; padding: 1.4rem 1.5rem 1.2rem; color: var(--ink); text-decoration: none;
  background: radial-gradient(120% 150% at 100% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%); }
.hp-card.path-2 .hp-head { background: radial-gradient(120% 150% at 100% 0%, color-mix(in srgb, var(--accent-2, #22A3B8) 18%, transparent), transparent 60%); }
.hp-head .pg-path { margin: 0; }
.hp-head h2 { margin: 0; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); line-height: 1.05; letter-spacing: -0.015em; }
.hp-head p { margin: 0; color: var(--ink-2); line-height: 1.5; }
.hp-head .hp-stat { color: var(--ink); font-size: 0.9375rem; }
.hp-head .hp-stat b { color: var(--accent); font-weight: 850; }
.hp-head:hover h2 { text-decoration: underline; text-underline-offset: 4px; }
.hp-card ol { list-style: none; margin: 0; padding: 0.4rem 0.6rem 0.7rem; display: grid; align-content: start; border-top: 1px solid var(--line-2); }
.hp-card li a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.8rem; align-items: center; padding: 0.75rem 0.8rem; border-radius: 12px; color: var(--ink); text-decoration: none; }
.hp-card li a:hover { background: var(--panel-2); }
.hp-card li b { display: block; font-size: 1.05rem; } .hp-card li small { display: block; color: var(--ink-2); font-size: 0.8125rem; line-height: 1.4; }
.hp-card li em { font-style: normal; font-weight: 800; color: var(--accent); }
@media (max-width: 47.99rem) {
  .home-paths { grid-template-columns: 1fr; gap: 1rem; padding-block: 1.5rem 0.5rem; }
  .hp-head { padding: 1.15rem 1.15rem 1rem; }
}
/* fixes */
.mo-live { display: block !important; line-height: 1.45; }
.mo-live i { display: inline-block; margin-right: 0.3rem; vertical-align: 0.05rem; }
.site-nav .sn-label[aria-current="page"] { background: none; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* Home: Hipkins v Luxon face-off, under the map. */
/* Face-off */
.fo { position: relative; padding-block: 3rem 3.5rem; overflow: hidden; background: linear-gradient(90deg, color-mix(in srgb, #D3291F 9%, var(--paper)), var(--paper) 42% 58%, color-mix(in srgb, #1F5BA8 10%, var(--paper))); }
.fo-kicker { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; align-items: center; font-size: var(--t-xs); font-weight: 650; color: var(--muted); text-align: center; }
.fo-kicker span { padding: 0.2rem 0.6rem; border-radius: 999px; color: #fff; background: linear-gradient(135deg, #8B5CF6, #22D3EE); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.6875rem; }
.fo-title { margin: 0.6rem 0 1.5rem; text-align: center; font-size: clamp(2.6rem, 11vw, 6rem); font-weight: 900; font-stretch: 125%; letter-spacing: -0.04em; line-height: 0.9; text-transform: uppercase; }
.fo-title em { font-style: italic; font-weight: 500; font-stretch: 75%; color: var(--muted); }
.fo-ring { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; gap: 0.5rem; }
.fo-fighter { --c: var(--fc); display: grid; justify-items: center; text-align: center; gap: 0.2rem; min-width: 0; }
:root[data-theme="dark"] .fo-fighter { --c: var(--fcd); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fo-fighter { --c: var(--fcd); } }
.fo-photo { position: relative; width: min(100%, 15rem); aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--c) 55%, #fff), var(--c)); box-shadow: 0 0 0 4px var(--paper), 0 0 0 7px var(--c), 0 20px 50px -18px var(--c); margin-bottom: 0.7rem; }
.fo-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; z-index: 1; }
.fo-ini { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(2rem, 9vw, 4.5rem); font-weight: 900; font-stretch: 125%; color: #fff; opacity: 0.9; }
.fo-party { font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c); }
.fo-fighter h3 { font-size: clamp(1.1rem, 4.6vw, 2rem); font-weight: 850; font-stretch: 110%; line-height: 1; letter-spacing: -0.02em; }
.fo-seat { font-size: var(--t-xs); color: var(--muted); }
.fo-fighter blockquote { margin: 0.6rem 0 0; max-width: 18rem; font-size: var(--t-sm); font-weight: 600; font-style: italic; line-height: 1.35; }
.fo-fighter cite { display: block; margin-top: 0.25rem; font-size: 0.6875rem; font-style: normal; font-weight: 600; color: var(--muted); }
.fo-vs { align-self: center; margin-top: -4rem; }
.fo-vs span { display: grid; place-items: center; width: 3.2rem; height: 3.2rem; border-radius: 50%; font-weight: 900; font-stretch: 125%; font-size: 1.05rem; color: #fff; background: linear-gradient(135deg, #8B5CF6, #FF8A00); box-shadow: 0 0 0 4px var(--paper), 0 0 30px rgb(139 92 246 / 0.6); transform: rotate(-8deg); }
.fo-card { list-style: none; margin: 2rem auto 0; padding: 0.4rem 1rem; max-width: 46rem; display: grid; border-radius: 1.1rem; background: color-mix(in srgb, var(--panel) 85%, transparent); border: 1px solid var(--line); box-shadow: var(--pop); }
.fo-card li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) 5.5rem; align-items: center; gap: 0.75rem; padding: 0.75rem 0; border-top: 1px solid var(--line); }
.fo-card li:first-child { border-top: 0; }
.fo-a, .fo-b { font-size: clamp(1.25rem, 5vw, 1.9rem); font-weight: 850; font-stretch: 80%; font-variant-numeric: tabular-nums; line-height: 1; }
.fo-a { color: #D3291F; } .fo-b { color: #1F5BA8; text-align: right; }
:root[data-theme="dark"] .fo-a { color: #FF6B5E; } :root[data-theme="dark"] .fo-b { color: #6FA4F0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fo-a { color: #FF6B5E; } :root:not([data-theme="light"]) .fo-b { color: #6FA4F0; } }
.fo-a small { display: block; font-size: 0.6875rem; font-weight: 650; font-stretch: 100%; color: var(--muted); margin-top: 0.2rem; }
.fo-k { display: grid; gap: 0.35rem; text-align: center; font-size: var(--t-xs); font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.06em; }
.fo-k i { display: flex; gap: 3px; height: 0.5rem; }
.fo-k b { flex: var(--w) 1 0; border-radius: 999px; background: #D3291F; transform-origin: right; }
.fo-k b + b { background: #1F5BA8; transform-origin: left; }
.fo-card li.rv .fo-k b { transform: scaleX(0); transition: transform 0.9s cubic-bezier(.2,.7,.2,1) 0.2s; }
.fo-card li.rv.in .fo-k b { transform: none; }
.fo-verdict { display: grid; gap: 0.5rem; max-width: 46rem; margin: 1.25rem auto 0; font-size: var(--t-sm); }
.fo-verdict p { padding: 0.7rem 0.9rem; border-radius: 0.8rem; background: color-mix(in srgb, var(--panel) 70%, transparent); border-left: 4px solid #D3291F; }
.fo-verdict p + p { border-left-color: #1F5BA8; }
.fo-foot { max-width: 46rem; margin: 1rem auto 0; font-size: var(--t-xs); color: var(--muted); text-align: center; }
@media (min-width: 48rem) {
  .fo { padding-block: 4.5rem 5rem; }
  .fo-ring { gap: 2rem; max-width: 60rem; margin-inline: auto; }
  .fo-vs { margin-top: 5rem; } .fo-vs span { width: 5rem; height: 5rem; font-size: 1.6rem; }
  .fo-verdict { grid-template-columns: 1fr 1fr; }
  .fo-verdict p + p { text-align: right; border-left: 0; border-right: 4px solid #1F5BA8; }
}

@media (min-width: 48rem) { .fo-card li { grid-template-columns: 7.5rem minmax(0, 1fr) 7.5rem; } }

/* Coalition page: latest from the talks. */
.co-latest { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.co-latest li { display: grid; gap: 0.25rem; padding: 0.9rem 1rem; border-radius: 0.8rem; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent); }
.co-latest .tl-date { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.co-latest b { font-size: var(--t-md); line-height: 1.3; }
.co-latest p { margin: 0; font-size: var(--t-sm); line-height: 1.5; color: var(--ink-2); }
.co-latest a { font-weight: 700; white-space: nowrap; }
