:root {
  --bg: #f6f7f9; --surface: #ffffff; --text: #17202b; --muted: #5b6676; --line: #e3e7ed;
  --brand: #1f4e8c; --brand-2: #c2410c; --accent-bg: #fff4ec; --heat-0: #eef2f8;
  --badge-bg: #e7f5ec; --badge-fg: #1b6b3a; --notice-bg: #fff8e1; --notice-fg: #6b4e00;
 --ph-mor: rgba(217,119,6,.13); --ph-vote: rgba(220,38,38,.16); --ph-vote-line: #b91c1c; --ph-post: rgba(100,116,139,.11);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f141b; --surface: #171e27; --text: #e6ebf2; --muted: #9aa6b6; --line: #2a3442;
    --brand: #7fb0f0; --brand-2: #fb923c; --accent-bg: #2a1d14; --heat-0: #1d2633;
    --badge-bg: #173324; --badge-fg: #8fe0ad; --notice-bg: #2e2810; --notice-fg: #f2d68a;
    --ph-mor: rgba(251,191,36,.12); --ph-vote: rgba(248,113,113,.18); --ph-vote-line: #f87171; --ph-post: rgba(148,163,184,.10);
  }
}
:root[data-theme="dark"] {
  --bg: #0f141b; --surface: #171e27; --text: #e6ebf2; --muted: #9aa6b6; --line: #2a3442;
  --brand: #7fb0f0; --brand-2: #fb923c; --accent-bg: #2a1d14; --heat-0: #1d2633;
  --badge-bg: #173324; --badge-fg: #8fe0ad; --notice-bg: #2e2810; --notice-fg: #f2d68a;
 --ph-mor: rgba(251,191,36,.12); --ph-vote: rgba(248,113,113,.18); --ph-vote-line: #f87171; --ph-post: rgba(148,163,184,.10);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.hero { background: var(--surface); border-bottom: 1px solid var(--line); padding: 40px 0 28px; margin-bottom: 24px; }
.eyebrow { margin: 0 0 6px; color: var(--brand); font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; }
h1 { margin: 0 0 10px; font-size: clamp(28px, 5vw, 42px); line-height: 1.15; }
h2 { margin: 0 0 6px; font-size: 20px; }
.lead { margin: 0 0 16px; font-size: 18px; color: var(--muted); max-width: 720px; }
.muted { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.status-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.badge { background: var(--badge-bg); color: var(--badge-fg); padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.badge.frozen { background: var(--notice-bg); color: var(--notice-fg); }
.notice { background: var(--notice-bg); color: var(--notice-fg); padding: 12px 16px; border-radius: 10px; margin-bottom: 20px; }
.counters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.counter, .mod { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.counter.accent { background: var(--accent-bg); }
.counter .who { font-size: 12px; color: var(--muted); }  /* 15. 10.: „od N rôznych účtov“ */
.num { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.counter.accent .num { color: var(--brand-2); }
.lbl { color: var(--muted); font-size: 13px; line-height: 1.35; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 20px; min-width: 0; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; }
.controls { display: flex; flex-wrap: wrap; gap: 8px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { background: transparent; color: var(--text); border: 0; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--brand); color: var(--surface); }
.chart { position: relative; height: 320px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid2 .card { margin-bottom: 20px; }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 120px 1fr 44px; gap: 8px; align-items: center; font-size: 14px; }
.bar-track { background: var(--heat-0); border-radius: 6px; height: 14px; overflow: hidden; }
.bar-fill { background: var(--brand); height: 100%; border-radius: 6px; }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; }
.split { display: flex; flex-direction: column; gap: 14px; }
.split-row .lbl { display: block; margin-bottom: 4px; }
.split-bar { display: flex; height: 26px; border-radius: 7px; overflow: hidden; font-size: 12px; font-weight: 600; color: #fff; }
.split-bar span { display: flex; align-items: center; padding: 0 8px; white-space: nowrap; }
.split-bar .fb { background: #3b6fb6; } .split-bar .ig { background: #b5477a; }
.mods { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.heat-wrap { overflow-x: auto; }
.heat { display: grid; grid-template-columns: 28px repeat(24, minmax(14px, 1fr)); gap: 2px; min-width: 420px; font-size: 11px; color: var(--muted); }
.heat .cell { aspect-ratio: 1; border-radius: 3px; background: var(--heat-0); }
.heat .hl { text-align: center; }
.about p { max-width: 780px; }
.about a { color: var(--brand); }
.foot { color: var(--muted); font-size: 13px; padding-bottom: 40px; }
@media (max-width: 760px) {
  .grid2 { grid-template-columns: 1fr; gap: 0; }
  .chart { height: 260px; }
  .bar-row { grid-template-columns: 100px 1fr 40px; }
}

.counter, .mod { position: relative; }
.law-link { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-left: 8px;
  border: 1px solid var(--line); border-radius: 50%; font-size: 12px; font-weight: 600; line-height: 1;
  color: var(--muted); text-decoration: none; vertical-align: middle; }
.law-link:hover, .law-link:focus-visible { color: var(--brand); border-color: var(--brand); }
.counter .law-link, .mod .law-link { position: absolute; top: 10px; right: 10px; margin: 0; }
.about ul { max-width: 780px; padding-left: 20px; }
.about li { margin-bottom: 6px; }
.about h3 { margin: 18px 0 10px; font-size: 17px; }
.team { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.person { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.person p { margin: 0 0 8px; }
.person .pname { font-weight: 700; margin-bottom: 2px; }
.person .prole { color: var(--muted); font-size: 14px; }
.person .links { font-size: 14px; margin: 0; }
#moratorium { scroll-margin-top: 60px; }
@media (max-width: 760px) { .team { grid-template-columns: 1fr; } }

.card h3.sub { margin: 18px 0 4px; font-size: 16px; }
/* menu, ktoré ide so stránkou (13. 10.); na mobile/tablete sa posúva do strany */
.topnav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); margin: -24px 0 24px; }
.topnav-in { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  padding-top: 8px; padding-bottom: 8px; }
.topnav-in::-webkit-scrollbar { display: none; }
.topnav a { flex: 0 0 auto; padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 600;
  color: var(--muted); text-decoration: none; white-space: nowrap; min-height: 36px; display: inline-flex; align-items: center; }
.topnav a:hover, .topnav a:focus-visible { color: var(--brand); background: var(--bg); }
.topnav a.on { color: var(--surface); background: var(--brand); }
main section[id], main .grid2[id] { scroll-margin-top: 60px; }
@media (max-width: 760px) { .topnav a { font-size: 13px; padding: 6px 10px; } }
/* jazyky (13. 10.) */
.langs { display: flex; flex-wrap: wrap; gap: 2px 10px; justify-content: flex-end; font-size: 13px; margin: -24px 0 10px; }
.langs a { color: var(--muted); text-decoration: none; font-weight: 600; padding: 2px 0; }
.langs a:hover, .langs a:focus-visible { color: var(--brand); }
.langs a[aria-current] { color: var(--brand); border-bottom: 2px solid var(--brand); }
.badge.final { background: var(--notice-bg); color: var(--notice-fg); }
.badge.done { background: var(--line); color: var(--text); }
@media (max-width: 760px) { .langs { justify-content: flex-start; margin-top: -16px; } }
/* zdieľanie */
.share { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.share a, .share button { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 12px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; text-decoration: none; cursor: pointer; }
.share a:hover, .share button:hover, .share a:focus-visible, .share button:focus-visible { border-color: var(--brand); color: var(--brand); }
.share .share-native { background: var(--brand); border-color: var(--brand); color: var(--surface); font-weight: 600; }
/* formulár reakcií */
#fb-form { max-width: 640px; }
.stars { border: 0; padding: 0; margin: 0 0 12px; }
.stars legend { font-weight: 600; font-size: 15px; margin-bottom: 4px; padding: 0; }
.stars-row { display: inline-flex; flex-direction: row-reverse; }
.stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars label { font-size: 32px; line-height: 1; padding: 4px 3px; color: var(--line); cursor: pointer; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: #e0a100; }
.stars input:focus-visible + label { outline: 2px solid var(--brand); border-radius: 4px; }
.frow { margin-bottom: 12px; }
.frow label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
#fb-form select, #fb-form textarea, #fb-form input[type=email] { width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; font-size: 16px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 4px 0 14px; }
.check input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.check a { color: var(--brand); }
.frow-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
#fb-form button[type=submit], .consent button { background: var(--brand); color: var(--surface); border: 0; border-radius: 8px;
  padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer; min-height: 44px; }
#fb-msg { font-size: 14px; }
#fb-msg.ok { color: var(--badge-fg); } #fb-msg.err { color: var(--brand-2); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* päta a súhlas */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; }
.foot-links a { color: var(--muted); }
.consent { position: fixed; left: 12px; right: 12px; bottom: 12px; max-width: 720px; margin: 0 auto; z-index: 10;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,.18); display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.consent[hidden] { display: none; }
.consent p { margin: 0; flex: 1 1 320px; font-size: 14px; }
.consent a { color: var(--brand); }
.consent-b { display: flex; gap: 8px; }
.consent button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.about code { font-size: 13px; }
/* tablet */
@media (max-width: 1024px) and (min-width: 761px) {
  .counters { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .hero { padding: 28px 0 20px; }
  .card { padding: 16px; }
  .card-head { align-items: flex-start; }
  .controls { width: 100%; }
  .seg { flex: 1 1 auto; } .seg button { flex: 1; padding: 8px 6px; }
  .counters { grid-template-columns: repeat(2, 1fr); }
  .num { font-size: 24px; }
}
.phase-legend { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin-top: 12px; }
.phase-keys { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.phase-key { display: inline-flex; align-items: center; gap: 6px; }
.phase-key i { width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--line); display: inline-block; }

/* 8. 11.: doplnok k dlaždici „najrušnejší deň“ */
.mod .who { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
