.budget-plan-dialog{background:var(--canvas);color:var(--ink)}
.budget-plan-dialog .dialog-body{padding:12px 14px 20px;min-width:0}
.budget-plan-dialog .dialog-head h2{font-size:18px}
.budget-plan-dialog .dialog-head{display:flex;flex-wrap:nowrap;gap:4px;padding:8px 12px}
.budget-plan-dialog .dialog-head h2{flex:1;min-width:0}
.budget-plan-dialog .dialog-head .dialog-icon{width:36px;min-width:36px;min-height:36px;flex:0 0 36px;padding:6px;font-size:18px}
.budget-plan-dialog button{touch-action:manipulation}
.budget-plan-dialog :is(button,input):focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.budget-plan-dialog [hidden]{display:none!important}
.bp-month{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}
.bp-month button{min-height:44px;min-width:44px;color:var(--accent);padding:6px;font-weight:800}
.bp-month [data-bp-month]{flex:1}
.bp-funds{padding:14px;background:var(--summary-surface);border-radius:16px}
.bp-funds-heading{display:flex;justify-content:space-between;align-items:baseline;gap:8px;font-weight:700}
.bp-funds-heading small{font-size:11px;font-weight:500;white-space:nowrap}
.bp-total{display:flex;align-items:center;gap:12px;text-align:left;padding:4px 0;width:100%;min-height:48px;color:var(--accent)}
.bp-total>span{flex:1;min-width:0}.bp-total strong{display:block;font-size:clamp(23px,6vw,32px);font-variant-numeric:tabular-nums;overflow-wrap:anywhere;min-width:0}.bp-total :is(svg,.system-icon){flex-shrink:0;width:18px}
.bp-snapshot-date{display:block;margin-top:4px;font-size:12px;font-weight:500;color:var(--muted);text-align:left}
.bp-funds-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;border-top:1px solid var(--line);margin-top:10px;padding-top:10px}
.bp-funds-summary span{font-size:11px;min-width:0}.bp-funds-summary b{display:block;font-size:13px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.bp-section-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:14px 0 4px}.bp-section-heading h3{font-size:15px;margin:0}.bp-section-heading button{min-height:44px;font-size:12px;padding:5px 0;color:#39670b}
.bp-jar{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:0 10px 3px;margin:0 0 10px;overflow:hidden}
.bp-jar>summary{background:color-mix(in srgb,var(--bp-color) 19%,var(--surface));margin:0 -10px;padding:0 10px;display:flex;align-items:center;gap:8px;min-height:48px;cursor:pointer;list-style:none}.bp-jar>summary::-webkit-details-marker{display:none}
.bp-jar>summary>:is(svg,.system-icon){width:14px;flex-shrink:0;color:var(--accent)}.bp-jar[open]>summary>:is(svg,.system-icon){transform:rotate(180deg)}
.bp-jar-title{font-size:16px;font-weight:800;flex:1;min-width:0}.bp-jar-share{font-size:11px;font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--muted)}
.bp-jar-title,.bp-columns strong,.bp-variance b{color:var(--ink,#3c3c3c)}
.bp-jar-share,.bp-columns small,.bp-variance,.bp-funds-heading small{color:var(--muted)}
.bp-variance b.expense{color:var(--red)}
.bp-columns{padding-top:8px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;align-items:stretch}
.bp-columns>div,.bp-columns>button{padding:8px 5px;min-height:50px;min-width:0;text-align:left;color:inherit;border-radius:6px}
.bp-columns>button{background:white;border:1px solid var(--line);border-bottom:2px solid var(--bp-color,var(--accent))}.bp-columns>button:active{background:var(--bp-tint,var(--soft))}.bp-columns small{display:flex;align-items:center;justify-content:space-between;gap:3px;font-size:11px;font-weight:700;white-space:nowrap}.bp-columns small :is(svg,.system-icon){width:10px;height:10px}
.bp-columns strong{font-size:14px;font-variant-numeric:tabular-nums;display:block;overflow-wrap:anywhere;margin-top:3px}
.bp-variance{display:flex;justify-content:space-between;gap:10px;margin:8px 0 0;font-size:10px}.bp-variance span{min-width:0}.bp-variance b{display:block;font-size:12px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.bp-variance span:last-child{text-align:right}
.bp-jar-actions{display:flex;justify-content:space-between;gap:6px}.bp-jar-actions button{font-size:11px;min-height:44px;padding:4px 0;text-align:left}.bp-jar-actions :is(svg,.system-icon){width:13px;height:13px;vertical-align:middle}
.bp-unassigned{display:flex;width:100%;align-items:center;gap:10px;min-height:58px;padding:12px 0;text-align:left;font-size:13px}.bp-unassigned span{flex:1}.bp-unassigned small{display:block;font-size:11px;color:var(--muted)}.bp-unassigned strong{max-width:45%;overflow-wrap:anywhere}.bp-unassigned>:is(svg,.system-icon){width:14px;flex-shrink:0}
.bp-warning{font-size:13px;color:var(--red);padding:10px 0;margin:4px 0}
.bp-form{display:flex;flex-direction:column;gap:12px}.bp-form label{font-size:14px}.bp-form input{font-size:16px;min-width:0;width:100%}.bp-form>.primary{min-height:44px}
.bp-planning-summary{margin:0 0 18px;font-variant-numeric:tabular-nums}
.bp-planning-funds{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:0 0 12px;font-size:13px}.bp-planning-funds>span{color:var(--muted);min-width:0}.bp-planning-funds>strong{max-width:58%;text-align:right;overflow-wrap:anywhere;font-size:15px}
.bp-planning-jar{padding:14px;background:var(--bp-tint,var(--soft));border:1px solid var(--line);border-radius:14px}
.bp-planning-heading{display:flex;flex-direction:column;gap:3px}.bp-planning-heading>span{font-size:12px;font-weight:700;color:var(--muted)}.bp-planning-heading>strong{font-size:24px;line-height:1.3;overflow-wrap:anywhere;color:var(--bp-color,var(--accent))}
.bp-planning-remaining{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0 0;padding:12px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.bp-planning-remaining>div{min-width:0}.bp-planning-summary dt{color:var(--muted);font-size:12px;line-height:1.4}.bp-planning-summary dd{margin:3px 0 0;overflow-wrap:anywhere}.bp-planning-remaining dd{font-size:14px;font-weight:800}
.bp-planning-shares{display:grid;gap:6px;margin:10px 0 0}.bp-planning-shares>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:baseline}.bp-planning-shares dd{margin:0;font-size:12px;font-weight:750;white-space:nowrap}
.bp-planning-global{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 2px 0;font-size:13px}.bp-planning-global>span{flex:1;min-width:0}.bp-planning-global small{display:block;font-size:11px;font-weight:500;margin-bottom:2px}.bp-planning-global>strong{max-width:55%;text-align:right;overflow-wrap:anywhere;font-size:15px}
.bp-planning-notice{font-size:12px;color:var(--muted);margin:8px 0 0}
.bp-form .bp-planning-summary{margin:0}.bp-form .bp-planning-jar{padding:12px}.bp-form .bp-planning-heading>strong{font-size:21px}
.bp-planned-items>h3{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin:0 0 8px}.bp-planned-items>h3 small{font-size:12px;font-weight:500}
.bp-planned-list{background:var(--surface);border:1px solid var(--line);border-radius:14px;overflow:hidden;padding:0 12px}.bp-planned-list .bp-item-row:last-child{border-bottom:0}.bp-planned-list .bp-item-row{min-height:56px}.bp-planned-list .bp-empty{font-size:13px;color:var(--muted)}
.bp-allocation-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;margin:0!important}
.bp-percent-input{display:flex;align-items:center;gap:6px;max-width:110px}.bp-percent-input input{text-align:right}
.bp-allocation-total{font-size:13px;padding-block:8px}
.bp-footer{flex-shrink:0;background:#fff;border-top:1px solid var(--line);padding:10px 14px max(10px,env(safe-area-inset-bottom))}.bp-footer button{width:100%;min-height:44px}
.bp-date-control{display:flex;align-items:center;gap:10px;text-align:left;width:100%;min-height:48px;border-bottom:1px solid var(--line);padding:8px 0;font-size:13px}.bp-date-control strong{margin-left:auto}.bp-date-control :is(svg,.system-icon){width:18px}
.bp-date-control strong{text-align:right;font-variant-numeric:tabular-nums}.bp-date-control small{display:block;font-size:13px;white-space:nowrap}.bp-date-control :is(svg,.system-icon){flex-shrink:0}.bp-snapshot-debt{border-top:1px solid var(--line);margin-top:12px;padding-top:4px}
.bp-source-row,.bp-source-total,.bp-item-row{display:flex;align-items:center;gap:12px;justify-content:space-between;padding:12px 0;border-bottom:1px solid var(--line);min-width:0;font-size:13px;text-align:left;width:100%}
.bp-source-row>span,.bp-item-row>span{flex:1;min-width:0;overflow-wrap:anywhere}.bp-source-row :is(b,strong),.bp-source-total strong,.bp-item-row strong{max-width:53%;overflow-wrap:anywhere;font-variant-numeric:tabular-nums;text-align:right}
.bp-source-row small{display:block;font-size:11px;color:var(--muted)}.bp-source-total{font-weight:800;border:0;margin-top:6px}.bp-item-row>:is(svg,.system-icon){width:16px;flex-shrink:0;color:var(--accent)}
.bp-search{display:block;position:sticky;top:-12px;background:var(--canvas);padding:0 0 12px;z-index:1}.bp-search>span{font-size:12px;display:block;margin-bottom:6px;color:var(--muted)}.bp-search input{font-size:16px;width:100%;background:var(--surface);margin:0}
.budget-plan-dialog h3{font-size:15px}.budget-plan-dialog h4{font-size:12px;margin:12px 0 3px;color:var(--muted)}
.bp-category-choice{display:flex;align-items:center;gap:10px;min-height:44px;font-size:13px;margin:0!important;padding:8px 0;border-bottom:1px solid var(--line)}
.bp-category-choice input,.bp-source-choice>input{width:20px;height:20px;flex:0 0 20px;accent-color:var(--accent);padding:0}
.bp-category-choice small{display:block;font-size:12px;color:var(--muted)}.bp-category-choice:has(input:disabled){color:var(--muted)}
.bp-source-choice{display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--line)}.bp-source-choice>button{display:flex;align-items:center;gap:8px;flex:1;min-width:0;text-align:left;padding:12px 0;min-height:52px;font-size:13px;color:inherit}
.bp-source-choice button>span{flex:1;min-width:0;overflow-wrap:anywhere}.bp-source-choice small{display:block;font-size:11px;color:var(--muted)}.bp-source-choice strong{max-width:45%;text-align:right;overflow-wrap:anywhere}.bp-source-choice :is(svg,.system-icon){width:13px;flex-shrink:0}.bp-source-empty{font-size:13px;color:var(--muted);margin:8px 0 20px}
.bp-empty{padding:24px 0;text-align:center}.bp-empty p{font-size:13px;color:var(--muted)}.bp-info{font-size:14px}.bp-info dt{font-weight:800;margin:16px 0 5px}.bp-info dd{margin:0;line-height:1.6}
@media(min-width:700px){.budget-plan-dialog.full .dialog-body{padding-inline:24px}.bp-columns strong{font-size:18px}.bp-jar-share,.bp-variance{font-size:13px}.bp-jar-actions button{font-size:13px}.bp-funds-summary b{font-size:18px}}
@media(max-width:350px){.budget-plan-dialog .dialog-body{padding-inline:10px}.bp-columns strong{font-size:12px}.bp-jar-title{font-size:14px}.bp-jar-share{font-size:10px}.bp-funds-summary{gap:6px}.bp-funds-summary b{font-size:12px}}
/* Allocation editor: fixed actions and one compact row per jar. */
dialog.budget-plan-dialog.bp-allocation-dialog{width:min(440px,calc(100vw - 20px));top:calc(var(--bp-visible-top,0px) + max(8px,env(safe-area-inset-top)));bottom:auto;margin:0 auto;max-height:calc(var(--bp-visible-height,100dvh) - max(8px,env(safe-area-inset-top)) - 8px);overflow:hidden}
dialog.budget-plan-dialog.bp-allocation-dialog.bp-keyboard-open{top:calc(var(--bp-visible-top,0px) + 8px);max-height:calc(var(--bp-visible-height,100dvh) - 16px)}
.bp-allocation-dialog .dialog-head,.bp-allocation-dialog .bp-allocation-footer{flex:none}
dialog.bp-allocation-dialog .dialog-body{min-height:0;overflow:auto;padding:8px 14px 12px;overscroll-behavior:contain}
dialog.bp-allocation-dialog .bp-form{display:flex;flex-direction:column;gap:4px;margin:0}
.bp-allocation-funds{padding:10px 12px;margin-bottom:4px;background:var(--summary-surface);border-radius:12px;font-variant-numeric:tabular-nums}
.bp-allocation-funds>span{display:block;font-size:12px;font-weight:700;color:var(--muted)}
.bp-allocation-funds>strong{display:block;margin-top:2px;font-size:24px;line-height:1.25;overflow-wrap:anywhere;color:var(--ink)}
.bp-allocation-funds>small{display:block;margin-top:3px;font-size:12px;color:var(--muted)}
.bp-allocation-modes{margin:6px 0 0}
.bp-allocation-modes>div{display:flex;gap:4px;padding:4px;border-radius:12px;background:var(--control-track)}
.bp-allocation-modes button{flex:1;min-width:0;min-height:40px;padding:7px 5px;border-radius:8px;font-size:13px;font-weight:800;color:#39670b;box-shadow:none}
.bp-allocation-modes button[aria-pressed=true]{background:var(--surface);color:var(--ink)}
.bp-allocation-modes>p{margin:6px 2px 0;font-size:12px;line-height:1.4;color:var(--muted)}
.bp-allocation-preview{position:relative;width:100%;height:312px;flex:none;margin:0 auto 4px;padding:0}
.bp-allocation-chart{display:block;width:100%;height:100%;overflow:visible}
.bp-allocation-track{stroke:#e1e6dc}
.bp-allocation-chart [data-bp-allocation-slice]{fill:var(--bp-color,var(--accent));stroke:white;stroke-width:1.4;transition:none;cursor:pointer}
.bp-allocation-chart [data-bp-allocation-slice]:is(:focus-visible,.is-selected){stroke:var(--bp-color);stroke-width:3}
.bp-allocation-chart [data-bp-allocation-labels] path{fill:none;stroke:var(--bp-color);stroke-width:1;stroke-linejoin:round;opacity:.7;pointer-events:none}
.bp-allocation-chart [data-bp-allocation-labels] path.is-selected{stroke:var(--bp-color);stroke-width:1.5}
.bp-allocation-chart .slice-percent{fill:white;font-size:13px;font-weight:800}
.bp-allocation-dialog .bp-allocation-total{inset:30%;display:flex;flex-direction:column;gap:3px;padding:0;min-width:0;font-variant-numeric:tabular-nums;color:var(--ink);overflow-wrap:normal;pointer-events:none}
.bp-allocation-total>span{font-size:11px;color:var(--muted)}
.bp-allocation-dialog .bp-allocation-total>strong{font-size:var(--bp-center-size,22px);font-weight:800;line-height:1.2;white-space:nowrap}
.bp-allocation-dialog .bp-allocation-total>small{font-size:10px;color:var(--muted);line-height:1.4;display:block}
.bp-allocation-invalid .bp-allocation-total>:is(strong,small){color:var(--red)}
.bp-allocation-dialog .bp-allocation-selection{display:grid;grid-template-columns:minmax(0,1fr) 112px;align-items:center;gap:10px;padding:8px 10px;margin:0 0 8px;border:1px solid var(--bp-color);border-radius:12px;background:var(--bp-tint);color:var(--ink);font-variant-numeric:tabular-nums}
.bp-allocation-selection>span{min-width:0;font-size:14px;line-height:1.3;overflow-wrap:anywhere}
.bp-allocation-selection>span>output{display:block;margin-top:3px;font-size:12px;color:var(--muted)}
dialog.bp-allocation-dialog .bp-form .bp-chart-percent{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:5px;margin:0;width:100%;font-size:14px}
dialog.bp-allocation-dialog .bp-chart-percent input{width:calc(100% - 18px);min-width:0;min-height:44px;padding:4px 6px;margin:0;border:1px solid var(--bp-color);border-radius:8px;box-shadow:none;text-align:right;font-size:20px;line-height:1.2;background:white;color:var(--ink);font-weight:800;caret-color:var(--ink)}
dialog.bp-allocation-dialog .bp-chart-percent input[aria-invalid=true]{border-color:var(--red);background:#fff1f3}
.bp-allocation-callouts>button{position:absolute;display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:2px;height:48px;min-height:44px;padding:0;border:0;border-radius:0;box-shadow:none;background:transparent;color:var(--ink);text-align:right;line-height:1.2;font-size:12px;cursor:pointer}
.bp-allocation-callouts>button.is-right{align-items:flex-start;text-align:left}
.bp-allocation-callouts>button>span{font-weight:700;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;max-width:100%}
.bp-allocation-callouts>button>strong{flex:none;font-size:12px;color:var(--bp-color);max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}
.bp-allocation-callouts>button.is-dense{line-height:1.15}
.bp-allocation-callouts>button[aria-pressed=true]>span{color:var(--bp-color);text-decoration:underline;text-underline-offset:3px}
.bp-allocation-balance{display:block;margin:0 0 6px;color:var(--accent);font-size:14px;font-weight:800;font-variant-numeric:tabular-nums}
.bp-allocation-balance small{font:inherit}
.bp-allocation-invalid .bp-allocation-balance{color:var(--red)}
.bp-keyboard-open .bp-allocation-footer{padding-bottom:8px}
.bp-allocation-compact :is(.bp-allocation-funds,.bp-allocation-modes,.bp-allocation-fields){display:none}
.bp-allocation-compact .bp-allocation-selection{margin-bottom:0}
.bp-allocation-compact .bp-allocation-selection strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.bp-allocation-compact .bp-allocation-selection output{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bp-allocation-compact .bp-allocation-footer{padding-top:6px}
.bp-allocation-compact .bp-allocation-footer button{min-height:44px;padding-block:8px}
.bp-allocation-compact .bp-allocation-footer .error{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:12px;line-height:1.3;margin-bottom:4px}
.bp-allocation-fields{border-top:1px solid var(--line)}
dialog.budget-plan-dialog.bp-allocation-dialog .bp-form .bp-allocation-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;width:100%;min-height:52px;padding:7px 0;margin:0;border:0;border-bottom:1px solid var(--line);border-radius:0;box-shadow:none;background:transparent;text-align:left;font-size:14px;font-weight:700}
.bp-allocation-row.is-chart-selected{display:none!important}
.bp-allocation-name{display:flex;align-items:center;gap:10px;min-width:0;overflow-wrap:anywhere;color:var(--ink)}
.bp-allocation-name>i{display:block;width:10px;height:10px;flex:0 0 10px;border-radius:50%;background:var(--bp-color,var(--accent))}
.bp-allocation-label{min-width:0}
.bp-allocation-money{display:block;margin:3px 0 0 20px;font-size:12px;font-weight:500;color:var(--muted);overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.bp-allocation-percent{font-size:14px;font-weight:700;font-variant-numeric:tabular-nums;color:var(--bp-color);max-width:120px;overflow-wrap:anywhere;text-align:right}
.bp-allocation-footer .error{font-size:13px;margin:0 0 8px;padding:0;line-height:1.4}
.bp-allocation-footer .error:empty{display:none}
.bp-allocation-footer button{font-size:15px}
@media(max-width:350px){dialog.bp-allocation-dialog .dialog-body{padding-inline:12px}}

/* Jar identity is shared by the allocation chart, overview and drilldowns. */
[data-bp-jar="fixed"]{--bp-color:#0f766e;--bp-tint:#e6f5f2}
[data-bp-jar="enjoyment"]{--bp-color:#b45309;--bp-tint:#fff3e5}
[data-bp-jar="saving"]{--bp-color:#2563a6;--bp-tint:#eaf2fd}
[data-bp-jar="investment"]{--bp-color:#4d7c0f;--bp-tint:#eff6df}
[data-bp-jar="education"]{--bp-color:#7c3aed;--bp-tint:#f2ebff}
[data-bp-jar="giving"]{--bp-color:#be185d;--bp-tint:#fcebf3}
[data-bp-jar="incidental"]{--bp-color:#52647a;--bp-tint:#edf1f6}
.bp-jar-dot{width:8px;height:8px;border-radius:50%;background:var(--bp-color);flex:0 0 8px}
.bp-jar .bp-jar-title,.bp-jar .bp-jar-actions button,.bp-jar>summary>:is(svg,.system-icon){color:var(--bp-color)}
.bp-column-percent{display:block;font-size:10px;color:var(--muted);font-weight:500;margin-top:2px}
.bp-columns small{flex-wrap:wrap;white-space:normal;line-height:1.4;min-height:16px}
.bp-jar-body .bp-jar-actions{justify-content:flex-start;border-top:1px solid var(--line);margin-top:8px}
.bp-jar-actions .bp-rename{margin-left:auto;padding:8px;min-width:36px;min-height:36px;align-self:center;text-align:center}
.bp-jar-actions .bp-rename .system-icon{width:18px;height:18px}
.bp-fixed-manual{background:var(--bp-tint);padding:12px;border-radius:10px;border:0}
.bp-fixed-manual small{display:block;font-size:11px;font-weight:500;color:var(--muted)}
.bp-residual-dialog .dialog-body{display:flex;flex-direction:column;overflow:hidden;min-height:0}
.bp-residual-dialog .bp-search{position:static;flex:none}.bp-residual-dialog [data-bp-residual-list]{flex:1;min-height:0;overflow:auto}
.bp-residual-row{display:flex;align-items:center;gap:10px;min-height:44px;padding:8px 0;border-bottom:1px solid var(--line);font-size:14px}
.bp-residual-row .app-icon{width:24px;height:24px;min-width:24px;flex:0 0 24px;font-size:24px}.bp-residual-row>span{min-width:0;overflow-wrap:anywhere}.bp-residual-row small{display:block;color:var(--muted);font-size:11px}
.budget-plan-dialog[data-bp-jar] .dialog-head{border-bottom-color:var(--bp-color)}
.budget-plan-dialog[data-bp-jar] :is(.bp-item-row,.bp-source-choice,.bp-category-choice) :is(svg,.system-icon){color:var(--bp-color)}
.budget-plan-dialog[data-bp-jar] :is(.bp-source-choice,.bp-category-choice) input{accent-color:var(--bp-color)}
.bp-snapshot-switch{display:grid;grid-template-columns:1fr 1fr;gap:4px;background:var(--control-track);border-radius:10px;padding:4px;margin-bottom:8px}
.bp-snapshot-switch button{min-height:44px;padding:8px;border-radius:8px;font-size:14px;color:var(--muted);font-weight:700}
.bp-snapshot-switch button[aria-pressed="true"]{background:#fff;color:var(--accent);box-shadow:0 1px 3px #00000014}
.bp-snapshot-hero{background:var(--summary-surface);border-radius:12px;padding:14px;margin:12px 0}
.bp-snapshot-hero>span{display:block;font-size:12px;color:var(--muted)}
.bp-snapshot-hero>strong{display:block;font-size:clamp(23px,6vw,30px);font-variant-numeric:tabular-nums;overflow-wrap:anywhere;color:var(--accent)}
.bp-snapshot-hero>strong.expense{color:var(--red)}
.bp-snapshot-comparison{display:block;font-size:12px;color:var(--muted);border-top:1px solid var(--line);padding-top:8px;margin-top:8px;font-variant-numeric:tabular-nums}
.bp-snapshot-comparison span{display:block;font-size:11px;margin-top:2px}
.bp-account-heading{display:flex;justify-content:space-between;gap:8px;margin:14px 0 0}
.bp-account-heading small{font-size:12px;color:var(--muted);font-weight:500}
.bp-zero-accounts>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px;font-size:12px;color:var(--muted);list-style:none;cursor:pointer}
.bp-zero-accounts>summary::-webkit-details-marker{display:none}
.bp-zero-accounts>summary>:is(svg,.system-icon){width:12px;height:12px;flex-shrink:0}
.bp-zero-accounts[open]>summary>:is(svg,.system-icon){transform:rotate(180deg)}
.bp-zero-accounts .bp-source-row{font-size:12px}
.bp-debt-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0 4px}
.bp-debt-heading h3{margin:0;min-width:0}.bp-debt-heading h3 small{display:block;font-size:12px;font-weight:500;color:var(--muted);margin-top:2px}
.bp-debt-heading>strong{max-width:50%;font-size:16px;font-variant-numeric:tabular-nums;color:#b45309;overflow-wrap:anywhere;text-align:right}

/* Category links use the same available/selected hierarchy as analysis scope. */
.bp-plan-tools{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:4px 12px}
.bp-section-heading:has(.bp-plan-tools){align-items:center;flex-wrap:wrap}
.bp-mapping-dialog .dialog-body{display:flex;flex-direction:column;overflow:hidden;min-height:0}
.bp-mapping-dialog .bp-search{position:static;flex:none;padding:0 0 10px}
.bp-mapping-dialog .analysis-scope-columns{flex:1;min-height:0;grid-template-columns:minmax(0,3fr) minmax(0,2fr)}
.bp-mapping-dialog .analysis-scope-columns>section{display:flex;flex-direction:column;min-height:0}
.bp-mapping-dialog .analysis-scope-columns .scroll{height:auto;flex:1;min-height:0;overflow:auto}
.bp-mapping-dialog .analysis-selected-head,.bp-mapping-dialog .analysis-scope-columns>section>h3{flex:none;min-height:48px;font-size:13px}
.bp-mapping-dialog .analysis-selected-head button{min-height:44px;padding:4px 0;font-size:12px}
.bp-mapping-dialog .bp-category-choice{display:grid;margin:0!important;padding:8px 2px 8px 10px;font-size:13px}
.bp-mapping-dialog .bp-category-group{font-weight:800}
.bp-mapping-dialog .analysis-scope-option:disabled{opacity:1;color:var(--muted)}
.bp-mapping-dialog .analysis-scope-option.selected,.bp-mapping-dialog .analysis-scope-chip{background:var(--bp-tint);color:var(--bp-color)}
.bp-mapping-dialog .analysis-scope-check .system-icon{width:16px;height:16px}
.bp-mapping-dialog .analysis-scope-glyph .app-icon{width:22px;height:22px;min-width:0;font-size:22px;flex:0 0 22px}
.bp-mapping-dialog .analysis-scope-chip>.system-icon{width:14px;height:14px;flex-shrink:0}
.bp-mapping-dialog .error:empty{display:none}
.bp-footer-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);gap:10px}
.bp-footer-actions button{font-size:14px;padding:10px 8px;min-width:0}
.bp-footer>[data-bp-mapping-count]{display:block;color:var(--muted);font-size:12px;margin-bottom:8px}
.bp-copy-period{display:flex;align-items:center;justify-content:center;gap:12px;font-weight:800;padding:4px 0 12px;color:var(--accent)}
.bp-copy-period .system-icon{width:16px;height:16px}
.bp-copy-head,.bp-copy-row{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(40px,.6fr) minmax(0,1fr);align-items:center;gap:8px;padding:10px 0;border-bottom:1px solid var(--line);font-size:13px}
.bp-copy-head{font-size:12px;color:var(--muted)}
.bp-copy-row>span:first-child{min-width:0;font-weight:700}.bp-copy-row .bp-jar-dot{display:inline-block;margin-right:6px}
.bp-copy-row small{display:block;font-size:11px;font-weight:500;color:var(--muted);margin-top:3px}
.bp-copy-row>:last-child,.bp-copy-head>:last-child{text-align:right;min-width:0;overflow-wrap:anywhere}
.bp-copy-row strong{font-size:12px;font-variant-numeric:tabular-nums}
.bp-copy-notice{font-size:13px;line-height:1.5;margin:14px 0 0;color:var(--ink)}
.bp-jar-actions{flex-wrap:wrap;column-gap:14px}
.bp-actual-heading{display:flex;justify-content:space-between;align-items:baseline;gap:10px;padding:8px 0 14px;border-bottom:1px solid var(--line);font-variant-numeric:tabular-nums}
.bp-actual-heading>span{font-size:12px;color:var(--muted)}.bp-actual-heading>strong{font-size:17px;text-align:right;overflow-wrap:anywhere;max-width:65%}
.bp-actual-row{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:64px;padding:12px 0;border-bottom:1px solid var(--line);text-align:left;font-size:13px;color:var(--ink)}
.bp-actual-row>span{flex:1;min-width:0}.bp-actual-row b,.bp-transfer-choice b{overflow-wrap:anywhere}.bp-actual-row small,.bp-transfer-choice small{display:block;margin-top:4px;color:var(--muted);font-size:11px;line-height:1.4}
.bp-actual-row>strong{flex:0 1 auto;max-width:44%;text-align:right;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.bp-actual-row .system-icon{width:12px;height:12px;vertical-align:middle;color:var(--bp-color)}
.bp-actual-note{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bp-more{width:100%;min-height:44px}
.bp-transfer-dialog .dialog-body{display:flex;flex-direction:column;overflow:hidden;min-height:0}.bp-transfer-dialog .bp-search{position:static;flex:none}.bp-transfer-dialog [data-bp-transfer-list]{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}
.bp-transfer-choice{display:flex;align-items:flex-start;gap:10px;margin:0 0 8px!important;padding:12px;min-height:64px;border:1px solid var(--line);border-radius:12px;background:var(--surface);font-size:13px;cursor:pointer}
.bp-transfer-choice>input{flex:0 0 22px;width:22px;height:22px;min-height:0;padding:0;margin:0;accent-color:var(--bp-color)}.bp-transfer-choice>span{flex:1;min-width:0}.bp-transfer-choice strong{display:block;margin-top:6px;font-size:14px;color:var(--bp-color);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.bp-transfer-choice small{font-size:12px}
.bp-transfer-owned{cursor:default;color:var(--muted)}.bp-transfer-owned strong{color:var(--ink)}.bp-transfer-owned input:disabled{opacity:1}.bp-transfer-choice:has(input:checked){background:var(--bp-tint);border-color:var(--bp-color)}.bp-selection-total{display:block;font-size:12px;margin-bottom:8px;font-variant-numeric:tabular-nums}.bp-transfer-dialog .error:empty{display:none}
.bp-transfer-stale{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid var(--line);font-size:12px;color:var(--red)}.bp-transfer-stale>span{flex:1;min-width:0}.bp-transfer-stale>button{min-height:44px;flex:none}
@media(max-width:350px){.bp-mapping-dialog .analysis-scope-columns{gap:8px}.bp-mapping-dialog .analysis-scope-columns>section+section{padding-left:8px}.bp-mapping-dialog .analysis-scope-option{grid-template-columns:18px minmax(0,1fr) 14px;gap:4px;font-size:12px}.bp-mapping-dialog .analysis-scope-glyph :is(img,svg,.app-icon){width:18px;height:18px;font-size:18px;flex-basis:18px}.bp-mapping-dialog .analysis-scope-chip{font-size:11px}.bp-mapping-dialog .analysis-selected-head{flex-wrap:wrap;gap:0}.bp-mapping-dialog .analysis-selected-head h3{font-size:12px}.bp-mapping-dialog .analysis-selected-head button{margin-left:auto}.bp-plan-tools{gap:4px 8px}.bp-plan-tools button{font-size:11px}}

/* Direct row editing stays in the list; chart shortcuts are separate. */
dialog.bp-allocation-dialog .bp-form .bp-row-percent{width:112px}
.bp-allocation-callouts>button{cursor:default}
