/* Polity design system (BRD §98–§100). Tokens first; components use only tokens. */
:root {
  --paper: #F6F5FA; --surface: #FFFFFF; --ink: #16131F; --muted: #625E70; --rule: #E2DFEA; --rule-strong: #CFCADB;
  --violet: #5A3FD0; --violet-ink: #3F2A9E; --violet-tint: #ECE8FB; --violet-hover: #4A31B8;
  --ok: #0E7A63; --ok-tint: #E2F3EE; --warn: #A35F00; --warn-tint: #FBEEDB; --err: #B4232A; --err-tint: #FBE6E7;
  --info: #2F5E8C; --info-tint: #E3ECF5; --cit: #7A4E9E; --cit-tint: #F1E8F7; --ai: #55606B; --ai-tint: #ECEEF0;
  --display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --body: "IBM Plex Sans", "IBM Plex Sans Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --radius: 10px; --wrap: 1180px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #110F18; --surface: #1A1724; --ink: #EEEBF5; --muted: #A39FB2; --rule: #2E2A3B; --rule-strong: #3E3950;
    --violet: #9C88FF; --violet-ink: #C3B6FF; --violet-tint: #262040; --violet-hover: #B3A3FF;
    --ok: #4FC9A6; --ok-tint: #14302A; --warn: #E6A84A; --warn-tint: #33260F; --err: #FF7F86; --err-tint: #3A1518;
    --info: #7FB0E0; --info-tint: #16263A; --cit: #C79BE8; --cit-tint: #2B1D38; --ai: #A8B2BC; --ai-tint: #24272B;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #110F18; --surface: #1A1724; --ink: #EEEBF5; --muted: #A39FB2; --rule: #2E2A3B; --rule-strong: #3E3950;
  --violet: #9C88FF; --violet-ink: #C3B6FF; --violet-tint: #262040; --violet-hover: #B3A3FF;
  --ok: #4FC9A6; --ok-tint: #14302A; --warn: #E6A84A; --warn-tint: #33260F; --err: #FF7F86; --err-tint: #3A1518;
  --info: #7FB0E0; --info-tint: #16263A; --cit: #C79BE8; --cit-tint: #2B1D38; --ai: #A8B2BC; --ai-tint: #24272B;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--body); }
img { max-width: 100%; }
a { color: var(--violet-ink); text-underline-offset: 2px; }
a:hover { color: var(--violet); }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0; text-wrap: balance; font-weight: 600; }
h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); letter-spacing: -.01em; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.1rem; }
p { margin: 0; }
[lang="hi"] h1, [lang="hi"] h2, [lang="hi"] h3 { font-family: "IBM Plex Sans Devanagari", var(--display); }
/* Devanagari has no case and its conjuncts break apart when tracked out. */
[lang="hi"] .eyebrow, [lang="hi"] .role-label, [lang="hi"] .kind, [lang="hi"] .fact .k { letter-spacing: 0;
  text-transform: none; font-family: var(--body); font-size: .8rem; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.mono, code { font-family: var(--mono); font-size: .85em; }
.num { font-variant-numeric: tabular-nums; }
.eyebrow { font: 500 .72rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--violet); }
/* align-content: start stops grid rows stretching to match a taller sibling column. */
.stack { display: grid; gap: 12px; align-content: start; }
.stack-lg { display: grid; gap: 28px; align-content: start; }
.row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 50; }
.skip-link:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Banners */
.demo-banner { background: var(--warn-tint); color: var(--ink); font-size: .9rem; border-bottom: 1px solid var(--rule); }
.demo-banner .wrap { padding-block: 8px; }
.demo-banner strong { color: var(--warn); }

/* Header: one row; secondary links move into "More", then a Menu on phones */
.site-header { background: var(--surface); border-bottom: 1px solid var(--rule); position: sticky;
  top: env(safe-area-inset-top, 0px); z-index: 20; }
.header-row { display: flex; align-items: center; gap: 18px; padding-block: 10px; flex-wrap: nowrap; }
.brand { display: inline-flex; align-items: center; gap: 8px; font: 600 1.4rem/1 var(--display); color: var(--ink);
  text-decoration: none; flex: none; }
.brand:hover { color: var(--ink); }
.ink-mark { width: 11px; height: 24px; border-radius: 6px; background: var(--violet); display: inline-block; }
.nav { display: flex; align-items: center; gap: 16px; font-size: .92rem; flex: none; white-space: nowrap; }
.nav > a, .menu > summary { color: var(--muted); text-decoration: none; padding: 6px 0; cursor: pointer; }
.nav > a:hover, .nav > a[aria-current="page"], .menu > summary:hover { color: var(--ink); }
.nav > a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--violet); }
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::after { content: " ▾"; font-size: .75em; }
.menu-panel { position: absolute; top: calc(100% + 8px); left: 0; min-width: 210px; background: var(--surface);
  border: 1px solid var(--rule); border-radius: 10px; box-shadow: 0 12px 28px rgba(22, 19, 31, .14); padding: 6px;
  display: grid; z-index: 40; }
.menu-panel a { padding: 8px 10px; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: .9rem; }
.menu-panel a:hover { background: var(--violet-tint); color: var(--violet-ink); }
.nav-narrow { display: none; }
.search-mini { position: relative; flex: 1 1 12rem; min-width: 8rem; max-width: 26rem; }
.search-mini input { width: 100%; padding: 7px 12px; }
.header-tools { display: flex; align-items: center; gap: 12px; flex: none; }
.lang-switch { display: flex; gap: 2px; font-size: .8rem; border: 1px solid var(--rule); border-radius: 999px; padding: 2px; }
.lang-switch a { padding: 3px 9px; border-radius: 999px; text-decoration: none; color: var(--muted); }
.lang-switch a[aria-current="true"] { background: var(--violet-tint); color: var(--violet-ink); font-weight: 500; }
@media (max-width: 980px) { .nav-wide { display: none; } .nav-narrow { display: block; } }
@media (max-width: 720px) {
  .header-row { gap: 10px; }
  .nav > a { display: none; }
  .menu-panel { left: auto; right: 0; }
  .search-mini { min-width: 0; }
  .account-link { display: none; }
}

/* Search suggestions */
.suggest-box { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface);
  border: 1px solid var(--rule); border-radius: 10px; box-shadow: 0 12px 28px rgba(22, 19, 31, .14); z-index: 45;
  max-height: 70vh; overflow-y: auto; padding: 6px; }
.suggest-box .sg-head { font: 500 .68rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  padding: 8px 8px 4px; }
.suggest-box a { display: grid; gap: 1px; padding: 7px 8px; border-radius: 6px; text-decoration: none; color: var(--ink); }
.suggest-box a:hover, .suggest-box a[aria-selected="true"] { background: var(--violet-tint); }
.suggest-box .sg-detail { font-size: .8rem; color: var(--muted); }
.suggest-box .sg-all { font-size: .85rem; color: var(--violet-ink); border-top: 1px solid var(--rule); margin-top: 4px; }

/* Data note: source and freshness on every page */
.data-note { border-top: 1px solid var(--rule); background: var(--paper); font-size: .82rem; color: var(--muted); }
.data-note .wrap { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-block: 12px; align-items: baseline; }
.data-note a { color: var(--muted); }
.data-note-label { font: 500 .68rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--violet); }

/* Forms */
input[type=text], input[type=search], input[type=email], input[type=url], input[type=number], select, textarea {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--rule-strong);
  border-radius: 8px; padding: 8px 12px; max-width: 100%; }
textarea { width: 100%; }
input::placeholder, textarea::placeholder { color: var(--muted); }
.btn { display: inline-flex; align-items: center; gap: 6px; font: 500 .93rem/1 var(--body); padding: 10px 16px;
  border-radius: 8px; border: 1px solid transparent; background: var(--violet); color: #fff; cursor: pointer;
  text-decoration: none; white-space: nowrap; }
:root[data-theme="dark"] .btn { color: #110F18; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn { color: #110F18; } }
.btn:hover { background: var(--violet-hover); color: #fff; }
:root[data-theme="dark"] .btn:hover { color: #110F18; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn:hover { color: #110F18; } }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn-quiet:hover { background: var(--violet-tint); color: var(--violet-ink); }
:root[data-theme="dark"] .btn-quiet, :root[data-theme="dark"] .btn-quiet:hover { color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-quiet,
  :root:not([data-theme="light"]) .btn-quiet:hover { color: var(--ink); } }
.btn-danger { background: transparent; color: var(--err); border-color: var(--err); }
.btn-danger:hover { background: var(--err-tint); color: var(--err); }
.field { display: grid; gap: 6px; grid-template-columns: minmax(0, 1fr); }
.field label { font-weight: 500; font-size: .93rem; }
.field .help { font-size: .82rem; color: var(--muted); }
.errorlist { list-style: none; margin: 0; padding: 0; color: var(--err); font-size: .88rem; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.check input { margin-top: 4px; }

/* Messages */
.messages { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.messages li { padding: 10px 14px; border-radius: 8px; background: var(--info-tint); color: var(--ink); font-size: .93rem; }
.messages .success { background: var(--ok-tint); }
.messages .error { background: var(--err-tint); }

/* Layout */
main { padding-block: 32px 72px; }
.page-head { display: grid; gap: 10px; padding-bottom: 24px; border-bottom: 1px solid var(--rule); margin-bottom: 28px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }
section.block { display: grid; gap: 14px; align-content: start; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px; }
.panel-tight { padding: 0; overflow: hidden; }
.empty { color: var(--muted); font-size: .93rem; padding: 14px 0; }

/* Hero / find */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: center;
  padding-bottom: 36px; border-bottom: 1px solid var(--rule); }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); }
.hero .lede { font-size: 1.1rem; color: var(--muted); max-width: 52ch; }
.find-form { display: flex; gap: 8px; flex-wrap: wrap; }
.find-form input { flex: 1 1 14rem; font-size: 1.1rem; padding: 12px 14px; font-family: var(--mono); letter-spacing: .06em; }
.find-form .btn { padding: 13px 20px; font-size: 1rem; }
.principle { font: italic 500 1rem var(--display); color: var(--muted); }
#india-map { height: 420px; border-radius: var(--radius); border: 1px solid var(--rule); background: var(--surface); }
.leaflet-container { background: var(--surface) !important; font-family: var(--body) !important; }
.map-note { font-size: .82rem; color: var(--muted); }
.mini-map { height: 260px; border-radius: var(--radius); border: 1px solid var(--rule); }

/* People rows */
.people { list-style: none; margin: 0; padding: 0; }
.person-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; align-items: center;
  padding: 12px 0; border-top: 1px solid var(--rule); }
.person-row > .avatar { grid-row: span 2; align-self: start; }
.person-row > .row { grid-column: 2; justify-content: flex-start !important; gap: 6px; }
.people > li:first-child .person-row, .people > .person-row:first-child { border-top: 0; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--violet-tint); color: var(--violet-ink);
  display: grid; place-items: center; font: 600 1rem var(--display); flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 84px; height: 84px; font-size: 1.6rem; }
.person-name { font-weight: 600; text-decoration: none; color: var(--ink); }
.person-name:hover { color: var(--violet-ink); text-decoration: underline; }
.person-meta { font-size: .88rem; color: var(--muted); }
.role-label { font: 500 .7rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* Party chip: party colour only as a dot (BRD §99) */
.party { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--ink); text-decoration: none;
  border: 1px solid var(--rule); border-radius: 999px; padding: 2px 9px 2px 7px; white-space: nowrap; background: var(--surface); }
.party::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--party, var(--muted)); }
.party:hover { border-color: var(--rule-strong); color: var(--ink); }

/* Provenance badges (BRD §100, §113) */
.prov { display: inline-flex; align-items: center; gap: 5px; font: 500 .72rem/1 var(--body); padding: 4px 8px 4px 6px;
  border-radius: 5px; white-space: nowrap; text-decoration: none; vertical-align: middle; }
.prov svg { width: 11px; height: 11px; flex: none; }
a.prov:hover { filter: brightness(.95); text-decoration: underline; }
.prov-official { background: var(--ok-tint); color: var(--ok); }
.prov-official_sourced { background: var(--info-tint); color: var(--info); }
.prov-leader_provided { background: var(--violet-tint); color: var(--violet-ink); }
.prov-news_reported { background: var(--warn-tint); color: var(--warn); }
.prov-citizen_submitted { background: var(--cit-tint); color: var(--cit); }
.prov-platform_generated { background: var(--ai-tint); color: var(--ai); }
.prov-ai_summary { background: var(--ai-tint); color: var(--ai); border: 1px dashed currentColor; }
.prov-community_sourced { background: var(--ai-tint); color: var(--ai); }
.prov-pending { font-weight: 400; opacity: .85; }
.fresh { font: .75rem var(--mono); color: var(--muted); }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 14px; padding: 12px 0;
  border-top: 1px solid var(--rule); }
.timeline li:first-child { border-top: 0; }
.timeline .when { font: .82rem/1.7 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline .current .when { color: var(--violet); font-weight: 500; }
@media (max-width: 520px) { .timeline li { grid-template-columns: 1fr; gap: 2px; } }

/* Lists of items */
.items { list-style: none; margin: 0; padding: 0; }
.items > li { padding: 12px 0; border-top: 1px solid var(--rule); display: grid; gap: 4px; }
.items > li:first-child { border-top: 0; }
.item-title { font-weight: 500; color: var(--ink); text-decoration: none; }
a.item-title:hover { color: var(--violet-ink); text-decoration: underline; }
.kind { font: 500 .68rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* Status pills */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 500; padding: 3px 9px;
  border-radius: 999px; background: var(--ai-tint); color: var(--ink); white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.status-completed::before, .status-implemented::before, .status-accepted::before, .status-active::before { background: var(--ok); }
.status-in_progress::before, .status-approved::before, .status-under_review::before, .status-source_check::before,
.status-running::before, .status-queued::before { background: var(--info); }
.status-delayed::before, .status-more_info::before, .status-pending::before, .status-completed_errors::before,
.status-paused::before, .status-submitted::before { background: var(--warn); }
.status-cancelled::before, .status-rejected::before, .status-failed::before, .status-failing::before,
.status-invalid::before { background: var(--err); }

/* Cards (used sparingly, BRD §100) */
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px;
  display: grid; gap: 8px; align-content: start; text-decoration: none; color: var(--ink); }
a.card:hover { border-color: var(--rule-strong); color: var(--ink); }
.card h3 { font-size: 1.05rem; }

/* Facts */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0; border: 1px solid var(--rule);
  border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.fact { padding: 12px 14px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); display: grid; gap: 2px; }
.fact .k { font: .7rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fact .v { font-weight: 500; font-variant-numeric: tabular-nums; }
dl.kv { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: .95rem; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; }
@media (max-width: 520px) { dl.kv { grid-template-columns: 1fr; gap: 2px; } dl.kv dd { margin-bottom: 8px; } }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th { text-align: left; font: 500 .72rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  padding: 10px 12px; border-bottom: 1px solid var(--rule); white-space: nowrap; background: var(--paper); }
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Search results */
.search-results { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px 40px; align-items: start; }
.search-results section:first-child { grid-row: span 4; }
@media (max-width: 860px) { .search-results { grid-template-columns: 1fr; } }
.result-row { padding: 9px 0 !important; }

/* Dense lists: one line per person, instant filter, A–Z jump */
.list-tools { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 8px; }
.list-tools input { flex: 1 1 18rem; max-width: 30rem; }
.az { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: 8px; }
.az a { font: 500 .78rem var(--mono); min-width: 24px; text-align: center; padding: 3px 5px; border-radius: 5px;
  color: var(--violet-ink); text-decoration: none; background: var(--violet-tint); }
.az a:hover { background: var(--violet); color: var(--surface); }
table.dense td { padding: 7px 12px; }
table.dense tbody tr:hover { background: var(--paper); }
table.dense td a { text-decoration: none; }
table.dense td a:hover { text-decoration: underline; }
.table-wrap.scroll { max-height: 70vh; overflow-y: auto; }
.table-wrap.scroll thead th { position: sticky; top: 0; z-index: 1; }

/* Seat bar */
.seatbar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--rule); }
.seatbar span { background: var(--party, var(--muted)); display: block; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; padding: 14px; background: var(--surface);
  border: 1px solid var(--rule); border-radius: var(--radius); }
.filters .field { min-width: 0; flex: 1 1 11rem; }
.filters select, .filters input { width: 100%; min-width: 0; }

/* Tabs-in-page nav */
.section-nav { display: flex; gap: 4px 18px; flex-wrap: wrap; font-size: .9rem; border-bottom: 1px solid var(--rule);
  padding-bottom: 10px; margin-bottom: 24px; }
.section-nav a { color: var(--muted); text-decoration: none; }
.section-nav a:hover { color: var(--ink); }

/* Correction link */
.correction-link { font-size: .85rem; color: var(--muted); }
.correction-link a { color: var(--muted); }

/* Pagination */
.pagination { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: .9rem; margin-top: 16px; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); background: var(--surface); font-size: .9rem; }
.site-footer .wrap { padding-block: 28px; display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr));
  gap: 24px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--muted); }
@media (max-width: 720px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* Desk */
.desk-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }
.desk-nav a { text-decoration: none; color: var(--ink); font-size: .9rem; padding: 7px 12px; border-radius: 8px;
  border: 1px solid var(--rule); background: var(--surface); }
.desk-nav a[aria-current="page"] { border-color: var(--violet); color: var(--violet-ink); background: var(--violet-tint); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 16px;
  display: grid; gap: 4px; text-decoration: none; color: var(--ink); }
a.stat:hover { border-color: var(--rule-strong); color: var(--ink); }
.stat .n { font: 600 1.7rem/1 var(--display); font-variant-numeric: tabular-nums; }
.stat .l { font-size: .84rem; color: var(--muted); }
.stat.alert { border-color: var(--warn); }
.stat.alert .n { color: var(--warn); }
.suggest { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.suggest label { display: inline-flex; gap: 6px; align-items: center; font-size: .9rem; }
.conf { font: .72rem var(--mono); color: var(--muted); }
pre.log { white-space: pre-wrap; font: .8rem/1.5 var(--mono); background: var(--paper); border: 1px solid var(--rule);
  border-radius: 8px; padding: 12px; max-height: 260px; overflow: auto; margin: 0; }

/* Account link and counts */
.account-link { font-size: .9rem; text-decoration: none; color: var(--ink); white-space: nowrap; }
.badge-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--violet); color: var(--surface); font: 600 .7rem/1 var(--body); }

/* Mobile bottom navigation (BRD §101) */
.bottom-nav { display: none; }
@media (max-width: 720px) {
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--surface); border-top: 1px solid var(--rule); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .bottom-nav a { text-align: center; padding: 10px 2px; font-size: .74rem; color: var(--muted); text-decoration: none; }
  .bottom-nav a[aria-current="page"] { color: var(--violet-ink); font-weight: 600; }
  body { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
}

/* Follow button */
.follow-form { display: inline; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Seats-won chart (election pages): one neutral hue — never party colours. */
.seats-chart { margin-bottom: 28px; }
.seat-strip { position: relative; display: flex; height: 34px; margin: 14px 0 26px; border-radius: 6px; overflow: visible;
  background: var(--rule); }
.seat-strip .seg { display: flex; align-items: center; justify-content: center; overflow: hidden; white-space: nowrap;
  background: var(--violet); color: #fff; font: 500 .72rem var(--mono); border-right: 2px solid var(--surface); min-width: 2px; }
.seat-strip .seg:first-child { border-radius: 6px 0 0 6px; }
.seat-strip .seg:nth-child(even) { background: var(--violet-ink); }
.seat-strip .seg-quiet, .seat-strip .seg-quiet:nth-child(even) { background: var(--rule-strong); color: var(--ink); }
.seat-strip .majority { position: absolute; top: -6px; bottom: -6px; width: 0; border-left: 2px dashed var(--ink); }
.seat-strip .majority span { position: absolute; top: 100%; left: 4px; margin-top: 2px; white-space: nowrap;
  font: 500 .68rem var(--mono); color: var(--muted); }
table.bars th[scope="row"] { font: 500 .92rem var(--sans, inherit); text-transform: none; letter-spacing: 0; color: var(--ink);
  padding: 8px 12px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
table.bars td.bar-cell { width: 40%; white-space: nowrap; }
table.bars .bar { display: inline-block; vertical-align: middle; height: 14px; border-radius: 3px; background: var(--violet);
  margin-right: 8px; min-width: 2px; max-width: calc(100% - 4.5em); }
table.bars .bar-quiet { background: var(--rule-strong); }
table.bars .bar-thin { height: 8px; background: var(--violet-tint); box-shadow: inset 0 0 0 1px var(--violet); }
table.bars .change .up { color: var(--ok); }
table.bars .change .down { color: var(--err); }
@media (max-width: 640px) {
  table.bars { table-layout: fixed; }
  table.bars th[scope="row"] { white-space: normal; width: 26%; padding-inline: 8px; }
  table.bars th[scope="row"] .small { display: none; }
  table.bars td { padding-inline: 6px; }
  table.bars td.bar-cell { width: auto; }
  table.bars .bar { max-width: calc(100% - 2.8em); margin-right: 4px; }
  table.bars thead th { font-size: .62rem; letter-spacing: .03em; white-space: normal; padding-inline: 6px; }
  table.bars thead th:nth-child(3) { width: 16%; }
}

/* --- Accounts, pricing and research tools (spec v2) -------------------------------------- */
.btn-small { padding: 6px 11px; font-size: .84rem; }
.get-started { white-space: nowrap; }
@media (max-width: 1100px) { .get-started { display: none; } }
.btn-google { justify-content: center; width: 100%; background: var(--surface); }
.or { display: flex; align-items: center; gap: 10px; margin: 0; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--rule); }
.notice { background: var(--warn-tint); border-color: transparent; }
.linkish { background: none; border: 0; padding: 0; color: var(--violet-ink); cursor: pointer; font: inherit; text-decoration: underline;
  text-underline-offset: 2px; }
.linkish.danger { color: var(--err); }
.tag { display: inline-block; font: 500 .7rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 4px 7px;
  border-radius: 999px; background: var(--violet-tint); color: var(--violet-ink); }
.chip { display: inline-block; padding: 2px 9px; margin: 2px 4px 2px 0; border-radius: 999px; background: var(--paper);
  border: 1px solid var(--rule); font-size: .82rem; }
.lock { font: 600 .62rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 3px 6px; border-radius: 4px;
  background: var(--ink); color: var(--surface); vertical-align: middle; }
.tool-link { font-size: .88rem; }
.tool-link.locked { color: var(--muted); }
.tools-row { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin: 4px 0 18px; }

.paywall { background: linear-gradient(135deg, var(--violet-tint), var(--surface)); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 24px; margin: 8px 0 22px; display: grid; gap: 10px; max-width: 760px; }
.paywall h2 { margin: 0; }
.research-form { margin-top: 4px; }
.research-form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 16px; min-width: 0; }
.research-form fieldset[disabled] { opacity: .55; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px 14px; }
.research-form:has(input[name="mode"][value="people"]:checked) .only-contests { display: none; }
.research-form:has(input[name="mode"][value="contests"]:checked) .only-people { display: none; }
.seg { display: inline-flex; border: 1px solid var(--rule-strong); border-radius: 999px; padding: 3px; gap: 2px; background: var(--surface); }
.seg a, .seg label { padding: 6px 13px; border-radius: 999px; text-decoration: none; color: var(--muted); font-size: .88rem; cursor: pointer; }
.seg a[aria-current="true"], .seg label:has(input:checked) { background: var(--violet-tint); color: var(--violet-ink); font-weight: 500; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.research-table td { white-space: nowrap; }
.research-table td:nth-child(2), .research-table td:nth-child(3) { white-space: normal; min-width: 140px; }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.tool-card { display: grid; gap: 10px; align-content: start; }
.tool-card h2 { font-size: 1.1rem; margin: 0; }
.tool-card.locked { background: var(--paper); }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 8px; }
.dash-grid h2 { font-size: 1.05rem; margin: 0; }
.usage { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.meter { display: block; height: 6px; border-radius: 3px; background: var(--rule); overflow: hidden; margin-top: 5px; }
.meter span { display: block; height: 100%; max-width: 100%; background: var(--violet); }
dl.kv dd.num { text-align: right; }

.pricing-hero { padding: 18px 0 8px; display: grid; gap: 12px; max-width: 760px; }
.pricing-hero h1 { margin: 0; }
.toggles { gap: 12px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 20px 0 8px; }
.plan-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px; display: grid;
  gap: 10px; align-content: start; grid-template-rows: auto auto auto 1fr auto; }
.plan-card.featured { border-color: var(--violet); box-shadow: 0 0 0 1px var(--violet); }
.plan-card.current { background: var(--violet-tint); }
.plan-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.plan-head h3 { margin: 0; font-size: 1.2rem; }
.plan-price { margin: 4px 0; } .plan-price .amount { font: 600 1.8rem/1.1 var(--display, inherit); } .plan-price .per { color: var(--muted); }
.plan-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: .9rem; align-content: start; }
.plan-features li.plus { padding-left: 0; color: var(--muted); }
.plan-features li.plus::before { content: none; }
.plan-features li { padding-left: 20px; position: relative; }
.plan-features li::before { content: "✓"; position: absolute; left: 0; color: var(--violet); font-weight: 600; }
.plan-features li.hl, .compare-table tr.hl { background: var(--warn-tint); }
.plan-cta { display: grid; gap: 6px; justify-items: start; margin-top: 6px; }
.api-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.compare-table th[scope="row"] { font: 500 .9rem var(--body); text-transform: none; letter-spacing: 0; color: var(--ink); }
.faq { border-top: 1px solid var(--rule); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 500; }
.faq p { margin: 8px 0 0; color: var(--muted); font-size: .93rem; }
.cta-band { margin: 40px 0 10px; padding: 28px; border-radius: var(--radius); background: var(--violet-tint); display: grid; gap: 10px; }
.cta-band h2, .cta-band p { margin: 0; }
.compare-people th, .compare-people td { min-width: 180px; }
.invoice { max-width: 820px; }
@media print {
  .site-header, .site-footer, .data-note, .bottom-nav, .no-print, .messages { display: none !important; }
  .invoice { border: 0; }
}
