:root {
  --ink: #1d2321;
  --muted: #5f6b67;
  --line: #dfe5e2;
  --bg: #fbfaf7;
  --card: #ffffff;
  --accent: #1f5f4a;       /* Pardubice V green */
  --accent-soft: #e6f0ec;
  --pro: #1f7a4d;
  --proti: #b3261e;
  --zdrzel: #a66a00;
  --off: #8b9490;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { font-size: 17px; }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font: 1rem/1.55 "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
h1, h2, h3 { font-family: "Source Serif 4", Georgia, "Times New Roman", serif; line-height: 1.2; }
h1 { font-size: 1.9rem; margin: .2em 0 .4em; }
h2 { font-size: 1.3rem; margin: 1.8em 0 .6em; border-bottom: 1px solid var(--line); padding-bottom: .2em; }
h3 { font-size: 1.1rem; margin: .2em 0; }
main { max-width: 900px; margin: 0 auto; padding: 1rem 1.2rem 3rem; }
.top {
  display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; align-items: center; justify-content: space-between;
  padding: .7rem 1.2rem; background: var(--card); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .55rem; color: var(--ink); text-decoration: none; }
.mark {
  display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 6px;
  background: var(--accent); color: #fff; font: 700 1.05rem Georgia, serif;
}
.top nav { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; }
.top nav a { color: var(--ink); text-decoration: none; }
.top nav a:hover { color: var(--accent); }
footer { max-width: 900px; margin: 0 auto; padding: 1.5rem 1.2rem 3rem; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); }
.lead { color: var(--muted); font-size: 1.05rem; }
.muted, .note, .legend { color: var(--muted); font-size: .9rem; }
.note { font-style: italic; }

.hero { padding: 1.2rem 0 .5rem; }
.search { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.search input[type=search] {
  flex: 1 1 18rem; font-size: 1.1rem; padding: .7rem .9rem; border: 1.5px solid var(--line);
  border-radius: var(--radius); background: var(--card);
}
.search input[type=search]:focus { outline: 2px solid var(--accent); border-color: transparent; }
.search button {
  font-size: 1rem; padding: .7rem 1.3rem; border: 0; border-radius: var(--radius);
  background: var(--accent); color: #fff; cursor: pointer;
}
.filters { flex-basis: 100%; }
.filters summary { cursor: pointer; color: var(--muted); }
.filters .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .6rem 1rem; margin-top: .6rem; }
.filters label { display: flex; flex-direction: column; font-size: .85rem; color: var(--muted); gap: .2rem; }
.filters select, .filters input { font-size: .95rem; padding: .35rem .4rem; border: 1px solid var(--line); border-radius: 6px; background: var(--card); }
.pair { display: flex; gap: .3rem; }
.pair input { flex: 1; min-width: 0; }

.hit { padding: .9rem 0; border-bottom: 1px solid var(--line); }
.hit p { margin: .2rem 0; }
.meta { font-size: .85rem; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
h1 .num { color: var(--accent); margin-right: .3em; }
.tags, .topics { display: flex; flex-wrap: wrap; gap: .3rem; margin: .4rem 0 0; }
.tags span, .tags a, .topics a {
  font-size: .78rem; padding: .05rem .5rem; border-radius: 99px; background: var(--accent-soft);
  color: var(--accent); text-decoration: none;
}
.topics a { background: #eef0f6; color: #2c3e6b; }
.empty { padding: 2rem 0; color: var(--muted); }
.pager { display: flex; gap: 1rem; justify-content: center; padding: 1.2rem 0; }

.badge { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; padding: .1rem .45rem; border-radius: 4px; vertical-align: .1em; }
.s-prijato { background: #e3f3ea; color: var(--pro); }
.s-neprijato { background: #fbe6e4; color: var(--proti); }
.s-castecne { background: #fdf0d9; color: var(--zdrzel); }
.s-neovereno { background: #eceeed; color: var(--muted); }
.explain { color: var(--muted); font-size: .9rem; margin-left: .4rem; }
.warn { background: #fdf0d9; padding: .6rem .8rem; border-radius: var(--radius); }
.warn-dot { color: var(--zdrzel); font-weight: 700; }
.crumbs { font-size: .9rem; color: var(--muted); }

.derived { background: var(--card); border: 1px dashed #c9d6d0; border-radius: var(--radius); padding: .7rem 1rem; margin: 1rem 0; }
.derived p { margin: .3rem 0; }
.label { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.text { white-space: pre-line; background: var(--card); border-left: 3px solid var(--accent); padding: .8rem 1rem; border-radius: 0 var(--radius) var(--radius) 0; }
blockquote { white-space: pre-line; margin: .5rem 0; padding: .4rem .9rem; border-left: 3px solid var(--line); color: var(--muted); }
.entities { display: grid; grid-template-columns: max-content 1fr; gap: .2rem 1rem; font-size: .92rem; }
.entities dt { color: var(--muted); }
.entities dd { margin: 0; }
.source { font-size: .9rem; color: var(--muted); margin-top: 2rem; }

.vote { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .9rem; margin: .7rem 0; }
.vote-head { display: flex; flex-wrap: wrap; gap: .3rem .9rem; align-items: baseline; }
.part { font-weight: 600; }
.counts { font-variant-numeric: tabular-nums; }
.c-pro { color: var(--pro); } .c-proti { color: var(--proti); } .c-zdrzel { color: var(--zdrzel); }
.outcome { font-weight: 700; font-size: .85rem; }
.o-prijato { color: var(--pro); } .o-neprijato { color: var(--proti); } .o-none { color: var(--muted); }
.ballots { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: .25rem .8rem; font-size: .9rem; }
.ballots li { display: flex; gap: .4rem; align-items: baseline; border-left: 3px solid var(--off); padding-left: .45rem; }
.ballots li a { color: var(--ink); text-decoration: none; white-space: nowrap; }
.ballots li small { color: var(--muted); font-size: .72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.ballots li em { margin-left: auto; font-style: normal; font-size: .82rem; white-space: nowrap; }
.ballots li.inferred em { opacity: .8; }
.b-pro { border-color: var(--pro) !important; } .b-pro em, td.b-pro { color: var(--pro); }
.b-proti { border-color: var(--proti) !important; } .b-proti em, td.b-proti { color: var(--proti); }
.b-zdrzel { border-color: var(--zdrzel) !important; } .b-zdrzel em, td.b-zdrzel { color: var(--zdrzel); }
.b-nehlasoval em, .b-omluven em, .b-nepritomen em { color: var(--off); }
.raw { margin-top: .4rem; font-size: .8rem; color: var(--muted); }
.raw summary { cursor: pointer; }

table.list { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.list th, table.list td { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { font-weight: 600; color: var(--muted); font-size: .82rem; }
a.on { font-weight: 700; text-decoration: none; color: var(--ink); }
.agenda dt { font-weight: 600; margin-top: .7rem; }
.agenda dd { margin: .2rem 0 0; }
pre { background: #1d2321; color: #e8efe9; padding: .8rem 1rem; border-radius: var(--radius); overflow-x: auto; font-size: .85rem; }
code { font-size: .88em; }
.files { columns: 2; }
.method li { margin: .4rem 0; }
@media (max-width: 600px) {
  html { font-size: 16px; }
  .files { columns: 1; }
  .ballots { grid-template-columns: 1fr; }
}
