/* EP Watch CZ – vzhled „analytický dashboard“ (EU × ČR).
   Barvy jsou tokeny v :root, tmavý režim je níže (automaticky podle systému,
   nebo ručně přepínačem v hlavičce: html[data-theme="dark"|"light"]). */

/* Plus Jakarta Sans (SIL OFL 1.1, viz assets/fonts/OFL.txt), hostované v repu – bez Google Fonts. */
@font-face {
  font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 200 700; font-display: swap;
  src: url(assets/fonts/plus-jakarta-sans-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 200 700; font-display: swap;
  src: url(assets/fonts/plus-jakarta-sans-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --navy: #0F172A;
  --navy-2: #0A1226;
  --navy-glow: #1E3A8A;
  --cz-red: #E11D48;
  --cz-blue: #3B82F6;
  --gold: #F59E0B;
  --eu-blue: #1E4FA3;

  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --glass: rgba(255, 255, 255, .82);
  --chip: #F1F5F9;
  --stage: #E8EDF4;   /* podklad náhledu karty v panelu sdílení */
  --text: #0F172A;
  --muted: #64748B;
  --border: rgba(15, 23, 42, .09);
  --track: #E2E8F0;
  --accent: #2563EB;
  --accent-soft: #EFF6FF;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px -18px rgba(15, 23, 42, .18);
  --shadow-hover: 0 18px 40px -18px rgba(59, 130, 246, .45), 0 0 0 1px rgba(245, 158, 11, .55);

  /* Sémantické barvy: --data = hodnota poslance, --bench = medián (EP / frakce), --for/--against/--abst/--absent = jen hlasy.
     Identita frakcí a stran (tečky, proužek karty, rámeček avataru) je v datech (groups.json, parties.json), ne v CSS. */
  --data: #334155;
  --bench: #B45309;
  --link: #1E3A8A;
  --mx-max: 60%;
  /* pro / proti: zelená / červená. Zelená a červená znamenají jen hlas, nikdy výsledek ani kvalitu.
     Při poruše barvocitu se odliší světlostí a hlavně symbolem (✓ ✕ – ○, třída .vd) a čísly u proužku. */
  --for: #2BA862;
  --against: #9F1D2B;
  --abst: #64748B;
  --absent: #94A3B8;
  --for-text: #15803D;
  --against-text: #9F1D2B;
  --glyph: #FFFFFF;
  /* stav akce (panel sdílení): hotovo / chyba; nesouvisí s hlasy */
  --ok: #15803D;
  --danger: #B91C1C;

  --radius: 18px;
  --radius-sm: 12px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1220;
    --surface: #111A2E;
    --glass: rgba(30, 41, 59, .55);
    --chip: rgba(30, 41, 59, .85);
    --stage: #0A101E;
    --text: #E2E8F0;
    --muted: #94A3B8;
    --border: rgba(148, 163, 184, .16);
    --track: rgba(148, 163, 184, .18);
    --accent: #93C5FD;
    --accent-soft: rgba(59, 130, 246, .14);
    --shadow: none;
    --abst: #94A3B8;
    --glyph: #0B1220;
    --absent: #64748B;
    --data: #CBD5E1;
    --bench: #F59E0B;
    --link: #BFDBFE;
    --mx-max: 42%;
    --for: #5BE49B;
    --against: #E5484D;
    --for-text: #86EFAC;
    --against-text: #FCA5A5;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1220;
  --surface: #111A2E;
  --glass: rgba(30, 41, 59, .55);
  --chip: rgba(30, 41, 59, .85);
  --stage: #0A101E;
  --text: #E2E8F0;
  --muted: #94A3B8;
  --border: rgba(148, 163, 184, .16);
  --track: rgba(148, 163, 184, .18);
  --accent: #93C5FD;
  --accent-soft: rgba(59, 130, 246, .14);
  --shadow: none;
  --abst: #94A3B8;
  --absent: #64748B;
  --data: #CBD5E1;
  --bench: #F59E0B;
  --link: #BFDBFE;
  --mx-max: 42%;
  --glyph: #0B1220;
  --for: #5BE49B;
  --against: #E5484D;
  --for-text: #86EFAC;
  --against-text: #FCA5A5;
  color-scheme: dark;
}

/* Plynulý přechod mezi stránkami (View Transitions, kde to prohlížeč umí). */
@view-transition { navigation: auto; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.55 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--gold); text-decoration-thickness: 2px; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1.08; font-weight: 300; letter-spacing: -.03em; margin: 0 0 .6rem; }
h1 strong, h1 b { font-weight: 700; }
h2 { font-size: 1.3rem; font-weight: 600; letter-spacing: -.01em; margin: 2.25rem 0 .9rem; }
h3 { font-size: 1rem; font-weight: 600; margin: 1.25rem 0 .5rem; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

/* --- hlavička ------------------------------------------------------------ */
.site-header {
  position: relative;
  color: #F8FAFC;
  background: radial-gradient(900px 300px at 85% -40%, var(--navy-glow) 0%, var(--navy) 60%, var(--navy-2) 100%);
  view-transition-name: site-header;
}
.site-header .inner {
  max-width: 1280px; margin: 0 auto; padding: .85rem 20px;
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.5rem;
}
.brand { display: inline-flex; align-items: center; gap: .55rem; color: #F8FAFC; text-decoration: none; font-weight: 400; font-size: 1.2rem; letter-spacing: -.01em; white-space: nowrap; }
.brand b { font-weight: 800; }
.brand-mark { width: 47px; height: 36px; flex: none; }
.brand:hover .brand-mark { color: var(--gold); }
@media (max-width: 360px) { .brand-text { font-size: 1.05rem; } .brand-mark { width: 39px; height: 30px; } }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 10; padding: .6rem 1rem; border-radius: 999px; background: var(--gold); color: var(--navy); font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 12px; }
.site-header nav { display: flex; flex-wrap: wrap; gap: .25rem; flex: 1; }
.site-header nav a {
  color: #CBD5E1; text-decoration: none; font-weight: 500; font-size: .9rem;
  padding: .45rem .9rem; border-radius: 999px; transition: background .2s ease, color .2s ease;
}
.site-header nav a:hover { color: #F8FAFC; background: rgba(248, 250, 252, .08); }
.site-header nav a[aria-current="page"] { color: var(--navy); background: #F8FAFC; }
.subnav { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.5rem; }
.subnav a { padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--border); background: var(--chip); color: var(--text); text-decoration: none; font-weight: 500; font-size: .9rem; }
.subnav a:hover { border-color: var(--gold); }
.subnav a[aria-current="page"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.theme-toggle {
  width: 40px; height: 40px; border-radius: 999px; flex: none;
  border: 1px solid rgba(248, 250, 252, .25); background: rgba(248, 250, 252, .06); color: #F8FAFC;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.theme-toggle:hover { border-color: var(--gold); }
@media (max-width: 640px) {
  .site-header nav { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: .2rem; scrollbar-width: none; }
  .site-header nav { gap: 0; }
  .site-header nav a { white-space: nowrap; font-size: .8rem; padding: .45rem .5rem; }
  .theme-toggle { margin-left: auto; }
}

/* --- hero (úvodní stránka) ------------------------------------------------ */
.hero {
  position: relative; overflow: hidden; overflow: clip; color: #F8FAFC;
  background: radial-gradient(1100px 520px at 80% -20%, var(--navy-glow) 0%, var(--navy) 55%, var(--navy-2) 100%);
}
.hero-inner { position: relative; max-width: 1280px; margin: 0 auto; padding: 2.5rem 20px 2.5rem; display: flex; flex-wrap: wrap; gap: 2.5rem; align-items: center; }
.hero-copy { flex: 1 1 520px; min-width: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; margin: 0 0 1rem; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.hero h1 { color: #F8FAFC; font-size: clamp(2.2rem, 5.2vw, 3.8rem); }
.hero p.lead { color: #CBD5E1; font-size: 1.1rem; max-width: 36rem; }
.hero-emblem { flex: 0 0 260px; height: 260px; position: relative; }
.hero-stars { position: absolute; right: -140px; top: -80px; width: 620px; height: 620px; opacity: .14; pointer-events: none; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 46px; padding: 0 1.3rem;
  border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .95rem; transition: transform .2s ease, box-shadow .2s ease;
}
.btn-light { background: #F8FAFC; color: var(--navy); }
.btn-ghost { border: 1px solid rgba(248, 250, 252, .3); color: #F8FAFC; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 0 0 2px var(--gold); }
.kpis {
  position: relative; max-width: 1280px; margin: 0 auto; padding: 0 20px 2.5rem;
}
.kpi-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px;
  background: rgba(248, 250, 252, .12); border: 1px solid rgba(248, 250, 252, .12); border-radius: var(--radius); overflow: hidden;
}
.kpi { padding: 1.3rem 1.5rem; background: rgba(15, 23, 42, .72); backdrop-filter: blur(8px); }
.kpi .k-label { font-size: .82rem; color: #94A3B8; margin-bottom: .5rem; }
.kpi .k-value { font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 200; line-height: 1; letter-spacing: -.03em; }
.kpi .k-note { font-size: .75rem; color: #94A3B8; margin-top: .55rem; }
.kpi .k-note a { color: #CBD5E1; }
.entries { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-top: 1rem; align-items: start; }
.entry { display: flex; flex-direction: column; gap: .3rem; padding: 1rem 1.2rem; border-radius: var(--radius-sm); color: #F8FAFC; text-decoration: none;
  background: rgba(248, 250, 252, .06); border: 1px solid rgba(248, 250, 252, .14); }
a.entry:hover, a.entry:focus-visible { border-color: var(--gold); }
.entry span { font-size: .85rem; color: #CBD5E1; }
.entry-topics { display: flex; flex-wrap: wrap; gap: .35rem; }
.entry-topics a { color: #F8FAFC; font-size: .8rem; padding: .15rem .6rem; border-radius: 999px; border: 1px solid rgba(248, 250, 252, .25); text-decoration: none; }
.entry-topics a:hover { border-color: var(--gold); }
.entry-topics a svg { width: 14px; height: 14px; margin-right: .35rem; vertical-align: -2px; }
.entry-topics a.entry-all { border-style: dashed; color: #CBD5E1; }
@media (max-width: 760px) { .entries { grid-template-columns: 1fr; } }
.kpi-grid.kpi-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hero-emblem { display: none; } }
@media (max-width: 480px) { .kpi-grid.kpi-2 { grid-template-columns: 1fr; } }

/* --- rozložení ----------------------------------------------------------- */
main, .home .page { max-width: 1280px; margin: 0 auto; padding: 2rem 20px 4rem; }
main.home { max-width: none; padding: 0; }
.lead { color: var(--muted); margin: 0 0 1.5rem; max-width: 60rem; font-size: 1.05rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 1.25rem; }
.split-panels { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: .5rem; }
.split-panels > * { flex: 1 1 440px; min-width: 0; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: .75rem 1.5rem; margin: 2.5rem 0 1rem; }
.section-head h2 { margin: 0; font-size: 1.7rem; letter-spacing: -.02em; }
.section-head p { margin: .2rem 0 0; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.4rem;
}
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }

.controls { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; margin-bottom: 1rem; }
.controls label { display: inline-flex; gap: .45rem; align-items: center; }
fieldset.fieldset { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
fieldset.fieldset legend { float: left; margin-right: .5rem; padding: 0; line-height: 44px; }
input[type="search"], select {
  font: inherit; min-height: 44px; padding: 0 .9rem; border: 1px solid var(--border);
  border-radius: 999px; background: var(--surface); color: var(--text); min-width: 0;
}
input[type="search"] { width: min(22rem, 100%); }
select { max-width: 100%; text-overflow: ellipsis; }
.controls label { max-width: 100%; min-width: 0; }
.controls select { min-width: 0; flex: 1 1 auto; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--cz-blue); width: 18px; height: 18px; }

/* --- tabulky ------------------------------------------------------------- */
.table-wrap { position: relative; overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { padding: .7rem .9rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: var(--accent-soft); }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); white-space: nowrap; background: var(--surface); font-weight: 600; }
th button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-transform: inherit; letter-spacing: inherit; }
th button::after { content: " ↕"; opacity: .4; }
th[aria-sort="ascending"] button::after { content: " ↑"; opacity: 1; }
th[aria-sort="descending"] button::after { content: " ↓"; opacity: 1; }
td.num, th.num { text-align: right; white-space: nowrap; }
tr.former td { opacity: .72; }
.sticky-col { position: sticky; left: 0; background: var(--surface); z-index: 1; }

.mep-cell { display: flex; align-items: center; gap: .65rem; min-width: 12rem; }
.mep-cell > img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--track); flex: none; }
.mep-cell.wide { min-width: 17rem; }
/* Kompaktní tabulka s mnoha číselnými sloupci: záhlaví se zalomí do dvou řádků, ať se vejde na šířku obsahu. */
table.compact th, table.compact td { padding: .6rem .6rem; }
table.compact th:first-child, table.compact td:first-child { padding-left: 1rem; }
table.compact th.num { white-space: normal; line-height: 1.3; min-width: 5.5rem; max-width: 8rem; vertical-align: bottom; }
table.compact .mep-cell.wide { min-width: 15rem; }
table.compact .bar { min-width: 48px; }
table.compact .secondary { color: var(--muted); }
table.compact th.group { text-align: center; white-space: nowrap; border-bottom: 1px solid var(--border); padding-bottom: .35rem; }
table.compact th.group .muted { text-transform: none; letter-spacing: 0; font-weight: 500; }
table.compact thead tr.group-row th[rowspan] { vertical-align: bottom; }
table.compact thead tr:last-child th.num { text-align: right; }
#work td.num { line-height: 1.2; }
#work .count { font-weight: 600; }
/* Třetina v delegaci: tvar (▲ ● ▼) nese význam, barva jen pomáhá. */
.tier { display: inline-flex; align-items: center; justify-content: center; width: 1.35rem; height: 1.35rem; margin-left: .4rem;
  border-radius: 999px; font-size: .7rem; line-height: 1; vertical-align: middle; border: 1px solid transparent; }
.tier-top { background: var(--data); color: var(--surface); }
.tier-mid { background: var(--track); color: var(--text); }
.tier-low { background: transparent; color: var(--muted); border-color: var(--border); }
.tier-none { color: var(--muted); opacity: .6; }
.tier-legend { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .35rem; }
.tier-legend .tier { margin-left: .5rem; }
.tier-legend .tier:first-child { margin-left: 0; }
.mep-cell .mep-party-logo { margin-left: auto; }
.mep-cell a { font-weight: 600; text-decoration: none; color: var(--text); }
.mep-cell a:hover { text-decoration: underline; text-decoration-color: var(--gold); }

/* --- štítky, čísla ------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .6rem; border-radius: 999px;
  font-size: .78rem; font-weight: 600; white-space: nowrap;
  background: var(--chip); color: var(--text); border: 1px solid var(--border);
}
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--badge-dot, var(--muted)); flex: none; }
.badge img { height: 1.1em; width: auto; }
.logo-tile { display: inline-flex; align-items: center; flex: none; padding: 4px; border-radius: 6px; background: #FFFFFF; box-shadow: 0 0 0 1px var(--border); box-sizing: content-box; }
.logo-tile img { height: 100%; width: auto; max-width: 220px; display: block; object-fit: contain; border-radius: 0; box-shadow: none; background: none; }
.group-chip .logo-tile { padding: 2px; }
/* Buňka logo + název (entityCell): logo v pevném slotu, názvy pod sebou lícují. */
.entity-cell { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.entity-text { min-width: 0; }
.entity-cell .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.logo-slot.sm { width: 64px; }
.logo-slot.sm .logo-tile img { max-width: 56px; }
/* Pevná šířka pro logo v tabulkách, aby štítky frakcí lícovaly i u řádků bez loga. */
.logo-slot { display: inline-flex; justify-content: center; width: 96px; flex: none; }
@media (max-width: 640px) { .logo-slot { width: 64px; } .logo-slot .logo-tile img { max-width: 56px; } }
.logo-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .5rem 0; }
.badge.outline { background: transparent; color: var(--muted); }
.badge.outline::before { display: none; }
.badge-link { text-decoration: none; }
.badge-link:hover .badge { border-color: var(--gold); }
.pct small { display: block; color: var(--muted); font-size: .75rem; }
.bar { height: 6px; border-radius: 999px; background: var(--track); overflow: hidden; margin-top: .3rem; min-width: 60px; }
.bar > span { display: block; height: 100%; background: var(--data); border-radius: 999px; }

.pos { font-weight: 600; white-space: nowrap; }
.pos-FOR { color: var(--for-text); }
.pos-AGAINST { color: var(--against-text); }
.pos-ABSTENTION { color: var(--muted); }
.pos-DID_NOT_VOTE { color: var(--muted); font-weight: 500; }
/* Výsledek bez barev pro/proti: text + ikona (✓ / ✕, aria-hidden). */
.result-ADOPTED, .result-REJECTED { color: var(--text); font-weight: 600; }

.split { display: flex; height: 10px; border-radius: 999px; overflow: hidden; min-width: 90px; background: var(--track); }
.split span { display: block; height: 100%; }
.split .s-FOR { background: var(--for); }
.split .s-AGAINST { background: var(--against); }
.split .s-ABSTENTION { background: var(--abst); }
.split .s-DID_NOT_VOTE { background: repeating-linear-gradient(135deg, var(--absent) 0 3px, transparent 3px 6px); }
.legend i.absent { background: repeating-linear-gradient(135deg, var(--absent) 0 3px, transparent 3px 6px) !important; border: 1px solid var(--absent); }

.vote-title { font-weight: 600; text-decoration: none; color: var(--text); }
.vote-title:hover { text-decoration: underline; text-decoration-color: var(--gold); }
.tag { display: inline-block; font-size: .75rem; font-weight: 600; padding: .1rem .5rem; border-radius: 999px; background: var(--chip); color: var(--text); border: 1px solid var(--border); margin-right: .3rem; }
.tag.kind-rejection, .tag.kind-mandate, .tag.kind-urgency, .tag.kind-other { background: var(--chip); color: var(--text); border: 1px solid var(--border); }
.tag.kind-amendment, .tag.kind-split_part { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.note { border-left: 3px solid var(--gold); padding: .5rem .8rem; background: var(--accent-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.avatar-initials { display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--muted); background: var(--track); }

/* --- metriky (karty s velkým číslem) ------------------------------------ */
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.metric .label { font-weight: 600; font-size: .9rem; color: var(--muted); }
.metric .value { font-size: 2.6rem; font-weight: 200; letter-spacing: -.03em; line-height: 1.1; margin: .25rem 0 .35rem; }
.metric .detail { color: var(--muted); font-size: .85rem; }

/* --- profil -------------------------------------------------------------- */
.profile-head { display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: center; }
.portrait { margin: 0; width: 160px; }
.portrait img { width: 160px; height: 200px; object-fit: cover; object-position: top; border-radius: var(--radius); background: var(--track); display: block; box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--gold); }
.portrait figcaption { font-size: .75rem; color: var(--muted); margin-top: .5rem; }
.profile-head p { overflow-wrap: anywhere; }
.facts { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0; }
.foot-only { display: none; }
@media (max-width: 560px) {
  /* Kompaktní hlavička na mobilu: malá fotka vedle jména, odkazy až dole (X4). */
  .profile-head { grid-template-columns: 88px minmax(0, 1fr); gap: 1rem; align-items: start; }
  .portrait, .portrait img { width: 88px; }
  .portrait img { height: 110px; }
  .profile-head h1 { font-size: 1.6rem; }
  .head-only { display: none; }
  .foot-only { display: block; margin-top: 1rem; }
}

/* graf docházky */
.chart { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding-top: .5rem; }
.chart-wrap { display: flex; gap: .5rem; margin-bottom: 2rem; }
.chart-wrap .chart { flex: 1; background: linear-gradient(to bottom, var(--track) 1px, transparent 1px) 0 .5rem / 100% calc((100% - .5rem) / 2) repeat-y; }
.chart-y { display: flex; flex-direction: column; justify-content: space-between; font-size: .75rem; color: var(--muted); height: 150px; padding-top: .2rem; text-align: right; white-space: nowrap; }
.chart .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-width: 6px; background: none; border: 0; padding: 0; cursor: pointer; position: relative; font: inherit; color: inherit; }
.chart .col .bar-fill { display: block; background: var(--data); border-radius: 6px 6px 2px 2px; opacity: .85; transform-origin: bottom; transition: opacity .2s ease; }
.chart .col.active .bar-fill, .chart .col:hover .bar-fill { opacity: 1; box-shadow: 0 0 0 2px var(--gold); }
.chart .col .bar-fill.zero { height: 3px !important; background: var(--data); opacity: .5; }
.chart .col-label { position: absolute; top: 100%; left: 0; right: 0; text-align: center; font-size: .75rem; line-height: 1.15; color: var(--muted); padding-top: 3px; }
.contact-form { display: grid; gap: .8rem; max-width: 40rem; margin: 1rem 0; }
.contact-form label { display: grid; gap: .3rem; font-weight: 600; font-size: .9rem; }
.contact-form textarea, .contact-form input[type="url"], .contact-form input[type="email"] {
  font: inherit; font-weight: 400; padding: .6rem .9rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); width: 100%; }
.contact-form textarea { resize: vertical; }
.btn-send { justify-self: start; border: 0; cursor: pointer; background: var(--navy); color: #F8FAFC; font: inherit; font-weight: 600; }
:root[data-theme="dark"] .btn-send { background: var(--accent); color: var(--navy); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-send { background: var(--accent); color: var(--navy); } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.card { position: relative; }
.csv-btn { margin-top: .5rem; min-height: 32px; padding: 0 .8rem; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--link); font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; }
.csv-btn:hover { border-color: var(--gold); }
.csv-btn { margin: 0 0 .6rem; }
.more-btn { margin-top: .6rem; min-height: 40px; padding: 0 1rem; border-radius: 999px; border: 1px solid var(--border); background: var(--chip); color: var(--text); font: inherit; font-size: .9rem; cursor: pointer; }
.more-btn:hover { border-color: var(--gold); }
.chart-detail { margin: .25rem 0 0; min-height: 1.5em; }

ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: .55rem 0; border-bottom: 1px solid var(--border); }
ul.plain li:last-child { border-bottom: none; }

.own-list { margin-top: .75rem; }
.own-list summary { cursor: pointer; }
.own-list ul { margin-top: .5rem; }
.list-card { margin-bottom: .85rem; }
.list-card .vote-title { display: inline-block; margin: .15rem 0; }
.list-card p { margin: .4rem 0; }
.positions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.positions-grid h3 { margin-top: 0; }

/* --- úvod: delegace (půlkruh) ------------------------------------------- */
.hemi { position: relative; width: 400px; max-width: 100%; aspect-ratio: 400 / 215; margin: .5rem auto 0; }
.hemi .seat {
  position: absolute; width: 5.4%; aspect-ratio: 1; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  transform: translate(-50%, -50%); transition: transform .2s ease, opacity .2s ease, box-shadow .2s ease;
}
.hemi .seat:hover, .hemi .seat:focus-visible { transform: translate(-50%, -50%) scale(1.35); }
.hemi .seat.dim { opacity: .18; }
.hemi .seat.hi { box-shadow: 0 0 0 3px rgba(245, 158, 11, .6); }
.hemi-center { position: absolute; left: 50%; bottom: 2%; transform: translateX(-50%); width: 34%; text-align: center; line-height: 1.2; }
.hemi-names { min-height: 3em; margin: 1rem 0 0; color: var(--muted); }
.hemi-center .n { font-size: 2.6rem; font-weight: 200; line-height: 1; letter-spacing: -.03em; }
.group-chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.2rem; }
.group-chip {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 36px; padding: 0 .8rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--chip); color: var(--text); font: inherit; font-size: .82rem; cursor: pointer;
  transition: box-shadow .2s ease;
}
.group-chip:hover, .group-chip:focus-visible, .group-chip.on { box-shadow: 0 0 0 2px var(--gold); }
.group-chip .dot { width: 10px; height: 10px; border-radius: 50%; }

/* --- úvod: rozdělená hlasování ------------------------------------------ */
.vrow { position: relative; display: block; padding: .75rem .85rem; border-radius: var(--radius-sm); text-decoration: none; color: var(--text); transition: background .2s ease; }
.vrow:hover, .vrow:focus-visible { background: var(--accent-soft); }
.vrow-head { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; margin-bottom: .5rem; }
.vrow-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vrow .split { height: 12px; }
.vrow .tip { display: block; margin-top: .3rem; font-size: .75rem; color: var(--muted); }

/* Štítek výsledku: ikona v kolečku + slovo; ✓ plné kolečko, ✕ obrys (tvar nese význam, ne barva). */
.res-badge { display: inline-flex; align-items: center; align-self: flex-start; flex: none; gap: .4rem; font-size: .8125rem; font-weight: 600; line-height: 1.2; padding: .22rem .65rem .22rem .3rem; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); white-space: nowrap; }
.res-ic { width: 1.3rem; height: 1.3rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: .72rem; font-weight: 800; flex: none; }
.res-ADOPTED .res-ic { background: var(--text); color: var(--surface); }
.res-REJECTED .res-ic { border: 1.5px solid var(--text); color: var(--text); }
.res-NONE .res-ic, .res-LAPSED .res-ic, .res-WITHDRAWN .res-ic { border: 1.5px dashed var(--muted); color: var(--muted); }
.res-txt::first-letter { text-transform: uppercase; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-top: .8rem; font-size: .75rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* --- karty poslanců ------------------------------------------------------ */
.mep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1rem; }
.mep-card {
  display: block; padding: 1.15rem; border-radius: var(--radius); text-decoration: none; color: var(--text);
  background: var(--glass); border: 1px solid var(--border); backdrop-filter: blur(10px); box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.mep-card:hover, .mep-card:focus-visible { transform: scale(1.02); box-shadow: var(--shadow-hover); }
.mep-card.former { opacity: .75; }
.mep-card-head { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.mep-card-head > img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--track); flex: none; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ring, var(--muted)); }
.mep-card-head .name { font-weight: 600; font-size: .98rem; line-height: 1.25; }
.mep-card-head .sub { font-size: .78rem; color: var(--muted); }
.mep-card-body { display: flex; align-items: center; gap: 1rem; }
.donut { position: relative; width: 78px; height: 78px; flex: none; }
.donut svg { display: block; }
.donut .track { stroke: var(--track); }
.donut .val { stroke: var(--cz-blue); transition: stroke-dashoffset 1.2s cubic-bezier(.2, .7, .2, 1); }
.donut .center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; }
.donut .center b { font-size: .95rem; }
.donut .center small { font-size: .75rem; color: var(--muted); }
.mini { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .55rem; }
.mini-row { font-size: .75rem; color: var(--muted); }
.mini-row .top { display: flex; justify-content: space-between; margin-bottom: .2rem; }
.mini-row .top b { color: var(--text); }
.mini-bar { height: 5px; border-radius: 999px; background: var(--track); overflow: hidden; }
.mini-bar span { display: block; height: 100%; border-radius: 999px; }

/* --- matice shody --------------------------------------------------------- */
table.matrix { font-size: .8rem; width: auto; }
table.matrix th, table.matrix td { padding: .3rem .35rem; border: 1px solid var(--border); text-align: center; }
table.matrix .mx-head { writing-mode: vertical-rl; transform: rotate(180deg); text-transform: none; letter-spacing: 0; font-size: .78rem; white-space: nowrap; padding: .5rem .2rem; }
table.matrix .mx-head a { color: var(--text); text-decoration: none; }
table.matrix .mx-row { text-align: left; white-space: nowrap; text-transform: none; letter-spacing: 0; font-size: .82rem; color: var(--text); }
table.matrix .mx-row a { color: var(--text); text-decoration: none; font-weight: 600; }
/* Škála je omezená (--mx-max), aby text měl vždy kontrast aspoň 4,5 : 1 (světlý režim tmavé písmo, tmavý světlé). */
table.matrix td.mx { background: color-mix(in srgb, var(--data) calc(var(--p) * var(--mx-max)), var(--surface)); min-width: 2.4rem; }
table.matrix td.mx small { display: block; font-size: .75rem; }
table.matrix td.mx-weak { background: var(--bg); color: var(--muted); }
table.matrix td.mx { color: var(--text); }
table.matrix td.mx-self, table.matrix td.mx-none { color: var(--muted); background: var(--bg); }
table.matrix tbody tr:hover { background: none; }

/* --- úvod: shrnutí zasedání (starší třídy, stále používané) ---------------- */
.session-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .5rem; }
.session-list { margin: 0; padding-left: 1.1rem; }
.session-list li { margin: .25rem 0; }

/* --- patička, stavy ------------------------------------------------------- */
.source { font-size: .82rem; color: var(--muted); margin-top: .9rem; }
.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; }
.site-footer .inner { max-width: 1280px; margin: 0 auto; padding: 1.5rem 20px 2rem; }
.error { background: #FEE2E2; color: #7F1D1D; padding: 1rem; border-radius: var(--radius-sm); }
.mobile-only { display: none; }
@media (max-width: 640px) {
  .desktop-only, .controls label.desktop-only { display: none; }
  .mobile-only { display: revert; }
  label.mobile-only { display: inline-flex; }
  .card { padding: 1.1rem; }
  .section-head h2 { font-size: 1.4rem; }
}

/* --- pohyb ---------------------------------------------------------------- */
@keyframes rise { from { transform: translateY(18px); } to { transform: none; } }
@keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes twinkle { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
@keyframes drift { from { transform: translateY(0) rotate(0deg); } to { transform: translateY(140px) rotate(12deg); } }

/* Obsah je vždy viditelný (i bez JS a při tisku); animuje se jen posun a růst při vjetí do obrazu. */
/* backwards (ne both): po doběhnutí nezůstane transform, který by z bloku udělal stacking context a schoval vyskakovací prvky pod sticky lištu. */
.js .reveal.in { animation: rise .7s cubic-bezier(.2, .7, .2, 1) backwards; }
.grow { transform-origin: left center; }
.js .in .grow, .js .grow.in { animation: grow-x 1.1s cubic-bezier(.2, .7, .2, 1) both; }
.js .in .chart .bar-fill { animation: grow-y .9s cubic-bezier(.2, .7, .2, 1) both; }
.star { animation: twinkle 4s ease-in-out infinite; }
.parallax { animation: drift linear both; animation-timeline: scroll(root); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .grow, .js .chart .bar-fill { opacity: 1; transform: none; animation: none !important; }
  .star, .parallax { animation: none; }
  .mep-card, .hemi .seat, .donut .val { transition: none; }
  .mep-card:hover { transform: none; }
  @view-transition { navigation: none; }
}

/* --- tisk ------------------------------------------------------------------- */
@media print {
  :root { --bg: #fff; --surface: #fff; --text: #000; --muted: #333; --border: #bbb; --shadow: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .site-header nav, .theme-toggle, .skip-link, .subnav, .controls, .more-btn, .csv-btn, .share-btn, .info-wrap, .hero-stars, .hero-emblem { display: none !important; }
  .site-header, .hero { background: none !important; color: #000 !important; }
  .site-header .brand, .hero h1, .hero p.lead, .kpi, .kpi .k-label, .kpi .k-note, .entry, .entry span { color: #000 !important; background: none !important; }
  .card, .table-wrap, .mep-card { box-shadow: none; break-inside: avoid; backdrop-filter: none; }
  tr[hidden] { display: table-row !important; }
  .reveal, .grow, .chart .bar-fill { animation: none !important; transform: none !important; }
  a { color: #000; }
  main a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .75em; color: #333; word-break: break-all; }
  .split span, .legend i, .badge::before { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Dotykové cíle aspoň 44 px (U10). */
@media (pointer: coarse) {
  .group-chip, .csv-btn, .more-btn, .subnav a, .theme-toggle, .chip { min-height: 44px; }
  .site-header nav a, .subnav a, summary, .more-btn, .chip { min-height: 44px; display: inline-flex; align-items: center; }
  summary { display: flex; }
  .brand, th button { min-height: 44px; }
  .controls label { min-height: 44px; padding-block: .5rem; }
  .controls input[type="checkbox"], .controls input[type="radio"] { width: 1.25rem; height: 1.25rem; }
  .hemi .seat { pointer-events: none; }  /* na dotyku jsou sedadla malá; poslance otevřou štítky pod půlkruhem */
  .csv-btn { padding: 0 1rem; }
}

/* --- srovnání s mediánem (benchRow) ------------------------------------------ */
.bench { margin-top: .75rem; }
.bench-top { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.bench-label { font-size: .82rem; color: var(--muted); }
.bench-top b { font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em; }
.bench-strip { position: relative; height: 17px; margin: .25rem 0 .15rem; }
.bench-track { position: absolute; left: 0; right: 0; top: 7px; height: 3px; border-radius: 2px; background: var(--track); }
.bench-dot { position: absolute; top: 3px; width: 11px; height: 11px; border-radius: 50%; background: var(--data); box-shadow: 0 0 0 2px var(--surface); transform: translateX(-50%); }
.bench-med { position: absolute; top: 0; width: 3px; height: 17px; border-radius: 2px; background: var(--bench); box-shadow: 0 0 0 1.5px var(--surface); transform: translateX(-50%); z-index: 2; }
.bench-note { margin: 0; font-size: .8rem; color: var(--muted); }
.bench.compact { margin-top: 0; min-width: 9rem; }
.bench.compact .bench-top b { font-size: 1rem; }
.bench-key { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; align-items: center; margin: 0 0 1rem; }
.bench-key i { display: inline-block; vertical-align: middle; margin-right: .4rem; }
.bench-key .k-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--data); }
.bench-key .k-tick { width: 3px; height: 13px; border-radius: 2px; background: var(--bench); }

/* --- karta poslance (U2) ------------------------------------------------------ */
.mep-card { position: relative; overflow: hidden; border-left: 4px solid var(--g, var(--muted)); }
.mep-card-head { align-items: flex-start; }
.mep-card-head > img, .mep-card-head .avatar-initials { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--g, var(--muted)); }
.mep-card-head .logo-tile { margin-left: auto; }
.mep-card-head .logo-tile img { max-width: 72px; }
.mep-card-head > div { flex: 1; }
.mep-card .sub .dot, .group-head .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--g, var(--muted)); margin-right: .35rem; vertical-align: middle; }
.group-head .dot { width: 10px; height: 10px; margin: 0; }
.group-block { margin-bottom: 1.75rem; }
.group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem .75rem; margin: 0 0 .75rem; font-size: 1.05rem; }
.group-head .small { font-weight: 400; }
.hemi-label { position: absolute; transform: translate(-50%, -50%); font-size: .75rem; font-weight: 600; color: var(--muted); white-space: nowrap; pointer-events: none; }
.hemi { aspect-ratio: 400 / 222; }
.cz-counts small { color: var(--muted); }
/* Mobil: kompaktní řádky (avatar, jméno, frakce, docházka a proužek) – U9. */
@media (max-width: 640px) {
  .mep-grid { grid-template-columns: 1fr; gap: .5rem; }
  .mep-card { padding: .75rem .9rem; }
  .mep-card:hover, .mep-card:focus-visible { transform: none; }
  .mep-card-head { margin-bottom: .25rem; gap: .6rem; }
  .mep-card-head > img, .mep-card-head .avatar-initials { width: 40px !important; height: 40px !important; }
  .mep-card-head .logo-tile, .mep-card .bench + .bench, .mep-card .bench-note, .mep-card .note { display: none; }
  .mep-card .bench { margin-top: .25rem; }
  .mep-card .bench-top b { font-size: 1rem; }
}

/* --- profil (U5) --------------------------------------------------------------- */
.profile-nav { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: .5rem 0; margin: 0 0 1rem; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.profile-nav a { white-space: nowrap; }
main h2[id] { scroll-margin-top: 4rem; }
.timeline { width: 100%; height: auto; display: block; }
.timeline .tl-row { font-size: 13px; fill: var(--muted); }
.timeline .tl-seg { font-size: 13px; font-weight: 600; }
.timeline .tl-year { font-size: 12px; fill: var(--muted); }
.timeline .tl-tick { stroke: var(--border); }
.metric .bench { margin-top: 0; }
.metric .bench-label { font-weight: 600; color: var(--muted); font-size: .9rem; }
.metric .bench-top b { font-size: 2rem; font-weight: 300; letter-spacing: -.02em; }
.metric .bench-top { flex-direction: column; align-items: flex-start; gap: .1rem; padding-right: 2rem; }

/* --- detail hlasování (U6) ------------------------------------------------------ */
.value-sentence { font-size: 1.3rem; font-weight: 600; line-height: 1.25; margin: .3rem 0 .5rem; padding-right: 2rem; }
.cz-dots { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: 0 0 .5rem; }
.cz-dot-group { display: inline-flex; align-items: center; gap: 4px; }
.cz-dot-label { font-size: .8rem; color: var(--muted); margin-right: .25rem; }
.cz-dot { width: 16px; height: 16px; border-radius: 50%; display: inline-block; }
.cz-dot.d-FOR { background: var(--for); }
.cz-dot.d-AGAINST { background: var(--against); }
.cz-dot.d-ABSTENTION { background: var(--abst); }
.cz-dot.d-DID_NOT_VOTE { background: repeating-linear-gradient(135deg, var(--absent) 0 3px, transparent 3px 6px); box-shadow: inset 0 0 0 1px var(--absent); }

/* --- Kde se Češi rozdělili (U8) ---------------------------------------------- */
.split-score { margin: .4rem 0 .2rem; }
.split-score strong { font-size: 1.25rem; font-weight: 600; }
.names summary { cursor: pointer; color: var(--link); }
.names a, .hemi-names a, .positions-grid a { text-decoration: none; }
.names a:hover, .names a:focus-visible, .hemi-names a:hover, .positions-grid a:hover { text-decoration: underline; text-decoration-color: var(--gold); }

/* Vlastní práce: podnadpisy a štítek typu procedury (legislativní zvýrazněné). */
.own-sub { font-size: 1.05rem; margin: 1.4rem 0 .6rem; }
.own-list .badge { font-size: .75rem; padding: .05rem .45rem; margin-left: .35rem; vertical-align: middle; }
.own-list .badge.leg { color: var(--text); border-color: var(--gold); }

/* Vysvětlit s AI (odkazy ven s připraveným dotazem). */
.ask-ai { margin: 1rem 0; }
.ask-ai summary { cursor: pointer; }
.ask-ai-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: .6rem 0; }
.ask-ai-prompt { white-space: pre-wrap; background: var(--bg, transparent); border: 1px solid var(--border); border-radius: 8px; padding: .6rem .8rem; margin: 0; max-height: 12rem; overflow: auto; font-family: inherit; }
.ask-ai-row .more-btn { margin-top: 0; display: inline-flex; align-items: center; text-decoration: none; }
.th-sub { font-size: .68rem; text-transform: none; letter-spacing: 0; font-weight: 500; margin-top: .15rem; }
.fn-line { color: var(--text); opacity: .85; margin-top: .1rem; }
.fn-line abbr { text-decoration: none; }

.th-note { font-weight: 400; text-transform: none; letter-spacing: 0; white-space: nowrap; }

/* Úzké displeje (320 px): nic nesmí natáhnout stránku do šířky (X2). */
.controls select, .controls input[type="search"], .controls input[type="text"] { max-width: 100%; }
.chart-wrap .chart { min-width: 0; max-width: 100%; }
@media (max-width: 400px) {
  .chart { gap: 2px; }
  .chart .col { min-width: 3px; }
  .site-header nav { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
}
.controls { min-width: 0; max-width: 100%; }
.grid-2 > * { min-width: 0; }

/* Stavy načítání (X8): kostra místo holého textu. Text „Načítám…“ zůstává pro čtečky (font-size 0). */
.loading { font-size: 0; line-height: 0; color: transparent; }
.loading::before { content: ""; display: block; height: 6rem; border-radius: 8px;
  background: linear-gradient(90deg, var(--track) 25%, var(--surface) 50%, var(--track) 75%); background-size: 200% 100%; animation: sk 1.2s infinite; }
td.loading::before, li.loading::before { height: 2.5rem; }
@keyframes sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .loading::before { animation: none; } }
.error .more-btn { margin-left: .5rem; }

/* Mobil: tabulky jako karty (X1). Pod 640 px je každý řádek karta, aby výsledek a hlasy Čechů nebyly za vodorovným posunem. */
@media (max-width: 640px) {
  table.stack thead, table.work-cards thead { display: none; }
  table.stack, table.stack tbody, table.work-cards, table.work-cards tbody { display: block; }
  table.stack tr, table.work-cards tr { display: grid; grid-template-columns: 1fr auto; gap: .3rem .75rem; padding: .9rem 1rem; border-bottom: 1px solid var(--border); }
  table.stack tr[hidden] { display: none; }
  table.stack td, table.work-cards td { display: block; padding: 0; border: 0; text-align: left; white-space: normal; }
  table.stack td.date { grid-column: 1; grid-row: 1; font-size: .8rem; color: var(--muted); }
  table.stack td.result { grid-column: 2; grid-row: 1; justify-self: end; text-align: right; }
  table.stack td.title { grid-column: 1 / -1; }
  table.stack td.extra { grid-column: 1 / -1; }
  /* tabulka témat: název přes celý řádek, tři čísla vedle sebe s popiskem, rozložení hlasů pod nimi */
  table.topics tr { grid-template-columns: repeat(3, 1fr); }
  table.topics td.title, table.topics td.extra { grid-column: 1 / -1; }
  table.topics td.extra { order: 9; }
  table.topics td[data-label]::before, table.work-cards td[data-label]::before { content: attr(data-label); display: block; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
  table.topics td.num, table.work-cards td.num { text-align: left; }
  /* Práce na textech: jméno přes celý řádek, čtyři kategorie 2 × 2, pak účast a návrhy usnesení */
  table.work-cards tr { grid-template-columns: 1fr 1fr; }
  table.work-cards td:first-child { grid-column: 1 / -1; }
  table.work-cards .mep-party-logo { display: none; }
  table.work-cards .mep-cell { min-width: 0; }
  table.work-cards td[data-label] { padding-top: .35rem; }
}
.own-row td { font-weight: 600; background: var(--accent-soft); }
.strong-line { font-weight: 600; color: var(--text); max-width: 46rem; }

/* Sdílení (share.js, N1–N2): tlačítko v hlavičce stránky a panel s náhledem karty */
.back-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin: 0 0 .9rem; min-height: 44px; }
.back-row > p { margin: 0; }
.back-row .share-btn { margin-left: auto; }
.share-btn { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: 0 1.15rem; border-radius: 999px; border: 1px solid var(--text);
  background: var(--text); color: var(--surface); font: inherit; font-size: .95rem; font-weight: 700; cursor: pointer; flex: none; }
.share-btn:hover { box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 55%, transparent); }
.share-btn.outline { min-height: 36px; padding: 0 .9rem; background: var(--surface); color: var(--text); border-color: var(--border); font-size: .875rem; font-weight: 600; }
@media (pointer: coarse) { .share-btn.outline { min-height: 44px; } }
.view-tools { display: flex; align-items: flex-end; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.view-tools > .controls { flex: 1 1 auto; margin-bottom: 0; }
.view-tools > .share-btn { margin-bottom: .2rem; }
/* akce v ⓘ popoveru u čísla: Sdílet číslo a Citovat */
.metric > .info-wrap.corner { position: absolute; top: .55rem; right: .55rem; }
.metric:has(> .info-wrap.corner) > .label, .metric:has(> .info-wrap.corner) .bench-top { padding-right: 2.6rem; }
@media (pointer: coarse) { .metric:has(> .info-wrap.corner) > .label, .metric:has(> .info-wrap.corner) .bench-top { padding-right: 3.2rem; } }
.pop-acts { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .7rem; }
.pop-act { display: inline-flex; align-items: center; gap: .35rem; min-height: 40px; padding: 0 .9rem; border-radius: 999px; border: 1px solid var(--border);
  background: var(--chip); color: var(--text); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.pop-act:hover, .pop-act:focus-visible { border-color: var(--gold); }
.pop-act.done { background: var(--text); color: var(--surface); }
@media (pointer: coarse) { .pop-act { min-height: 44px; } }

.share-dlg { width: min(920px, calc(100vw - 2rem)); max-width: none; max-height: calc(100dvh - 2rem); padding: 0; border: 0; border-radius: 26px;
  background: var(--surface); color: var(--text); box-shadow: 0 30px 80px -20px rgba(2, 6, 23, .55); overflow: auto; overscroll-behavior: contain; }
.share-dlg::backdrop { background: rgba(2, 6, 23, .55); backdrop-filter: blur(3px); }
.share-dlg.sd-fallback { position: fixed; z-index: 2000; inset: 1rem; margin: auto; height: fit-content; }
.sd-grip { display: none; }
.sd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.4rem 1.6rem .4rem; }
.sd-head h2 { margin: 0; font-size: 1.5rem; }
.sd-sub { margin: .2rem 0 0; color: var(--muted); font-size: .95rem; }
.sd-x { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: var(--chip); color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.sd-body { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 1.4rem; padding: .6rem 1.6rem 1.6rem; }
.sd-stage { background: var(--stage); border-radius: 22px; padding: 1.4rem; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; }
.sd-preview { height: 500px; width: 100%; display: flex; align-items: center; justify-content: center; min-width: 0; border-radius: 10px; }
.sd-preview.tall { height: 540px; }
.sd-preview > img { height: 100%; width: auto; max-width: 100%; object-fit: contain; border-radius: 10px; box-shadow: 0 18px 40px -16px rgba(2, 6, 23, .6); }
.sd-preview.loading { background: linear-gradient(90deg, var(--track) 25%, var(--surface) 50%, var(--track) 75%); background-size: 200% 100%; animation: sk 1.2s infinite; }
.sd-preview.loading > * { opacity: .25; }
.sd-preview:has(.sd-carousel) { flex-direction: column; gap: .6rem; }
.sd-carousel { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; width: 100%; height: calc(100% - 22px); padding: 0 12%; scrollbar-width: none; border-radius: 10px; }
.sd-carousel::-webkit-scrollbar { display: none; }
.sd-carousel img { height: 100%; width: auto; flex: none; scroll-snap-align: center; border-radius: 10px; box-shadow: 0 18px 40px -16px rgba(2, 6, 23, .6); }
.sd-dots { display: flex; gap: 6px; justify-content: center; }
.sd-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: .4; }
.sd-dots i.on { opacity: 1; background: var(--text); }
.sd-meta { margin: .8rem 0 0; font-size: .85rem; color: var(--text); opacity: .8; }
.sd-ctl { display: flex; flex-direction: column; min-width: 0; }
.sd-lab { margin: 1.1rem 0 .5rem; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sd-lab:first-child { margin-top: .2rem; }
.sd-lab label { cursor: default; }
.sd-formats { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--chip); border-radius: 18px; }
.sd-formats button { display: flex; flex-direction: column; align-items: center; gap: .15rem; min-height: 72px; padding: .5rem .3rem; border: 0; border-radius: 14px;
  background: transparent; color: var(--text); opacity: .72; font: inherit; cursor: pointer; }
.sd-formats button[aria-checked="true"] { opacity: 1; background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(15, 23, 42, .1), 0 6px 16px -10px rgba(15, 23, 42, .4); }
.sd-fn { font-weight: 700; font-size: .92rem; }
.sd-fr { font-size: .75rem; }
.sd-actions { display: grid; gap: .6rem; margin-top: 1.1rem; }
.sd-primary, .sd-secondary { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; border-radius: 999px; font: inherit; font-weight: 700; cursor: pointer;
  transition: background .2s ease, color .2s ease; }
.sd-primary { min-height: 54px; border: 0; background: var(--text); color: var(--surface); font-size: 1.05rem; }
.sd-primary.ok, .sd-secondary.ok { background: var(--ok); color: #fff; }
.sd-secondary { min-height: 46px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: .95rem; }
.sd-secondary[hidden] { display: none; }
.sd-link { display: flex; gap: .5rem; }
.sd-link input { flex: 1; min-width: 0; min-height: 46px; padding: 0 .9rem; border: 1px solid var(--border); border-radius: 14px; background: var(--chip); color: var(--text); font: inherit; font-size: .95rem; }
.sd-btn { display: inline-flex; align-items: center; gap: .4rem; min-height: 46px; padding: 0 1rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; flex: none; }
.sd-textbtn { align-self: flex-start; display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; margin-top: .3rem; padding: 0 .1rem; border: 0; background: none; color: var(--link, var(--accent)); font: inherit; font-weight: 700; cursor: pointer; }
.sd-nets { display: grid; grid-template-columns: repeat(4, 1fr); gap: .3rem; }
.sd-nets a { display: flex; flex-direction: column; align-items: center; gap: .35rem; min-height: 44px; padding: .2rem 0; color: var(--text); text-decoration: none; font-size: .82rem; }
.sd-ni { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--border); background: var(--chip); display: inline-flex; align-items: center; justify-content: center; }
.sd-nets a:hover .sd-ni, .sd-nets a:focus-visible .sd-ni { border-color: var(--gold); }
.sd-trust { display: flex; gap: .55rem; align-items: flex-start; margin: 1.1rem 0 0; padding-top: 1rem; border-top: 1px solid var(--border); font-size: .82rem; color: var(--muted); }
.sd-trust svg { flex: none; color: var(--for-text); margin-top: .1rem; }
.sd-toast { position: fixed; left: 50%; bottom: 1.5rem; z-index: 3; max-width: calc(100vw - 2rem); padding: .65rem 1.1rem; border-radius: 999px; background: var(--text); color: var(--surface);
  font-size: .9rem; font-weight: 600; opacity: 0; transform: translate(-50%, 8px); pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.sd-toast.show { opacity: 1; transform: translate(-50%, 0); }
.sd-toast.bad { background: var(--danger); color: #fff; }
.share-dlg :focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
@media (max-width: 640px) {
  .share-dlg { width: 100%; max-width: 100%; max-height: 94dvh; margin: auto 0 0; border-radius: 26px 26px 0 0; animation: sd-up .28s cubic-bezier(.2, .8, .2, 1); }
  .sd-grip { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--track); margin: .55rem auto 0; }
  .sd-head { position: sticky; top: 0; z-index: 2; background: var(--surface); padding: .6rem 1rem .5rem; }
  .sd-head h2 { font-size: 1.3rem; }
  .sd-body { grid-template-columns: 1fr; gap: .2rem; padding: .2rem 1rem 0; }
  .sd-stage { padding: .9rem; border-radius: 18px; }
  .sd-preview { height: 310px; }
  .sd-preview.tall { height: 360px; }
  .sd-actions { position: sticky; bottom: 0; z-index: 2; margin: .9rem -1rem 0; padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom)); background: var(--surface);
    border-top: 1px solid var(--border); order: 9; }
  .sd-ctl { padding-bottom: 0; }
  .sd-trust { margin-bottom: .6rem; }
  .sd-toast { bottom: calc(6rem + env(safe-area-inset-bottom)); }
}
@keyframes sd-up { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .share-dlg { animation: none; } .sd-preview.loading { animation: none; } .sd-toast { transition: none; } }
@media print { .share-btn, .share-dlg, .back-row .share-btn { display: none !important; } }

/* Úvod jako rozcestník (scripts/hub.py, hub.js) */
.hub-hero { padding: 2.2rem 0 1.2rem; }
.hub-hero h1 { font-size: clamp(2rem, 6.5vw, 3rem); margin-bottom: .4rem; }
.hub-search { position: relative; max-width: 40rem; margin: 1.1rem 0 .6rem; }
.hub-search input { width: 100%; font: inherit; font-size: 1.05rem; padding: .85rem 1.1rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); box-shadow: var(--shadow); min-height: 48px; }
.hub-search input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.hub-results { position: absolute; z-index: 40; left: 0; right: 0; margin: .3rem 0 0; padding: .4rem; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow); max-height: 22rem; overflow: auto; }
.hub-results a { display: grid; grid-template-columns: 6.2rem 1fr; gap: .1rem .6rem; padding: .55rem .6rem; border-radius: 8px; text-decoration: none; color: var(--text); }
.hub-results a:hover, .hub-results a.on { background: var(--chip); }
.hub-results .hub-kind { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); grid-row: span 2; align-self: center; }
.hub-results .hub-label { font-weight: 600; }
.hub-none { padding: .6rem; }
.hub-block { margin: 2.2rem 0; }
.hub-block h2 { margin-bottom: .6rem; }
.hub-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 1.25rem; align-items: start; }
.hub-lists.three { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.hub-list h3 { margin: 0 0 .2rem; }
.hub-vote { display: grid; gap: .35rem; margin-top: .75rem; }
.hub-strip { display: flex; flex-wrap: wrap; gap: .8rem 1.4rem; }
.hub-group { display: grid; gap: .3rem; }
.hub-avs { display: flex; flex-wrap: wrap; gap: .3rem; }
.hub-av img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--track); display: block; }
.hub-av:focus-visible img, .hub-av:hover img { box-shadow: 0 0 0 3px var(--gold); }
.hub-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 1rem; }
.hub-tile { text-decoration: none; color: var(--text); display: grid; gap: .3rem; align-content: start; min-height: 9rem; }
.hub-tile:hover, .hub-tile:focus-visible { box-shadow: var(--shadow-hover); }
.hub-tile h3 { margin: 0; font-size: 1.05rem; }
.hub-tile p { margin: 0; }
.hub-tile .hub-avs { gap: 0; }
.hub-tile .hub-avs img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; object-position: top; margin-right: -.4rem; box-shadow: 0 0 0 2px var(--surface); background: var(--track); }
.hub-num { font-size: 2rem; font-weight: 300; letter-spacing: -.02em; }
.hub-logos { display: flex; flex-wrap: wrap; gap: .35rem; }
.hub-logo { height: 24px; width: auto; max-width: 70px; background: #fff; border-radius: 4px; padding: 2px; box-sizing: content-box; object-fit: contain; }
.hub-about li { margin: .4rem 0; }

.cz-row td { background: var(--accent-soft); }
.party-votes { display: flex; flex-wrap: wrap; gap: .4rem .8rem; margin: 0 0 1rem; }
.party-votes li { background: var(--chip); border-radius: 999px; padding: .3rem .8rem; }


/* Kompaktní hero (poslanci.html): čísla a témata pod nadpisem, vlajka v hvězdách vpravo na výšku textu */
.hero-compact { padding-top: 1.6rem; padding-bottom: 1.8rem; gap: 1rem 3rem; align-items: center; }
.hero-compact .hero-copy { flex: 1 1 560px; }
.hero-compact h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); margin-bottom: .5rem; }
.hero-compact .kpis { padding: 0; margin: 1.1rem 0 0; max-width: 40rem; }
.hero-compact .kpi { padding: 1rem 1.2rem; }
.hero-compact .kpi .k-value { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.hero-compact .entries { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin-top: .8rem; }
.hero-compact .entry-label { font-size: .8rem; font-weight: 600; color: #94A3B8; text-transform: uppercase; letter-spacing: .06em; }
.hero-compact .entry-topics { display: contents; }
@media (max-width: 760px) { .hero-compact { padding-top: 1.2rem; } .hero-compact h1 { font-size: clamp(1.9rem, 8vw, 2.4rem); } }

table.compact th.secondary-group { color: var(--muted); }
table.compact th.secondary-group .muted { text-transform: none; letter-spacing: 0; font-weight: 500; }

/* Tabulka práce: záhlaví bez zalamování, jednotné zarovnání, skupiny oddělené svislou linkou (S1). */
#work thead th { white-space: nowrap; vertical-align: bottom; }
#work thead th.num { min-width: 0; width: 6rem; text-align: right; }
#work thead th.num button::after { content: ""; }
#work thead th[aria-sort="ascending"] button::after { content: " ↑"; opacity: 1; }
#work thead th[aria-sort="descending"] button::after { content: " ↓"; }
#work thead th.group { text-align: center; }
#work .grp-start { border-left: 1px solid var(--border); }
#work td.num { padding-right: 1.1rem; }
#work thead th.num { padding-right: 1.1rem; }
/* Rozbalovací vysvětlení místo odstavců nad daty (S1). */
details.explain { margin: 0 0 1rem; max-width: 72ch; font-size: .875rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .55rem .9rem; }
details.explain summary { cursor: pointer; font-weight: 600; color: var(--muted); min-height: 24px; }
details.explain[open] summary { margin-bottom: .5rem; }
details.explain p { margin: .5rem 0; }
@media (max-width: 640px) { #work .grp-start { border-left: 0; } #work td.num { padding-right: 0; } }
#work thead th.tiercol { padding-right: calc(1.1rem + 1.75rem); }
@media (max-width: 640px) { #work thead th.tiercol { padding-right: 0; } }

/* ⓘ vysvětlivka (popover v top layer; fallback bez Popover API) */
.info-wrap { display: inline-block; vertical-align: middle; margin-left: .35rem; }
.info-btn { width: 30px; height: 30px; padding: 0; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--muted); font: inherit; font-size: 1rem; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.info-btn:hover, .info-btn[aria-expanded="true"] { color: var(--text); border-color: var(--muted); background: var(--chip); }
@media (pointer: coarse) { .info-btn { width: 44px; height: 44px; } }
.info-pop { position: fixed; inset: auto; margin: 0; width: min(28rem, calc(100vw - 1rem)); max-height: min(70vh, 32rem); overflow: auto; padding: .9rem 1.1rem; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow); font-size: .875rem; line-height: 1.5; font-weight: 400; text-transform: none; letter-spacing: 0; text-align: left; z-index: 1000; }
.info-pop p { margin: 0 0 .6rem; max-width: none; color: var(--text); font-size: inherit; }
.info-pop p:last-child { margin-bottom: 0; }
.info-pop h3 { margin: 0 0 .4rem; font-size: .95rem; }
.no-popover .info-pop { display: none; }
.no-popover .info-pop.open { display: block; }
.lead-row { display: flex; align-items: flex-start; gap: .5rem; margin: 0 0 1.5rem; }
.lead-row .lead { margin: 0; }
.lead-row .info-wrap { margin: -.15rem 0 0; flex: none; }

/* Detail hlasování: Češi po stranách (S2) */
.view-switch { display: inline-flex; gap: 0; margin: 0 0 .9rem; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.view-switch button { font: inherit; font-size: .875rem; padding: .4rem 1rem; min-height: 36px; border: 0; background: var(--surface); color: var(--muted); cursor: pointer; }
.view-switch button[aria-pressed="true"] { background: var(--text); color: var(--surface); }
@media (pointer: coarse) { .view-switch button { min-height: 44px; } }
.js .cz-views[data-view="party"] .cz-by-vote, .js .cz-views[data-view="vote"] .cz-by-party { display: none; }
.party-row { display: grid; grid-template-columns: 9.5rem 9rem 1fr; gap: .3rem 1rem; align-items: center; padding: .65rem 0; border-bottom: 1px solid var(--border); }
.party-row:last-child { border-bottom: 0; }
.pr-party { display: flex; flex-direction: column; line-height: 1.25; }
.pr-label { display: inline-flex; align-items: center; gap: .45rem; }
.pr-label .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.pr-dots { display: flex; flex-wrap: wrap; gap: 4px; }
.pr-dots .cz-dot { width: 14px; height: 14px; }
.pr-names { font-size: .9rem; line-height: 1.5; }
.pr-group b { font-weight: 700; }
@media (max-width: 640px) { .party-row { grid-template-columns: 1fr; } }
details.explain.wide { max-width: none; margin-top: 1.5rem; }
details.links-more { margin: .3rem 0 1rem; font-size: .875rem; }
details.links-more summary { cursor: pointer; color: var(--muted); }
.share-sep { border: 0; border-top: 1px solid var(--border); margin: .25rem .5rem; }


/* Hlasy: tečka se symbolem (barva + tvar, aby to fungovalo i při poruše barvocitu), legenda, kategorie, neutrální výsledek */
.vd { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; box-sizing: border-box; flex: none; }
.vd.sm { width: 16px; height: 16px; }
.vd.f { background: var(--for); }
.vd.a { background: var(--against); }
.vd.s { background: var(--abst); }
.vd.n { background: transparent; border: 2px solid var(--absent); }
.vd.f::after { content: ""; width: 28%; height: 52%; border: solid var(--glyph); border-width: 0 2px 2px 0; transform: translateY(-8%) rotate(45deg); box-sizing: border-box; }
.vd.a::before, .vd.a::after { content: ""; position: absolute; width: 52%; height: 2px; background: var(--glyph); border-radius: 2px; }
.vd.a::before { transform: rotate(45deg); }
.vd.a::after { transform: rotate(-45deg); }
.vd.s::after { content: ""; width: 50%; height: 2px; background: var(--glyph); border-radius: 2px; }
.vd-row { display: flex; flex-wrap: wrap; gap: 6px; }
.vd-legend { display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .85rem; color: var(--muted); }
.vd-legend span { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }
.vd-legend b { color: var(--text); font-weight: 700; }
.vd-legend b.pro { color: var(--for-text); }
.vd-legend b.con { color: var(--against-text); }
.hub-vote-head { display: flex; align-items: center; gap: .6rem; }
.cat-ico { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--data); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.cat-ico svg { width: 19px; height: 19px; }
.cat-name { font-size: .85rem; font-weight: 600; color: var(--data); }
.cat-more { font-size: .75rem; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 0 .5rem; }
.hub-vote-head .when { margin-left: auto; font-size: .8rem; color: var(--muted); white-space: nowrap; }
.res-pill { display: inline-flex; font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; border-radius: 999px; padding: .1rem .65rem; background: var(--text); color: var(--bg); }
.res-pill.no { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--text); }
.hub-vote .meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.hub-vote .ep-line { display: flex; align-items: center; gap: .6rem; font-size: .8rem; color: var(--muted); padding-top: .55rem; border-top: 1px solid var(--border); }
.hub-vote .ep-line .split { height: 8px; flex: 1; }
.hub-vote .ep-line b.pro { color: var(--for-text); }
.hub-vote .ep-line b.con { color: var(--against-text); }

.cat-inline { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 600; color: var(--data); margin-bottom: .2rem; }
.cat-inline + .vote-title, .cat-inline + a { display: block; }
.vrow-title .cat-inline { display: flex; }
.cat-ico.sm { width: 22px; height: 22px; border-radius: 7px; }
.cat-ico.sm svg { width: 14px; height: 14px; }

/* Strany ve vybrané frakci (půlkruh) */
.group-head-line { color: var(--text); }
.group-head-line .muted { font-weight: 400; }
.group-head-line a.ext { text-decoration: underline; }
.party-lines { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .6rem; }
.party-lines li { display: grid; gap: .1rem; }
.party-name { color: var(--text); }
.party-name .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: .45rem; }
.party-name .muted { font-weight: 400; }
.party-members { color: var(--muted); }
.party-lines a.ext { text-decoration: underline; }
.hemi-names { min-height: 10rem; }

/* Přepínač Česká strana ↔ Evropské frakce (vlajka druhého pohledu) */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.page-head h1 { margin-bottom: .6rem; }
.flag-switch { display: inline-flex; align-items: center; gap: .55rem; padding: .35rem .85rem .35rem .45rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); text-decoration: none; font-size: .9rem; font-weight: 600; white-space: nowrap; min-height: 44px; }
.flag-switch:hover, .flag-switch:focus-visible { border-color: var(--gold); }
.flag-switch .flag { width: 36px; height: 24px; flex: none; border-radius: 3px; box-shadow: 0 1px 2px rgba(15, 23, 42, .25); transition: transform .35s ease; }
.flag-switch:hover .flag { transform: rotateY(180deg); }
@media (prefers-reduced-motion: reduce) { .flag-switch .flag { transition: none; } .flag-switch:hover .flag { transform: none; } }

/* ===== Úvodní stránka (scripts/hub.py): vstupní brána ===== */
main.home-page { max-width: none; padding: 0; }
.home-hero { position: relative; color: #fff; background: var(--navy-2); }
.home-art { position: absolute; inset: 0; overflow: hidden; background: radial-gradient(900px 700px at 78% 45%, rgba(30, 79, 163, .55), rgba(10, 18, 38, 0) 70%); pointer-events: none; }
.home-hero-inner { position: relative; max-width: 1280px; margin: 0 auto; padding: 3.2rem 20px 2.2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 2rem 3rem; }
.home-copy { flex: 1 1 520px; min-width: 0; }
.home-eyebrow { display: flex; align-items: center; gap: .85rem; margin: 0; font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.home-eyebrow .rule { width: 36px; height: 2px; background: var(--gold); }
.home-hero h1 { margin: 1.1rem 0 0; font-size: clamp(2.3rem, 5.6vw, 4.4rem); line-height: 1.02; letter-spacing: -.035em; font-weight: 300; max-width: 15ch; color: #fff; }
.home-hero h1 strong { font-weight: 700; }
.home-lead { margin: 1.2rem 0 0; font-size: 1.1rem; line-height: 1.55; color: #B6C0D4; max-width: 32rem; }
.home-cta { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 1.7rem; }
.home-pill { display: inline-flex; align-items: center; gap: .7rem; min-height: 52px; padding: 0 1.7rem; border-radius: 999px; font-weight: 600; font-size: 1rem; text-decoration: none; transition: transform .2s; }
.home-pill:hover { transform: translateY(-2px); }
.home-pill.solid { background: #fff; color: var(--navy-2); }
.home-pill.ghost { border: 1px solid rgba(255, 255, 255, .35); color: #fff; font-weight: 500; }
.home-pill:focus-visible, .home-door:focus-visible, .home-row:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.home-search { margin: 1.2rem 0 0; max-width: 30rem; }
.home-search input { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .25); color: #fff; }
.home-search input::placeholder { color: #94A3B8; }
.home-data { margin: 1.6rem 0 0; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, .14); font-size: .82rem; color: #94A3B8; }

.home-wrap { max-width: 1280px; margin: 0 auto; padding: 4.5rem 20px 1rem; }
.home-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2.5rem; margin-bottom: 2.6rem; }
.home-kicker { margin: 0; font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--link); }
.home-wrap h2 { margin: .8rem 0 0; font-size: clamp(2.1rem, 4.4vw, 3.5rem); line-height: 1.08; letter-spacing: -.03em; font-weight: 300; }
.home-wrap h2 strong { font-weight: 700; }
.home-sub { margin: 0; max-width: 24rem; color: var(--muted); font-size: 1.05rem; line-height: 1.55; }

.home-doors { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.home-door { flex: 1 1 320px; min-height: 420px; box-sizing: border-box; padding: 2.2rem; border-radius: 28px; display: flex; flex-direction: column; justify-content: space-between; text-decoration: none; color: #fff; transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.home-door:hover { transform: translateY(-6px); }
.door-top { display: flex; justify-content: space-between; align-items: flex-start; }
.door-no { font-size: .85rem; font-weight: 600; letter-spacing: .14em; opacity: .7; }
.home-door h3 { margin: 0; font-size: 2.7rem; line-height: 1.05; letter-spacing: -.03em; font-weight: 600; color: inherit; }
.home-door p { margin: .9rem 0 0; font-size: 1.05rem; line-height: 1.5; max-width: 19rem; opacity: .85; }
.door-go { display: inline-flex; align-items: center; gap: .6rem; margin-top: 2rem; font-weight: 600; transition: gap .25s; }
.home-door:hover .door-go { gap: 1rem; }
.door-blue { background: var(--eu-blue); box-shadow: 0 30px 60px -34px rgba(30, 79, 163, .7); }
.door-navy { background: var(--navy); box-shadow: 0 30px 60px -34px rgba(15, 23, 42, .8); }
.door-navy .door-no { color: #fff; }
.door-paper { background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow); }
.door-paper p { color: var(--muted); opacity: 1; }
.door-paper .door-go { color: var(--link); }

.home-more { display: flex; flex-wrap: wrap; gap: 2.5rem 5rem; padding-bottom: 6rem; }
.home-more-head { flex: 1 1 260px; max-width: 22rem; }
.home-more h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
.home-rows { flex: 3 1 520px; min-width: 0; border-top: 1px solid var(--border); }
.home-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; padding: 1.6rem 0; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text); transition: padding .3s; }
.home-row:hover { padding-left: 1.2rem; }
.row-no { flex: 0 0 40px; font-size: .85rem; font-weight: 600; letter-spacing: .12em; color: var(--muted); }
.row-title { flex: 1 1 220px; font-size: 1.7rem; font-weight: 600; letter-spacing: -.02em; }
.row-line { flex: 1 1 240px; color: var(--muted); line-height: 1.5; }
.row-arrow { color: var(--link); display: inline-flex; transition: transform .3s; }
.row-arrow svg { width: 26px; height: 26px; }
.home-row:hover .row-arrow { transform: translateX(6px); }

.home-band { position: relative; background: var(--navy) radial-gradient(700px 420px at 12% 100%, rgba(30, 79, 163, .5), rgba(15, 23, 42, 0) 70%); color: #fff; }
.home-band-inner { max-width: 1280px; margin: 0 auto; padding: 4rem 20px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 2.5rem 4rem; }
.home-band p { margin: 0; flex: 2 1 420px; max-width: 48rem; font-size: clamp(1.9rem, 4vw, 3.2rem); line-height: 1.15; letter-spacing: -.03em; font-weight: 300; }
.home-band strong { font-weight: 700; }

@media (max-width: 640px) {
  .home-hero-inner { padding: 2.2rem 20px 1.8rem; }
  .home-wrap { padding-top: 4rem; }
  .home-door { min-height: 340px; padding: 1.6rem; }
  .home-door h3 { font-size: 2.2rem; }
  .home-pill { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .home-door, .home-pill, .home-row, .row-arrow, .door-go { transition: none; }
  .home-door:hover, .home-pill:hover { transform: none; }
}

/* ===== Poslanci: portréty ===== */
.heads { margin-bottom: 1.5rem; }
.heads h2 { margin: 0 0 1rem; }
.heads-strip { gap: 1.1rem 1.8rem; margin-bottom: 1rem; }
.heads .hub-av img { width: 56px; height: 56px; }

/* ===== Hlasování: přehled nahoře, tabulka v rozbalení ===== */
.vo-tools { margin: 0 0 .5rem; }
.vo-label { font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-right: .3rem; align-self: center; }
.vo-chips { align-items: center; }
.hero .vo-search { margin: 1.1rem 0 0; }
.hero .vo-search input { background: rgba(248, 250, 252, .08); border-color: rgba(248, 250, 252, .25); color: #F8FAFC; }
.hero .vo-search input::placeholder { color: #94A3B8; }
.hero .vo-search button { background: #F8FAFC; color: var(--navy); }
.vo-search { display: flex; gap: .5rem; max-width: 40rem; }
.vo-search input { flex: 1; min-width: 0; font: inherit; padding: .75rem 1.1rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.vo-search input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.vo-search button { font: inherit; font-weight: 600; padding: 0 1.3rem; min-height: 44px; border-radius: 999px; border: 0; background: var(--text); color: var(--bg); cursor: pointer; }
.vo-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.vo-chip { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 1.1rem; border-radius: 999px; border: 1px solid var(--border); background: var(--chip); color: var(--text); text-decoration: none; font-weight: 500; font-size: .92rem; }
.vo-chip:hover, .vo-chip:focus-visible { border-color: var(--gold); }
.vo-chip-main { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }
.all-votes { margin: 2.5rem 0 1rem; border-top: 1px solid var(--border); }
.all-votes > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1rem; padding: 1.2rem 0; cursor: pointer; list-style: none; }
.all-votes > summary::-webkit-details-marker { display: none; }
.all-votes > summary::after { content: "+"; margin-left: auto; font-size: 1.6rem; line-height: 1; color: var(--link); }
.all-votes[open] > summary::after { content: "–"; }
.av-title { font-size: 1.5rem; font-weight: 600; letter-spacing: -.02em; }
.av-sub { color: var(--muted); font-size: .95rem; }
.all-votes > summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

/* Hero Hlasování: volba tématu místo vlajky (ikony kategorií, klikací dlaždice) */
.topic-picker { flex: 0 1 470px; min-width: 0; padding: 1rem 1.1rem 1.1rem; border-radius: 22px; background: rgba(248, 250, 252, .06); border: 1px solid rgba(248, 250, 252, .16); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6); backdrop-filter: blur(6px); }
.tp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 0 0 .7rem; }
.tp-head h2 { margin: 0; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #94A3B8; }
.tp-all { color: #CBD5E1; font-size: .8rem; text-decoration: none; border-bottom: 1px dashed rgba(203, 213, 225, .5); }
.tp-all:hover, .tp-all:focus-visible { color: #F8FAFC; border-color: var(--gold); }
.tp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.tp-tile { display: flex; align-items: center; gap: .65rem; padding: .6rem .7rem; min-height: 56px; border-radius: 14px; border: 1px solid rgba(248, 250, 252, .12); background: rgba(15, 23, 42, .45); color: #F8FAFC; text-decoration: none; transition: border-color .15s ease, transform .15s ease, background .15s ease; }
.tp-tile:hover, .tp-tile:focus-visible { border-color: var(--gold); background: rgba(245, 158, 11, .1); transform: translateY(-2px); }
.tp-ico { flex: none; width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(245, 158, 11, .16); color: #FBBF24; }
.tp-ico svg { width: 20px; height: 20px; }
.tp-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.tp-name { font-size: .88rem; font-weight: 600; }
.tp-n { font-size: .75rem; color: #94A3B8; }
@media (prefers-reduced-motion: reduce) { .tp-tile { transition: none; } .tp-tile:hover, .tp-tile:focus-visible { transform: none; } }
@media (max-width: 760px) { .topic-picker { flex-basis: 100%; } .tp-name { font-size: .84rem; } }
@media (max-width: 380px) { .tp-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .tp-unit { display: none; } .tp-tile { min-height: 52px; padding: .5rem .6rem; gap: .5rem; } .tp-ico { width: 32px; height: 32px; } .tp-n { font-weight: 600; color: #CBD5E1; } }
.all-votes { scroll-margin-top: 4.5rem; }

/* ============================================================================
   Mobil jako aplikace (≤ 760 px): štíhlá horní lišta, spodní navigace se 4 sekcemi + „Více“ (spodní panel),
   posuvné segmenty místo zalamovaných záložek, tabulky jako karty. Desktop beze změny.
   ========================================================================== */
.tabbar, .tab-more { display: none; }
.sheet { display: none; }
@media (max-width: 760px) {
  html { -webkit-tap-highlight-color: transparent; }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .site-header .inner { padding: .6rem 16px; flex-wrap: nowrap; }
  .site-header nav:not(.tabbar) { display: none; }
  .theme-toggle { margin-left: auto; width: 40px; height: 40px; }

  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
    border-top: 1px solid var(--border); box-shadow: 0 -8px 24px -18px rgba(15, 23, 42, .35);
  }
  .tabbar a, .tabbar .tab-more {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px;
    color: var(--muted); text-decoration: none; font: inherit; font-size: .6875rem; font-weight: 600; letter-spacing: .01em;
    background: none; border: 0; padding: 0; cursor: pointer; border-radius: 16px;
  }
  .tabbar svg { width: 44px; height: 30px; padding: 3px 10px; border-radius: 999px; transition: background .2s ease, color .2s ease; }
  .tabbar [aria-current="page"] { color: var(--text); }
  .tabbar [aria-current="page"] svg { background: var(--accent-soft); color: var(--accent); }
  .tabbar a:active svg, .tabbar .tab-more:active svg { transform: scale(.94); }

  .sheet {
    position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: none; max-height: 82vh; overflow: auto;
    padding: .4rem 16px calc(1rem + env(safe-area-inset-bottom)); border: 0; border-radius: 24px 24px 0 0;
    background: var(--surface); color: var(--text); box-shadow: 0 -20px 60px -20px rgba(15, 23, 42, .45); z-index: 1000;
  }
  .sheet:popover-open, .no-popover .sheet.open { display: block; animation: sheet-up .28s cubic-bezier(.2, .8, .2, 1); }
  .sheet::backdrop { background: rgba(15, 23, 42, .45); backdrop-filter: blur(2px); }
  @keyframes sheet-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
  .sheet-grip { width: 40px; height: 4px; border-radius: 99px; background: var(--track); margin: .4rem auto .6rem; }
  .sheet-h { margin: 1rem .25rem .35rem; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .sheet ul { list-style: none; margin: 0; padding: 0; border-radius: 16px; background: var(--chip); overflow: hidden; }
  .sheet li + li { border-top: 1px solid var(--border); }
  .sheet li a { display: flex; align-items: center; justify-content: space-between; min-height: 50px; padding: 0 1rem; color: var(--text); text-decoration: none; font-weight: 500; }
  .sheet li a::after { content: "›"; color: var(--muted); font-size: 1.3rem; }
  .sheet li a:active { background: var(--accent-soft); }
  .sheet-foot { margin: 1rem .25rem 0; font-size: .85rem; }

  /* posuvné segmenty místo zalamovaných záložek */
  .subnav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 1.25rem; padding: 2px 16px; scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent); }
  .subnav::-webkit-scrollbar { display: none; }
  .subnav a { white-space: nowrap; scroll-snap-align: start; flex: none; }

  /* typografie a rytmus */
  h1 { font-size: clamp(1.75rem, 7.4vw, 2.2rem); line-height: 1.12; letter-spacing: -.02em; }
  h2 { font-size: 1.2rem; margin-top: 1.9rem; }
  .lead { font-size: 1rem; }
  .card { border-radius: 20px; }
  .table-wrap { border-radius: 20px; }

  /* tabulky jako karty: první buňka = titulek přes celou šířku, ostatní dvojice „popisek / hodnota“ */
  table.cards thead { display: none; }
  table.cards, table.cards tbody { display: block; }
  table.cards tr { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem 1rem; padding: 1rem; border-bottom: 1px solid var(--border); }
  table.cards tr:last-child { border-bottom: 0; }
  table.cards td { display: block; padding: 0; border: 0; text-align: left; white-space: normal; min-width: 0; }
  table.cards td:first-child { grid-column: 1 / -1; }
  table.cards td.wide { grid-column: 1 / -1; }
  table.cards td[data-label]::before { content: attr(data-label); display: block; font-size: .7rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: .1rem; }
  table.cards td.num { text-align: left; }
  table.cards td:empty { display: none; }
}
@media (max-width: 760px) {
  /* filtry: popisek nad polem, dvě pole vedle sebe, hledání přes celou šířku */
  .controls { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem .6rem; align-items: end; }
  .controls > label:has(select) { display: flex; flex-direction: column; align-items: stretch; gap: .2rem; min-height: 0; padding: 0;
    font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
  .controls > label:has(select) select { width: 100%; font-size: .95rem; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--text); min-height: 44px; }
  .controls > label:has(input[type="checkbox"]), .controls > input[type="search"], .controls > .small, .controls > p, .controls > span { grid-column: 1 / -1; }
  .controls > input[type="search"] { width: 100%; min-height: 46px; }
  fieldset.controls { display: flex; }

  .site-footer .inner { padding-bottom: 1.5rem; }
  .hero-inner { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 760px) {
  .vo-chips { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 6px; }
  .vo-chips::-webkit-scrollbar { display: none; }
  .vo-chips > * { flex: none; white-space: nowrap; }
}
@media (max-width: 760px) { .sheet li a[aria-current="page"] { color: var(--accent); font-weight: 700; } .sheet li a[aria-current="page"]::after { content: "●"; font-size: .7rem; color: var(--accent); } }

/* --- optimalizace mobilu 2 ------------------------------------------------- */
@media (max-width: 560px) {
  /* metriky po dvou vedle sebe: kratší stránka, čísla zůstávají čitelná */
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .metrics > .card { padding: .8rem .85rem; margin: 0; }
  .metric .value { font-size: 2rem; }
  .metric .label { font-size: .8rem; }
  .metric .detail { font-size: .78rem; overflow-wrap: anywhere; }
  .chart .col-sparse { visibility: hidden; }
}
@media (max-width: 340px) { .metrics { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  /* karty hlasování na přehledu: vodorovně posuvná řada místo dlouhého sloupce */
  .hub-cards { display: flex; flex-wrap: nowrap; gap: .75rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: 0 -16px; padding: 4px 16px 10px; scroll-padding-inline: 16px; }
  .hub-cards::-webkit-scrollbar { display: none; }
  .hub-cards > .card { flex: 0 0 min(86%, 340px); scroll-snap-align: start; margin: 0; }
  .hub-cards > p { flex: 0 0 100%; }
  .hub-lists { gap: 1.6rem; }
}
