/* Purple identity. Semantic financial colors remain independent of the brand. */
:root{--brand:#820ad1;--brand-hover:#6d09b0;--brand-text:#7609bb;--brand-soft:#f2e6fc;--brand-border:#e6d1f6;--bg:#f7f5fa;--surface:#fff;--surface-soft:#f5f2f8;--surface-hover:#eee8f5;--ink:#251d30;--muted:#71677d;--line:#e8e1ee;--green:var(--brand);--mint:#ebd5fa;--emerald:var(--brand);--emerald-light:var(--brand-soft);--positive:#127456;--negative:#b53d55;--warning:#826214;--positive-soft:#eaf7f0;--negative-soft:#fff0f3;--warning-soft:#fcf5df;--shadow:0 3px 20px #36105005,0 1px 3px #36105003;--chrome:#fcfaffeb}
:root[data-theme="dark"]{--brand:#a64be5;--brand-hover:#b960ec;--brand-text:#cc94f5;--brand-soft:#32203f;--brand-border:#503260;--bg:#131017;--surface:#201a27;--surface-soft:#292231;--surface-hover:#342a3e;--ink:#f3edf9;--muted:#b6a9c3;--line:#3a2e44;--positive:#75dcb1;--negative:#ff98ad;--warning:#edce79;--positive-soft:#19382f;--negative-soft:#41232d;--warning-soft:#3c331c;--shadow:0 4px 22px #00000012;--chrome:#1b1622ee}
html{color-scheme:light}html[data-theme="dark"]{color-scheme:dark}
body{background:var(--bg);color:var(--ink)}
::selection{background:var(--brand-border);color:var(--ink)}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,.photo-choose:focus-within{outline-color:var(--brand-text)}
.sidebar,.topbar{background:var(--chrome);border-color:var(--line)}
.brand-mark{background:linear-gradient(140deg,#a12cde,#7200ba);box-shadow:0 5px 15px #820ad126;color:#fff}
.brand-mark>span{color:#efd6ff}.brand-dot{color:var(--brand-text)}
.workspace,.panel,.stat,.portfolio-card,.asset-card,.month-switch,.history-chip,.button,.month-picker,.comparison-table th{background:var(--surface);border-color:var(--line);color:var(--ink)}
.nav-item,.subtitle,.stat-label,.stat-note,.panel-head p,.legend-name,.legend-row small,.donut-center small,.reserve-visual small,.progress-label,.reserve-foot,.tx-description small,.date-cell,.filter,.summary-strip,.alert-line small,.portfolio-card p,.asset-card p,.asset-meta,.empty,.chat-header small,.context-row small,.form-help,.field-hint,.guide-grid p,.reserve-faq details>p,.reserve-sources,footer,.workspace small,.profile small,.nav-label,.plain-button,.compass-card p,.entry-intro p,.entry-amount>small,.entry-section>span,.entry-section .field,.entry-type-option small,.entry-status legend,.photo-status,.photo-actions>small,.comparison-controls,.comparison-summary p,.comparison-footnote,.comparison-name small,.history-label,.compare-month-label,.reserve-input-panel .field,.field,.about-copy,.breadcrumb,.comparison-bars>div,.balance-equation small,.wealth-records small{color:var(--muted)}
.breadcrumb strong,.summary-strip strong,.comparison-bars b,.history-strip strong,.about-copy strong,.note-box strong,.reserve-faq summary{color:var(--ink)}
.nav-item.active,.button.primary,.entry-actions .primary{background:var(--brand);border-color:var(--brand);color:#fff;box-shadow:0 4px 14px #820ad11a}
.nav-item.active .mini-badge{color:#fff;background:#ffffff25}
.nav-item:hover:not(.active),.button:hover,.history-chip:hover,.icon-button:hover,.filter:hover:not(.active){background:var(--surface-hover);color:var(--ink)}
.button.primary:hover,.entry-actions .primary:hover{background:var(--brand-hover);border-color:var(--brand-hover);color:#fff;filter:none}
.stat.featured{background:radial-gradient(ellipse at 110% 0%,#b03ae9,transparent 70%),linear-gradient(125deg,#6707aa,#820ad1);border-color:#820ad1;color:#fff}
.stat.featured :is(.stat-label,.stat-note,.stat-click-hint){color:#f0dafa}.stat.featured .stat-label>span{background:#ffffff16;color:#fff}
.stat-button.featured.is-selected{border-color:#d5a0f2;box-shadow:0 0 0 2px #c587ec}
.stat-button:not(.is-selected):not(.featured):hover{border-color:var(--brand-border)}
.stat-label>span,.avatar,.pale,.mini-badge,.tx-icon,.tag,.category,.icon-button,.filters,.comparison-summary,.chat-form,.message,.note-box,.entry-note,.entry-intro>span,.photo-preview,.milestone>span{background:var(--surface-soft);border-color:var(--line);color:var(--muted)}
.tag{color:var(--muted)}
.text-button,.eyebrow,.ai-eyebrow,.comparison-panel .eyebrow,.stat-click-hint,.reserve-sources a,.reserve-eta>span,.compass-card>span{color:var(--brand-text)}
.text-button:hover{color:var(--brand)}
.button.soft,.history-chip.selected,.reserve-symbol,.step-number,.chat-header .avatar,.insight,.compass-card,.suggestions button{background:var(--brand-soft);border-color:var(--brand-border);color:var(--brand-text)}
.insight strong,.insight>span,.reserve-foot svg,.reserve-foot strong{color:var(--brand-text)}
.donut,.progress-track,.compare-track{background:var(--surface-hover)}
.donut:before{background:var(--surface)}
.progress-track>div,.compare-track i{background:linear-gradient(90deg,#820ad1,#bd73eb)}
.compare-track i.previous{background:#b8a1c8}.history-chip i,.demo-pill i{background:var(--brand)}
.demo-pill{background:var(--brand-soft);border-color:var(--brand-border);color:var(--brand-text)}
.assistant-preview{background:radial-gradient(ellipse at 100% 0%,var(--brand-border),transparent 70%),var(--brand-soft);border-color:var(--brand-border)}
.assistant-preview:after{color:var(--brand-text);opacity:.13}.assistant-preview p{color:var(--muted)}
.assistant-preview .button{border-color:var(--line)}
.asset-drawing,.asset-drawing.auto,.asset-drawing.outros{background:radial-gradient(ellipse at 55% 20%,var(--surface-soft),var(--brand-soft));border-color:var(--line)}
.asset-drawing svg,.asset-drawing.auto svg,.asset-drawing.outros svg{color:var(--brand-text)}
.asset-drawing.with-photo{background:var(--surface-soft)}
.positive,.spending-lower{color:var(--positive)}.negative,.spending-higher,.danger{color:var(--negative)}
.tx-icon.in,.status.paid,.milestone.done>span{background:var(--positive-soft);color:var(--positive)}
.status,.alert-icon,.budget-message.warning{background:var(--warning-soft);border-color:var(--line);color:var(--warning)}
.budget-message{background:var(--brand-soft);border-color:var(--brand-border);color:var(--muted)}
.milestone b,.reserve-save>span{color:var(--positive)}
.filter.active{background:var(--surface);color:var(--brand-text);box-shadow:0 2px 6px #0000000c}
.message.user{background:linear-gradient(125deg,#7909be,#9324cf);border-color:#9838cf;color:#fff}
.search,.field input,.field select,.entry-section .field input,.entry-section .field select,.entry-type-option,.entry-status label{background:var(--surface);border-color:var(--line);color:var(--ink)}
input::placeholder,.search::placeholder,.entry-section .field input::placeholder,.chat-form input::placeholder{color:var(--muted);opacity:.8}
.field input:focus,.field select:focus{background:var(--surface);border-color:var(--brand-text)}
.reserve-input-panel input:disabled{background:var(--surface-soft);color:var(--muted)}
.comparison-toggle{color:var(--muted)}input[type="checkbox"],input[type="radio"]{accent-color:var(--brand)}
.month-arrow{color:var(--muted)}.month-arrow:hover{background:var(--brand-soft);color:var(--brand-text)}
.focus-banner,#overview-detail[data-focus-theme] .focus-banner{background:var(--brand-soft);border-color:var(--brand-border)}
.focus-banner>span,.focus-banner strong,#overview-detail[data-focus-theme] .focus-banner :is(span,strong){color:var(--brand-text)}
.wealth-link{background:var(--surface-soft);border-color:var(--line);color:var(--ink)}.wealth-link:hover{background:var(--brand-soft)}
.balance-total{background:var(--brand-soft);color:var(--brand-text)}
.reserve-hero{background:radial-gradient(ellipse at 110% 0%,#a438d5,transparent 75%),linear-gradient(130deg,#530d81,#760dba);border-color:#7d22b2;color:#fff}
.reserve-hero-top,.reserve-hero-top>span:last-child,.reserve-hero>p,.reserve-hero-progress>div:last-child>small,.reserve-hero-progress>div:last-child>span,.reserve-gap,.reserve-hero .safety-caption{color:#edd5fb}
.reserve-ring{background:conic-gradient(#e1b1ff var(--progress),#ffffff24 0)}.reserve-ring:before{background:#71209e}.reserve-ring>strong,.reserve-gap strong{color:#fff}.reserve-ring small{color:#ead4f5}
.suggestions button:hover{background:var(--surface-hover)}
td,.result-pie .form-help,.entry-actions{border-color:var(--line)}
dialog,dialog[data-kind="transaction"],dialog[data-kind="investment"],dialog[data-kind="asset"]{background:var(--surface);border-color:var(--line);color:var(--ink)}
dialog::backdrop{background:#16092070}
dialog[data-kind]:not([data-kind=""]) .modal-top .icon-button{background:var(--surface-soft);color:var(--muted)}
.entry-form{--entry-accent:var(--brand-text);--entry-soft:var(--brand-soft);--entry-border:var(--brand-border)}
.entry-form[data-tone="income"]{--entry-accent:var(--positive);--entry-soft:var(--positive-soft);--entry-border:var(--line)}
.entry-form[data-tone="expense"]{--entry-accent:var(--negative);--entry-soft:var(--negative-soft);--entry-border:var(--line)}
.entry-form[data-tone="asset"]{--entry-accent:var(--warning);--entry-soft:var(--warning-soft);--entry-border:var(--line)}
.entry-type-option>svg{background:var(--surface-soft)}
.entry-type-option.income:has(input:checked){background:var(--positive-soft);border-color:var(--positive);color:var(--positive);box-shadow:none}
.entry-type-option.expense:has(input:checked){background:var(--negative-soft);border-color:var(--negative);color:var(--negative);box-shadow:none}
.entry-type-option.income:has(input:checked)>svg,.entry-type-option.expense:has(input:checked)>svg{background:transparent;color:inherit}
.entry-status label:has(input:checked){background:var(--brand-soft);border-color:var(--brand-border);color:var(--brand-text)}
.entry-actions{background:var(--chrome)}
.entry-form .photo-editor,.photo-editor{background:var(--surface-soft);border-color:var(--line)}.entry-form .photo-preview{background:var(--surface-hover)}.entry-form .photo-choose{background:var(--surface);border-color:var(--line);color:var(--ink)}
#toast{background:#341448;color:#fff;border-color:#b06bd044}
/* Preferences are always within reach, including above the mobile navigation. */
.topbar-actions{display:flex;align-items:center;gap:14px;flex-shrink:0}
.preferences-button{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:9px 13px;border:1px solid var(--line);border-radius:24px;background:var(--surface);color:var(--ink);font-size:11px;font-weight:550;white-space:nowrap}
.preferences-button svg{width:17px;height:17px;color:var(--brand-text)}.preferences-button:hover{background:var(--brand-soft);border-color:var(--brand-border)}
dialog[data-kind="preferences"]{width:520px;padding:30px;border-radius:28px}
.preferences-intro{color:var(--muted);font-size:12px;line-height:1.7;margin:0 0 25px}
.preference-group{padding:0;border:0;margin:0 0 25px;min-width:0}
.preference-group legend{font-size:12px;font-weight:650;margin-bottom:12px}
.preference-options{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.preference-choice{position:relative;display:block;cursor:pointer;border:1px solid var(--line);background:var(--surface-soft);border-radius:17px;padding:12px;min-width:0;transition:border-color .18s,background .18s}
.preference-choice:has(input:checked){border-color:var(--brand-text);background:var(--brand-soft);box-shadow:0 0 0 1px var(--brand-text)}
.preference-choice:has(input:focus-visible){outline:3px solid var(--brand-text);outline-offset:4px}
.preference-choice input{position:absolute;opacity:0;width:1px;height:1px}
.choice-label{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;font-weight:550;margin-top:10px}
.choice-check{width:17px;height:17px;border:1px solid var(--line);border-radius:50%;display:grid;place-items:center;color:transparent;font-size:11px}
.preference-choice:has(input:checked) .choice-check{color:#fff;background:var(--brand);border-color:var(--brand)}
.theme-miniature{display:flex;gap:7px;aspect-ratio:2.3;padding:10px;border-radius:10px;background:#f8f5fb;border:1px solid #ded3e7}
.theme-miniature>i{width:17%;border-radius:4px;background:#e6d8f0}.theme-miniature>span{flex:1;display:grid;grid-template-columns:1fr 1fr;gap:6px}
.theme-miniature b{height:100%;border-radius:4px;background:#fff;border:1px solid #e7dfed}.theme-miniature b:first-child{background:#820ad1;border-color:#820ad1}.theme-miniature b:last-child{grid-column:1/-1}
.theme-miniature.dark{background:#17111e;border-color:#46324f}.theme-miniature.dark>i{background:#37243f}.theme-miniature.dark b:not(:first-child){background:#2a2031;border-color:#46324f}
.language-choice{padding:16px}.language-choice .choice-label{margin:0}.language-choice small{display:block;margin-top:6px;font-size:10px;color:var(--muted)}
.preference-note{display:flex;gap:9px;align-items:flex-start;font-size:11px;line-height:1.75;color:var(--muted);background:var(--surface-soft);padding:14px 16px;border-radius:14px;margin-bottom:20px}.preference-note svg{width:16px;height:16px;margin-top:2px}
.preference-done{width:100%;font-size:12px;min-height:44px}
.preference-status{font-size:10px;color:var(--muted);text-align:center;margin:12px 0 0;min-height:15px}
@media(max-width:960px){.topbar .demo-pill{display:none}}
@media(max-width:760px){.sidebar{background:var(--chrome);border-color:var(--line)}.nav-item.active{background:var(--brand)}.topbar{height:62px}.preferences-button{width:40px;height:40px;padding:10px;justify-content:center}.preferences-button>span{display:none}.topbar-actions{gap:0}.breadcrumb{min-width:0;flex-wrap:wrap;gap:5px 8px}.breadcrumb strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:180px}dialog[data-kind="preferences"]{padding:24px}.preferences-intro{font-size:11px}.choice-label{font-size:11px}.stat-value{font-size:clamp(18px,5.6vw,28px)}}
@media(prefers-reduced-motion:reduce){.preference-choice{transition:none}}

.wealth-link strong,.wealth-records>div{color:var(--ink)}.wealth-records>div{border-color:var(--line)}.wealth-link svg{color:var(--brand-text)}.comparison-unmatched,.photo-field>span>small{color:var(--muted)}

.brand{gap:8px;font-size:29px;letter-spacing:-1.2px;padding-left:9px;padding-right:9px}.brand-word{white-space:nowrap}.brand-mark{flex-shrink:0}.brand-dot{margin-left:-7px}@media(min-width:1321px){.brand{font-size:31px}}@media(max-width:1120px){.brand{font-size:24px;gap:6px;padding-left:4px;padding-right:4px}.brand-mark{width:32px;height:32px;font-size:27px}}
