/* Calm card hierarchy, luminous chart accents, and explicit accessible themes. */
:root{--surface:#fff;--soft-surface:#edf3fb;--chart-blue:#2454ca;--chart-green:#187d77;--chart-gold:#9b571c;--chart-grid:#d5deeb;--chart-muted:#596c82}
.appearance-setting{gap:12px!important}.appearance-setting select{width:auto;min-width:120px;margin:0}
#appearance-toggle{white-space:nowrap;min-height:44px}
.home-hero{padding-top:8px}.home-hero h1{font-size:clamp(1.9rem,4vw,2.8rem)}
.home-tile{box-shadow:0 4px 18px #14234706}.home-tile.tile-main{border-top:3px solid #187d77}.home-tile.tile-charts{border-top-color:#2454ca}
:root.high-contrast:not(.dark-theme) .home-tile{border-color:#7485aa}:root.high-contrast:not(.dark-theme) .home-tile>span:not(.home-icon),:root.high-contrast:not(.dark-theme) .home-hero>p:last-child,:root.high-contrast:not(.dark-theme) .home-note{color:#27354f}
.metric strong,.chapter-stats strong,.chapter-control output{font-variant-numeric:tabular-nums}
.chapter-control{padding:16px;background:#f3f7fa;border:1px solid var(--border);border-radius:16px}
.chapter-controls{gap:16px}.chart-panel,.chapter-playground{border-radius:20px}
.chart-wrap svg text{fill:var(--chart-muted)}
.chart-wrap svg line[stroke="#e3eaf0"]{stroke:var(--chart-grid)}
.chart-wrap svg path[stroke="#2454ca"],.chart-wrap svg circle[fill="#2454ca"]{stroke:var(--chart-blue)}
.chart-wrap svg path[stroke="#2454ca"]{stroke-width:4}
.chapter-preview path[stroke="#187d77"]{stroke:var(--chart-green)}
@media screen{
 :root.dark-theme{color-scheme:dark;--ink:#edf3ff;--muted:#b4c3db;--border:#536783;--navy:#101d33;--teal:#90b9ff;--surface:#16243a;--soft-surface:#1d2e46;--chart-blue:#90b9ff;--chart-green:#71dbc6;--chart-gold:#ffc78b;--chart-grid:#394b65;--chart-muted:#c0cce0;background:#0c1423;color:var(--ink)}
 :root.dark-theme body{background:#0c1423;color:var(--ink)}
 :root.dark-theme :where(h1,h2,h3,h4,p,label,small,summary,caption,dt,dd,th,td,li,output){color:var(--ink)}
 :root.dark-theme :where(a,.eyebrow){color:#a4c9ff!important}
 :root.dark-theme :where(.tiny,small,.field small,.chart-footnote,.home-note,.home-hero>p:last-child,.home-tile>span:not(.home-icon),.metric p,.metric span,.year-detail span,.welcome-card>p,.welcome-voice p,.page-heading p,#profile-context,footer){color:var(--muted)}
 :root.dark-theme .topbar{background:#101d33;border-bottom-color:#426987}
 :root.dark-theme .brand strong,:root.dark-theme .brand-icon{color:#83e7d7}:root.dark-theme .brand-wordmark small{color:#d4e2f5}
 :root.dark-theme :where(.panel,.welcome-card,.companion,.fund-dialog,.home-tile,.metric,.asfa-budget,.possibility-card,.favourite-card){background:var(--surface);color:var(--ink);border-color:var(--border);box-shadow:0 6px 24px #0002}
 :root.dark-theme .home-hero h1,:root.dark-theme .home-tile strong,:root.dark-theme .chapter-stats strong{color:var(--ink)}
 :root.dark-theme .home-tile{background:var(--surface)}
 :root.dark-theme .home-tile>span:not(.home-icon),:root.dark-theme .home-hero>p:last-child{color:var(--muted)}
 :root.dark-theme .tile-main{background:#163336;border-color:#47877f}:root.dark-theme .tile-charts.tile-main{background:#1a2e50;border-color:#6289c5}
 :root.dark-theme .home-icon{background:#24474b;color:#8cebdd}:root.dark-theme .tile-charts .home-icon{background:#294672;color:#b2d0ff}:root.dark-theme .tile-goals .home-icon{background:#483826;color:#ffd59c}:root.dark-theme .tile-protection .home-icon{background:#4a322e;color:#ffc5a8}:root.dark-theme .tile-advice .home-icon{background:#3b3357;color:#d0baff}
 :root.dark-theme .home-tile small{background:#3b3357;color:#e0d3ff}
 :root.dark-theme button{background:#22344f;color:var(--ink);border-color:var(--border)}
 :root.dark-theme button:hover{background:#2f4667;border-color:#9eb4d3}:root.dark-theme .home-tile:hover{background:#243b54}
 :root.dark-theme .primary,:root.dark-theme .tabs .active,:root.dark-theme .app-dock button[aria-current=page]{background:#a4c9ff;border-color:#a4c9ff;color:#10213e}
 :root.dark-theme .primary:hover{background:#c0dbff;color:#10213e}:root.dark-theme .outline{background:transparent}
 :root.dark-theme input:not([type=checkbox]):not([type=range]),:root.dark-theme select,:root.dark-theme textarea{background:#0e1c30;color:var(--ink);border-color:#7e92ae}
 :root.dark-theme .chapter-control output{color:#91e7d7}
 :root.dark-theme input::placeholder,:root.dark-theme textarea::placeholder{color:#adbdd5;opacity:1}
 :root.dark-theme :where(input[type=range],input[type=checkbox],progress){accent-color:#a4c9ff}
 :root.dark-theme :where(.notice,.welcome-assumptions,.year-detail,.assistant-message,.voice-symbol,.mic-button,.asfa-guide,.policy-status,.asset-summary,.share-picture,.account-return,.capital-mix,.chapter-control,#companion-return,#policy-comparison,.advice-lessons article,.advice-loss){background:var(--soft-surface);color:var(--ink);border-color:var(--border)}
 :root.dark-theme :where(.goal-tag,.chapter-goal,.policy-notice,.fund-warning,.asfa-confirm,.staged,.validation,.income-nudge){background:#3d3023;color:#ffe2b4;border-color:#b68b55}
 :root.dark-theme :where(.goal-tag,.chapter-goal,.policy-notice,.fund-warning,.asfa-confirm,.staged,.income-nudge) :where(p,strong,small,label){color:#ffe2b4}
 :root.dark-theme :where(#welcome-error,#welcome-review-error){color:#ffd09a}
 :root.dark-theme :where(#life-status,#refine-status,#companion-status,#companion-return,.companion-return,.membership-price,.advice-progress,.chapter-control output,.chapter-timeline strong){color:#91e7d7}
 :root.dark-theme .companion-hero{background:#1c3455;color:var(--ink)}:root.dark-theme .companion-hero :where(h2,p,strong,span){color:var(--ink)}
 :root.dark-theme .companion-hero .primary{background:#ffd092;color:#172444}
 :root.dark-theme .metric:first-child{background:#1d365c;border-color:#7c9bc3;color:var(--ink)}:root.dark-theme .metric:first-child :where(p,span){color:#d8e5f7}
 :root.dark-theme .metric:nth-child(2),:root.dark-theme .metric:nth-child(3){background:var(--surface)}
 :root.dark-theme .app-nav button{background:var(--surface)}:root.dark-theme .app-dock{background:#16243af5;border-color:#7e92ae;box-shadow:0 8px 30px #0005}:root.dark-theme .app-dock button{background:transparent}:root.dark-theme .app-dock button[aria-current=page]{background:#a4c9ff;color:#10213e}
 :root.dark-theme .chapter-preview svg{background:#101f33}:root.dark-theme .mix-bar{background:#35455b}
 :root.dark-theme .chart-wrap svg path[fill="#2454ca10"]{fill:#90b9ff16}
 :root.dark-theme .chart-wrap svg circle[fill="#2454ca"]{fill:var(--chart-blue);stroke:#0c1423}
 :root.dark-theme .chart-wrap svg rect[fill="#2454ca"]{fill:#90b9ff}:root.dark-theme .chart-wrap svg rect[fill="#23806a"]{fill:#71dbc6}:root.dark-theme .chart-wrap svg rect[fill="#8493b5"]{fill:#b7c5e5}:root.dark-theme .chart-wrap svg rect[fill="#b283b9"]{fill:#dba8e4}
 :root.dark-theme .chart-wrap svg path[stroke="#9b571c"]{stroke:var(--chart-gold)}:root.dark-theme .chart-wrap svg line[stroke="#173145"]{stroke:#e2ecff}
 :root.dark-theme .legend i.line.current{background:var(--chart-blue)}
 :root.dark-theme .legend i[style*="#2454ca"]{background:#90b9ff!important}
 :root.dark-theme .legend i[style*="#23806a"]{background:#71dbc6!important}
 :root.dark-theme .legend i[style*="#8493b5"]{background:#b7c5e5!important}
 :root.dark-theme .legend i[style*="#9b571c"]{background:#ffc78b!important}
 :root.dark-theme .legend i[style*="#b283b9"]{background:#dba8e4!important}
 :root.dark-theme .advice-badge{background:#234940;color:#acf0db}
 :root.dark-theme :where(button,input,select,summary,a):focus-visible{outline-color:#ffce88}
}
@media(max-width:600px){#appearance-toggle{font-size:.85rem;padding:8px 10px}.chapter-control{padding:14px}.appearance-setting{display:flex!important;width:100%}}
@media print{#appearance-toggle,.appearance-setting{display:none!important}}
