/* Chagua 6.5 – Budget tracker. Builds on the Compare page look (hero, cards) from elections.css. */
.chb-wrap { --b-g: #016b3f; --b-d: #014d2e; --b-l: #2f9e6b; --b-red: #bb0000; --b-gold: #f2b705; --b-ink: #0f1f17; --b-mut: #5b6b63; --b-line: #e3e9e5; --b-soft: #f4f8f5; color: var(--b-ink); }
.chb-wrap *, .chb-wrap *::before { -webkit-text-fill-color: currentColor; box-sizing: border-box; }
.chb-wrap h2, .chb-wrap h3 { background: none !important; padding: 0 !important; border-radius: 0 !important; box-shadow: none !important; display: block !important; text-transform: none !important; letter-spacing: -.01em !important; }
.chb-wrap a { background: none !important; padding: 0 !important; border-radius: 0; }

/* Hero: level tabs and search */
.chb-levels { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.chb-levels a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px 9px 9px !important; border-radius: 999px !important; background: rgba(255,255,255,.12) !important; border: 1px solid rgba(255,255,255,.22); color: #fff !important; font-weight: 800; font-size: 15px; text-decoration: none !important; transition: background .15s; }
.chb-levels a b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.2); font-size: 13px; }
.chb-levels a:hover { background: rgba(255,255,255,.22) !important; }
.chb-levels a.is-on { background: #fff !important; color: var(--b-d) !important; border-color: #fff; }
.chb-levels a.is-on b { background: var(--b-gold); color: #1c1600; }
.chb-find { position: relative; max-width: 560px; margin: 0 0 14px; }
.chb-find input[type=search] { width: 100%; height: 50px; padding: 0 16px 0 48px !important; border: 0 !important; border-radius: 14px !important; font: inherit; font-size: 16px !important; color: var(--b-ink); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%23016b3f' stroke-width='2.2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 15px center no-repeat !important; box-shadow: 0 6px 18px rgba(0,0,0,.18) !important; }
.chb-hits { position: absolute; z-index: 20; left: 0; right: 0; top: 56px; margin: 0; padding: 6px; list-style: none; border-radius: 14px; background: #fff; box-shadow: 0 16px 40px rgba(0,0,0,.22); max-height: 360px; overflow: auto; }
.chb-hits li { margin: 0; }
.chb-hits a { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px !important; border-radius: 10px !important; color: var(--b-ink) !important; text-decoration: none !important; }
.chb-hits a:hover { background: var(--b-soft) !important; }
.chb-hits small { color: var(--b-mut); }
.chb-hits .is-none { padding: 10px 12px; color: var(--b-mut); }

/* Toolbar: year chips + share */
.chb-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 14px; }
.chb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chb-chips button { min-height: 40px; padding: 0 16px !important; border: 2px solid #d6e2db !important; border-radius: 999px !important; background: #fff !important; color: var(--b-ink) !important; font: inherit; font-size: 14.5px !important; font-weight: 800 !important; cursor: pointer; box-shadow: none !important; text-transform: none !important; }
.chb-chips button[aria-pressed=true] { background: var(--b-d) !important; border-color: var(--b-d) !important; color: #fff !important; }
.chb-share { display: flex; flex-wrap: wrap; gap: 6px; }
.chb-share button { min-height: 40px; padding: 0 14px !important; border: 1px solid #d6e2db !important; border-radius: 12px !important; background: #fff !important; color: var(--b-d) !important; font: inherit; font-size: 14px !important; font-weight: 800 !important; cursor: pointer; box-shadow: none !important; text-transform: none !important; }
.chb-share button.is-gold { background: var(--b-gold) !important; border-color: var(--b-gold) !important; color: #1c1600 !important; box-shadow: 0 4px 12px rgba(217,158,0,.3) !important; }
.chb-back { margin-right: auto; color: var(--b-g) !important; font-weight: 800; text-decoration: none !important; }

/* Cards */
.chb-card { position: relative; margin: 0 0 18px; padding: 22px 24px 20px; border-radius: 20px; background: #fff; border: 1px solid var(--b-line); box-shadow: 0 1px 2px rgba(4,54,31,.05), 0 12px 32px rgba(4,54,31,.08); overflow: hidden; }
.chb-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: linear-gradient(180deg, #000 0 33%, var(--b-red) 33% 66%, var(--b-g) 66%); }
.chb-wrap .chb-h { margin: 0 0 14px !important; font-size: 20px !important; line-height: 1.25 !important; font-weight: 800 !important; color: var(--b-ink) !important; }
.chb-wrap .chb-h3 { margin: 16px 0 8px !important; font-size: 14px !important; font-weight: 800 !important; letter-spacing: .05em !important; text-transform: uppercase !important; color: var(--b-d) !important; }
.chb-wrap .chb-h3:first-child { margin-top: 0 !important; }
.chb-grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.chb-grid2 > .chb-card { margin: 0 0 18px; }
.chb-note, .chb-basis { margin: 12px 0 0 !important; font-size: 13.5px; line-height: 1.5; color: var(--b-mut); }
.chb-note--top { margin: -4px 0 14px !important; padding: 10px 14px; border-radius: 12px; background: #fff7dc; border: 1px solid #f3dd8a; color: #5f4a00; }
.chb-src { margin: 12px 0 0 !important; font-size: 12.5px; color: var(--b-mut); }
.chb-src a { color: var(--b-g) !important; font-weight: 700; }
.chb-wait { margin: 0 0 10px !important; padding: 14px 16px; border-radius: 12px; background: var(--b-soft); font-size: 15px; line-height: 1.5; }
.chb-linkbtn { border: 0 !important; background: none !important; padding: 0 !important; color: var(--b-g) !important; font: inherit; font-weight: 800 !important; cursor: pointer; text-transform: none !important; box-shadow: none !important; min-height: 0 !important; }
.chb-means { background: linear-gradient(135deg, #fffdf4, #fff); border-color: #f3dd8a; }
.chb-means::before { background: var(--b-gold); }
.chb-means p { margin: 0 !important; font-size: 15.5px; line-height: 1.6; }
.chb-next { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 18px !important; }
.chb-next a, .chb-links a { color: var(--b-g) !important; font-weight: 800; }

/* Tiles */
.chb-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.chb-tile { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 14px 14px 12px; border-radius: 14px; background: var(--b-soft); border: 1px solid var(--b-line); overflow: hidden; }
.chb-tile b { font-size: 22px; line-height: 1.15; font-weight: 900; }
.chb-tile span { font-size: 13px; font-weight: 700; color: var(--b-mut); }
.chb-tile small { font-size: 12.5px; color: var(--b-d); font-weight: 700; }
.chb-tile.is-hero { background: linear-gradient(155deg, #013a22, #016b3f 70%, #0a7d4c); border: 0; color: #fff; }
.chb-tile.is-hero b { color: #fff; font-size: 26px; }
.chb-tile.is-hero span, .chb-tile.is-hero small { color: rgba(255,255,255,.88); }

/* Bars */
.chb-bars { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.chb-bars li { display: grid; grid-template-columns: minmax(140px, 260px) minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; margin: 0 !important; padding: 7px 0 !important; border-bottom: 1px solid #f0f4f1; }
.chb-bars.is-ranked li { grid-template-columns: 30px minmax(130px, 240px) minmax(0, 1fr) auto; }
.chb-bars li:last-child { border-bottom: 0; }
.chb-bars li.is-hl { background: #fff7dc; border-radius: 10px; padding-left: 8px !important; padding-right: 8px !important; }
.chb-rank { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--b-soft); color: var(--b-mut); font-size: 12px; font-weight: 800; }
.chb-lab { font-size: 14.5px; font-weight: 700; line-height: 1.25; min-width: 0; }
.chb-lab a { color: var(--b-ink) !important; text-decoration: none !important; border-bottom: 1px dashed #b8cbbf; }
.chb-lab a:hover { color: var(--b-g) !important; border-color: var(--b-g); }
.chb-lab small { display: block; margin-top: 1px; font-size: 12px; font-weight: 600; color: var(--b-mut); }
.chb-track { position: relative; display: block; height: 16px; border-radius: 999px; background: #eef4f0; overflow: hidden; }
.chb-track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--b-l); transition: width .4s ease; }
.chb-val { font-style: normal; font-size: 14px; font-weight: 800; white-space: nowrap; text-align: right; min-width: 110px; }
.chb-multi { grid-column: 2 / -1; display: flex; flex-direction: column; gap: 4px; }
.chb-bars.is-ranked .chb-multi { grid-column: 3 / -1; }
.chb-track.is-thin { height: 14px; overflow: visible; background: transparent; display: flex; align-items: center; gap: 8px; }
.chb-track.is-thin i { position: static; display: block; height: 12px; flex: none; }
.chb-track.is-thin em { font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--b-mut); white-space: nowrap; }
.chb-ykey { display: flex; flex-wrap: wrap; gap: 6px 14px; list-style: none !important; margin: 0 0 10px !important; padding: 0 !important; font-size: 13px; font-weight: 700; color: var(--b-mut); }
.chb-ykey li { margin: 0 !important; display: inline-flex; align-items: center; gap: 6px; }
.chb-ykey b { width: 14px; height: 14px; border-radius: 4px; }

/* Stacked bar */
.chb-stack { display: flex; height: 46px; border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,.04); }
.chb-stack i { display: flex; align-items: center; justify-content: center; min-width: 2px; color: #fff; font-style: normal; font-weight: 900; font-size: 15px; }
.chb-stack i span { text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.chb-legend { list-style: none !important; margin: 14px 0 0 !important; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 16px; }
.chb-legend li { display: grid; grid-template-columns: 14px 1fr auto; grid-template-rows: auto auto; gap: 0 8px; margin: 0 !important; align-items: center; }
.chb-legend b { grid-row: 1 / 3; width: 14px; height: 14px; border-radius: 4px; align-self: start; margin-top: 3px; }
.chb-legend span { font-size: 14px; font-weight: 700; }
.chb-legend em { font-style: normal; font-weight: 900; font-size: 15px; }
.chb-legend small { grid-column: 2 / 4; font-size: 12.5px; color: var(--b-mut); }

/* Planned vs actual */
.chb-pva-row { margin: 0 0 14px; }
.chb-pva-l { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 6px !important; font-size: 14.5px; font-weight: 800; }
.chb-pva-l span { color: var(--b-d); }
.chb-pva-t { position: relative; height: 22px; border-radius: 999px; background: #f4f6f5; }
.chb-pva-t i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; }
.chb-pva-t i.is-plan { border: 2px dashed #9fb4a8; background: transparent; }
.chb-pva-t i.is-act { top: 4px; bottom: 4px; background: linear-gradient(90deg, #014d2e, #2f9e6b); }
.chb-pva-v { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 0 0 !important; font-size: 12.5px; color: var(--b-mut); }
.chb-pva-v span { display: inline-flex; align-items: center; gap: 6px; }
.chb-pva-v .dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.chb-pva-v .dot.is-plan { border: 2px dashed #9fb4a8; }
.chb-pva-v .dot.is-act { background: #2f9e6b; }

/* Gauges and columns */
.chb-gauges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.chb-gauge { margin: 0; text-align: center; }
.chb-gauge svg { width: 100%; max-width: 180px; height: auto; }
.chb-gauge figcaption { font-size: 12.5px; line-height: 1.35; color: var(--b-mut); font-weight: 700; }
.chb-cols { width: 100%; height: auto; max-height: 280px; }

/* Selects, toggles, who */
.chb-sel { display: inline-flex; align-items: center; gap: 8px; margin: 0 12px 12px 0; font-size: 14px; font-weight: 800; color: var(--b-mut); }
.chb-sel select { height: 42px; padding: 0 12px; border: 2px solid #d6e2db; border-radius: 12px; background: #fbfdfc; font: inherit; font-size: 15px; color: var(--b-ink); max-width: 100%; }
.chb-toggle { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 12px; font-weight: 700; font-size: 14px; cursor: pointer; }
.chb-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chb-toggle span { position: relative; width: 40px; height: 24px; border-radius: 999px; background: #cfd9d3; transition: background .15s; }
.chb-toggle span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.chb-toggle input:checked + span { background: var(--b-g); }
.chb-toggle input:checked + span::after { transform: translateX(16px); }
.chb-who { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; }
.chb-pill { display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px 8px 14px; border-radius: 999px; background: #fff; border: 2px solid var(--pc, #016b3f); font-size: 15px; }
.chb-pill small { color: var(--b-mut); }
.chb-pill a { color: var(--b-g) !important; font-weight: 700; font-size: 13px; }
.chb-pill button { width: 26px; height: 26px; padding: 0 !important; border: 0 !important; border-radius: 50% !important; background: var(--b-soft) !important; color: var(--b-ink) !important; font-size: 16px !important; line-height: 26px !important; cursor: pointer; min-height: 0 !important; box-shadow: none !important; }
.chb-sel--add { margin: 0; }
.chb-scroll { overflow-x: auto; }
.chb-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.chb-table th, .chb-table td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--b-line); background: #fff !important; color: var(--b-ink) !important; }
.chb-table thead th { background: var(--b-soft) !important; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--b-mut) !important; }
.chb-links { margin: 0 0 12px !important; padding-left: 20px !important; }
.chb-hublink { margin: 10px 0 0 !important; }
.chb-hublink a { color: #016b3f !important; font-weight: 800; }

@media (max-width: 760px) {
	.chb-grid2 { grid-template-columns: 1fr; }
	.chb-card { padding: 18px 16px 16px; border-radius: 16px; }
	.chb-bars li, .chb-bars.is-ranked li { grid-template-columns: 1fr auto; }
	.chb-bars.is-ranked li { grid-template-columns: 26px 1fr auto; }
	.chb-bars li .chb-track { grid-column: 1 / -1; }
	.chb-bars.is-ranked li .chb-track { grid-column: 2 / -1; }
	.chb-bars li .chb-lab { grid-column: 1 / 2; }
	.chb-bars.is-ranked li .chb-lab { grid-column: 2 / 3; }
	.chb-bars li .chb-val { grid-row: 1; grid-column: 2; }
	.chb-bars.is-ranked li .chb-val { grid-column: 3; }
	.chb-multi, .chb-bars.is-ranked .chb-multi { grid-column: 1 / -1; }
	.chb-gauges { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.chb-levels a { font-size: 14px; }
	.chb-tile b { font-size: 19px; }
	.chb-tile.is-hero b { font-size: 22px; }
}
/* 6.5.1: crawlable summary and index */
.chb-seo p { color: #3d4a44; line-height: 1.55; margin: 6px 0 10px; }
.chb-index summary { cursor: pointer; font-weight: 800; color: #016b3f; padding: 6px 0; }
.chb-h3 { font-size: 15px !important; margin: 14px 0 6px !important; color: #13261c; }
.chb-cols-list { columns: 4 170px; column-gap: 18px; list-style: none; margin: 0; padding: 0; }
.chb-cols-list li { break-inside: avoid; padding: 2px 0; font-size: 14px; }
.chb-cols-list a { color: #13261c; text-decoration: none; }
.chb-cols-list a:hover { color: #016b3f; text-decoration: underline; }
/* 6.6: chart / table switch */
.chb-mode { display: inline-flex; padding: 3px; border-radius: 12px; background: #eef4f0; border: 1px solid #d6e2db; }
.chb-mode button { min-height: 34px; padding: 0 12px !important; border: 0 !important; border-radius: 9px !important; background: transparent !important; color: #3d4a44 !important; font-weight: 800; cursor: pointer; }
.chb-mode button[aria-pressed="true"] { background: #fff !important; color: #016b3f !important; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.chb-data th.is-n, .chb-data td.is-n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chb-data td.is-r { width: 36px; color: #8a9890 !important; font-weight: 800; }
.chb-data tbody th { font-weight: 700; text-transform: none; letter-spacing: 0; font-size: 14px; }
.chb-data tbody th small { display: block; color: #8a9890; font-weight: 600; }
.chb-data tbody tr:nth-child(even) td, .chb-data tbody tr:nth-child(even) th { background: #f7faf8 !important; }
.chb-data tr.is-hl th, .chb-data tr.is-hl td { background: #fff6d6 !important; }
.chb-data a { color: #016b3f !important; font-weight: 800; text-decoration: none; }
.chb-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: middle; }
/* 6.6: plain-language guide */
.chb-flow { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; counter-reset: none; }
.chb-flow li { position: relative; padding: 14px 14px 12px; border-radius: 14px; background: #f7faf8; border: 1px solid #e1ebe5; }
.chb-flow li::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: 14px 14px 0 0; background: #016b3f; }
.chb-flow li:nth-child(5n+1)::before { background: #1b1b1b; } .chb-flow li:nth-child(5n+2)::before { background: #bb0000; }
.chb-flow-n { font-size: 22px; display: block; margin-bottom: 4px; }
.chb-flow b { display: block; color: #13261c; font-size: 15px; }
.chb-flow p { margin: 4px 0 0 !important; font-size: 14px; line-height: 1.5; color: #3d4a44; }
.chb-words { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 18px; margin: 8px 0 0; }
.chb-words div { padding: 8px 0; border-bottom: 1px dashed #d6e2db; }
.chb-words dt { font-weight: 900; color: #016b3f; }
.chb-words dd { margin: 2px 0 0; font-size: 14px; line-height: 1.5; color: #3d4a44; }
.chb-do ul { margin: 6px 0 0; padding-left: 20px; }
.chb-do li { margin: 6px 0; line-height: 1.5; }
.chb-do a { color: #016b3f !important; font-weight: 800; white-space: nowrap; }
/* 6.7: compact tables, long lists, line charts, money chain */
.chb-data { width: auto; min-width: min(100%, 520px); max-width: 860px; font-size: 13.5px; }
.chb-data th, .chb-data td { padding: 6px 12px !important; }
.chb-data thead th { font-size: 11px; }
.chb-bars.is-clipped:not(.is-open) > li[data-more], .chb-data.is-clipped:not(.is-open) tbody tr[data-more] { display: none; }
.chb-more { display: block; margin: 10px auto 0; min-height: 38px; padding: 0 18px !important; border: 1px solid #cfe0d6 !important; border-radius: 999px !important; background: #f4f9f6 !important; color: #016b3f !important; font-weight: 800; cursor: pointer; }
.chb-more:hover { background: #e6f4ea !important; }
@media (min-width: 900px) { .chb-bars { max-width: 900px; } }
.chb-line-wrap { overflow-x: auto; }
.chb-line { display: block; width: 100%; max-width: 1000px; min-width: 380px; height: auto; margin: 6px 0 0; }
.chb-line a circle { cursor: pointer; }
.chb-line circle:hover { r: 7; }
.chb-chain { margin: 0 0 14px; padding: 12px 14px; border-radius: 16px; background: #fff; border: 1px solid #e1ebe5; }
.chb-chain-t { margin: 0 0 8px !important; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #6b7a72; }
.chb-chain ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.chb-chain li { position: relative; }
.chb-chain li a, .chb-chain li span { display: flex; flex-direction: column; gap: 1px; height: 100%; padding: 10px 12px; border-radius: 12px; background: #f7faf8; border: 1px solid #e1ebe5; text-decoration: none; color: #13261c; }
.chb-chain li a:hover { border-color: #016b3f; }
.chb-chain li:nth-child(1) a, .chb-chain li:nth-child(1) span { border-top: 4px solid #1b1b1b; }
.chb-chain li:nth-child(2) a, .chb-chain li:nth-child(2) span { border-top: 4px solid #bb0000; }
.chb-chain li:nth-child(3) a, .chb-chain li:nth-child(3) span { border-top: 4px solid #016b3f; }
.chb-chain li:nth-child(4) a, .chb-chain li:nth-child(4) span { border-top: 4px solid #8a9890; }
.chb-chain li.is-on span { background: linear-gradient(155deg, #013a22, #016b3f); color: #fff; border-color: transparent; }
.chb-chain small { font-size: 12px; font-weight: 800; opacity: .75; }
.chb-chain b { font-size: 17px; font-weight: 900; }
.chb-chain em { font-style: normal; font-size: 12px; opacity: .75; }
.chb-mode button { padding: 0 10px !important; }
