/*
 * Counted. Editorial, newspaper-poll look: confident type, strong rules, hard edges.
 * House rules: corners 0–3px, no transitions or animations, no gradients or soft shadows,
 * Source Serif 4 only for headings and big numbers (never below 26px), Bitter for everything else.
 * Mobile first; wider layouts from 720px. Hover styles only apply from 960px wide (laptops and
 * desktops), so phones and tablets don't show them while scrolling.
 */

/* Fonts are served from the site (Latin subset, from Google Fonts, OFL), and the two main files are
   preloaded in partials/head.php. font-display: optional means a font is never swapped in after the
   page is drawn, so the text never jumps on a page load. Bitter is one variable file for 400 and 700. */
@font-face {
    font-family: "Source Serif 4"; font-style: normal; font-weight: 700; font-display: optional;
    src: url("../fonts/source-serif-4.woff2") format("woff2");
}
@font-face {
    font-family: "Bitter"; font-style: normal; font-weight: 400 700; font-display: optional;
    src: url("../fonts/bitter.woff2") format("woff2");
}
@font-face {
    font-family: "Bitter"; font-style: italic; font-weight: 400; font-display: optional;
    src: url("../fonts/bitter-italic.woff2") format("woff2");
}

:root {
    --bg: #fffaf4;
    --surface: #ffffff;
    --ink: #000000;
    --muted: #666666;
    --primary: #438372;
    --option-a: var(--primary);
    /* Answer A under black text (breakdown bars, map tiles): 20% lighter than the brand green, so
       black reads at 6.7:1 (4.7:1 on the full green) while staying distinct from --option-c's mint. */
    --option-a-light: #699b8c;
    /* "Biggest shifts" falling figures: a deep orange that reads as text on cream (4.5:1). */
    --shift-down: #b85a12;
    --option-b: #eab469;
    --option-c: #8fd0bf;
    --option-d: #b6e778;
    --rule: #000000;
    --rule-light: #d8d0c4;
    --track: #ece5da;
    /* UK adults in Who votes here comparisons: a mid grey, clearly not a topic or answer colour. */
    --compare-uk: #b5aea4;
    /* Today's question box: a pale brand green, so black text and the green button both stand out. */
    --feature-bg: #e2ece7;
    --error: #a3262a;

    /* Topic colours: the insiteful palette plus two companions, each with a light tint for backgrounds.
       Black text sits on all of them; they mark topics, never carry meaning on their own. */
    --cat-politics: #438372;  --cat-politics-tint: #c7d6cd;
    --cat-money: #eab469;     --cat-money-tint: #f9e5ca;
    --cat-health: #8fd0bf;    --cat-health-tint: #ddede4;
    --cat-work: #9bb7d4;      --cat-work-tint: #e1e6ea;
    --cat-culture: #e8907a;   --cat-culture-tint: #f8dcd0;
    --cat-everyday: #b6e778;  --cat-everyday-tint: #e9f4cf;

    --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
    --display-weight: 700;
    --font-body: "Bitter", Georgia, "Times New Roman", serif;

    --radius: 2px;
    --wrap: 1080px;
    --gutter: 16px;
}

/* ---------------------------------------------------------------- base */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.55;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--ink); text-decoration-color: var(--primary); text-decoration-thickness: 2px; text-underline-offset: 3px; }
@media (min-width: 960px) { a:hover { color: var(--primary); } }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

/* Show/hide toggles (<details>): the browser's own triangle is drawn from the system font, which
   phones can render like an emoji, so it's hidden and replaced with a chevron drawn from two
   borders: pointing right when closed, down when open. The Menu button has its own icon. */
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
summary:not(.site-menu-button)::before {
    content: ""; display: inline-block; width: 0.45em; height: 0.45em; margin: 0 0.55em 0 0.1em;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(-45deg); vertical-align: 0.12em;
}
details[open] > summary:not(.site-menu-button)::before { transform: rotate(45deg); vertical-align: 0.25em; }

h1, h2, h3 { margin: 0 0 0.5em; }
h1, h2 { font-family: var(--font-display); font-weight: var(--display-weight); line-height: 1.08; letter-spacing: -0.01em; }
h1 { font-size: 2.125rem; }
h2 { font-size: 1.625rem; }
h3 { font-family: var(--font-body); font-weight: 700; font-size: 1.25rem; line-height: 1.3; }

p { margin: 0 0 1em; }

code { font-size: 0.9em; white-space: nowrap; }

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

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

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--bg); padding: 8px 12px; font-weight: 700; }
.skip-link:focus { left: 0; }

.muted { color: var(--muted); }
.empty { color: var(--muted); font-style: italic; }
.narrow { max-width: 30rem; }
/* Short plain-English pages (Why vote here?, How the results work): readable width, modest headings. */
.plain-page { max-width: 40rem; }
.plain-page h2 { margin: 28px 0 6px; font-size: 1.375rem; }
.plain-page details, .prose details { margin-top: 28px; }
.plain-page summary, .prose summary { cursor: pointer; font-weight: 700; }

/* ---------------------------------------------------------------- topic colours */

/* Any element with data-cat="<category slug>" gets --cat and --cat-tint for its topic.
   New categories fall back to the primary green until they're given a colour here. */
[data-cat] { --cat: var(--primary); --cat-tint: var(--cat-politics-tint); }
[data-cat="politics-policy"] { --cat: var(--cat-politics); --cat-tint: var(--cat-politics-tint); }
[data-cat="cost-of-living"] { --cat: var(--cat-money); --cat-tint: var(--cat-money-tint); }
[data-cat="health"] { --cat: var(--cat-health); --cat-tint: var(--cat-health-tint); }
[data-cat="work"] { --cat: var(--cat-work); --cat-tint: var(--cat-work-tint); }
[data-cat="culture-society"] { --cat: var(--cat-culture); --cat-tint: var(--cat-culture-tint); }
[data-cat="everyday-life"] { --cat: var(--cat-everyday); --cat-tint: var(--cat-everyday-tint); }

.cat-swatch { display: inline-block; width: 10px; height: 10px; margin-right: 6px; background: var(--cat); vertical-align: 0; }

/* ---------------------------------------------------------------- masthead and nav */

.masthead { position: relative; padding-top: 6px; }

/* One row at every width: the name on the left, Menu on the right. The bottom padding is 10px
   more than the top, because .masthead adds 6px above and the name's line box adds a little more
   above the capitals than below the baseline: this way the logo has equal space above and below. */
.masthead-top {
    display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between;
    gap: 16px; padding: 14px 0 20px;
}

.masthead-name {
    font-family: var(--font-display); font-weight: var(--display-weight); font-size: 2.5rem; line-height: 1; letter-spacing: -0.01em; text-decoration: none; color: var(--ink);
}
@media (min-width: 960px) { .masthead-name:hover { color: var(--ink); } }
/* The logo mark (Brand.php) before the name: as tall as the capitals, sitting on the baseline. */
.brand-mark { display: inline-block; width: auto; height: 0.7em; margin-right: 0.2em; vertical-align: baseline; }

.masthead .site-menu { flex: none; }
@media (max-width: 719.98px) {
    /* Just the icon on phones, in a 44px square (the minimum tap size); the word stays for screen readers. */
    .site-menu .site-menu-button { justify-content: center; width: 44px; height: 44px; padding: 0; }
    html:not(.js) .masthead .site-menu[open]::after { width: 44px; height: 44px; }
    .site-menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Menu: an outlined button (so it doesn't compete with the green Vote buttons) that slides a
   full-height panel in from the right over a dimmed page. While open, the button itself moves to
   the panel's top corner as its close (✕) button, so it all works without JavaScript; a
   placeholder keeps its place in the masthead. */
.site-menu-button {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; list-style: none; cursor: pointer;
    border: 2px solid var(--ink); border-radius: var(--radius); font-weight: 700; font-size: 0.9375rem; color: var(--ink); background: var(--surface);
}
.site-menu-button::-webkit-details-marker { display: none; }
.site-menu[open] .site-menu-button { background: var(--ink); color: #fff; }
@media (min-width: 960px) { .site-menu-button:hover { background: var(--ink); color: #fff; } }
.site-menu-icon path { fill: none; stroke: currentColor; stroke-width: 2; }
.site-menu-cross, .site-menu[open] .site-menu-bars { display: none; }
.site-menu[open] .site-menu-cross { display: inline; }
.site-menu[open]::before { content: ""; position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, 0.4); }
/* Without JavaScript the Menu button moves to the panel's corner as its ✕, with a placeholder
   holding its place. With JavaScript (html.js) it stays put: the panel has its own ✕, and the
   panel and backdrop slide and fade in and out (site.js adds and removes .is-open). */
html:not(.js) .site-menu[open]::after { content: ""; display: block; width: 94px; height: 39px; }
html:not(.js) .site-menu[open] .site-menu-button {
    position: fixed; top: 16px; right: 16px; z-index: 60; justify-content: center; width: 44px; height: 44px; padding: 0;
}
html:not(.js) .site-menu[open] .site-menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.js .site-menu[open] .site-menu-bars { display: inline; }
.js .site-menu[open] .site-menu-cross { display: none; }
.js .site-menu[open] .site-menu-button { background: var(--surface); color: var(--ink); }
.js .site-menu[open]::before { opacity: 0; transition: opacity 0.3s ease; }
.js .site-menu.is-open::before { opacity: 1; }
.js .site-menu-panel { transform: translateX(100%); transition: transform 0.3s ease; }
.js .site-menu.is-open .site-menu-panel { transform: none; }
.site-menu-close {
    position: absolute; top: 22px; right: 24px; display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; padding: 0; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--ink); color: #fff; cursor: pointer;
}
@media (min-width: 960px) { .site-menu-close:hover { background: var(--primary); border-color: var(--primary); } }
.site-menu-close path { fill: none; stroke: currentColor; stroke-width: 2; }
.site-menu-panel {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 50; width: min(22rem, 88vw); overflow-y: auto;
    display: grid; align-content: start; gap: 24px; padding: 22px 24px 32px;
    background: var(--bg); border-left: 3px solid var(--ink); box-shadow: -12px 0 32px rgba(0, 0, 0, 0.2);
}
.menu-open { overflow: hidden; }
/* Keep the scrollbar's space when the open menu stops the page scrolling, so nothing shifts sideways. */
html { scrollbar-gutter: stable; }
@media (prefers-reduced-motion: reduce) { .js .site-menu-panel, .js .site-menu[open]::before { transition: none; } }
.site-menu-title { margin: 0 56px 0 0; font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.75rem; line-height: 44px; }
.site-menu-heading { margin: 0 0 4px; padding-top: 14px; border-top: 1px solid var(--rule-light); font-size: 0.875rem; font-weight: 700; color: var(--muted); }
.site-menu-panel ul { list-style: none; margin: 0; padding: 0; }
.site-menu-panel li a, .site-menu-panel .link-button { display: block; padding: 8px 0; font-weight: 700; font-size: 1.125rem; color: var(--ink); text-decoration: none; }
@media (min-width: 960px) { .site-menu-panel li a:hover, .site-menu-panel .link-button:hover { color: var(--primary); } }
.site-menu-panel a[aria-current="page"] { color: var(--primary); }
.site-menu-panel form { margin: 0; }

/* One thin rule under the nav, drawn underneath the links so each topic's coloured underline
   covers it. (A border would sit below the underlines, and the scrolling list clips overlaps.) */
.section-nav { position: relative; border-top: 1px solid var(--rule-light); }
.section-nav::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--rule-light); }
.section-nav .wrap { position: relative; z-index: 1; }
.section-nav ul {
    display: flex; gap: 0 20px; margin: 0; padding: 0; list-style: none;
    overflow-x: auto; white-space: nowrap; scrollbar-width: none;
}
.section-nav ul::-webkit-scrollbar { display: none; }
/* Items sit edge to edge, so the underlines run as one continuous strip. Home isn't a topic,
   so its underline is black. */
.section-nav ul { gap: 0; }
.section-nav a { display: block; padding: 10px 12px 6px; border-bottom: 4px solid var(--ink); font-weight: 700; font-size: 0.9375rem; text-decoration: none; }
.section-nav li[data-cat] a { border-bottom-color: var(--cat); }
.section-nav a[aria-current="page"] { color: var(--ink); background: var(--cat-tint, var(--track)); }
@media (min-width: 960px) { .section-nav a:hover { color: var(--ink); background: var(--cat-tint, var(--track)); } }
/* On phones the nav runs edge to edge: the strip fills the screen and items scroll off the side. */
@media (max-width: 719.98px) {
    .section-nav .wrap { padding: 0; }
    .section-nav li:first-child a { padding-left: var(--gutter); }
}

/* By id, so it isn't overridden by the .wrap padding on the same element. */
#main { padding-top: 32px; padding-bottom: 48px; }

/* ---------------------------------------------------------------- sections */

.page-title { font-size: 2.125rem; }

.section { margin: 0 0 40px; }
/* Smaller than the questions under them, so a big question reads as the headline. */
.section-title { border-top: 3px solid var(--rule); padding-top: 10px; font-size: 1.375rem; }
/* Category rows on the home page: the rule is in the topic's colour, and heavier. */
section[data-cat] > .section-title { border-top: 6px solid var(--cat); }
section[data-cat] .section-more a { text-decoration-color: var(--cat); text-decoration-thickness: 3px; }
.section-title a { color: inherit; text-decoration: none; }
/* Heading links (section titles, question titles) turn green on hover, with no underline. */
@media (min-width: 960px) { .section-title a:hover { color: var(--primary); } }

.display-sample { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 2rem; line-height: 1.1; }

.prose { max-width: 40rem; }

/* ---------------------------------------------------------------- buttons and forms */

/* Labels are 19px bold so white on --primary meets WCAG AA for large text. */
.button {
    display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
    padding: 10px 22px; border: 2px solid var(--primary); border-radius: var(--radius);
    background: var(--primary); color: #fff; font: 700 1.1875rem/1.2 var(--font-body);
    text-decoration: none; cursor: pointer;
}
@media (min-width: 960px) { .button:hover { background: var(--ink); border-color: var(--ink); color: #fff; } }
.button-secondary { background: var(--surface); color: var(--ink); border-color: var(--ink); }
@media (min-width: 960px) { .button-secondary:hover { background: var(--ink); color: #fff; } }

.link-button {
    padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer;
    text-decoration: underline; text-decoration-color: var(--primary); text-decoration-thickness: 2px; text-underline-offset: 3px;
}

.form { max-width: 30rem; }
.field { margin: 0 0 18px; }
.field label { display: block; margin-bottom: 6px; font-weight: 700; }
.field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea {
    width: 100%; min-height: 48px; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 0;
    background: var(--surface); color: var(--ink); font: 1.0625rem/1.4 var(--font-body);
}
.field-check { display: flex; gap: 12px; align-items: flex-start; }
.field-check input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--primary); }
.field-check label { font-weight: 400; margin: 0; }

fieldset.field { border: 0; padding: 0; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: 6px; font-weight: 700; }
.field-hint { margin: 0 0 6px; font-size: 0.9375rem; color: var(--muted); }
.field-hint-after { margin: 6px 0 0; }
/* Menus and date boxes side by side (Status and Publish date) come out the same height. */
.field select, .field input[type="date"] { height: 50px; }
.field-error { margin: 0 0 6px; font-weight: 700; color: var(--error); }
.field.has-error { padding-left: 12px; border-left: 4px solid var(--error); }
.field .input-short { max-width: 10rem; text-transform: uppercase; }
.choices { display: grid; gap: 8px; }
.choice {
    display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 12px;
    border: 2px solid var(--ink); border-radius: var(--radius); background: var(--surface); font-weight: 400; cursor: pointer;
}
.field .choice { display: flex; margin: 0; font-weight: 400; }
.choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--primary); }
.form-aside { margin-top: 20px; }
/* Honeypot: off-screen for people, visible to naive bots. */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.button-danger { background: var(--error); border-color: var(--error); }

.held-vote { margin: 0 0 20px; padding: 12px 16px; border-left: 6px solid var(--option-b); background: var(--surface); }
.held-vote p { margin: 0; }
.held-vote-question { font-weight: 700; margin-bottom: 4px !important; }

.notice { padding: 12px 16px; border-left: 6px solid var(--primary); background: var(--surface); }
.notice-error { border-left-color: var(--error); }
.notice ul { margin: 0; padding-left: 20px; }
.notice p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------- issues */

.issue-question { font-size: 2.125rem; }
.issue-explainer { font-size: 1.1875rem; max-width: 40rem; }

.issue-cases { display: grid; gap: 0; margin: 20px 0 24px; border-top: 1px solid var(--rule); }
.case { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.case p { margin: 0; }
.case-title { font-family: var(--font-body); font-weight: 700; font-size: 1rem; margin: 0 0 4px; }
.case-a .case-title::before, .case-b .case-title::before {
    content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: 0;
}
.case-a .case-title::before { background: var(--option-a); }
.case-b .case-title::before { background: var(--option-b); }

.vote-options { display: grid; gap: 10px; margin-bottom: 10px; }
.vote-option {
    display: block; width: 100%; min-height: 56px; padding: 14px 18px; text-align: left;
    border: 2px solid var(--ink); border-radius: var(--radius); background: var(--surface); color: var(--ink);
    font: 700 1.1875rem/1.25 var(--font-body); cursor: pointer;
}
@media (min-width: 960px) { .vote-option:hover { background: var(--ink); color: #fff; } }
.vote-count { margin: 0; }

/* ---------------------------------------------------------------- results */

.result-figures { margin-bottom: 14px; }
.early-results { font-weight: 700; border-left: 6px solid var(--option-b); padding-left: 10px; }

.result-bars { list-style: none; margin: 0 0 16px; padding: 0; border-top: 3px solid var(--rule); }
.result-row { padding: 10px 0 12px; border-bottom: 1px solid var(--rule-light); }
.result-row-text { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.result-label { font-weight: 700; font-size: 1.0625rem; }
.result-yours { display: block; font-weight: 400; font-style: italic; font-size: 0.9375rem; color: var(--muted); }
.result-pct { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 2.5rem; line-height: 1; font-variant-numeric: tabular-nums; }
.result-bar { width: 100%; height: 16px; }
.result-bar-track { fill: var(--track); }
.opt-a .result-bar-fill { fill: var(--option-a); }
.opt-b .result-bar-fill { fill: var(--option-b); }
.opt-c .result-bar-fill { fill: url(#pattern-c); }
.opt-d .result-bar-fill { fill: url(#pattern-d); }

.where-you-stand { font-size: 1.1875rem; }
.income-question { margin: 24px 0; }
.income-question-title { margin: 0 0 8px; font-size: 1.25rem; }
.income-question .choices { grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); }
.income-question-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.daily-offer { margin: 24px 0; }
.daily-offer-title { margin: 0 0 8px; font-size: 1.25rem; }
.daily-offer p { margin: 0 0 14px; }
.daily-offer-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.result-series-label { margin: 0 0 6px; font-weight: 700; font-size: 0.9375rem; color: var(--muted); }
.result-weighted { margin: -4px 0 16px; padding: 10px 12px; border-left: 4px solid var(--ink); background: var(--surface); }
.result-weighted.muted { border-left-color: var(--rule-light); font-size: 0.9375rem; }

.issue-explainer { margin-bottom: 1em; }
.vote-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.vote-option:disabled { opacity: 0.6; cursor: default; }
.notice-preview { border-left-color: var(--option-b); }

.results { margin-top: 32px; padding-top: 4px; border-top: 6px solid var(--rule); }
.results:focus { outline: none; }
.results-title { margin-top: 12px; }
.result-meta { font-size: 0.9375rem; }

.change-answer { margin: 0 0 32px; }
.change-answer summary { cursor: pointer; font-weight: 700; text-decoration: underline; text-decoration-color: var(--primary); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.change-options { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

.breakdowns { margin-top: 8px; }
.breakdown-heading { margin-top: 8px; }
.table-scroll { overflow-x: auto; }

/* Trend line: answers' shares over time. Grid and axes stay quiet; text is always ink. */
.trend { margin: 0 0 32px; }
.trend-chart { display: block; overflow: visible; }
.trend-grid { stroke: var(--rule-light); stroke-width: 1; }
.trend-baseline { stroke: var(--ink); stroke-width: 1; }
.trend-axis { font: 13px var(--font-body); fill: var(--muted); }
.trend-label { font: 700 14px var(--font-body); fill: var(--ink); }
.trend-line { fill: none; stroke-width: 3; stroke-linejoin: round; }
.trend-line.opt-a { stroke: var(--option-a); }
.trend-line.opt-b { stroke: var(--option-b); }
.trend-line.opt-c { stroke: var(--option-c); stroke-dasharray: 8 5; }
.trend-line.opt-d { stroke: var(--option-d); stroke-dasharray: 2 4; }
.trend-marker > :not(.trend-hit) { stroke: var(--ink); stroke-width: 1.5; }
.trend-marker.opt-a > :not(.trend-hit) { fill: var(--option-a); }
.trend-marker.opt-b > :not(.trend-hit) { fill: var(--option-b); }
.trend-marker.opt-c > :not(.trend-hit) { fill: var(--option-c); }
.trend-marker.opt-d > :not(.trend-hit) { fill: var(--option-d); }
/* A bigger invisible target around each point, so its hover figure is easy to reach. */
.trend-hit { fill: transparent; stroke: none; }
.trend-caption { font-size: 0.875rem; margin: 6px 0 8px; }
.trend-summary { font-size: 1.125rem; margin: 0 0 12px; }
.trend-key { margin: 0 0 8px; }
.trend-key-mark { display: inline-block; vertical-align: -2px; margin-right: 6px; overflow: visible; }

/* Breakdowns as split bars: one full-width bar per group, divided by answer. */
.breakdown { margin: 0 0 28px; }
.breakdown-key { margin: 0 0 16px; }
.split-rows { list-style: none; margin: 0 0 8px; padding: 0; }
.split-row { display: grid; gap: 4px; padding: 6px 0; }
.split-label { font-weight: 700; font-size: 0.9375rem; }
.split-bar { display: block; width: 100%; height: 30px; }
.split-seg { stroke: var(--bg); stroke-width: 2; }
.split-seg.opt-a { fill: var(--option-a-light); }
.split-seg.opt-b { fill: var(--option-b); }
.split-seg.opt-c { fill: url(#pattern-c); }
.split-seg.opt-d { fill: url(#pattern-d); }
.split-pct { font: 700 14px var(--font-body); fill: var(--ink); }
.split-bar-empty rect { fill: var(--track); }
.split-empty-note { font: italic 14px var(--font-body); fill: var(--muted); }
.breakdown-table summary { cursor: pointer; font-size: 0.9375rem; color: var(--muted); text-decoration: underline; text-decoration-color: var(--rule-light); text-underline-offset: 3px; }
.breakdown-table[open] summary { margin-bottom: 8px; }

.region-map { margin: 0 0 16px; max-width: 420px; }
.region-map > svg { width: 100%; height: auto; }
.tile rect { stroke: var(--ink); stroke-width: 1.5; }
.tile-name { font: 700 14px var(--font-body); fill: var(--ink); }
.tile-figure { font: 700 20px var(--font-body); fill: var(--ink); }.tile.opt-a rect, .key-swatch.opt-a rect { fill: var(--option-a-light); }
.tile.opt-b rect, .key-swatch.opt-b rect { fill: var(--option-b); }
.tile.opt-c rect, .key-swatch.opt-c rect { fill: url(#pattern-c); }
.tile.opt-d rect, .key-swatch.opt-d rect { fill: url(#pattern-d); }
.tile-close rect { fill: var(--surface); }
.tile-none rect { fill: var(--track); stroke: var(--rule-light); }
.tile-none text { fill: var(--muted); }
.key-swatch { display: inline-block; vertical-align: -2px; margin-right: 8px; }
.key-swatch rect { stroke: var(--ink); stroke-width: 2; }
.map-key { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; padding: 0; list-style: none; font-size: 0.9375rem; }

/* "Vote on another": the main way on from an issue, so it's big. */
.vote-another { margin: 40px 0 0; padding-top: 4px; border-top: 6px solid var(--rule); }
.vote-another-title { margin-top: 12px; }
.another-list { list-style: none; margin: 0 0 16px; padding: 0; border-top: 1px solid var(--rule); }
.another-item {
    display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center;
    padding: 16px 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink);
}
@media (min-width: 960px) { .another-item:hover { color: var(--ink); } }
.another-question { font-weight: 700; font-size: 1.1875rem; line-height: 1.3; grid-column: 1; }
.another-meta { grid-column: 1; font-size: 0.9375rem; color: var(--muted); }
.another-cta {
    grid-column: 2; grid-row: 1 / span 2; padding: 10px 16px; background: var(--primary); color: #fff;
    font-weight: 700; font-size: 1.1875rem; border-radius: var(--radius);
}
@media (min-width: 960px) { .another-item:hover .another-cta { background: var(--ink); } }
@media (min-width: 960px) { .another-item:hover .another-question { color: var(--primary); } }

/* ---------------------------------------------------------------- issue lists (home, categories) */

.section-intro { margin: -4px 0 8px; color: var(--muted); font-size: 0.9375rem; }
.section-more { margin: 8px 0 0; font-weight: 700; }
.issue-list { list-style: none; margin: 0; padding: 0; }
.issue-card { border-bottom: 1px solid var(--rule-light); }
.issue-card:last-child { border-bottom: 0; }
.issue-card-link {
    display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; align-items: center;
    padding: 14px 0; color: var(--ink); text-decoration: none;
}
@media (min-width: 960px) { a.issue-card-link:hover { color: var(--ink); } }
@media (min-width: 960px) { a.issue-card-link:hover .issue-card-question { color: var(--primary); } }
.issue-card-question { grid-column: 1; font-weight: 700; font-size: 1.125rem; line-height: 1.3; }
.issue-card-meta { grid-column: 1; display: flex; flex-wrap: wrap; gap: 0 10px; font-size: 0.875rem; color: var(--muted); }
.issue-card-meta span + span::before { content: "·"; margin-right: 10px; }
/* Every Vote button is filled green (black on hover), like the site's other main buttons. */
.issue-card-cta {
    grid-column: 2; grid-row: 1 / span 2; padding: 8px 14px; border: 2px solid var(--primary);
    border-radius: var(--radius); background: var(--primary); color: #fff; font-weight: 700;
}
@media (min-width: 960px) { a.issue-card-link:hover .issue-card-cta { background: var(--ink); border-color: var(--ink); color: #fff; } }
.issue-card-mine { grid-column: 1; font-size: 0.9375rem; font-style: italic; }
/* In place of the Vote button once you've voted: a tick and "Voted", in green, no box. */
.issue-card-voted {
    grid-column: 2; grid-row: 1 / span 3; display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 4px; color: var(--primary); font-weight: 700; font-size: 1.1875rem;
}
.issue-card-voted svg { display: inline-block; }

/* Admin › Suggestions. */
.suggestion-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-light); }
.suggestion { padding: 16px 0; border-bottom: 1px solid var(--rule-light); }
.suggestion-question { margin: 0 0 4px; font-weight: 700; font-size: 1.125rem; }
.suggestion-note { margin: 0 0 4px; font-style: italic; }
.suggestion-meta { margin: 0 0 6px; font-size: 0.875rem; }
.suggestion-similar { margin: 0 0 8px; padding: 8px 12px; background: var(--surface); border-left: 4px solid var(--option-b); font-size: 0.9375rem; }
.suggestion-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.suggestion-actions form { margin: 0; }

/* Who votes here: our voters (green) beside UK adults (grey), one row per group. */
.who-intro { max-width: 46rem; margin: 0 0 32px; }
.who-total { font-size: 1.25rem; }
.who-number { display: block; font-family: var(--font-display); font-weight: var(--display-weight); font-size: 3.5rem; line-height: 1; }
.who-standouts { margin: 12px 0 0; padding-left: 20px; }
.who-standouts li { margin: 0 0 6px; }
.who-note { font-size: 0.9375rem; }
.compare-key { display: flex; gap: 18px; list-style: none; margin: 0 0 8px; padding: 0; font-size: 0.875rem; color: var(--muted); }
.compare-key li { display: flex; align-items: center; gap: 6px; }
.compare-swatch { display: inline-block; width: 12px; height: 12px; }
.compare-ours-swatch { background: var(--primary); }
.compare-uk-swatch { background: var(--compare-uk); }
.compare { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-light); }
.compare-row { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--rule-light); }
.compare-label { font-weight: 700; font-size: 0.9375rem; }
.compare-bars { display: grid; gap: 3px; }
.compare-line { display: grid; grid-template-columns: 1fr 3rem; align-items: center; gap: 10px; }
.compare-bar { display: block; width: 100%; height: 12px; }
.compare-ours rect { fill: var(--primary); }
.compare-uk rect { fill: var(--compare-uk); }
.compare-value { font-weight: 700; font-size: 0.9375rem; text-align: right; font-variant-numeric: tabular-nums; }
.compare-value-uk { font-weight: 400; color: var(--muted); }
@media (min-width: 720px) {
    .compare-row { grid-template-columns: 14rem 1fr; align-items: center; column-gap: 20px; }
}

/* Home: a strip linking to Who votes here, with the voter count and the biggest gaps. */
/* Pale green like Today's question, so it reads as a separate "about our voters" panel. */
.who-strip { display: grid; gap: 16px 32px; padding: 18px 20px; background: var(--feature-bg); border-top: 6px solid var(--ink); }
.who-strip-title { margin: 0; }
.who-strip .section-title { border-top: 0; padding-top: 0; }
/* The sentence above each mini chart names the group, so the chart drops its own label. */
.who-strip .compare { border-top: 0; }
.who-strip .compare-row { grid-template-columns: 1fr; padding: 0; border-bottom: 0; }
.who-strip .compare-label { display: none; }
.who-strip .who-number { font-size: 3rem; }
.who-strip-total { margin: 0; }
.who-strip-standouts { display: grid; gap: 14px; list-style: none; margin: 0; padding: 0; }
.who-strip-standouts p { margin: 0 0 6px; }
@media (min-width: 720px) {
    .who-strip { grid-template-columns: 14rem 1fr; align-items: start; }
    .who-strip-more { grid-column: 1 / -1; }
}

/* Home, signed-out visitors: "New here?" and a short line on what the site is, above the questions. */
/* Signed-out home: a bold green band at the very top. */
.welcome { margin: 0 0 28px; padding: 22px 20px 24px; background: var(--primary); border-top: 6px solid var(--ink); color: #fff; }
.welcome-title {
    max-width: 22em; margin: 0; color: #fff;
    font: var(--display-weight) 1.875rem/1.1 var(--font-display);
}
.welcome-text { max-width: 40rem; margin: 10px 0 0; font-size: 1.125rem; }
.welcome-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin: 18px 0 0; }
.welcome-note { margin: 12px 0 0; font-size: 0.9375rem; }
.welcome-button { background: #fff; border-color: #fff; color: var(--ink); }
.welcome-link { color: #fff; font-weight: 700; }
.welcome-link:visited { color: #fff; }
@media (min-width: 960px) {
    .welcome { padding: 30px 32px 32px; }
    .welcome-title { font-size: 2.5rem; }
    .welcome-button:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
    .welcome-link:hover { color: #fff; text-decoration-thickness: 3px; }
}

/* "Browse by topic" on home: one tile per topic, in its tint with a band of its colour on top,
   the topic name large, how many questions, and its most voted question as a teaser. */
.topic-tiles { display: grid; grid-template-columns: 1fr; gap: 16px; list-style: none; margin: 0; padding: 0; }
.topic-tile {
    display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 16px 18px 20px;
    background: var(--cat-tint); border-top: 6px solid var(--cat); color: var(--ink); text-decoration: none;
}
@media (min-width: 960px) { .topic-tile:hover { color: var(--ink); } }
@media (min-width: 960px) { .topic-tile:hover .topic-tile-name { color: var(--primary); } }
.topic-tile-name { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.625rem; line-height: 1.1; }
.topic-tile-count { font-size: 0.9375rem; color: var(--muted); }
.topic-tile-teaser { margin-top: 6px; font-weight: 700; line-height: 1.3; }
.topic-tile-label { display: block; font-weight: 400; font-size: 0.8125rem; color: var(--muted); }
@media (min-width: 720px) { .topic-tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .topic-tiles { grid-template-columns: repeat(3, 1fr); } }

/* "Today's question", with a "Have your say" button through to the issue. It comes first in the
   page (so first on phones); the two-column layout puts it at the top of the sidebar column. */
/* The same size as the lead question while the two stack (below 960px), smaller in the sidebar. */
/* A coloured box with a green band in place of the usual black rule, so it stands out. */
.today { padding: 14px 18px 20px; border-top: 6px solid var(--primary); background: var(--feature-bg); }
.today .section-title { border-top: 0; padding-top: 0; }
.today .split-seg { stroke: var(--feature-bg); }
.today-question { margin: 0 0 6px; font-family: var(--font-display); font-weight: var(--display-weight); font-size: 2rem; line-height: 1.08; letter-spacing: -0.01em; }
.today-question a { color: var(--ink); text-decoration: none; }
@media (min-width: 960px) { .today-question a:hover { color: var(--primary); } }
.today .issue-card-meta { margin: 0 0 14px; }
.today-standing { margin: 10px 0 4px; }
.today-more { margin: 0; font-size: 0.9375rem; }

/* Shift colours and arrow, shared by the home page's Biggest shifts and the monthly report. */
.shift-arrow { margin-top: 4px; fill: currentColor; color: var(--shift); }
.shift-up { --shift: var(--primary); }
.shift-down { --shift: var(--shift-down); }

/* The lead: a front-page headline, with "Our voters" result bars once it has 100 votes. */
.issue-card-lead .issue-card-link { padding: 4px 0 18px; }
.issue-card-results { grid-column: 1 / -1; margin-top: 14px; }

/* A result as one bar divided by answer (the lead, and Today's question once voted). */
.headline-split { margin: 0; }
.headline-split-key { display: flex; justify-content: space-between; gap: 4px 16px; list-style: none; margin: 0 0 6px; padding: 0; }
.headline-split-key li:last-child:not(:first-child) { text-align: right; }
.headline-split-key-many { flex-wrap: wrap; justify-content: flex-start; }
.headline-split-key-many li:last-child:not(:first-child) { text-align: left; }
.headline-split-pct { display: block; font-family: var(--font-display); font-weight: var(--display-weight); font-size: 2.5rem; line-height: 1; font-variant-numeric: tabular-nums; }
.headline-split-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.9375rem; }
.headline-split-yours { font-weight: 400; font-style: italic; color: var(--muted); }
.headline-split-bar { display: block; width: 100%; height: 22px; }
.headline-split-small .headline-split-pct { font-size: 1.75rem; }
.headline-split-small .headline-split-bar { height: 14px; }
.issue-card-lead .issue-card-question { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: -0.01em; font-size: 2rem; line-height: 1.08; }
/* The lead links just its question and Vote button (the card itself is a div). */
.issue-card-lead a.issue-card-question { color: var(--ink); text-decoration: none; }
@media (min-width: 960px) { .issue-card-lead a.issue-card-question:hover { color: var(--primary); } }
.issue-card-lead a.issue-card-cta { text-decoration: none; }
@media (min-width: 960px) { .issue-card-lead a.issue-card-cta:hover { background: var(--ink); border-color: var(--ink); color: #fff; } }
/* On the lead, "Voted" sits under the result, where the Vote button would be. */
.issue-card-lead .issue-card-voted { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 8px; padding: 10px 0; }
.issue-card-lead .issue-card-cta { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 8px; font-size: 1.1875rem; padding: 10px 22px; }


/* Category page header: a band in the topic's tint, with a solid bar on top. */
.category-head { margin: 0 0 20px; padding: 14px 16px 4px; background: var(--cat-tint); border-top: 8px solid var(--cat); }
.category-head .page-title { margin-bottom: 0.3em; }

/* Issue page: a bar in its topic's colour across the top. */
.issue[data-cat] { border-top: 8px solid var(--cat); padding-top: 16px; }

.list-controls { color: var(--muted); }
.list-controls strong { color: var(--ink); }

/* Where you stand › Your answers: grouped by standing, with what you said and how many agree. */
.answers-summary { margin: 0 0 28px; }
.answer-group { margin: 0 0 32px; }
.answer-group-title { display: flex; align-items: center; gap: 10px; margin: 0 0 2px; font-size: 1.25rem; }
.answer-group-count { min-width: 28px; padding: 2px 8px; border-radius: 999px; background: var(--track); font-size: 0.875rem; text-align: center; }
.answer-group-majority .answer-group-count { background: var(--primary); color: #fff; }
.answer-group-minority .answer-group-count { background: var(--option-b); color: var(--ink); }
.answer-group-intro { margin: 0 0 8px; font-size: 0.9375rem; }
.answer-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-light); }
.answer-item { padding: 12px 0; border-bottom: 1px solid var(--rule-light); }
.answer-question { margin: 0 0 2px; font-weight: 700; line-height: 1.3; }
.answer-meta { margin: 0; font-size: 0.9375rem; color: var(--muted); }
.answer-meta strong { color: var(--ink); }
.answer-question a { color: var(--ink); text-decoration: none; }
@media (min-width: 960px) { .answer-question a:hover { color: var(--primary); } }

/* Most voted of all time: numbered, with the rank in big display figures beside each card. */
.page-head { margin: 0 0 16px; }
/* Every entry has the same number column, so all the questions start in line. */
.issue-card-ranked { display: grid; grid-template-columns: 3.5rem 1fr; align-items: center; }
.issue-card-rank {
    font-family: var(--font-display); font-weight: var(--display-weight);
    font-size: 1.75rem; line-height: 1; color: var(--muted); font-variant-numeric: tabular-nums;
}
/* The top three stand out by size only (same fonts as the rest): number 1 biggest, then 2 and 3.
   Their rank is in ink. */
.issue-card-top .issue-card-rank { color: var(--ink); }
.issue-card-top-1 .issue-card-link { padding: 18px 0 20px; }
.issue-card-top-1 .issue-card-rank { font-size: 3rem; }
.issue-card-top-1 .issue-card-question { font-size: 1.375rem; }
.issue-card-top-2 .issue-card-rank, .issue-card-top-3 .issue-card-rank { font-size: 2.25rem; }
.issue-card-top-2 .issue-card-question, .issue-card-top-3 .issue-card-question { font-size: 1.25rem; }
@media (min-width: 720px) {
    .issue-card-ranked { grid-template-columns: 4.5rem 1fr; }
    .issue-card-top-1 .issue-card-rank { font-size: 4rem; }
    .issue-card-top-1 .issue-card-question { font-size: 1.875rem; }
    .issue-card-top-2 .issue-card-rank, .issue-card-top-3 .issue-card-rank { font-size: 2.75rem; }
    .issue-card-top-2 .issue-card-question, .issue-card-top-3 .issue-card-question { font-size: 1.375rem; }
}
.pager { display: flex; gap: 18px; align-items: baseline; margin: 20px 0; font-weight: 700; }
.pager span { font-weight: 400; color: var(--muted); }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: 8px 0; border-bottom: 1px solid var(--rule-light); }
.closed-issues { margin-top: 40px; }

/* ---------------------------------------------------------------- where you stand */

.stand-intro { font-size: 1.1875rem; max-width: 40rem; }
.stand-grid { display: grid; gap: 0; margin: 0 0 32px; border-top: 3px solid var(--rule); }
.stand-block { padding: 16px 0; border-bottom: 1px solid var(--rule-light); }
.stand-heading { font-family: var(--font-body); font-weight: 700; font-size: 1rem; margin: 0 0 4px; }
.stand-number { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 4.5rem; line-height: 1; margin: 0 0 6px; }
.stand-group { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 2rem; line-height: 1.1; margin: 0 0 6px; }
.stand-streak { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 2rem; line-height: 1.1; margin: 0 0 6px; }
.stand-caption { margin: 0; color: var(--muted); }
/* By topic: how often you side with the majority, per topic. A bar in the topic's colour, a faint
   line at 50%, and the figure in big display numbers. */
.topic-agree { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-light); }
.topic-agree-row {
    display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 16px;
    padding: 14px 0; border-bottom: 1px solid var(--rule-light);
}
.topic-agree-name { font-weight: 700; font-size: 1.0625rem; }
.topic-agree-pct { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.topic-agree-bar { grid-column: 1 / -1; display: block; width: 100%; height: 14px; }
.topic-agree-track { fill: var(--track); }
.topic-agree-fill { fill: var(--cat); }
.topic-agree-mid { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 2 2; opacity: 0.5; }
.topic-agree-detail { grid-column: 1 / -1; font-size: 0.875rem; color: var(--muted); }

/* The shareable card: a bordered panel, like a clipped newspaper box. */
.stand-card { margin: 16px 0 20px; padding: 18px 20px; background: var(--surface); border: 2px solid var(--ink); }
.stand-card .stand-number { font-size: 3.5rem; margin: 0; }
.stand-card-big { margin: 0; }
.stand-card-line { font-size: 1.125rem; margin: 0 0 6px; }
.stand-card-opinion { margin: 12px 0 6px; padding-top: 12px; border-top: 1px solid var(--rule-light); }
.stand-card-meta { margin: 12px 0 0; font-size: 0.9375rem; }
.share-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 16px; padding: 0; list-style: none; }
.share-row { margin: 20px 0 24px; }
.share-heading { margin: 0 0 8px; font-weight: 700; }
.button-small { min-height: 40px; padding: 6px 14px; font-size: 1rem; }
.copy-row-inline { display: flex; gap: 8px; flex: 1 1 260px; }
.copy-row-inline input { flex: 1; min-width: 0; min-height: 40px; padding: 6px 10px; border: 2px solid var(--ink); border-radius: 0; background: var(--surface); font: 0.9375rem var(--font-body); }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; }

/* ---------------------------------------------------------------- admin forms and lists */

.admin-actions { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.filter-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 16px; padding: 0; list-style: none; }
.filter-links a[aria-current] { font-weight: 700; text-decoration: none; }
.admin-table td, .admin-table th { font-size: 0.9375rem; }
.row-links { display: block; font-size: 0.875rem; color: var(--muted); }
.status { font-weight: 700; }
.status-live { color: var(--primary); }
.status-scheduled { color: #8a5a12; }
.status-archived { color: var(--muted); }
.bulk-actions { border: 2px solid var(--ink); padding: 12px 16px 16px; margin: 0 0 32px; max-width: 30rem; }
.bulk-actions legend { font-weight: 700; padding: 0 6px; }
.form-wide { max-width: 44rem; }
.field-pair { display: grid; gap: 0 20px; }
.option-row { display: grid; grid-template-columns: 6.5rem 1fr; align-items: center; gap: 8px; margin-bottom: 8px; }
.field .option-letter { margin: 0; }
.field .input-medium { max-width: 16rem; }
.input-mono { font-family: Consolas, "Courier New", monospace !important; font-size: 0.9375rem !important; }
.form-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.form-danger { margin-top: 24px; }
.compact-list { padding-left: 20px; }
.import-preview { padding-left: 24px; }
.import-preview li { padding: 8px 0; border-bottom: 1px solid var(--rule-light); }
.import-preview li.has-error { border-left: 4px solid var(--error); padding-left: 10px; }
.import-preview p { margin: 0; }
.row-spike td, .row-spike th { background: var(--cat-money-tint); }
.spike-label { color: var(--error); }
.inline-flag { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 0; }
.inline-flag input[type="text"] { min-width: 12rem; padding: 4px 6px; border: 1px solid var(--rule-light); font: 0.875rem var(--font-body); }
.hour-chart { display: block; margin: 8px 0; }
.hour-bar { fill: var(--rule-light); }
.hour-bar-spike { fill: var(--option-b); }
.hour-bar-chosen { fill: var(--ink); }
.email-text { white-space: pre-wrap; font-size: 0.875rem; background: var(--surface); padding: 12px; border: 1px solid var(--rule-light); }

/* ---------------------------------------------------------------- tables */

.data-table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-variant-numeric: tabular-nums; }
.data-table caption { text-align: left; font-weight: 700; font-size: 1.0625rem; padding-bottom: 6px; }
.data-table th, .data-table td { padding: 8px 8px 8px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule-light); }
.data-table th.num { text-align: right; }
.sort-link { color: inherit; white-space: nowrap; text-decoration-color: var(--rule-light); }
th[aria-sort] .sort-link { text-decoration-color: currentColor; }
.data-table thead th { border-bottom: 2px solid var(--rule); font-size: 0.9375rem; }
.data-table tbody th { font-weight: 700; }
.data-table .num { text-align: right; padding-right: 16px; padding-left: 8px; }
.data-table .num:last-child { padding-right: 0; }
.data-table .not-enough { color: var(--muted); font-style: italic; }

.swatch { display: inline-block; width: 18px; height: 18px; vertical-align: -3px; border: 1px solid var(--ink); }
.swatch-bg { background: var(--bg); }
.swatch-ink { background: var(--ink); }
.swatch-muted { background: var(--muted); }
.swatch-primary { background: var(--primary); }
.swatch-option-b { background: var(--option-b); }
.swatch-option-c { background: var(--option-c); }
.swatch-option-d { background: var(--option-d); }

/* ---------------------------------------------------------------- ad slots */

/* Space is reserved so ads never shift the layout. Slots sit below the vote buttons on mobile. */
/* Each slot reserves its ad's height up front, so nothing shifts when the ad loads.
   "mpu" is a 300×250 box (sidebar); "wide" is full width: 250px tall on phones (300×250),
   90px from 720px up (728×90). */
.ad-slot { display: block; margin: 28px 0; padding-top: 4px; border-top: 1px solid var(--rule-light); }
.ad-slot-label { display: block; margin-bottom: 6px; font-size: 0.75rem; color: var(--muted); }
.ad-slot-placeholder {
    display: flex; align-items: center; justify-content: center; padding: 8px; text-align: center;
    background: var(--track); color: var(--muted); font-size: 0.875rem;
}
.ad-slot-mpu .ad-slot-placeholder, .ad-slot-mpu .ad-slot-unit { width: 100%; max-width: 300px; min-height: 250px; margin: 0 auto; }
.ad-slot-wide .ad-slot-placeholder, .ad-slot-wide .ad-slot-unit { width: 100%; min-height: 250px; }
.ad-slot-unit { display: block; }

/* ---------------------------------------------------------------- errors */

.error-status { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 4.5rem; line-height: 1; margin-bottom: 8px; }

/* ---------------------------------------------------------------- footer */

.site-footer { border-top: 3px solid var(--rule); padding: 20px 0 40px; font-size: 0.9375rem; }
.footer-name { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.75rem; margin-bottom: 8px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 12px; padding: 0; list-style: none; }
.footer-note { color: var(--muted); margin: 0; }

/* ---------------------------------------------------------------- admin */

.admin-bar { background: var(--ink); color: #fff; }
.admin-bar-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding-top: 12px; padding-bottom: 12px; }
.admin-bar a, .admin-bar .link-button { color: #fff; }
.admin-bar-name { font-weight: 700; text-decoration: none; }
.admin-bar ul { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; }
.admin-bar form { margin: 0; }

/* ---------------------------------------------------------------- wider screens */

@media (min-width: 720px) {
    h1, .page-title { font-size: 3rem; }
    h2 { font-size: 2rem; }
    .section-title { font-size: 1.625rem; }
    /* The name scales with the window (up to 4.5rem); it never wraps, so Menu stays on its line. */
    .masthead-name { font-size: clamp(2.5rem, 6vw, 4.5rem); white-space: nowrap; }
    .issue-question { font-size: 3.25rem; }
    .issue-cases { grid-template-columns: 1fr 1fr; gap: 0 32px; }
    .vote-options { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
    .field-pair { grid-template-columns: 1fr 1fr; }
    .split-row { grid-template-columns: 11rem 1fr; align-items: center; gap: 12px; }
    .ad-slot-wide .ad-slot-placeholder, .ad-slot-wide .ad-slot-unit { min-height: 90px; }
    .stand-grid { grid-template-columns: 1.2fr 1fr 1fr; gap: 0 32px; }
    .stand-block { border-bottom: 0; }
    .topic-agree-row { grid-template-columns: 14rem 1fr 5rem; grid-template-rows: auto auto; align-items: center; column-gap: 20px; }
    .topic-agree-name { grid-row: 1; }
    .topic-agree-bar { grid-column: 2; grid-row: 1; }
    .topic-agree-pct { grid-column: 3; grid-row: 1 / span 2; text-align: right; font-size: 2.5rem; }
    .topic-agree-detail { grid-column: 1 / span 2; grid-row: 2; }
    .issue-card-lead .issue-card-question, .today-question { font-size: 3rem; }
    .issue-list-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
    .issue-list-grid .issue-card:last-child { border-bottom: 1px solid var(--rule-light); }}

@media (min-width: 960px) {
    .home-grid { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: auto 1fr; gap: 0 40px; }
    .home-main { grid-column: 1; grid-row: 1 / span 2; }
    .home-grid .today { grid-column: 2; grid-row: 1; }
    .site-menu-panel { width: 28rem; padding-left: 32px; padding-right: 32px; }
    .site-menu-close { right: 32px; }
    .today-question { font-size: 1.5rem; line-height: 1.12; }
    .home-side { grid-column: 2; grid-row: 2; }    .home-side .issue-card-question { font-size: 1rem; }
    .issue-list-grid { grid-template-columns: 1fr 1fr 1fr; }
    .result-pct { font-size: 3.25rem; }
    .display-sample { font-size: 2.75rem; }
}

/* Signup: "What we ask, and why", a quiet box above the form. */
.signup-ask { margin: 0 0 24px; padding: 14px 18px; background: var(--feature-bg); border-radius: var(--radius); }
.signup-ask h2 { margin: 0 0 6px; font-size: 1.125rem; }
.signup-ask ul { margin: 0 0 8px; padding-left: 1.2rem; }
.signup-ask p { margin: 0; }

/* ---------------------------------------------------------------- monthly reports
   /reports/{month}. The same page prints as the A4 PDF (local/report-pdf.mjs): two-column parts
   switch on from 680px and in print, since an A4 page is about 700px wide. */
.report { max-width: 60rem; margin: 0 auto; }
.report-preview { margin-bottom: 16px; }
.report-masthead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 4px 24px; border-bottom: 3px solid var(--rule); padding-bottom: 10px; }
.report-brand { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight); font-size: 2.25rem; line-height: 1; }
.report-mark { height: 0.75em; }
/* On screen the site masthead is already above, so the report's own name only shows in print. */
@media screen { .report-brand { display: none; } .report-masthead .report-dateline { text-align: left; } }
.report-dateline { margin: 0; text-align: right; line-height: 1.2; }
.report-kind { display: block; font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.625rem; color: var(--primary); }
.report-month { font-size: 1.0625rem; }
.report-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin: 14px 0 0; }
.report-label { margin: 0 0 8px; font-family: var(--font-body); font-size: 0.875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--primary); line-height: 1.3; }
h2.report-label, h3.report-label { font-family: var(--font-body); font-size: 0.875rem; font-weight: 700; letter-spacing: 0.06em; }
.report-lead { display: grid; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--rule-light); }
.report-headline { margin: 0 0 12px; font-size: 2.5rem; line-height: 1.05; }
.report-standfirst { margin: 0; font-size: 1.125rem; }
.report-question { margin: 0 0 14px; font-weight: 700; font-size: 1.125rem; }
.report-question a, .report-top-question a { color: inherit; text-decoration: none; }
@media (min-width: 960px) { .report-question a:hover, .report-top-question a:hover { color: var(--primary); } }
.report-figure-note { margin: 8px 0 0; font-size: 0.8125rem; color: var(--muted); }
.report-asked { margin: 18px 0 0; padding-top: 12px; border-top: 1px solid var(--rule-light); font-weight: 700; line-height: 1.35; }
.report-asked a { color: inherit; text-decoration: none; }
@media (min-width: 960px) { .report-asked a:hover { color: var(--primary); } }
/* The Big picture donut: chart with big percentages beside it. */
.donut { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.donut-chart { flex: 0 0 auto; width: 180px; height: 180px; }
.donut-track { fill: none; stroke: var(--track); stroke-width: 18; }
.donut-seg { fill: none; stroke-width: 18; }
.donut-seg.opt-a { stroke: var(--primary); }
.donut-seg.opt-b { stroke: var(--option-b); }
.donut-seg.opt-c { stroke: url(#pattern-c); }
.donut-seg.opt-d { stroke: url(#pattern-d); }
.donut-total { font: var(--display-weight) 22px var(--font-display); fill: var(--ink); }
.donut-total-label { font: 400 11px var(--font-body); fill: var(--muted); }
.donut-key { display: grid; gap: 12px; list-style: none; margin: 0; padding: 0; }
.donut-key li { display: grid; grid-template-columns: 14px auto; gap: 10px; align-items: start; }
.donut-swatch { margin-top: 4px; }
.donut-swatch.opt-a rect { fill: var(--primary); }
.donut-swatch.opt-b rect { fill: var(--option-b); }
.donut-swatch.opt-c rect { fill: url(#pattern-c); }
.donut-swatch.opt-d rect { fill: url(#pattern-d); }
.donut-key-text { display: grid; }
.donut-label { font-weight: 700; line-height: 1.2; }
.donut-pct { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 2.25rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.donut-weighted { font-size: 0.8125rem; color: var(--muted); }
@media (min-width: 680px), print { .donut-chart { width: 220px; height: 220px; } }
.report-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; list-style: none; margin: 0; padding: 18px 0; border-bottom: 1px solid var(--rule-light); font-size: 0.875rem; }
.report-stat { display: block; font-family: var(--font-display); font-weight: var(--display-weight); font-size: 2.25rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.report-columns { display: grid; gap: 24px; padding: 24px 0 0; }
.report-note p { margin: 0 0 10px; }
.report-panel { padding: 16px 18px; background: var(--feature-bg); border-radius: var(--radius); }
.report-takeaways ul, .report-how ul { list-style: none; margin: 0; padding: 0; }
.report-takeaways li { padding: 10px 0; border-top: 1px solid #c9d8d0; font-size: 0.9375rem; }
.report-takeaways li:first-child { border-top: 0; padding-top: 0; }
.report-take-figure { display: block; font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.625rem; line-height: 1.1; color: var(--primary); }
.report-section { padding-top: 24px; }
.report-top { display: grid; gap: 20px; list-style: none; margin: 0; padding: 0; }
.report-top-item { padding-top: 12px; border-top: 1px solid var(--rule-light); }
.report-top-category { margin: 0 0 2px; font-size: 0.8125rem; color: var(--muted); }
.report-top-question { margin: 0 0 10px; font-weight: 700; line-height: 1.3; }
.report-shifts, .report-gaps { list-style: none; margin: 0; padding: 0; }
.report-shifts li { display: grid; grid-template-columns: 18px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--rule-light); }
.report-shifts .shift-arrow { grid-row: auto; }
.report-shift-text { display: grid; gap: 2px; }
.report-shift-question { font-weight: 700; line-height: 1.3; }
.report-shift-change { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.625rem; line-height: 1.1; color: var(--shift); }
.report-shift-points { font-size: 0.875rem; color: var(--muted); }
.report-gaps li { padding: 12px 0; border-top: 1px solid var(--rule-light); }
.report-gap-question { margin: 0 0 2px; font-weight: 700; line-height: 1.3; }
.report-gap-answer { margin: 0 0 8px; font-size: 0.875rem; color: var(--muted); }
.report-gap-row { display: grid; grid-template-columns: 8.5rem 1fr 3rem; align-items: center; gap: 10px; margin-top: 4px; font-size: 0.875rem; }
.report-gap-bar { display: block; width: 100%; height: 14px; }
.report-gap-track { fill: var(--track); }
.report-gap-fill { fill: var(--primary); }
.report-gap-pct { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.report-who > p { margin: 0 0 10px; }
.report-who-grid { display: grid; gap: 8px 28px; }
.report-who-grid h3 { margin: 10px 0 4px; font-family: var(--font-body); font-size: 1rem; }
.report-who .compare-row { padding: 5px 0; }
.report-who .compare-label { font-size: 0.8125rem; }
.report-who .compare-value { font-size: 0.8125rem; }
.report-how { margin-top: 28px; }
.report-how li { margin: 0 0 6px; font-size: 0.875rem; }
.report-footer { margin-top: 28px; padding-top: 16px; border-top: 3px solid var(--rule); }
.report-footer-count { margin: 0; }
.report-footer-count .report-stat { display: inline; font-size: 1.75rem; margin-right: 6px; }
.report-footer-cta { margin: 4px 0 14px; font-weight: 700; }
.report-strip { display: block; width: 100%; height: 6px; }
.report-list { list-style: none; margin: 24px 0 0; padding: 0; }
.report-list li { padding: 16px 0; border-top: 1px solid var(--rule-light); }
.report-list-headline { margin: 0 0 6px; font-size: 1.625rem; }
.report-list-headline a { color: inherit; text-decoration: none; }
@media (min-width: 960px) { .report-list-headline a:hover { color: var(--primary); } }
.report-list p { margin: 0 0 6px; }
.report-generate { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 16px 0 24px; }
.report-generate .field { margin: 0; }
.report-admin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.report-admin-actions form { margin: 0; }
.code-block { padding: 10px 14px; background: var(--surface); border: 1px solid var(--rule-light); font-size: 0.9375rem; overflow-x: auto; }

@media (min-width: 680px), print {
    .report-lead { grid-template-columns: 1.15fr 1fr; align-items: start; gap: 32px; }
    .report-columns { grid-template-columns: 1fr 1fr; gap: 32px; }
    .report-columns > :only-child { grid-column: 1 / -1; }
    .report-top { grid-template-columns: 1fr 1fr; gap: 18px 32px; }
    .report-who-grid { grid-template-columns: 1fr 1fr; }
    .report-who-region { grid-column: 1 / -1; columns: 2; column-gap: 28px; }
    .report-who-region h3 { column-span: all; }
    .report-who-region .compare-row { break-inside: avoid; }
}
@media (min-width: 960px) {
    .report-top { grid-template-columns: repeat(3, 1fr); }
    .report-headline { font-size: 3rem; }
}

@page { size: A4; margin: 12mm 12mm 10mm; }
@media print {
    html { font-size: 13px; }
    /* White paper (a cream page prints with white edges and costs ink); the green panels and bars keep their colour. */
    body { background: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .skip-link, .masthead, .section-nav, .site-footer, .site-menu, .report-actions, .report-preview, .notice { display: none !important; }
    #main.wrap { max-width: none; padding: 0; margin: 0; }
    .report { max-width: none; }
    .report a { text-decoration: none; }
    .report-headline { font-size: 2.6rem; }
    .report-top { grid-template-columns: repeat(3, 1fr); gap: 14px 22px; }
    .report-page-two { break-before: page; padding-top: 0; }
    .report-top-item, .report-shifts li, .report-gaps li, .report-panel, .report-footer, .report-lead { break-inside: avoid; }
    .report-label { break-after: avoid; }
}


/* Admin › Accounts headline numbers. */
.account-stats { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .account-stats { grid-template-columns: repeat(4, 1fr); } }

/* Home: big-number cards (issue/figure-card.php): Popular last week under Most voted, and Biggest generation gap below the columns. */
.figure-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; list-style: none; margin: 0; padding: 0; }
.figure-card-link {
    display: flex; flex-direction: column; height: 100%; padding: 14px 16px 16px; background: var(--surface);
    border: 1px solid var(--rule-light); border-top: 5px solid var(--cat); border-radius: 0; color: var(--ink); text-decoration: none;
}
.figure-card-topic { font-size: 0.8125rem; color: var(--muted); }
.figure-card-figure { margin-top: 6px; font-family: var(--font-display); font-weight: var(--display-weight); font-size: 2.75rem; line-height: 1; font-variant-numeric: tabular-nums; }
.figure-card-unit { font-size: 1.25rem; }
.figure-card-caption { margin: 4px 0 12px; font-size: 0.875rem; color: var(--muted); }
.figure-card-question { margin-bottom: 14px; font-weight: 700; line-height: 1.3; }
.figure-card-link .issue-card-cta, .figure-card-link .issue-card-voted { align-self: flex-start; margin-top: auto; }
.figure-card-link .issue-card-voted { padding: 4px 0; font-size: 1rem; }
@media (min-width: 960px) { .figure-card-link:hover .figure-card-question { color: var(--primary); } }
@media (min-width: 960px) { .figure-card-link:hover .issue-card-cta { background: var(--ink); border-color: var(--ink); } }
/* Phones: two narrower cards a row, so the four don't stack into a long column. */
@media (max-width: 559px) {
    .figure-card-link { padding: 10px 12px 12px; }
    .figure-card-figure { font-size: 2.125rem; }
    .figure-card-unit { font-size: 1rem; }
    .figure-card-caption { margin-bottom: 8px; font-size: 0.8125rem; }
    .figure-card-question { font-size: 0.9375rem; margin-bottom: 10px; }
}
@media (min-width: 560px) { .figure-cards { gap: 14px; } }
@media (min-width: 900px) { .home-gap .figure-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.home-popular { margin-top: 32px; }

/* Home: Biggest shifts this week, in the sidebar (issue/shift-feature.php): a big coloured change
   figure beside the question and the answer's share a week ago → now. */
.home-shifts { margin-top: 32px; }
.shift-features { list-style: none; margin: 0; padding: 0; }
.shift-feature { border-top: 1px solid var(--rule-light); }
.shift-feature:first-child { border-top: 0; }
.shift-feature-link { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 14px; align-items: start; padding: 16px 0; color: var(--ink); text-decoration: none; }
.shift-feature-change { display: grid; justify-items: start; gap: 2px; color: var(--shift); }
.shift-feature-change .shift-arrow { grid-row: auto; margin: 0; }
.shift-feature-points { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 2.5rem; line-height: 1; font-variant-numeric: tabular-nums; }
.shift-feature-unit { font-size: 0.8125rem; color: var(--muted); }
.shift-feature-body { display: grid; gap: 4px; min-width: 0; }
.shift-feature-topic { font-size: 0.8125rem; color: var(--muted); }
.shift-feature-question { font-weight: 700; font-size: 1.0625rem; line-height: 1.3; }
@media (min-width: 960px) { .shift-feature-link:hover .shift-feature-question { color: var(--primary); } }
.shift-feature-answer { font-size: 0.9375rem; }
.shift-feature-now { color: var(--shift); }
@media (max-width: 479px) {
    .shift-feature-link { grid-template-columns: 4.25rem minmax(0, 1fr); gap: 10px; }
    .shift-feature-points { font-size: 2rem; }
}

/* Admin › Traffic. */
.traffic-chart { display: block; width: 100%; height: 180px; border-bottom: 1px solid var(--rule-light); }
.traffic-views { fill: var(--compare-uk); }
.traffic-visitors { fill: var(--primary); }
.traffic-axis { display: flex; justify-content: space-between; margin: 4px 0 12px; font-size: 0.8125rem; }
.traffic-columns { display: grid; gap: 0 32px; }
@media (min-width: 720px) { .traffic-columns { grid-template-columns: 1fr 1fr; } }

/* Sign-in link landing pages: the note under the button. */
.continue-note { margin-top: 16px; font-size: 0.9375rem; }
