:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --surface-2: #f0eee8;
  --text: #1c1b19;
  --muted: #66625a;
  --line: #e2dfd6;
  --accent: #1d4e89;
  --accent-soft: #e4ecf6;

  --da: #2e8b57;
  --nu: #c8323c;
  --ab: #d99a1e;
  --nv: #9b968c;
  --abs: #d6d2c8;
  --rebel-bg: #fff4dc;
  --viz-solo: #245e5a;   /* treapta principală (doar grupul) */
  --viz-mixed: #76aba6;  /* treapta secundară (cu alte grupuri) */

  --g-psd: #d1343d;
  --g-pnl: #00a3e0;
  --g-usr: #1c3b78;
  --g-aur: #d4a017;
  --g-sos-ro: #5b3f99;
  --g-udmr: #2f8a43;
  --g-upr: #e06c1f;
  --g-pot: #e06c1f;
  --g-pir: #b0407e;
  --g-minoritati: #1f8a8a;
  --g-neafiliati: #8a867d;

  --radius: 10px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141412; --surface: #1d1c1a; --surface-2: #262522; --text: #ecebe6; --muted: #a39f95;
    --line: #34322e; --accent: #8db8f0; --accent-soft: #1f2b3b; --abs: #4a4741; --nv: #77736a;
    --rebel-bg: #3a2f17; --da: #4cb27a; --nu: #e0545d; --ab: #e6b04a; --viz-solo: #86cbc5; --viz-mixed: #2f6662;
    --g-aur: #e3b23c; --g-sos-ro: #9a7fd6; --g-usr: #6f8fdc; --g-pnl: #2bbcf2; --g-neafiliati: #a39f95;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141412; --surface: #1d1c1a; --surface-2: #262522; --text: #ecebe6; --muted: #a39f95;
  --line: #34322e; --accent: #8db8f0; --accent-soft: #1f2b3b; --abs: #4a4741; --nv: #77736a;
  --rebel-bg: #3a2f17; --da: #4cb27a; --nu: #e0545d; --ab: #e6b04a; --viz-solo: #86cbc5; --viz-mixed: #2f6662;
  --g-aur: #e3b23c; --g-sos-ro: #9a7fd6; --g-usr: #6f8fdc; --g-pnl: #2bbcf2; --g-neafiliati: #a39f95;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); line-height: 1.2; margin: 1.2rem 0 .6rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; margin: 2rem 0 .75rem; }
h3 { font-size: 1rem; margin: 1.4rem 0 .4rem; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 1500px) { .wrap { max-width: 1240px; } }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .85rem; }
.small { font-size: 1rem !important; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lede { color: var(--muted); max-width: 70ch; font-size: 1.05rem; }

/* header */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top-in { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 18px; height: 18px; border-radius: 4px;
  background: linear-gradient(90deg, #1f3f8f 0 33%, #f2c300 33% 66%, #c8102e 66%); }
.nav { display: flex; gap: 16px; }
.menu-btn { display: none; }
.nav a { color: var(--muted); font-weight: 500; }
.nav a[aria-current] { color: var(--text); }
.search { position: relative; margin-left: auto; flex: 0 1 300px; }
.search input, .filters input[type=search], .filters select {
  width: 100%; font: inherit; font-size: .95rem; padding: 8px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text); }
.search-results { position: absolute; right: 0; left: 0; top: 44px; margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0,0,0,.15); max-height: 70vh; overflow: auto; min-width: 280px; }
.search-results a { display: block; padding: 8px 10px; border-radius: 6px; color: var(--text); }
.search-results a:hover, .search-results a.active { background: var(--accent-soft); text-decoration: none; }
.search-results small { display: block; color: var(--muted); }
/* Elemente folosite doar de stilul Editorial (designs.css) */
.dateline, .dateline-vote, .colophon, .vote-headline { display: none; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.theme { background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px;
  width: 36px; height: 36px; cursor: pointer; flex: none; display: grid; place-items: center; }

/* layout */
main { padding-bottom: 48px; min-height: 70vh; }
.hero { padding: 16px 0 8px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; }
.side { padding-top: 2rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.card h2 { margin: 0 0 .5rem; font-size: 1rem; }
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; padding: 20px 0 40px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 20px 0; }
.stats > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.stats dt { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.stats dd { margin: 2px 0 0; font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* party / group */
.grp { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.grp::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--gc, var(--g-neafiliati)); }
.g-psd { --gc: var(--g-psd); } .g-pnl { --gc: var(--g-pnl); } .g-usr { --gc: var(--g-usr); }
.g-aur { --gc: var(--g-aur); } .g-sos-ro { --gc: var(--g-sos-ro); } .g-udmr { --gc: var(--g-udmr); }
.g-upr { --gc: var(--g-upr); } .g-pot { --gc: var(--g-pot); } .g-minoritati { --gc: var(--g-minoritati); }
.g-pir { --gc: var(--g-pir); } .g-neafiliati { --gc: var(--g-neafiliati); }

/* vote options */
.t-da { color: var(--da); } .t-nu { color: var(--nu); } .t-ab { color: var(--ab); }
.chip { display: inline-block; font-size: .8rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap;
  background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.opt-da { --c: var(--da); } .opt-nu { --c: var(--nu); } .opt-ab { --c: var(--ab); }
.opt-nv { --c: var(--nv); } .opt-abs { --c: var(--muted); }
.chip.opt-abs { border-style: dashed; background: transparent; }
.bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--surface-2); gap: 1px; }
.bar .seg { background: var(--c); min-width: 2px; }
.bar .seg.opt-abs { background: var(--abs); }

.tag { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px;
  border-radius: 4px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.tag.k-final { background: var(--accent-soft); color: var(--accent); }
.note { background: var(--rebel-bg); border-radius: 8px; padding: 8px 12px; display: inline-block; }
.note-sm { font-size: .8rem; color: var(--nu); font-weight: 600; }
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 20px 12px; margin: 20px 0; }
.summary h2 { margin-top: 1rem; }
.summary-lede { font-size: 1.1rem; font-weight: 500; }
.summary-list { padding-left: 20px; }
.summary-list li { margin-bottom: 6px; }
.ai-note { font-size: .85rem; color: var(--text); background: var(--surface-2); border: 1px solid var(--line);
  border-left: 3px solid var(--ab); border-radius: 6px; padding: 10px 14px; margin: 14px 0 0; }
.ai-note p { margin: 0 0 4px; } .ai-note p:last-child { margin-bottom: 0; }
.vrow-summary { color: var(--muted); font-size: .9rem; }
.code { font-family: var(--mono); font-size: max(.85em, 12px); background: var(--surface-2); padding: 1px 6px; border-radius: 4px; white-space: nowrap; color: var(--text); }
.code.big { font-size: .6em; vertical-align: middle; }

/* vote lists */
.h-day { font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 1.6rem 0 .6rem; }
.vlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.vrow-link { display: grid; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; color: var(--text); }
.vrow-link:hover { text-decoration: none; border-color: var(--accent); }
.vrow-main { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.vrow-date { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.vrow-title { flex: 1 1 300px; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vrow-meta { display: flex; gap: 10px; align-items: center; font-size: .85rem; }
.nums { color: var(--muted); font-variant-numeric: tabular-nums; }
.more { font-weight: 600; }

/* tables */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; background: var(--surface-2); }
th.num { text-align: right; }
.sortable th[data-sort] { cursor: pointer; user-select: none; }
.sortable th[aria-sort=ascending]::after { content: " ▲"; }
.sortable th[aria-sort=descending]::after { content: " ▼"; }
.person { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 500; }
.bar-col { width: 30%; min-width: 120px; }
.mini td { padding: 6px 4px; border: 0; font-size: .9rem; }
.meter-cell { width: 40%; }
.meter { display: block; height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--accent); }
.people { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: .92rem; }
.people .num { float: right; color: var(--muted); }

/* Parlamentarii mei */
.mine { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 14px 16px; margin: 12px 0 18px; }
.mine-head { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; }
.mine h2 { margin: 0 0 2px; font-size: 1.15rem; }
.mine-head p { margin: 0; max-width: 60ch; }
.mine-pick { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mine-pick select, .mine-pick button { font: inherit; font-size: .95rem; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 6px; background: var(--surface); color: var(--text); }
.mine-pick select { min-width: 220px; }
.mine-pick button { cursor: pointer; background: var(--surface-2); }
.mine-pick button:hover { border-color: var(--text); }
.mine-out { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.mine-sum { margin: 0 0 10px; font-size: 1.05rem; }
.mine-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 28px; }
.mine-cols h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 6px; }
.mine-cols ul { list-style: none; margin: 0; padding: 0; columns: 2 200px; column-gap: 20px; }
.mine-cols li { break-inside: avoid; padding: 3px 0; display: flex; gap: 8px; align-items: baseline; justify-content: space-between; }
.mine-cols li a { color: var(--text); }
.mine-cols .none { color: var(--muted); font-size: .9rem; }
@media (max-width: 700px) { .mine-cols { grid-template-columns: 1fr; } .mine-pick select { min-width: 0; flex: 1; } .mine-pick { width: 100%; } }

/* hemiciclu (pagina de parlamentari) */
.hemi { margin: 8px 0 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; }
.hemi svg { flex: 1 1 320px; max-width: 560px; width: 100%; height: auto; overflow: visible; }
.hemi circle { fill: var(--gc, var(--g-neafiliati)); transition: opacity .15s; }
.hemi a:hover circle, .hemi a:focus circle { stroke: var(--text); stroke-width: 1.5; }
.hemi a.dim circle { opacity: .15; }
.hemi-total { text-anchor: middle; font-size: 44px; font-weight: 700; fill: var(--text); font-family: var(--serif, var(--font)); }
.hemi figcaption { flex: 0 1 260px; }
.hemi-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.hemi-btn { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 1fr 3ch 4ch; gap: 10px;
  align-items: center; width: 100%; padding: 4px 8px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.hemi-btn b, .hemi-btn .muted { text-align: right; }
.hemi-btn:hover, .hemi-btn:focus-visible { background: var(--surface-2); }
.hemi-btn:focus-visible { outline: 2px solid var(--accent); }
.hemi-btn[aria-pressed="true"] { background: var(--accent-soft); }
@media (max-width: 600px) {
  .hemi figcaption { flex-basis: 100%; min-width: 0; }
  .hemi-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 6px; }
  .hemi-btn { grid-template-columns: minmax(0, 1fr) auto 3.2ch; gap: 6px; padding: 6px 4px; }
  .hemi-btn .grp { overflow: hidden; text-overflow: ellipsis; }
}
/* Pe ecrane tactile bulinele sunt prea mici pentru deget: lista de dedesubt e calea spre fiecare parlamentar */
@media (pointer: coarse) { .hemi svg a { pointer-events: none; } }

/* filters */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.filters[hidden] { display: none; }
.filters input[type=search] { flex: 1 1 240px; width: auto; }
.filters select { width: auto; flex: 0 1 200px; }
.count { color: var(--muted); font-size: .9rem; }
.check { display: flex; gap: 8px; align-items: center; font-size: .92rem; cursor: pointer; min-height: 36px; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.seg-filter { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex-wrap: wrap; }
.seg-filter button { font: inherit; font-size: .85rem; padding: 7px 12px; border: 0; background: var(--surface); color: var(--muted); cursor: pointer; border-right: 1px solid var(--line); }
.seg-filter button:last-child { border-right: 0; }
.seg-filter button[aria-pressed=true] { background: var(--accent); color: var(--surface); }

/* profile */
.profile { display: flex; gap: 20px; align-items: flex-start; margin-top: 20px; }
.profile h1 { margin-top: 0; }
.profile-meta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.crumbs { color: var(--muted); font-size: .9rem; margin: 20px 0 0; }
.vote-head h1 { font-size: clamp(1.25rem, 2.6vw, 1.7rem); }
.links { display: flex; gap: 16px; flex-wrap: wrap; }
.plain { padding-left: 18px; }
.plain li { margin-bottom: 6px; }
.prose { max-width: 72ch; margin-left: auto; margin-right: auto; }
.prose li { margin-bottom: 4px; }

@media (max-width: 900px) {
  .cols { grid-template-columns: 1fr; }
  .side { padding-top: 0; }
}
@media (max-width: 640px) {
  .top-in { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; gap: 10px 14px; }
  .search { order: 5; flex: 1 0 100%; }
  .hide-sm { display: none; }
  .profile { flex-direction: column; }
  .stats dd { font-size: 1.3rem; }
  th, td { padding: 8px; }
  .bar-col { min-width: 80px; }
}

/* ---------- Cine propune legile (grafic cu bare) */
.initiatives { margin: 20px 0 8px; }
.ini-title { margin-bottom: .3rem; }
.ini-intro { color: var(--muted); margin-top: 0; max-width: 70ch; }
.ini-chart { margin: 14px 0 10px; position: relative; }
.ini-legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); margin-bottom: 10px; }
.ini-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ini-sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.ini-sw.solo, .ini-seg.solo { background: var(--viz-solo); }
.ini-sw.mixed, .ini-seg.mixed { background: var(--viz-mixed); }
.ini-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ini-li.is-gov { padding-bottom: 8px; margin-bottom: 6px; border-bottom: 1px dashed var(--line); }
.ini-row { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: 130px minmax(0, 1fr) 48px;
  align-items: center; gap: 12px; padding: 5px 6px; border-radius: 6px; cursor: pointer; color: var(--text); }
.ini-row:hover, .ini-row:focus-visible { background: var(--surface-2); }
.ini-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ini-row[aria-pressed=true] { background: var(--accent-soft); }
.ini-track { display: flex; gap: 2px; height: 16px; }
.ini-seg { height: 100%; min-width: 3px; }
.ini-seg:first-child { border-radius: 0 0 0 0; }
.ini-seg:last-child { border-radius: 0 4px 4px 0; }
.ini-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.g-guvern { --gc: var(--text); }
.ini-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: .85rem; max-width: 320px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .12); }
.ini-panel { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
.ini-panel h3 { margin: .6rem 0 .4rem; }
.ini-list { list-style: none; margin: 0; padding: 0; }
.ini-item-link { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.ini-item-link:hover { text-decoration: none; }
.ini-item-link:hover .ini-item-title { text-decoration: underline; }
.ini-item-title { font-weight: 500; }
.ini-item-meta { font-size: .82rem; color: var(--muted); }
.ini-section { scroll-margin-top: 80px; }
@media (max-width: 640px) {
  .ini-row { grid-template-columns: 96px minmax(0, 1fr) 36px; gap: 8px; }
}
.ini-label { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* ---------- Domenii (după comisia de fond) */
.dom-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.dom-chip { font: inherit; font-size: .85rem; padding: 5px 11px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.dom-chip span { color: var(--muted); font-variant-numeric: tabular-nums; margin-left: 2px; }
.dom-chip:hover { border-color: var(--text); }
.dom-chip[aria-pressed=true] { background: var(--text); color: var(--bg); border-color: var(--text); }
.dom-chip[aria-pressed=true] span { color: inherit; opacity: .75; }
.dom-tag { font-size: .75rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; white-space: nowrap; }
.ini-li.is-zero .ini-label, .ini-li.is-zero .ini-val { opacity: .4; }
.vote-filter-dm { flex: 0 1 220px; }

/* Lista de rezultate a căutării stă deasupra conținutului paginii (graficul are poziționare proprie) */
.search-results { z-index: 50; }
.search-results a { text-decoration: none; }
/* Etichetele (tip, domenii, cifre) se rup pe mai multe rânduri în coloanele înguste */
.vrow-meta { flex-wrap: wrap; row-gap: 4px; }
.vrow-link, .vrow-main { min-width: 0; }
.vrow-title, .vrow-summary { overflow-wrap: anywhere; }
.home-votes { margin-top: 8px; }

/* ---------- Camere: taburi și etichete */
.ch-tabs { display: flex; gap: 18px; margin: 18px 0 0; border-bottom: 1px solid var(--line); }
.ch-tabs a { padding: 6px 0; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ch-tabs a[aria-current] { color: var(--text); border-bottom-color: var(--text); font-weight: 600; }
.ch-tag { font-size: .75rem; font-weight: 700; padding: 1px 7px; border-radius: 4px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.ch-tag.ch-senat { color: var(--text); border-color: var(--text); }

/* ---------- Pagina legii */
.law-codes { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 20px; }
.law-head h1 { font-size: clamp(1.2rem, 2.6vw, 1.6rem); line-height: 1.3; }
.law-headline { display: block; }
.status { display: inline-block; font-weight: 700; padding: 3px 10px; border-radius: 4px; border: 1px solid; }
.status-good { color: var(--da); } .status-bad { color: var(--nu); } .status-warn { color: var(--ab); } .status-neutral { color: var(--muted); }
.law-cols { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); }
.tl-item { position: relative; padding: 0 0 14px 6px; display: grid; gap: 2px; }
.tl-item::before { content: ""; position: absolute; left: -26px; top: .35em; width: 12px; height: 12px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--muted); }
.tl-good::before { border-color: var(--da); background: var(--da); }
.tl-bad::before { border-color: var(--nu); background: var(--nu); }
.tl-warn::before { border-color: var(--ab); background: var(--ab); }
.tl-date { font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-label { font-weight: 600; }
.tl-all { margin: 6px 0 10px; }
.tl-all summary { cursor: pointer; color: var(--accent); }
.tl-events { font-size: .88rem; padding-left: 18px; }
.tl-events li { margin-bottom: 4px; }
.law-votes { list-style: none; padding: 0; margin: 0; }
.law-votes li { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.law-votes .bar { flex: 1 0 100%; }
.small-list { font-size: .88rem; }
@media (max-width: 900px) { .law-cols { grid-template-columns: 1fr; } }

/* ---------- Cine cu cine votează: matrice (o singură nuanță, mai închis = mai mult acord) */
.sim-block { margin-bottom: 28px; }
.sim-period { margin: 6px 0 12px; }
.heat { width: auto; min-width: 100%; }
.heat th, .heat td { text-align: center; padding: 8px 6px; border: 1px solid var(--bg); }
.heat-row { text-align: left !important; white-space: nowrap; }
.heat-col .grp { writing-mode: horizontal-tb; }
.heat-cell { background: color-mix(in srgb, var(--viz-solo) calc(var(--p) * 1%), var(--surface)); font-variant-numeric: tabular-nums; font-weight: 600; }
.heat-cell.dark { color: #fff; }
:root[data-theme="dark"] .heat-cell.dark { color: #111; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .heat-cell.dark { color: #111; } }
.heat-self, .heat-na { color: var(--muted); background: var(--surface-2); }
.compare #cmp-out { margin-top: 10px; }
.cmp-big { font-size: 2.2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.cmp-list { list-style: none; padding: 0; }
.cmp-list li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }

/* ---------- Cum funcționează: fluxul */
.flow { list-style: none; padding: 0; margin: 20px 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; counter-reset: f; }
.flow li { border: 1px solid var(--line); border-top: 3px solid var(--text); padding: 10px; display: grid; gap: 4px; counter-increment: f; background: var(--surface); }
.flow li b::before { content: counter(f) ". "; color: var(--muted); }
.flow li span { font-size: .85rem; color: var(--muted); }
.prose.wide { max-width: none; }
code { font-family: var(--mono); font-size: .88em; }
@media (max-width: 640px) { .flow { grid-template-columns: 1fr 1fr; } }
.vote-law { margin-top: 8px; }
.vote-law h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.vote-law h2 .status { font-size: .8rem; }
.vote-law .tl-all[open] summary { margin-bottom: 6px; }
@media (max-width: 640px) {
  .nav { flex-wrap: wrap; gap: 4px 14px; }
  .nav a { white-space: nowrap; }
}
/* Date deschise pe telefon: fiecare fișier ca un card */
@media (max-width: 640px) {
  .files-table thead { display: none; }
  .files-table tr { display: grid; grid-template-columns: 1fr auto auto; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .files-table td { border: 0; padding: 0; }
  .files-table td:first-child { grid-column: 1 / -1; overflow-wrap: anywhere; font-weight: 600; }
  .files-table td:nth-child(2) { grid-column: 1; font-size: .9rem; }
  .files-table td.num { align-self: end; font-size: .85rem; color: var(--muted); }
  .files-table td[data-label]:not([data-label=""])::after { content: " " attr(data-label); }
  .prose code { overflow-wrap: anywhere; }
}
@media (max-width: 640px) { .groups-table .bar-col { display: none; } }

/* ---------- Ecrane mici și mari: ajustări din auditul pe dimensiuni de ecran */

/* Tabele cu derulare pe orizontală: umbră la margine cât timp mai e conținut ascuns */
.table-wrap {
  background:
    linear-gradient(to right, var(--bg) 30%, transparent) left / 24px 100% no-repeat local,
    linear-gradient(to left, var(--bg) 30%, transparent) right / 24px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(0,0,0,.18), transparent) left / 10px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.18), transparent) right / 10px 100% no-repeat scroll;
}

/* „Arată mai multe” sub listele lungi */
.pg-cut { display: none !important; }
.pg-more { display: block; width: 100%; margin: 14px 0 6px; padding: 12px; font: inherit; font-weight: 600; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); }
.pg-more:hover { border-color: var(--text); }
.pg-more[hidden] { display: none; }

/* Voturile unui parlamentar pe telefon: fiecare vot e un card (data și votul sus, legea dedesubt) */
@media (max-width: 640px) {
  #dep-votes, #dep-votes tbody { display: block; }
  #dep-votes thead { display: none; }
  #dep-votes tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center;
    padding: 12px 4px; border-bottom: 1px solid var(--line); }
  #dep-votes td { border: 0; padding: 0; }
  #dep-votes td:nth-child(1) { grid-row: 1; grid-column: 1; font-size: .85rem; color: var(--muted); }
  #dep-votes td:nth-child(3) { grid-row: 1; grid-column: 2; text-align: right; white-space: nowrap; }
  #dep-votes td:nth-child(2) { grid-row: 2; grid-column: 1 / -1; line-height: 1.4; }
}

/* Matricea „Cine cu cine votează” pe telefon: celule mai înguste, fără „%” */
@media (max-width: 640px) {
  .heat th, .heat td { padding: 6px 3px; font-size: .8rem; }
  .heat .grp { font-size: .75rem; gap: 4px; }
  .heat .grp::before { width: 8px; height: 8px; }
  .heat-col { vertical-align: bottom; }
  .heat-col .grp { writing-mode: vertical-rl; transform: rotate(180deg); padding: 2px 0; }
  .heat-cell .pct-sign { display: none; }
}

/* Subsolul pe telefon: rânduri mai aerisite, linkuri ușor de atins */
@media (pointer: coarse) { .foot { line-height: 2.2; } .foot a { padding: 6px 0; } }
