:root {
  color-scheme:light;
  --navy:#163e35;
  --navy2:#205244;
  --mint:#d7f4e6;
  --green:#176c54;
  --line:#e2e9ed;
  --bg:#f8fafc;
  --ink:#243e39;
  --accent:var(--green);
  --muted:#60736d;
  --blue:#426fc0;
  --gold:#b88628;
  --pink:#c45268;
  --red:#b4425d;
  --shadow:0 2px 4px #173e3504,0 10px 28px #173e3507;
}
* { 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,box-shadow .15s ease; }
button:disabled { opacity:.55; cursor:default; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible { outline:3px solid var(--blue); 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.3; 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:0; overflow-y:auto; 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 #bccbd1; border-radius:5px; color:var(--ink); background:#fff; transition:border-color .15s ease,box-shadow .15s ease; }
input:hover,select:hover,textarea:hover { border-color:#8da6b0; }
input:focus,select:focus,textarea:focus { border-color:var(--blue); box-shadow:0 0 0 3px #426fc00c; }
input[aria-invalid="true"],textarea[aria-invalid="true"] { border-color:var(--red); }
.primary,.secondary { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:40px; padding:9px 14px; border:1px solid var(--line); border-radius:6px; font-size:12px; font-weight:600; 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:#b8cbd4; background:#f1f6fb; }
.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; }
.carried-month-banner { padding:14px 0; color:var(--ink); }
.carried-month-banner strong { font-size:13px; }
.carried-month-banner p { margin:5px 0 0; color:var(--muted); max-width:640px; line-height:1.5; }
.carried-month-actions { display:flex; align-items:center; gap:12px; flex-wrap:wrap; flex-shrink:0; }
.history-pending { display:block; margin-top:4px; font-size:11px; color:var(--muted); }
.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; }

/* Account-first entry and optional newsletter. */
.personal-next-step { display:flex; align-items:center; gap:14px; margin:18px 0 8px; padding:16px 0; border-top:1px solid #d8e4f2; border-bottom:1px solid #d8e4f2; }
.personal-next-step > span { display:grid; place-items:center; flex-shrink:0; width:40px; height:40px; border-radius:6px; background:#eaf0fb; color:var(--blue); }
.personal-next-step > div { flex:1; min-width:0; }
.personal-next-step .panel-kicker { display:block; margin-bottom:3px; color:var(--blue); }
.personal-next-step strong { display:block; font-size:14px; font-weight:550; white-space:pre-wrap; overflow-wrap:anywhere; }
.personal-next-step p { margin:4px 0 0; color:var(--muted); font-size:11px; }
.personal-next-step p:empty { display:none; }
.personal-next-step[data-done="true"] > span { background:#e4f3eb; color:var(--green); }
.personal-next-step .text-button { flex-shrink:0; }
.personal-plan-layout { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(240px,.8fr); gap:56px; padding:12px 0 26px; }
.personal-plan-form { min-width:0; }
.personal-plan-form > label { display:flex; flex-direction:column; gap:9px; margin-bottom:24px; font-size:14px; font-weight:550; }
.personal-plan-form input,.personal-plan-form textarea { width:100%; font-size:14px; font-weight:400; line-height:1.65; background:#fff; }
.personal-plan-form textarea { resize:vertical; min-height:88px; }
.personal-plan-form input::placeholder,.personal-plan-form textarea::placeholder { color:#5d7168; opacity:1; }
.personal-plan-bottom { display:flex; align-items:center; gap:24px; flex-wrap:wrap; }
.personal-plan-bottom > label:first-child { display:flex; flex-direction:column; gap:9px; font-size:13px; font-weight:550; }
.personal-plan-bottom input[type="date"] { width:190px; }
.personal-step-check { display:flex; align-items:center; gap:10px; padding-top:25px; font-size:13px; }
.personal-step-check input { width:22px; height:22px; flex-shrink:0; accent-color:var(--green); }
.personal-step-check:has(input:disabled) { color:var(--muted); }
.personal-plan-form .chart-note { min-height:20px; margin-top:16px; }
.personal-plan-aside { min-width:0; padding:6px 0 0 30px; border-left:1px solid var(--line); }
.plan-note-icon { display:grid; place-items:center; width:44px; height:44px; margin-bottom:22px; border-radius:6px; background:#eaf0fb; color:var(--blue); }
.plan-note-icon .ui-icon { width:23px; height:23px; }
.personal-plan-aside h2 { max-width:310px; font-size:20px; line-height:1.45; }
.personal-plan-aside > p { margin:12px 0 0; color:var(--muted); font-size:13px; line-height:1.8; }
.personal-plan-preview { margin:28px 0; padding:18px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.personal-plan-preview p { margin:7px 0 0; font-size:14px; white-space:pre-wrap; overflow-wrap:anywhere; }
.personal-plan-aside > .chart-note { font-size:11px; }
.personal-plan-aside > a { display:inline-flex; margin-top:18px; min-height:40px; align-items:center; }
.account-settings-layout { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:40px; padding:28px 0 18px; }
.account-setting { min-width:0; }
.account-setting h2 { margin:15px 0 10px; font-size:17px; }
.account-setting p { max-width:460px; color:var(--muted); font-size:13px; line-height:1.8; }
.account-setting > a { display:inline-flex; align-items:center; min-height:40px; font-size:12px; }
.account-setting-icon { display:grid; place-items:center; width:40px; height:40px; background:#e4f3eb; color:var(--green); border-radius:6px; }
.account-setting:nth-child(2) .account-setting-icon { background:#f9efd9; color:#936b1d; }
.account-setting .chart-note { font-size:11px; }
.editor-position { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); gap:22px; margin:0 0 24px; padding:16px 0 20px; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.editor-position > div { display:block; min-width:0; padding:0 18px 0 0; border-right:1px solid var(--line); border-bottom:0; }
.editor-position > div:last-child { border-right:0; padding-right:0; }
.editor-position dt { color:var(--muted); font-size:12px; }
.editor-position dd { margin:7px 0 0; font-size:20px; font-weight:650; font-variant-numeric:tabular-nums; white-space:nowrap; overflow-wrap:normal; word-break:normal; }
.editor-position > div:last-child dd { color:var(--green); }
.history-timeline-tool { margin-bottom:24px; }
.history-timeline-tool h3 { margin-bottom:10px; }
#cuenta .account-band { padding:14px 0 20px; border-top:0; }
#cuenta .account-band strong { font-size:15px; }
#cuenta .account-band p,#cuenta #account-session { margin-top:7px; font-size:12px; }
#map-workspace[data-view="plan"] .new-month-banner,#map-workspace[data-view="cuenta"] .new-month-banner { display:none; }
@media(max-width:1000px) {
  .personal-plan-layout { gap:30px; grid-template-columns:minmax(0,1.1fr) minmax(200px,.8fr); }
  .personal-plan-aside { padding-left:24px; }
  .account-settings-layout { gap:26px; }
}
@media(max-width:760px) {
  .personal-plan-layout,.account-settings-layout { grid-template-columns:minmax(0,1fr); gap:26px; }
  .personal-plan-aside { padding:24px 0 0; border-left:0; border-top:1px solid var(--line); }
  .personal-plan-form input,.personal-plan-form textarea { font-size:16px; }
  .personal-plan-form > label { margin-bottom:20px; }
  .personal-plan-bottom { gap:14px; }
  .personal-step-check { padding-top:0; min-height:44px; }
  .personal-next-step { align-items:flex-start; flex-wrap:wrap; gap:10px; }
  .personal-next-step > div { flex-basis:calc(100% - 54px); }
  .personal-next-step .text-button { margin-left:50px; }
  .account-setting + .account-setting { padding-top:24px; border-top:1px solid var(--line); }
  .account-settings-layout { padding-top:20px; }
  .editor-position { grid-template-columns:minmax(0,1fr); gap:12px; margin-bottom:18px; }
  .editor-position > div { padding:0 0 12px; border-right:0; border-bottom:1px solid var(--line); }
  .editor-position > div:last-child { padding-bottom:0; border-bottom:0; }
  .editor-position dt { font-size:11px; }
  .editor-position dd { font-size:16px; }
}
.access-view .sidebar-caption,.access-view .sidebar-summary,.access-view .tabs { display:none; }
.access-view .header-end { justify-content:flex-end; }
.map-access { max-width:760px; margin:22px 0 32px; }
.map-access h1 { font-size:26px; }
.access-intro { max-width:590px; margin:12px 0 22px; color:var(--muted); font-size:14px; line-height:1.7; }
.access-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.access-actions .primary,.access-actions .secondary { min-height:42px; padding:10px 16px; font-size:13px; }
.access-detail { max-width:590px; margin:13px 0 0; color:var(--muted); font-size:11px; line-height:1.7; }
.access-status { min-height:22px; margin:8px 0 0; color:var(--muted); font-size:12px; line-height:1.6; }
.access-status:empty { min-height:0; margin:0; }
.access-example { display:flex; align-items:center; flex-wrap:wrap; gap:8px 14px; margin-top:16px; }
.access-example .text-button { display:inline-flex; align-items:center; gap:7px; min-height:38px; font-size:12px; }
.access-example > span { color:var(--muted); font-size:11px; }
.access-local { margin-top:20px; padding:12px 0 12px 16px; border-left:3px solid var(--green); }
.access-local strong { display:block; font-size:13px; font-weight:600; }
.access-local p { margin:5px 0 11px; color:var(--muted); font-size:12px; line-height:1.6; }
.access-local .secondary { min-height:40px; }
.access-topics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:22px; margin-top:30px; padding-top:22px; border-top:1px solid var(--line); }
.access-topics > div { display:flex; align-items:center; gap:10px; min-width:0; }
.access-topics [data-access-icon] { display:block; flex-shrink:0; color:var(--green); }
.access-topics > div:nth-child(2) [data-access-icon] { color:var(--blue); }
.access-topics > div:nth-child(3) [data-access-icon] { color:var(--gold); }
.access-topics .ui-icon { width:22px; height:22px; }
.access-topics h2 { margin:0; font-size:14px; font-weight:550; line-height:1.5; }
.access-privacy { max-width:650px; margin:22px 0 0; color:var(--muted); font-size:11px; line-height:1.75; }
.map-newsletter { display:grid; grid-template-columns:minmax(0,.95fr) minmax(0,1.2fr); gap:36px; margin-top:28px; padding:24px 0; border-top:1px solid var(--line); }
.map-newsletter > div,.map-newsletter form { min-width:0; }
.map-newsletter h2 { font-size:17px; line-height:1.4; }
.map-newsletter > div > p:not(.panel-kicker) { max-width:470px; margin:9px 0 0; color:var(--muted); font-size:12px; line-height:1.7; }
.map-newsletter > div > .chart-note { font-size:11px; overflow-wrap:anywhere; }
.newsletter-consent { display:flex; align-items:flex-start; gap:10px; color:var(--ink); font-size:12px; line-height:1.7; }
.newsletter-consent input[type="checkbox"] { width:24px; height:24px; flex:0 0 24px; margin:0; padding:0; accent-color:var(--green); }
.newsletter-consent > span { min-width:0; padding-top:1px; overflow-wrap:anywhere; }
.newsletter-actions { display:flex; align-items:center; flex-wrap:wrap; gap:14px; margin-top:14px; }
.newsletter-actions .primary { min-height:40px; }
.newsletter-actions .text-button { min-height:38px; padding:8px 0; }
#map-newsletter-captcha { min-height:65px; max-width:100%; margin-top:13px; overflow:auto; }
#map-newsletter-status { min-height:18px; overflow-wrap:anywhere; }
#map-newsletter-status:empty { min-height:0; margin:0; }

/* 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; box-shadow:var(--shadow); }
.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:11px; line-height:1.55; }
.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:32px; }
.metric-featured small,.metric-featured .metric-edit { color:#b6d0c4; }
.metric-featured .negative { color:#ffb8c6 !important; }
.net-equation { display:block; margin:8px 0 0; color:#c5ddd1; font-size:11px; line-height:1.55; 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,.wealth-tool { min-width:0; padding:20px; border:1px solid var(--line); border-radius:8px; background:#fff; box-shadow:var(--shadow); }
.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-area { pointer-events:none; opacity:.8; transition:opacity .2s ease; }
.history-line { stroke-linecap:round; stroke-linejoin:round; transition:stroke-width .2s ease,opacity .2s ease; }
.history-svg circle[data-series] { transition:r .2s ease,stroke-width .2s ease; }
.history-cursor { pointer-events:none; }
.history-selection { margin-top:12px; padding-top:14px; border-top:1px solid var(--line); }
.history-month-control { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:12px; font-size:11px; }
.history-month-control > span { color:var(--muted); }
.history-month-control > strong { min-width:0; font-size:11px; font-weight:600; text-align:right; }
.history-month-control input[type="range"] { display:block; width:100%; height:28px; min-width:0; margin:0; padding:0; border:0; border-radius:0; background:transparent; accent-color:var(--green); cursor:pointer; box-shadow:none; }
.history-snapshot { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin:13px 0 0; }
.history-snapshot > div { display:grid; gap:5px; min-width:0; padding:0; border:0; }
.history-snapshot dt { display:flex; align-items:center; gap:6px; min-width:0; font-size:11px; line-height:1.5; }
.history-snapshot .swatch { display:block; width:8px; height:8px; flex:0 0 8px; border-radius:2px; }
.history-snapshot dd { font-size:13px; line-height:1.45; font-weight:600; overflow-wrap:anywhere; }
@media(hover:hover) {
  .history-svg:hover .history-area { opacity:1; }
  .history-svg .history-line:hover { stroke-width:4; }
  .history-svg circle[data-series]:hover { r:5px; stroke-width:3; }
}
.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:11px; line-height:1.65; }
.composition-tool,.allocation-band { margin-bottom:18px; }
.wealth-tools { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-bottom:18px; }
.wealth-tools > .allocation-band { margin:0; }
.wealth-position { min-width:0; container-type:inline-size; }
.wealth-tool h3 { margin:0; font-size:14px; }
.wealth-tool > .section-title { margin-bottom:16px; }
.wealth-tool .section-title p { margin-top:6px; font-size:12px; }
.wealth-layout { display:grid; grid-template-columns:224px minmax(0,1fr); align-items:center; gap:24px; min-width:0; min-height:224px; margin-top:16px; }
.wealth-donut { position:relative; justify-self:center; width:224px; max-width:100%; aspect-ratio:1; }
.wealth-donut > svg { display:block; width:100%; height:100%; overflow:visible; filter:drop-shadow(0 3px 7px #163e350b); }
.wealth-center { position:absolute; inset:24% 15%; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; min-width:0; text-align:center; pointer-events:none; }
.wealth-center span,.wealth-center p { max-width:100%; margin:0; color:var(--muted); font-size:11px; line-height:1.45; overflow-wrap:anywhere; }
.wealth-center strong { max-width:100%; color:var(--green); font-size:21px; line-height:1.25; font-weight:650; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.wealth-position[data-state="deficit"] .wealth-center strong { color:var(--pink); }
.wealth-position[data-state="partial"] .wealth-center strong,.wealth-position[data-state="empty"] .wealth-center strong { color:var(--muted); font-size:18px; }
.wealth-legend { display:grid; align-content:center; gap:3px; min-width:0; }
.wealth-legend > .wealth-note { margin:0 0 7px; }
.wealth-row { display:grid; grid-template-columns:9px minmax(0,1fr) minmax(0,auto); align-items:center; gap:9px; min-width:0; padding:12px 0; border-bottom:1px solid var(--line); }
.wealth-row:last-child { border-bottom:0; }
.wealth-swatch { display:block; width:9px; height:9px; border-radius:2px; }
.wealth-label,.wealth-row > span:not(.wealth-swatch) { min-width:0; font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.wealth-amount { min-width:0; max-width:130px; font-size:13px; font-weight:600; line-height:1.45; font-variant-numeric:tabular-nums; text-align:right; overflow-wrap:anywhere; }
.wealth-note { margin:14px 0 0; color:var(--muted); font-size:11px; line-height:1.65; overflow-wrap:anywhere; }
.wealth-empty { margin:0 0 10px; color:var(--muted); font-size:12px; line-height:1.65; }
@container(max-width:430px) {
  .wealth-layout { grid-template-columns:minmax(0,1fr); gap:14px; }
  .wealth-legend { width:100%; }
}
.chart-modes { display:flex; flex-shrink:0; padding:3px; border-radius:5px; background:#f0f4f8; }
.chart-modes button { min-height:32px; padding:6px 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; }
.results-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:22px 0 14px; }
.results-heading h3 { margin:0; font-size:15px; }
.results-modes button { display:flex; align-items:center; gap:6px; min-height:38px; font-size:12px; }
.monthly-flow { padding:24px; border:1px solid var(--line); border-radius:8px; background:#fff; margin-bottom:18px; box-shadow:0 8px 24px #14292f06; }
.flow-heading { margin-bottom:20px; }
.flow-heading .panel-kicker { margin:0 0 7px; }
.flow-heading h3 { margin:0; font-size:20px; }
.flow-heading button { display:flex; align-items:center; gap:8px; }
.flow-figures { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); margin:0; padding:16px 0; border-block:1px solid var(--line); }
.flow-figures > div { display:block; padding:0 20px; border:0; border-left:1px solid var(--line); }
.flow-figures > div:first-child { padding-left:0; border:0; }
.flow-figures dt { font-size:12px; color:var(--muted); margin-bottom:7px; }
.flow-figures dd { font-size:25px; font-weight:650; margin:0; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.flow-figures [data-kind="income"] dd { color:#23846c; }
.flow-figures [data-kind="expense"] dd { color:#b94d60; }
.flow-figures [data-kind="balance"] dd { color:#426fc0; }
.flow-figures [data-kind="gap"] dd { color:#93611f; }
.flow-note { font-size:12px; color:var(--muted); margin:14px 0 0; line-height:1.7; max-width:900px; }
.flow-chart { min-width:0; }
.flow-svg { display:block; width:100%; height:auto; overflow:visible; }
.flow-node { cursor:pointer; outline:none; }
.flow-node-name { font-size:12px; font-weight:650; }
.flow-node-value { font-size:11px; fill:#647681; font-variant-numeric:tabular-nums; }
.flow-node .flow-hit { stroke:transparent; stroke-width:2; rx:4px; }
.flow-node:hover .flow-hit,.flow-node[aria-pressed="true"] .flow-hit { stroke:#506c8066; }
.flow-node:focus-visible .flow-hit { stroke:#14292f; stroke-dasharray:3 3; }
.flow-ribbon { transition:stroke-opacity .15s; }
.flow-detail { border-top:1px solid var(--line); padding:18px 0 12px; }
.flow-detail-heading { display:flex; align-items:center; gap:12px; margin-bottom:12px; }
.flow-detail-heading h4 { margin:0; font-size:15px; overflow-wrap:anywhere; }
.flow-detail-heading strong { margin-left:auto; white-space:nowrap; font-size:15px; }
.flow-detail-heading .remove { flex-shrink:0; }
.flow-data-row { position:relative; width:100%; display:grid; grid-template-columns:minmax(0,1fr) auto 48px 18px; align-items:center; gap:10px; padding:13px 0 18px; background:transparent; border:0; border-bottom:1px solid #eef1f3; border-radius:0; text-align:left; font-size:12px; }
.flow-row-name { overflow-wrap:anywhere; }
.flow-data-row strong { font-size:12px; white-space:nowrap; font-variant-numeric:tabular-nums; }
.flow-data-row small { font-size:11px; text-align:right; color:var(--muted); }
.flow-data-row .ui-icon { width:14px; height:14px; color:var(--muted); }
.flow-row-track { position:absolute; height:3px; bottom:8px; left:0; right:0; background:#eef2f5; border-radius:2px; overflow:hidden; }
.flow-row-track span { display:block; height:100%; background:#ce6474; }
.flow-data-row[data-kind="income"] .flow-row-track span { background:#23846c; }
.flow-breakdown { padding-top:18px; border-top:1px solid var(--line); }
.flow-breakdown > summary { font-size:12px; font-weight:650; cursor:pointer; padding:7px 0; }
.flow-data-columns { display:grid; grid-template-columns:1fr 1fr; gap:36px; padding-top:12px; }
.flow-data-columns h4 { margin:0 0 5px; font-size:14px; }
.flow-data-columns .chart-note { font-size:11px; margin:0 0 8px; }
.flow-empty { padding:40px 16px; text-align:center; color:var(--muted); }
.flow-empty > .ui-icon { width:34px; height:34px; color:#426fc0; }
.flow-empty h4 { color:var(--ink); margin:12px 0 8px; font-size:18px; }
.flow-empty p { margin:0 auto 18px; max-width:470px; font-size:13px; }
.flow-empty button { display:inline-flex; align-items:center; gap:6px; }
@media(max-width:760px) {
  .results-heading { gap:10px; flex-wrap:wrap; }
  .results-heading h3 { font-size:13px; }
  .results-modes button { min-height:44px; }
  .monthly-flow { padding:18px 14px; }
  .flow-heading { gap:12px; align-items:flex-start; }
  .flow-heading h3 { font-size:17px; }
  .flow-heading button { font-size:11px; padding:7px 9px; max-width:130px; }
  .flow-figures > div { padding:0 8px; }
  .flow-figures dt { font-size:10px; }
  .flow-figures dd { font-size:17px; }
  .flow-data-columns { grid-template-columns:1fr; gap:24px; }
  .flow-data-row { grid-template-columns:minmax(0,1fr) auto 38px 14px; gap:7px; }
  .flow-note { font-size:11px; }
}
.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; box-shadow:var(--shadow); --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:#edf3f8; }
.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:#c8d6e8; background:#fff; color:var(--blue); box-shadow:0 1px 4px #223e3910; }
.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; box-shadow:var(--shadow); }
.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:#f8fbfd; }
.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(--ink); font-size:15px; }
.group-heading h3 .ui-icon { color:var(--category-color,var(--green)); }
.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(--ink); 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; }
thead { background:#f3f7fa; }
tbody tr:hover { background:#f5f9fd; }
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:36px; padding:8px 9px; border:1px solid var(--line); border-radius:4px; background:#f8fafc; 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,.wealth-tool { padding:18px; }
  .wealth-tools { grid-template-columns:minmax(0,1fr); }
  .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) {
  .map-newsletter { grid-template-columns:1fr; gap:20px; }
  .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; }
  .access-view .app-sidebar { padding-bottom:15px; }
  .access-view .sidebar-bottom { display:block; margin-top:0; padding:12px 0 0; }
  .access-view .sidebar-links { flex-direction:row; flex-wrap:wrap; gap:8px 18px; padding:0; }
  .access-view .sidebar-signature { 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; }
  .map-access { margin:6px 0 24px; }
  .map-access h1 { font-size:26px; }
  .access-intro { margin:10px 0 19px; font-size:13px; }
  .access-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; gap:9px; }
  .access-actions .primary,.access-actions .secondary { min-height:44px; padding:10px 9px; font-size:12px; }
  .access-detail { margin-top:12px; }
  .access-example { flex-direction:column; align-items:flex-start; gap:0; margin-top:13px; }
  .access-local { margin-top:18px; padding-left:13px; }
  .access-topics { gap:12px; margin-top:24px; padding-top:20px; }
  .access-topics > div { flex-direction:column; align-items:flex-start; gap:8px; }
  .access-topics h2 { font-size:12px; }
  .access-privacy { margin-top:20px; }
  .map-newsletter { gap:17px; margin-top:22px; padding:20px 0; }
  .map-newsletter h2 { font-size:16px; }
  .newsletter-consent { font-size:11px; }
  .newsletter-actions { gap:16px; }
  .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; white-space:nowrap; flex-shrink:0; }
  #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:11px; line-height:1.55; }
  .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,.wealth-tool { padding:17px 15px; }
  .wealth-tools { gap:13px; margin-bottom: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:11px; }
  .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:44px; }
  .primary,.secondary,.account-actions .primary,.account-actions .secondary,.header-end .primary,.header-end .secondary,.storage-warning .secondary,.file-actions .secondary,.editor-dock .primary,.newsletter-actions .primary,.review-next .secondary { min-height:44px; }
  .icon-button,.header-end .icon-button { width:44px; height:44px; padding:0; }
  .tabs button,.calculator-tabs button,.chart-modes button,.review-progress button { min-height:44px; }
  .month-arrow { width:44px; height:44px; }
  .metric { min-height:176px; }
  .metric-label { font-size:11px; }
  .metric-edit { min-height:44px; padding-top:10px; }
  .text-button,.account-actions .text-button,.privacy-strip .text-button,.review-next .text-button { min-height:44px; display:inline-flex; align-items:center; }
  .entry { grid-template-columns:minmax(0,1fr) 112px 44px; }
  .entry .remove,.add-concept { width:44px; height:44px; }
  .no-balance { min-height:44px; }
  .history-month-control { grid-template-columns:minmax(0,1fr) auto; gap:5px 10px; }
  .history-month-control > strong { grid-column:2; grid-row:1; }
  .history-month-control input[type="range"] { grid-column:1/-1; grid-row:2; height:40px; }
  .history-snapshot { gap:11px; }
  .history-snapshot dd { font-size:12px; }
}
@media(max-width:430px) {
  .history-snapshot { grid-template-columns:minmax(0,1fr); gap:0; margin-top:5px; }
  .history-snapshot > div { display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding:8px 0; border-bottom:1px solid var(--line); }
  .history-snapshot > div:last-child { border-bottom:0; }
  .history-snapshot dd { max-width:55%; text-align:right; }
  .wealth-center strong { font-size:20px; }
  .wealth-row { padding:10px 0; }
}
@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 0 100%; }
  .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 44px; }
  .column-labels { grid-template-columns:minmax(0,1fr) 136px; }
}
.access-first-step { margin:24px 0 0; }
.demo-banner { align-items:flex-end; flex-wrap:wrap; }
.demo-context { flex:1 1 340px; min-width:0; }
.demo-context p { max-width:780px; margin:7px 0 0; font-size:12px; line-height:1.6; }
.demo-context a { display:inline-block; margin-top:6px; font-size:11px; }
.example-picker { display:grid; flex:0 1 290px; min-width:0; max-width:100%; gap:7px; font-size:11px; }
.example-picker select { width:100%; max-width:100%; min-height:44px; font-size:12px; }
.metric-featured[data-pending="true"] > strong { font-size:21px; line-height:1.25; }
.access-first-step > p { margin:10px 0 0; color:var(--muted); font-size:12px; }
.access-first-step:has(button[hidden]) { display:none; }
.quick-start-panel { max-width:920px; margin-top:22px; padding:24px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.quick-start-panel h2 { margin:0 0 18px; font-size:21px; }
.quick-start-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.quick-start-fields label { display:grid; gap:9px; align-content:start; color:var(--ink); font-size:12px; }
.quick-start-fields input { min-width:0; width:100%; }
.quick-start-actions { display:flex; align-items:center; flex-wrap:wrap; gap:12px; }
#quick-start-error:empty { margin:0; }
.local-account-nudge { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px; padding:18px 0; border-bottom:1px solid var(--line); }
.local-account-nudge strong { font-size:14px; }
.local-account-nudge p { max-width:650px; margin:6px 0 0; color:var(--muted); font-size:12px; }
.results-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:12px; }
.monthly-card-dialog { width:min(560px,calc(100% - 24px)); max-height:calc(100svh - 24px); padding:24px; overflow-y:auto; }
.monthly-card-dialog h2 { margin:0; font-size:23px; }
.monthly-card-privacy { display:flex; align-items:center; gap:10px; margin:20px 0 16px; font-size:13px; }
.monthly-card-privacy input { width:20px; height:20px; min-height:20px; margin:0; accent-color:var(--green); }
#monthly-card-canvas { display:block; width:100%; height:auto; aspect-ratio:4/5; border:1px solid var(--line); border-radius:6px; }
.monthly-card-dialog > .primary { width:100%; }
@media(max-width:760px) {
  .example-picker { flex-basis:100%; }
  .example-picker select { font-size:16px; }
  .quick-start-fields { grid-template-columns:minmax(0,1fr); gap:16px; }
  .quick-start-fields input { font-size:16px; }
  .results-heading { align-items:flex-start; flex-direction:column; }
  .results-actions { justify-content:flex-start; width:100%; }
  .monthly-card-dialog { padding:20px; }
}
@media print {
  .local-account-nudge,.results-actions #monthly-card-open { display:none !important; }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto !important; transition:none !important; animation:none !important; }
}
@media print {
  .map-access,.map-newsletter { display:none !important; }
  .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,#plan,#cuenta,.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,.wealth-tool { min-height:0; padding:15px; break-inside:avoid; box-shadow:none; }
  .wealth-tools { grid-template-columns:repeat(2,minmax(0,1fr)); break-inside:avoid; }
  .wealth-layout { grid-template-columns:minmax(0,1fr); }
  .wealth-donut { width:180px; }
  .history-selection { display:none; }
  #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; }
}
