/* Shared appearance tokens only. Calculator styles and financial rules stay local. */
:root,[data-theme="jade"]{--accent:#146f62;--strong:#173f36;--canvas:#f3f6f5;--tint:#edf5f0;--theme-line:#cbdad2;--theme-muted:#526a63;--theme-icon:#9fbfaf}
[data-theme="ocean"]{--accent:#1d5d92;--strong:#173c5b;--canvas:#f3f6fa;--tint:#ecf3fa;--theme-line:#d3dfe9;--theme-muted:#52687b;--theme-icon:#a6bfd8}
[data-theme="violet"]{--accent:#6b4294;--strong:#3d2a54;--canvas:#f7f4fa;--tint:#f3eef8;--theme-line:#e0d6e9;--theme-muted:#6a5f78;--theme-icon:#bca9d1}
[data-theme="rose"]{--accent:#98445f;--strong:#582f3d;--canvas:#fbf5f7;--tint:#faeef2;--theme-line:#ead5dd;--theme-muted:#7c5d67;--theme-icon:#c99aaa}
[data-theme="amber"]{--accent:#805619;--strong:#523a1d;--canvas:#faf7f1;--tint:#f8f2e8;--theme-line:#e5dacb;--theme-muted:#74644e;--theme-icon:#cbb48d}
[data-theme="slate"]{--accent:#475d6d;--strong:#2c3d49;--canvas:#f4f6f8;--tint:#edf2f5;--theme-line:#d6dfe5;--theme-muted:#5b6b76;--theme-icon:#a7b7c3}
:root[data-theme]{--green:var(--accent);--line:var(--theme-line);--muted:var(--theme-muted);color:var(--strong);background:var(--canvas);color-scheme:light}
[data-theme] body{color:var(--strong);background:var(--canvas)}
[data-theme] .brand,[data-theme] .empty h2,[data-theme] .module-legal h2,[data-theme] .module-legal h3,[data-theme] .module-disclosure:not(.module-notice)>summary{color:var(--strong)}
[data-theme] .language,[data-theme] .toolbar button,[data-theme] .form-actions button,[data-theme] .field input:not([type=checkbox]),[data-theme] .field select{color:var(--strong)}
[data-theme] .field input:focus-visible,[data-theme] .field select:focus-visible{outline-color:var(--accent)}
[data-theme] .tabs,[data-theme] .recalculate,[data-theme] .backup-summary,[data-theme] .assumption-banner,[data-theme] .pill:not(.muted),[data-theme] .localbadge,[data-theme] .badge,[data-theme] .chip:not(.warning-chip),[data-theme] .notice{background:var(--tint)}
[data-theme] .tabs .active,[data-theme] .tabs button[aria-pressed=true]{color:var(--accent);border-bottom-color:var(--accent);background:var(--tint)}
[data-theme] .pill:not(.muted),[data-theme] .localbadge,[data-theme] .badge,[data-theme] .assumption-banner strong,[data-theme] .module-legal a,[data-theme] .module-disclosure:not(.module-notice) .module-disclosure-toggle,[data-theme] .detail-title{color:var(--accent)}
[data-theme] .heroicon,[data-theme] .hero-mark,[data-theme] .empty-symbol{color:var(--theme-icon)}
[data-theme] .netcard,[data-theme] .baseline-bar{background:var(--strong);color:white}
[data-theme] .netcard>span,[data-theme] .netcard>div,[data-theme] .baseline-bar span,[data-theme] .baseline-bar small{color:#f2f5f4}
[data-theme] .primary:hover{background:var(--strong)}
[data-theme] .toolbar button:hover,[data-theme] .secondary:hover,[data-theme] .module-disclosure:not(.module-notice)>summary:hover,[data-theme] .ledger tr:nth-child(8),[data-theme] .ledger tr:nth-last-child(3),[data-theme] .theme-panel button:hover{background:var(--tint)}
[data-theme] .field span,[data-theme] .cardlabel,[data-theme] .cardnumbers dt,[data-theme] .ledger dt,[data-theme] .footnote,[data-theme] .sensitivity,[data-theme] .chart-legend,[data-theme] .module-legal,[data-theme] .module-disclosure:not(.module-notice) .module-disclosure-body>p{color:var(--theme-muted)}
[data-theme] .chart .base,[data-theme] .chart .super{stroke:var(--accent)}
[data-theme] .chart text{fill:var(--theme-muted)}
[data-theme] .chart line{stroke:var(--theme-line)}
[data-theme] .theme-picker{position:relative;flex-shrink:0;margin:0;padding:0;z-index:30;font-size:13px;color:var(--strong)}
[data-theme] .theme-picker>summary{display:flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:8px 11px;border:1px solid var(--line);border-radius:8px;background:white;color:var(--strong);cursor:pointer;list-style:none;white-space:nowrap;font-size:13px;line-height:1.3}
.theme-picker>summary::-webkit-details-marker{display:none}.theme-picker>summary::marker{content:''}
.theme-current-dot,.theme-swatch{display:block;flex-shrink:0;width:14px;height:14px;border-radius:50%;background:var(--accent);border:1px solid #0002}
.theme-swatch{background:var(--swatch);width:18px;height:18px}
.theme-arrow{font-size:12px}.theme-picker[open] .theme-arrow{transform:rotate(180deg)}
.theme-panel{position:absolute;right:0;top:calc(100% + 9px);width:270px;max-width:calc(100vw - 32px);display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:10px;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 32px #15222c26}
[data-theme] .theme-panel button{display:flex;align-items:center;justify-content:flex-start;gap:8px;min-height:44px;padding:10px 8px;border:1px solid transparent;border-radius:7px;color:var(--strong);background:#fff;white-space:nowrap;font-size:13px;font-weight:500}
.theme-check{visibility:hidden;margin-left:auto;color:var(--accent);font-weight:800}.theme-panel button[aria-pressed=true] .theme-check{visibility:visible}
[data-theme] .theme-panel button[aria-pressed=true]{border-color:var(--accent);background:var(--tint)}
.theme-picker :focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.appearance-controls{display:flex;align-items:center;gap:12px;margin-left:auto}
header:has(.theme-picker) nav{gap:12px}.theme-picker:not([open])>.theme-panel{display:none}
@media(max-width:600px){header:has(.theme-picker){height:auto;min-height:70px;flex-wrap:wrap;gap:8px 12px;padding:12px 16px}header:has(.theme-picker) .brand{font-size:15px}header:has(.theme-picker)>nav,.appearance-controls{margin-left:auto;gap:8px}header:has(.theme-picker)>nav{flex-wrap:wrap;justify-content:flex-end;font-size:12px}[data-theme] .theme-picker>summary{gap:5px;font-size:12px;padding:8px}.theme-panel{width:260px}.theme-arrow{display:none}.theme-current-dot{width:12px;height:12px}}
/* Keep the primary series and its legend consistent, including original inline swatches. */
[data-theme] #costchart polyline[stroke="#13786c"]{stroke:var(--accent)}
[data-theme] #costchart svg text{fill:var(--theme-muted)}
[data-theme] #costchart svg line{stroke:var(--theme-line)}
[data-theme] .chart-legend i[style*="#13786c"],[data-theme] .legend i[style*="#146f62"],[data-theme] .allocation span[style*="#146f62"]{background:var(--accent)!important}
