/* Local system fonts and shared color tokens keep every screen independent of external services. */
:root,
[data-theme="neutral"] {
  color-scheme: light;
  --page: #f7f7f3;
  --surface: #ffffff;
  --surface-soft: #edeee8;
  --ink: #273531;
  --muted: #626e67;
  --accent: #394e43;
  --accent-strong: #253d30;
  --accent-ink: #ffffff;
  --accent-soft: #e6ece5;
  --line: #dce2da;
  --hero: #e9ede4;
  --hero-ink: #273b2e;
  --focus: #365d9c;
  --error: #a12d31;
  --error-soft: #fff1ef;
  --shadow: 0 12px 35px rgb(30 45 35 / 4%);
}
[data-theme="rose"] {
  color-scheme: light;
  --page: #fbf7f8;
  --surface: #fffefe;
  --surface-soft: #f7edef;
  --ink: #3d2f36;
  --muted: #78616d;
  --accent: #9b4266;
  --accent-strong: #7e2f50;
  --accent-ink: #ffffff;
  --accent-soft: #f7e5ed;
  --line: #ebdce3;
  --hero: #f3dee7;
  --hero-ink: #66344a;
  --focus: #813b69;
  --shadow: 0 12px 35px rgb(99 42 67 / 4%);
}
[data-theme="light"],
[data-theme="system"] {
  color-scheme: light;
  --page: #f4f7f7;
  --surface: #ffffff;
  --surface-soft: #eaf1f1;
  --ink: #253b3d;
  --muted: #5b7072;
  --accent: #28676d;
  --accent-strong: #194d52;
  --accent-ink: #ffffff;
  --accent-soft: #e0eeee;
  --line: #d5e2e2;
  --hero: #e1eded;
  --hero-ink: #254f53;
  --focus: #28676d;
}
[data-theme="custom"] {
  color-scheme: light;
  --page: #f7f8f7;
  --surface: #ffffff;
  --surface-soft: #eef0ef;
  --ink: #273531;
  --muted: #5b6961;
  --accent: #6d3e8d;
  --accent-strong: #573271;
  --accent-ink: #ffffff;
  --accent-soft: #eef0ef;
  --line: #dce2da;
  --hero: #e9edea;
  --hero-ink: #273b2e;
  --focus: #6d3e8d;
  --shadow: 0 12px 35px rgb(30 45 35 / 4%);
}
[data-theme="dark"] {
  color-scheme: dark;
  --page: #171b23;
  --surface: #202631;
  --surface-soft: #29303d;
  --ink: #f2edf2;
  --muted: #b9b5c5;
  --accent: #e8adc7;
  --accent-strong: #f5c4d9;
  --accent-ink: #362330;
  --accent-soft: #3e3041;
  --line: #3b4351;
  --hero: #342d3e;
  --hero-ink: #f3dce8;
  --focus: #ecc0da;
  --error: #ffb6b9;
  --error-soft: #452e37;
  --shadow: 0 12px 35px rgb(0 0 0 / 10%);
}
* { box-sizing: border-box; }
html { min-width: 320px; scroll-padding-top: 2rem; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--page); color: var(--ink); font: 16px/1.45 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--accent); text-underline-offset: .22em; }
a:hover { color: var(--accent-strong); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a, button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
::selection { background: var(--button-bg, var(--accent)); color: var(--accent-ink); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.035em; }
h1 { font-size: clamp(1.65rem, 4vw, 2.3rem); font-weight: 650; }
h2 { font-size: 1.5rem; font-weight: 650; }
h3 { font-size: 1.08rem; font-weight: 650; }
p + p { margin-top: .9rem; }
ul, ol { padding-left: 1.4rem; }
li + li { margin-top: .5rem; }
.small { font-size: .86rem; }
.muted { color: var(--muted); }
.lead { color: var(--muted); font-size: 1.075rem; max-width: 43rem; margin-top: 1rem; }
.eyebrow { font-size: .73rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 750; color: var(--accent); margin-bottom: .4rem; }
.skip-link { position: fixed; top: .5rem; left: 1rem; transform: translateY(-200%); z-index: 10; padding: .6rem 1rem; border-radius: .5rem; background: var(--surface); }
.skip-link:focus { transform: translateY(0); }
.environment-banner { padding: .45rem 1rem; background: var(--surface-soft); color: var(--ink); text-align: center; font-size: .72rem; font-weight: 650; letter-spacing: .025em; border-bottom: 1px solid var(--line); }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1184px; margin: auto; padding: .7rem 2rem; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; }
.brand { display: inline-flex; gap: .75rem; align-items: center; color: var(--ink); text-decoration: none; font-size: 1.1rem; font-weight: 700; letter-spacing: -.025em; flex-shrink: 0; }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 15px; background: var(--accent-soft); color: var(--accent); font-family: Georgia, serif; font-size: 2rem; line-height: 1; font-weight: 400; }
.brand-caption { display: block; font-size: .68rem; font-weight: 450; color: var(--muted); letter-spacing: .02em; margin-top: .15rem; }
.main-nav { display: flex; align-items: center; flex-wrap: wrap; gap: .2rem; }
.main-nav a, .nav-button { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: .6rem .85rem; border-radius: .7rem; font-size: .86rem; color: var(--muted); text-decoration: none; font-weight: 550; white-space: nowrap; }
.main-nav a:hover, .nav-button:hover { background: var(--surface-soft); color: var(--ink); }
.main-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.nav-button { border: 0; background: transparent; }
.logout-form { margin: 0; }
.page-shell { width: 100%; max-width: 1184px; padding: 1.25rem 2rem 2rem; margin: 0 auto; flex: 1; }
.page-heading { margin-bottom: 1rem; }
.page-heading .eyebrow { margin-bottom: .8rem; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: .9rem; padding: 1.15rem; box-shadow: var(--shadow); }
.site-footer { width: calc(100% - 4rem); max-width: 1120px; margin: auto; border-top: 1px solid var(--line); padding: 1rem 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem; color: var(--muted); font-size: .78rem; }
.site-footer a { min-height: 44px; display: inline-flex; align-items: center; gap: .4rem; }
.auth-layout { min-height: 380px; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 2rem; padding: 1rem 1.5rem 2rem; }
.auth-intro h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.7rem, 4.6vw, 4.2rem); font-weight: 400; letter-spacing: -.045em; line-height: 1.09; }
.auth-intro .lead { max-width: 24rem; font-size: 1rem; line-height: 1.9; margin-top: .85rem; }
.intro-note { display: flex; align-items: center; gap: 1rem; margin-top: 2rem; font-size: .86rem; color: var(--muted); }
.note-line { width: 2.4rem; height: 1px; background: var(--accent); }
.development-note { max-width: 24rem; margin-top: 2rem; font-size: .77rem; color: var(--muted); }
.auth-panel { padding: 2.5rem; }
.auth-panel h2 { margin-bottom: .7rem; font-size: 1.6rem; }
.auth-panel > .muted { font-size: .9rem; }
.stacked-form { margin-top: .85rem; }
.form-field { margin-bottom: .7rem; }
.form-field > label, .form-field legend { display: block; font-size: .85rem; font-weight: 650; margin-bottom: .45rem; }
.form-field fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.form-field legend { padding: 0; }
.required-marker { color: var(--muted); }
input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]), select, textarea { display: block; width: 100%; padding: .75rem .85rem; min-height: 48px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: .65rem; }
input:hover, select:hover { border-color: var(--muted); }
input[type="radio"], input[type="checkbox"] { width: 1.15rem; height: 1.15rem; margin-right: .6rem; accent-color: var(--accent); vertical-align: middle; flex-shrink: 0; }
#id_theme { display: grid; gap: .7rem; margin-top: .8rem; }
#id_theme label { display: flex; align-items: center; min-height: 54px; border: 1px solid var(--line); padding: .8rem 1rem; border-radius: .7rem; cursor: pointer; }
#id_theme label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.field-help { color: var(--muted); margin-top: .45rem; font-size: .78rem; }
.field-help ul { margin: .35rem 0 0; }
.field-help li + li { margin-top: .25rem; }
.field-errors, .form-errors { font-size: .85rem; color: var(--error); }
.field-errors ul { list-style: none; padding: 0; margin: .4rem 0 0; }
.form-errors { padding: .8rem 1rem; background: var(--error-soft); border-radius: .6rem; margin-bottom: .7rem; }
.form-errors ul { padding-left: 1rem; margin: 0; }
.has-error input { border-color: var(--error) !important; }
.required-note { font-size: .72rem; color: var(--muted); margin-bottom: 1rem; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 1rem; padding: .75rem 1.2rem; border: 1px solid transparent; border-radius: .7rem; font-size: .88rem; font-weight: 650; text-decoration: none; line-height: 1.4; }
.button-primary { background: var(--button-bg, var(--accent)); color: var(--accent-ink); border-color: var(--accent); }
.button-primary:hover { background: var(--button-hover, var(--accent-strong)); color: var(--button-hover-ink, var(--accent-ink)); }
.button-secondary { border-color: var(--line); background: var(--surface); color: var(--ink); }
.button-secondary:hover { background: var(--surface-soft); color: var(--ink); }
.button-full { width: 100%; }
.auth-alternative { margin: 1.7rem 0 1rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .86rem; }
.messages { margin-bottom: 1.5rem; }
.message { background: var(--accent-soft); border: 1px solid var(--line); padding: 1rem 1.3rem; border-radius: .75rem; }
.message.error { background: var(--error-soft); color: var(--error); }
.dashboard-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.status-pill { display: inline-flex; align-items: center; padding: .35rem .7rem; border-radius: 10rem; font-size: .73rem; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.balance-panel { position: relative; isolation: isolate; overflow: hidden; background: var(--hero); color: var(--hero-ink); padding: 1.25rem; border-radius: 1.4rem; }
.balance-panel .eyebrow { color: var(--hero-ink); }
.balance-placeholder { font-size: clamp(1.65rem, 3.5vw, 2.6rem); font-weight: 600; letter-spacing: -.04em; margin: .6rem 0; }
.balance-description { max-width: 26rem; font-size: .88rem; }
.balance-parts { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; border-top: 1px solid currentColor; margin-top: 1rem; padding-top: .7rem; max-width: 32rem; }
.balance-parts span { display: block; font-size: .78rem; }
.balance-parts strong { display: block; font-size: .95rem; margin-top: .2rem; font-weight: 600; }
.balance-decoration { position: absolute; z-index: -1; right: -2.7rem; top: -4rem; width: 25rem; height: 25rem; opacity: .13; }
.balance-decoration span { position: absolute; inset: 0; border: 1px solid currentColor; border-radius: 50%; }
.balance-decoration span:nth-child(2) { inset: 3.5rem; }
.balance-decoration span:nth-child(3) { inset: 7rem; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 1.25rem 0 .65rem; }
.section-heading h2 { font-size: 1.25rem; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.feature-card { padding: 1rem; }
.feature-symbol { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--accent-soft); color: var(--accent); font-size: 1.45rem; margin-bottom: 1.4rem; }
.feature-card p { font-size: .85rem; color: var(--muted); margin-top: .65rem; }
.planned-label { display: block; margin-top: 1.25rem; color: var(--muted); font-size: .69rem; letter-spacing: .06em; text-transform: uppercase; }
.getting-started { margin-top: 2rem; background: var(--surface-soft); border-radius: .9rem; padding: 1.15rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.getting-started h2 { font-size: 1.4rem; }
.getting-started p:not(.eyebrow) { font-size: .9rem; color: var(--muted); max-width: 34rem; margin-top: .7rem; }
.action-group { display: flex; flex-direction: column; gap: .65rem; flex-shrink: 0; }
.settings-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1rem; align-items: start; }
.theme-guide { padding: 1rem 0; }
.theme-example { display: flex; gap: 1rem; align-items: center; margin-bottom: .75rem; }
.theme-example p { margin-top: .35rem; color: var(--muted); font-size: .85rem; }
.theme-swatch { display: block; width: 52px; height: 52px; border-radius: 1rem; border: 1px solid var(--line); flex-shrink: 0; box-shadow: inset 0 0 0 8px rgb(255 255 255 / 35%); }
.swatch-rose { background: #e5bacd; }
.swatch-light { background: #c3dbdd; }
.swatch-dark { background: #34313f; box-shadow: inset 0 0 0 8px #272c37; }
.swatch-custom { background: #6d3e8d; }
.manual-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 2rem; align-items: start; }
.manual-nav { position: sticky; top: 1.5rem; display: flex; flex-direction: column; gap: .25rem; }
.manual-nav a { display: flex; align-items: center; min-height: 44px; padding: .6rem .8rem; color: var(--muted); text-decoration: none; font-size: .86rem; border-radius: .6rem; }
.manual-nav a:hover { background: var(--accent-soft); color: var(--accent); }
.manual-section { margin-bottom: 1.25rem; scroll-margin-top: 1.5rem; }
.chapter-number { display: block; color: var(--accent); font-size: .75rem; font-weight: 700; letter-spacing: .12em; margin-bottom: .7rem; }
.manual-section h2 { margin-bottom: 1.25rem; }
.manual-section h3 { margin: 1.5rem 0 .7rem; }
.manual-section p, .manual-section li { font-size: .94rem; }
.info-note { background: var(--accent-soft); color: var(--ink); border-radius: .7rem; padding: 1rem 1.2rem; font-size: .87rem; margin-top: 1.2rem; }
.release-list { max-width: 850px; }
.release-card { margin-bottom: 1.3rem; }
.release-meta { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-bottom: 1.5rem; }
.release-version { color: var(--accent); font-weight: 700; font-size: 1.05rem; }
.release-meta time { color: var(--muted); font-size: .8rem; }
.release-card li { font-size: .93rem; }
.account-list { display: grid; gap: 1rem; margin-top: 1.5rem; }
.account-card { display: flex; justify-content: space-between; gap: 1.5rem; align-items: center; }
.account-card h2 { font-size: 1.2rem; }
.obligation-card, .card-link { display: block; color: var(--ink); text-decoration: none; touch-action: manipulation; }
.obligation-card:hover, .card-link:hover { color: var(--ink); border-color: var(--accent); }
.balance-panel.card-link, .balance-panel.card-link:hover { color: var(--hero-ink); }
.goal-preview.card-link h3 { overflow-wrap: anywhere; }
.obligation-card h2 { overflow-wrap: anywhere; }
.form-field .checkbox-field { display: flex; align-items: center; gap: .65rem; min-height: 48px; cursor: pointer; }
.account-email { overflow-wrap: anywhere; margin-top: .35rem; }
.account-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.settings-panel code, .auth-card code { overflow-wrap: anywhere; }
.settings-panel svg { max-width: 100%; height: auto; }
.dashboard-action { margin: 1rem 0 2rem; }
.balance-history { max-width: 100%; }
.chart-header, .chart-footer { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .8rem; }
.balance-chart { display: block; width: 100%; height: 180px; margin: .5rem 0; background: var(--surface-soft); border-radius: .6rem; }
.chart-zero { stroke: var(--muted); stroke-width: 1px; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.chart-line { fill: none; stroke-width: 2px; vector-effect: non-scaling-stroke; }
.chart-total { stroke: var(--accent); }
.chart-cash { stroke: #388578; }
.chart-bank { stroke: #a7682f; }
.chart-dot.chart-total { fill: var(--accent); }
.chart-dot.chart-cash { fill: #388578; }
.chart-dot.chart-bank { fill: #a7682f; }
[data-theme="dark"] .chart-cash { stroke: #86d2bd; }
[data-theme="dark"] .chart-bank { stroke: #f0b778; }
[data-theme="dark"] .chart-dot.chart-cash { fill: #86d2bd; }
[data-theme="dark"] .chart-dot.chart-bank { fill: #f0b778; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1rem 0; font-size: .82rem; }
.chart-legend span::before { content: ""; display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin-right: .4rem; background: var(--accent); }
.chart-legend span:nth-child(2)::before { background: #388578; }
.chart-legend span:nth-child(3)::before { background: #a7682f; }
[data-theme="dark"] .chart-legend span:nth-child(2)::before { background: #86d2bd; }
[data-theme="dark"] .chart-legend span:nth-child(3)::before { background: #f0b778; }
.history-table-wrap { overflow-x: auto; }
.history-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.history-table caption { text-align: left; font-weight: 600; margin-bottom: .5rem; }
.history-table th, .history-table td { padding: .55rem .65rem; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.history-table th:first-child { text-align: left; }
.goal-preview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.goal-preview p:not(.eyebrow) { margin-top: .6rem; }
.goal-progress { display: block; width: 100%; height: .8rem; margin-top: 1rem; accent-color: var(--accent); }
.goal-progress::-webkit-progress-bar { background: var(--surface-soft); border-radius: 1rem; }
.goal-progress::-webkit-progress-value { background: var(--accent); border-radius: 1rem; }
.goal-progress::-moz-progress-bar { background: var(--accent); border-radius: 1rem; }
.obligation-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.obligation-summary-grid .panel { display: grid; gap: .35rem; align-content: start; }
.obligation-summary-grid .eyebrow { margin-bottom: .2rem; }
.summary-amount { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 700; letter-spacing: -.035em; overflow-wrap: anywhere; }
@media (max-width: 960px) {
  .header-inner { align-items: flex-start; }
  .main-nav { justify-content: flex-end; }
  .auth-layout { gap: 2.5rem; padding-left: 0; padding-right: 0; }
  .auth-panel { padding: 1.8rem; }
  .feature-card { padding: 1.3rem; }
  .getting-started { align-items: flex-start; }
}
@media (max-width: 720px) {
  .header-inner { padding: 1rem 1.1rem .7rem; flex-wrap: wrap; gap: .8rem; }
  .brand-mark { width: 39px; height: 39px; border-radius: 12px; }
  .brand-caption { font-size: .65rem; }
  .main-nav { width: 100%; justify-content: flex-start; gap: .15rem; }
  .main-nav a, .nav-button { padding: .6rem .7rem; font-size: .8rem; }
  .page-shell { padding: 1rem 1rem 1.5rem; }
  .page-heading { margin-bottom: .8rem; }
  .lead { font-size: .95rem; }
  .auth-layout { display: flex; flex-direction: column; min-height: auto; gap: 1.8rem; align-items: stretch; padding: .2rem 0 0; }
  .auth-intro h1 { font-size: 2.6rem; }
  .auth-intro h1 br { display: none; }
  .auth-intro .lead { max-width: none; margin-top: 1rem; font-size: .92rem; }
  .auth-intro .intro-note { display: none; }
  .development-note { max-width: none; margin-top: .9rem; }
  .auth-panel { padding: 1rem; }
  .dashboard-heading { display: block; }
  .dashboard-heading .status-pill { margin-top: 1rem; }
  .balance-panel { padding: 1rem; }
  .balance-description { max-width: 24rem; }
  .balance-parts { margin-top: .85rem; gap: 1rem; }
  .balance-decoration { right: -13rem; opacity: .1; }
  .section-heading { display: block; margin-top: 1.2rem; }
  .section-heading > span { display: block; margin-top: .45rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .goal-preview-grid { grid-template-columns: 1fr; }
  .obligation-summary-grid { grid-template-columns: 1fr; }
  .balance-history { padding: 1.3rem; }
  .balance-chart { height: 150px; }
  .feature-card { position: relative; padding: 1.35rem 1.3rem 1.35rem 5rem; }
  .feature-symbol { position: absolute; left: 1.3rem; top: 1.35rem; width: 38px; height: 38px; }
  .planned-label { margin-top: .8rem; }
  .getting-started { display: block; padding: 1rem; }
  .action-group { margin-top: 1.4rem; }
  .settings-layout { grid-template-columns: 1fr; gap: 1rem; }
  .settings-panel { padding: 1rem; }
  .manual-layout { grid-template-columns: 1fr; gap: 1.5rem; }
  .manual-nav { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: .1rem; }
  .manual-nav a { padding-left: .2rem; font-size: .8rem; }
  .manual-section { padding: 1rem; }
  .release-card { padding: 1rem; }
  .account-card { align-items: flex-start; flex-direction: column; padding: 1rem; }
  .site-footer { width: calc(100% - 2.2rem); flex-wrap: wrap; gap: .2rem; padding-top: 1rem; font-size: .73rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }

.balance-entry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: stretch; }
.balance-entry-grid > * { min-width: 0; }
.compact-form { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem .85rem; }
.compact-form .form-field { min-width: 0; margin: 0; }
.compact-form .form-errors, .compact-form .form-field:has(select), .compact-form button { grid-column: 1 / -1; }
.settings-menu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.settings-link { display: grid; gap: .3rem; text-decoration: none; }
.settings-link span { color: var(--muted); font-size: .85rem; }
.settings-link:hover { border-color: var(--accent); }
.settings-back { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: .35rem; }
.panel + .settings-panel { margin-top: .75rem; }
@media (max-width: 720px) {
  .balance-entry-grid, .settings-menu { grid-template-columns: 1fr; }
  .compact-form { grid-template-columns: minmax(0, 1fr); }
  .quick-balance .form-field, .compact-form button { grid-column: 1; }
  .balance-parts { max-width: none; }
}

/* Follow device changes immediately, scoped to the signed-in System choice. */
@media (prefers-color-scheme: dark) {
[data-theme="system"] {
  color-scheme: dark;
  --page: #171b23;
  --surface: #202631;
  --surface-soft: #29303d;
  --ink: #f2edf2;
  --muted: #b9b5c5;
  --accent: #e8adc7;
  --accent-strong: #f5c4d9;
  --accent-ink: #362330;
  --accent-soft: #3e3041;
  --line: #3b4351;
  --hero: #342d3e;
  --hero-ink: #f3dce8;
  --focus: #ecc0da;
  --error: #ffb6b9;
  --error-soft: #452e37;
  --shadow: 0 12px 35px rgb(0 0 0 / 10%);
}
[data-theme="system"] .chart-cash { stroke: #86d2bd; }
[data-theme="system"] .chart-bank { stroke: #f0b778; }
[data-theme="system"] .chart-dot.chart-cash { fill: #86d2bd; }
[data-theme="system"] .chart-dot.chart-bank { fill: #f0b778; }
[data-theme="system"] .chart-legend span:nth-child(2)::before { background: #86d2bd; }
[data-theme="system"] .chart-legend span:nth-child(3)::before { background: #f0b778; }
}
