:root {
  color-scheme:light;
  --navy:#13252b;
  --navy2:#1d353b;
  --mint:#c8f0dc;
  --green:#156d52;
  --line:#e3e7e0;
  --bg:#f4f5f0;
  --ink:var(--navy);
  --accent:var(--green);
  --muted:#64746d;
  --blue:#4d79c4;
  --gold:#b88a25;
  --pink:#c65c7a;
  --red:#b84359;
}
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--ink); font:14px/1.5 system-ui,-apple-system,"Segoe UI",sans-serif; letter-spacing:0; }
button,input,select,textarea { font:inherit; }
button,a,input,select { -webkit-tap-highlight-color:transparent; }
button { cursor:pointer; transition:background .15s ease,border-color .15s ease; }
button:disabled { opacity:.55; cursor:default; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible { outline:3px solid var(--gold); outline-offset:3px; }
a { color:var(--green); text-underline-offset:3px; }
h1,h2,h3,h4,p { overflow-wrap:anywhere; }
h1 { margin:0; font-size:26px; line-height:1.25; font-weight:650; }
h2 { margin:0; font-size:20px; line-height:1.3; }
h3 { margin:0 0 16px; font-size:15px; line-height:1.4; font-weight:650; }
h4 { line-height:1.4; }
[hidden] { display:none !important; }
.ui-icon { display:block; width:18px; height:18px; flex-shrink:0; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.negative,.danger { color:var(--red) !important; }

/* Application shell and navigation. */
.app-shell { display:grid; grid-template-columns:212px minmax(0,1fr); min-height:100dvh; }
.skip-link { position:fixed; top:8px; left:228px; z-index:100; padding:10px 14px; background:#fff; border:1px solid var(--line); border-radius:5px; transform:translateY(-160%); }
.skip-link:focus { transform:translateY(0); }
.app-sidebar { position:sticky; top:0; align-self:start; height:100dvh; min-height:560px; display:flex; flex-direction:column; padding:28px 16px 20px; background:var(--navy); color:#e4efea; }
.brand { display:flex; align-items:center; gap:10px; font-size:12px; font-weight:650; line-height:1.3; text-decoration:none; }
.brand img { display:block; width:34px; height:34px; flex-shrink:0; border-radius:5px; }
.brand .brand-name { margin:0; color:inherit; }
.brand-name > span { display:block; margin-top:4px; font-size:9px; font-weight:500; }
.app-sidebar .brand { color:#fff; padding:0 4px; }
.app-sidebar .brand-name { font-size:18px; }
.app-sidebar .brand-name > span { color:#9fbbb4; }
.sidebar-caption { margin:36px 12px 10px; font-size:10px; font-weight:600; color:#90aaa4; }
.tabs { display:flex; flex-direction:column; gap:5px; min-width:0; }
.tabs button { display:flex; align-items:center; gap:10px; width:100%; min-height:43px; padding:11px 12px; border:0; border-radius:6px; background:transparent; color:#bbcec8; font-size:13px; font-weight:500; text-align:left; white-space:nowrap; }
.tabs button .ui-icon { width:17px; height:17px; }
.tabs button small { margin-left:auto; font-size:10px; opacity:.65; }
.tabs button:hover { background:var(--navy2); color:#fff; }
.tabs button[aria-selected="true"] { background:var(--mint); color:#173b34; font-weight:650; }
.sidebar-bottom { margin-top:auto; padding:30px 4px 0; }
.sidebar-summary { padding:18px 8px 0; border-top:1px solid #2d4349; }
.sidebar-summary strong { display:block; margin-bottom:5px; color:#fff; font-size:12px; font-weight:550; }
.sidebar-summary-label { display:block; margin-bottom:7px; font-size:9px; color:#9fbbb4; }
.sidebar-signature { display:block; padding:22px 8px 0; font-size:9px; color:#90aaa4; }
.sidebar-summary p { margin:0; color:#9fbbb4; font-size:11px; line-height:1.6; }
.sidebar-summary progress { display:block; width:100%; height:4px; margin:12px 0 8px; --progress-color:var(--mint); }
.sidebar-progress { height:4px; margin:12px 0 8px; border-radius:2px; overflow:hidden; background:#2d4349; }
.sidebar-progress > span,#sidebar-progress { display:block; height:4px; border-radius:2px; background:var(--mint); }
#sidebar-complete { color:var(--mint); }
#sidebar-count { color:#9fbbb4; font-size:11px; }
.sidebar-links { display:flex; flex-direction:column; gap:12px; padding:24px 8px 0; }
.sidebar-links a { display:flex; align-items:center; gap:8px; color:#aac2ba; font-size:11px; text-decoration:none; }
.sidebar-links a:hover { color:#fff; }
.sidebar-links .ui-icon { width:15px; height:15px; }
.app-workspace { min-width:0; }
.app-header { display:flex; align-items:center; justify-content:space-between; gap:20px; min-height:62px; padding:12px 32px; border-bottom:1px solid var(--line); background:#fff; }
.workspace-location { display:flex; align-items:center; flex-wrap:wrap; gap:16px; min-width:0; }
.workspace-location > span { font-size:11px; color:var(--muted); }
#workspace-view { font-size:12px; font-weight:650; }
.header-end { display:flex; align-items:center; gap:9px; flex-shrink:0; }
.header-end .primary,.header-end .secondary { min-height:34px; padding:7px 11px; font-size:12px; }
.icon-button,.header-end .icon-button { display:grid; place-items:center; width:34px; height:34px; min-height:34px; padding:0; }
.header-end #account-open { max-width:240px; }
.back-link { font-size:11px; }
.local-state { display:inline-flex; align-items:center; gap:6px; min-width:0; color:var(--muted); font-size:11px; overflow-wrap:anywhere; }
.local-state::before { content:''; width:5px; height:5px; flex-shrink:0; border-radius:50%; background:var(--green); }
.local-state[data-warning="true"] { color:#956319; }
.local-state[data-warning="true"]::before { background:var(--gold); }
main { max-width:1480px; margin:0 auto; padding:28px 32px 24px; }
.page-heading,.section-title { display:flex; align-items:center; justify-content:space-between; gap:20px; }
.page-heading { margin-bottom:18px; }
.page-heading > div:first-child { min-width:0; }
.eyebrow,.panel-kicker { margin:0 0 7px; color:var(--green); font-size:10px; font-weight:600; }
.page-subtitle { margin:7px 0 0; color:var(--muted); font-size:12px; line-height:1.6; }
.page-actions { display:flex; align-items:center; gap:12px; flex-shrink:0; }
.month-control { display:flex; align-items:center; gap:3px; padding:2px; border:1px solid var(--line); border-radius:6px; background:#fff; font-size:12px; }
.month-control label { display:flex; align-items:center; gap:8px; min-width:0; }
.month-control input { width:143px; border:0; background:transparent; padding:7px 4px; font-size:12px; font-weight:600; }
.month-arrow { display:grid; place-items:center; width:30px; height:32px; flex-shrink:0; padding:0; border:0; border-radius:4px; background:transparent; color:var(--green); font-size:18px; }
.month-arrow:hover { background:#e8f2ec; }
.month-arrow:disabled { opacity:.3; }

/* Shared controls and account status. */
input,select,textarea { min-width:0; max-width:100%; padding:9px 11px; border:1px solid #b8c7bf; border-radius:5px; color:var(--ink); background:#fff; }
input[aria-invalid="true"] { border-color:var(--red); }
.primary,.secondary { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:38px; padding:8px 13px; border:1px solid var(--line); border-radius:6px; font-size:12px; font-weight:550; line-height:1.45; text-align:center; overflow-wrap:anywhere; }
.primary { border-color:var(--green); background:var(--green); color:#fff; }
.primary:hover { border-color:#105745; background:#105745; }
.secondary { background:#fff; color:var(--ink); }
.secondary:hover { border-color:#bbcfc3; background:#edf4ef; }
.text-button { padding:0; border:0; background:transparent; color:var(--green); font-size:12px; line-height:1.5; text-align:left; overflow-wrap:anywhere; }
.text-button:hover { color:#105745; text-decoration:underline; text-underline-offset:3px; }
.remove { display:grid; place-items:center; align-self:center; width:32px; height:38px; padding:0; border:0; border-radius:4px; background:transparent; color:var(--muted); font-size:22px; }
.remove:hover { background:#fbe9ef; color:var(--red); }
.account-band { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:0 0 8px; padding:9px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.account-band > div:first-child { min-width:0; }
.account-band strong { font-size:12px; font-weight:550; }
.account-band p { margin:3px 0 0; color:var(--muted); font-size:11px; }
#account-session { display:block; margin-top:3px; font-size:11px; overflow-wrap:anywhere; }
.account-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:9px; }
.account-actions .primary,.account-actions .secondary { min-height:32px; padding:6px 10px; font-size:11px; }
.account-actions .text-button { padding:5px 0; font-size:11px; }
.privacy-strip { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:10px 0 14px; color:var(--muted); font-size:10px; }
.privacy-strip .text-button { font-size:10px; }
.privacy-label { display:flex; align-items:center; gap:6px; min-width:0; }
.privacy-label .ui-icon { width:14px; height:14px; color:var(--green); }
.demo-banner,.new-month-banner { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 0; border-bottom:1px solid var(--line); color:var(--muted); font-size:12px; }
.demo-banner { color:#856318; border-color:#e6dbbf; }
.demo-banner .text-button { margin-left:auto; }
.new-month-banner { margin-top:12px; }
.storage-warning { margin-top:14px; padding:13px 15px; border-left:3px solid var(--gold); background:#fff5dc; font-size:12px; }
.storage-warning > div { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.storage-warning .secondary { min-height:34px; font-size:11px; }
.editor-dock { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-top:14px; padding:12px 16px; border:1px solid var(--line); border-radius:6px; background:#fff; }
.editor-dock > div { display:flex; flex-direction:column; gap:3px; min-width:0; }
.editor-dock span { color:var(--muted); font-size:11px; }
.editor-dock strong { font-size:18px; overflow-wrap:anywhere; }
.editor-dock .primary { min-height:34px; font-size:11px; }
[role="tabpanel"] { padding-top:12px; min-width:0; }
.section-title { margin-bottom:22px; }
.section-title p { max-width:760px; margin:7px 0 0; color:var(--muted); font-size:12px; line-height:1.65; }
.section-title > span { color:var(--muted); font-size:11px; }
.summary-title { margin-bottom:14px; }
.summary-title h2 { font-size:17px; }

/* Overview: entry points, KPIs and individually framed chart tools. */
.start-path { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:0 0 16px; }
.start-path button { display:grid; grid-template-columns:28px minmax(0,1fr) 16px; gap:2px 10px; align-items:center; padding:10px 12px; border:1px solid var(--line); border-radius:6px; background:#fff; color:var(--ink); text-align:left; }
.start-path button:hover { border-color:#bbd7c8; background:#edf4ef; }
.start-path .step-number { display:grid; place-items:center; grid-row:1/3; width:28px; height:28px; border-radius:5px; background:#e0f2e8; color:var(--green); font-size:10px; }
.start-path button:nth-child(2) .step-number { background:#e8eef9; color:var(--blue); }
.start-path button:nth-child(3) .step-number { background:#fbf0d9; color:#946e19; }
.start-path strong { min-width:0; font-size:12px; font-weight:600; }
.start-path button > span:last-of-type { min-width:0; color:var(--muted); font-size:10px; }
.start-path b { grid-column:3; grid-row:1/3; font-size:16px; font-weight:400; }
.start-path .step-done .step-number { font-size:15px; }
.metrics { display:grid; grid-template-columns:minmax(0,1.4fr) repeat(3,minmax(0,1fr)); gap:12px; margin:0 0 18px; }
.metric { display:flex; flex-direction:column; min-width:0; min-height:160px; padding:17px 18px 12px; border:1px solid var(--line); border-radius:8px; background:#fff; }
.metric-label { display:flex; align-items:center; gap:7px; min-height:22px; color:#5c7067; font-size:11px; font-weight:550; }
.metric-label .ui-icon { width:16px; height:16px; }
.metric:nth-child(2) .metric-label .ui-icon { color:var(--blue); }
.metric:nth-child(3) .metric-label .ui-icon { color:var(--gold); }
.metric:nth-child(4) .metric-label .ui-icon { color:var(--pink); }
.metric strong { display:block; margin:10px 0 7px; font-size:27px; font-weight:650; line-height:1.25; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.metric small { color:var(--muted); font-size:10px; line-height:1.5; }
.metric-edit { align-self:flex-end; margin-top:auto; padding:7px 0 0; border:0; background:transparent; color:#61786c; font-size:10px; text-decoration:underline; text-underline-offset:3px; }
.metric.metric-featured { border-color:var(--navy); background:var(--navy); color:#fff; }
.metric-featured .metric-label { color:#c5ded4; }
.metric-featured .metric-label .ui-icon { color:var(--mint); }
.metric-featured strong { font-size:34px; }
.metric-featured small,.metric-featured .metric-edit { color:#b6d0c4; }
.metric-featured .negative { color:#ffb8c6 !important; }
.net-equation { display:block; margin:8px 0 0; color:#b6d0c4; font-size:10px; line-height:1.5; overflow-wrap:anywhere; }
.visual-summary { display:grid; grid-template-columns:minmax(0,1.75fr) minmax(280px,1fr); gap:16px; margin-bottom:18px; }
.history-band,.balance-band,.composition-tool,.allocation-band { min-width:0; padding:20px; border:1px solid var(--line); border-radius:8px; background:#fff; }
.history-band,.balance-band { min-height:352px; }
.history-band .section-title,.composition-tool .section-title,.allocation-band .section-title { align-items:center; gap:14px; margin-bottom:15px; }
.history-band h3,.balance-band h3,.composition-tool h3,.allocation-band h3 { margin:0; font-size:14px; }
.history-band .section-title > span { font-size:10px; }
#history-chart { min-width:0; min-height:230px; }
.history-svg { display:block; width:100%; height:280px; font-family:inherit; }
.history-comparison { margin:8px 0 0; color:var(--muted); font-size:11px; line-height:1.5; }
.history-empty { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:13px; min-height:220px; padding:22px 0; }
.history-empty > .ui-icon { width:28px; height:28px; color:var(--blue); }
.history-empty p { flex:1; min-width:150px; max-width:440px; margin:0; color:var(--muted); font-size:12px; line-height:1.7; }
.history-empty .secondary { font-size:11px; }
.balance-rows { margin:20px 0 0; }
.balance-rows > div { padding:9px 0; }
.balance-rows dt,.balance-rows dd { font-size:12px; }
.balance-rows dd { font-weight:600; }
.balance-highlight { display:flex; align-items:center; justify-content:space-between; gap:14px; margin:20px 0 18px; }
.balance-highlight span { color:var(--muted); font-size:11px; }
.balance-highlight strong { min-width:0; font-size:26px; line-height:1.25; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.budget-bar { display:flex; width:100%; height:9px; border-radius:3px; overflow:hidden; background:#e4ebe6; }
.budget-bar span { height:100%; transition:width .2s ease; }
.bar-expenses { background:var(--pink); }
.bar-savings { background:var(--green); }
.budget-legend { display:flex; justify-content:space-between; flex-wrap:wrap; gap:6px 14px; margin:9px 0 20px; color:var(--muted); font-size:10px; }
.debt-overview { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px 12px; margin-top:23px; padding-top:15px; border-top:1px solid var(--line); }
.debt-overview > span { color:var(--muted); font-size:11px; }
.debt-overview strong { font-size:18px; font-variant-numeric:tabular-nums; }
.debt-overview meter { grid-column:1/-1; width:100%; height:10px; }
.debt-overview p { grid-column:1/-1; margin:0; color:var(--muted); font-size:10px; line-height:1.6; }
meter::-webkit-meter-bar { border:0; background:#e4ebe6; }
meter::-webkit-meter-optimum-value { background:var(--pink); }
meter::-moz-meter-bar { background:var(--pink); }
.chart-note { margin:12px 0 0; color:var(--muted); font-size:10px; line-height:1.65; }
.composition-tool,.allocation-band { margin-bottom:18px; }
.chart-modes { display:flex; flex-shrink:0; padding:3px; border-radius:5px; background:#eef2ee; }
.chart-modes button { padding:5px 11px; border:0; border-radius:3px; background:transparent; color:var(--muted); font-size:11px; }
.chart-modes button[aria-pressed="true"] { background:#fff; color:var(--green); box-shadow:0 1px 3px #14292f10; }
.allocation-layout { display:grid; grid-template-columns:224px minmax(0,1fr); align-items:center; gap:32px; min-height:224px; }
.donut-wrap { position:relative; justify-self:center; width:224px; max-width:100%; aspect-ratio:1; }
.allocation-donut { width:100%; height:100%; border-radius:50%; background:#e4ebe6; cursor:pointer; mask:radial-gradient(circle at center,transparent 56%,#000 57%); -webkit-mask:radial-gradient(circle at center,transparent 56%,#000 57%); }
.donut-center { position:absolute; inset:24% 16%; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; pointer-events:none; }
.donut-center span { max-width:100%; color:var(--muted); font-size:10px; line-height:1.4; overflow-wrap:anywhere; }
.donut-center strong { max-width:100%; margin:7px 0; font-size:20px; font-weight:650; line-height:1.25; overflow-wrap:anywhere; }
.donut-empty strong { font-size:14px; }
.donut-empty p { color:var(--muted); font-size:12px; }
.donut-empty .primary { font-size:11px; }
.allocation-legend { min-width:0; max-height:265px; overflow:auto; }
.allocation-item { display:grid; grid-template-columns:9px minmax(0,1fr) auto; align-items:center; gap:4px 9px; width:100%; padding:11px 8px; border:0; border-bottom:1px solid #e5ebe7; border-radius:0; background:transparent; color:var(--ink); text-align:left; }
.allocation-item:hover,.allocation-item[aria-pressed="true"] { background:#edf4ef; }
.allocation-item .swatch { width:8px; height:8px; border-radius:2px; }
.allocation-name,.allocation-item strong { font-size:11px; overflow-wrap:anywhere; }
.allocation-item strong { font-weight:600; font-variant-numeric:tabular-nums; }
.allocation-share { grid-column:2/4; color:var(--muted); font-size:10px; }
.allocation-track { display:block; grid-column:2/4; height:3px; margin-top:3px; border-radius:2px; overflow:hidden; background:#e3ebe5; }
.allocation-track > span { display:block; height:100%; border-radius:2px; }
.allocation-detail { margin-top:18px; padding-top:14px; border-top:1px solid var(--line); }
.allocation-detail-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:4px; }
.allocation-detail-heading h4 { margin:0; font-size:12px; }
.detail-row { display:grid; grid-template-columns:minmax(0,1fr) auto 18px; align-items:center; gap:12px; width:100%; padding:11px 0; border:0; border-bottom:1px solid #e5ebe7; background:transparent; color:var(--ink); font-size:12px; text-align:left; }
.detail-row:hover { background:#edf4ef; }
.detail-row span { overflow-wrap:anywhere; }
.detail-row strong { font-weight:550; font-variant-numeric:tabular-nums; }
.detail-row .ui-icon { width:15px; height:15px; color:var(--muted); }
.summary-details { padding:15px 0; border-bottom:1px solid var(--line); }
.summary-details > summary { width:fit-content; color:#50695d; font-size:12px; font-weight:550; cursor:pointer; }
.summary-grid,.edit-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:28px; }
.summary-band { min-width:0; padding:22px 0 8px; }
dl { margin:0 0 15px; }
dl > div { display:flex; justify-content:space-between; gap:18px; padding:9px 0; border-bottom:1px solid #e2e9e4; }
dt,dd { min-width:0; overflow-wrap:anywhere; }
dt { color:var(--muted); font-size:12px; }
dd { margin:0; font-size:12px; font-variant-numeric:tabular-nums; }
.summary-band dd,.goals-summary dd { flex-shrink:0; max-width:60%; text-align:right; }
.goals-summary { padding:22px 0; }
.goals-summary .section-title { margin-bottom:14px; }
.goals-summary h3 { margin:0; font-size:14px; }
.goal-overview-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.goal-overview-card { min-width:0; padding:17px; border:1px solid var(--line); border-top:3px solid var(--gold); border-radius:6px; background:#fff; --progress-color:var(--gold); }
.goal-overview-card:nth-child(3n+2) { border-top-color:var(--blue); --progress-color:var(--blue); }
.goal-overview-card:nth-child(3n) { border-top-color:var(--pink); --progress-color:var(--pink); }
.goal-overview-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.goal-overview-heading h4 { display:flex; align-items:flex-start; gap:7px; margin:0; font-size:12px; overflow-wrap:anywhere; }
.goal-overview-heading .ui-icon { width:16px; height:16px; margin-top:1px; color:var(--gold); }
.goal-overview-amounts { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:3px 12px; margin:17px 0 12px; }
.goal-overview-amounts strong { font-size:21px; font-weight:600; overflow-wrap:anywhere; }
.goal-overview-amounts span { grid-column:1; color:var(--muted); font-size:10px; }
.goal-overview-amounts b { grid-column:2; grid-row:1/3; align-self:center; color:#856318; font-size:11px; font-weight:550; }
.goal-overview-card progress { display:block; width:100%; height:6px; }
progress { appearance:none; -webkit-appearance:none; border:0; border-radius:3px; overflow:hidden; background:#e4ebe6; }
progress::-webkit-progress-bar { border-radius:3px; background:#e4ebe6; }
progress::-webkit-progress-value { border-radius:3px; background:var(--progress-color,var(--gold)); }
progress::-moz-progress-bar { border-radius:3px; background:var(--progress-color,var(--gold)); }
.goal-next-step { margin:10px 0 0; color:var(--muted); font-size:10px; }
.partial-note { width:100%; color:#93631b; }
.summary-foot { display:flex; justify-content:space-between; gap:24px; padding-top:18px; border-top:1px solid var(--line); font-size:11px; }
.summary-foot p { max-width:520px; margin:0; color:var(--muted); }

/* Factual review and calculations share the existing workspace palette. */
.review-strip { margin:0 0 18px; padding:14px 0 16px; border-bottom:1px solid var(--line); }
.review-heading { margin-bottom:11px; }
.review-heading h3 { margin:0; font-size:14px; }
.review-heading p { margin:4px 0 0; color:var(--muted); font-size:11px; line-height:1.6; }
.review-progress { display:flex; flex-wrap:wrap; gap:7px; }
.review-progress button { display:inline-flex; align-items:center; justify-content:flex-start; gap:7px; max-width:100%; min-height:35px; padding:7px 10px; border:1px solid var(--line); border-radius:5px; background:#fff; color:var(--ink); font-size:11px; line-height:1.4; text-align:left; overflow-wrap:anywhere; }
.review-progress button:hover { border-color:#b8d2c3; background:#edf4ef; }
.review-progress .ui-icon { width:14px; height:14px; color:var(--muted); }
.review-progress small { margin-left:3px; color:var(--muted); font-size:9px; }
.review-progress button[data-complete="true"] { border-color:#b8d8c5; background:#edf7f0; }
.review-progress button[data-complete="true"] .ui-icon,.review-progress button[data-complete="true"] small { color:var(--green); }
.review-next { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-top:12px; color:var(--muted); font-size:11px; line-height:1.6; }
.review-next p { margin:0; }
.review-next button { flex-shrink:0; }
.review-next .secondary { min-height:32px; padding:6px 10px; font-size:11px; }
.review-next .text-button { display:inline-flex; align-items:center; gap:6px; min-height:32px; }
.review-next .text-button .ui-icon { width:15px; height:15px; }
.month-reading { margin:0 0 18px; padding:20px 0 22px; border-bottom:1px solid var(--line); }
.month-reading > h3 { margin-bottom:17px; font-size:14px; }
.month-reading .section-title { margin-bottom:17px; }
.month-reading .section-title h3 { margin:0; font-size:14px; }
.reading-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
.fact-item { display:grid; grid-template-columns:19px minmax(0,1fr); align-content:start; gap:4px 9px; min-width:0; padding:0 22px; border-left:1px solid var(--line); }
.fact-item:first-child { padding-left:0; border-left:0; }
.fact-item > .ui-icon { width:17px; height:17px; margin-top:1px; color:var(--green); }
.fact-item:nth-child(2) > .ui-icon { color:var(--blue); }
.fact-item:nth-child(3) > .ui-icon { color:var(--gold); }
.fact-item > span { color:var(--muted); font-size:11px; line-height:1.5; }
.fact-item > strong { grid-column:2; min-width:0; margin:3px 0 2px; font-size:24px; font-weight:650; line-height:1.3; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.fact-item > p { grid-column:2; margin:0; color:var(--muted); font-size:11px; line-height:1.65; }
.fact-item[data-state="missing"] > strong { color:var(--muted); font-size:18px; }
.calculator-tabs { display:inline-flex; flex-wrap:wrap; gap:4px; margin:0 0 18px; padding:4px; border-radius:6px; background:#e8ede7; }
.calculator-tabs button { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:36px; padding:8px 16px; border:1px solid transparent; border-radius:4px; background:transparent; color:var(--muted); font-size:12px; font-weight:550; line-height:1.45; }
.calculator-tabs button:hover { color:var(--green); }
.calculator-tabs button[aria-pressed="true"] { border-color:#cbded1; background:#fff; color:var(--green); }
.calculator-tabs .ui-icon { width:16px; height:16px; }
.calculator-layout { display:grid; grid-template-columns:minmax(0,.95fr) minmax(0,1.3fr); min-width:0; border:1px solid var(--line); border-radius:8px; overflow:hidden; background:#fff; }
.calculator-inputs { min-width:0; margin:0; padding:24px; border-right:1px solid var(--line); }
.calculator-inputs h2 { margin:0 0 9px; font-size:16px; }
#calculator-intro { margin:0 0 20px; color:var(--muted); font-size:12px; line-height:1.65; }
.calculator-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 14px; }
.calculator-fields label { min-width:0; color:#50675c; font-size:12px; line-height:1.5; }
.calculator-fields input,.calculator-fields select { display:block; width:100%; margin-top:7px; padding:10px 11px; font-size:15px; font-variant-numeric:tabular-nums; }
.calculator-fields small { display:block; margin-top:5px; color:var(--muted); font-size:10px; line-height:1.5; }
.calculator-source-button { max-width:100%; margin-top:17px; font-size:11px; }
.calculator-error { margin:12px 0 0; font-size:12px; line-height:1.6; }
.calculator-error:empty { display:none; }
.calculator-result { display:flex; flex-direction:column; min-width:0; min-height:530px; padding:24px; background:#fbfcfa; }
.calculator-result h3 { margin:0 0 7px; font-size:13px; font-weight:550; color:var(--muted); }
.calculator-result h3 + strong { display:block; min-width:0; margin:0; color:var(--green); font-size:34px; line-height:1.25; font-weight:650; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.calculator-breakdown { margin:20px 0 18px; }
.calculator-breakdown > div { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.1fr); gap:14px; padding:10px 0; }
.calculator-breakdown dt,.calculator-breakdown dd { min-width:0; font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.calculator-breakdown dd { font-weight:600; text-align:right; }
.calculator-visual { min-width:0; margin-top:auto; padding-top:16px; border-top:1px solid var(--line); }
.calculator-visual svg { display:block; width:100%; height:260px; font-family:inherit; }
.calculator-note { margin:14px 0 0; color:var(--muted); font-size:11px; line-height:1.7; }

/* Editors, validation and monthly records. */
.group { min-width:0; padding:18px 0 24px; border-top:3px solid var(--category-color,var(--green)); border-bottom:1px solid var(--line); --category-color:var(--green); }
.group-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.group-heading h3 { display:flex; align-items:center; gap:8px; margin:0; color:var(--category-color); font-size:15px; }
.add-concept { display:grid; place-items:center; width:34px; height:34px; flex-shrink:0; padding:0; border:1px solid #c7d8cd; border-radius:5px; background:#fff; color:var(--category-color,var(--green)); }
.add-concept:hover { border-color:#a5c6b2; background:#e7f2eb; }
.group-help { margin:0 0 12px; color:var(--muted); font-size:11px; }
.group-help summary { width:fit-content; cursor:pointer; }
.group-help p { max-width:480px; margin:8px 0; line-height:1.65; }
.group > select { width:auto; min-width:200px; margin:0 0 16px; padding:8px 10px; font-size:12px; }
.entry { display:grid; grid-template-columns:minmax(0,1fr) 130px 32px; gap:7px; margin:9px 0; }
.entry input { width:100%; padding:10px; font-size:13px; }
.entry > .remove { grid-column:3; grid-row:1; }
.entry > .field-error { grid-column:1/-1; grid-row:2; }
.field-error { display:block; margin-top:3px; color:var(--red); font-size:11px; line-height:1.4; }
.column-labels { display:grid; grid-template-columns:minmax(0,1fr) 169px; color:var(--muted); font-size:10px; }
.group-total { margin:12px 0 0; color:var(--category-color); font-size:12px; font-weight:650; text-align:right; }
.no-balance { display:flex; align-items:center; gap:8px; margin-top:14px; color:var(--muted); font-size:12px; }
.no-balance input { width:16px; height:16px; margin:0; padding:0; accent-color:var(--category-color); }
.calculation-note { max-width:900px; margin-top:22px; color:var(--muted); font-size:11px; line-height:1.7; }
.step-actions { display:flex; justify-content:space-between; gap:16px; padding-top:22px; }
.goal-presets { margin:0 0 24px; color:var(--muted); font-size:12px; }
.goal-presets select { margin-left:12px; font-size:12px; }
.goal { padding:21px 0; border-top:3px solid var(--gold); --progress-color:var(--green); }
.goal:nth-child(2n) { border-top-color:var(--blue); }
.goal-fields { display:grid; grid-template-columns:minmax(160px,2fr) repeat(3,minmax(95px,1fr)) 32px; align-items:end; gap:14px; }
.goal label { min-width:0; color:var(--muted); font-size:12px; }
.goal input { display:block; width:100%; margin-top:7px; }
.goal progress { display:block; width:100%; height:8px; margin-top:18px; accent-color:var(--green); }
.goal-status { margin:10px 0 0; color:var(--muted); font-size:11px; }
.goal-empty { padding:24px 0; border-top:1px solid #e7ddc5; }
.goal-empty p { color:var(--muted); font-size:12px; }
.table-scroll { overflow-x:auto; margin-bottom:24px; }
table { width:100%; border-collapse:collapse; background:#fff; font-size:12px; white-space:nowrap; }
th,td { padding:12px; border-bottom:1px solid var(--line); text-align:right; }
th { color:var(--muted); font-size:10px; font-weight:550; }
th:first-child,td:first-child { text-align:left; }
td button { margin-left:12px; }
.empty { padding:24px 0; color:var(--muted); font-size:13px; }
.tool-footer { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-top:24px; padding-top:20px; border-top:1px solid var(--line); }
.file-actions { display:flex; flex-wrap:wrap; gap:8px; }
.file-actions .secondary { min-height:34px; font-size:11px; }
#print { border-color:#b9d4c5; background:#eaf4ee; color:var(--green); }
.notice { display:flex; align-items:center; flex-wrap:wrap; gap:12px; min-height:24px; padding-top:12px; color:var(--green); font-size:12px; }
.notice .text-button,.undo-feedback button { font-weight:650; text-decoration:underline; text-underline-offset:3px; }
.undo-feedback { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; padding:10px 0; border-bottom:1px solid var(--line); color:var(--muted); font-size:12px; }

/* Modal surfaces are independent of the application shell. */
dialog { width:min(540px,calc(100% - 32px)); max-height:calc(100dvh - 32px); overflow:auto; padding:26px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--ink); box-shadow:0 24px 80px #14292f26; }
dialog::backdrop { background:#14292f70; }
dialog p { color:var(--muted); font-size:13px; line-height:1.7; }
.dialog-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:22px; }
.dialog-heading h2 { font-size:22px; }
.dialog-heading .remove { flex-shrink:0; }
.entry-dialog { width:min(450px,calc(100% - 32px)); }
.entry-dialog label,.account-dialog label { display:block; margin:16px 0; color:#50675c; font-size:12px; font-weight:550; }
.entry-dialog input,.entry-dialog select { display:block; width:100%; margin-top:7px; padding:11px 12px; font-size:14px; }
.entry-dialog #entry-amount { font-size:22px; font-weight:550; font-variant-numeric:tabular-nums; }
.entry-dialog .chart-note { margin:8px 0 20px; font-size:12px; }
.entry-dialog #entry-error:empty { display:none; }
.entry-dialog #entry-save { width:100%; }
.entry-picker { margin:16px 0; }
.entry-categories { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
.entry-categories button { display:flex; align-items:flex-start; flex-direction:column; gap:7px; min-width:0; min-height:62px; padding:10px; border:1px solid var(--line); border-radius:6px; background:#fff; color:var(--ink); font-size:11px; line-height:1.4; text-align:left; }
.entry-categories button .ui-icon { width:17px; height:17px; color:var(--green); }
.entry-categories button span { max-width:100%; overflow-wrap:anywhere; }
.entry-categories button:hover { border-color:#b0cfbc; background:#edf4ef; }
.entry-categories button[aria-pressed="true"] { border-color:#97c9aa; background:var(--mint); color:#173b34; }
.concept-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; margin:8px 0 16px; }
.concept-options button { min-width:0; min-height:32px; padding:7px 9px; border:1px solid var(--line); border-radius:4px; background:#f7f9f6; color:#50675c; font-size:11px; line-height:1.4; text-align:left; overflow-wrap:anywhere; }
.concept-options button:hover { border-color:#b3cebd; background:#edf4ef; color:var(--green); }
.simulation-bar { margin:20px 0; }
.simulation-bar > div:first-child { display:flex; align-items:baseline; justify-content:space-between; gap:14px; margin-bottom:9px; font-size:12px; }
.simulation-bar strong { text-align:right; overflow-wrap:anywhere; }
.simulation-track { height:12px; overflow:hidden; background:#e3e7e0; border-radius:3px; }
.simulation-track span { display:block; height:100%; }
.account-dialog { width:min(480px,calc(100% - 32px)); }
.account-dialog input { display:block; width:100%; margin-top:7px; padding:12px; font-size:16px; }
.account-dialog form .primary { width:100%; margin-top:12px; }
.account-dialog form .text-button { margin-top:16px; }
.account-dialog .account-legal { margin-top:22px; padding-top:14px; border-top:1px solid var(--line); font-size:11px; }
.account-message { min-height:22px; }
#account-captcha { min-height:65px; max-width:100%; overflow:auto; }
#map-choice > button { width:100%; margin-top:12px; }
#map-choice .text-button { padding:10px 0; text-align:center; }

@media(max-width:1100px) {
  .app-shell { grid-template-columns:184px minmax(0,1fr); }
  .app-sidebar { padding:25px 12px 18px; }
  .app-sidebar .brand { gap:8px; }
  .app-sidebar .brand-name { font-size:16px; }
  .app-sidebar .brand img { width:30px; height:30px; }
  .tabs button { padding:10px; font-size:12px; }
  .app-header { padding-right:24px; padding-left:24px; }
  main { padding-right:24px; padding-left:24px; }
  .page-heading { align-items:flex-start; }
  .page-actions { flex-wrap:wrap; justify-content:flex-end; gap:8px; max-width:245px; }
  .metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .metric { min-height:152px; }
  .visual-summary { grid-template-columns:minmax(0,1.25fr) minmax(260px,1fr); gap:14px; }
  .history-band,.balance-band,.composition-tool,.allocation-band { padding:18px; }
  .history-band .section-title { align-items:flex-start; flex-direction:column; gap:5px; }
  .goal-overview-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .goal-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .goal-fields label:first-child { grid-column:1/-1; }
  .goal-fields > .remove { align-self:end; }
}
@media(max-width:900px) {
  .visual-summary { grid-template-columns:1fr; }
  .history-band,.balance-band { min-height:0; }
  .history-band .section-title { align-items:center; flex-direction:row; gap:14px; }
  .edit-grid { grid-template-columns:1fr; gap:22px; }
  .account-band { align-items:flex-start; flex-direction:column; gap:9px; }
  .account-actions { justify-content:flex-start; }
  .allocation-layout { grid-template-columns:200px minmax(0,1fr); gap:18px; }
  .donut-wrap { width:200px; }
  .calculator-layout { grid-template-columns:1fr; }
  .calculator-inputs { border-right:0; border-bottom:1px solid var(--line); }
  .calculator-result { min-height:0; }
}
@media(max-width:760px) {
  .app-shell { display:block; }
  .skip-link { left:16px; }
  .app-sidebar { position:static; height:auto; min-height:0; padding:16px 16px 0; }
  .app-sidebar .brand { width:fit-content; padding:0; }
  .app-sidebar .brand-name { font-size:15px; }
  .app-sidebar .brand img { width:28px; height:28px; }
  .sidebar-caption,.sidebar-bottom { display:none; }
  .tabs { flex-direction:row; gap:6px; margin-top:15px; padding-bottom:12px; overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:thin; scrollbar-color:#45645a var(--navy); }
  .tabs button { width:auto; min-height:38px; flex:0 0 auto; padding:9px 11px; font-size:12px; }
  .tabs button .ui-icon { width:16px; height:16px; }
  .app-header { min-height:58px; gap:10px; padding:10px 16px; }
  .workspace-location { display:none; }
  #workspace-view { font-size:11px; }
  .local-state { flex:1; gap:5px; max-width:none; font-size:10px; line-height:1.4; }
  .header-end { width:100%; min-width:0; flex-shrink:1; gap:6px; }
  .header-end .primary,.header-end .secondary { padding:7px 9px; font-size:11px; }
  .header-end .icon-button { padding:0; }
  .header-end #account-open { max-width:155px; }
  main { padding:22px 16px 18px; }
  h1 { font-size:24px; }
  .page-heading { flex-direction:column; align-items:stretch; gap:14px; margin-bottom:15px; }
  .page-subtitle { margin-top:6px; font-size:11px; }
  .eyebrow,.panel-kicker { font-size:9px; }
  .page-actions { width:100%; max-width:none; justify-content:space-between; flex-wrap:nowrap; gap:8px; }
  .month-control { gap:0; }
  .month-control input { width:125px; padding:7px 1px; font-size:11px; }
  .month-arrow { width:27px; }
  #quick-add { min-height:38px; padding:8px 10px; gap:5px; font-size:11px; }
  #quick-add .ui-icon { width:15px; height:15px; }
  .account-band { padding:8px 0; margin-bottom:8px; }
  .account-band strong { font-size:11px; }
  .account-band p,#account-session { font-size:10px; }
  .account-actions { gap:8px; }
  .privacy-strip { align-items:flex-start; gap:8px; margin:9px 0 12px; font-size:10px; }
  .privacy-strip .text-button { max-width:130px; text-align:right; }
  .demo-banner,.new-month-banner { flex-wrap:wrap; gap:6px 12px; font-size:11px; }
  .demo-banner span { flex-basis:100%; order:3; }
  [role="tabpanel"] { padding-top:10px; }
  .section-title { align-items:flex-start; flex-direction:column; gap:9px; margin-bottom:18px; }
  .section-title p { margin-top:6px; font-size:11px; }
  .summary-title { gap:5px; margin-bottom:13px; }
  .summary-title h2 { font-size:16px; }
  .summary-title > span { font-size:10px; }
  .start-path { grid-template-columns:1fr; gap:6px; margin-bottom:14px; }
  .start-path button { padding:9px 11px; }
  .metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; margin-bottom:15px; }
  .metric { min-height:156px; padding:14px 12px 11px; }
  .metric-label { align-items:flex-start; gap:6px; min-height:30px; font-size:10px; line-height:1.4; }
  .metric-label .ui-icon { width:14px; height:14px; margin-top:1px; }
  .metric strong { margin:8px 0 7px; font-size:23px; }
  .metric-featured strong { font-size:28px; }
  .metric small,.net-equation { font-size:9px; line-height:1.5; }
  .net-equation { margin-top:6px; }
  .metric-edit { font-size:10px; }
  .visual-summary { gap:13px; margin-bottom:15px; }
  .history-band,.balance-band,.composition-tool,.allocation-band { padding:17px 15px; }
  .history-band .section-title { align-items:flex-start; flex-direction:column; gap:5px; }
  .history-band h3,.balance-band h3,.composition-tool h3,.allocation-band h3 { font-size:13px; }
  .history-svg { height:220px; }
  .history-empty { justify-content:flex-start; gap:12px; min-height:190px; padding:20px 0; }
  .history-empty p { min-width:180px; }
  .history-empty .secondary { margin-left:40px; }
  .balance-highlight { margin-top:20px; }
  .balance-highlight strong { font-size:25px; }
  .debt-overview { margin-top:19px; }
  .composition-tool .section-title,.allocation-band .section-title { flex-direction:row; align-items:center; gap:10px; }
  .composition-tool .section-title h3,.allocation-band .section-title h3 { max-width:175px; }
  .chart-modes button { padding:5px 9px; font-size:10px; }
  .allocation-layout { grid-template-columns:1fr; gap:15px; }
  .donut-wrap { width:224px; }
  .allocation-legend { max-height:none; }
  .allocation-name,.allocation-item strong { font-size:12px; }
  .allocation-share { font-size:11px; }
  .summary-grid { grid-template-columns:1fr; gap:12px; }
  .summary-band { padding-top:19px; }
  .goals-summary { padding:20px 0; }
  .goals-summary .section-title { flex-direction:row; align-items:center; gap:12px; }
  .goals-summary .section-title .text-button { font-size:11px; }
  .goal-overview-grid { grid-template-columns:1fr; gap:12px; }
  .summary-foot,.tool-footer { flex-direction:column; gap:14px; }
  .review-strip { padding:12px 0 14px; margin-bottom:15px; }
  .review-progress { gap:6px; }
  .review-progress button { min-height:38px; padding:8px 9px; }
  .review-next { align-items:flex-start; flex-wrap:wrap; gap:9px; margin-top:11px; }
  .review-next button { flex-shrink:1; max-width:100%; }
  .month-reading { padding:16px 0 18px; margin-bottom:15px; }
  .reading-grid { grid-template-columns:1fr; gap:0; }
  .fact-item { padding:15px 0; border-left:0; border-top:1px solid var(--line); }
  .fact-item:first-child { padding-top:0; border-top:0; }
  .fact-item:last-child { padding-bottom:0; }
  .fact-item > strong { font-size:23px; }
  .calculator-tabs { display:flex; width:100%; margin-bottom:15px; }
  .calculator-tabs button { flex:1; min-width:0; padding:8px 9px; font-size:11px; }
  .calculator-inputs,.calculator-result { padding:20px 17px; }
  .calculator-fields { gap:14px 11px; }
  .calculator-fields input,.calculator-fields select { padding:10px; font-size:16px; }
  .calculator-result h3 + strong { font-size:30px; }
  .calculator-breakdown > div { gap:10px; }
  .calculator-breakdown dt,.calculator-breakdown dd { font-size:11px; }
  .calculator-note { font-size:10px; }
  .editor-dock { gap:10px; padding:10px 12px; }
  .editor-dock span { font-size:10px; }
  .editor-dock strong { font-size:16px; }
  .editor-dock .primary { padding:8px 10px; font-size:11px; }
  .group { padding-top:16px; }
  .group > select { width:100%; min-width:0; }
  .entry { grid-template-columns:minmax(0,1fr) 112px 28px; gap:6px; }
  .entry input { padding:9px 8px; font-size:16px; }
  .entry .remove { width:28px; }
  .column-labels { grid-template-columns:minmax(0,1fr) 146px; }
  .goal-presets select { width:100%; margin:8px 0 0; }
  .goal-fields { gap:12px; }
  .goal input { font-size:16px; }
  .step-actions { align-items:stretch; gap:10px; }
  .step-actions button { flex:1; padding:9px 10px; font-size:11px; }
  .undo-feedback { align-items:flex-start; }
  dialog { padding:22px; }
  .entry-dialog input,.entry-dialog select { font-size:16px; }
  .entry-categories button { padding:9px; font-size:11px; }
  .concept-options button { min-height:36px; }
}
@media(max-width:359px) {
  .app-header { padding-right:12px; padding-left:12px; }
  .header-end #account-open { max-width:130px; }
  .local-state { max-width:125px; }
  main { padding-right:12px; padding-left:12px; }
  .page-actions { flex-wrap:wrap; }
  #quick-add { flex:1; }
  .metric strong { font-size:21px; }
  .metric-featured strong { font-size:25px; }
  .composition-tool .section-title,.allocation-band .section-title { align-items:flex-start; flex-direction:column; }
  .entry { grid-template-columns:minmax(0,1fr) 102px 28px; }
  .column-labels { grid-template-columns:minmax(0,1fr) 136px; }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto !important; transition:none !important; }
}
@media print {
  .app-sidebar,.app-header,.tabs,.account-band,.demo-banner,.privacy-strip,.tool-footer,.page-actions,.month-control,.month-arrow,.notice,.summary-foot a,.text-button,.metric-edit,.chart-modes,.editor-dock,.start-path,.new-month-banner,.step-actions,.storage-warning,.summary-details > summary,.allocation-detail,dialog { display:none !important; }
  .app-shell { display:block; min-height:0; }
  .app-workspace { min-height:0; }
  body { background:#fff; color:var(--ink); font-size:12px; }
  main { max-width:none; padding:0; }
  .page-heading { margin-bottom:18px; }
  #resumen { display:block !important; padding-top:0; }
  #presupuesto,#patrimonio,#objetivos,#historial,#calculadoras,.review-strip { display:none !important; }
  .metrics { grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; break-inside:avoid; }
  .metric { min-height:0; padding:12px; background:#fff !important; border-color:var(--line) !important; color:var(--ink) !important; }
  .metric strong { font-size:20px; }
  .metric-featured strong { font-size:26px; }
  .metric-featured .metric-label,.metric-featured small,.metric-featured .net-equation { color:var(--muted) !important; }
  .metric-featured .negative { color:var(--red) !important; }
  .visual-summary { grid-template-columns:minmax(0,1.5fr) minmax(0,1fr); break-inside:avoid; }
  .history-band,.balance-band,.composition-tool,.allocation-band { min-height:0; padding:15px; break-inside:avoid; }
  #history-chart { min-height:0; }
  .history-svg { height:180px; }
  .summary-details .summary-grid { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)); break-inside:avoid; }
  .allocation-layout { grid-template-columns:180px minmax(0,1fr); }
  .donut-wrap { width:180px; }
  .allocation-legend { max-height:none; overflow:visible; }
  .goal-overview-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .goal-overview-card { break-inside:avoid; }
  .summary-foot { display:block; }
  .reading-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .fact-item { padding:0 14px; border-top:0; border-left:1px solid var(--line); break-inside:avoid; }
  .fact-item:first-child { padding-left:0; border-left:0; }
  .fact-item > strong { font-size:20px; }
}
