/* Budget tab (budget.js). Uses the site tokens from app.css; light theme only, like the rest of the site. */
#tab-budget .bd-block { margin-bottom: 36px; }
#tab-budget .bd-ctl { position: static; }
#tab-budget .bd-src { margin-top: 6px; }
#tab-budget .bd-leg { margin-top: 8px; }
#tab-budget .bd-tv { margin-top: 6px; }
#tab-budget .bd-tv .scroll { max-height: 420px; overflow: auto; }
#tab-budget .bd-tv table.data td { white-space: nowrap; }
.bd-csv { margin-top: 6px; font-size: .8125rem; }
.bd-chart .grid line { stroke: #ececec; }
.bd-chart .ax, .bd-chart text.ax { font-size: 11.5px; fill: #595959; }
.bd-kpis .bd-kt { color: var(--muted); }
.bd-kpis .kpi .v small { font-size: .9rem; color: var(--ink-2); }

/* recapture explainer: short lines, each with its own source (i) */
.bd-explain { list-style: none; margin: 4px 0 0; padding: 0; max-width: 78ch; display: grid; gap: 8px; }
.bd-explain li { position: relative; padding-left: 14px; line-height: 1.5; color: var(--ink-2); }
.bd-explain li::before { content: ""; position: absolute; left: 0; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: #eb6834; }
.bd-explain b { color: var(--ink); font-weight: 600; }
.bd-explain .info-btn { margin-left: 2px; width: 20px; height: 20px; }

/* "of each tax dollar" bar */
.bd-dollar { display: flex; gap: 2px; height: 46px; max-width: 720px; margin: 4px 0 18px; border-radius: 6px; overflow: hidden; font-size: .875rem; }
.bd-dollar > span { display: flex; align-items: center; gap: 6px; padding: 0 12px; white-space: nowrap; min-width: 0; }
.bd-dollar b { font-size: 1.25rem; font-weight: 700; }
.bd-d-kept { background: #2a78d6; color: #fff; }
.bd-d-sent { background: #eb6834; color: #111; justify-content: flex-end; }

/* two small charts side by side on wide screens */
.bd-pair { display: grid; grid-template-columns: 1fr; gap: 20px 32px; }
@media (min-width: 900px) { .bd-pair { grid-template-columns: 1fr 1fr; } }
.bd-pair .chart-title { margin-bottom: 6px; }

/* planning: timeline + candidate project chips */
.bd-plan { background: #fff; color: var(--ink); border: 1px solid #111; }
.bd-tl { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; font-size: .875rem; max-width: 78ch; }
.bd-tl b { display: inline-block; min-width: 116px; font-weight: 600; color: var(--ink); }
.bd-chips { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; max-width: 900px; }
.bd-chips li { border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: .8125rem; color: var(--ink-2); background: var(--surface-2); }

@media (max-width: 640px) {
  .bd-dollar { height: 40px; font-size: .8125rem; }
  .bd-dollar b { font-size: 1.05rem; }
  .bd-dollar > span { padding: 0 8px; }
  .bd-tl b { display: block; min-width: 0; }
  #tab-budget .bd-ctl .field { flex: 1 1 100%; }
  #tab-budget .bd-ctl .seg { flex-wrap: nowrap; }
}

/* six lead figures: one row on wide screens, three per row on tablets, two on phones */
@media (min-width: 1180px) { #tab-budget .bd-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 641px) and (max-width: 1179px) { #tab-budget .bd-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
