:root {
    color-scheme: dark;
    --bg-base: #111923; --bg-surface: #19232f; --bg-raised: #243140;
    --border: #344354; --text-1: #edf1f5; --text-2: #b0bdcb; --text-3: #9aaabc;
    --accent: #91b1d2; --accent-h: #adc5de;
}
html.theme-light {
    color-scheme: light;
    --bg-base: #f4f5f7; --bg-surface: #fff; --bg-raised: #f8f9fa;
    --border: #e2e8f0; --text-1: #202f40; --text-2: #526174; --text-3: #627185;
    --accent: #345775; --accent-h: #29465f;
}
body { font-variant-numeric: tabular-nums; }
.financial-icon { display: inline-flex; align-items: center; justify-content: center; width: 1.125rem; font-size: .875rem; flex-shrink: 0; }
.nav-link .financial-icon { color: var(--text-3); transition: color 160ms ease; }
.nav-link:hover, .nav-link-active { background: var(--bg-raised) !important; }
.nav-link:hover .financial-icon, .nav-link-active .financial-icon { color: var(--text-1); }
.metric-card { padding: 1.5rem; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 12px; }
.theme-light .metric-card { box-shadow: 0 4px 6px -1px rgb(0 0 0 / .03); }
.metric-card .metric-label { color: var(--text-2); font-size: .75rem; font-weight: 500; margin-bottom: .5rem; }
.metric-card .metric-value { color: var(--text-1); font-size: 1.5rem; font-weight: 600; overflow-wrap: anywhere; }
.metric-card .metric-caption { color: var(--text-3); font-size: .75rem; margin-top: .375rem; }
.metric-card .financial-icon { color: var(--text-3); }
.appearance-select { display: block; width: 100%; margin-top: .375rem; padding: .5rem; background: var(--bg-raised); color: var(--text-1); border: 1px solid var(--border); border-radius: 6px; font: inherit; font-size: .75rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width:640px) { .metric-card { padding: 1rem; } }
