:root {
  --bg: #ffffff;
  --surface: #f4f7f9;
  --surface-2: #e7edf1;
  --utility: #eef4f8;
  --text: #141414;
  --muted: #4f585e;
  --line: #ccd6dd;
  --accent: #c8322b;          /* červená z mojs.sk */
  --accent-hover: #a8261f;
  --accent-ink: #ffffff;
  --accent-soft: #fbeae8;
  --green: #2b7a3d;           /* zelená z erbu */
  --green-soft: #e6f2e8;
  --warn: #9a5b00;
  --warn-soft: #fff4df;
  --pro: #2b7a3d;
  --con: #c8322b;
  --neutral: #7c858b;
  --c1: #2b7a3d;
  --c2: #2f6fd1;
  --c3: #b5651d;
  --radius: 12px;
  --shadow: 0 1px 2px rgb(0 0 0 / .06), 0 4px 16px rgb(0 0 0 / .06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121416; --surface: #1b1f22; --surface-2: #252a2e; --utility: #1b1f22; --text: #eceff1; --muted: #a6aeb4; --line: #353b40;
    --accent: #ef6a5f; --accent-hover: #ff8277; --accent-ink: #1a0503; --accent-soft: #3a1d1b; --green: #5cbf75; --green-soft: #1b3322;
    --warn: #f0b562; --warn-soft: #33281a; --pro: #5cbf75; --con: #ef6a5f; --neutral: #8f979d; --c1: #5cbf75; --c2: #7aa8f0; --c3: #e3a06a;
  }
}
:root[data-theme="dark"] {
  --bg: #121416; --surface: #1b1f22; --surface-2: #252a2e; --utility: #1b1f22; --text: #eceff1; --muted: #a6aeb4; --line: #353b40;
  --accent: #ef6a5f; --accent-hover: #ff8277; --accent-ink: #1a0503; --accent-soft: #3a1d1b; --green: #5cbf75; --green-soft: #1b3322;
  --warn: #f0b562; --warn-soft: #33281a; --pro: #5cbf75; --con: #ef6a5f; --neutral: #8f979d; --c1: #5cbf75; --c2: #7aa8f0; --c3: #e3a06a;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--bg); padding: 8px; z-index: 10; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* header (podľa mojs.sk) */
.utility { background: var(--utility); font-size: .85rem; }
.utility-inner { display: flex; justify-content: space-between; gap: 12px; padding-top: 8px; padding-bottom: 8px; }
.top { background: var(--bg); position: sticky; top: 0; z-index: 5; box-shadow: 0 1px 0 var(--line); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 12px; }
.brand { display: flex; gap: 14px; align-items: center; color: var(--text); text-decoration: none; }
.brand .erb { width: 46px; height: auto; flex: none; }
.brand small { display: block; font-size: .85rem; color: var(--text); }
.brand strong { display: block; color: var(--accent); font-size: 1.7rem; font-weight: 500; letter-spacing: .02em; line-height: 1.1; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.btn.pill { border-radius: 999px; padding: 10px 20px; font-weight: 700; text-decoration: none; display: inline-block; }
.btn.pill.ghost { background: transparent; color: var(--text); border: 1.5px solid var(--line); }
.btn.pill.ghost:hover { border-color: var(--text); }
.nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 8px; padding-bottom: 0; border-top: 1px solid var(--line); }
.nav a { color: var(--text); text-decoration: none; padding: 12px 2px 10px; font-weight: 700; font-size: .95rem; border-bottom: 3px solid transparent; display: flex; align-items: center; gap: 8px; }
.nav a svg { width: 26px; height: 26px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav a:hover { border-bottom-color: var(--text); }
.nav a.active { border-bottom-color: var(--accent); color: var(--accent); }
.menu-btn { display: none; }
@media (max-width: 900px) {
  .hide-sm { display: none; }
  .brand strong { font-size: 1.35rem; }
  .brand .erb { width: 38px; }
  .menu-btn { display: inline-block; background: var(--surface); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 8px 14px; font: inherit; font-weight: 700; }
  .nav { display: none; border-top: 1px solid var(--line); padding-bottom: 8px; }
  .nav.open { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
  .nav a { padding: 10px 4px; border-bottom: 1px solid var(--line); }
  .top-actions .btn.pill:not(.ghost) { padding: 8px 14px; font-size: .9rem; }
}
@media (max-width: 420px) { .top-actions .btn.pill { display: none; } }

main { padding-top: 24px; padding-bottom: 40px; min-height: 60vh; }
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.2; margin: 0 0 8px; letter-spacing: -.01em; }
h2 { font-size: 1.35rem; margin: 28px 0 10px; }
h3 { font-size: 1.1rem; margin: 18px 0 8px; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 70ch; }
.made-by { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sybri { color: var(--text); flex: none; line-height: 0; }
.sybri-logo { width: 120px; height: auto; }
.foot { border-top: 1px solid var(--line); padding-top: 16px; padding-bottom: 32px; font-size: .9rem; color: var(--muted); }

/* cards */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
a.card { color: var(--text); text-decoration: none; display: block; border-top: 4px solid var(--accent); background: var(--bg); }
a.card:hover { box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
.stat { font-size: 1.8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.notice { background: var(--warn-soft); border-left: 4px solid var(--warn); padding: 12px 14px; border-radius: 6px; margin: 14px 0; }
.info { background: var(--accent-soft); border-left: 4px solid var(--accent); padding: 12px 14px; border-radius: 6px; margin: 14px 0; }

/* filters */
.filters { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin: 12px 0; }
.filters label { display: flex; flex-direction: column; font-size: .8rem; color: var(--muted); gap: 4px; }
.filters .wide { grid-column: 1 / -1; }
input, select, button { font: inherit; }
input[type=text], input[type=search], input[type=number], input[type=date], select {
  background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; width: 100%; min-width: 0;
}
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px; padding: 8px 16px; cursor: pointer; font-weight: 700; }
.btn:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.btn.ghost:hover { background: var(--accent-soft); color: var(--accent); }
.btn.small { padding: 4px 10px; font-size: .85rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin: 8px 0; }

/* tables */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface); font-weight: 700; white-space: nowrap; cursor: pointer; user-select: none; position: sticky; top: 0; }
th[aria-sort="ascending"]::after { content: " ▲"; font-size: .7em; }
th[aria-sort="descending"]::after { content: " ▼"; font-size: .7em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.detail td { background: var(--surface); }
tbody tr:hover td { background: var(--surface); }
.nowrap { white-space: nowrap; }
.pager { display: flex; gap: 8px; align-items: center; margin: 10px 0; flex-wrap: wrap; }
.tag { display: inline-block; background: var(--surface-2); border-radius: 999px; padding: 1px 8px; font-size: .78rem; margin: 1px 2px 1px 0; white-space: nowrap; }
.v-za { color: var(--pro); font-weight: 700; }
.v-proti { color: var(--con); font-weight: 700; }
.v-zdrzal, .v-nehlasoval { color: var(--neutral); font-weight: 700; }
.pill-ok { color: var(--pro); } .pill-no { color: var(--con); }
mark { background: #ffe58a; color: #000; border-radius: 2px; padding: 0 1px; }

/* calculator */
.q { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 14px 0; background: var(--bg); }
.q h3 { margin: 0 0 6px; font-size: 1.08rem; }
.q .ctx { color: var(--muted); font-size: .92rem; margin: 0 0 10px; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.scale label { border: 1px solid var(--line); border-radius: 8px; padding: 8px 6px; text-align: center; font-size: .85rem; cursor: pointer; background: var(--surface); }
.scale input { position: absolute; opacity: 0; pointer-events: none; }
.scale input:checked + span { font-weight: 700; }
.scale label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.scale label:has(input:focus-visible) { outline: 2px solid var(--accent); }
@media (max-width: 560px) { .scale { grid-template-columns: 1fr; } }
.qfoot { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-top: 10px; font-size: .9rem; }
details summary { cursor: pointer; color: var(--accent); }
.result { display: grid; gap: 12px; }
.res-row { display: grid; grid-template-columns: minmax(140px, 220px) 1fr 70px; gap: 12px; align-items: center; }
.bar { height: 14px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; }
.progress { padding: 8px 0; font-size: .9rem; color: var(--muted); }

/* prose (rendered markdown) */
.prose { max-width: 90ch; }
.prose table { margin: 10px 0 18px; display: block; overflow-x: auto; }
.prose h1 { font-size: 1.6rem; }
.prose code { background: var(--surface); padding: 0 4px; border-radius: 4px; }
.snip { font-size: .9rem; color: var(--muted); margin: 4px 0 0; }
.hit { border-bottom: 1px solid var(--line); padding: 12px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* infobox & sources */
details.more { margin: 6px 0; }
.morebox { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-top: 8px; font-size: .94rem; }
.morebox h4 { margin: 12px 0 4px; font-size: .95rem; }
.timeline { padding-left: 18px; margin: 4px 0; }
.timeline li { margin: 3px 0; }
.procon { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .procon { grid-template-columns: 1fr; } }
.src { border-top: 1px solid var(--line); padding: 8px 0; }
img.shot { max-width: 100%; max-height: 360px; border: 1px solid var(--line); border-radius: 6px; margin-top: 6px; display: block; }

/* home – hero a ikonový riadok (podľa mojs.sk) */
.hero { position: relative; padding: 36px 0 24px; overflow: hidden; }
.hero .orn { position: absolute; inset: 0; z-index: -1; opacity: .9; pointer-events: none; }
.hero h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); max-width: 18ch; }
.hero .lead { color: var(--text); }
.hero .cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.countdown { margin-bottom: 18px; min-height: 86px; }
.cd-label { display: block; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; font-size: .82rem; margin-bottom: 8px; }
.cd-units { display: flex; gap: 10px; flex-wrap: wrap; }
.cd-unit { display: flex; flex-direction: column; align-items: center; min-width: 76px; padding: 8px 10px; background: var(--accent); color: var(--accent-ink); border-radius: 12px; box-shadow: var(--shadow); }
.cd-unit b { font-size: 2rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.cd-unit small { font-size: .75rem; opacity: .9; }
@media (max-width: 420px) { .cd-unit { min-width: 64px; } .cd-unit b { font-size: 1.6rem; } }
.iconrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 18px 20px; padding: 22px 0; margin: 10px 0 6px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.iconrow a { display: flex; align-items: center; gap: 12px; color: var(--text); font-weight: 700; text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.iconrow a:hover { text-decoration-color: var(--accent); }
.iconrow svg { width: 38px; height: 38px; flex: none; stroke: var(--text); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.section-title { font-size: 1.6rem; font-weight: 400; margin: 30px 0 12px; }
.card .stat { color: var(--accent); }
.scale label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
/* názor kandidátov pri otázke */
.opgrid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 10px 0; }
.opcard { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.oppos { font-size: 1.05rem; font-weight: 700; margin: 2px 0; }
.opcard blockquote { margin: 8px 0 0; padding-left: 10px; border-left: 3px solid var(--line); }

/* stránka kandidáti */
.cands { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin: 16px 0 8px; }
.cand { background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.cand h3 { margin: 0; }
.cand-head { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; }
.ballot { flex: none; width: 40px; height: 40px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 1.15rem; }
.statrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0; }
.statrow div { background: var(--bg); border-radius: 8px; padding: 6px 8px; text-align: center; }
.statrow b { display: block; font-size: 1.15rem; }
.statrow span { font-size: .72rem; color: var(--muted); line-height: 1.2; display: block; }
@media (max-width: 420px) { .statrow { grid-template-columns: repeat(2, 1fr); } }
table.topics th[scope=row] { width: 18%; vertical-align: top; text-align: left; }
table.topics td { vertical-align: top; width: 27%; }
table.topics ul { margin: 0; padding-left: 18px; }
table.topics li { margin-bottom: 4px; }
@media (max-width: 760px) {
  table.topics thead { display: none; }
  table.topics tr { display: block; border-bottom: 2px solid var(--line); padding: 8px 0; }
  table.topics th[scope=row], table.topics td { display: block; width: auto; border: 0; }
  table.topics td::before { content: attr(data-label); display: block; font-weight: 700; font-size: .85rem; color: var(--muted); }
}
.srchead { border-left: 5px solid var(--line); padding-left: 10px; margin-top: 22px; }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.tile-img { display: block; height: 170px; overflow: hidden; background: var(--bg); border-bottom: 1px solid var(--line); }
.tile-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.tile-body { padding: 8px 10px; }
.tile-body strong { font-size: .92rem; line-height: 1.3; display: block; }
[id^="k-"], section.q { scroll-margin-top: 150px; }

/* prepis videa a detail zdroja */
.prepis summary { cursor: pointer; font-size: .9rem; }
.prepis-text { white-space: pre-wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: .92rem; line-height: 1.55; max-width: 80ch; }
.zdroj-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; }
@media (max-width: 800px) { .zdroj-grid { grid-template-columns: 1fr; } }

.exp-h { margin: 10px 0 4px; font-size: .9rem; }
.exp { margin: 0 0 6px; padding-left: 18px; }
.exp li { margin-bottom: 3px; }
