/* Генезис.юа — розділ «Бюджет» (#/budget): KPI, головні розпорядники (bar chart), дослідник призначень, картка програми.
   Dataviz: синій ряд, золоте виділення, ледь помітна сітка, табличні цифри. */
.bud-head { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; margin-bottom: var(--s-3); }
.bud-head .field select { padding: 6px 10px; border-radius: var(--r-sm); border: 1px solid var(--hairline-out); background: rgba(255,255,255,.4); color: var(--ink); font: inherit; }
.bud-law { font-size: .86rem; color: var(--ink-2); }
.bud-law a { color: var(--blue-600); font-weight: 600; }
.bud-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-sm.ok { background: var(--ok-bg); color: var(--ok-ink); } .chip-sm.warn { background: var(--warn-bg); color: var(--warn-ink); } .chip-sm.info { background: var(--info-bg); color: var(--info-ink); }
.bud-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s-3); }
.bud-kpi { padding: var(--s-3) var(--s-4); border-radius: var(--r-md); display: flex; flex-direction: column; gap: 4px; min-height: 96px; }
.bud-kpi .t { font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.bud-kpi .v { font-family: var(--font); font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--blue-600); }
.bud-kpi .v.gold { color: var(--gold-700); }
.bud-kpi .s { font-size: .74rem; color: var(--muted); }
.bud-cols { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--s-4); align-items: start; margin-top: var(--s-4); }
@media (max-width: 1100px) { .bud-cols { grid-template-columns: 1fr; } }
.bud-bars { width: 100%; height: auto; display: block; overflow: visible; }
.bud-bars .grid { stroke: var(--hairline-out); stroke-width: 1; stroke-dasharray: 2 4; }
.bud-bars .bar { fill: var(--blue); opacity: .85; cursor: pointer; transition: opacity .15s; }
.bud-bars .bar:hover, .bud-bars .bar.active { fill: var(--gold); opacity: 1; }
.bud-bars .bar-fact { fill: var(--gold); opacity: .9; pointer-events: none; }
.bud-bars .lbl { font-size: 11px; fill: var(--ink-2); font-family: var(--font-body); }
.bud-bars .lbl.num { font-family: var(--font); font-variant-numeric: tabular-nums; fill: var(--ink); font-weight: 600; }
.bud-bars .axis { font-size: 10px; fill: var(--muted); }
.bud-legend { display: flex; gap: var(--s-3); font-size: .74rem; color: var(--muted); margin-top: 6px; }
.bud-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.bud-legend .b i { background: var(--blue); } .bud-legend .g i { background: var(--gold); }
.bud-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: var(--s-4) 0 var(--s-3); }
.bud-tabs button { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--hairline-out); background: rgba(255,255,255,.35); color: var(--ink-2); font: inherit; font-size: .86rem; font-weight: 600; cursor: pointer; }
.bud-tabs button[aria-selected="true"] { background: var(--blue); color: #fff; border-color: var(--blue); }
.bud-filters { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: flex-end; margin-bottom: var(--s-3); }
.bud-filters .field { display: flex; flex-direction: column; gap: 4px; font-size: .76rem; color: var(--muted); font-weight: 600; }
.bud-filters .field.grow { flex: 1; min-width: 220px; }
.bud-filters .field select, .bud-filters .field input { padding: 8px 10px; border-radius: var(--r-sm); border: 1px solid var(--hairline-out); background: rgba(255,255,255,.4); color: var(--ink); font: inherit; }
.bud-crumbs { font-size: .82rem; color: var(--muted); margin-bottom: var(--s-2); }
.bud-crumbs a { color: var(--blue-600); }
.bud-table { font-size: .88rem; width: 100%; }
.bud-table th { font-size: .66rem; letter-spacing: .06em; }
.bud-table td { padding: var(--s-2) var(--s-3); line-height: 1.35; vertical-align: top; }
.bud-table td.num { font-family: var(--font); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.bud-table td.code { font-family: var(--font); font-size: .8rem; white-space: nowrap; }
.bud-table td.title { max-width: 420px; }
.bud-table tr.total td { font-weight: 700; background: rgba(255,215,0,.12); }
.bud-table tr.lvl-executor td.title { padding-left: calc(var(--s-3) + 10px); }
.bud-table tr.lvl-program td.title { padding-left: calc(var(--s-3) + 20px); color: var(--ink-2); }
.bud-table tr.lvl-group td.title { padding-left: calc(var(--s-3) + 30px); color: var(--muted); font-size: .82rem; }
.bud-table tr.clickable { cursor: pointer; } .bud-table tr.clickable:hover td { background: rgba(0,87,183,.05); }
.bud-table .drill { color: var(--blue-600); font-weight: 600; text-decoration: none; }
.bud-exec { display: flex; flex-direction: column; gap: 2px; align-items: flex-end; }
.bud-exec .scope { font-size: .68rem; color: var(--muted); font-weight: 500; }
.bud-share { display: block; height: 3px; border-radius: 4px; background: var(--hairline-out); margin-top: 4px; min-width: 70px; overflow: hidden; }
.bud-share i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--gold)); }
/* drawer */
.bud-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); z-index: 60; overflow-y: auto; padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-3); border-radius: var(--r-md) 0 0 var(--r-md); }
.bud-drawer .close { position: absolute; top: var(--s-3); right: var(--s-3); }
.bud-drawer h2 { font-size: 1.05rem; line-height: 1.3; padding-right: 40px; }
.bud-drawer .code { font-family: var(--font); color: var(--gold-700); font-weight: 800; letter-spacing: .04em; }
.bud-drawer .cite { font-size: .8rem; color: var(--ink-2); padding: var(--s-2) var(--s-3); border-left: 3px solid var(--gold); background: rgba(255,215,0,.10); border-radius: var(--r-sm); }
.bud-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-2); }
.bud-facts div { padding: var(--s-2) var(--s-3); border-radius: var(--r-sm); background: rgba(255,255,255,.4); border: 1px solid var(--hairline-out); }
.bud-facts .t { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
.bud-facts .v { font-family: var(--font); font-weight: 700; font-variant-numeric: tabular-nums; }
.bud-drawer h3 { font-size: .9rem; margin-top: var(--s-2); }
.bud-hist { list-style: none; margin: 0; padding: 0; font-size: .82rem; }
.bud-hist li { display: flex; justify-content: space-between; gap: var(--s-2); padding: 4px 0; border-bottom: 1px dashed var(--hairline-out); }
.bud-hist li .n { font-family: var(--font); font-variant-numeric: tabular-nums; font-weight: 600; }
.bud-drawer .actions { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-top: auto; }
.bud-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 59; }
.bud-empty { padding: var(--s-4); color: var(--muted); }
.bud-note { font-size: .78rem; color: var(--warn-ink); background: var(--warn-bg); padding: var(--s-2) var(--s-3); border-radius: var(--r-sm); margin-top: var(--s-2); }
.bud-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
@media (max-width: 800px) { .bud-cmp { grid-template-columns: 1fr; } .bud-facts { grid-template-columns: 1fr; } }
.delta-up { color: var(--ok-ink); } .delta-down { color: var(--bad-ink); }
