/* tavsdeputats.lv — "Vēlēšanu zīme": the Latvian ballot paper.
   Strict printed grid (black rules, numbered rows, boxes) + hand-made pen marks (the "+" and the strike-through). */
:root {
  --bg: #FFFFFF;
  --bg-2: #FAFAF8;
  --ink: #0A0A0A;
  --grey: #45453F;          /* secondary text only — dark enough for long reading */
  --grey-2: #6E6E68;
  --line: #E4E3DF;          /* light rules between rows */
  --carmine: #9E3039;
  --carmine-dark: #7C2129;
  --carmine-tint: #F7E8EA;
  --track: #ECEBE7;
  --display: "Archivo", "Arial Narrow", sans-serif;
  --body: "Source Sans 3", "Segoe UI", sans-serif;
  --gutter: 16px;
  --rule: 3px solid var(--ink);
}
@media (min-width: 768px) { :root { --gutter: 32px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: clip; background: var(--bg); color: var(--ink); font: 17px/1.5 var(--body); -webkit-font-smoothing: antialiased; font-variant-numeric: lining-nums; }
a { color: var(--carmine); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--carmine-dark); }
:focus-visible { outline: 3px solid var(--carmine); outline-offset: 2px; }
h1, h2, h3 { margin: 0; }
[x-cloak] { display: none !important; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Type */
.display, .serif { font-family: var(--display); font-stretch: 72%; font-weight: 850; letter-spacing: -.015em; line-height: .98; }
.num-d { font-family: var(--display); font-stretch: 72%; font-weight: 800; letter-spacing: -.01em; word-spacing: .06em; white-space: nowrap; font-variant-numeric: lining-nums proportional-nums; }
.mono, .num { font-family: var(--body); font-variant-numeric: lining-nums tabular-nums; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.micro { font-size: 14px; line-height: 1.4; color: var(--grey); }
.micro a { color: inherit; }
.micro a:hover { color: var(--carmine); }
.muted { color: var(--grey); }
.faint { color: var(--grey-2); }
.small { font-size: 14px; }
.r { text-align: right; }
.section-title { font-family: var(--display); font-stretch: 72%; font-weight: 850; font-size: 34px; line-height: 1; letter-spacing: -.01em; }
@media (min-width: 900px) { .section-title { font-size: 44px; } }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.source { margin-top: 12px; font-size: 13.5px; color: var(--grey); }
.source a { color: var(--grey); }
.source a:hover { color: var(--carmine); }

/* ---------- Pen marks ---------- */
.mark { display: inline-block; vertical-align: middle; overflow: visible; }
.mark path { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.mark-plus { width: 1em; height: 1em; color: var(--carmine); }
.mark-plus path { stroke-width: 3.2; }
.draw path { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; transition: stroke-dashoffset .28s ease-out, opacity 0s; }
.draw path + path { transition-delay: .14s; }
.strike-line { position: absolute; left: -4%; top: 30%; width: 108%; height: .6em; color: var(--carmine); pointer-events: none; }
.strike-line path { stroke-width: 2.6; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; transition: stroke-dashoffset .25s ease-out; }
.divider { display: block; width: 100%; height: 18px; color: var(--ink); margin: 0; }
.divider path { stroke-width: 2.4; }
@keyframes pen { 0% { stroke-dashoffset: 1; } 45%, 70% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -1; } }
.loader { display: none; width: 24px; height: 24px; color: var(--carmine); }
.loader path { stroke-dasharray: 1; animation: pen 1s ease-in-out infinite; }
.loader path + path { animation-delay: .2s; }
.htmx-request .loader, .htmx-request.loader { display: inline-block; }

/* ---------- Header ---------- */
.site-head { background: var(--bg); border-bottom: var(--rule); }
.mast { display: flex; align-items: center; gap: 10px 36px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 10px; }
.logo { display: inline-flex; align-items: flex-start; font-family: var(--display); font-stretch: 72%; font-weight: 900; font-size: 30px; line-height: 1; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.logo:hover { color: var(--ink); }
.logo .mark-plus { width: .7em; height: .7em; margin-left: 1px; margin-top: -2px; }
.nav { display: flex; gap: 20px; order: 3; width: 100%; overflow-x: auto; font-weight: 600; font-size: 16px; }
.nav a { position: relative; color: var(--ink); text-decoration: none; padding: 6px 0; white-space: nowrap; }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: -2px; right: -2px; bottom: 0; height: 4px; background: var(--carmine); }
.nav a:hover { color: var(--carmine); }
.mast-search { margin-left: auto; flex: 1 1 200px; max-width: 340px; display: none; }
@media (min-width: 900px) {
  .logo { font-size: 38px; }
  .mast { padding-top: 16px; padding-bottom: 14px; }
  .nav { order: 0; width: auto; gap: 28px; font-size: 17px; }
  .mast-search { display: flex; }
}

.input, select.input { width: 100%; height: 44px; font: inherit; font-size: 16px; padding: 0 12px; background: #fff; border: 2px solid var(--ink); border-radius: 0; color: var(--ink); }
.input:focus { outline: none; box-shadow: 0 0 0 3px var(--carmine-tint); border-color: var(--carmine); }
.input-lg { height: 52px; font-size: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; background: var(--ink); color: #fff; border: 2px solid var(--ink); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--carmine); border-color: var(--carmine); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--carmine); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

main { padding-top: 26px; padding-bottom: 8px; }
main.flush { padding-top: 0; }
.crumbs { margin-bottom: 14px; }
.ruled-top { border-top: var(--rule); }

/* ---------- Home: carmine band ---------- */
.band { background: var(--carmine); color: #fff; }
.band-inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px 48px; padding-top: 30px; padding-bottom: 30px; }
.band h1 { font-size: clamp(46px, 9vw, 112px); line-height: .9; }
.band p { margin: 18px 0 0; font-size: 18px; max-width: 46ch; color: #F6E3E5; }
.band a { color: #fff; }
.big-count { align-self: end; }
.big-count .n { display: flex; align-items: flex-start; font-size: clamp(110px, 22vw, 260px); line-height: .82; letter-spacing: -.03em; }
.big-count .n .mark-plus { width: .42em; height: .42em; color: #fff; margin: .02em 0 0 .06em; flex: none; }
.big-count .lbl { font-family: var(--display); font-stretch: 72%; font-weight: 800; font-size: clamp(26px, 3vw, 40px); line-height: 1; margin-top: 10px; }
.band .source { color: #F2D3D7; margin-top: 16px; }
.band .source a { color: #fff; }
@media (min-width: 1000px) { .band-inner { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); padding-top: 48px; padding-bottom: 44px; } }

.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-top: 26px; padding-bottom: 26px; }
.trio .n { font-size: clamp(40px, 8vw, 96px); line-height: .9; color: var(--carmine); }
.trio .lbl { font-weight: 700; font-size: 15px; margin-top: 8px; line-height: 1.25; }
.trio .sub { font-size: 14px; color: var(--grey); margin-top: 2px; }
@media (min-width: 768px) { .trio { gap: 40px; padding-top: 36px; padding-bottom: 36px; } .trio .lbl { font-size: 18px; } }

/* Face mosaic */
.mosaic-wrap { padding-top: 28px; }
.mosaic { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 3px; margin-top: 14px; }
@media (max-width: 699px) { .face:nth-child(n+49) { display: none; } }
@media (min-width: 700px) { .mosaic { grid-template-columns: repeat(12, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .mosaic { grid-template-columns: repeat(18, minmax(0, 1fr)); } }
.face { position: relative; aspect-ratio: 1; display: grid; place-items: center; text-decoration: none; font-family: var(--display); font-stretch: 72%; font-weight: 850; font-size: clamp(15px, 2vw, 24px); letter-spacing: -.01em; overflow: hidden; }

.face .mark-plus { position: absolute; right: 4px; top: 4px; width: 38%; height: 38%; color: currentColor; }
.face:hover .draw path, .face:focus-visible .draw path { stroke-dashoffset: 0; opacity: 1; }
.face:hover { outline: 3px solid var(--ink); outline-offset: -3px; z-index: 1; }

/* Ballot rows (party lists) */
.ballot { border-top: var(--rule); }
.ballot-row { position: relative; display: grid; grid-template-columns: 34px 48px minmax(0, 1fr); gap: 4px 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.ballot-row:last-child { border-bottom: var(--rule); }
.ballot-row:hover { background: var(--bg-2); color: var(--ink); }
.ballot-row .box { width: 30px; height: 30px; border: 2px solid var(--ink); display: grid; place-items: center; }
.ballot-row .box .mark-plus { width: 26px; height: 26px; }
.ballot-row:hover .draw path, .ballot-row:focus-visible .draw path { stroke-dashoffset: 0; opacity: 1; }
.ballot-nr { font-size: 40px; line-height: .9; text-align: right; }
.ballot-name { display: flex; align-items: stretch; gap: 12px; min-width: 0; }
.ballot-name .bar { flex: none; width: 8px; }
.ballot-name strong { font-size: 18px; line-height: 1.25; padding: 2px 0; }
.ballot-stats { grid-column: 3 / -1; display: flex; flex-wrap: wrap; gap: 2px 14px; padding-left: 20px; font-size: 15px; color: var(--grey); }
@media (max-width: 899px) { .ballot-stats .wbar .t { display: none; } }
.ballot-stats b { color: var(--ink); font-weight: 700; }
.wbar { display: inline-flex; align-items: center; gap: 8px; }
.wbar .t { position: relative; display: inline-block; width: 84px; height: 8px; background: var(--track); }
.wbar .t i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); }
.wbar .t .half { position: absolute; left: 50%; top: -4px; bottom: -4px; width: 2px; background: var(--carmine); }
.ballot-head { display: none; grid-template-columns: 40px 64px minmax(0, 1fr) 110px 190px 96px; gap: 14px; padding: 0 0 8px; font-size: 14px; color: var(--grey); }
.ballot-head span:nth-child(n+4) { text-align: right; }
@media (min-width: 900px) {
  .ballot-row { grid-template-columns: 40px 64px minmax(0, 1fr) 110px 190px 96px; padding: 16px 0; }
  .ballot-nr { font-size: 52px; }
  .ballot-name strong { font-size: 20px; }
  .ballot-stats { display: contents; }
  .ballot-stats > span { text-align: right; font-size: 17px; color: var(--ink); }
  .ballot-stats .lbl-sm { display: none; }
  .ballot-head { display: grid; }
}

/* Map */
.map-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px 48px; align-items: center; }
@media (min-width: 1000px) { .map-grid { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); } }
.map { width: 100%; height: auto; display: block; }
.map a path { stroke: #fff; stroke-width: 2.5; transition: fill .15s; }
.map a:hover path, .map a:focus-visible path { stroke: var(--ink); stroke-width: 4; }
.map a:focus-visible { outline: none; }
.map text { font-family: var(--display); font-stretch: 72%; pointer-events: none; }
.map .lbl { font-weight: 850; font-size: 34px; }
.map .cnt { font-weight: 700; font-size: 26px; }
@media (max-width: 699px) { .map .lbl { font-size: 46px; } .map .cnt { font-size: 38px; } }
.dlist a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.dlist a:first-child { border-top: var(--rule); }
.dlist a:hover strong { text-decoration: underline; text-decoration-color: var(--carmine); text-decoration-thickness: 3px; }
.dlist strong { font-size: 19px; }
.dlist .n { font-size: 30px; }
.dlist .t { grid-column: 1 / -1; height: 6px; background: var(--track); }
.dlist .t i { display: block; height: 100%; background: var(--carmine); }

.swatch { display: inline-block; flex: none; width: 12px; height: 12px; }
.swatch.lg { width: 16px; height: 16px; }
.pcell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ptag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; font-weight: 700; font-size: 15px; text-decoration: none; }
.ptag:hover { filter: brightness(.92); }

/* Monogram */
.mono-tile { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; font-family: var(--display); font-stretch: 72%; font-weight: 850; font-size: 18px; letter-spacing: -.01em; }
.mono-tile.xl { width: 104px; height: 104px; font-size: 44px; }
@media (min-width: 900px) { .mono-tile.xl { width: 148px; height: 148px; font-size: 60px; } }

/* ---------- Page header (list / candidate) ---------- */
.phead { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px 20px; align-items: start; border-left: 12px solid var(--pc, var(--ink)); padding-left: 16px; }
.phead-nr { font-family: var(--display); font-stretch: 72%; font-weight: 850; font-size: 64px; line-height: .85; }
.phead h1 { font-family: var(--display); font-stretch: 72%; font-weight: 850; font-size: 40px; line-height: .95; letter-spacing: -.015em; }
.phead p { margin: 10px 0 0; color: var(--grey); }
.phead p b { color: var(--ink); }
@media (min-width: 900px) { .phead-nr { font-size: 104px; } .phead h1 { font-size: 72px; } .phead { border-left-width: 16px; padding-left: 24px; } }

.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 22px; }
.chip { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 2px solid var(--ink); color: var(--ink); text-decoration: none; font-size: 16px; font-weight: 600; background: #fff; font-family: inherit; cursor: pointer; }
.chip small { font-size: 14px; color: var(--grey); font-weight: 400; }
.chip:hover { background: var(--bg-2); color: var(--ink); }
.chip[aria-current="true"], .chip.on { background: var(--ink); color: #fff; }
.chip[aria-current="true"] small, .chip.on small { color: #D6D6D2; }
.chip[aria-current="true"]::before, .chip.on::before { content: "+"; font-family: var(--display); font-weight: 900; color: #FF8C96; margin-right: 2px; }
.chip.remove { padding-right: 8px; }
.chip.remove .label { position: relative; }
.chip.remove:hover .strike-line path, .chip.remove:focus-visible .strike-line path { stroke-dashoffset: 0; opacity: 1; }
.chip.remove svg.x { flex: none; }

.tabs { display: flex; gap: 28px; border-bottom: var(--rule); margin-top: 26px; overflow-x: auto; }
.tabs a { position: relative; padding: 12px 0 10px; font-family: var(--display); font-stretch: 72%; font-weight: 800; font-size: 24px; color: var(--grey); text-decoration: none; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-selected="true"] { color: var(--ink); }
.tabs a[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--carmine); }
.panel { padding-top: 20px; }
.htmx-request .panel, .htmx-request#results { opacity: .5; transition: opacity .15s; }

/* ---------- Ruled data table ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; }
table.data th { padding: 10px 10px 8px; border-bottom: var(--rule); text-align: left; white-space: nowrap; vertical-align: bottom; font-size: 14px; font-weight: 700; color: var(--ink); }
table.data th.r { text-align: right; }
table.data th .micro { font-size: 14px; color: var(--ink); font-weight: 700; }
table.data td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 16px; }
table.data th:first-child, table.data td:first-child { padding-left: 0; }
table.data th:last-child, table.data td:last-child { padding-right: 0; }
table.data tbody tr:hover { background: var(--bg-2); }
table.data td.num { white-space: nowrap; text-align: right; }
table.data .lead-num { font-family: var(--display); font-stretch: 72%; font-weight: 800; font-size: 22px; color: var(--ink); text-align: left; line-height: 1; }
table.data tr.prow td:first-child { border-left: 6px solid var(--pc, var(--ink)); padding-left: 10px; }
.th-sort { color: var(--ink); text-decoration: none; display: inline-flex; gap: 4px; }
.th-sort:hover, .th-sort.active { color: var(--carmine); }
.cand { color: var(--ink); font-weight: 700; text-decoration: none; }
.cand:hover { color: var(--carmine); text-decoration: underline; }
.occ { color: var(--grey); min-width: 220px; }
.empty-row { text-align: center; color: var(--grey); padding: 36px 0 !important; }
.tag { font-size: 12px; font-weight: 700; letter-spacing: .04em; border: 2px solid var(--ink); padding: 0 4px; margin-left: 8px; vertical-align: 2px; color: var(--ink); }

@media (max-width: 699px) {
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { padding: 12px 0 12px 12px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1fr); gap: 2px 8px; }
  table.stack tr.prow { border-left: 6px solid var(--pc, var(--ink)); }
  table.stack tr.prow td:first-child { border-left: 0; }
  table.stack tbody tr:hover { background: none; }
  table.stack td { border: 0; padding: 0 !important; text-align: left !important; }
  table.stack td.s-meta, table.stack td.s-name, table.stack td.s-occ { grid-column: 1 / -1; }
  table.stack td.s-occ { order: 1; }
  table.stack td[data-label] { order: 2; }
  table.stack td.s-meta { font-size: 14px; color: var(--grey); }
  table.stack td.s-name { font-size: 19px; }
  table.stack td.s-occ { font-size: 15px; color: var(--grey); margin-bottom: 6px; min-width: 0 !important; }
  table.stack td[data-label]::before { content: attr(data-label); display: block; font-size: 13px; color: var(--grey); }
  table.stack .hide-sm { display: none; }
}
@media (min-width: 700px) { table.stack .show-sm { display: none; } }
.list-bar { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; font-size: 16px; }
.list-bar .count { font-family: var(--display); font-stretch: 72%; font-weight: 850; font-size: 30px; line-height: 1; }

/* Stat figures (inner pages) */
.figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; border-top: var(--rule); padding-top: 16px; }
.fig .micro { color: var(--ink); font-weight: 700; font-size: 15px; }
.fig-n { font-family: var(--display); font-stretch: 72%; font-weight: 850; white-space: nowrap; font-size: 40px; line-height: .95; margin-top: 4px; letter-spacing: -.01em; }
.fig-n.sm { font-size: 34px; }
.fig-sub { font-size: 14px; color: var(--grey); margin-top: 4px; }
@media (min-width: 900px) { .figs { grid-template-columns: repeat(4, minmax(0, 1fr)); } .fig-n { font-size: 60px; } .fig-n.sm { font-size: 46px; } }

/* Small multiples */
.charts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; margin-top: 30px; }
@media (min-width: 700px) { .charts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; } }
@media (min-width: 1100px) { .charts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.chart { margin: 0; }
.chart figcaption { font-family: var(--display); font-stretch: 72%; font-weight: 850; font-size: 26px; padding-bottom: 6px; border-bottom: var(--rule); margin-bottom: 10px; }
.chart .micro { font-size: 13px; }
.hrow { display: grid; grid-template-columns: 116px minmax(0, 1fr) 92px; gap: 10px; align-items: center; padding: 5px 0; font-size: 15px; }
.hrow .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hrow .trk { height: 12px; background: var(--track); }
.hrow .trk i { display: block; height: 100%; background: var(--ink); }
.hrow .val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.hrow .val small { color: var(--grey); font-weight: 400; font-size: 13px; }
.hist { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; align-items: end; height: 140px; border-bottom: var(--rule); }
.hist div { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.hist span { font-weight: 700; font-size: 14px; margin-bottom: 3px; }
.hist i { display: block; width: 100%; background: var(--carmine); }
.hist-x { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; margin-top: 4px; font-size: 13px; text-align: center; color: var(--grey); }

.ranks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; margin-top: 40px; }
@media (min-width: 700px) { .ranks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; } }
@media (min-width: 1100px) { .ranks.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ranks h3 { font-family: var(--display); font-stretch: 72%; font-weight: 850; font-size: 26px; padding-bottom: 6px; border-bottom: var(--rule); }
.ranks ol { margin: 0; padding: 0; list-style: none; }
.ranks li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 16px; align-items: baseline; }
.ranks li > span:first-child { font-family: var(--display); font-stretch: 72%; font-weight: 800; font-size: 20px; color: var(--carmine); }
.ranks li .mono { white-space: nowrap; font-weight: 700; }

.reading { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 16px; }
@media (min-width: 900px) { .reading { grid-template-columns: 220px minmax(0, 68ch); gap: 56px; } }
.prog { font-size: 19px; line-height: 1.6; }
.prog p { margin: 0 0 1em; }
.prog .sc { font-family: var(--display); font-stretch: 72%; font-weight: 850; font-size: 1.15em; text-transform: uppercase; color: var(--carmine); }

/* ---------- Candidate profile ---------- */
.prevnext { display: flex; gap: 20px; font-size: 15px; flex-wrap: wrap; }
.prevnext .off { color: var(--grey-2); }
.cand-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px 24px; align-items: end; padding: 24px 0; border-bottom: var(--rule); }
.cand-head h1 { font-family: var(--display); font-stretch: 72%; font-weight: 850; font-size: 46px; line-height: .92; letter-spacing: -.02em; }
.cand-meta { grid-column: 1 / -1; display: flex; gap: 8px 20px; flex-wrap: wrap; align-items: center; font-size: 16px; color: var(--grey); }
.cand-meta .cvk { margin-left: auto; font-weight: 600; }
.cand-pos { font-weight: 700; color: var(--carmine); font-size: 16px; margin-bottom: 6px; }
@media (min-width: 900px) { .cand-head { padding: 32px 0; } .cand-head h1 { font-size: 92px; } .cand-meta { grid-column: 2; } }

.notice { border: 3px solid var(--ink); background: #fff; padding: 16px 20px; margin-top: 22px; max-width: 860px; }
.notice p { margin: 6px 0 0; font-size: 19px; line-height: 1.45; font-weight: 600; }

.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 28px; }
@media (min-width: 1000px) { .profile-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; } }
.profile-grid h2 { font-family: var(--display); font-stretch: 72%; font-weight: 850; font-size: 28px; margin-bottom: 8px !important; color: var(--ink) !important; }
dl.facts { margin: 0; border-top: var(--rule); }
dl.facts > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
dl.facts dt { font-size: 15px; color: var(--grey); }
dl.facts dd { margin: 0; font-weight: 600; }
dl.facts dd.none { color: var(--grey-2); font-weight: 400; }
.totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; border-top: var(--rule); padding-top: 14px; }
.totals .micro { color: var(--ink); font-weight: 700; font-size: 15px; }
.totals .fig-n { font-size: 38px; }
@media (min-width: 700px) { .totals { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .totals .fig-n { font-size: 48px; } }

.details { margin-top: 44px; border-top: var(--rule); }
.details-tools { display: flex; justify-content: flex-end; padding-top: 8px; font-size: 15px; }
.sec { border-bottom: 1px solid var(--line); }
.sec-btn { width: 100%; background: none; border: 0; padding: 16px 0 12px; font: inherit; color: var(--ink); cursor: pointer; display: flex; align-items: center; gap: 14px; text-align: left; }
.sec-btn .t { font-family: var(--display); font-stretch: 72%; font-weight: 850; font-size: 28px; line-height: 1; }
.sec-btn .micro { font-size: 15px; }
.sec-btn .pm { margin-left: auto; width: 26px; height: 26px; color: var(--carmine); flex: none; }
.sec-btn .pm .v { transition: opacity .15s; }
.sec-btn[aria-expanded="true"] .pm .v { opacity: 0; }
.sec-btn:hover .t { color: var(--carmine); }
.sec-body { padding-bottom: 20px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px 40px; }
@media (min-width: 900px) { .sec-btn .t { font-size: 34px; } .sec-body.split { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sub { font-weight: 700; font-size: 16px; margin: 10px 0 2px; }
.sec table.data th { padding-left: 0; border-bottom-width: 2px; }
.sec table.data td { padding-left: 0; }
.nothing { font-size: 16px; color: var(--grey-2); padding: 12px 0; border-bottom: 1px solid var(--line); }

.declaration { margin-top: 36px; max-width: 860px; }
.declaration h2 { font-family: var(--display); font-stretch: 72%; font-weight: 850; font-size: 26px; margin-bottom: 8px !important; color: var(--ink) !important; }
.declaration p.serif { font-family: var(--body); font-stretch: normal; font-weight: 400; letter-spacing: 0; margin: 0; font-size: 18px; line-height: 1.55; }
.pager-line { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 44px; padding: 16px 0; border-top: var(--rule); border-bottom: var(--rule); font-size: 16px; font-weight: 600; }

/* ---------- All candidates: sidebar / bottom sheet ---------- */
.search-sticky { position: sticky; top: 0; z-index: 20; background: #fff; padding: 14px 0 12px; border-bottom: var(--rule); }
.search-row { display: flex; gap: 10px; align-items: center; }
.list-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 18px; }
@media (min-width: 1000px) { .list-layout { grid-template-columns: 270px minmax(0, 1fr); gap: 40px; } }
.filters { display: none; }
.filters-btn { display: inline-flex; }
@media (min-width: 1000px) {
  .filters { display: block; position: sticky; top: 150px; align-self: start; max-height: calc(100vh - 166px); overflow-y: auto; }
  .filters-btn { display: none; }
}
.fgroup { border: 0; padding: 0; margin: 0 0 18px; }
.fgroup legend, .flabel { display: block; font-weight: 700; font-size: 15px; margin-bottom: 6px; padding: 0; }
.seg { display: flex; padding-left: 2px; }
.seg label { flex: 1 1 0; margin-left: -2px; }
.seg input, .dchips input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: flex; align-items: center; justify-content: center; text-align: center; line-height: 1.2; min-height: 44px; border: 2px solid var(--ink); background: #fff; font-size: 15px; font-weight: 600; cursor: pointer; padding: 0 6px; }
.seg input:checked + span, .dchips input:checked + span { background: var(--ink); color: #fff; position: relative; }
.seg input:checked + span::before, .dchips input:checked + span::before { content: "+"; font-family: var(--display); font-weight: 900; color: #FF8C96; margin-right: 4px; }
.seg input:focus-visible + span, .dchips input:focus-visible + span { outline: 3px solid var(--carmine); outline-offset: 2px; }
.dchips { display: flex; flex-wrap: wrap; gap: 6px; }
.dchips span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border: 2px solid var(--ink); background: #fff; font-size: 15px; font-weight: 600; cursor: pointer; }
.age { display: flex; gap: 8px; align-items: center; }
.age .input { min-width: 0; }
.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
@media (min-width: 1000px) { .checks { grid-template-columns: minmax(0, 1fr); } }
.check { display: flex; align-items: center; gap: 10px; font-size: 16px; min-height: 40px; cursor: pointer; }
.check input { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; border: 2px solid var(--ink); margin: 0; display: grid; place-items: center; background: #fff; cursor: pointer; flex: none; }
.check input::after { content: "+"; font-family: var(--display); font-weight: 900; font-size: 22px; line-height: 1; color: var(--carmine); transform: scale(0); transition: transform .12s; margin-top: -2px; }
.check input:checked::after { transform: scale(1); }

.sheet-scrim { position: fixed; inset: 0; background: rgba(10, 10, 10, .5); z-index: 40; }
.sheet-handle { width: 40px; height: 4px; background: var(--ink); margin: 8px auto 0; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 4px var(--gutter) 8px; border-bottom: var(--rule); }
.sheet-body { flex: 1; overflow-y: auto; padding: 14px var(--gutter) 0; }
.sheet-foot { padding: 10px var(--gutter) 16px; border-top: var(--rule); }
.iconbtn { width: 44px; height: 44px; background: none; border: 0; cursor: pointer; display: grid; place-items: center; }
.sheet-only { display: none; }
@media (max-width: 999px) {
  .filters.is-sheet { display: flex; flex-direction: column; position: fixed; left: 0; right: 0; bottom: 0; max-height: 86vh; z-index: 50; background: #fff; border-top: var(--rule); }
  .filters.is-sheet .sheet-only { display: flex; }
  .filters.is-sheet .sheet-handle { display: block; }
}
@media (min-width: 1000px) { .sheet-scrim { display: none !important; } .filters .sheet-body { padding: 0; } }

.pagination { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 24px; }
.pagination a, .pagination span { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 8px; border: 2px solid transparent; color: var(--ink); text-decoration: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.pagination a:hover { border-color: var(--ink); }
.pagination [aria-current="page"] { background: var(--ink); color: #fff; }
.pagination .step { color: var(--carmine); }
.pagination .gap { color: var(--grey); }

.cbar { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.cbar .trk { flex: 1; min-width: 60px; max-width: 160px; height: 10px; background: var(--track); position: relative; }
.cbar .trk i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--carmine); }
td.sorted { background: var(--carmine-tint); font-weight: 700; }

/* ---------- Footer ---------- */
.footer { margin-top: 72px; background: var(--ink); color: #EDEDEA; }
.footer-inner { padding-top: 34px; padding-bottom: 34px; }
.footer .logo { color: #fff; font-size: 34px; }
.footer-cols { display: grid; gap: 22px; font-size: 15px; margin-top: 18px; }
.footer-cols p { margin: 6px 0 0; color: #C9C9C4; }
.footer-cols strong { color: #fff; }
.footer a { color: #fff; }
.footer a:hover { color: #FFB3BA; }
@media (min-width: 800px) { .footer-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; } }
.footer .source-line { margin-top: 26px; padding-top: 14px; border-top: 1px solid #3A3A38; font-size: 13.5px; color: #B5B5AF; }
.footer .source-line a { color: #fff; }

/* ---------- Section bar (one election = one section) ---------- */
.section-bar { background: var(--ink); color: #fff; }
.section-bar-inner { display: flex; align-items: center; gap: 6px 28px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.section-name { font-family: var(--display); font-stretch: 72%; font-weight: 850; font-size: 20px; color: #fff; text-decoration: none; white-space: nowrap; }
.section-name span { color: #FF8C96; }
.section-name:hover { color: #fff; }
.section-tabs { display: flex; gap: 20px; overflow-x: auto; font-weight: 600; font-size: 15px; }
.section-tabs a { position: relative; color: #D6D6D2; text-decoration: none; padding: 6px 0; white-space: nowrap; }
.section-tabs a:hover { color: #fff; }
.section-tabs a[aria-current="page"] { color: #fff; }
.section-tabs a[aria-current="page"]::before { content: "+"; font-family: var(--display); font-weight: 900; color: #FF8C96; margin-right: 4px; }
@media (min-width: 900px) { .section-tabs { margin-left: auto; gap: 28px; font-size: 16px; } }

/* ---------- Results ---------- */
.band-ink { background: var(--ink); }
.band-ink p { color: #D9D9D5; }
.band-ink strong { color: #fff; }
.status-pill { display: inline-block; border: 2px solid #FF8C96; color: #FFB3BA; font-weight: 700; font-size: 14px; padding: 2px 10px; margin-bottom: 16px; }
.band-figs { display: flex; gap: 14px 34px; flex-wrap: wrap; margin-top: 22px; color: #D9D9D5; font-size: 15px; }
.band-figs .num-d { display: block; font-size: clamp(34px, 5vw, 56px); line-height: 1; color: #fff; }
.arc-wrap { position: relative; align-self: center; }
.arc { width: 100%; height: auto; display: block; }
.arc-mid { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; color: #D9D9D5; font-size: 14px; }
.arc-mid .num-d { display: block; font-size: clamp(34px, 4.6vw, 60px); line-height: .9; color: #fff; }

.seat-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; border-top: var(--rule); margin-top: 26px; }
.seat-legend a { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 0 12px 12px; border-left: 8px solid var(--pc); border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; margin-top: 8px; }
.seat-legend a:hover strong { text-decoration: underline; text-decoration-color: var(--carmine); }
.seat-legend .num-d { font-size: 44px; line-height: .9; min-width: 1.2em; }
.seat-legend strong { font-size: 15px; line-height: 1.25; }
@media (min-width: 900px) { .seat-legend { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; } .seat-legend .num-d { font-size: 60px; } .seat-legend strong { font-size: 17px; } }

.res-block { padding-top: 56px; }
.res-row { grid-template-columns: 34px 40px minmax(0, 1fr) 64px; }
.res-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.vote-bar { position: relative; height: 14px; background: var(--track); margin-left: 20px; }
.vote-bar i { position: absolute; left: 0; top: 0; bottom: 0; }
.vote-bar .thr { position: absolute; top: -6px; bottom: -6px; width: 3px; background: var(--carmine); border-radius: 2px; transform: rotate(4deg); }
.res-sub { margin-left: 20px; font-size: 14px; color: var(--grey); }
.res-seats { font-size: 40px; line-height: .9; text-align: right; }
.res-seats small { display: block; font-family: var(--body); font-stretch: normal; font-weight: 400; font-size: 13px; color: var(--grey); letter-spacing: 0; }
.res-row.below .res-seats, .res-row.below .ballot-name strong { color: var(--grey); }
.res-row.below .ballot-nr { color: var(--grey-2); }
@media (min-width: 900px) {
  .res-row { grid-template-columns: 40px 64px minmax(0, 1fr) 120px; }
  .res-seats { font-size: 56px; }
}

.seat-matrix td { vertical-align: middle; }
.seat-matrix tfoot td { border-top: var(--rule); border-bottom: 0; padding-top: 10px; }
.seat-dots { display: inline-flex; flex-wrap: wrap; gap: 3px; max-width: 120px; vertical-align: middle; }
.seat-dots i { width: 12px; height: 12px; }
.seat-n { margin-left: 8px; font-weight: 700; color: var(--grey); font-size: 14px; }

.toggle { display: inline-flex; border: 2px solid var(--ink); }
.toggle button { font: inherit; font-weight: 700; font-size: 15px; padding: 8px 14px; border: 0; background: #fff; color: var(--ink); cursor: pointer; min-height: 40px; }
.toggle button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.toggle button[aria-pressed="true"]::before { content: "+ "; color: #FF8C96; font-family: var(--display); font-weight: 900; }
.muni path { stroke: #fff; stroke-width: 1.4; fill: var(--a); transition: fill .2s; }
.muni.turnout path { fill: var(--b); }
.muni path:hover { stroke: var(--ink); stroke-width: 3; }
.legend { list-style: none; margin: 0; padding: 0; border-top: var(--rule); }
.legend li { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.legend b { font-family: var(--display); font-stretch: 72%; font-size: 22px; }
.ramp { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.ramp i { flex: 1; height: 14px; background: linear-gradient(90deg, #F7E3E5, #7C2129); }
.turnout-rows { margin-top: 26px; border-top: var(--rule); }
.trow { display: grid; grid-template-columns: 96px minmax(0, 1fr) 80px; gap: 4px 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.trow .trk { height: 12px; background: var(--track); }
.trow .trk i { display: block; height: 100%; background: var(--carmine); }
.trow .num-d { font-size: 28px; text-align: right; }
.trow .small { grid-column: 2 / -1; }
@media (min-width: 900px) { .trow { grid-template-columns: 120px minmax(0, 1fr) 90px 220px; } .trow .small { grid-column: auto; text-align: right; } }

.elected-group { margin-top: 26px; border-left: 10px solid var(--pc); padding-left: 16px; }
.elected-group h3 { display: flex; align-items: baseline; gap: 12px; font-size: 20px; }
.elected-group h3 .num-d { font-size: 44px; line-height: .9; }
.elected-group h3 a { color: var(--ink); text-decoration: none; }
.elected-group h3 a:hover { color: var(--carmine); }
.people { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px 18px; margin-top: 10px; }
@media (min-width: 640px) { .people { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .people { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .people { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.person { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; min-width: 0; }
.person .mono-tile { width: 40px; height: 40px; font-size: 16px; }
.person strong { display: block; font-size: 16px; line-height: 1.2; }
.person small { display: block; color: var(--grey); font-size: 13px; }
.person:hover strong { color: var(--carmine); }
.struck { position: relative; display: inline-block; }
.struck .strike-line path { opacity: 1; stroke-dashoffset: 0; }
.ranks h3 .mark-plus { width: .8em; height: .8em; }

/* ---------- Portal ---------- */
.portal-arc { display: block; align-self: center; text-decoration: none; color: #fff; background: rgba(255,255,255,.06); padding: 14px 14px 10px; }
.portal-arc .lbl { display: block; text-align: center; font-weight: 700; margin-top: 6px; }
.portal-arc:hover { background: rgba(255,255,255,.12); color: #fff; }
.feature { padding-top: 40px; }
.feature-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.feature-head h2 { font-size: clamp(40px, 6vw, 76px); margin-top: 6px; }
.feature-head p { margin: 8px 0 0; }
.tiles { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 32px; border-top: var(--rule); }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 20px 44px 22px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
@media (min-width: 1100px) { .tile { padding: 22px 36px 26px 20px; border-left: 1px solid var(--line); border-bottom: 0; } .tile:first-child { border-left: 0; padding-left: 0; } }
.tile-k { font-family: var(--display); font-stretch: 72%; font-weight: 850; font-size: 34px; line-height: 1; }
.tile-t { color: var(--grey); font-size: 16px; }
.tile .mark-plus { position: absolute; right: 8px; top: 20px; width: 28px; height: 28px; }
.tile:hover .tile-k { color: var(--carmine); }
.tile:hover .draw path, .tile:focus-visible .draw path { stroke-dashoffset: 0; opacity: 1; }

/* Results on party / candidate pages */
.elected-mark .mark-plus { width: 18px; height: 18px; margin-left: 6px; vertical-align: -2px; }
.party-result { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; margin-top: 22px; padding: 14px 18px; border: 3px solid var(--ink); border-left: 12px solid var(--pc); }
.pr-main { display: flex; align-items: center; gap: 14px; }
.pr-seats { font-size: 64px; line-height: .85; }
.pr-main strong { display: block; font-size: 19px; }
.pr-main .muted { font-size: 15px; }
.pr-districts { display: flex; gap: 6px 18px; flex-wrap: wrap; font-size: 15px; }
.pr-districts b { font-size: 24px; }
.party-result > a { margin-left: auto; font-weight: 700; }

.cand-result { margin-top: 24px; padding: 18px 20px; border: 3px solid var(--ink); }
.cand-result.is-elected { border-color: var(--carmine); }
.cr-verdict { display: flex; align-items: center; gap: 14px; }
.cr-verdict > .mark-plus { width: 56px; height: 56px; flex: none; }
.cr-verdict h2 { font-size: clamp(32px, 4vw, 48px); }
.cr-figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; margin-top: 16px; font-size: 15px; color: var(--grey); }
.cr-figs .num-d { display: block; font-size: 40px; line-height: 1; color: var(--ink); }
.cr-figs .mark-plus { width: 16px; height: 16px; }
@media (min-width: 800px) { .cr-figs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.rivals { list-style: none; margin: 16px 0 0; padding: 0; border-top: var(--rule); max-width: 560px; }
.rivals li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 22px; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.rivals li > span:first-child { font-family: var(--display); font-stretch: 72%; font-weight: 800; font-size: 18px; }
.rivals li a { color: var(--ink); font-weight: 600; text-decoration: none; }
.rivals li a:hover { color: var(--carmine); }
.rivals li.me { background: var(--carmine-tint); }
.rivals li.cut { border-bottom: 3px solid var(--carmine); }
.rivals .mark-plus { width: 18px; height: 18px; }
.home-results { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px 48px; align-items: center; padding: 10px 0 36px; }
@media (min-width: 1000px) { .home-results { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.status-pill.dark { border-color: var(--carmine); color: var(--carmine); }
.seat-legend.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 16px; }
.seat-legend.compact .num-d { font-size: 40px; }
.seat-legend.compact strong { font-size: 15px; }
.home-arc { position: relative; display: block; color: var(--grey); text-decoration: none; }
.home-arc .arc-mid .num-d { color: var(--ink); }
.home-arc .arc-mid { color: var(--grey); }
.portal-sub { font-size: clamp(19px, 2.2vw, 26px); font-weight: 700; color: #fff; margin-top: 14px; line-height: 1.25; max-width: 30ch; }

/* Party logos: always shown next to the written name, never instead of it */
.plogo { display: inline-grid; place-items: center; flex: none; background: #fff; border: 2px solid var(--ink); overflow: hidden; }
.plogo img { max-width: 92%; max-height: 84%; object-fit: contain; display: block; }
.plogo-sm { width: 76px; height: 44px; }
.plogo-md { width: 64px; height: 64px; }
.plogo-lg { width: 112px; height: 112px; border-width: 3px; }
.plogo-none { font-family: var(--display); font-stretch: 72%; font-weight: 850; color: var(--ink); background: repeating-linear-gradient(135deg, #fff 0 6px, var(--bg-2) 6px 12px); border-color: var(--pc); }
.plogo-sm.plogo-none { font-size: 18px; } .plogo-md.plogo-none { font-size: 24px; } .plogo-lg.plogo-none { font-size: 40px; }
@media (min-width: 900px) { .plogo-lg { width: 148px; height: 148px; } }
.ballot-name { align-items: center; }
.ballot-name .bar { align-self: stretch; }
.sl-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.phead { display: flex; flex-wrap: wrap; align-items: center; }
.phead-text { flex: 1 1 320px; min-width: 0; }
.elected-group h3 { align-items: center; }

/* Candidate photos (local LSM cache, only when LSM_PHOTOS is on) over the initials tile */
.mono-tile { position: relative; overflow: hidden; }
.mono-tile img, .face img { position: absolute; inset: auto; top: 0; left: 50%; width: 145%; height: 145%; max-width: none; transform: translateX(-50%); object-fit: cover; object-position: 50% 0; }
.mono-tile.sm { width: 40px; height: 40px; font-size: 15px; }
.mono-tile.has-photo::after, .face:has(img)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--pc); }
.cand-photo { display: flex; flex-direction: column; gap: 4px; }
.photo-credit { font-size: 12px; color: var(--grey); }
.face img { filter: saturate(.95); }
.face .ph:has(img) > span { opacity: 0; }

.mono-tile img.no-crop, .face img.no-crop { left: 0; width: 100%; height: 100%; transform: none; object-position: 50% 50%; }


/* ---------- Critique pass ---------- */
/* Arcs always sit on a white "ballot box" card, never directly on colour */
.arc-card { position: relative; display: block; align-self: center; background: #fff; border: 3px solid var(--ink); padding: 18px 18px 10px; color: var(--ink); text-decoration: none; }
a.arc-card:hover { box-shadow: 8px 8px 0 var(--ink); }
.arc-card .arc-mid { color: var(--grey); }
.arc-card .arc-mid .num-d { color: var(--ink); }
.band .arc-card, .band .arc-card:hover { border-color: #fff; color: var(--ink); }

/* Pen "+" as section marker */
.section-title::before { content: ""; display: inline-block; width: .52em; height: .52em; margin-right: .18em; vertical-align: .08em;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%239E3039' stroke-width='3.4' stroke-linecap='round'%3E%3Cpath d='M12.6 3.1c-.6 3.2-.9 6.5-.7 9.7.1 2.6.5 5.2.2 8'/%3E%3Cpath d='M3.3 13c2.9-.7 6-1 9.1-.9 2.6.1 5.1-.3 7.9-.7'/%3E%3C/g%3E%3C/svg%3E"); }

/* Seat legend cards: short names, full name in tooltip, "+" drawn on hover */
.seat-legend a { position: relative; padding-right: 40px; }
.seat-legend a .mark-plus { position: absolute; right: 8px; top: 50%; width: 26px; height: 26px; margin-top: -13px; }
.seat-legend a:hover, .seat-legend a:focus-visible { background: var(--bg-2); }
.seat-legend a:hover .draw path, .seat-legend a:focus-visible .draw path { stroke-dashoffset: 0; opacity: 1; }
.seat-legend strong { font-size: 17px; }
@media (min-width: 900px) { .seat-legend strong { font-size: 19px; } }

/* Navigation tiles: big number, arrow, "+" on hover */
.tile { padding-top: 18px; transition: background .15s; }
.tile-n { font-size: 52px; line-height: .9; color: var(--carmine); }
.tile-go { font-family: var(--display); font-weight: 900; font-size: 26px; line-height: 1; margin-top: auto; padding-top: 6px; transition: transform .15s; }
.tile:hover, .tile:focus-visible { background: var(--carmine-tint); }
.tile:hover .tile-go, .tile:focus-visible .tile-go { transform: translateX(6px); color: var(--carmine); }
@media (min-width: 1100px) { .tile:first-child { padding-left: 16px; } }

/* Mosaic: name + list on hover, pen "+" */
.face { overflow: visible; }
.face .ph { position: absolute; inset: 0; overflow: hidden; display: grid; place-items: center; }
.face .cap { display: none; position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); z-index: 6; background: var(--ink); color: #fff;
  font-family: var(--body); font-stretch: normal; font-weight: 400; font-size: 13px; line-height: 1.3; letter-spacing: 0; white-space: nowrap; padding: 6px 10px; pointer-events: none; text-align: left; }
.face .cap strong { display: block; font-size: 14px; }
.face .cap::after { content: ""; position: absolute; left: 50%; top: 100%; margin-left: -6px; border: 6px solid transparent; border-top-color: var(--ink); }
.face:hover .cap, .face:focus-visible .cap { display: block; }
.face:hover { z-index: 5; }
.face .mark-plus { z-index: 2; color: #fff; filter: drop-shadow(0 0 2px rgba(0,0,0,.6)); }

/* Elected mosaic grouped by list: each group its own row, no ragged last line */
.mosaic-groups { display: grid; gap: 14px; margin-top: 16px; }
.mgroup { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; border-left: 8px solid var(--pc); padding-left: 12px; }
.mgroup-head { display: flex; align-items: baseline; gap: 10px; font-weight: 700; font-size: 17px; }
.mgroup-head .num-d { font-size: 34px; line-height: .9; }
.mgroup-faces { display: flex; flex-wrap: wrap; gap: 3px; }
.mgroup-faces .face { width: 52px; height: 52px; aspect-ratio: auto; font-size: 16px; }
@media (min-width: 900px) { .mgroup { grid-template-columns: 220px minmax(0, 1fr); align-items: start; } .mgroup-head { flex-direction: column; gap: 2px; } .mgroup-faces .face { width: 56px; height: 56px; } }

/* Party page logo: normalised box, never cropped */
.plogo { padding: 10px; }
.plogo img { max-width: 100%; max-height: 100%; }

/* ---------- Government ---------- */
.pm-card { display: flex; align-items: center; gap: 18px; }
.pm-card strong { display: block; font-family: var(--display); font-stretch: 72%; font-weight: 850; font-size: 30px; line-height: 1; }
.pm-card .mono-tile.xl { width: 120px; height: 120px; }
.cabinet { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 24px; border-top: var(--rule); }
@media (min-width: 700px) { .cabinet { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .cabinet { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.minister { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 40px 14px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.minister .mono-tile { width: 76px; height: 76px; font-size: 26px; }
.minister .m-text { display: flex; flex-direction: column; min-width: 0; }
.minister strong { font-family: var(--display); font-stretch: 72%; font-weight: 850; font-size: 26px; line-height: 1; }
.minister .m-pos { font-size: 15px; margin-top: 4px; }
.minister .m-list { font-size: 13px; color: var(--grey); margin-top: 4px; border-left: 4px solid var(--pc); padding-left: 6px; }
.minister .mark-plus { position: absolute; right: 8px; top: 50%; width: 26px; height: 26px; margin-top: -13px; }
.minister:hover { background: var(--bg-2); }
.minister:hover strong { color: var(--carmine); }
.minister:hover .draw path, .minister:focus-visible .draw path { stroke-dashoffset: 0; opacity: 1; }
.minister.is-pm { grid-column: 1 / -1; }
.minister.is-pm .mono-tile { width: 104px; height: 104px; }
.minister.is-pm strong { font-size: 40px; }
.cabinet.compact .minister .mono-tile { width: 44px; height: 44px; font-size: 16px; }
.cabinet.compact .minister strong { font-size: 20px; }
.cab-lists { margin-top: 30px; max-width: 760px; }
.cab-lists h3 { font-size: 18px; margin-bottom: 8px; }
.cab-lists .trow { grid-template-columns: 200px minmax(0, 1fr) 40px; }

.timeline { position: relative; height: 84px; margin: 10px 0 34px; border-bottom: var(--rule); }
.tl-gap { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, #fff 0 6px, var(--track) 6px 12px); display: grid; place-items: center; }
.tl-gap span { font-size: 13px; color: var(--grey); background: #fff; padding: 2px 8px; white-space: nowrap; }
.tl-bar { position: absolute; top: 18px; height: 48px; background: var(--ink); border-right: 2px solid #fff; }
.tl-bar:nth-of-type(even) { background: #5A5A55; }
.tl-bar.now { background: var(--carmine); }
.tl-bar:hover { background: var(--carmine); }
.tl-tick { position: absolute; bottom: -24px; transform: translateX(-50%); font-size: 13px; color: var(--grey); }
.pm-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px 48px; }
@media (min-width: 1000px) { .pm-grid { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); } }
.era-title { font-size: 20px; margin: 18px 0 8px; }
.terms { list-style: none; margin: 0; padding: 0; border-top: var(--rule); }
.terms li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.terms li:target { background: var(--carmine-tint); }
.terms .t-name { font-weight: 700; font-size: 17px; }
.terms .t-name a { color: var(--ink); }
.terms .t-name .mark-plus { width: 18px; height: 18px; }
.terms .t-dates { grid-row: 2; font-size: 14px; color: var(--grey); }
.terms .t-bar { grid-row: 3; grid-column: 1 / -1; height: 8px; background: var(--track); }
.terms .t-bar i { display: block; height: 100%; background: var(--ink); }
.terms li.now .t-bar i { background: var(--carmine); }
.terms .t-len { grid-row: 1 / 3; grid-column: 2; font-size: 26px; }
.bio { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px 48px; margin-top: 36px; }
@media (min-width: 1000px) { .bio { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bio-sec ul { list-style: none; margin: 10px 0 24px; padding: 0; border-top: var(--rule); }
.bio-sec li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.others { margin-top: 48px; }
.others .section-title { margin-bottom: 12px; }

/* ---------- Mayors ---------- */
.mayor-figs { display: flex; gap: 28px; flex-wrap: wrap; font-size: 15px; color: var(--grey); }
.mayor-figs .num-d { display: block; font-size: 64px; line-height: .9; color: var(--ink); }
.mayor-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.mayor-filters .input { width: 260px; height: 44px; }
.mayors { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 24px; border-top: var(--rule); }
@media (min-width: 700px) { .mayors { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .mayors { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mayor { padding: 14px 0 14px 14px; border-bottom: 1px solid var(--line); border-left: 6px solid var(--mc); scroll-margin-top: 90px; }
.mayor:target { background: var(--carmine-tint); }
.mayor-place { font-weight: 700; font-size: 15px; color: var(--grey); }
.mayor-name { font-family: var(--display); font-stretch: 72%; font-weight: 850; font-size: 30px; line-height: 1; margin: 2px 0 8px; }
.mayor-name a { color: var(--ink); text-decoration: none; }
.mayor-name a:hover { color: var(--carmine); text-decoration: underline; }
.mayor-tags { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mayor-party { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; border: 2px solid var(--ink); padding: 1px 8px; }
.mayor-party i { width: 10px; height: 10px; background: var(--mc); }
.mayor-status { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 700; color: var(--sc); }
.mayor-status .mark-plus { width: 16px; height: 16px; }
.mayor-note, .mayor-saeima { margin: 8px 0 0; font-size: 14px; color: var(--grey); }
.muni a path { cursor: pointer; }

/* Mayors explorer: map + one panel, no endless scroll */
.band-slim .band-inner { padding-top: 26px; padding-bottom: 24px; }
.band-slim h1 { font-size: clamp(40px, 6vw, 76px); }
.explorer { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px 40px; padding-top: 28px; }
@media (min-width: 1000px) { .explorer { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; } .ex-panel { position: sticky; top: 16px; } }
.ex-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.muni path.sel { stroke: var(--ink); stroke-width: 4; }
.legend-inline { display: flex; flex-wrap: wrap; gap: 4px 16px; border: 0; margin-top: 8px; }
.legend-inline li { display: inline-flex; gap: 6px; align-items: center; border: 0; padding: 2px 0; font-size: 14px; }
.legend-inline b { font-family: var(--display); font-stretch: 72%; font-size: 17px; }
.ex-panel { border: 3px solid var(--ink); padding: 18px 20px 16px; background: #fff; }
.ex-place { font-weight: 700; font-size: 14px; color: var(--grey); display: flex; align-items: center; gap: 8px; }
.ex-title { font-size: clamp(38px, 4vw, 54px); margin: 4px 0 14px; }
.ex-mayor { border-left: 8px solid var(--mc); padding: 4px 0 4px 12px; }
.ex-label { display: block; font-size: 14px; color: var(--grey); }
.ex-mayor > strong { display: block; font-family: var(--display); font-stretch: 72%; font-weight: 850; font-size: 32px; line-height: 1; margin: 2px 0 8px; }
.ex-mayor > strong a { color: var(--ink); }
.ex-figs { display: flex; gap: 26px; margin-top: 18px; font-size: 14px; color: var(--grey); }
.ex-figs .num-d { display: block; font-size: 38px; line-height: 1; color: var(--ink); }
.seat-row { display: flex; flex-wrap: wrap; gap: 3px; margin: 14px 0 6px; }
.seat-row i { width: 18px; height: 18px; }
.council-lists { list-style: none; margin: 8px 0 0; padding: 0; border-top: var(--rule); }
.council-lists li { display: grid; grid-template-columns: 14px minmax(0, 1fr) 54px 34px; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.council-lists li.none { color: var(--grey); }
.council-lists .cl-pct { text-align: right; font-variant-numeric: tabular-nums; color: var(--grey); }
.council-lists .cl-seats { text-align: right; font-size: 22px; }
.deputies { margin-top: 12px; }
.deputies summary { cursor: pointer; font-weight: 700; padding: 8px 0; list-style: none; }
.deputies summary::before { content: "+ "; font-family: var(--display); font-weight: 900; color: var(--carmine); }
.deputies[open] summary::before { content: "− "; }
.dep-group { margin: 8px 0 12px; font-size: 14.5px; }
.dep-group ul { list-style: none; margin: 4px 0 0 18px; padding: 0; columns: 2; column-gap: 18px; }
.dep-group li { padding: 2px 0; break-inside: avoid; }
.mayor-rows { border-top: var(--rule); }
.mrow { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.3fr) auto; gap: 4px 14px; align-items: center; padding: 10px 0 10px 12px; border-bottom: 1px solid var(--line); border-left: 6px solid var(--mc); color: var(--ink); text-decoration: none; }
.mrow:hover, .mrow.on { background: var(--bg-2); }
.mrow.on { background: var(--carmine-tint); }
.mrow-place { font-weight: 700; color: var(--grey); font-size: 15px; }
.mrow strong { font-size: 17px; }
.mrow .mayor-status, .mrow-seats { display: none; }
@media (min-width: 800px) { .mrow { grid-template-columns: 220px minmax(0, 1fr) 220px 160px 90px; } .mrow .mayor-status, .mrow-seats { display: inline-flex; } .mrow-seats { justify-content: flex-end; color: var(--grey); font-size: 14px; } }
.mrow .mayor-party { justify-self: start; }
.two-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px 48px; }
@media (min-width: 1000px) { .two-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.muni path[hx-get] { cursor: pointer; }
.muni path[hx-get]:focus-visible { outline: none; stroke: var(--carmine); stroke-width: 4; }

/* About page */
.about-head { max-width: 760px; }
.about-head h1 { font-size: clamp(44px, 7vw, 88px); }
.about-head p { font-size: 19px; margin: 14px 0 0; }
.about-block { margin-top: 40px; }
.about-block .section-title { margin-bottom: 12px; }
.about-block p { max-width: 68ch; margin: 0 0 12px; }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 48px; }
@media (min-width: 900px) { .about-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.about-sources td { vertical-align: top; }
.about-sources td:first-child { width: 28%; }
.about-sources td:last-child { width: 24%; color: var(--grey); }
.about-lede { max-width: 72ch; }
.about-logos td { vertical-align: middle; }
.about-logos .plogo-md { width: 88px; height: 56px; }
.plogo img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; }
.about-logos td:nth-child(2), .about-logos td:nth-child(3) { vertical-align: middle; }
.plogo { display: inline-block; vertical-align: middle; }
.plogo img { display: block; }

/* ---------- No boxes: frames removed site-wide, soft fills instead (user preference) ---------- */
:root { --fill: #F1F0EC; --fill-hover: #E6E5E0; }
.plogo, .arc-card, .band .arc-card, .band .arc-card:hover, .ex-panel, .notice, .cand-result, .cand-result.is-elected,
.status-pill, .pagination a, .pagination a:hover, .portal-arc { border: 0 !important; }
a.arc-card:hover { box-shadow: none; background: #fff; }
.ex-panel, .notice, .cand-result { background: var(--fill); }
.cand-result.is-elected { background: var(--carmine-tint); }
.party-result { border-top: 0; border-right: 0; border-bottom: 0; background: var(--fill); }
.status-pill { background: rgba(255, 255, 255, .14); color: #fff; }
.status-pill.dark { background: var(--carmine-tint); color: var(--carmine); }

/* Inputs, buttons, chips, toggles: filled, not outlined */
.input, select.input, .input-lg { border: 0; background: var(--fill); }
.input:focus { box-shadow: 0 0 0 3px var(--carmine); background: #fff; }
.btn-ghost, .chip, .chip.remove, .seg span, .dchips span, .toggle, .toggle button, .mayor-party, .tag, .ptag { border: 0; }
.btn-ghost, .chip, .chip.remove, .seg span, .dchips span, .toggle button, .mayor-party { background: var(--fill); }
.btn-ghost:hover, .chip:hover, .seg span:hover, .dchips span:hover, .toggle button:hover { background: var(--fill-hover); color: var(--ink); }
.chip[aria-current="true"], .chip.on, .seg input:checked + span, .dchips input:checked + span, .toggle button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.toggle { gap: 2px; }
.seg { gap: 2px; padding-left: 0; }
.seg label { margin-left: 0; }
.tag { background: var(--fill); }
.check input { border: 0; background: var(--fill-hover); }
.ballot-row .box { border: 0; background: var(--fill); }
.pagination a:hover { background: var(--fill); }
.plogo { background: #fff; }
/* Home page: arc sits directly on the band, no card */
.band .arc-card.arc-bare, .band a.arc-card.arc-bare:hover { background: transparent; padding: 0; }
.band .arc-bare .arc-mid, .band .arc-bare .arc-mid .num-d { color: #fff; }
.band .arc-bare circle { stroke: #fff; stroke-width: 2.5; }

/* Government page: compact */
.cab-stack { margin-bottom: 18px; }
.stack-bar { display: flex; height: 16px; gap: 2px; }
.stack-bar i { display: block; height: 100%; }
.cabinet-compact { border-top: var(--rule); }
@media (min-width: 1100px) { .cabinet-compact { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cabinet-compact .minister { padding: 10px 34px 10px 0; gap: 10px; }
.cabinet-compact .minister .mono-tile { width: 52px; height: 52px; font-size: 18px; }
.cabinet-compact .minister strong { font-size: 21px; }
.cabinet-compact .minister .m-pos { font-size: 14px; margin-top: 2px; line-height: 1.25; }
.cabinet-compact .minister .m-list { font-size: 12.5px; margin-top: 3px; }
.cabinet-compact .minister .mark-plus { width: 22px; height: 22px; right: 4px; }
.pm-table { border-top: var(--rule); }
.pm-row { display: grid; grid-template-columns: minmax(0, 1fr) 70px; gap: 0 14px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.pm-row:target { background: var(--carmine-tint); }
.pm-name { font-weight: 700; font-size: 16px; }
.pm-name a { color: var(--ink); }
.pm-name .mark-plus { width: 16px; height: 16px; }
.pm-dates { grid-column: 1; font-size: 13.5px; color: var(--grey); }
.pm-bar { display: none; height: 8px; background: var(--track); }
.pm-bar i { display: block; height: 100%; background: var(--ink); }
.pm-row.now .pm-bar i { background: var(--carmine); }
.pm-len { grid-column: 2; grid-row: 1 / 3; text-align: right; font-family: var(--display); font-stretch: 72%; font-weight: 800; font-size: 20px; }
@media (min-width: 800px) {
  .pm-row { grid-template-columns: 200px 210px minmax(0, 1fr) 64px; }
  .pm-dates { grid-column: auto; }
  .pm-bar { display: block; }
  .pm-len { grid-column: auto; grid-row: auto; }
}

/* Prime Ministers: one compact tile per person */
.pm-tools { display: flex; justify-content: flex-end; margin: -6px 0 6px; }
.pm-era + .pm-era { margin-top: 18px; }
.pm-era .era-title { margin: 6px 0 8px; }
.pm-people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
@media (min-width: 700px) { .pm-people { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .pm-people { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.pm-tile { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 8px; align-items: baseline; padding: 9px 10px 8px; background: var(--fill); color: var(--ink); text-decoration: none; }
a.pm-tile:hover { background: var(--fill-hover); }
a.pm-tile:hover .pm-n { color: var(--carmine); }
.pm-tile.now { background: var(--carmine-tint); }
.pm-n { font-weight: 700; font-size: 15px; line-height: 1.2; }
.pm-n .mark-plus { width: 14px; height: 14px; }
.pm-total { grid-row: 1; grid-column: 2; font-size: 20px; line-height: 1; }
.pm-y { grid-column: 1 / -1; font-size: 12.5px; color: var(--grey); margin-top: 2px; }
.pm-bar { grid-column: 1 / -1; height: 4px; background: #fff; margin-top: 6px; }
.pm-bar i { display: block; height: 100%; background: var(--ink); }
.pm-tile.now .pm-bar i { background: var(--carmine); }
.timeline { margin-bottom: 30px; }

/* Mayors page: compact */
.council-lists li { padding: 5px 0; }
.council-lists.slim { border-top: 0; margin-top: 0; }
.mayor-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
@media (min-width: 700px) { .mayor-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .mayor-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.mtile { display: flex; flex-direction: column; gap: 1px; padding: 9px 10px 9px 12px; background: var(--fill); border-left: 5px solid var(--mc); color: var(--ink); text-decoration: none; min-width: 0; }
.mtile:hover { background: var(--fill-hover); }
.mtile.on { background: var(--carmine-tint); }
.mt-place { font-size: 12.5px; font-weight: 700; color: var(--grey); }
.mtile strong { font-size: 16px; line-height: 1.2; }
.mtile strong .mark-plus { width: 14px; height: 14px; }
.mt-party { font-size: 12.5px; color: var(--grey); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-party i { display: inline-block; width: 8px; height: 8px; background: var(--mc); margin-right: 5px; }
p .mark-plus { width: 14px; height: 14px; vertical-align: -2px; }

/* ---------- Saeima votes ---------- */
:root { --v-P: #008C7E; --v-R: #C9581A; --v-A: #ABA49A; --t-P: #00695F; --t-R: #A3440F; --t-A: #6E675E; }
.c-P { background: var(--v-P); } .c-R { background: var(--v-R); } .c-A { background: var(--v-A); }
.c-N { background: repeating-linear-gradient(135deg, #ECEBE7 0 3px, #C9C6BF 3px 5px); }
.c-X { background: #fff; box-shadow: inset 0 0 0 1.5px #B9B6AE; }
.t-P { color: var(--t-P); } .t-R { color: var(--t-R); } .t-A { color: var(--t-A); } .t-N { color: var(--grey); }
.vote-legend .swatch { width: 14px; height: 14px; }
.vbar { display: flex; height: 14px; gap: 2px; background: transparent; }
.vbar i { display: block; height: 100%; }
.vbar.mini { height: 8px; gap: 1px; }
.v-head { max-width: 760px; }
.v-head h1 { font-size: clamp(44px, 7vw, 88px); }
.v-head p { font-size: 19px; margin: 10px 0 8px; }
.v-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 18px 0 8px; }
.v-filters .input { width: auto; height: 42px; }
.v-filters input[type=search] { flex: 1 1 260px; }
.v-dates { display: flex; gap: 6px; align-items: center; }
.v-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px 48px; margin-top: 12px; }
@media (min-width: 1100px) { .v-layout { grid-template-columns: minmax(0, 1fr) 280px; } .v-side { position: sticky; top: 16px; align-self: start; } }
.vday { margin-top: 22px; }
.vday-title { font-family: var(--display); font-stretch: 72%; font-weight: 850; font-size: 26px; padding-bottom: 6px; border-bottom: var(--rule); }
.vlist { list-style: none; margin: 0; padding: 0; }
.vrow { border-bottom: 1px solid var(--line); }
.vrow-link { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 14px; padding: 10px 0; color: var(--ink); text-decoration: none; align-items: start; }
.vrow-link:hover { background: var(--bg-2); }
.vrow-link:hover .v-title { color: var(--carmine); }
.v-time { font-variant-numeric: tabular-nums; color: var(--grey); font-size: 14px; padding-top: 2px; }
.v-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.v-title { position: relative; font-size: 16px; line-height: 1.3; align-self: flex-start; }
.v-title.struck .strike-line { color: #6E675E; top: 28%; }
.v-title.struck .strike-line path { opacity: 1; stroke-dashoffset: 0; stroke-width: 1.8; }
.v-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13.5px; color: var(--grey); align-items: center; }
.v-tag { background: var(--fill); padding: 0 6px; font-size: 13px; color: var(--ink); }
.v-motive { font-style: italic; }
.v-result { grid-column: 2; display: grid; grid-template-columns: minmax(80px, 160px) auto; gap: 10px; align-items: center; }
.v-nums { font-size: 14px; color: var(--grey); white-space: nowrap; font-variant-numeric: tabular-nums; }
.v-out { grid-column: 2; display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 15px; }
.v-out .mark-plus { width: 16px; height: 16px; }
.o-no { color: var(--grey); }
@media (min-width: 900px) {
  .vrow-link { grid-template-columns: 52px minmax(0, 1fr) 230px 140px; align-items: center; }
  .v-result, .v-out { grid-column: auto; }
  .v-out { justify-content: flex-end; }
}
.more-btn { margin: 20px 0; }
.v-side .section-title { margin-bottom: 10px; }
.v-side-figs { display: flex; gap: 24px; font-size: 14px; color: var(--grey); border-top: var(--rule); padding-top: 10px; }
.v-side-figs .num-d { display: block; font-size: 44px; line-height: 1; color: var(--ink); }
.v-closest { display: flex; flex-direction: column; gap: 3px; margin: 16px 0; padding: 12px; background: var(--fill); color: var(--ink); text-decoration: none; }
.v-closest:hover { background: var(--fill-hover); }

.vt-head h1 { font-size: clamp(32px, 4.4vw, 60px); line-height: 1; }
.vt-meta { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin: 12px 0 0; font-size: 16px; }
.vt-motive { color: var(--grey); margin: 6px 0 0; }
.vt-result { margin-top: 24px; padding-top: 14px; border-top: var(--rule); }
.vt-nums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; margin-bottom: 14px; font-weight: 700; }
.vt-nums .num-d { display: block; font-size: clamp(56px, 8vw, 104px); line-height: .9; }
.vt-out { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-family: var(--display); font-stretch: 72%; font-weight: 850; font-size: 34px; color: var(--ink); }
.vt-out.o-no { color: var(--grey); }
.vt-out .mark-plus { width: 34px; height: 34px; }
.vt-out small { font-family: var(--body); font-stretch: normal; font-weight: 400; font-size: 13px; color: var(--grey); }
@media (min-width: 900px) { .vt-nums { grid-template-columns: repeat(4, auto) 1fr; align-items: end; } .vt-out { grid-column: auto; justify-content: flex-end; } }
.vt-result .vbar { height: 22px; }
.vt-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px 48px; margin-top: 40px; }
@media (min-width: 1000px) { .vt-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); } }
.vt-grid .section-title { margin-bottom: 12px; }
.vt-arc .seat { stroke: #fff; stroke-width: 1.5; }
.vt-arc .s-P { fill: var(--v-P); } .vt-arc .s-R { fill: var(--v-R); } .vt-arc .s-A { fill: var(--v-A); } .vt-arc .s-N { fill: url(#hatch); }
.vt-arc .s-X { fill: #fff; stroke: #B9B6AE; stroke-width: 2; }
.vt-arc a:hover .seat { stroke: var(--ink); stroke-width: 3; }
.ftable td .vbar { margin-top: 4px; max-width: 220px; }
.ftable td:first-child { min-width: 160px; }
.vt-tabs { display: none; }
.vt-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px 32px; }
.vt-col h3 { display: flex; align-items: center; gap: 8px; font-size: 18px; padding-bottom: 6px; border-bottom: var(--rule); }
.vt-col ul { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.vt-col li { padding: 4px 0; border-bottom: 1px solid var(--line); }
.vt-col a { color: var(--ink); text-decoration: none; }
.vt-col a:hover { color: var(--carmine); text-decoration: underline; }
.ftag { font-size: 12px; color: var(--grey); background: var(--fill); padding: 0 4px; }
@media (max-width: 899px) { .vt-tabs { display: inline-flex; } .vt-col { display: none; } .vt-col.on { display: block; } .vt-col h3 { display: none; } }
@media (min-width: 900px) { .vt-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.vlist.compact .vrow-link { grid-template-columns: 70px minmax(0, 1fr) auto; }

.bill-path { list-style: none; margin: 28px 0 0; padding: 0 0 0 26px; border-left: 3px solid var(--ink); max-width: 860px; }
.bill-path li { position: relative; padding: 0 0 22px 18px; }
.bp-node { position: absolute; left: -38px; top: 0; width: 22px; height: 22px; background: #fff; border-radius: 50%; box-shadow: inset 0 0 0 3px var(--ink); display: grid; place-items: center; }
.bill-path li.now .bp-node { box-shadow: none; background: var(--carmine-tint); }
.bp-node .mark-plus { width: 20px; height: 20px; }
.bp-date { font-size: 14px; color: var(--grey); }
.bp-body strong { font-size: 19px; }
.bp-vote { display: grid; grid-template-columns: minmax(120px, 240px) auto; gap: 10px; align-items: center; margin-top: 6px; color: var(--ink); text-decoration: none; }
.bp-vote:hover .v-nums { color: var(--carmine); }

.dep-figs { display: flex; flex-wrap: wrap; gap: 16px 40px; margin-top: 20px; font-weight: 700; }
.dep-figs > div { display: flex; flex-direction: column; }
.dep-figs .num-d { font-size: clamp(44px, 6vw, 72px); line-height: .9; }
.dep-figs small { font-weight: 400; color: var(--grey); font-size: 13.5px; margin-top: 4px; }
.dep-how { flex-basis: 100%; max-width: 72ch; background: var(--fill); padding: 10px 12px; margin: 0; font-weight: 400; }
.vstrip { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 8px; }
.vstrip a { width: 10px; height: 18px; }
.vstrip a:hover { outline: 2px solid var(--ink); }
.vchip { display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; }
.dep-votes .u { position: relative; }
.dep-votes tr.differs .strike-line { top: auto; bottom: -6px; height: .45em; color: var(--ink); }
.dep-votes tr.differs .strike-line path { opacity: .55; stroke-dashoffset: 0; stroke-width: 1.6; }
.v-title.is-no { color: var(--grey); text-decoration: line-through; text-decoration-color: #6E675E; text-decoration-thickness: 1.5px; }

/* Vote page: faction rings + compact layout */
.vt-head h1 { font-size: clamp(28px, 3.4vw, 46px); }
.vt-meta { margin-top: 8px; font-size: 15px; }
.vt-motive { font-size: 14.5px; }
.vt-result { margin-top: 16px; padding-top: 10px; }
.vt-nums { margin-bottom: 8px; gap: 6px 22px; font-size: 14px; }
.vt-nums .num-d { font-size: clamp(40px, 5vw, 60px); }
.vt-out { font-size: 28px; }
.vt-out .mark-plus { width: 26px; height: 26px; }
.vt-result .vbar { height: 14px; }
.vt-grid { margin-top: 22px; gap: 20px 40px; align-items: start; }
@media (min-width: 1000px) { .vt-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.vt-arc { max-width: 560px; }
.vt-arc .seat { stroke-width: 3.2; }
.vt-arc .s-X { fill: #fff; stroke-dasharray: 3 2; }
.vt-arc a:hover .seat { stroke: var(--ink) !important; stroke-width: 4; }
.vt-legends { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.vt-legends .legend-inline { margin-top: 4px; }
.ring { display: inline-block; width: 13px; height: 13px; border-radius: 50%; box-shadow: inset 0 0 0 3px var(--fc); background: #fff; }
.ftable td { padding-top: 7px; padding-bottom: 7px; }
.ftable tbody td:first-child { border-left: 5px solid var(--fc); padding-left: 8px; }
.vt-people { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 24px; border-top: var(--rule); padding-top: 12px; }
.vp-group h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 6px; }
.vp-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.vp-chips a { font-size: 13.5px; padding: 2px 8px 2px 6px; background: var(--fill); border-left: 4px solid var(--fc); color: var(--ink); text-decoration: none; white-space: nowrap; }
.vp-chips a:hover { background: var(--fill-hover); color: var(--carmine); }
.vt-context { margin-top: 26px; }
.vt-context .facts > div { grid-template-columns: 110px minmax(0, 1fr); padding: 6px 0; }
.vt-context h3 { font-size: 16px; }
@media (min-width: 1000px) { .vt-context dl.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; } }

/* Hemicycle: labels, score, hover card */
.arc-box { position: relative; max-width: 620px; }
.vt-arc { max-width: none; width: 100%; overflow: visible; }
.vt-arc .seat { cursor: pointer; transition: transform .1s; transform-box: fill-box; transform-origin: center; }
.vt-arc .seat:hover, .vt-arc .seat:focus { transform: scale(1.25); outline: none; stroke: var(--ink) !important; }
.fac-label { font-family: var(--display); font-stretch: 72%; font-weight: 850; font-size: 22px; fill: var(--ink); }
.fac-label .fac-n { font-weight: 600; fill: var(--grey); font-size: 18px; }
.arc-score { font-family: var(--display); font-stretch: 72%; font-weight: 850; font-size: 58px; }
.arc-score .t-P { fill: var(--t-P); } .arc-score .t-R { fill: var(--t-R); } .arc-score .t-A { fill: var(--t-A); } .arc-score .sep { fill: var(--grey-2); font-size: 40px; }
.arc-out { font-family: var(--body); font-weight: 700; font-size: 20px; fill: var(--grey); }
.seat-tip { position: absolute; z-index: 20; width: 300px; pointer-events: auto; }
.tip-card { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; background: #fff; padding: 12px; color: var(--ink); text-decoration: none;
  border-top: 5px solid var(--fc); box-shadow: 0 10px 30px rgba(10, 10, 10, .18); }
.tip-card:hover strong { color: var(--carmine); }
.tip-photo { position: relative; width: 72px; height: 72px; overflow: hidden; display: grid; place-items: center; color: #fff; font-family: var(--display); font-stretch: 72%; font-weight: 850; font-size: 28px; }
.tip-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; background: #fff; }
.tip-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 13.5px; }
.tip-body strong { font-family: var(--display); font-stretch: 72%; font-weight: 850; font-size: 22px; line-height: 1; }
.tip-vote { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; }
.tip-vote i { width: 14px; height: 14px; display: inline-block; }
.tip-fac { display: flex; align-items: center; gap: 6px; color: var(--grey); }
.tip-fac img { height: 22px; max-width: 60px; object-fit: contain; }
.tip-stats, .tip-next { color: var(--grey); font-size: 12.5px; }
.tip-stats b, .tip-next b { color: var(--ink); }
@media (min-width: 1000px) { .vt-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.arc-box { max-width: 720px; }
.arc-score { font-size: 38px; } .arc-score .sep { font-size: 28px; } .arc-out { font-size: 15px; }

/* Balsojumi — pa nedēļām */
.v-head h1 { font-size: clamp(40px, 6vw, 72px); }
.v-head p { margin-bottom: 0; }
.wk { margin-top: 20px; }
.wk-nav { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: var(--rule); }
.wk-now { text-align: center; }
.wk-now .eyebrow { color: var(--carmine); }
.wk-now h2 { font-size: clamp(30px, 4.4vw, 52px); margin-top: 2px; }
.wk-arrow { display: grid; place-items: center; width: 48px; height: 48px; background: var(--fill); color: var(--ink); font-size: 24px; font-weight: 700; text-decoration: none; }
.wk-arrow:hover { background: var(--ink); color: #fff; }
.wk-arrow.is-off { opacity: .25; }
.wk-strip { display: flex; align-items: flex-end; gap: 2px; height: 64px; padding: 6px 0 16px; margin-top: 4px; overflow-x: auto; scrollbar-width: thin; }
.wk-strip a { position: relative; flex: 1 0 9px; max-width: 22px; height: 100%; display: flex; align-items: flex-end; }
.wk-strip i { display: block; width: 100%; background: #CFCCC4; border-radius: 2px 2px 0 0; }
.wk-strip a:hover i { background: var(--ink); }
.wk-strip a.on i { background: var(--carmine); }
.wk-strip span { position: absolute; left: 0; bottom: -16px; font-size: 11px; color: var(--grey-2); white-space: nowrap; }
.wk-figs { display: flex; flex-wrap: wrap; gap: 12px 30px; align-items: stretch; margin: 14px 0 6px; font-size: 14px; color: var(--grey); }
.wk-figs > div .num-d { display: block; font-size: 40px; line-height: 1; color: var(--ink); }
.wk-close { flex: 1 1 280px; display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; background: var(--fill); color: var(--ink); text-decoration: none; }
.wk-close:hover { background: var(--fill-hover); }
.wk-close strong { font-size: 15px; line-height: 1.3; }
.wk-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.vday-title .muted { font-family: var(--body); font-stretch: 100%; font-weight: 400; font-size: 15px; letter-spacing: 0; }
.v-doc { font-variant-numeric: tabular-nums; }
.v-subs { margin: -4px 0 10px 66px; font-size: 14px; }
.v-subs summary { cursor: pointer; color: var(--grey); width: max-content; list-style: none; }
.v-subs summary::before { content: "+ "; color: var(--carmine); font-weight: 700; }
.v-subs[open] summary::before { content: "− "; }
.v-subs summary:hover { color: var(--carmine); }
.v-subs ol { list-style: none; margin: 6px 0 0; padding: 0; }
.v-subs li a { display: grid; grid-template-columns: 44px minmax(0, 1fr) 90px auto; gap: 4px 12px; align-items: center; padding: 4px 0; color: var(--ink); text-decoration: none; border-top: 1px solid var(--line); }
.v-subs li a:hover .v-sub-l { color: var(--carmine); }
.v-subs .v-out { grid-column: auto; font-size: 13.5px; font-weight: 600; }
.v-subs .v-nums { display: none; }
@media (min-width: 900px) {
  .v-subs li a { grid-template-columns: 44px minmax(0, 1fr) 140px 90px 120px; }
  .v-subs .v-nums { display: block; font-size: 13px; }
  .v-subs .v-out { justify-content: flex-end; }
}
@media (max-width: 899px) { .v-subs { margin-left: 58px; } }

/* Deputātu saraksts */
.dep-face img.no-crop { object-fit: cover; object-position: 50% 15%; }
.dep-tools { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; margin: 18px 0 4px; }
.dep-tools .input { flex: 0 1 320px; height: 42px; }
.dep-jump { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; }
.dep-jump a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: none; font-weight: 700; }
.dep-jump a:hover { color: var(--carmine); }
.dep-jump .muted { font-weight: 400; }
.dep-group { padding-top: 28px; scroll-margin-top: 12px; }
.dep-group-title { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-stretch: 72%; font-weight: 850; font-size: 28px; line-height: 1; padding-bottom: 8px; margin-bottom: 10px; border-bottom: var(--rule); }
.dep-group-title .muted { font-weight: 600; }
.dep-group:not(:has(.dep-card:not([style*="display: none"]))) { display: none; }
.dep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px; }
.dep-card { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 10px 8px 8px; background: var(--fill); color: var(--ink); text-decoration: none; }
.dep-card:hover { background: var(--fill-hover); }
.dep-card:hover strong { color: var(--carmine); }
.dep-card .mono-tile { width: 56px; height: 56px; font-size: 20px; }
.dep-card .mono-tile.has-photo::after { height: 4px; }
.dep-card-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dep-card strong { font-size: 16px; line-height: 1.2; }
.dep-card .small { font-size: 13px; line-height: 1.3; }
.dep-meter { display: block; height: 4px; background: #DAD8D2; max-width: 160px; }
.dep-meter i { display: block; height: 100%; background: var(--ink); }
.dep-card.is-former { opacity: .8; }
.dep-former { margin-top: 36px; }
.dep-former summary { cursor: pointer; list-style: none; }
.dep-former summary .dep-group-title::after { content: "+"; margin-left: auto; color: var(--carmine); }
.dep-former[open] summary .dep-group-title::after { content: "−"; }

/* Deputāta lapa */
.dp-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px 24px; align-items: center; padding: 22px 0 24px; border-bottom: var(--rule); }
.dp-head .mono-tile.xl { width: 110px; height: 140px; }
@media (min-width: 900px) { .dp-head .mono-tile.xl { width: 132px; height: 168px; } }
.dp-head .mono-tile.has-photo::after { height: 6px; }
.dp-fac { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); }
.dp-fac .plogo-sm { width: 76px; height: 44px; }
.dp-head h1 { font-family: var(--display); font-stretch: 72%; font-weight: 850; font-size: clamp(40px, 7vw, 84px); line-height: .92; letter-spacing: -.02em; margin: 6px 0 8px; }
.dp-head p { margin: 0; }
.dp-facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin-top: 20px; }
@media (min-width: 900px) { .dp-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dp-fact { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; background: var(--fill); }
.dp-q { font-weight: 700; font-size: 15px; }
.dp-fact .num-d { font-size: 54px; line-height: .95; }
.dp-meter { display: block; height: 8px; background: #DAD8D2; }
.dp-meter i { display: block; height: 100%; background: var(--ink); }
.dp-mix { height: 18px; margin-top: 8px; }
.dp-mix-l { display: flex; flex-wrap: wrap; gap: 4px 14px; list-style: none; margin: 4px 0 0; padding: 0; font-size: 14px; }
.dp-mix-l li { display: inline-flex; align-items: center; gap: 6px; }
.dp-sec { margin-top: 34px; }
.dp-day { font-size: 15px; font-weight: 700; color: var(--grey); margin: 18px 0 4px; }
.dp-list { list-style: none; margin: 0; padding: 0; }
.dp-list li { border-bottom: 1px solid var(--line); }
.dp-list a { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 4px 14px; align-items: center; padding: 8px 0; color: var(--ink); text-decoration: none; }
.dp-list a:hover .dp-t { color: var(--carmine); }
.dp-list .v-out { grid-column: 2; font-size: 14px; font-weight: 600; }
@media (min-width: 900px) { .dp-list a { grid-template-columns: 96px minmax(0, 1fr) 150px; } .dp-list .v-out { grid-column: auto; justify-content: flex-end; } }
.dp-list .dp-date { font-variant-numeric: tabular-nums; color: var(--grey); font-size: 14px; }
.dp-t { font-size: 15.5px; line-height: 1.35; }
.dp-t .muted { font-size: 13.5px; }
.dp-vs { grid-column: 2; display: flex; align-items: center; gap: 8px; }
@media (min-width: 900px) { .dp-list a:has(.dp-vs) { grid-template-columns: 96px minmax(0, 1fr) auto; } .dp-vs { grid-column: auto; } }
.pill { display: inline-flex; justify-content: center; align-items: center; min-width: 84px; padding: 3px 8px; font-size: 13.5px; font-weight: 700; color: #fff; }
.pill.c-A { color: var(--ink); }
.pill.c-N, .pill.c- { background: var(--fill); color: var(--grey); }
.pill-o { min-width: 0; }
.dp-list li.is-diff { background: var(--carmine-tint); }
.dp-list li.is-diff a { padding-left: 8px; padding-right: 8px; }
.dp-flag { display: inline-block; margin-left: 6px; font-size: 12.5px; font-weight: 700; color: var(--carmine); }
@media (max-width: 899px) { .dp-list a:has(.dp-date) { grid-template-columns: minmax(0, 1fr); } .dp-list a:has(.dp-date) .dp-vs { grid-column: 1; } }

/* Par ko ir dokuments */
.bi { margin: 22px 0 6px; padding: 18px 20px; background: var(--fill); }
.bi-q { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-stretch: 72%; font-weight: 850; font-size: 26px; line-height: 1.05; }
.bi-q .mark-plus { width: 20px; height: 20px; flex: none; }
.bi-note { margin: 8px 0 0; font-size: 14.5px; color: var(--grey); }
.bi-sum { margin: 10px 0 0; font-size: 19px; line-height: 1.45; }
.bi-list { margin: 10px 0 0; padding-left: 20px; }
.bi-list li { margin: 4px 0; line-height: 1.4; }
.bi-list li::marker { color: var(--carmine); }
.bi-who { margin: 10px 0 0; }
.bi-src { margin: 12px 0 0; font-size: 13px; color: var(--grey); line-height: 1.4; }
.v-sum { font-size: 14.5px; line-height: 1.4; color: var(--grey); max-width: 70ch; }

/* Lapu galvas: atpakaļ saite, virsrinda, birkas */
.back { display: inline-flex; align-items: center; gap: 4px; margin: 14px 0 0; font-size: 14px; font-weight: 600; color: var(--grey); text-decoration: none; }
.back:hover { color: var(--carmine); }
.crumbs a { text-decoration: none; font-weight: 600; }
.vt-head { padding-top: 0; }
.vt-head .back { margin-bottom: 18px; }
.vt-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--carmine); margin-bottom: 8px; }
.vt-head h1 { max-width: 22ch; }
.vt-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.hdr-tag { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; background: var(--fill); color: var(--ink); font-size: 14.5px; font-weight: 600; text-decoration: none; }
a.hdr-tag.tag-doc { background: var(--ink); color: #fff; }
a.hdr-tag.tag-doc:hover { background: var(--carmine); color: #fff; }
.vt-motive { display: flex; flex-direction: column; gap: 2px; max-width: 80ch; margin: 14px 0 0; padding-left: 12px; border-left: 3px solid var(--carmine); color: var(--ink); font-size: 15.5px; line-height: 1.4; }
.vt-motive span { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--grey); }
.vt-facts { display: flex; flex-wrap: wrap; gap: 10px 32px; margin: 16px 0 0; }
.vt-facts div { display: flex; flex-direction: column; max-width: 70ch; }
.vt-facts dt { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--grey); }
.vt-facts dd { margin: 2px 0 0; font-size: 15.5px; line-height: 1.4; }
.dp-id .back { margin: 0 0 10px; }
.vt-sub { margin: 8px 0 0; font-size: 20px; line-height: 1.35; color: var(--grey); max-width: 60ch; }
.v-subtitle { display: block; font-weight: 400; color: var(--grey); font-size: 14.5px; }
.v-title.is-no .v-subtitle { text-decoration: none; }
.vp-chips .is-raw { padding: 2px 8px; background: var(--fill); font-style: italic; }

/* 404 / 500 */
.error-page { padding: 64px 0 96px; max-width: 640px; }
.error-page .display { margin: 8px 0 16px; font-size: clamp(40px, 6vw, 72px); }
.error-links { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font-weight: 600; }

/* Deputy: full voting history filters */
.dp-filter { margin-top: 14px; }
.dp-filter .swatch { margin-right: 2px; }
.dp-search { display: flex; gap: 8px; margin-top: 14px; max-width: 640px; }
.dp-search .input { flex: 1; min-width: 0; }
.dp-count { margin: 12px 0 0; }
.dp-mix-l a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: none; }
.dp-mix-l a:hover { color: var(--carmine); text-decoration: underline; }

/* Merged person page (candidate + 14th Saeima deputy) */
.person-nav { position: sticky; top: 0; z-index: 15; display: flex; gap: 4px 22px; overflow-x: auto; scrollbar-width: none; padding: 12px 0; background: #fff; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 16px; white-space: nowrap; }
.person-nav a { color: var(--ink); text-decoration: none; }
.person-nav a:hover { color: var(--carmine); }
.person-nav small { font-weight: 400; color: var(--grey); }
[id="rezultats"], [id="pamatdati"], [id="saeima"], [id="balsojumi"], [id="deklaracija"] { scroll-margin-top: 56px; }
.dep-badge { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); }
.person-sec { margin-top: 44px; }
.person-sub { margin: 6px 0 0; }
.person-h { margin-top: 44px; }
.person-sec .dp-sec { margin-top: 28px; }
.person-sec .dp-sec .section-title { font-size: 26px; }

/* Analytics consent bar (only rendered when GA is configured) */
.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: #fff; border-top: 3px solid var(--ink); box-shadow: 0 -6px 24px rgba(0,0,0,.08); }
.consent[hidden] { display: none; }
.consent-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-top: 14px; padding-bottom: 14px; }
.consent-inner p { margin: 0; flex: 1 1 320px; font-size: 15px; }
.consent-actions { display: flex; gap: 10px; }
