:root {
  --red: #c0392b;
  --amber: #e67e22;
  --green: #27ae60;
  /* UNSCORED (see RAGCategory's own docstring) — deliberately not red/amber/green,
     since it isn't a real verdict outcome on the same scale, and not the heatmap's own
     grey "pending" either, since this one *has* been judged, just has nothing to score. */
  --unscored: #1a1a1a;
  /* Sampled from the logo/favicon, kept deliberately separate from --green above: that
     one means "answered well" on a verdict, this one is the site's own identity. Reusing
     one colour for both would make a brand accent look like a RAG signal (or vice versa)
     wherever they ended up near each other. */
  --brand-navy: #000f1b;
  --brand-navy-light: #1b2e42;
  /* The logo's own checkmark green — sampled directly from the PNG (2026-11-20:
     #318642), not --green above (that's a RAG status colour, this is identity).
     Paired with --link below for the point-scoring/vibes chart: confirmed via
     dataviz's validate_palette.js that --brand-navy itself is too dark/desaturated
     to work as a chart mark (fails the lightness/chroma floor outright — it reads as
     near-black, not a data colour), but --link + --brand-green together pass every
     check, light and dark mode. The user asked for a shared brand-tied palette
     across every chart (2026-11-20); this pair is scoped to the point-scoring/vibes
     chart only so far — RAG's red/amber/green is a status convention, not a
     categorical choice, and the 7-way answer-type split needs more than two hues, so
     neither can simply take this pair without losing what their colours communicate. */
  --brand-green: #318642;
  /* A genuine link colour, distinct from --brand-navy above — confirmed live,
     2026-11-17: brand-navy is so close to body text's own #1a1a1a (both near-black)
     that a text link styled with it reads as "bold text", not "clickable", and most
     inline links (the "Asked by X to Y" byline, inline links in page body text) had
     no colour rule at all and fell back to the browser's own default blue instead —
     a third, unrelated colour clashing with the rest of the page. GOV.UK's own
     established link blue/hover pair, already chosen and tested for contrast on a
     white background, and a fitting match for a site about UK Parliament. */
  --link: #1d70b8;
  --link-hover: #003078;
  /* Written vs. verbal score trend — reuses the same validated brand pair as
     point-scoring/vibes below (--link/--brand-green), not its own hues, per the
     user's own brand-consolidation request, 2026-11-20. A different chart, a
     different pair of categories (question type, not rhetorical style) — but a
     reader isn't expected to carry colour-identity between these two unrelated
     dimensions, so reusing the same two validated hues site-wide is a legitimate
     brand-consistency choice, not the "colour means two things" anti-pattern that'd
     apply if these were ever shown side by side tracking the same entities. Fixed
     identity order, not cycled: written first/blue, verbal second/green, same
     primary/secondary convention as point-scoring/vibes. */
  --series-written: var(--link);
  --series-verbal: var(--brand-green);
  /* Per-item answer-type split (direct/hedged/.../misread — see home.answer_type_bucket),
     a 7-way identity split so each bucket keeps its own slot regardless of which ones
     a given week actually has anything in. dataviz's validated default categorical
     palette, slots 1-7 in fixed order (slot 8, red, deliberately unused here — this
     isn't a pass/fail scale, and red is already spoken for by --red above). */
  --answer-direct: #2a78d6;
  --answer-hedged: #eb6834;
  --answer-partially-addressed: #1baf7a;
  --answer-not-addressed: #eda100;
  --answer-deferred: #e87ba4;
  --answer-data-not-held: #008300;
  --answer-misread: #6250d6;
  /* Point-scoring/vibes, merged into one paired-bar chart (app/charts.py's
     party_rhetorical_pairs_chart) — a fixed two-series identity now, point-scoring
     always drawn first (see _PAIR_SERIES), so these need to be a validated pair, not
     just two hues that happen to differ. Reuses the site's own brand tokens (see
     --link/--brand-green above) rather than introducing new, unrelated hex values. */
  --chart-pointscoring: var(--link);
  --chart-vibes: var(--brand-green);
  /* Member topic-profile chart (app/charts.py's topic_rate_bar) — a single series, so
     just one hue; the same brand blue rather than a new one. */
  --chart-topic: var(--link);
  /* Without this (and an explicit body background below), a browser with a dark OS
     preference applies its own heuristic dark-mode repaint on top of this page's own
     colours — confirmed live: Chrome was washing out the header's text against its own
     auto-dark background. This tells the browser the page already handles its own
     colours, so it leaves them alone. */
  color-scheme: light;
}

body { font-family: system-ui, sans-serif; margin: 0; color: #1a1a1a; background: #fff; font-size: 1rem; line-height: 1.55; }
/* A real, deliberate heading scale, applied everywhere by default — before this,
   most content pages (member/department profiles, the static About/Methods/etc.
   pages, question.html's own "Answer"/"How we got there") had no heading rule of
   their own at all and fell back to the browser's own UA-default sizes, while only
   the homepage's dashboard-style cards had deliberately-chosen (smaller) sizes —
   two unrelated scales rather than one. Components that genuinely want a smaller,
   dense "section label" tier (.home-section h2, .debate-card h2, .glance-card h3,
   .verdict h3) keep their own scoped override below; everything else now gets this
   one instead of an unstyled browser default. */
h1 { font-size: 1.75rem; line-height: 1.2; margin: 0 0 0.5rem; }
h2 { font-size: 1.375rem; line-height: 1.25; margin: 1.5rem 0 0.5rem; }
h3 { font-size: 1.125rem; line-height: 1.3; margin: 1.25rem 0 0.5rem; }
h4 { font-size: 1rem; line-height: 1.3; margin: 1rem 0 0.4rem; }

/* A single default link colour, applied everywhere — a component that deliberately
   wants a link to read as plain surrounding text instead (the whole card is already
   the clickable element: .result a, .debate-card a, .hero h1 a; or primary nav,
   where position alone already signals "interactive": nav a) keeps its own
   `color: inherit` override below, which wins on specificity. Secondary/muted
   navigation (breadcrumb, footer, pagination prev/next, filters) also keeps its own
   grey — a deliberately quieter tier, not the "is this a link" problem this fixes. */
a { color: var(--link); }
a:hover { color: var(--link-hover); }
/* header itself spans the full width for its border/background; .header-inner is the
   part that's actually constrained, same pattern as .search-bar/.search-bar form below —
   without it, the logo and nav ran all the way to the screen edge on a wide viewport
   while the rest of the page stayed capped at main's 800px. */
header { border-bottom: 1px solid #ddd; padding: 1rem 2rem; }
.header-inner { max-width: 800px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem 1rem; }
.brand { font-weight: 700; text-decoration: none; color: inherit; }
.brand-logo { display: block; height: 52px; width: auto; }
main { max-width: 800px; margin: 0 auto; padding: 1rem 2rem; }

/* Hidden on wide screens — the nav links show inline instead (see nav rules below). */
.nav-toggle { display: none; flex-direction: column; justify-content: space-between; width: 22px; height: 16px; margin-left: auto; background: none; border: none; padding: 0; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; width: 100%; background: #1a1a1a; border-radius: 1px; }

/* Scoped to .rag-badge specifically, not bare .rag-red/.rag-amber/.rag-green — those
   modifier classes are reused on .result (border-left colour only) and .rag-box (its own
   small-square fill), and an unscoped rule here was bleeding its background onto both of
   those (confirmed live: a .result.rag-green card was rendering as a solid green block,
   not a card with a green left border). */
.rag-badge { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 4px; color: #fff; font-size: 0.75rem; font-weight: 700; }
.rag-badge.rag-red { background: var(--red); }
/* White text on these two specific backgrounds fails WCAG AA (2.85:1 / 2.87:1 against
   the 4.5:1 normal-text minimum — confirmed by computing the actual contrast ratio,
   2026-11-18); dark text on the same backgrounds measures 6.1:1 / 6.06:1, comfortably
   over. Red and unscored already pass with white text (5.44:1 / 17.4:1) and are left
   alone. */
.rag-badge.rag-amber { background: var(--amber); color: #1a1a1a; }
.rag-badge.rag-green { background: var(--green); color: #1a1a1a; }
.rag-badge.rag-unscored { background: var(--unscored); }
.status-badge { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 4px; background: #7f8c8d; color: #fff; font-size: 0.75rem; margin-left: 0.25rem; }
/* Marks a hybrid-search result that was surfaced by semantic similarity rather than
   containing the visitor's literal words (see routes.search._hybrid_results) — a
   distinct colour from the plain grey .status-badge so it doesn't read as a verdict
   fact (like DEFERRED) but as "why this result is here". */
.status-badge-semantic { background: #2c7fb8; }
.date { color: #666; font-size: 0.85rem; margin-left: 0.5rem; }

/* The question page's headline — the current verdict, given a fixed early position
   and real typographic weight rather than sitting as plain text below the full
   question/answer transcript (confirmed live, 2026-11-17: on a long Statement
   exchange, the verdict previously sat 10+ screens down). The score is the one
   number most visitors came for, so it's the only oversized numeral on the page. */
.verdict-hero { display: flex; align-items: center; gap: 1.25rem; margin: 1rem 0 1.5rem; padding: 1rem 1.25rem; border-radius: 8px; border-left: 6px solid var(--unscored); background: #f4f4f4; }
.verdict-hero.rag-red { border-left-color: var(--red); background: #fdf0ee; }
.verdict-hero.rag-amber { border-left-color: var(--amber); background: #fdf6ec; }
.verdict-hero.rag-green { border-left-color: var(--green); background: #eaf7ee; }
.verdict-hero.rag-unscored { border-left-color: var(--unscored); background: #f0f0f0; }
.verdict-hero-score { display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; gap: 0.3rem; }
.verdict-hero-number { font-size: 2.75rem; font-weight: 800; line-height: 1; color: #1a1a1a; }
.verdict-hero-denominator { font-size: 0.9rem; color: #666; margin-left: 0.1rem; }
.verdict-hero .rag-badge { font-size: 0.85rem; padding: 0.25rem 0.6rem; }
.verdict-hero .status-badge { font-size: 0.7rem; }
.verdict-hero-body { flex: 1; }
.verdict-hero-summary { margin: 0; font-size: 1.05rem; line-height: 1.5; }
.verdict-hero-date { margin: 0.4rem 0 0; font-size: 0.8rem; color: #666; }

/* The per-answer verdict further down the page, in context with that answer's own
   text — previously unstyled plain text (the "verdict" class was set in the markup
   with no matching rule at all). Deliberately lighter-weight than .verdict-hero
   above: that's the headline, this is the supporting detail. */
.verdict { margin: 1rem 0; padding: 0.75rem 1rem; border-left: 4px solid #ddd; background: #fafafa; border-radius: 0 6px 6px 0; }
.verdict.rag-red { border-left-color: var(--red); }
.verdict.rag-amber { border-left-color: var(--amber); }
.verdict.rag-green { border-left-color: var(--green); }
.verdict.rag-unscored { border-left-color: var(--unscored); }
.verdict h3 { margin: 0 0 0.4rem; font-size: 1rem; }
.verdict p { margin: 0; }

/* Colour-codes the breakdown table's own coverage verdict the same way the RAG badge
   above it is colour-coded — previously plain text ("Partially Addressed", "Hedged")
   with no visual signal at all, inconsistent with every other verdict on the page. */
tr.coverage-addressed td:first-child { border-left: 4px solid var(--green); }
tr.coverage-partially_addressed td:first-child { border-left: 4px solid var(--amber); }
tr.coverage-not_addressed td:first-child { border-left: 4px solid var(--red); }
tr.coverage-deferred td:first-child { border-left: 4px solid var(--unscored); }
tr.coverage-data_not_held td:first-child { border-left: 4px solid #2c7fb8; }

.results { list-style: none; padding: 0; }
.result { border-left: 4px solid #ddd; padding: 0.75rem 1rem; margin-bottom: 0.5rem; }
.result.rag-red { border-left-color: var(--red); }
.result.rag-amber { border-left-color: var(--amber); }
.result.rag-green { border-left-color: var(--green); }
.result.rag-unscored { border-left-color: var(--unscored); }
/* The whole card is one link; without this it renders as one giant underlined,
   browser-default-blue block of text, badges included, which reads as messy rather
   than as a card with a clickable question inside it. */
.result a { text-decoration: none; color: inherit; display: block; }
/* Scoped to "inside the link" specifically, not every .question-text in a .result — on
   debate_detail.html the text sits outside the card's own <a> (see _expandable.html), so
   it isn't part of the clickable card and shouldn't look underlined like it is. */
.result a .question-text { text-decoration: underline; text-decoration-color: #ccc; }
.result a:hover .question-text { text-decoration-color: currentColor; }

table.breakdown { width: 100%; border-collapse: collapse; margin-top: 1rem; }
table.breakdown th, table.breakdown td { border: 1px solid #ddd; padding: 0.5rem; text-align: left; vertical-align: top; }
/* Scoped to a th that actually holds a _sortable_th.html link — plain th cells
   elsewhere (e.g. profile.html's tenure tables) keep the ordinary padding above. */
table.breakdown th:has(.sort-link) { padding: 0; }
.sort-link { display: block; padding: 0.5rem; color: inherit; text-decoration: none; }
.sort-link:hover { background: #f0f0f0; }
.sort-arrow { font-size: 0.7em; color: #666; margin-left: 0.2rem; }

nav a { margin-right: 1rem; color: inherit; text-decoration: none; font-size: 0.9rem; }
nav a:hover { text-decoration: underline; }

/* Separates the debate-type links (PMQs, Oral Questions, ...) from the entity-browsing
   ones (Governments, Departments, Members) within the one nav. Always a horizontal
   rule, not a vertical one — a vertical rule looked fine on a wide screen but broke at
   mid-widths, where the nav's own inline content wraps and the second group could land
   mid-row, under the first, rather than starting cleanly on its own line (confirmed
   live, 2026-11-18). A block-level rule forces that clean break at every width, nav
   already being flex-column once it's behind the hamburger (see the 760px breakpoint
   below) and plain block flow otherwise. */
.nav-divider { display: block; width: 100%; height: 0; border-top: 1px solid #ddd; margin: 0.5rem 0; }

/* Below this width the nav links collapse behind the hamburger button (nav.js toggles
   .open), so the header never has to squeeze brand + two rows of links onto one line on
   a phone. 760px, not 700px: between those two, .header-inner's own flex-wrap let the
   whole two-row nav drop below the logo onto its own line before the hamburger kicked
   in — confirmed live, 2026-11-18, nav wrapping below the brand at 705–735px while
   still in non-hamburger mode. 760px clears that dead zone, so the layout goes straight
   from "nav fits beside the logo" to "hamburger" with nothing in between. The search
   bar lives outside <header> entirely (see .search-bar) so it isn't part of this
   collapse at all — it's a permanent fixture, not a menu item. */
@media (max-width: 760px) {
  .nav-toggle { display: flex; order: 2; }
  .brand { order: 1; }
  #site-nav {
    order: 3;
    display: none;
    flex-direction: column;
    flex-basis: 100%;
    border-top: 1px solid #ddd;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
  }
  #site-nav.open { display: flex; }
  #site-nav a { margin-right: 0; padding: 0.5rem 0; }
}

/* Full prominence, homepage only (see home.html's own override of base.html's search
   block) — search is the primary action there, so it gets a styled row of its own
   rather than living quietly in a corner of the header. Every other page gets the
   much smaller .search-bar-compact variant below instead: a page someone already
   navigated to shouldn't have a secondary action competing with its own content for
   top billing (confirmed live, 2026-11-17: on a quiet page like /about, this full
   version took up as much vertical space as the page's own title). */
.search-bar { background: #f0f4f8; border-bottom: 1px solid #ddd; padding: 0.85rem 2rem; }
.search-bar form { max-width: 800px; margin: 0 auto; display: flex; gap: 0.5rem; }
.search-bar input { flex: 1; padding: 0.5rem 0.75rem; border: 1px solid #bbc7d1; border-radius: 4px; font-size: 1rem; }
.search-bar button { padding: 0.5rem 1.25rem; border: none; border-radius: 4px; background: var(--brand-navy); color: #fff; font-size: 1rem; cursor: pointer; }
.search-bar button:hover { background: var(--brand-navy-light); }
/* The quick bar above is keyword-only (see search.search_all's query_text ilike clause) —
   this points anyone who wants the government/department/asker/date filters at the one
   page that actually has them, rather than implying the bar itself searches on those. */
.advanced-search-link { display: block; max-width: 800px; margin: 0.4rem auto 0; font-size: 0.85rem; color: #555; text-decoration: none; }
.advanced-search-link:hover { text-decoration: underline; }

/* The default, everywhere-but-the-homepage version: no background band, a single
   slim row (input + button + the advanced-search link all inline, wrapping only on
   a narrow viewport) rather than three stacked lines. */
.search-bar-compact { background: none; border-bottom: none; padding: 0.5rem 2rem; }
.search-bar-compact form { max-width: 800px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.search-bar-compact input { flex: 1; min-width: 120px; padding: 0.3rem 0.6rem; font-size: 0.9rem; border: 1px solid #bbc7d1; border-radius: 4px; }
.search-bar-compact button { padding: 0.3rem 0.9rem; border: none; border-radius: 4px; background: var(--brand-navy); color: #fff; font-size: 0.9rem; cursor: pointer; }
.search-bar-compact button:hover { background: var(--brand-navy-light); }
.search-bar-compact .advanced-search-link { display: block; max-width: 800px; margin: 0.3rem auto 0; }

.asker { color: #555; font-size: 0.85rem; font-weight: 600; margin-left: 0.5rem; }
/* Asker + department on a listing card — a second line under the badges/score/date row,
   not crammed inline with them, since both can be present at once and inline would wrap
   unpredictably across cards of very different widths (see the home-section grid below). */
.result-meta { display: block; color: #555; font-size: 0.85rem; margin-top: 0.2rem; }

/* The asking member's party — a muted parenthetical-style tag, not a RAG/type badge's
   pill, since it's identity context rather than a scored or categorical judgement. */
.party-tag { color: #888; font-weight: 400; }
.party-tag::before { content: " ("; }
.party-tag::after { content: ")"; }

.debate-list { list-style: none; padding: 0; }
.debate-card { border: 1px solid #ddd; border-radius: 6px; padding: 1rem 1.25rem; margin-bottom: 0.75rem; }
.debate-card a { text-decoration: none; color: inherit; display: block; }
.debate-card a:hover h2 { text-decoration: underline; }
.debate-card h2 { margin: 0 0 0.25rem; font-size: 1.1rem; }
.debate-summary { margin: 0.5rem 0; color: #333; }

.debate-context { background: #f7f7f7; border-radius: 6px; padding: 1rem 1.25rem; margin: 1rem 0; }
.debate-context h2 { margin-top: 0; font-size: 1rem; }

/* One small box per question in a debate — a quick heatmap of how it went, rather than
   an aggregate count, so the shape of the exchange (e.g. green-green-red) is visible
   at a glance on the listing page. */
.rag-heatmap-label { margin: 0.5rem 0 0.25rem; font-size: 0.75rem; color: #666; text-transform: uppercase; letter-spacing: 0.03em; }
.rag-heatmap { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.5rem; }
.rag-box {
  width: 14px; height: 14px; border-radius: 3px; display: inline-block;
  /* Without this, a flex child's default flex-shrink: 1 squeezes every box down to a
     thin, unevenly-sized sliver on narrow viewports instead of wrapping — confirmed on
     mobile, where a 30+ question heatmap had no room to fit at 14px each. */
  flex-shrink: 0;
}
.rag-box.rag-red { background: var(--red); }
.rag-box.rag-amber { background: var(--amber); }
.rag-box.rag-green { background: var(--green); }
.rag-box.rag-unscored { background: var(--unscored); }
.rag-box.rag-pending { background: #ccc; }

/* A navy anchor at the very bottom of every page — the one deliberately strong, full-
   saturation use of the brand colour on the page, rather than another pale panel.
   Safe to go bold here specifically: it's below all the content, including the RAG-
   coloured material, so it can't compete with the RAG system for attention the way a
   bold colour earlier on the page would (previously plain white with grey text, giving
   the brand colour nowhere on the page it was used at real strength). */
footer { background: var(--brand-navy); padding: 1.5rem 2rem; margin-top: 2rem; color: #aab6c0; font-size: 0.85rem; }
.footer-inner { max-width: 800px; margin: 0 auto; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.footer-links a { color: #e5e9ec; text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: underline; }

/* The written-questions RAG filter links — plain text links, left unstyled until now
   (confirmed live: rendered as default blue underlined text, unlike everything else on
   the page). Colour-coded to match the badges they filter by, same visual language as
   the rest of the site rather than generic hyperlink styling. */
.rag-filters { margin-bottom: 1rem; }
/* Kept as one unit so it wraps onto its own line as a whole on a narrow screen,
   rather than breaking mid-phrase between "Avg score:" and the number. */
.rag-filters .score { white-space: nowrap; }
.rag-filters a { margin-right: 1rem; text-decoration: none; font-weight: 600; color: #555; }
.rag-filters a:hover { text-decoration: underline; }
.rag-filters a.rag-red { color: var(--red); }
.rag-filters a.rag-amber { color: var(--amber); }
.rag-filters a.rag-green { color: var(--green); }

.type-badge { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 4px; background: var(--brand-navy); color: #fff; font-size: 0.7rem; font-weight: 700; margin-right: 0.25rem; text-transform: uppercase; }

/* The "what am I looking at" strip on an individual item page — a type-badge plus a
   trail back up to that type's listing (and, one level further, the session it belongs
   to, for anything that sits inside one). */
.breadcrumb { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 1rem; font-size: 0.9rem; }
.breadcrumb a { color: #555; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: #bbb; }

/* The /search advanced-filter panel: structured-column filters (government, department,
   asker, responder, date range) kept visually distinct from the plain keyword search bar
   above — narrowing results by who/what/when is a different action from typing a phrase. */
.filters { background: #f7f7f7; border-radius: 6px; padding: 1rem 1.25rem; margin-bottom: 1.5rem; }
.filters-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 0.75rem; }
.filters-row label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.85rem; font-weight: 600; color: #444; flex: 1; min-width: 160px; position: relative; }

/* Member-name typeahead dropdown (member_autocomplete.js) — positioned against its
   label, the nearest ancestor with position set, so it sits right under whichever
   input it belongs to regardless of where that input is on the page. */
.autocomplete-list {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 10;
  margin: 2px 0 0; padding: 0.25rem 0; list-style: none;
  background: #fff; border: 1px solid #ccc; border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  max-height: 220px; overflow-y: auto;
}
.autocomplete-list li { padding: 0.4rem 0.75rem; font-size: 0.9rem; font-weight: 400; color: #1a1a1a; cursor: pointer; }
.autocomplete-list li:hover, .autocomplete-list li.active { background: #f0f4f8; }
.filters-row input, .filters-row select { font: inherit; font-size: 0.95rem; padding: 0.4rem 0.5rem; border: 1px solid #ccc; border-radius: 4px; background: #fff; }
.filters-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.filters-actions button { padding: 0.5rem 1.25rem; border: none; border-radius: 4px; background: var(--brand-navy); color: #fff; font-size: 0.95rem; cursor: pointer; }
.filters-actions button:hover { background: var(--brand-navy-light); }
.filters-actions a { font-size: 0.9rem; color: #555; }
/* Points from a listing page's basic row (RAG/government/department only) to /search's
   full filter set, so it reads as "more options elsewhere" rather than another action
   alongside Apply/Clear. */
.filters-actions a.more-filters { margin-left: auto; }

.home-intro { margin-bottom: 1.5rem; }
.home-intro p { margin: 0 0 0.35rem; }
.home-intro-sub { color: #555; font-size: 0.95rem; }

.hero { background: #f0f4f8; border-radius: 8px; padding: 1.5rem 1.75rem; margin-bottom: 2rem; }
/* The homepage's one editorially-featured pick — deliberately the biggest heading on
   the page, bigger even than the generic h1 default, since this is the showcase
   content most visitors land on first (previously smaller than that default: 1.5rem
   against a 1.75rem h1, the opposite of what a hero headline should be). */
.hero h1 { margin: 0.5rem 0 0.25rem; font-size: 2rem; line-height: 1.15; }
.hero h1 a { color: inherit; text-decoration: none; }
.hero-summary { margin: 0.75rem 0 0; color: #333; }
.hero-badges { display: flex; align-items: center; gap: 0.4rem; }
/* Marks this as the editorially-featured pick, distinct from the type-badge next to it
   (which just labels what kind of session it is). */
.badge-highlight { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 4px; background: #f1c40f; color: #4d3800; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }
.hero .rag-heatmap { margin-top: 1rem; }
.hero-cta { display: inline-block; margin-top: 1.25rem; padding: 0.5rem 1.25rem; border-radius: 4px; background: var(--brand-navy); color: #fff; text-decoration: none; font-size: 0.9rem; font-weight: 600; }
.hero-cta:hover { background: var(--brand-navy-light); color: #fff; }

.home-section { margin-bottom: 2rem; }
/* A short navy accent under the heading text itself, not a full-width rule — reinforces
   the brand colour at every section boundary down a long homepage without the heavier
   look of a page-wide line in it. display:inline-block so the border only runs under
   the text, same trick a text-underline would use. Previously 1px #eee, nearly
   invisible against white and doing nothing for "does this page have a brand colour
   anywhere" (confirmed live, 2026-11-17: navy appeared nowhere outside the logo and a
   couple of small buttons). */
.home-section h2 { display: inline-block; font-size: 1.2rem; border-bottom: 3px solid var(--brand-navy); padding-bottom: 0.4rem; }
/* The two dashboard-style sections (RAG split/trend chart, last month's awards) get the
   same soft panel treatment .hero already has, rather than sitting on plain white like
   every other section — groups them visually as one "dashboard" zone near the top of
   the page. Not applied to every .home-section: the list-based sections below (best/
   worst of the week, latest questions) already carry their own per-item colour via each
   result's RAG border, so a second background behind them would be redundant, not
   additive. */
.home-section-panel { background: #f0f4f8; border-radius: 8px; padding: 1.5rem 1.75rem; }
.home-section-panel h2 { border-bottom-color: var(--brand-navy-light); }
.see-more { display: inline-block; margin-top: 0.25rem; font-size: 0.9rem; }
/* Homepage listings as a card grid rather than a full-width stack — auto-fill lets a
   section like "Best of the month" flow several cards per row on a wide screen and drop
   to one column on a phone, with no separate breakpoint needed. Only .home-section's own
   lists get this treatment; the long filterable listings (search.html, search_all.html)
   stay a single scannable column.

   The 230px minimum (confirmed live, 2026-11-17) let 2 cramped columns form at anything
   from ~460-690px wide — a common tablet/small-laptop range, not a rare edge case — each
   card too narrow for .question-text's own 3-line clamp to show more than a few words
   before cutting off mid-sentence. 320px forces a single, full-width card instead across
   that whole range, only splitting into 2 once there's genuinely room for both to read
   comfortably. */
.home-section .results { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0.75rem; }
.home-section .result {
  border-top: 1px solid #e2e2e2;
  border-right: 1px solid #e2e2e2;
  border-bottom: 1px solid #e2e2e2;
  border-left-width: 4px;
  border-radius: 6px;
  margin-bottom: 0;
  padding: 0.85rem 1rem;
  background: #fff;
}
/* Same 320px reasoning as .home-section .results above — avoids the same cramped
   2-column zone on a mid-width viewport. */
.awards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0.75rem; }
.award-card {
  border: 1px solid #e2e2e2;
  border-top-width: 4px;
  border-radius: 6px;
  padding: 0.85rem 1rem;
  background: #fff;
}
.award-point_scoring { border-top-color: #7d5ba6; }
.award-vibes { border-top-color: #297d7d; }
.award-ministry { border-top-color: var(--brand-navy); }
.award-title { margin: 0; font-weight: 700; display: flex; align-items: center; gap: 0.5rem; }
.award-icon { width: 36px; height: 36px; border-radius: 50%; display: block; flex-shrink: 0; }
.award-sub { margin: 0.2rem 0 0.5rem; color: #555; font-size: 0.85rem; }
.award-winner { display: block; font-size: 1.1rem; font-weight: 600; color: var(--link); text-decoration: none; }
.award-winner:hover { text-decoration: underline; }
.award-count, .award-empty { margin: 0.15rem 0 0; font-size: 0.85rem; color: #555; }

/* Ministry of the Month packs two results (best/worst) into one card — each laid
   out like the other cards' own icon+winner+count, side by side with its angel/demon
   badge rather than crammed into one line of body text. */
.ministry-results { display: flex; flex-direction: column; gap: 0.7rem; margin-top: 0.4rem; }
.ministry-result { display: flex; align-items: center; gap: 0.6rem; }
.ministry-result .award-winner { margin: 0; }
.ministry-result .award-count { margin: 0.1rem 0 0; }
.ministry-result-label {
  display: inline-block;
  margin: 0 0 0.15rem;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}
.ministry-result-label-best { background: var(--green); color: #1a1a1a; }
.ministry-result-label-worst { background: var(--red); }

/* The member profile's badge tally — one small circular icon per award style they've
   won, each with a ×N count, built from the same images as the homepage award cards
   (see _award_badge.html). */
.award-tally { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0.5rem 0 1rem; }
.award-tally-badge { display: inline-flex; align-items: center; gap: 0.35rem; }
.award-tally-icon { width: 36px; height: 36px; border-radius: 50%; display: block; }
.award-tally-count { font-weight: 700; color: var(--brand-navy); }

/* "This week at a glance" — the homepage charts, each its own card, wrapping onto as
   many rows as the viewport needs (4 cards side by side on a wide screen, stacked on
   a phone). All plain inline SVG (see app/charts.py), not a JS charting library, so
   they're just sized by their own viewBox + width:100%. */
.glance-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.glance-card { border: 1px solid #e2e2e2; border-radius: 6px; padding: 1rem 1.25rem; background: #fff; }
.glance-card h3 { margin: 0 0 0.75rem; font-size: 0.95rem; }
.rag-distribution-bar, .score-trend-chart, .answer-type-distribution-bar, .party-rhetorical-pairs-bar, .topic-rate-bar { width: 100%; height: auto; display: block; }
.party-rate-grid { margin-top: 1.5rem; }
.party-rhetorical-card { max-width: none; }
.chart-pointscoring { fill: var(--chart-pointscoring); }
.chart-vibes { fill: var(--chart-vibes); }
.chart-topic { fill: var(--chart-topic); }
.topic-profile-section { margin: 1.5rem 0; }
.activity-stats { display: flex; flex-wrap: wrap; gap: 1rem; margin: 0.75rem 0; }
.activity-stat {
  flex: 1 1 180px;
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.activity-stat-value { font-size: 1.5rem; font-weight: 700; color: var(--brand-navy); }
.activity-stat-label { font-size: 0.85rem; color: #555; }
.activity-stat-rank { font-size: 0.85rem; font-weight: 600; color: var(--link); }
.chart-divider-dashed { stroke: #ccc; stroke-width: 1; stroke-dasharray: 3 3; }
/* The government row's label is set in its own italic to read as "not a party being
   ranked" at a glance, on top of being physically separated by the dashed divider. */
.chart-axis-label-government { font-style: italic; }
.chart-axis-label-small { font-size: 10px; }
.party-rhetorical-legend { margin: 0 0 0.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.party-rhetorical-legend-item { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.8rem; color: #333; }
.party-rhetorical-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.party-rhetorical-swatch-pointscoring { background: var(--chart-pointscoring); }
.party-rhetorical-swatch-vibes { background: var(--chart-vibes); }
.rag-distribution-legend, .answer-type-legend { margin-top: 0.6rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chart-rag-red { fill: var(--red); }
.chart-rag-amber { fill: var(--amber); }
.chart-rag-green { fill: var(--green); }
.chart-rag-unscored { fill: var(--unscored); }
.chart-answer-type-direct { fill: var(--answer-direct); }
.chart-answer-type-hedged { fill: var(--answer-hedged); }
.chart-answer-type-partially-addressed { fill: var(--answer-partially-addressed); }
.chart-answer-type-not-addressed { fill: var(--answer-not-addressed); }
.chart-answer-type-deferred { fill: var(--answer-deferred); }
.chart-answer-type-data-not-held { fill: var(--answer-data-not-held); }
.chart-answer-type-misread { fill: var(--answer-misread); }
.answer-type-legend-item { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.8rem; color: #333; }
.answer-type-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.answer-type-swatch-direct { background: var(--answer-direct); }
.answer-type-swatch-hedged { background: var(--answer-hedged); }
.answer-type-swatch-partially-addressed { background: var(--answer-partially-addressed); }
.answer-type-swatch-not-addressed { background: var(--answer-not-addressed); }
.answer-type-swatch-deferred { background: var(--answer-deferred); }
.answer-type-swatch-data-not-held { background: var(--answer-data-not-held); }
.answer-type-swatch-misread { background: var(--answer-misread); }
.chart-segment-label { fill: #fff; font-size: 13px; font-weight: 700; }
.chart-gridline { stroke: #e2e2e2; stroke-width: 1; }
.chart-axis-label { fill: #555; font-size: 11px; }
.chart-trend-line { stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart-trend-line-written { stroke: var(--series-written); }
.chart-trend-line-verbal { stroke: var(--series-verbal); }
.chart-trend-dot { stroke: #fff; stroke-width: 2; }
.chart-trend-dot-written { fill: var(--series-written); }
.chart-trend-dot-verbal { fill: var(--series-verbal); }
/* Direct end-labels stay in text ink, never the series colour — the swatch next to
   them in the legend below already carries that identity. */
.chart-trend-end-label { fill: #333; font-size: 13px; font-weight: 700; }
.score-trend-legend { margin-top: 0.6rem; display: flex; flex-wrap: wrap; gap: 0.9rem; }
.score-trend-legend-item { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: #333; }
.score-trend-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.score-trend-swatch-written { background: var(--series-written); }
.score-trend-swatch-verbal { background: var(--series-verbal); }

/* Listing cards are meant to be scanned quickly — a Statement response or a long Oral
   supplementary can otherwise run to a full speech, dwarfing every other card. Applied
   wherever a card shows raw question text rather than a generated summary. */
.question-text.clamp {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

/* A ~200-word excerpt + inline "Show more"/"Show less" toggle (see _expandable.html,
   expand_toggle.js) — debate_detail.html only, where a reader scans many long blocks of
   verbatim speech in one sitting and clicking through to each one's own page just to
   read the rest (then back) adds up in a way it doesn't on a single-item listing card. */
.expandable { margin-top: 0.4rem; }
.expand-toggle {
  display: inline-block; margin-top: 0.3rem; padding: 0; border: none; background: none;
  color: var(--link); font: inherit; font-size: 0.85rem; font-weight: 600;
  text-decoration: underline; cursor: pointer;
}
.expand-toggle:hover { color: var(--link-hover); }

.flash { padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1rem; font-size: 0.95rem; }
.flash-success { background: #eafaf0; color: #1e7a42; border: 1px solid #b7e6c7; }
.flash-error { background: #fdecea; color: #a33a2f; border: 1px solid #f3c6c0; }

/* Shared by the question-feedback box and the standalone contact form — a plain stacked
   form, no grid of filters here, just message -> optional email -> CAPTCHA -> submit. */
.feedback-box { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid #eee; }
.contact-form, .feedback-box form { display: flex; flex-direction: column; gap: 0.75rem; max-width: 500px; }
.contact-form textarea, .feedback-box textarea,
.contact-form input, .feedback-box input { font: inherit; font-size: 0.95rem; padding: 0.5rem 0.6rem; border: 1px solid #ccc; border-radius: 4px; }
.contact-form button, .feedback-box button, .recaptcha-gate button {
  align-self: flex-start; padding: 0.5rem 1.25rem; border: none; border-radius: 4px;
  background: var(--brand-navy); color: #fff; font-size: 0.95rem; cursor: pointer;
}
.contact-form button:hover, .feedback-box button:hover, .recaptcha-gate button:hover { background: var(--brand-navy-light); }

.recaptcha-gate { max-width: 500px; padding: 1rem 1.25rem; border: 1px solid #dde3ea; border-radius: 6px; background: #f5f7fa; }
.recaptcha-gate p { margin-top: 0; }
.recaptcha-gate form { margin: 0; }

.result.reviewed { opacity: 0.55; }

/* Steps through a debate session's own questions in seq order — lets a reader progress
   through, say, every round of the Leader of the Opposition's exchange at PMQs without
   going back to the session listing each time. Written questions have no seq-ordered
   session to step through, so this never appears on one. */
.question-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid #eee; font-size: 0.9rem; }
.question-nav a { color: #444; text-decoration: none; }
.question-nav a:hover { text-decoration: underline; }
.question-nav-next { margin-left: auto; text-align: right; }

/* Deliberately not red/amber/green (that's reserved for the RAG verdict) and not the
   brand navy (that's structural chrome) — a distinct colour per rhetorical-style
   category, all visually grouped as "this axis", so a reader can tell point-scoring and
   vibes apart at a glance without them being confused for RAG or structural UI. Hidden
   entirely at 0%, so a page with nothing to flag stays quiet (see rhetorical_style_pct).
   Add a rule here (and a tuple entry in question.html's rhetorical_badges macro) for any
   further category. */
.rhetorical-badge { display: inline-block; margin-top: 0.4rem; margin-right: 0.3rem; padding: 0.1rem 0.5rem; border-radius: 4px; color: #fff; font-size: 0.75rem; font-weight: 700; }
.rhetorical-badge-point_scoring { background: #7d5ba6; }
/* Darkened slightly from #2e8b8b — that shade only hit 4.05:1 against white text,
   short of WCAG AA's 4.5:1 minimum (confirmed by computing the actual contrast ratio,
   2026-11-18); this shade measures 4.86:1. */
.rhetorical-badge-vibes { background: #297d7d; }

.pagination { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #eee; font-size: 0.9rem; }
.pagination a { color: var(--link); text-decoration: none; font-weight: 600; }
.pagination a:hover { text-decoration: underline; }
.pagination-disabled { color: #bbb; }
.pagination-page { color: #666; }

.cookie-notice {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem;
  padding: 0.85rem 1.25rem; background: var(--brand-navy); color: #fff;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
}
.cookie-notice p { margin: 0; flex: 1 1 320px; font-size: 0.9rem; }
.cookie-notice a { color: #fff; text-decoration: underline; }
.cookie-notice form { display: flex; gap: 0.6rem; flex: 0 0 auto; }
.cookie-notice button {
  flex: 0 0 auto; padding: 0.5rem 1.25rem; border: none; border-radius: 4px;
  font-size: 0.9rem; font-weight: 700; cursor: pointer;
  background: #fff; color: var(--brand-navy);
}
.cookie-notice button:hover { background: #eee; }
.cookie-notice-reject {
  background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}
.cookie-notice-reject:hover { background: rgba(255, 255, 255, 0.1); }

/* The award evidence page (routes/awards.py) — its own h1 carries the award's icon
   (reused from the homepage card), and a callout explaining the page is a frozen
   record, same bordered-card idiom as .verdict-hero but neutral (navy), since this
   isn't a RAG signal. */
h1 .award-icon { vertical-align: middle; margin-right: 0.5rem; width: 32px; height: 32px; }
.evidence-notice { margin: 1rem 0 1.5rem; padding: 1rem 1.25rem; border-radius: 8px; border-left: 6px solid var(--brand-navy); background: #f0f4f8; }
.evidence-notice p { margin: 0; font-size: 0.95rem; line-height: 1.5; }
