/* ------------------------------------------------------------------
   Sestav si rozpočet – vizuální systém
   Papír státní pokladny, tři barvy peněz: příjmy (stokoruna – zelená),
   výdaje (tisícovka – fialová), schodek (pětistovka – červenohnědá).
   Čísla vždy v monospace, jako v účetní knize.
------------------------------------------------------------------- */
:root {
  --paper: #f3f4f0;
  --paper-2: #e9ebe6;
  --ink: #15201b;
  --ink-2: #4b5651;
  --muted: #66736c;
  --rule: #cfd6d1;
  --rule-strong: #15201b;
  --rev: #1c7a4f;   --rev-soft: #cfe9d9;
  --exp: #4d3a86;   --exp-soft: #d9d2ec;
  --def: #b5402b;   --def-soft: #f1d2cb;
  --focus: #0f5fd7;
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --poster: "Anton", "Archivo", Impact, sans-serif;
  --marker: "Permanent Marker", "Comic Sans MS", cursive;
  --hilite: #f3e14c;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --beam-h: 30px;
}
* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0; color: var(--ink); background: var(--paper);
  font-family: var(--display); font-size: 15px; line-height: 1.45;
  font-variation-settings: "wdth" 100; -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
em { font-style: italic; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.pos { color: var(--rev); }
.neg { color: var(--def); }
.eyebrow { font-family: var(--display); font-variation-settings: "wdth" 75; text-transform: uppercase; letter-spacing: .12em; font-size: 11.5px; font-weight: 600; color: var(--ink-2); margin: 0; }
.fine { font-size: 12.5px; color: var(--muted); }
.loading { padding: 80px 0; text-align: center; color: var(--muted); font-family: var(--mono); }
main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px 80px; }
@media (max-width: 640px) { main { padding: 0 14px 90px; } }

/* --- hlavička ------------------------------------------------------- */
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; border-bottom: 1px solid var(--rule-strong); position: sticky; top: 0; z-index: 20; background: var(--paper); }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; }
.brand-glyph { display: inline-grid; grid-template-columns: 17px 7px; grid-template-rows: 5px 5px; gap: 3px 0; align-self: center; }
.brand-glyph i { display: block; height: 5px; }
.brand-glyph .g-rev { background: var(--rev); grid-column: 1; }
.brand-glyph .g-exp { background: var(--exp); grid-column: 1; grid-row: 2; }
.brand-glyph .g-def { background: var(--def); grid-column: 2; grid-row: 2; }
.brand-name { font-weight: 800; font-variation-settings: "wdth" 80; text-transform: uppercase; letter-spacing: .04em; font-size: 15px; }
.brand-year { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.masthead nav { display: flex; gap: 2px; overflow-x: auto; }
.masthead nav a { text-decoration: none; padding: 6px 10px; font-size: 14px; color: var(--ink-2); border-bottom: 2px solid transparent; white-space: nowrap; }
.masthead nav a:hover { color: var(--ink); }
.masthead nav a.active { color: var(--ink); border-bottom-color: var(--ink); }
@media (max-width: 640px) { .masthead { padding: 10px 14px; } .brand-year { display: none; } }

/* --- hero: teze ------------------------------------------------------- */
.hero { padding: 40px 0 18px; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px 48px; align-items: end; }
.hero h1 { margin: 0; font-weight: 800; font-variation-settings: "wdth" 72; text-transform: uppercase; letter-spacing: -.01em; line-height: .95; font-size: clamp(38px, 6.4vw, 78px); }
.hero h1 .n { font-family: var(--mono); font-weight: 600; text-transform: none; letter-spacing: -.03em; font-size: .9em; }
.hero h1 .rev { color: var(--rev); } .hero h1 .exp { color: var(--exp); } .hero h1 .def { color: var(--def); }
.hero p { margin: 0; color: var(--ink-2); font-size: 15.5px; max-width: 42ch; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; padding-top: 28px; } }

/* --- bilance: podpis stránky ----------------------------------------------
   Dvě řady dílků na stejném měřítku. Kde výdaje přečnívají příjmy, je šrafování = schodek. */
.beam { display: grid; grid-template-columns: 62px minmax(0, 1fr) 118px; gap: 6px 12px; align-items: center; margin: 10px 0 0; }
.beam .lab { font-variation-settings: "wdth" 75; text-transform: uppercase; letter-spacing: .1em; font-size: 11px; font-weight: 700; }
.beam .lab.rev { color: var(--rev); } .beam .lab.exp { color: var(--exp); }
.beam .tot { font-family: var(--mono); font-size: 13px; text-align: right; white-space: nowrap; }
.beam .track { position: relative; height: var(--beam-h); }
.beam .segs { position: absolute; inset: 0; display: flex; gap: 2px; }
.beam .seg { height: 100%; min-width: 0; flex: 0 0 auto; position: relative; overflow: hidden; transition: width .35s cubic-bezier(.2,.7,.2,1); }
.beam .seg span { position: absolute; left: 6px; right: 6px; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 10.5px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .92; }
.beam .seg.hide-label span { display: none; }
.beam .seg.rev { background: var(--rev); } .beam .seg.rev:nth-child(2n) { background: color-mix(in srgb, var(--rev) 82%, #fff); }
.beam .seg.exp { background: var(--exp); } .beam .seg.exp:nth-child(2n) { background: color-mix(in srgb, var(--exp) 82%, #fff); }
.beam .seg.changed { box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px currentColor; }
.beam .gap { position: absolute; top: -4px; bottom: -4px; transition: left .35s cubic-bezier(.2,.7,.2,1), width .35s cubic-bezier(.2,.7,.2,1); pointer-events: none;
  background: repeating-linear-gradient(135deg, var(--def) 0 3px, transparent 3px 8px); outline: 2px solid var(--def); outline-offset: -1px; }
.beam .gap.surplus { background: repeating-linear-gradient(135deg, var(--rev) 0 3px, transparent 3px 8px); outline-color: var(--rev); }
.beam .cursor { position: absolute; top: -8px; bottom: -8px; width: 2px; background: var(--ink); transition: left .35s cubic-bezier(.2,.7,.2,1); }
.beam .cursor::after { content: attr(data-l); position: absolute; bottom: -18px; left: -1px; transform: translateX(-50%); font-family: var(--mono); font-size: 10.5px; color: var(--ink); white-space: nowrap; }
.beam .foot { grid-column: 2; display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--ink-2); margin-top: 26px; }
.beam .foot b { font-weight: 600; }
.beam.mini { --beam-h: 10px; grid-template-columns: minmax(0, 1fr); gap: 3px; margin: 0; }
.beam.mini .lab, .beam.mini .tot, .beam.mini .foot, .beam.mini .cursor::after, .beam.mini .seg span { display: none; }
.beam.mini .gap { top: -2px; bottom: -2px; outline-width: 1px; }
.beam.mini .cursor { top: -3px; bottom: -3px; width: 1.5px; }
@media (max-width: 640px) {
  .beam { grid-template-columns: 1fr; gap: 2px; }
  .beam .lab { margin-top: 8px; }
  .beam .tot { text-align: left; }
  .beam .foot { grid-column: 1; margin-top: 10px; }
  .beam .foot span:first-child, .beam .foot span:last-child { display: none; }
  .beam .cursor::after { display: none; }
  .brand-name { white-space: nowrap; font-size: 13px; }
}

/* --- rozvržení editoru ----------------------------------------------- */
.workbench { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 0 40px; margin-top: 34px; border-top: 1px solid var(--rule-strong); }
.ledger { padding-top: 14px; min-width: 0; }
.protocol { align-self: stretch; padding-top: 14px; border-left: 1px solid var(--rule); padding-left: 24px; }
.protocol .stick { position: sticky; top: 62px; z-index: 5; background: var(--paper); padding-bottom: 12px; margin-bottom: 8px; border-bottom: 2px solid var(--ink); }
.protocol .stick .jump { width: 100%; margin-top: 8px; }
.guide-slot .guide { margin: 10px 0 0; }
.guide-slot .g-bubble { max-height: 230px; }
@media (max-width: 960px) { .workbench { grid-template-columns: 1fr; } .protocol { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule-strong); margin-top: 24px; } .protocol .stick { position: static; } .protocol .stick .jump { display: none; } }

.tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.tools input[type=search] { flex: 1; min-width: 200px; background: transparent; border: 0; border-bottom: 1px solid var(--rule-strong); padding: 8px 0; font: inherit; color: inherit; border-radius: 0; }
.tools input[type=search]::placeholder { color: var(--muted); }
.btn { background: transparent; border: 1px solid var(--ink); border-radius: 0; padding: 7px 12px; cursor: pointer; font-size: 13px; font-weight: 600; font-variation-settings: "wdth" 88; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: var(--exp); border-color: var(--exp); }
.btn.quiet { border-color: var(--rule); color: var(--ink-2); font-weight: 500; }
.btn.quiet:hover { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.sm { padding: 4px 8px; font-size: 11.5px; }

.part { display: grid; grid-template-columns: 62px 1fr auto; align-items: baseline; gap: 12px; padding: 22px 0 8px; border-bottom: 2px solid var(--ink); }
.part h2 { margin: 0; font-weight: 800; font-variation-settings: "wdth" 72; text-transform: uppercase; letter-spacing: .02em; font-size: 22px; }
.part .code { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.part .sum { font-family: var(--mono); font-size: 14px; text-align: right; }
.part .sum .d { font-size: 12px; margin-left: 8px; }

/* kapitola = řádek účetní knihy s proporčním proužkem */
.chapter { border-bottom: 1px solid var(--rule); }
.chapter > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 62px minmax(0, 1fr) 150px; gap: 4px 12px; padding: 12px 0 10px; align-items: baseline; }
.chapter > summary::-webkit-details-marker { display: none; }
.chapter > summary:hover .cname { text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 3px; }
.chapter .code { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.chapter .cname { font-weight: 600; font-size: 15px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.chapter .csum { font-family: var(--mono); font-size: 14px; text-align: right; }
.chapter .csum .d { display: block; font-size: 11.5px; color: var(--muted); }
.chapter .share { grid-column: 2; height: 4px; background: var(--paper-2); position: relative; }
.chapter .share i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--exp); transition: width .35s; }
.chapter.rev .share i { background: var(--rev); }
.chapter .share em { position: absolute; right: 0; top: 7px; font-style: normal; font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.chapter[open] > summary { padding-bottom: 14px; }
.chapter .caret { display: inline-block; width: 8px; height: 8px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(-45deg); margin-left: 6px; transition: transform .15s; vertical-align: 2px; }
.chapter[open] .caret { transform: rotate(45deg); }
.tag { font-family: var(--mono); font-size: 10.5px; color: var(--muted); border: 1px solid var(--rule); padding: 0 5px; line-height: 16px; white-space: nowrap; }
.tag.est { border-style: dashed; }
.tag.off { color: var(--rev); border-color: var(--rev); }

/* položka */
.items { padding: 0 0 6px 62px; }
@media (max-width: 640px) { .items { padding-left: 0; } .chapter > summary { grid-template-columns: 48px 1fr; } .chapter .csum { grid-column: 1 / -1; text-align: left; } .chapter .share { grid-column: 1 / -1; } .part { grid-template-columns: 48px 1fr; } .part .sum { grid-column: 1 / -1; text-align: left; } }
.item { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 4px 20px; padding: 10px 0; border-top: 1px dashed var(--rule); align-items: center; }
.item.changed { border-left: 3px solid var(--ink); margin-left: -12px; padding-left: 9px; }
.item .iname { font-size: 14px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.item .ibase { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.item .ctl { display: grid; grid-template-columns: 1fr 92px 26px; gap: 8px; align-items: center; }
.item .ctl input[type=number] { font-family: var(--mono); font-size: 14px; text-align: right; background: transparent; border: 0; border-bottom: 1px solid var(--ink); padding: 4px 2px; color: inherit; width: 100%; border-radius: 0; -moz-appearance: textfield; }
.item .ctl input[type=number]::-webkit-outer-spin-button, .item .ctl input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }
.item .reset { border: 0; background: transparent; cursor: pointer; color: var(--muted); font-family: var(--mono); font-size: 15px; padding: 2px; line-height: 1; }
.item .reset:hover { color: var(--ink); }
.item .reset[hidden] { visibility: hidden; display: block; }
.item .impact { grid-column: 1 / -1; font-size: 12.5px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 3px 0; }
.item .impact span + span::before { content: "·"; margin: 0 8px; color: var(--muted); }
.item .impact .d { font-family: var(--mono); font-weight: 600; }
.item .inote { grid-column: 1 / -1; font-size: 12px; color: var(--muted); max-width: 70ch; }
.item.info { color: var(--ink-2); }
@media (max-width: 640px) { .item { grid-template-columns: 1fr; } }

/* posuvník jako pravítko */
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; margin: 0; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(var(--rule-strong), var(--rule-strong)) no-repeat center / 100% 1px, repeating-linear-gradient(90deg, var(--rule) 0 1px, transparent 1px 10%) no-repeat center / 100% 8px; }
input[type=range]::-moz-range-track { height: 1px; background: var(--rule-strong); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 10px; height: 18px; background: var(--ink); border: 0; margin-top: -8px; border-radius: 1px; }
input[type=range]::-moz-range-thumb { width: 10px; height: 18px; background: var(--ink); border: 0; border-radius: 1px; }
input[type=range]:focus-visible { outline-offset: 0; }

/* --- protokol (souhrn) ------------------------------------------------- */
.protocol h2 { margin: 0 0 10px; font-weight: 800; font-variation-settings: "wdth" 72; text-transform: uppercase; font-size: 18px; letter-spacing: .02em; }
.verdict { padding: 4px 0 12px; border-bottom: 1px solid var(--rule); }
.verdict .k { font-size: 12px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .1em; font-variation-settings: "wdth" 75; font-weight: 600; }
.verdict .v { font-family: var(--mono); font-size: 34px; font-weight: 600; line-height: 1.1; letter-spacing: -.03em; margin: 2px 0; }
.verdict .v small { font-size: 14px; font-weight: 500; letter-spacing: 0; margin-left: 4px; }
.verdict .cmp { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.verdict .cmp b { font-weight: 600; }
.stat { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 9px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.stat .k { font-size: 13px; }
.stat .v { font-family: var(--mono); font-size: 14px; text-align: right; white-space: nowrap; }
.stat .s { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.stat .v .d { font-size: 11.5px; margin-left: 6px; }
.gauge { grid-column: 1 / -1; height: 6px; background: var(--paper-2); position: relative; margin-top: 4px; }
.gauge i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--exp); transition: width .35s; }
.gauge i.over { background: var(--def); }
.gauge b { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); }
.gauge b::after { content: "3 % HDP"; position: absolute; top: 12px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 10px; color: var(--ink-2); white-space: nowrap; }
.gauge + .s { margin-top: 12px; }

.entries { margin: 0; padding: 0; list-style: none; font-size: 13px; max-height: 240px; overflow: auto; }
.entries li { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--rule); }
.entries li .v { font-family: var(--mono); white-space: nowrap; }
.entries li.empty { color: var(--muted); border: 0; }
.section-h { display: flex; justify-content: space-between; align-items: baseline; margin: 20px 0 6px; }
.section-h h3 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; font-variation-settings: "wdth" 75; font-weight: 700; color: var(--ink-2); }

.form { display: grid; gap: 12px; margin-top: 8px; }
.form label { display: grid; gap: 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; font-variation-settings: "wdth" 75; font-weight: 600; color: var(--ink-2); }
.form input, .form textarea { font: inherit; font-size: 14px; letter-spacing: 0; text-transform: none; font-variation-settings: "wdth" 100; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--ink); padding: 6px 0; border-radius: 0; width: 100%; resize: vertical; }
.form input::placeholder, .form textarea::placeholder { color: var(--muted); }
.hp { position: absolute; left: -9999px; }
.alert { font-size: 13px; padding: 8px 10px; border-left: 3px solid var(--ink); background: var(--paper-2); }
.alert.err { border-color: var(--def); color: var(--def); }
.alert.ok { border-color: var(--rev); }
.alert code { font-family: var(--mono); font-size: 12px; word-break: break-all; }

/* mobilní lišta */
.minibar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--ink); color: var(--paper); padding: 10px 14px; font-size: 12.5px; }
.minibar .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.minibar .v { font-family: var(--mono); font-size: 16px; font-weight: 600; }
.minibar .btn { border-color: var(--paper); color: var(--paper); }
@media (max-width: 960px) { .minibar { display: block; } }

/* --- galerie ------------------------------------------------------------- */
.page-h { padding: 40px 0 16px; border-bottom: 2px solid var(--ink); display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.page-h h1 { margin: 0; font-weight: 800; font-variation-settings: "wdth" 72; text-transform: uppercase; font-size: clamp(30px, 4.6vw, 48px); line-height: 1; }
.page-h p { margin: 6px 0 0; color: var(--ink-2); max-width: 60ch; }
.sorter { display: flex; gap: 0; }
.sorter button { background: transparent; border: 1px solid var(--rule); border-left-width: 0; padding: 6px 10px; font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.sorter button:first-child { border-left-width: 1px; }
.sorter button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 32px; }
.bcard { display: grid; gap: 8px; padding: 18px 0 16px; border-bottom: 1px solid var(--rule); text-decoration: none; }
.bcard:hover .bt { text-decoration: underline; text-underline-offset: 3px; }
.bcard .bt { font-weight: 700; font-size: 17px; font-variation-settings: "wdth" 88; }
.bcard .ba { font-size: 13px; color: var(--ink-2); }
.bcard .bb { font-family: var(--mono); font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.bcard .bb small { font-size: 12px; font-weight: 500; color: var(--ink-2); margin-left: 6px; letter-spacing: 0; }
.bcard .bn { font-size: 13.5px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bcard .bm { font-family: var(--mono); font-size: 11.5px; color: var(--muted); display: flex; gap: 14px; }
.empty { padding: 60px 0; color: var(--muted); }

/* --- náhled publikovaného rozpočtu ------------------------------------------ */
.view-h { padding: 40px 0 10px; }
.view-h h1 { margin: 6px 0 4px; font-weight: 800; font-variation-settings: "wdth" 72; text-transform: uppercase; font-size: clamp(30px, 5vw, 56px); line-height: .98; }
.view-h .by { color: var(--ink-2); font-size: 14px; }
.view-h .note { white-space: pre-wrap; margin: 14px 0 0; max-width: 72ch; font-size: 16px; border-left: 3px solid var(--exp); padding-left: 14px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 6px; }
table.diff { width: 100%; border-collapse: collapse; font-size: 14px; }
table.diff th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; font-variation-settings: "wdth" 75; color: var(--ink-2); padding: 8px 8px 8px 0; border-bottom: 2px solid var(--ink); }
table.diff td { padding: 8px 8px 8px 0; border-bottom: 1px dashed var(--rule); vertical-align: top; }
table.diff .n { font-family: var(--mono); text-align: right; white-space: nowrap; }
table.diff th.n { text-align: right; }
table.diff tr.kap td { border-bottom: 1px solid var(--ink); font-weight: 600; padding-top: 16px; }
table.diff tr.kap td .code { font-family: var(--mono); font-weight: 400; color: var(--muted); margin-right: 8px; }
table.diff td.imp { font-size: 12.5px; color: var(--ink-2); }

/* --- Halířek: průvodce v rohu ------------------------------------------------ */
.item .ask { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; cursor: help; text-decoration: underline dotted var(--rule); text-underline-offset: 3px; }
.item .ask:hover { text-decoration-color: var(--ink); }
.guide { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px; margin: 0 0 18px; }
.g-bubble { grid-column: 1; background: var(--paper); border: 1.5px solid var(--ink); padding: 12px 14px; font-size: 13.5px; line-height: 1.45; max-height: 360px; overflow: auto; position: relative; box-shadow: 4px 4px 0 var(--ink); }
.g-bubble::after { content: ""; position: absolute; right: -9px; bottom: 14px; width: 14px; height: 14px; background: var(--paper); border-right: 1.5px solid var(--ink); border-top: 1.5px solid var(--ink); transform: rotate(45deg); }
.g-bubble p { margin: 6px 0 0; }
.g-bubble .g-title { font-weight: 800; text-transform: uppercase; font-variation-settings: "wdth" 75; letter-spacing: .06em; font-size: 12px; padding-bottom: 6px; border-bottom: 1px solid var(--rule); }
.g-bubble[data-mood="warn"] { border-color: var(--def); box-shadow: 4px 4px 0 var(--def); }
.g-bubble[data-mood="warn"]::after { border-color: var(--def); }
.g-bubble[data-mood="warn"] .g-title { color: var(--def); }
.g-bubble[data-mood="good"] { border-color: var(--rev); box-shadow: 4px 4px 0 var(--rev); }
.g-bubble[data-mood="good"]::after { border-color: var(--rev); }
.g-bubble[data-mood="good"] .g-title { color: var(--rev); }
.g-bubble.closed { display: none; }
.g-src { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--rule); font-family: var(--mono); font-size: 10.5px; line-height: 1.5; color: var(--muted); }
.g-src a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.g-src a:hover { color: var(--ink); }
.g-coin { grid-column: 2; grid-row: 1; background: none; border: 0; padding: 0; cursor: pointer; line-height: 0; transform-origin: 50% 90%; }
.g-coin svg { display: block; filter: drop-shadow(2px 2px 0 var(--ink)); }
.g-coin .eyes { animation: blink 5s infinite; transform-origin: 32px 29px; }
.guide[data-mood="warn"] .brows path:first-child { transform: rotate(14deg); transform-origin: 27px 21px; }
.guide[data-mood="warn"] .brows path:last-child { transform: rotate(-14deg); transform-origin: 37px 21px; }
.guide[data-mood="warn"] .mouth { d: path("M25 42 Q32 39 39 42"); }
.guide[data-mood="good"] .mouth { d: path("M24 39 Q32 47 40 39"); }
.guide.talk .g-coin { animation: nod .7s ease; }
.g-tools { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.g-ind { background: var(--ink); color: var(--paper); border: 0; padding: 5px 9px; font-family: var(--marker); font-size: 13px; cursor: pointer; transform: rotate(-1.5deg); box-shadow: 2px 2px 0 var(--def); }
.g-ind:hover { transform: rotate(0); }
.g-close { background: var(--paper); border: 1px solid var(--rule); width: 22px; height: 22px; line-height: 1; font-size: 14px; cursor: pointer; color: var(--muted); }
.g-close:hover { color: var(--ink); border-color: var(--ink); }
.guide.collapsed .g-bubble, .guide.collapsed .g-tools { display: none; }
.guide.collapsed { width: auto; }
.guide.collapsed .g-coin { opacity: .7; }
.guide.collapsed .g-coin:hover { opacity: 1; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes nod { 0% { transform: rotate(0); } 30% { transform: rotate(-8deg); } 60% { transform: rotate(6deg); } 100% { transform: rotate(0); } }
@media (max-width: 960px) { .guide { position: fixed; z-index: 40; bottom: 56px; right: 10px; width: calc(100vw - 20px); margin: 0; } .guide.collapsed { width: auto; } .g-bubble { max-height: 34vh; font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { .g-coin .eyes, .guide.talk .g-coin { animation: none; } }

/* --- dialog ------------------------------------------------------------ */
dialog { border: 1px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink); max-width: 720px; width: calc(100% - 32px); padding: 0; }
dialog::backdrop { background: rgba(21,32,27,.55); }
.dialog-body { padding: 22px 24px; display: grid; gap: 10px; }
.dialog-body h2 { margin: 0; font-weight: 800; font-variation-settings: "wdth" 75; text-transform: uppercase; font-size: 22px; }
.dialog-body h3 { margin: 10px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; font-variation-settings: "wdth" 75; color: var(--ink-2); }
.dialog-body ul { margin: 0; padding-left: 18px; font-size: 14px; }
.dialog-body li { margin: 3px 0; }
.dialog-body .btn { justify-self: start; }

.colophon { padding: 16px 24px; border-top: 1px solid var(--rule-strong); font-family: var(--mono); font-size: 11.5px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

/* ==================================================================
   PUNK VRSTVA – xerox, výstřižky, razítka, fixa. Zapnuto pro celou stránku.
   ================================================================== */
/* kopírkové zrno přes celou stránku */
body::before { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .07; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
main, .masthead, .colophon { position: relative; z-index: 1; }

/* značka */
.brand-name { font-family: var(--poster); font-weight: 400; letter-spacing: .02em; font-size: 15px; line-height: .95; text-transform: uppercase; }
.masthead nav a.active { border-bottom: 3px solid var(--def); }

/* hero jako výstřižky z novin */
.hero h1 { font-family: var(--poster); font-weight: 400; letter-spacing: 0; line-height: 1.02; }
.hero h1 .cut { display: inline-block; padding: 0 .08em; margin: .02em .06em .02em 0; }
.hero h1 .cut.inv { background: var(--ink); color: var(--paper); transform: rotate(-1.2deg); }
.hero h1 .cut.box { border: 3px solid var(--ink); transform: rotate(.8deg); background: var(--paper); }
.hero h1 .cut.def { background: var(--def); color: var(--paper); transform: rotate(-2deg); box-shadow: 4px 4px 0 var(--ink); }
.hero h1 .cut.hi { background: linear-gradient(transparent 20%, var(--hilite) 20%, var(--hilite) 85%, transparent 85%); }
.hero h1 .n { font-family: var(--mono); font-weight: 600; letter-spacing: -.02em; font-size: .92em; }
.hero p { font-family: var(--marker); font-size: 16px; color: var(--ink); transform: rotate(-.6deg); }

/* sekce jako černé pásky s páskou */
.part { border-bottom: 0; padding: 26px 0 6px; }
.part h2 { font-family: var(--poster); font-weight: 400; letter-spacing: .04em; font-size: 26px; background: var(--ink); color: var(--paper); padding: 2px 12px 0; display: inline-block; transform: rotate(-.8deg); position: relative; }
.part h2::after { content: ""; position: absolute; right: -14px; top: -8px; width: 34px; height: 12px; background: rgba(243,225,76,.7); transform: rotate(35deg); }
.part.rev h2 { background: var(--rev); }
.part.exp h2 { background: var(--exp); }

/* štítky jako razítka */
.tag { transform: rotate(-3deg); font-family: var(--marker); font-size: 11px; border-width: 1.5px; text-transform: lowercase; }
.tag.off { transform: rotate(2deg); }

/* změněná položka = přeškrtnuté číslo fixou a zvýrazňovač */
.item.changed { border-left: 0; margin-left: 0; padding-left: 0; background: linear-gradient(90deg, rgba(243,225,76,.35), transparent 60%); }
.item.changed .ibase { text-decoration: line-through; text-decoration-color: var(--def); text-decoration-thickness: 2px; }
.item .impact .d { font-family: var(--marker); font-size: 14px; }

/* tlačítka s tvrdým stínem */
.btn { box-shadow: 3px 3px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn.quiet { box-shadow: none; }
.btn.primary { box-shadow: 4px 4px 0 var(--def); }

/* razítko na schodku v bilanci */
.beam .gap::after { content: attr(data-stamp); position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-8deg); font-family: var(--poster); font-size: 13px; letter-spacing: .12em; color: var(--def); background: var(--paper); border: 2px solid var(--def); padding: 1px 6px; white-space: nowrap; opacity: .95; }
.beam .gap.surplus::after { color: var(--rev); border-color: var(--rev); }
.beam.mini .gap::after { display: none; }
.beam .gap.narrow::after { display: none; }

/* protokol: velké číslo fixou, razítko */
.protocol h2, .page-h h1, .view-h h1, .dialog-body h2 { font-family: var(--poster); font-weight: 400; letter-spacing: .03em; }
.verdict .v { font-family: var(--poster); font-weight: 400; letter-spacing: 0; font-size: 44px; }
.verdict { position: relative; }
.stamp { display: inline-block; font-family: var(--poster); letter-spacing: .14em; text-transform: uppercase; border: 4px double currentColor; padding: 2px 8px 0; transform: rotate(-6deg); color: var(--def); font-size: 13px; opacity: .85; }
.stamp.good { color: var(--rev); }
.verdict .stamp { position: absolute; right: 0; top: 18px; }

/* Halířek: páska přes roh bubliny, jméno fixou */
.g-bubble::before { content: ""; position: absolute; left: -12px; top: -9px; width: 54px; height: 16px; background: rgba(243,225,76,.75); transform: rotate(-12deg); }
.g-bubble .g-title { font-family: var(--marker); text-transform: none; letter-spacing: 0; font-size: 14px; }
.g-kind { display: inline-block; font-size: 9.5px; text-transform: uppercase; letter-spacing: .08em; padding: 0 4px; margin-right: 4px; border: 1px solid currentColor; vertical-align: 1px; }
.g-kind.k-vlada { color: var(--exp); }
.g-kind.k-nezavisly { color: var(--rev); }
.g-kind.k-zakon { color: var(--ink); }
.g-kind.k-urad { color: var(--ink-2); }
.g-kind.k-tisk { color: var(--muted); }

/* galerie: názvy jako výstřižky */
.bcard .bt { font-family: var(--poster); font-weight: 400; letter-spacing: .02em; font-size: 20px; }
.bcard .bb { font-family: var(--poster); font-weight: 400; font-size: 26px; }
.view-h .note { font-family: var(--marker); font-size: 17px; border-left: 0; padding-left: 0; background: linear-gradient(transparent 15%, rgba(243,225,76,.5) 15%, rgba(243,225,76,.5) 85%, transparent 85%); display: inline; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.view-h .stamp { display: inline-block; font-family: var(--poster); letter-spacing: .14em; text-transform: uppercase; border: 4px double currentColor; padding: 2px 8px 0; transform: rotate(-6deg); color: var(--def); font-size: 13px; opacity: .85; }
@media (prefers-reduced-motion: reduce) { .g-ind:hover { transform: rotate(-1.5deg); } }

/* --- Kdo to zaplatí: dopad na typické domácnosti --------------------------- */
.section-h .btn.quiet.sm { font-family: var(--marker); text-transform: none; letter-spacing: 0; }
.wallets { display: grid; gap: 0; }
.wallet { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 0; border-bottom: 1px dashed var(--rule); align-items: baseline; }
.wallet:last-child { border-bottom: 0; }
.w-name { font-size: 13.5px; font-weight: 600; }
.w-note { display: block; font-weight: 400; font-size: 11.5px; color: var(--muted); }
.w-val { font-family: var(--mono); font-size: 16px; font-weight: 600; text-align: right; white-space: nowrap; }
.w-val small { font-size: 10.5px; font-weight: 400; color: var(--muted); margin-left: 2px; }
.w-lines { grid-column: 1 / -1; font-size: 11.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 2px 0; }
.w-lines span + span::before { content: "·"; margin: 0 6px; }
.w-lines b { font-family: var(--mono); font-weight: 600; }
.unattr { font-size: 12px; color: var(--ink-2); margin: 10px 0 0; padding: 8px 10px; background: var(--paper-2);
  border-left: 3px solid var(--muted); }
.unattr b { font-family: var(--mono); }

/* --- O projektu ---------------------------------------------------------------- */
.prose { max-width: 72ch; padding: 10px 0 40px; }
.prose h2 { font-family: var(--poster); font-weight: 400; letter-spacing: .03em; font-size: 20px; margin: 26px 0 6px; }
.prose p { margin: 0 0 12px; font-size: 15px; }
.empty h1 { font-family: var(--poster); font-weight: 400; font-size: 40px; margin: 4px 0 10px; color: var(--ink); }
