:root {
  --ink: #173b32;
  --green: #24745b;
  --green-dark: #16483b;
  --green-soft: #e5f1ea;
  --gold: #bd8d3d;
  --red: #b65549;
  --line: #d8e2dc;
  --muted: #718078;
  --cream: #fafaf6;
  --shadow: 0 14px 42px rgba(25, 60, 49, .07);
  --control-hover-border: #73a08d;
  --control-hover-bg: #fbfdfc;
  --control-hover-ring: 0 0 0 3px rgba(36, 116, 91, .08);
}

* { box-sizing: border-box; }
#setDefault { display: none !important; }
html { scroll-behavior: smooth; }
html[data-text-size="compact"] body { font-size: 13px; }
html[data-text-size="large"] body { font-size: 16px; }
body {
  margin: 0;
  background: radial-gradient(circle at 80% 9%, #edf2e8 0, transparent 25%), var(--cream);
  color: var(--ink);
  font: 14px "Segoe UI", Arial, sans-serif;
  -webkit-user-select: none;
  user-select: none;
}
input, textarea, [contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}
.about-dialog, .about-dialog *,
.report-dialog, .report-dialog *,
.welcome-dialog, .welcome-dialog * {
  -webkit-user-select: none;
  user-select: none;
}
.welcome-dialog input,
.welcome-dialog textarea,
.welcome-dialog [contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}
button, input, select { font: inherit; color: inherit; }
select:not([multiple]):not(:disabled) { cursor: pointer; }
button { cursor: pointer; }
button:not(:disabled):not(.dialog-close) {
  transition: transform .1s ease, box-shadow .1s ease, filter .1s ease, background-color .1s ease;
}
button:not(:disabled):not(.dialog-close):hover {
  transform: translateY(-1px);
  filter: brightness(.99);
  box-shadow: 0 4px 10px rgba(23, 59, 50, .12);
}
button:not(:disabled):not(.dialog-close):active {
  transform: translateY(0) scale(.995);
  box-shadow: inset 0 1px 2px rgba(17, 51, 42, .16);
  filter: brightness(.97);
}
select:not(:disabled), details > summary {
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
select:not(:disabled):hover, details > summary:hover {
  border-color: var(--control-hover-border);
  background-color: var(--control-hover-bg);
  box-shadow: var(--control-hover-ring);
}
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, .chart:focus-visible {
  outline: 3px solid rgba(36, 116, 91, .28);
  outline-offset: 3px;
}

.topbar {
  height: 76px;
  min-width: 430px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  align-self: stretch;
  border-bottom: 1px solid var(--line);
}
.topbar nav {
  width: 100%;
  height: 100%;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 3.5vw, 60px);
}
.topbar nav button {
  border: 0;
  background: none;
  color: #68766f;
  position: relative;
  font-weight: 650;
}
.topbar .nav-utilities{display:flex;align-items:center;gap:inherit}
.topbar nav .user-options-menu > summary { position: relative; min-height: 0; padding: 2px 6px; border: 0; border-radius: 0; background: none; color: #68766f; font-size: inherit; font-weight: 650; white-space: nowrap; }
.topbar nav .user-options-menu > summary::after { content: ""; position: absolute; inset: -5px 0; }
.topbar nav .user-options-menu[open] > summary { color: var(--ink); background: none; }
.topbar nav .user-options-menu[open] > summary::before { position: absolute; right: 0; bottom: 0; left: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--green); content: ""; }
.topbar nav button[data-tab] { transition: color .18s ease, transform .1s ease, box-shadow .1s ease, filter .1s ease; }
.topbar nav button[data-tab]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--green);
  opacity: 0;
  transform: scaleX(.25);
  transform-origin: center;
  transition: opacity .18s ease, transform .22s cubic-bezier(.2,.8,.2,1);
}
.topbar nav button.nav-active { color: var(--ink); }
.topbar nav:has(.user-options-menu[open]) button.nav-active { color:#68766f; }
.topbar nav:has(.user-options-menu[open]) button.nav-active::after { display:none; }
.topbar nav button.nav-active::after {
  opacity: 1;
  transform: scaleX(1);
}
.saved {
  border: 1px solid #bfd8ca;
  border-radius: 999px;
  background: var(--green-soft);
  padding: 8px 12px;
  font-size: 11px;
  color: #4f7565;
  box-shadow: 0 4px 12px rgba(36,116,91,.08);
  transition: color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.saved.unsaved { border-color: #d7aaa3; background: #fff1ee; color: #96372e; box-shadow: 0 5px 14px rgba(143,48,38,.12); }
.saved.status-updated { animation: saved-status-refresh .5s ease; }
@keyframes saved-status-refresh {
  0% { transform: scale(.96); opacity: .65; }
  55% { transform: scale(1.025); }
  100% { transform: scale(1); opacity: 1; }
}

.page-shell { max-width: 1500px; margin: auto; padding: 48px 3vw 36px; }
.intro { margin-bottom: 28px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.intro-masthead { display: flex; flex: 1 1 auto; min-width: 0; align-items: center; gap: 28px; }
.intro-copy { flex: 1 1 auto; min-width: 0; }
.masthead-logo-frame {
  position: relative;
  flex: 0 0 auto;
  padding: 2px 16px 2px 18px;
  border: 1px solid rgba(36, 116, 91, .14);
  border-radius: 24px 9px 24px 9px;
  background:
    radial-gradient(circle at 18% 50%, rgba(229, 241, 234, .95), transparent 56%),
    linear-gradient(135deg, rgba(255, 255, 252, .98), rgba(245, 248, 241, .88));
  box-shadow: 0 12px 30px rgba(23, 59, 50, .09), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.masthead-logo-frame::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 17%;
  bottom: 17%;
  width: 4px;
  border-radius: 0 5px 5px 0;
  background: linear-gradient(180deg, rgba(189, 141, 61, .28), var(--gold) 48%, var(--green));
  box-shadow: 0 0 14px rgba(189, 141, 61, .2);
}
.masthead-logo-frame::after {
  content: "";
  position: absolute;
  right: 13px;
  bottom: 8px;
  width: 38px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(189, 141, 61, .72));
}
.masthead-logo {
  display: block;
  width: 300px;
  height: 88px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 3px 5px rgba(23, 59, 50, .08));
}
.eyebrow { font-size: 10px; letter-spacing: 2.4px; font-weight: 800; color: #74857d; margin: 0 0 12px; }
.intro h1 { font: 500 clamp(42px, 4.7vw, 72px)/1 Georgia, serif; letter-spacing: -2px; margin: 0 0 17px; }
.intro .tagline-lead { font-weight: 650; color: var(--ink); text-shadow: 0 2px 18px rgba(23, 59, 50, .08); }
.intro .tagline-bridge { font-weight: 400; color: #49665d; }
.intro em {
  position: relative;
  display: inline-block;
  color: var(--green);
  font-weight: 600;
  letter-spacing: -1.5px;
  text-shadow: 0 2px 18px rgba(36, 116, 91, .14);
}
.intro em::after {
  content: "";
  position: absolute;
  left: 3%;
  right: -3%;
  bottom: -8px;
  height: 5px;
  border-radius: 100% 0 100% 0;
  background: linear-gradient(90deg, rgba(189, 141, 61, .2), var(--gold) 32%, rgba(36, 116, 91, .72));
  transform: rotate(-1.3deg) skewX(-18deg);
  transform-origin: left center;
}
.intro p:last-child { color: var(--muted); font-size: 16px; margin-bottom: 0; }
.intro-actions { display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-end; gap: 8px; }
.release-version { padding-right: 8px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .7px; }
.calculation-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid #c8d8cf;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  color: var(--green);
  font-size: 10px;
  font-weight: 750;
}
.calculation-status[hidden] { display: none; }
.calculation-status::before {
  width: 9px;
  height: 9px;
  border: 2px solid #b9d2c5;
  border-top-color: var(--green);
  border-radius: 50%;
  content: "";
  animation: calculation-spin .7s linear infinite;
}
@keyframes calculation-spin { to { transform: rotate(360deg); } }
.calculation-popup {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.calculation-popup[hidden] { display: none; }
.calculation-popup-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  border: 1px solid #bfd2c7;
  border-radius: 14px;
  background: rgba(255,255,253,.97);
  color: var(--green);
  box-shadow: 0 16px 42px rgba(20,61,48,.2);
  font-size: 17px;
  letter-spacing: .1px;
}
.calculation-popup-card::before {
  width: 18px;
  height: 18px;
  border: 3px solid #c9ddd2;
  border-top-color: var(--green);
  border-radius: 50%;
  content: "";
  animation: calculation-spin .7s linear infinite;
}
.quiet-button {
  padding: 10px 16px;
  border: 1px solid #c8d8cf;
  border-radius: 999px;
  background: rgba(255, 255, 255, .75);
  color: var(--green);
  font-weight: 700;
}
.quiet-button.reopen-highlight {
  animation: reopen-highlight 1.05s ease-out forwards;
}
@keyframes reopen-highlight {
  0% {
    transform: scale(1);
    border-color: #c8d8cf;
    background: rgba(255, 255, 255, .75);
    color: var(--green);
    box-shadow: 0 0 0 0 rgba(36,116,91,0), 0 0 0 rgba(36,116,91,0);
  }
  28% {
    transform: scale(1.05);
    border-color: #4f9a79;
    background: #dff2e7;
    color: #15553f;
    box-shadow: 0 0 0 8px rgba(36,116,91,.12), 0 10px 28px rgba(36,116,91,.22);
  }
  62% {
    transform: scale(1.02);
    border-color: #82af9a;
    background: rgba(232, 246, 237, .9);
    color: #1d654d;
    box-shadow: 0 0 0 4px rgba(36,116,91,.07), 0 5px 14px rgba(36,116,91,.1);
  }
  100% {
    transform: scale(1);
    border-color: #c8d8cf;
    background: rgba(255, 255, 255, .75);
    color: var(--green);
    box-shadow: 0 0 0 0 rgba(36,116,91,0), 0 0 0 rgba(36,116,91,0);
  }
}
.tab-page { display: none; }
.tab-page.active { display: block; animation: tab-page-reveal .2s cubic-bezier(.2,.75,.25,1) both; }
@keyframes tab-page-reveal {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 253, .96);
  box-shadow: var(--shadow);
}

.plan-toolbar {
  display: grid;
  grid-template-columns: minmax(470px, .95fr) minmax(460px, 1.25fr) minmax(145px, 160px) auto;
  align-items: flex-end;
  gap: 8px;
  padding: 5px 12px;
  margin-bottom: 14px;
}
.plan-toolbar > div { min-width: 0; }
.plan-toolbar > div + div { padding-left: 10px; border-left: 1px solid #e0e8e3; }
.plan-picker label { display: block; margin-bottom: 2px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.plan-picker-controls { display: flex; flex-wrap: wrap; align-items: stretch; gap: 4px 6px; }
@media (min-width: 701px) {
  .plan-picker-controls {
    display: grid;
    grid-template-columns: minmax(200px, 220px) repeat(4, max-content);
  }
  .plan-picker-controls #startNewPlan { grid-column: 2; grid-row: 1; }
  .plan-picker-controls #deletePlan { grid-column: 3; grid-row: 1; }
  .plan-picker-controls #clearCurrentPlan { grid-column: 4; grid-row: 1; }
  .plan-picker-controls #linkSavedPlanners { grid-column: 5; grid-row: 2; }
  .plan-picker-controls #savePlan { grid-column: 3; grid-row: 2; }
  .plan-picker-controls #savePlanAs { grid-column: 4; grid-row: 2; }
  .plan-picker-controls #openRetirementPlan { grid-column: 2; grid-row: 2; }
}
.plan-picker select {
  flex: 0 1 220px;
  width: 220px;
  max-width: 100%;
  min-width: 0;
  min-height: 26px;
  padding: 3px 32px 3px 9px;
  border: 1px solid #c9d8d0;
  border-radius: 8px;
  background: #fff;
  font-weight: 700;
}
.plan-picker-controls button,
.toolbar-menu summary {
  min-height: 26px;
  padding: 2px 7px;
  border: 1px solid #c7d9ce;
  border-radius: 8px;
  background: #f2f7f3;
  color: var(--ink);
  font-size: 8px;
  font-weight: 750;
  white-space: nowrap;
}
.toolbar-menu { position: relative; }
.toolbar-menu summary { display: flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; }
.toolbar-menu summary::-webkit-details-marker { display: none; }
.toolbar-menu summary::after { content: "▾"; color: var(--muted); font-size: 9px; }
.toolbar-menu[open] summary { border-color: #9fbaaa; background: #e8f1eb; }
.toolbar-menu-popover {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  min-width: 165px;
  gap: 5px;
  padding: 7px;
  border: 1px solid #c7d9ce;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(23,63,53,.16);
}
.toolbar-menu-popover button { width: 100%; text-align: left; }
.user-options-menu { z-index: 40; }
/* Wide and short layouts transform the navigation into its own stacking
   context. Lift the containing masthead while this menu is open so the
   popover stays above the plan toolbar and planner content below it. */
.intro:has(.user-options-menu[open]) { position: relative; z-index: 4000; }
.user-options-popover { right: 0; width: 300px; padding: 12px; gap: 10px; text-align: left; }
.user-option-field { display: grid; gap: 5px; color: var(--ink); font-size: 11px; font-weight: 750; }
.user-option-field select { width: 100%; padding: 8px; border: 1px solid #c7d9ce; border-radius: 7px; background: #fff; }
.user-option-toggle { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.user-option-toggle input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--green); }
.user-option-toggle span { display: grid; gap: 3px; }
.user-option-toggle strong { color: var(--ink); font-size: 12px; }
.user-option-toggle small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.user-options-reset { margin-top: 2px; border-color: #d5c4bd; background: #fff8f6; color: #7e4338; }

html[data-theme="dark"] { color-scheme: dark; --ink:#e6f0eb; --green:#6fc3a4; --green-dark:#9ad8c1; --green-soft:#193d32; --gold:#d8ac61; --red:#e08a80; --line:#355249; --muted:#a8bbb3; --cream:#10241e; --shadow:0 14px 42px rgba(0,0,0,.28); }
html[data-theme="dark"] { --control-hover-border:#6fc3a4; --control-hover-bg:#1d4035; --control-hover-ring:0 0 0 3px rgba(111,195,164,.13); }
html[data-theme="dark"] body { background:radial-gradient(circle at 80% 9%,#20362e 0,transparent 25%),var(--cream); }
html[data-theme="dark"] :is(.card,.toolbar-menu-popover,dialog,.spending-table-wrap,.spending-use-panel,.spending-view-controls,.summary-card,.account-card,.insight-action,.scenario-card) { background-color:#173129; color:var(--ink); border-color:var(--line); }
html[data-theme="dark"] .executive-summary-heading { background:linear-gradient(135deg,#1a362d,#1d3b31); }
html[data-theme="dark"] .plan-completeness-popover { background:#173129; border-color:#527267; color:var(--ink); }
html[data-theme="dark"] .plan-completeness-items button:hover { background:#24483c; }
html[data-theme="dark"] .recommendation-brief,
html[data-theme="dark"] .recommendation-brief:is(.is-attention,.is-critical,.is-incomplete) { background:linear-gradient(105deg,#173129,#1b392f); }
html[data-theme="dark"] :is(input,select,textarea,.spending-category-options) { background-color:#10241e; color:var(--ink); border-color:#49665c; }
html[data-theme="dark"] :is(.toolbar-menu[open] summary,.user-options-reset) { background-color:#24483c; color:var(--ink); border-color:#527267; }
html[data-theme="dark"] .topbar nav :is(button,.user-options-menu > summary) { color:#b6c7c0; }
html[data-theme="dark"] .topbar nav :is(button.nav-active,.user-options-menu[open] > summary) { color:var(--ink); }
html[data-theme="dark"] .topbar nav:has(.user-options-menu[open]) button.nav-active { color:#b6c7c0; }
.plan-picker-controls .delete-plan-button,.spending-actions .delete-plan-button,.social-security-actions .delete-plan-button { border-color: #dfc3bd; background: #fff6f4; color: #8d4237; }
.social-security-actions #deleteSocialSecurityPlan:disabled { opacity: 1; border-color: #dfc3bd; background: #fff6f4; color: #8d4237; -webkit-text-fill-color: #8d4237; }
.plan-picker-controls .start-new-plan-button { border-color: #c99f97; background: #fff8f6; color: #8d3429; }
.dialog-actions .danger-button { border-color: #9e4337; background: #9e4337; color: #fff; }
.destructive-dialog { border-top: 5px solid #9e4337; }
.destructive-dialog .eyebrow { color: #8f3026; }
.destructive-warning { margin-top: 16px; padding: 16px; border: 1px solid #d7a7a0; border-radius: 10px; background: #fff3f1; color: #772b23; }
.destructive-warning strong { display: block; font-size: 16px; }
.destructive-warning p { margin: 8px 0 0; line-height: 1.55; }
.plan-start-choices { display: grid; gap: 10px; margin-top: 20px; }
.plan-start-choice { width: 100%; padding: 15px 16px; border: 1px solid #c5d5cc; border-radius: 10px; background: #f8fbf9; color: var(--ink); text-align: left; }
.plan-start-choice:hover, .plan-start-choice:focus-visible { border-color: var(--green); background: #eef6f1; }
.plan-start-choice strong, .plan-start-choice span { display: block; }
.plan-start-choice strong { font-size: 15px; }
.plan-start-choice span { margin-top: 5px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.toolbar-actions { display: grid; gap: 3px; }
.toolbar-group-label { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.toolbar-action-controls { display: flex; justify-content: flex-end; gap: 7px; }
.toolbar-actions button, .scenario-utilities button, .page-title-row button, .social-security-actions .delete-plan-button {
  min-height: 26px;
  padding: 2px 7px;
  border: 1px solid #c7d9ce;
  border-radius: 8px;
  background: #f2f7f3;
  font-size: 9px;
  font-weight: 750;
}
.toolbar-actions .primary-small { background: #f2f7f3; border-color: #c7d9ce; color: var(--ink); }
.plan-picker-controls #savePlan { border-color: var(--green); background: var(--green); color: #fff; box-shadow: 0 4px 12px rgba(36,116,91,.16); }
.plan-picker-controls #deletePlan { border-color: #9e4337; background: #9e4337; color: #fff; }
.plan-picker-controls #clearCurrentPlan { border-color: #c99f97; background: #fff8f6; color: #8d3429; }
.toolbar-actions .danger-quiet { border: 0; background: none; color: #8c615a; text-decoration: underline; }

.executive-summary {
  display: grid;
  grid-template-columns: minmax(175px,1.15fr) repeat(5,minmax(135px,1fr));
  align-items: stretch;
  margin-bottom: 8px;
  overflow: hidden;
}
.executive-summary-heading,
.executive-summary article { min-width: 0; padding: 7px 12px; }
.executive-summary-heading { display: flex; flex-direction: column; justify-content: center; background: linear-gradient(135deg,#f5f8f5,#edf3ef); }
.executive-summary-heading .eyebrow { margin-bottom: 3px; }
.executive-summary-heading > span { color: var(--muted); font-size: 10px; line-height: 1.25; }
.plan-completeness { position: relative; margin-top: 3px; }
.plan-completeness > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--ink); cursor: pointer; list-style: none; }
.plan-completeness > summary::-webkit-details-marker { display: none; }
.plan-completeness > summary span { font-size: 9px; font-weight: 750; }
.plan-completeness > summary strong { color: #8a682d; font: 700 15px Georgia,serif; }
.plan-completeness > summary:hover,
.plan-completeness > summary:focus-visible { background: transparent; box-shadow: none; }
.plan-completeness > summary:hover span,
.plan-completeness > summary:focus-visible span { color: var(--green); }
.plan-completeness.is-complete > summary strong { color: var(--green); }
.plan-completeness-popover { position: absolute; z-index: 45; top: calc(100% + 7px); left: 0; width: min(330px,calc(100vw - 36px)); padding: 13px; border: 1px solid #c5d5cc; border-radius: 11px; background: #fff; box-shadow: 0 14px 32px rgba(20,63,52,.18); }
.completeness-progress { height: 5px; overflow: hidden; border-radius: 99px; background: #e6ece8; }
.completeness-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--gold),var(--green)); transition: width .3s ease; }
.plan-completeness-popover > p { margin: 10px 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.plan-completeness-items { display: grid; gap: 4px; }
.plan-completeness-items button { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 6px; width: 100%; padding: 7px 8px; border: 0; border-radius: 7px; background: transparent; color: var(--ink); font-size: 10px; text-align: left; }
.plan-completeness-items button:hover { background: #edf4ef; box-shadow: none; transform: none; }
.plan-completeness-items button > span { color: #9a702d; font-weight: 900; }
.plan-completeness-items button.complete > span { color: var(--green); }
.plan-completeness-items small { color: var(--muted); font-size: 8px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.executive-summary article { position: relative; border-left: 1px solid var(--line); }
.executive-summary article::before { position: absolute; top: 0; right: 17px; left: 17px; height: 2px; border-radius: 2px; background: #c7d7ce; content: ""; }
.executive-summary article.is-strong::before,
.executive-summary article.is-on-track::before { background: var(--green); }
.executive-summary article.is-attention::before { background: var(--gold); }
.executive-summary article.is-critical::before { background: var(--red); }
.executive-summary article > span,
.executive-summary article > strong,
.executive-summary article > small { display: block; }
.executive-summary article > span { color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .02em; }
.executive-summary article > strong { margin: 2px 0 1px; color: var(--ink); font: 600 17px/1.15 Georgia,serif; }
.executive-summary article > small { color: var(--muted); font-size: 9px; line-height: 1.25; }
.executive-summary .executive-status.is-strong strong,
.executive-summary .executive-status.is-on-track strong { color: var(--green); }
.executive-summary .executive-status.is-attention strong { color: #956a27; }
.executive-summary .executive-status.is-critical strong { color: var(--red); }

.scenario-lab {
  position: relative;
  z-index: 5;
  padding: 22px 24px;
  margin-bottom: 14px;
  background: linear-gradient(115deg, #f8fbf8, #f4efe4);
}
.scenario-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  position: relative;
}
.scenario-recalculate-slot {
  grid-column: 2;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  isolation: isolate;
}
.scenario-header .scenario-recalculate-slot #recalculatePlan {
  width: 210px;
  min-width: 140px;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid #c7d9ce;
  border-radius: 8px;
  background: #f2f7f3;
  color: var(--ink);
  font-size: 10px;
  font-weight: 750;
  box-shadow: none;
}
.scenario-header .scenario-recalculate-slot #recalculatePlan:disabled { cursor: default; opacity: 1; color: #8b9791; -webkit-text-fill-color: #8b9791; }
.recalculation-action { position: relative; display: block; }
.recalculation-buttons { display: flex; align-items: center; gap: 7px; width: 317px; }
.scenario-header .scenario-recalculate-slot #undoPlanChange {
  width: 100px;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #c7d9ce;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 10px;
  font-weight: 750;
  box-shadow: none;
}
.scenario-header .scenario-recalculate-slot #undoPlanChange:disabled { cursor: default; opacity: .48; }
.recalculation-action #recalculatePlan.results-outdated {
  min-width: 210px;
  border-color: #8f3026;
  background: linear-gradient(180deg, #b94b40, #96372e);
  color: #fff;
  font-weight: 850;
  box-shadow: 0 6px 16px rgba(143,48,38,.28), inset 0 1px 0 rgba(255,255,255,.28);
}
.recalculation-action #recalculatePlan.results-outdated:hover { background: linear-gradient(180deg, #c4564b, #9f3c32); }
.plan-picker-controls select.unsaved-selection,.saved-spending-profile-picker.unsaved-selection summary{border-color:#8f3026;background:linear-gradient(180deg,#b94b40,#96372e);color:#fff;font-weight:850;box-shadow:0 6px 16px rgba(143,48,38,.28),inset 0 1px 0 rgba(255,255,255,.28)}
.plan-picker-controls select.unsaved-selection{-webkit-appearance:none;appearance:none;background-color:#a94338!important;background-image:linear-gradient(45deg,transparent 50%,#fff 50%),linear-gradient(135deg,#fff 50%,transparent 50%)!important;background-position:calc(100% - 15px) 50%,calc(100% - 10px) 50%!important;background-size:5px 5px,5px 5px!important;background-repeat:no-repeat!important;-webkit-text-fill-color:#fff}
.plan-picker-controls select.unsaved-selection option{background:#fff;color:#173b31}.saved-spending-profile-picker.unsaved-selection summary::after{color:#fff}
.recalculation-action small { position: absolute; top: calc(100% + 5px); left: 50%; width: 240px; max-width: 240px; color: #8f3026; font-size: 9px; font-weight: 800; line-height: 1.25; text-align: center; transform: translateX(-50%); }
.calculation-mode-toggle {
  display: inline-flex;
  padding: 3px;
  border: 1px solid #c7d9ce;
  border-radius: 8px;
  background: #f2f7f3;
  box-shadow: none;
}
.calculation-mode-toggle button {
  min-width: 48px;
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  box-shadow: none;
}
.calculation-mode-toggle button.selected {
  background: #fff;
  color: var(--green);
  border-color: #b9cfc2;
  box-shadow: none;
}
.calculation-mode-toggle button:hover:not(.selected) { color: var(--green); background: rgba(255,255,255,.48); }
.scenario-recalculate-slot button[data-tooltip]:hover,
.scenario-recalculate-slot button[data-tooltip]:focus-visible { z-index: 12; }
.scenario-recalculate-slot button[data-tooltip]::before { z-index: 3000; }
.scenario-recalculate-slot button[data-tooltip]:hover::before,
.scenario-recalculate-slot button[data-tooltip]:focus-visible::before { opacity: 1; }
.scenario-intro { max-width: 610px; }
.scenario-title-row { display: flex; align-items: center; gap: 26px; }
.scenario-lab h2 { margin: 0 0 6px; font: 500 24px Georgia, serif; }
.scenario-intro > p:last-child { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.scenario-utilities { display: flex; flex: 0 0 auto; gap: 8px; }
.scenario-utilities button { min-width: 140px; background: rgba(255,255,255,.72); }
.scenario-utilities button[data-tooltip]:hover,
.scenario-utilities button[data-tooltip]:focus-visible { z-index: 1; }
.scenario-utilities button[data-tooltip]::before { background-color: #173f35; }
.scenario-utilities button:disabled {
  opacity: 1;
  cursor: default;
  border-color: #cbd5d0;
  background: #eef1ef;
  color: #8b9791;
}
.scenario-overview {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: stretch;
  margin-top: 18px;
}
.scenario-input-section {
  margin-top: 0;
  padding: 16px;
  border: 1px solid rgba(36,116,91,.14);
  border-radius: 12px;
  background: rgba(255,255,255,.66);
}
.scenario-person-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.scenario-input-card, .scenario-household-card { padding: 14px; border: 1px solid #d3dfd8; border-radius: 10px; background: rgba(255,255,255,.84); }
.scenario-input-card.spouse-1 {
  border-color: #b8d4c5;
  border-top: 4px solid #3f8a6d;
  background: linear-gradient(145deg, rgba(232,246,238,.96), rgba(255,255,255,.9) 48%);
  box-shadow: 0 8px 20px rgba(36,116,91,.08);
}
.scenario-input-card.spouse-2 {
  border-color: #ddc99f;
  border-top: 4px solid #bd8d3d;
  background: linear-gradient(145deg, rgba(249,242,226,.96), rgba(255,255,255,.9) 48%);
  box-shadow: 0 8px 20px rgba(156,111,42,.08);
}
.scenario-household-card {
  border-color: #b9cad8;
  border-top: 4px solid #557f9b;
  background: linear-gradient(145deg, rgba(232,241,247,.97), rgba(255,255,255,.92) 50%);
  box-shadow: 0 8px 20px rgba(54,91,117,.09);
}
.scenario-input-card.spouse-1 .scenario-input-card-head { border-bottom-color: #c8ded2; }
.scenario-input-card.spouse-2 .scenario-input-card-head { border-bottom-color: #e4d5b6; }
.scenario-household-card .scenario-input-card-head { border-bottom-color: #cbd9e2; }
.scenario-input-card[hidden] { display: none; }
.scenario-input-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 10px; margin-bottom: 11px; border-bottom: 1px solid #e0e8e3; }
.scenario-input-card-head b, .scenario-input-card-head span { display: block; }
.scenario-input-card-head b { font: 600 17px Georgia, serif; color: var(--ink); }
.scenario-input-card-head span { margin-top: 3px; color: var(--muted); font-size: 8px; }
.scenario-person-name {
  width: min(100%, 240px);
  padding: 3px 5px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font: 600 17px Georgia, serif;
}
.scenario-person-name::placeholder { color: var(--ink); opacity: 1; }
.scenario-person-name:focus::placeholder { color: transparent; }
.scenario-person-name::selection { background: #2267c9; color: #fff; }
.scenario-person-name:hover { border-color: #c7d8cf; background: rgba(255,255,255,.7); }
.scenario-person-name:focus {
  border-color: var(--green);
  background: #fff;
  box-shadow: 0 0 0 2px rgba(36,116,91,.12);
  outline: 0;
}
.scenario-person-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.scenario-person-fields .field-RetirementLength { grid-column: 2; grid-row: 1; }
body[data-analysis-mode="retirement-age"] .scenario-person-fields .field-Age,
body[data-analysis-mode="bridge"] .scenario-person-fields .field-Age,
body[data-analysis-mode="in-retirement"] .scenario-person-fields .field-Age { grid-column: 1; grid-row: 1; }
body[data-analysis-mode="thirty-year"] .scenario-person-fields .field-SocialClaimAge,
body[data-analysis-mode="in-retirement"] .scenario-person-fields .field-SocialClaimAge { grid-column: 1; grid-row: 2; }
body[data-analysis-mode="thirty-year"] .scenario-person-fields .field-Social,
body[data-analysis-mode="in-retirement"] .scenario-person-fields .field-Social { grid-column: 2; grid-row: 2; }
body[data-analysis-mode="retirement-age"] .scenario-person-fields .field-SocialClaimAge { grid-column: 1; grid-row: 2; }
body[data-analysis-mode="retirement-age"] .scenario-person-fields .field-Social { grid-column: 2; grid-row: 2; }
body[data-analysis-mode="retirement-age"] .scenario-person-fields .field-Pension { grid-column: 1; grid-row: 3; }
body[data-analysis-mode="thirty-year"] .scenario-person-fields .field-Pension,
body[data-analysis-mode="in-retirement"] .scenario-person-fields .field-Pension { grid-column: 1; grid-row: 3; }
body[data-analysis-mode="retirement-age"] .scenario-person-fields .field-Annuity { grid-column: 2; grid-row: 3; }
body[data-analysis-mode="thirty-year"] .scenario-person-fields .field-Annuity,
body[data-analysis-mode="in-retirement"] .scenario-person-fields .field-Annuity { grid-column: 2; grid-row: 3; }
body[data-analysis-mode="in-retirement"] .scenario-person-fields .social-receiving-field { grid-column: 1 / -1; grid-row: 2; }
body[data-analysis-mode="in-retirement"] .scenario-person-fields .field-SocialClaimAge { grid-column: 1; grid-row: 3; }
body[data-analysis-mode="in-retirement"] .scenario-person-fields .field-Social { grid-column: 2; grid-row: 3; }
body[data-analysis-mode="in-retirement"] .scenario-person-fields .field-Pension { grid-column: 1; grid-row: 4; }
body[data-analysis-mode="in-retirement"] .scenario-person-fields .field-Annuity { grid-column: 2; grid-row: 4; }
body[data-analysis-mode="thirty-year"] .scenario-person-fields .field-Age { grid-column: 1; grid-row: 1; }
body[data-analysis-mode="thirty-year"] .scenario-person-fields .field-Retire { grid-column: 2; grid-row: 1; }
body[data-analysis-mode="bridge"] .scenario-person-fields .field-Retire { grid-column: 2; grid-row: 1; }
body[data-analysis-mode="bridge"] .scenario-person-fields .field-SocialClaimAge { grid-column: 1; grid-row: 2; }
body[data-analysis-mode="bridge"] .scenario-person-fields .field-Social { grid-column: 2; grid-row: 2; }
body[data-analysis-mode="bridge"] .scenario-person-fields .field-MajorLifeEventAge { grid-column: 1; grid-row: 3; }
body[data-analysis-mode="bridge"] .scenario-person-fields .field-MajorLifeEventAmount { grid-column: 2; grid-row: 3; }
body[data-analysis-mode="bridge"] .scenario-person-fields .field-RetirementLength { grid-column: 1 / -1; grid-row: 4; }
body[data-analysis-mode="bridge"] .scenario-person-fields .field-Pension { grid-column: 1; grid-row: 5; }
body[data-analysis-mode="bridge"] .scenario-person-fields .field-Annuity { grid-column: 2; grid-row: 5; }
.scenario-person-fields .age-parts { width: 100%; max-width: 190px; }
.scenario-person-fields label, .scenario-financial-fields label, .scenario-household-grid label { min-width: 0; font-size: 9px; font-weight: 750; }
.scenario-person-fields .input-wrap, .scenario-financial-fields .input-wrap, .scenario-household-grid .input-wrap { width: 100%; max-width: 190px; min-height: 36px; margin-top: 5px; }
.scenario-person-fields .field-note { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; font-weight: 500; line-height: 1.3; }
.scenario-financial-details { margin-top: 12px; border-top: 2px solid #b8cfc2; }
.scenario-input-card.spouse-1 .scenario-financial-details { border-top-color: #77a991; }
.scenario-input-card.spouse-2 .scenario-financial-details { border-top-color: #c9a45f; }
.scenario-financial-details h3 { margin: 0; padding: 12px 2px 3px; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .02em; }
.scenario-input-card.spouse-2 .scenario-financial-details h3 { color: #8a6427; }
.scenario-financial-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-top: 8px; }
.scenario-financial-fields .field-Salary,
.scenario-financial-fields .field-EmployerMatchRate { grid-column: 1 / -1; }
body[data-analysis-mode="in-retirement"] .scenario-financial-fields .field-PostRetirementReturnRate { grid-column: 1 / -1; }
.calculated-contributions { margin: 11px 0 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.calculated-contributions b { color: var(--green); font-size: 14px; }
.scenario-calculated-field {
  padding: 12px 14px;
  border: 1px solid #c9ddd2;
  border-radius: 9px;
  background: #edf6f0;
}
.scenario-calculated-field span,
.scenario-calculated-field output,
.scenario-calculated-field small { display: block; }
.scenario-calculated-field span { color: var(--muted); font-size: 9px; font-weight: 750; }
.scenario-calculated-field output { margin: 6px 0 3px; color: var(--green); font: 600 23px Georgia, serif; }
.scenario-calculated-field small { color: #718078; font-size: 8px; }
.scenario-retirement-values { display: grid; gap: 10px; width: 100%; }
.retirement-age-result,
.projected-retirement-withdrawal-entry { display: none; }
body[data-analysis-mode="retirement-age"] .retirement-age-result:not([hidden]),
body[data-analysis-mode="retirement-age"] .projected-retirement-withdrawal-entry { display: block; }
.scenario-household-card { margin-top: 12px; }
.scenario-household-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.monthly-spending-entry,
.current-spending-entry,
.replenishment-spending-entry,
.guided-spending-entry { min-width: 0; }
.monthly-spending-entry > label,
.current-spending-entry > label,
.replenishment-spending-entry > label,
.guided-spending-entry > label { display: block; }
.inflation-target-entry { grid-column: 1; grid-row: 2; }
.planner-link-row { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 12px; }
.planner-text-link {
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2c6d57;
  font-size: 10px;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.planner-text-link:hover,
.planner-text-link:focus-visible { color: #164f3b; }
.household-paired-fields {
  position: relative;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 4px;
  padding: 14px 0 0;
  border: 0;
  border-top: 2px solid #6f98b4;
  border-radius: 0;
  background: transparent;
}
.household-paired-fields > label { color: #000; }
.household-paired-fields input {
  color: #000;
  -webkit-text-fill-color: #000;
}
.scenario-choice-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.scenario-choice-heading b { color: var(--ink); font-size: 11px; }
.scenario-choice-heading span { display: block; max-width: 720px; margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.scenario-rate-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 0;
  padding: 16px;
  border: 1px solid rgba(36,116,91,.14);
  border-radius: 12px;
  background: rgba(230,241,234,.62);
}
.scenario-rate-heading { display: flex; flex-direction: column; justify-content: flex-start; padding: 4px 2px; }
.scenario-rate-heading b { color: var(--green); font: 600 16px Georgia, serif; }
.scenario-rate-heading span { margin-top: 6px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.rate-cards.scenario-rates { grid-template-columns: 1fr; width: 100%; margin-top: 0; }
.rate-cards.scenario-rates article { min-height: 112px; padding: 15px 17px; background: rgba(255,255,255,.9); box-shadow: 0 4px 12px rgba(28,78,61,.04); }
.rate-cards.scenario-rates strong { margin: 9px 0 6px; font-size: 27px; }
.scenario-comparison { display: none; }
.scenario-comparison.visible {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(36, 116, 91, .15);
}
.scenario-comparison article { padding: 12px 14px; border-radius: 10px; background: rgba(255,255,255,.72); }
.scenario-comparison span, .scenario-comparison small { display: block; font-size: 9px; color: var(--muted); }
.scenario-comparison strong { display: block; margin: 6px 0 3px; font: 600 19px Georgia, serif; }
.scenario-comparison .positive { color: var(--green); }
.scenario-comparison .negative { color: var(--red); }

.impact-strip {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 48px;
  margin-bottom: 14px;
  padding: 10px 16px;
  border: 1px solid #c8dfd2;
  border-radius: 12px;
  background: #edf7f1;
  color: #386c57;
  opacity: .78;
  transition: opacity .2s ease, transform .2s ease, box-shadow .2s ease;
}
.impact-strip.changed { opacity: 1; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(36,116,91,.1); }
.impact-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #d5ebdf; font-weight: 900; }
.impact-strip b, .impact-strip span { display: block; }
.impact-strip b { font-size: 11px; }
.impact-strip div > span { margin-top: 2px; font-size: 10px; color: #618071; }

.dashboard { display: block; }
.chart-head h2, .simple-page h2, .result-narrative h2 { font: 500 27px Georgia, serif; margin: 0; }

.plan-type { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; margin-bottom: 16px; border-radius: 9px; background: #edf2ef; }
.plan-type button { padding: 7px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 800; }
.plan-type button.active { background: white; color: var(--green); box-shadow: 0 2px 9px rgba(23,59,50,.1); }
.planning-stage-control, .household-size-control { display: grid; gap: 3px; }
.planning-stage-control { min-width: 230px; }
.household-size-control { width: 100%; min-width: 145px; max-width: 160px; }
.planning-stage-control > span, .household-size-control > span { display: block; width: 100%; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-align: center; text-transform: uppercase; }
.stage-switch { display: grid; grid-template-columns: 1fr 1fr; padding: 2px; border: 1px solid #d7e2dc; border-radius: 10px; background: #edf2ef; }
.stage-switch button { display: grid; place-items: center; min-height: 26px; padding: 2px 8px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 800; line-height: 1.2; text-align: center; }
.stage-switch button.active { background: white; color: var(--green); box-shadow: 0 2px 9px rgba(23,59,50,.12); }
.main-analysis-control { min-width: 460px; }
.main-analysis-control .stage-switch button { min-height: 27px; padding: 2px 6px; font-size: 10px; line-height: 1.15; }
.analysis-mode-switch { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
.analysis-mode-switch button { min-height: 27px !important; }
.analysis-mode-description { min-height: 1.2em; color: var(--muted); font-size: 9px; line-height: 1.2; text-align: center; }
.guided-stage-control { width: 290px; margin-bottom: 16px; }
.post-retirement-mode .pre-retirement-only,
.post-retirement-mode .guided-retire,
.post-retirement-mode .guided-pre-return { display: none !important; }
body:not(.post-retirement-mode) .in-retirement-only { display: none !important; }

.social-receiving-field { display: grid; gap: 6px; font-weight: 700; font-size: 11px; }
.social-receiving-field select,
.guided-social-status select {
  width: 100%;
  min-height: 39px;
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid #ccd9d1;
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font: inherit;
}
.social-receiving-field small,
.guided-social-status small { color: var(--muted); font-size: 9px; font-weight: 500; line-height: 1.4; }

/* Keep the planning form focused on the inputs that can affect each analysis.
   These rules only change visibility, so switching modes preserves every value. */
body[data-analysis-mode="retirement-age"] :is(
  .field-Retire,
  .field-MajorLifeEventAge,
  .field-MajorLifeEventAmount,
  .replenishment-spending-entry,
  .guided-retire,
  .guided-event-age,
  .guided-event-amount
) { display: none !important; }
body[data-analysis-mode="thirty-year"] :is(
  .field-MajorLifeEventAge,
  .field-MajorLifeEventAmount,
  .field-RetirementLength,
  .replenishment-spending-entry,
  .guided-life,
  .guided-event-age,
  .guided-event-amount
) { display: none !important; }
body[data-analysis-mode="in-retirement"] :is(
  .field-Retire,
  .field-MajorLifeEventAge,
  .field-ReturnRate,
  .field-Salary,
  .field-TraditionalContribRate,
  .field-EmployerMatchRate,
  .field-RothContribRate,
  .calculated-contributions,
  .replenishment-spending-entry,
  .current-spending-entry,
  .guided-retire,
  .guided-event-age,
  .guided-salary,
  .guided-pre-tax-contribution,
  .guided-employer-match,
  .guided-roth-contribution,
  .guided-pre-return,
  .guided-current-spending
) { display: none !important; }

.input-wrap {
  margin-top: 6px;
  min-height: 39px;
  border: 1px solid #ccd9d1;
  border-radius: 8px;
  background: white;
  padding: 0 9px;
  display: flex;
  align-items: center;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.input-wrap:focus-within { border-color: #559078; box-shadow: 0 0 0 3px rgba(36,116,91,.1); }
:is(.input-wrap, .range-entry, .guided-age-parts > span, .guided-money-input, .guided-percent-input, .guided-suffix-input):has(input:is([type="number"], [inputmode="numeric"], [data-numeric], [data-money]):not(:disabled):hover) {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  box-shadow: var(--control-hover-ring);
}
input:is([type="number"], [inputmode="numeric"], [data-numeric], [data-money]):not(:disabled):not(:where(.input-wrap, .range-entry, .guided-age-parts > span, .guided-money-input, .guided-percent-input, .guided-suffix-input) input):hover {
  border-color: var(--control-hover-border);
  background: var(--control-hover-bg);
  box-shadow: var(--control-hover-ring);
}
.input-wrap input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; padding: 9px 3px; font-weight: 700; }
.input-wrap b { color: #7b8982; }
.input-wrap small { white-space: nowrap; color: #8b9791; font-weight: 400; font-size: 9px; }
.age-parts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.age-parts .input-wrap { min-width: 0; }
.age-parts .input-wrap input { padding-right: 1px; }
:is(.age-field, .guided-social-age).field-disabled { color: #7f8c86; }
:is(.age-field, .guided-social-age).field-disabled :is(.input-wrap, .guided-age-parts > span) {
  border-color: #d9dfdc;
  background: #eef1ef;
  box-shadow: none;
}
:is(.age-field, .guided-social-age).field-disabled input:disabled {
  cursor: not-allowed;
  color: #89948f;
  -webkit-text-fill-color: #89948f;
  opacity: 1;
}
.field, .range-field { display: block; font-weight: 700; font-size: 11px; margin-top: 18px; }
.range-field > span { display: flex; justify-content: space-between; gap: 7px; align-items: center; }
.range-field > input[type="range"] {
  width: 100%;
  height: 7px;
  accent-color: var(--green);
  margin: 17px 0 4px;
  background: linear-gradient(90deg, #d8eadf 0 13%, #eee4cc 13% 100%);
}
.range-field small { display: flex; justify-content: space-between; color: #98a29d; font-weight: 400; font-size: 8px; }
.range-field i { font-style: normal; }
.typical-range { color: #4d826b; }
.range-entry { display: inline-flex !important; align-items: center; flex: 0 0 auto; height: 30px; margin-left: 7px; border: 1px solid #ccd9d1; border-radius: 7px; background: #fff; overflow: hidden; }
.range-entry input { width: 58px; height: 28px; border: 0; outline: 0; padding: 3px 3px 3px 8px; margin: 0; background: transparent; text-align: right; font-weight: 700; }
.range-entry b { padding-right: 7px; color: #708078; }
.rate-presets { display: flex; justify-content: flex-end; gap: 5px; margin-top: 7px; }
.rate-presets button { padding: 4px 8px; border: 1px solid #d1ddd6; border-radius: 999px; background: #f8faf8; color: var(--green); font-size: 8px; font-weight: 800; }
.assumption-warning { margin: 12px 0 0; padding: 9px 10px; border-radius: 8px; background: #f5e9d8; color: #815b2c; font-size: 9px; line-height: 1.45; }

.help-tip { position: relative; display: inline-grid; place-items: center; width: 17px; height: 17px; margin-left: 6px; border: 1px solid #78988a; border-radius: 50%; background: #edf5f0; color: #25684f; font-size: 10px; font-weight: 800; line-height: 1; cursor: help; vertical-align: middle; outline: none; }
.help-box { position: absolute; left: 50%; bottom: calc(100% + 9px); z-index: 1000; width: 270px; padding: 12px 14px; border: 1px solid #c8d8cf; border-radius: 9px; background: #173f35; color: #fff; font-size: 11px; font-weight: 400; line-height: 1.5; text-align: left; letter-spacing: 0; box-shadow: 0 10px 28px rgba(17,51,42,.25); opacity: 0; visibility: hidden; pointer-events: none; transform: translate(-50%,5px); transition: opacity .14s ease, transform .14s ease, visibility .14s; }
.help-box::after { content: ""; position: absolute; left: 50%; top: 100%; margin-left: -6px; border: 6px solid transparent; border-top-color: #173f35; }
.help-tip:hover .help-box, .help-tip:focus .help-box, .help-tip.help-open .help-box { opacity: 1; visibility: visible; transform: translate(-50%,0); }
.welcome-dialog .guided-help-tip {
  width: 19px;
  height: 19px;
  margin-left: 7px;
  border: 2px solid #4f9275;
  background: #dff2e7;
  color: #15553f;
  box-shadow: 0 0 0 3px rgba(79,146,117,.13);
}
.welcome-dialog .guided-help-tip .help-box {
  display: none;
}
.guided-help-popover {
  --guided-help-arrow-left: 50%;
  position: fixed;
  z-index: 10000;
  display: block;
  width: min(300px, calc(100vw - 24px));
  padding: 12px 14px;
  border: 2px solid #e7c885;
  border-radius: 9px;
  background: #123d31;
  color: #fff;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  box-shadow: 0 12px 32px rgba(17,51,42,.34), 0 0 0 4px rgba(231,200,133,.18);
  pointer-events: none;
}
.guided-help-popover::after {
  content: "";
  position: absolute;
  left: var(--guided-help-arrow-left);
  top: 100%;
  margin-left: -6px;
  border: 6px solid transparent;
  border-top-color: #e7c885;
}
.guided-help-popover.below::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: #e7c885;
}
button[data-tooltip]:not(.dialog-close) { position: relative; }
button[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  z-index: 2000;
  width: max-content;
  max-width: 240px;
  padding: 9px 11px;
  border: 1px solid #2d5b4d;
  border-radius: 8px;
  background: #173f35;
  color: #fff;
  box-shadow: 0 9px 24px rgba(17,51,42,.24);
  font: 500 10px/1.4 "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
  text-align: left;
  text-decoration: none;
  text-transform: none;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 5px);
  transition: opacity .14s ease .12s, transform .14s ease .12s, visibility .14s ease .12s;
}
button[data-tooltip-position="bottom"]::before {
  top: calc(100% + 9px);
  bottom: auto;
  transform: translate(-50%, -5px);
}
button[data-tooltip-align="right"]::before {
  right: 0;
  left: auto;
  transform: translateY(-5px);
}
button[data-tooltip]:hover::before,
button[data-tooltip]:focus-visible::before {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
button[data-tooltip-align="right"]:hover::before,
button[data-tooltip-align="right"]:focus-visible::before { transform: translateY(0); }
.field-error { display: none; margin-top: 6px; color: #a43f32; font-size: 9px; font-weight: 600; line-height: 1.3; }
.field-invalid .input-wrap { border-color: #bd5a4d; box-shadow: 0 0 0 2px rgba(189,90,77,.12); }
.field-invalid .field-error { display: block; }

.rate-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 18px; }
.rate-cards article { padding: 13px; border: 1px solid #d1ded6; border-radius: 9px; background: #edf5f0; }
.rate-cards span, .rate-cards small { display: block; font-size: 9px; line-height: 1.4; }
.rate-cards strong { display: block; font: 500 23px Georgia, serif; color: var(--green); margin: 12px 0 7px; }
.rate-cards b { display: block; font: 600 14px Georgia, serif; margin-bottom: 6px; }
.results { min-width: 0; display: grid; gap: 18px; }
.hero-card { border-radius: 16px; min-height: 280px; padding: 38px 46px; color: white; background: radial-gradient(circle at 86% 5%, #417963, transparent 35%), linear-gradient(120deg,#153f34,#245e4b); display: flex; justify-content: space-between; align-items: center; overflow: hidden; position: relative; }
.plan-focal-hero {
  -webkit-user-select: none;
  user-select: none;
  display: grid;
  grid-template-columns: minmax(230px,.85fr) minmax(430px,1.55fr) auto;
  gap: 24px;
  margin-bottom: 14px;
  box-shadow: 0 18px 42px rgba(20,63,52,.2);
}
.hero-withdrawal-snapshot { gap: 9px; padding: 13px; border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.08); }
.hero-withdrawal-snapshot .scenario-rate-heading { padding: 0 2px; }
.hero-withdrawal-snapshot .scenario-rate-heading b { color: #fff; }
.hero-withdrawal-snapshot .scenario-rate-heading span { margin-top: 3px; color: #bdd0c8; }
.analysis-mode-summary{display:grid;align-content:center;gap:6px;margin:0;padding:9px 11px;border:1px solid rgba(255,255,255,.16);border-radius:10px;background:rgba(255,255,255,.08);color:#d7e5df;font-size:10px;line-height:1.35}.analysis-mode-summary p{margin:0}.analysis-mode-summary strong{color:#fff}.hero-portfolio-summary{display:grid;grid-template-columns:minmax(175px,.8fr) minmax(235px,1.2fr);align-items:start;align-self:start;gap:12px 16px}.hero-portfolio-summary>.retirement-projection{grid-column:1/-1}.hero-withdrawal-snapshot{align-self:start}.hero-current-value{min-width:0}
@media(max-width:560px){.hero-portfolio-summary{grid-template-columns:1fr}.hero-portfolio-summary>.retirement-projection{grid-column:1}}
.hero-withdrawal-snapshot .rate-cards.scenario-rates,
.hero-withdrawal-snapshot .scenario-retirement-values { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; }
.hero-withdrawal-snapshot .rate-cards.scenario-rates.has-replenishment { grid-template-columns: repeat(3,minmax(0,1fr)); }
.hero-withdrawal-snapshot .rate-cards.scenario-rates article,
.hero-withdrawal-snapshot .scenario-calculated-field { min-height: 0; padding: 10px 11px; border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.1); box-shadow: none; }
.hero-withdrawal-snapshot .buying-power-field { background: rgba(203,225,215,.07); }
.hero-withdrawal-snapshot .rate-cards span,
.hero-withdrawal-snapshot .rate-cards small,
.hero-withdrawal-snapshot .scenario-calculated-field span,
.hero-withdrawal-snapshot .scenario-calculated-field small { color: #c8d9d2; }
.required-withdrawal-amounts { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 9px 0; }
.required-withdrawal-amounts > div { min-width: 0; }
.required-withdrawal-amounts > div + div { padding-top: 7px; border-top: 1px solid rgba(255,255,255,.13); }
.required-withdrawal-amounts span { font-size: 8px; line-height: 1.25; }
.required-withdrawal-amounts b { margin: 3px 0 0; color: #fff; font: 600 14px/1.25 Arial, sans-serif; }
.required-withdrawal-card .withdrawal-income-note { margin-top: 7px; color: #d7e5df; line-height: 1.35; }
.hero-withdrawal-snapshot .scenario-retirement-values .scenario-calculated-field > span {
  font-size: 9px;
  font-weight: 400;
  line-height: 1.4;
}
.hero-withdrawal-snapshot .scenario-retirement-values .scenario-calculated-field > small {
  font-size: 9px;
  font-weight: 400;
  line-height: 1.4;
}
.hero-withdrawal-snapshot .rate-cards.scenario-rates strong,
.hero-withdrawal-snapshot .scenario-calculated-field output { margin: 5px 0 3px; color: #fff; font-size: 28px; line-height: 1.05; }
.hero-withdrawal-snapshot .rate-cards b { color: #fff; font-size: 17px; }
.hero-outlook-values { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.hero-outlook-values.has-replenishment { grid-template-columns: repeat(3,minmax(0,1fr)); }
.hero-replenishment-portfolio,
.hero-ending-portfolio,
.hero-depletion-age { text-align: center; }
.hero-withdrawal-snapshot :is(.hero-replenishment-portfolio,.hero-ending-portfolio,.hero-depletion-age) output { font-size: 31px; }
.hero-card::before { content: ""; position: absolute; width: 260px; height: 260px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; right: -65px; bottom: -130px; }
.plan-focal-hero.target-reached { animation: target-reached .9s ease; }
@keyframes target-reached {
  0% { box-shadow: 0 0 0 0 rgba(111,195,164,0); }
  40% { box-shadow: 0 0 0 5px rgba(111,195,164,.2), 0 18px 45px rgba(21,63,52,.28); }
  100% { box-shadow: 0 0 0 0 rgba(111,195,164,0); }
}
.eyebrow.light { color: #b9cec5; }
.hero-card h2 { font: 500 clamp(48px,5.6vw,78px) Georgia,serif; margin: 20px 0 25px; transition: transform .25s ease, opacity .25s ease; }
#currentPortfolio { margin: 12px 0 9px; font-size: clamp(25px,2.2vw,34px); line-height: 1; }
.retirement-projection { margin-top: 12px; }
.retirement-projection > span { display: block; color: #dce9e4; font-weight: 700; }
.retirement-projection > strong,
.projected-portfolio-row { display: flex; align-items: center; gap: 18px; margin-top: 4px; }
#projectedPortfolio,
#projectedReplenishmentValue,
#portfolioWithAdditionalAssets { display: block; font: 500 clamp(40px,3.4vw,52px)/1.05 Georgia,serif; }
#recalculatePlan {
  padding: 10px 16px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 8px;
  color: #173f35;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 5px 14px rgba(4,28,21,.2);
}
#recalculatePlan:hover { background: #eaf4ef; transform: translateY(-1px); }
#recalculatePlan:active { transform: translateY(0); }
#recalculatePlan:disabled {
  cursor: default;
  border-color: rgba(255,255,255,.2);
  color: #d0d7d4;
  background: #778680;
  box-shadow: none;
  opacity: .72;
  transform: none;
}
body.calculation-busy #recalculatePlan:disabled { cursor: wait; }
#recalculatePlan[data-tooltip]:disabled {
  opacity: 1;
  border-color: #cbd5d0;
  background: #eef1ef;
  color: #8b9791;
}
.post-retirement-mode #currentPortfolio{font:500 clamp(25px,2.2vw,34px)/1 Georgia,serif}
.retirement-projection > small { display: block; margin-top: 3px; color: #bdd0c8; font-size: 9px; line-height: 1.4; }
#projectedReplenishmentValueNote { font-size: 9px; line-height: 1.35; }
.calculated-result-value.value-updated { animation: value-rise .48s cubic-bezier(.2,.8,.2,1); }
@keyframes value-rise {
  0% { transform: translateY(5px); opacity: .5; color: #f3d99d; text-shadow: 0 0 14px rgba(243,217,157,.25); }
  100% { transform: translateY(0); opacity: 1; text-shadow: none; }
}
.hero-card p:not(.eyebrow) { color: #bdd0c8; }
.hero-card > div > strong { font-size: 27px; display: block; margin-top: 25px; }
.hero-card > div > strong small, .hero-card > div > small { font-size: 11px; color: #bdd0c8; }
.hero-card > div > small { display: block; margin-top: 14px; }
#projectedPortfolioNote { font-size: 9px; line-height: 1.4; }
.hero-spending-goal {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  max-width: 330px;
  margin-top: 13px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.18);
}
.hero-spending-goal span { color: #bdd0c8; font-size: 10px; font-weight: 700; }
.hero-spending-goal b { color: #fff; font: 600 18px Georgia, serif; white-space: nowrap; }
.readiness { display: flex; flex-direction: column; align-items: center; gap: 10px; color: #c4d3cd; font-size: 11px; position: relative; z-index: 1; }
.success-rings { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: start; justify-items: center; }
.readiness.has-two-successes .success-rings { grid-template-columns: 1fr; gap: 10px; }
.readiness-result { display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; }
.readiness-result[hidden] { display: none; }
.readiness.has-two-successes .ring { width: 108px; height: 108px; }
.readiness.has-two-successes .ring::after { inset: 8px; }
.readiness.has-two-successes .ring strong { font-size: 31px; }
@media (min-width: 1101px) {
  .plan-focal-hero > .readiness {
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: center;
    justify-self: center;
  }
}
.ring { --progress: 216deg; width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#cfaa64 var(--progress),rgba(255,255,255,.18) 0); position: relative; transition: filter .3s ease; }
.ring.updated { animation: ring-pulse .55s ease; }
@keyframes ring-pulse { 50% { transform: scale(1.035); filter: drop-shadow(0 0 12px rgba(207,170,100,.35)); } }
.ring::after { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: #215543; }
.ring div { position: relative; z-index: 1; text-align: center; }
.ring strong { display: block; font: 500 43px Georgia,serif; color: white; }
.ring span { font-size: 11px; }
.readiness button { border: 0; background: transparent; color: #d4e2dc; text-decoration: underline; font-size: 9px; }
.readiness button[data-tooltip] { z-index: 5; }
.readiness button[data-tooltip]::before {
  right: 0;
  left: auto;
  width: 230px;
  max-width: min(230px, calc(100vw - 28px));
  background: #102f27;
  transform: translateY(5px);
}
.readiness button[data-tooltip]:hover::before,
.readiness button[data-tooltip]:focus-visible::before { transform: translateY(0); }

.result-narrative { padding: 20px 23px; display: flex; align-items: center; gap: 16px; }
.result-narrative.result-state-updated { animation: result-state-refresh .48s ease; }
@keyframes result-state-refresh {
  0% { box-shadow: 0 0 0 0 rgba(36,116,91,.18); }
  45% { box-shadow: 0 0 0 5px rgba(36,116,91,.11), 0 10px 24px rgba(23,59,50,.1); }
  100% { box-shadow: var(--shadow); }
}
.narrative-icon { width: 43px; height: 43px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 20px; font-weight: 900; }
.result-narrative.warning .narrative-icon { background: #f4e7d5; color: #9a6c2d; }
.result-narrative h2 { font-size: 22px; }
.result-narrative p:last-child { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.hero-guidance {
  grid-column: 1 / 3;
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(430px,.95fr);
  align-items: center;
  gap: 16px;
  padding: 10px 13px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px;
  background: rgba(255,255,255,.075);
  color: #fff;
  position: relative;
  z-index: 1;
}
.plan-focal-hero > .hero-guidance {
  grid-column: 1 / 3;
  grid-template-columns: minmax(240px,.65fr) minmax(700px,1.35fr);
}
.hero-guidance-message { min-width: 0; display: flex; align-items: center; gap: 11px; }
.hero-guidance-message > div { min-width: 0; }
.hero-guidance-message #narrativeCopy { max-width: 100%; overflow-wrap: anywhere; }
.hero-guidance .narrative-icon {
  width: 48px;
  height: 48px;
  padding: 0 0 2px;
  background: rgba(229,241,234,.2);
  color: #e7f4ed;
  font-family: Arial, sans-serif;
  font-size: 25px;
  line-height: 1;
  text-align: center;
  box-shadow: 0 0 0 2px rgba(255,255,255,.08);
}
.hero-guidance.warning .narrative-icon {
  background: #f5b942;
  color: #432600;
  box-shadow: 0 0 0 2px rgba(255,220,145,.6), 0 0 16px rgba(245,185,66,.24);
}
.hero-guidance.depleted .narrative-icon {
  background: #d92d20;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(255,112,102,.52), 0 0 18px rgba(217,45,32,.3);
}
.hero-guidance h2 { margin: 1px 0 0; color: #fff; font-size: 18px; line-height: 1.15; }
.hero-guidance p.eyebrow { margin: 0 0 3px; font-size: 8px; }
.hero-guidance p:last-child { margin: 3px 0 0; color: #c8d9d2; font-size: 10px; line-height: 1.35; }
.hero-guidance-comparison { min-width: 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border: 1px solid rgba(255,255,255,.13); border-radius: 8px; background: rgba(7,37,29,.18); overflow: hidden; }
.hero-guidance-comparison article { min-width: 0; padding: 8px 11px; }
.hero-guidance-comparison article + article { border-left: 1px solid rgba(255,255,255,.14); }
.hero-guidance-comparison span,
.hero-guidance-comparison strong,
.hero-guidance-comparison small { display: block; }
.hero-guidance-comparison span { color: #c8d9d2; font-size: 8px; font-weight: 750; line-height: 1.25; }
.hero-guidance-comparison strong { margin: 3px 0 1px; color: #fff; font: 600 20px Georgia,serif; }
.hero-guidance-comparison small { color: #aac3b9; font-size: 8px; line-height: 1.25; }
.hero-guidance-comparison .monthly-gap-box.has-gap strong { color: #ffb4ad; }
.hero-guidance-comparison .monthly-gap-box.no-gap strong { color: #bde4cf; }
.recommendation-brief {
  display: grid;
  grid-template-columns: auto minmax(280px,1.5fr) minmax(220px,.8fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
  padding: 12px 16px;
  border-left: 4px solid var(--green);
  background: linear-gradient(105deg,rgba(255,255,253,.98),rgba(239,246,241,.96));
}
.recommendation-brief.is-attention { border-left-color: var(--gold); background: linear-gradient(105deg,#fffefa,#f8f1e4); }
.recommendation-brief.is-critical { border-left-color: var(--red); background: linear-gradient(105deg,#fffdfc,#fff2ef); }
.recommendation-brief.is-incomplete { border-left-color: #a9b8b0; }
.recommendation-marker { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green); font: 800 10px/1 Arial,sans-serif; letter-spacing: .08em; }
.recommendation-brief.is-attention .recommendation-marker { background: #f5ead6; color: #8b6325; }
.recommendation-brief.is-critical .recommendation-marker { background: #f9e3df; color: var(--red); }
.recommendation-copy .eyebrow { margin-bottom: 5px; }
.recommendation-copy h2 { margin: 0; color: var(--ink); font: 500 21px/1.15 Georgia,serif; }
.recommendation-copy > p:last-child { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.35; }
.recommendation-impact { padding-left: 20px; border-left: 1px solid var(--line); }
.recommendation-impact span,
.recommendation-impact strong { display: block; }
.recommendation-impact span { color: var(--muted); font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.recommendation-impact strong { margin-top: 6px; font-size: 12px; line-height: 1.4; }
.recommendation-brief button { min-height: 38px; padding: 9px 14px; border: 1px solid var(--green); border-radius: 8px; background: var(--green); color: #fff; font-size: 10px; font-weight: 800; white-space: nowrap; }
.green-result-number-help {
  border-radius: 4px;
  cursor: help;
  outline: none;
  text-decoration: none;
}
.green-result-number-help:focus-visible {
  box-shadow: 0 0 0 2px #f3d99d, 0 0 0 4px rgba(18,61,49,.9);
}
.guided-help-popover.result-number-popover { white-space: pre-line; }

.chart-card { padding: 27px 30px 21px; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.chart-controls { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.segmented { display: flex; padding: 3px; border-radius: 8px; background: #edf2ef; }
.segmented button { padding: 5px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 8px; font-weight: 800; }
.segmented button.active { background: white; color: var(--green); box-shadow: 0 2px 8px rgba(23,59,50,.08); }
.legend { font-size: 10px; color: #7c8983; display: flex; align-items: center; gap: 8px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-left: 10px; }
.green { background: var(--green); }
.gold { background: var(--gold); }
.poor { background: #c16b52; }
.chart { height: calc(352px + var(--milestone-extra-space, 0px)); position: relative; margin-top: 17px; cursor: crosshair; }
.chart svg { position: absolute; z-index: 2; top: calc(84px + var(--milestone-extra-space, 0px)); left: 0; width: 100%; height: 220px; overflow: visible; background: repeating-linear-gradient(to bottom,transparent 0,transparent 55px,#edf1ee 56px); }
.chart path { fill: none; stroke-width: 1.8; vector-effect: non-scaling-stroke; transition: d .35s ease; }
.chart.chart-updated svg { animation: chart-reveal .58s cubic-bezier(.2,.75,.25,1) both; }
@keyframes chart-reveal {
  from { opacity: .35; clip-path: inset(0 100% 0 0); }
  to { opacity: 1; clip-path: inset(0 0 0 0); }
}
.green-line { stroke: var(--green); }
.poor-line { stroke: #c16b52; stroke-dasharray: 3 3; }
.median-line { stroke: var(--gold); stroke-width: 2.3 !important; }
.strong-line { stroke: #54856e; stroke-dasharray: 3 3; }
.goal-line { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--gold); z-index: 1; }
.goal-line span { position: absolute; right: 0; top: -18px; font-size: 9px; color: #a77a32; }
.chart-labels { position: absolute; right: 0; bottom: 0; left: 0; display: flex; justify-content: space-between; font-size: 10px; color: #819088; }
.success-copy { text-align: right; font-size: 10px; color: #7b8983; }
.success-copy strong { display: block; font: 500 25px Georgia,serif; color: var(--gold); margin-top: 8px; }
.simulation-copy { color: #7e8b85; font-size: 11px; line-height: 1.5; }
.legend.draw b { margin-left: auto; color: #4f675d; }
.y-axis-chart { margin-left: 54px; }
.y-axis-labels { position: absolute; right: calc(100% + 8px); top: calc(109px + var(--milestone-extra-space, 0px)); width: 48px; height: 177px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; color: #708078; font-size: 9px; font-variant-numeric: tabular-nums; }
.y-axis-chart .chart-labels { padding-top: 2px; }
.chart-tooltip { position: absolute; z-index: 8; min-width: 150px; max-width: min(220px, calc(100% - 14px)); padding: 10px 12px; border-radius: 9px; background: #153f34; color: white; box-shadow: 0 9px 24px rgba(18,55,44,.24); pointer-events: none; font-size: 10px; line-height: 1.45; transform: none; }
.chart-tooltip b, .chart-tooltip span { display: block; }
.chart-tooltip b { margin-bottom: 3px; font: 600 15px Georgia, serif; color: #f3d99d; }
.chart-tooltip[data-curve="poor"] { border-left: 4px solid #c16b52; }
.chart-tooltip[data-curve="median"],
.chart-tooltip[data-curve="goal"] { border-left: 4px solid var(--gold); }
.chart-tooltip[data-curve="strong"],
.chart-tooltip[data-curve="portfolio"] { border-left: 4px solid #6eae8e; }
.milestone-line { stroke: rgba(65,116,95,.5); stroke-width: .6; stroke-dasharray: 2 2; vector-effect: non-scaling-stroke; }
.milestone-line.milestone-income { stroke: rgba(49,103,132,.58); }
.milestone-line.milestone-event { stroke: rgba(177,125,46,.65); }
.milestone-line.milestone-horizon { stroke: rgba(130,91,82,.55); }
.milestone-labels { position: absolute; z-index: 5; top: 0; right: 0; left: 0; height: calc(84px + var(--milestone-extra-space, 0px)); pointer-events: none; overflow: hidden; }
.milestone-label-connector { position: absolute; z-index: 0; bottom: 0; width: 0; border-left: 1px dashed rgba(65,116,95,.55); }
.milestone-label-connector.milestone-income { border-left-color: rgba(49,103,132,.62); }
.milestone-label-connector.milestone-event { border-left-color: rgba(177,125,46,.7); }
.milestone-label-connector.milestone-horizon { border-left-color: rgba(130,91,82,.6); }
.milestone-labels .milestone-label { position: absolute; z-index: 1; width: max-content; max-width: 190px; padding: 3px 6px; border: 1px solid rgba(199,217,207,.8); border-radius: 5px; background: rgba(255,255,253,.94); color: #3f6e5b; box-shadow: 0 2px 7px rgba(20,61,48,.06); font: 700 9px/1.25 "Segoe UI",Arial,sans-serif; white-space: normal; overflow-wrap: anywhere; transform: translateX(30px); }
.milestone-labels .milestone-label::before { content: ""; position: absolute; top: 50%; right: 100%; width: 25px; border-top: 1px solid #41745f; transform: translateY(-50%); }
.milestone-labels .milestone-label::after { content: ""; position: absolute; top: 50%; right: calc(100% + 25px); border: 3px solid transparent; border-right: 4px solid #41745f; transform: translateY(-50%); }
.milestone-labels .milestone-label.align-right { transform: translateX(calc(-100% - 30px)); }
.milestone-labels .milestone-label.align-right::before { right: auto; left: 100%; }
.milestone-labels .milestone-label.align-right::after { right: auto; left: calc(100% + 25px); border-right-color: transparent; border-left-color: #41745f; }
.milestone-labels .milestone-income { color: #356b82; }
.milestone-labels .milestone-event { color: #956a27; }
.milestone-labels .milestone-horizon { color: #79584f; }

.presentation-controls { position: fixed; z-index: 500; top: 16px; right: 18px; display: flex; align-items: center; gap: 12px; padding: 8px 9px 8px 13px; border: 1px solid rgba(255,255,255,.26); border-radius: 999px; background: rgba(18,55,44,.94); color: #fff; box-shadow: 0 10px 28px rgba(12,44,34,.25); backdrop-filter: blur(10px); }
.presentation-controls[hidden] { display: none; }
.presentation-controls span { font-size: 10px; font-weight: 750; }
.presentation-controls button { padding: 6px 10px; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; font-size: 9px; font-weight: 800; }
.presentation-mode .topbar,
.presentation-mode .intro-actions,
.presentation-mode .plan-toolbar,
.presentation-mode .scenario-lab,
.presentation-mode .toolbar-actions { display: none !important; }
.presentation-mode .intro { margin-bottom: 18px; }
.presentation-mode .intro-copy p:last-child { display: none; }
.presentation-mode .page-shell { max-width: 1800px; padding-top: 26px; }
.presentation-mode .dashboard { grid-template-columns: 1fr; }
.presentation-mode .profile { display: none; }
.presentation-mode .results { grid-column: 1; }

.insights-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.insights-row article { min-height: 120px; border: 1px solid #d9e4dd; border-radius: 13px; background: #f0f6f2; padding: 20px; display: flex; gap: 14px; transition: transform .18s ease, box-shadow .18s ease; }
.insights-row article:hover { transform: translateY(-3px); box-shadow: 0 9px 22px rgba(28,74,58,.08); }
.insights-row article:last-child { background: #f5f1e8; }
.insights-row .icon { width: 34px; height: 34px; border-radius: 50%; background: #dcece3; display: grid; place-items: center; font-size: 18px; color: var(--green); flex: 0 0 auto; }
.insights-row .icon.gold { background: #eee2cc; color: #a47936; }
.insights-row .icon.blue { background: #dce9ed; color: #3f6d7e; }
.insights-row b { display: block; font-size: 11px; }
.insights-row strong { display: block; font: 500 21px Georgia,serif; margin: 13px 0 6px; }
.insights-row small { display: block; color: #819088; }
.insights-row button { border: 0; background: none; padding: 0; color: var(--green); font-size: 10px; font-weight: 700; text-decoration: underline; }

.simple-page { padding: 35px; }
.simple-page > div:not(.page-title-row) { display: grid; grid-template-columns: repeat(3,1fr); gap: 15px; margin-top: 25px; }
.simple-page article { padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #f5f8f5; }
.simple-page h3 { font: 500 20px Georgia,serif; }
.simple-page p { line-height: 1.6; }
.page-title-row { display: flex; justify-content: space-between; align-items: center; }
.section-lead { color: var(--muted); max-width: 720px; }
.insight-action { display: flex; flex-direction: column; }
.insight-action:has(button) { transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.insight-action:has(button):hover { z-index: 1; border-color: #b8d3c4; transform: translateY(-4px); box-shadow: 0 13px 28px rgba(28,74,58,.13); }
.insight-action .projected-impact { color: var(--green); font-weight: 800; }
.insight-impact-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:16px 0 4px}.insight-impact-details div{padding:10px;border:1px solid #d7e2dc;border-radius:9px;background:#fff}.insight-impact-details dt{font-size:11px;line-height:1.3;color:#60766e;font-weight:700}.insight-impact-details dd{margin:5px 0 0;font:700 17px/1.2 Georgia,serif;color:#214f40}.insight-impact-details small{display:block;margin-top:4px;font:600 10px/1.3 system-ui,sans-serif;color:#6b7d76}
@media(max-width:700px){.insight-impact-details{grid-template-columns:1fr}}
.insight-action .action-row { margin-top: auto; padding-top: 12px; display: flex; align-items: flex-start; gap: 14px; }
.insight-result-explanation { flex: 1; margin: 0; color: #526a61; font-size: 11px; line-height: 1.55; font-weight: 500; }
.insight-action button { padding: 7px 10px; border: 1px solid #bfd3c7; border-radius: 7px; background: white; color: var(--green); font-size: 10px; font-weight: 800; }
.insight-action button.apply { background: var(--green); border-color: var(--green); color: white; }

/* Compact desktop workspace: keep the planning controls and key results in view
   while preserving the single-column flow at smaller window sizes. */
@media (min-width: 1180px) {
  .topbar {
    height: 64px;
    margin-left: auto;
  }
  .topbar nav {
    gap: 32px;
  }
  .page-shell {
    max-width: 2200px;
    padding-top: 12px;
  }
  .intro {
    align-items: center;
    margin-bottom: 8px;
  }
  .intro-masthead { align-items: center; gap: 10px; }
  .intro .eyebrow {
    display: none;
  }
  .intro h1 {
    font-size: clamp(25px, 2.1vw, 34px);
    margin: 0;
    letter-spacing: -1.4px;
    white-space: nowrap;
  }
  .intro p:last-child {
    margin: 0;
    font-size: 12px;
  }
  .intro-actions {
    flex-direction: row;
    align-items: center;
    align-self: flex-start;
    gap: 4px;
    margin-left: auto;
    min-height: 64px;
    transform: none;
  }
  .quiet-button {
    padding: 7px 10px;
  }
  .plan-toolbar {
    align-items: center;
    padding: 4px 10px;
    margin-bottom: 8px;
  }
  .plan-picker {
    display: grid;
    align-items: stretch;
    gap: 3px;
  }
  .plan-picker label {
    margin-bottom: 0;
    text-align: center;
  }
  .plan-picker select {
    padding-top: 6px;
    padding-bottom: 6px;
  }
  .plan-focal-hero {
    min-height: 0;
    grid-template-columns: minmax(220px, .8fr) minmax(510px, 1.65fr) 132px;
    gap: 18px;
    padding: 14px 22px;
    margin-bottom: 8px;
  }
  .hero-card h2 {
    margin: 7px 0 8px;
    font-size: clamp(36px, 3.5vw, 50px);
  }
  .hero-card > div > strong {
    margin-top: 8px;
    font-size: 21px;
  }
  .hero-card > div > small {
    margin-top: 7px;
  }
  .hero-withdrawal-snapshot {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    padding: 7px;
  }
  .hero-withdrawal-snapshot .scenario-rate-heading {
    grid-column: 1 / -1;
  }
  .hero-withdrawal-snapshot .scenario-rate-heading span {
    display: none;
  }
  .hero-withdrawal-snapshot .rate-cards.scenario-rates article,
  .hero-withdrawal-snapshot .scenario-calculated-field {
    padding: 7px 9px;
  }
  .hero-withdrawal-snapshot .rate-cards.scenario-rates,
  .hero-withdrawal-snapshot .scenario-retirement-values {
    align-content: stretch;
  }
  .hero-withdrawal-snapshot .hero-outlook-values {
    grid-column: 1 / -1;
  }
  .hero-withdrawal-snapshot :is(.hero-replenishment-portfolio,.hero-ending-portfolio,.hero-depletion-age) output {
    font-size: 21px;
  }
  .ring {
    width: 116px;
    height: 116px;
  }
  .ring::after {
    inset: 9px;
  }
  .ring strong {
    font-size: 34px;
  }
  .scenario-lab {
    padding: 12px 16px;
    margin-bottom: 8px;
  }
  .scenario-header { align-items: center; }
  .scenario-intro {
    max-width: none;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 4px 14px;
  }
  .scenario-intro .eyebrow {
    grid-column: 1;
    grid-row: 1;
    margin-bottom: 0;
  }
  .scenario-title-row {
    grid-column: 1;
    grid-row: 2;
    gap: 24px;
  }
  .scenario-intro > p:last-child {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: start;
  }
  .scenario-lab h2 {
    margin: 0;
    font-size: 21px;
  }
  .scenario-overview {
    margin-top: 8px;
  }
  .scenario-input-section {
    padding: 10px;
  }
  .scenario-person-grid {
    display: contents;
  }
  .scenario-input-section {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
  }
  .scenario-choice-heading,
  .assumption-warning {
    grid-column: 1 / -1;
  }
  .scenario-choice-heading {
    margin-bottom: 0;
  }
  .scenario-input-card,
  .scenario-household-card {
    padding: 8px 10px;
  }
  .scenario-household-card {
    margin-top: 0;
  }
  .scenario-input-card-head {
    padding-bottom: 5px;
    margin-bottom: 6px;
  }
  .scenario-input-card-head b {
    font-size: 15px;
  }
  .scenario-person-fields,
  .scenario-financial-fields,
  .scenario-household-grid {
    gap: 7px;
  }
  .scenario-household-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .scenario-person-fields .input-wrap,
  .scenario-financial-fields .input-wrap,
  .scenario-household-grid .input-wrap {
    min-height: 30px;
    margin-top: 2px;
  }
  .impact-strip {
    min-height: 40px;
    margin-bottom: 10px;
    padding: 7px 13px;
  }
  .results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .result-narrative,
  .insights-row {
    grid-column: 1 / -1;
  }
  .result-narrative {
    padding: 13px 18px;
  }
  .result-narrative .eyebrow {
    margin-bottom: 5px;
  }
  .hero-guidance {
    padding: 8px 10px;
  }
  .chart-card {
    min-width: 0;
    padding: 18px 20px 15px;
  }
  .chart-head h2 {
    font-size: 22px;
  }
  .chart {
    height: calc(322px + var(--milestone-extra-space, 0px));
  }
  .chart svg {
    height: 190px;
  }
  .y-axis-labels {
    top: calc(109px + var(--milestone-extra-space, 0px));
    height: 150px;
  }
  .insights-row {
    gap: 10px;
  }
  .insights-row article {
    min-height: 96px;
    padding: 14px;
  }
}

/* Reserve the larger typography for wide monitors. The fitted 1920px canvas
   keeps the same proportions even when inverse scaling increases its height. */
@media (min-width: 2500px) and (min-height: 1200px) {
  body { font-size: 16px; }
  .topbar { height: 86px; padding-left: 2.2vw; padding-right: 2.2vw; }
  .intro-actions { min-height: 86px; }
  .masthead-logo { width: 350px; height: 103px; }
  .topbar nav { gap: 50px; }
  .topbar nav button, .topbar nav .user-options-menu > summary { font-size: 15px; }
  .saved { padding: 10px 16px; font-size: 12px; }
  .page-shell { max-width: 2280px; padding: 22px 1.5vw 48px; }
  .intro { margin-bottom: 10px; }
  .intro h1 { font-size: 46px; }
  .intro p:last-child { display: block; font-size: 13px; }
  .quiet-button { padding: 9px 17px; font-size: 13px; }
  .plan-toolbar { padding: 6px 12px; margin-bottom: 12px; }
  .plan-picker select { min-width: 225px; }
  .toolbar-actions button { min-height: 27px; padding: 3px 9px; font-size: 10px; }
  .plan-focal-hero {
    grid-template-columns: minmax(270px,.78fr) minmax(700px,1.65fr) 150px;
    gap: 22px;
    padding: 22px 28px;
    margin-bottom: 12px;
  }
  .hero-card h2 { margin: 10px 0 12px; font-size: 54px; }
  .hero-withdrawal-snapshot { padding: 12px; gap: 11px; }
  .hero-withdrawal-snapshot .rate-cards.scenario-rates article,
  .hero-withdrawal-snapshot .scenario-calculated-field { padding: 10px 12px; }
  .hero-withdrawal-snapshot :is(.hero-replenishment-portfolio,.hero-ending-portfolio,.hero-depletion-age) output { font-size: 31px; }
  .ring { width: 128px; height: 128px; }
  .ring strong { font-size: 38px; }
  .hero-guidance { gap: 20px; padding: 11px 14px; }
  .hero-guidance h2 { font-size: 20px; }
  .hero-guidance p:last-child { font-size: 11px; }
  .hero-guidance-comparison article { padding: 9px 13px; }
  .hero-guidance-comparison strong { font-size: 29px; }
  .scenario-lab { padding: 18px 22px; margin-bottom: 12px; }
  .scenario-lab h2 { font-size: 28px; }
  .scenario-overview { margin-top: 10px; }
  .scenario-input-section { gap: 11px; padding: 12px; }
  .scenario-input-card,
  .scenario-household-card { padding: 11px 13px; }
  .scenario-input-card-head { padding-bottom: 7px; margin-bottom: 8px; }
  .scenario-input-card-head b { font-size: 18px; }
  .scenario-person-fields,
  .scenario-financial-fields,
  .scenario-household-grid { gap: 9px; }
  .scenario-person-fields label,
  .scenario-financial-fields label,
  .scenario-household-grid label { font-size: 10px; }
  .scenario-person-fields .input-wrap,
  .scenario-financial-fields .input-wrap,
  .scenario-household-grid .input-wrap { min-height: 36px; }
}

@media (min-width: 1180px) and (max-width: 1899px) and (max-height: 950px) {
  .intro .intro-copy {
    position: static;
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: none;
    text-align: center;
    pointer-events: none;
  }
  .intro .intro-copy h1 { margin: 0; white-space: nowrap; }
  .intro .intro-copy .eyebrow,
  .intro .intro-copy > p { display: none; }
  .intro { display: grid; grid-template-columns: 240px minmax(0,1fr) auto; grid-template-rows: 71px auto; align-items: start; column-gap: 16px; row-gap: 8px; }
  .topbar {
    position: static;
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    height: 71px;
    min-width: 0;
    margin-left: 0;
    transform: none;
  }
  .topbar nav { position: absolute; left: 50vw; width: max-content; gap: 10px; transform: translateX(-50%); }
  .topbar nav button, .topbar nav .user-options-menu > summary { font-size: 12px; }
  .topbar .saved { display: none; }
  .intro-masthead { display: contents; }
  .masthead-logo-frame { grid-column: 1; grid-row: 1; }
  .intro-actions { grid-column: 3; grid-row: 1; min-height: 71px; gap: 2px; transform: none; }
  .masthead-logo { width: 240px; height: 71px; }
  .page-shell { padding-top: 7px; }
  .intro { margin-bottom: 4px; border-bottom: 1px solid var(--line); }
  .quiet-button { padding: 6px 8px; font-size: 12px; }
  .release-version { padding-right: 0; }
  .intro p:last-child { display: none; }
  .plan-toolbar { padding: 4px 10px; margin-bottom: 5px; }
  .plan-focal-hero {
    grid-template-columns: minmax(220px,.75fr) minmax(500px,1.65fr) 116px;
    gap: 12px;
    padding: 10px 16px;
    margin-bottom: 5px;
  }
  .hero-card h2 { margin: 4px 0 5px; font-size: 34px; }
  .hero-card p:not(.eyebrow) { margin: 3px 0; font-size: 9px; }
  .hero-withdrawal-snapshot { gap: 5px; padding: 6px; }
  .hero-withdrawal-snapshot .rate-cards.scenario-rates article,
  .hero-withdrawal-snapshot .scenario-calculated-field { padding: 4px 6px; }
  .hero-withdrawal-snapshot .rate-cards.scenario-rates strong,
  .hero-withdrawal-snapshot .scenario-calculated-field output { margin: 2px 0; font-size: 24px; line-height: 1.02; }
  .hero-withdrawal-snapshot .rate-cards b { font-size: 15px; }
  .hero-withdrawal-snapshot :is(.hero-replenishment-portfolio,.hero-ending-portfolio,.hero-depletion-age) output { font-size: 26px; }
  .ring { width: 92px; height: 92px; }
  .ring::after { inset: 7px; }
  .ring strong { font-size: 28px; }
  .readiness { gap: 3px; font-size: 9px; }
  .hero-guidance { gap: 9px; padding: 6px 8px; }
  .hero-guidance h2 { font-size: 15px; }
  .hero-guidance p:last-child { margin-top: 3px; font-size: 8px; }
  .hero-guidance-comparison article { padding: 4px 7px; }
  .hero-guidance-comparison strong { font-size: 24px; }
  .scenario-lab { padding: 8px 12px; margin-bottom: 5px; }
  .scenario-overview { margin-top: 5px; }
  .scenario-input-section { gap: 6px; padding: 7px; }
  .scenario-input-card,
  .scenario-household-card { padding: 6px 8px; }
  .scenario-input-card-head { padding-bottom: 5px; margin-bottom: 6px; }
  .scenario-input-card-head b { font-size: 17px; }
  .scenario-input-card-head span { font-size: 10px; }
  .scenario-person-fields,
  .scenario-financial-fields,
  .scenario-household-grid { gap: 5px; }
  .scenario-person-fields label,
  .scenario-financial-fields label,
  .scenario-household-grid label { font-size: 10px; }
  .scenario-person-fields .input-wrap,
  .scenario-financial-fields .input-wrap,
  .scenario-household-grid .input-wrap { min-height: 34px; }
  .scenario-person-fields .input-wrap input,
  .scenario-financial-fields .input-wrap input,
  .scenario-household-grid .input-wrap input { padding-top: 7px; padding-bottom: 7px; font-size: 12px; }
  .scenario-person-fields .input-wrap small,
  .scenario-financial-fields .input-wrap small,
  .scenario-household-grid .input-wrap small { font-size: 10px; }
}

/* Keep the masthead in two deliberate rows until there is enough horizontal
   room for the logo, tagline, navigation, and utility buttons side by side. */
@media (min-width: 1180px) and (max-width: 2499px) {
  .intro {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr) auto;
    grid-template-rows: 71px auto;
    align-items: start;
    column-gap: 16px;
    row-gap: 8px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--line);
  }
  .intro-masthead { display: contents; }
  .masthead-logo-frame { grid-column: 1; grid-row: 1; }
  .masthead-logo { width: 240px; height: 71px; }
  .topbar {
    position: static;
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    height: 71px;
    min-width: 0;
    margin-left: 0;
    transform: none;
  }
  .intro .intro-copy {
    position: static;
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: none;
    text-align: center;
    pointer-events: none;
  }
  .intro .intro-copy h1 { margin: 0; white-space: nowrap; }
  .intro .intro-copy .eyebrow,
  .intro .intro-copy > p { display: none; }
  .intro-actions {
    grid-column: 3;
    grid-row: 1;
    min-height: 71px;
    gap: 2px;
    transform: none;
  }
}

/* Leave a finished edge above desktop browser control bars on shorter screens. */
@media (min-width: 1180px) and (max-height: 1400px),
       (min-width: 1900px) and (max-width: 2499px) {
  .page-shell { padding-top: 4px; padding-bottom: 24px; }
  .intro {
    grid-template-rows: 62px auto;
    row-gap: 3px;
    margin-bottom: 2px;
  }
  .masthead-logo { width: 210px; height: 62px; }
  .topbar { height: 62px; }
  .intro-actions { min-height: 62px; }
  .recommendation-brief { margin-bottom: max(18px, env(safe-area-inset-bottom)); }
}

@media (min-width: 1900px) and (max-height: 1400px),
       (min-width: 1900px) and (max-width: 2499px) {
  .plan-toolbar { padding: 4px 10px; margin-bottom: 6px; }
  .executive-summary { margin-bottom: 6px; }
  .executive-summary-heading,
  .executive-summary article { padding: 5px 10px; }
  .plan-focal-hero { min-height: 0; gap: 12px; padding: 12px 18px; margin-bottom: 6px; }
  .hero-card h2 { margin: 5px 0 7px; font-size: 36px; }
  .hero-withdrawal-snapshot { gap: 5px; padding: 6px; }
  .hero-withdrawal-snapshot .rate-cards.scenario-rates article,
  .hero-withdrawal-snapshot .scenario-calculated-field { padding: 5px 7px; }
  .hero-withdrawal-snapshot .rate-cards.scenario-rates strong,
  .hero-withdrawal-snapshot .scenario-calculated-field output { margin: 2px 0; font-size: 24px; }
  .ring { width: 96px; height: 96px; }
  .ring::after { inset: 7px; }
  .ring strong { font-size: 29px; }
  .hero-guidance { gap: 9px; padding: 6px 8px; }
  .hero-guidance h2 { font-size: 15px; }
  .hero-guidance p:last-child { margin-top: 3px; font-size: 8px; }
  .hero-guidance-comparison article { padding: 4px 7px; }
  .hero-guidance-comparison strong { font-size: 24px; }
}

.input-wrap:has(input.number-pending), .range-entry:has(input.number-pending) {
  border-color: #c39a4a;
  background: #fffaf0;
  box-shadow: 0 0 0 3px rgba(195,154,74,.12);
}
.input-wrap:has(#s1Retire:not(.number-pending)),
.input-wrap:has(#s2Retire:not(.number-pending)) {
  background: #fff;
}
.entry-confirmed { animation: entry-confirmed .4s ease-out; }
@keyframes entry-confirmed {
  0% { border-color: #42a57e; box-shadow: 0 0 0 0 rgba(36,116,91,.32); background: #eaf7f0; }
  55% { border-color: #42a57e; box-shadow: 0 0 0 4px rgba(36,116,91,.14); background: #f4fbf7; }
  100% { border-color: #ccd9d1; box-shadow: 0 0 0 0 rgba(36,116,91,0); background: #fff; }
}

dialog { border: 0; padding: 0; color: var(--ink); box-shadow: 0 28px 90px rgba(13,51,40,.32); }
dialog::backdrop { background: rgba(10,40,32,.58); backdrop-filter: blur(4px); }
.welcome-dialog { width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow: hidden; border-radius: 20px; }
.welcome-dialog form { width: 100%; height: min(980px, calc(100vh - 24px)); height: min(980px, calc(100dvh - 24px)); min-height: 0; padding: 43px 48px 0; position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: inherit; background: radial-gradient(circle at 90% 0,#edf4ec,transparent 30%),#fff; }
.welcome-progress { height: 5px; position: absolute; left: 0; right: 0; top: 0; background: #e9eeeb; }
.welcome-progress span { display: block; width: 25%; height: 100%; background: linear-gradient(90deg,var(--green),#77a88e); transition: width .3s ease; }
.welcome-step-markers { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 0; margin: 9px 0 2px; padding: 0; list-style: none; }
.welcome-step-markers li { position: relative; display: grid; justify-items: center; gap: 5px; color: #829088; font-size: 9px; font-weight: 750; text-align: center; }
.welcome-step-markers li::before { position: absolute; top: 12px; right: 50%; left: -50%; height: 2px; background: #dbe5df; content: ""; }
.welcome-step-markers li:first-child::before { display: none; }
.welcome-step-markers span { position: relative; z-index: 1; width: 25px; height: 25px; display: grid; place-items: center; border: 2px solid #cbd9d1; border-radius: 50%; background: #fff; color: #6e8178; transition: color .2s ease, border-color .2s ease, background-color .2s ease, transform .2s ease; }
.welcome-step-markers li.active { color: var(--green); }
.welcome-step-markers li.active span { border-color: var(--green); color: var(--green); transform: scale(1.08); box-shadow: 0 0 0 4px rgba(36,116,91,.08); }
.welcome-step-markers li.complete { color: #4d7464; }
.welcome-step-markers li.complete::before { background: #8db7a4; }
.welcome-step-markers li.complete span { border-color: var(--green); background: var(--green); color: #fff; }
.dialog-close { position: absolute; top: 18px; right: 20px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: #edf3ef; font-size: 21px; line-height: 1; transition: background-color .15s ease, color .15s ease, box-shadow .15s ease; }
.dialog-close:hover { background: #dfeae4; color: var(--green); box-shadow: 0 4px 12px rgba(23, 59, 50, .16); }
.dialog-close:active { background: #d6e5dd; }
.welcome-step { display: none; min-height: 0; animation: welcome-in .28s ease; }
.welcome-step.active { display: block; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 0 12px 20px 5px; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: #8dad9d #edf3ef; }
.welcome-step.active::-webkit-scrollbar { width: 9px; height: 9px; }
.welcome-step.active::-webkit-scrollbar-track { border-radius: 999px; background: #edf3ef; }
.welcome-step.active::-webkit-scrollbar-thumb { min-height: 36px; border: 2px solid #edf3ef; border-radius: 999px; background: #8dad9d; }
.welcome-step.active::-webkit-scrollbar-thumb:hover { background: #638a77; }
@keyframes welcome-in { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: translateX(0); } }
.welcome-step h2, .save-dialog h2 { margin: 20px 0 9px; font: 500 36px Georgia, serif; }
.welcome-step > p { color: var(--muted); margin-bottom: 25px; }
.plan-type.wide { width: 290px; }
.welcome-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.guided-household-grid .guided-person-one { grid-column: 1; }
.guided-household-grid .guided-person-two { grid-column: 2; }
.guided-household-grid .guided-name { grid-row: 1; }
.guided-household-grid .guided-age { grid-row: 2; }
.guided-household-grid .guided-retire { grid-row: 3; }
.guided-household-grid .guided-event-age { grid-row: 4; }
.guided-household-grid .guided-event-amount { grid-row: 5; }
.guided-household-grid .guided-life { grid-row: 6; }
.guided-savings-grid .guided-person-one { grid-column: 1; }
.guided-savings-grid .guided-person-two { grid-column: 2; }
.guided-savings-grid .guided-salary { grid-row: 1; }
.guided-savings-grid .guided-pension { grid-row: 2; }
.guided-savings-grid .guided-rental { grid-row: 3; }
.guided-savings-grid .guided-part-time { grid-row: 4; }
.guided-savings-grid .guided-pre-tax { grid-row: 5; }
.guided-savings-grid .guided-roth { grid-row: 6; }
.guided-savings-grid .guided-pre-tax-contribution { grid-row: 7; }
.guided-savings-grid .guided-roth-contribution { grid-row: 8; }
.guided-savings-grid .guided-employer-match { grid-row: 9; }
.guided-savings-grid .guided-other-one { grid-row: 10; }
.guided-savings-grid .guided-other-two { grid-row: 11; }
.guided-savings-grid .guided-annuity { grid-row: 12; }
.guided-savings-grid { gap: 10px 15px; }
.guided-savings-grid input { margin-top: 5px; padding-top: 9px; padding-bottom: 9px; }
.guided-savings-grid .guided-money-input { margin-top: 5px; }
.guided-retirement-grid .guided-person-one { grid-column: 1; }
.guided-retirement-grid .guided-person-two { grid-column: 2; }
.guided-retirement-grid .guided-social-status { grid-row: 1; }
.guided-retirement-grid .guided-social-age { grid-row: 2; }
.guided-retirement-grid .guided-social-benefit { grid-row: 3; }
.guided-assumptions-grid .guided-person-one { grid-row: 1; }
.guided-assumptions-grid .guided-person-two { grid-row: 2; }
.guided-assumptions-grid .guided-pre-return { grid-column: 1; }
.guided-assumptions-grid .guided-post-return { grid-column: 2; }
.guided-assumptions-grid .guided-current-spending { grid-column: 1 / -1; grid-row: 3; }
.guided-assumptions-grid .guided-household-inflation { grid-column: 1 / -1; grid-row: 4; }
.post-retirement-mode .guided-assumptions-grid .guided-post-return.guided-person-one { grid-column: 1; grid-row: 1; }
.post-retirement-mode .guided-assumptions-grid .guided-post-return.guided-person-two { grid-column: 2; grid-row: 1; }
.post-retirement-mode .guided-assumptions-grid .guided-current-spending { grid-row: 2; }
.post-retirement-mode .guided-assumptions-grid .guided-household-inflation { grid-row: 3; }
.guided-inheritance-pair {
  position: relative;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 4px;
  padding-top: 14px;
}
.guided-inheritance-pair > label { color: #000; }
.guided-inheritance-pair input {
  color: #000;
  -webkit-text-fill-color: #000;
}
.welcome-grid label, .save-dialog label { font-size: 11px; font-weight: 750; }
.welcome-grid input, .save-dialog input, .save-dialog select { display: block; width: 100%; margin-top: 7px; padding: 11px 12px; border: 1px solid #cbd9d1; border-radius: 8px; background: white; }
.welcome-grid .guided-age-parts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 7px; }
.welcome-grid .guided-age-parts > span { display: flex; align-items: center; min-width: 0; border: 1px solid #cbd9d1; border-radius: 8px; background: white; }
.welcome-grid .guided-age-parts input { min-width: 0; margin: 0; border: 0; outline: 0; background: transparent; }
.welcome-grid .guided-age-parts b { padding-right: 10px; color: #687970; font-size: 10px; font-weight: 500; white-space: nowrap; }
.welcome-grid .guided-age-parts > span:focus-within { border-color: #559078; box-shadow: 0 0 0 3px rgba(36,116,91,.1); }
.welcome-grid .guided-money-input { display: flex; align-items: center; width: 100%; margin-top: 7px; border: 1px solid #cbd9d1; border-radius: 8px; background: white; transition: border-color .15s ease, box-shadow .15s ease; }
.welcome-grid .guided-money-input:focus-within { border-color: #559078; box-shadow: 0 0 0 3px rgba(36,116,91,.1); }
.welcome-grid .guided-money-input b { flex: 0 0 auto; padding-left: 12px; color: #687970; font-size: 12px; }
.welcome-grid .guided-money-input input { min-width: 0; margin: 0; padding-left: 6px; border: 0; outline: 0; background: transparent; }
.welcome-grid .guided-percent-input { display: flex; align-items: center; width: 100%; margin-top: 7px; border: 1px solid #cbd9d1; border-radius: 8px; background: white; transition: border-color .15s ease, box-shadow .15s ease; }
.welcome-grid .guided-percent-input:focus-within { border-color: #559078; box-shadow: 0 0 0 3px rgba(36,116,91,.1); }
.welcome-grid .guided-percent-input input { min-width: 0; margin: 0; border: 0; outline: 0; background: transparent; }
.welcome-grid .guided-percent-input b { flex: 0 0 auto; padding-right: 12px; color: #687970; font-size: 12px; }
.welcome-grid .guided-suffix-input { display: flex; align-items: center; width: 100%; margin-top: 7px; border: 1px solid #cbd9d1; border-radius: 8px; background: white; transition: border-color .15s ease, box-shadow .15s ease; }
.welcome-grid .guided-suffix-input:focus-within { border-color: #559078; box-shadow: 0 0 0 3px rgba(36,116,91,.1); }
.welcome-grid .guided-suffix-input input { min-width: 0; margin: 0; border: 0; outline: 0; background: transparent; }
.welcome-grid .guided-suffix-input small { flex: 0 0 auto; padding-right: 12px; color: #687970; font-size: 10px; font-weight: 500; white-space: nowrap; }
.welcome-grid label > input.number-pending,
.welcome-grid .guided-money-input:has(input.number-pending),
.welcome-grid .guided-percent-input:has(input.number-pending) {
  border-color: #c39a4a;
  background: #fffaf0;
  box-shadow: 0 0 0 3px rgba(195,154,74,.12);
}
.welcome-footer { position: static; flex: 0 0 auto; padding: 18px 0 28px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; background: #fff; }
.welcome-footer span { color: var(--muted); font-size: 10px; font-weight: 700; }
.welcome-footer div, .dialog-actions { display: flex; gap: 8px; justify-content: flex-end; }
.welcome-footer button, .dialog-actions button { padding: 9px 15px; border: 1px solid #c5d5cc; border-radius: 8px; background: white; font-weight: 750; }
.welcome-footer .primary, .dialog-actions .primary { background: var(--green); border-color: var(--green); color: white; }
.welcome-footer button:disabled { opacity: .4; }
.save-dialog { width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: hidden; border-radius: 17px; }
.save-dialog form { position: relative; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); padding: 38px; overflow-y: auto; overscroll-behavior: contain; }
.save-dialog h2 { font-size: 30px; }
.dialog-actions { margin-top: 24px; }
.dialog-note { padding: 12px; border-radius: 8px; background: #f1f5f2; color: var(--muted); font-size: 10px; line-height: 1.5; }
.report-dialog { width: min(820px, calc(100vw - 32px)); max-height: calc(100vh - 30px); border-radius: 18px; }
.report-dialog form { position: relative; max-height: calc(100vh - 30px); padding: 38px 42px 30px; overflow-y: auto; background: #fff; }
.report-dialog h2 { margin: 12px 0; font: 500 32px Georgia, serif; }
.user-manual-sections { display: grid; gap: 12px; margin: 20px 0; }
.user-manual-sections article { padding: 16px 18px; border: 1px solid #d7e2dc; border-left: 4px solid var(--green); border-radius: 10px; background: #fbfdfb; }
.user-manual-sections h3 { margin: 0 0 8px; color: var(--green); font: 600 18px Georgia, serif; }
.user-manual-sections p { margin: 7px 0 0; color: #526b62; line-height: 1.6; }
.user-manual-sections h4 { margin: 20px 0 7px; color: var(--ink); font-size: 12px; letter-spacing: .02em; }
.manual-mode-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:16px 0 20px}
.user-manual-sections .manual-mode-grid section{padding:16px 18px;border:1px solid #d5e2db;border-radius:9px;background:#f5faf7}
.user-manual-sections .manual-mode-grid h4{margin:0 0 9px;color:var(--green);font-size:15px;letter-spacing:0}
.user-manual-sections .manual-mode-grid p{font-size:12.5px;line-height:1.58!important}
.manual-mode-key{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 16px;margin:14px 0 20px;padding:15px 17px;border-radius:8px;background:#edf5f0}
.user-manual-sections .manual-mode-key p{margin:0;font-size:12.5px;line-height:1.55!important}
.user-manual-sections ul, .user-manual-sections ol { margin: 7px 0 0; padding-left: 22px; color: #526b62; }
.user-manual-sections li { margin: 8px 0; line-height: 1.6; }
.manual-dashboard-guide > p:last-child { margin-top: 18px; padding: 12px 14px; border-radius: 8px; background: #edf5f0; }
#assumptionsReport { display: grid; gap: 12px; margin-top: 18px; }
#assumptionsReport article { padding: 14px 16px; border: 1px solid #d7e2dc; border-radius: 10px; background: #fbfdfb; }
#assumptionsReport h3 { margin: 0 0 7px; color: var(--green); font-size: 14px; }
#assumptionsReport p, #assumptionsReport li { color: var(--muted); font-size: 11px; line-height: 1.55; }
#assumptionsReport ul { margin: 7px 0 0; padding-left: 19px; }
.about-dialog { width: min(650px, calc(100vw - 32px)); border-radius: 20px; }
.about-dialog { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: hidden; }
.about-dialog form { position: relative; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); padding: 38px 42px 34px; overflow-y: auto; overscroll-behavior: contain; background: radial-gradient(circle at 92% 0,#edf4ec,transparent 33%),#fff; }
.about-dialog img { display: block; width: min(330px, 75%); height: auto; margin-bottom: 26px; }
.about-dialog h2 { margin: 8px 0 4px; font: 500 32px Georgia,serif; color: var(--ink); }
.about-dialog p { color: var(--muted); font-size: 12px; line-height: 1.65; }
.about-dialog .about-tagline { margin: 0 0 18px; color: var(--green); font: italic 500 18px Georgia,serif; }
.about-principles { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 22px 0; }
.about-principles article { padding: 14px; border: 1px solid #d8e3dc; border-radius: 11px; background: #f6f9f7; }
.about-principles strong, .about-principles span { display: block; }
.about-principles strong { margin-bottom: 6px; color: var(--ink); font-size: 11px; }
.about-principles span { color: var(--muted); font-size: 10px; line-height: 1.45; }
.about-dialog .about-product { margin-top: 0; }
.print-plan-inputs { display: none; }

@media print {
  @page { margin: .55in .45in .65in; }
  .topbar, .intro .quiet-button, .plan-toolbar, .scenario-lab, .impact-strip, .readiness button, .toolbar-actions, dialog { display: none !important; }
  body { background: white; }
  .page-shell { max-width: none; padding: 10px; }
  .intro { margin-bottom: 18px; }
  .intro h1 { font-size: 38px; }
  .dashboard { display: block; }
  .results { display: block; }
  .results > * { margin-bottom: 14px; break-inside: avoid; }
  .hero-card { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .print-plan-inputs { display: block; margin-top: 26px; padding-top: 24px; border-top: 2px solid #214f40; break-before: page; page-break-before: always; }
  .report-print .intro,
  .report-print #planTab > :not(.print-plan-inputs),
  .report-print .presentation-controls { display: none !important; }
  .report-print .print-plan-inputs { margin: 0; padding: 0; border: 0; break-before: auto; page-break-before: auto; }
  .print-report-cover { position: relative; display: flex; flex-direction: column; min-height: 9.2in; padding: .35in .25in; break-after: page; page-break-after: always; color: #173b31; }
  .print-report-cover img { width: 290px; height: auto; }
  .print-cover-rule { width: 74px; height: 4px; margin: 1.15in 0 .45in; background: linear-gradient(90deg,#bd8d3d,#24745b); }
  .print-report-cover .eyebrow { margin-bottom: 18px; color: #62776e; font-size: 11px; }
  .print-report-cover h1 { max-width: 7in; margin: 0; color: #173b31; font: 500 49px/1.08 Georgia,serif; }
  .print-cover-household { margin: 22px 0 0; color: #52675f; font: 500 20px Georgia,serif; }
  .print-cover-position { width: 3.5in; margin-top: .65in; padding: 18px 20px; border-left: 4px solid #bd8d3d; background: #edf4f0; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .print-cover-position span,.print-cover-position strong { display: block; }
  .print-cover-position span { color: #62776e; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
  .print-cover-position strong { margin-top: 7px; color: #214f40; font: 500 22px Georgia,serif; }
  .print-report-cover footer { display: flex; justify-content: space-between; margin-top: auto; padding-top: 13px; border-top: 1px solid #c8d6cf; color: #687970; font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
  .print-plan-inputs header { margin-bottom: 18px; }
  .print-plan-inputs h2 { margin: 0 0 6px; color: #173b31; font: 500 30px Georgia, serif; }
  .print-plan-inputs header p { margin: 3px 0; color: #52675f; font-size: 11px; line-height: 1.45; }
  .print-confidential { color: #815f1e !important; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
  .print-report-summary { margin: 0 0 16px; padding: 18px; border-radius: 12px; background: #edf4f0; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .print-report-summary h3 { margin: 0 0 10px; color: #173b31; font-size: 18px; }
  .print-summary-callout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 1fr); align-items: start; gap: 20px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid #c9d9d1; }
  .print-summary-callout b { color: #24644f; font: 500 21px Georgia, serif; }
  .print-summary-callout span { color: #52675f; font-size: 10px; line-height: 1.45; text-align: right; }
  .print-summary-callout b, .print-summary-callout span,
  .print-input-row dt, .print-input-row dd,
  .print-report-table th, .print-report-table td { min-width: 0; overflow-wrap: anywhere; word-break: normal; }
  .print-input-group { margin: 0 0 16px; padding: 14px 16px; border: 1px solid #cfdcd5; border-radius: 10px; break-inside: avoid; page-break-inside: avoid; }
  .print-input-group h3 { margin: 0 0 10px; color: #24644f; font-size: 15px; }
  .print-input-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 22px; margin: 0; }
  .print-social-security-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
  .print-social-security-grid.single { grid-template-columns: minmax(0, 1fr); }
  .print-social-security-column { display: grid; gap: 7px; margin: 0; }
  .print-input-row { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; gap: 12px; padding-bottom: 4px; border-bottom: 1px dotted #d7e2dc; font-size: 10px; line-height: 1.4; }
  .print-input-row dt { color: #52675f; }
  .print-input-row dd { margin: 0; color: #173b31; font-weight: 700; text-align: right; }
  .print-report-page { break-before: page; page-break-before: always; padding-top: 10px; }
  .print-report-page > h2 { margin-bottom: 5px; }
  .print-section-lead, .print-report-note { margin: 0 0 16px; color: #52675f; font-size: 10px; line-height: 1.5; }
  .print-executive-explanation, .print-assumption-explanation, .print-milestone-explanation, .print-monte-carlo-explanation { margin: -4px 2px 16px; color: #52675f; font-size: 10px; line-height: 1.6; break-inside: avoid; page-break-inside: avoid; }
  .print-timeline { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; margin: 0; padding: 0; list-style: none; }
  .print-timeline li { display: grid; grid-template-columns: 55px minmax(0, 1fr); gap: 2px 8px; padding: 7px 0; border-bottom: 1px dotted #d7e2dc; font-size: 10px; }
  .print-timeline li b { grid-row: 1 / 3; color: #815f1e; }
  .print-timeline li span { color: #173b31; font-weight: 700; }
  .print-timeline li small { color: #52675f; font-size: 9px; }
  .print-report-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 8.5px; }
  .print-report-table th { padding: 7px 5px; background: #edf4f0; color: #173b31; text-align: left; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .print-report-table td { padding: 6px 5px; border-bottom: 1px solid #dde6e1; color: #334d44; }
  .print-report-table th:not(:first-child), .print-report-table td:not(:first-child) { text-align: right; }
  .print-action-table { font-size: 9.5px; }
  .print-action-table th:first-child, .print-action-table td:first-child { width: 50%; text-align: left; }
  .print-report-list { margin: 0; padding-left: 18px; color: #52675f; font-size: 10px; line-height: 1.55; }
  .print-report-list li + li { margin-top: 5px; }
  .print-notes-page { min-height: 9in; }
  .print-note-block { margin: 24px 0 32px; }
  .print-note-block h3 { margin: 0 0 10px; color: #24644f; font-size: 14px; }
  .print-note-block span { display: block; height: 27px; border-bottom: 1px solid #aebfb6; }
  .print-report-footer { position: static; display: flex; justify-content: space-between; gap: 18px; margin-top: 22px; padding-top: 5px; border-top: 1px solid #cad8d1; color: #6a7b74; font-size: 8px; }
  .print-page-number::after { content: "Page " counter(page); }
}

.spending-page{padding:28px}.spending-page .page-title-row{align-items:flex-start;gap:24px}.spending-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-end}.spending-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:24px 0 14px}.spending-summary article{background:#edf4ef;border:1px solid #d0ded5;border-radius:14px;padding:16px;display:grid;gap:5px}.spending-summary span,.spending-summary small{color:#577068}.spending-summary strong{font:700 22px/1.15 Georgia,serif;color:#173b31}.spending-use-panel{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0 0 18px;padding:14px 16px;border:1px solid #c8d9cf;border-radius:12px;background:#f7faf8}.spending-use-panel div{display:grid;gap:4px}.spending-use-panel strong{color:#214f40}.spending-use-panel small{color:#60766e;font-size:12px}.spending-use-panel .spending-paste-note{margin:7px 0 0;color:#49645b;font-size:12px;line-height:1.5}.spending-use-panel .spending-paste-note strong{font-size:13px}.spending-use-panel button{flex:0 0 auto}.spending-use-panel .spending-use-actions{display:flex;grid-template-columns:none;gap:10px;align-items:center;flex:0 0 auto}.spending-table-wrap{overflow-x:auto;border:1px solid #d5e0d9;border-radius:14px}.spending-table{width:100%;min-width:1180px;border-collapse:collapse}.spending-table th{background:#f2f6f3;color:#49645b;font-size:12px;text-align:left;white-space:nowrap}.spending-table th:nth-child(6),.spending-table th:nth-child(7){width:105px;white-space:normal;line-height:1.25}.spending-table th,.spending-table td{padding:10px 8px;border-bottom:1px solid #e0e8e3;vertical-align:middle}.spending-table input,.spending-table select{width:100%;min-width:82px;padding:9px 8px;border:1px solid #c6d6cc;border-radius:8px;background:#fff;color:#173b31}.spending-table .expense-name{min-width:150px}.spending-table .expense-amount{min-width:105px}.spending-table .expense-year{min-width:72px}.spending-table .invalid-spending-range [data-field="endYear"]{border-color:#b44141;background:#fff5f5;box-shadow:0 0 0 2px rgba(180,65,65,.12)}.spending-table .remove-spending-item{color:#8d2d2d;border-color:#dfc3c3;padding:8px 10px}.empty-spending-plan{text-align:center;padding:34px 20px;border:1px dashed #b9cfc2;border-radius:14px;background:#f8fbf9}.empty-spending-plan[hidden]{display:none}.spending-footnote{font-size:13px;color:#60766e;margin-top:14px}
.spending-page>.spending-use-panel>div{grid-column:1/span 2}
@media(max-width:800px){.spending-summary{grid-template-columns:1fr}.spending-page .page-title-row{display:block}.spending-actions{justify-content:flex-start;margin-top:16px}.spending-use-panel{align-items:stretch;flex-direction:column}.spending-use-panel .spending-use-actions{align-items:stretch;flex-direction:column}.spending-use-panel button{width:100%}.spending-page>.spending-use-panel>div{grid-column:1/-1}}
.spending-table input::selection{background:#2f6fed;color:#fff}
.spending-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
.spending-table{min-width:1360px}
.spending-table .expense-replenishment label{display:flex;align-items:center;justify-content:center;gap:7px;font-size:12px}
.spending-table .expense-replenishment input{width:18px;min-width:18px;height:18px;padding:0}
.saved-spending-profile-picker{position:relative;min-width:245px}.saved-spending-profile-picker summary{display:flex;align-items:center;justify-content:space-between;min-height:38px;padding:8px 12px;border:1px solid #b9cdc1;border-radius:8px;background:#fff;color:#173b31;font-weight:700;cursor:pointer;list-style:none}.saved-spending-profile-picker summary::-webkit-details-marker{display:none}.saved-spending-profile-picker summary::after{content:"▾";margin-left:14px;color:#31594a}.saved-spending-profile-picker[open] summary::after{content:"▴"}.saved-spending-profile-options{position:absolute;z-index:60;top:calc(100% + 5px);right:0;display:grid;width:max-content;min-width:100%;max-width:min(420px,calc(100vw - 32px));max-height:300px;overflow:auto;padding:6px;border:1px solid #b9cdc1;border-radius:10px;background:#fff;box-shadow:0 10px 24px rgba(20,63,52,.18)}.saved-spending-profile-options button{width:100%;padding:9px 10px;border:0;border-radius:7px;background:transparent;color:#173b31;text-align:left;white-space:normal}.saved-spending-profile-options button:hover,.saved-spending-profile-options button:focus-visible{background:#edf4ef}.saved-spending-profile-options button:disabled{color:#60766e;cursor:default}.saved-spending-profile-options button[aria-selected="true"]{background:#e2efe7;font-weight:750}
.spending-category-header span{display:block;margin-bottom:5px}.spending-category-header #spendingCategoryFilter{width:100%;min-width:0;padding:5px 24px 5px 7px;border:1px solid #b9cdc1;border-radius:7px;background:#fff;color:#31594a;font-size:11px;font-weight:700}
.spending-view-controls{display:grid;grid-template-columns:minmax(180px,1.4fr) minmax(130px,.7fr) minmax(130px,.7fr) minmax(190px,1fr) minmax(170px,1fr) auto auto;align-items:end;gap:10px;margin:0 0 12px;padding:12px;border:1px solid #c8d9cf;border-radius:12px;background:#f7faf8}.spending-view-controls label{display:grid;gap:5px;color:#49645b;font-size:11px;font-weight:750}.spending-view-controls input,.spending-view-controls select{width:100%;min-height:38px;padding:8px 10px;border:1px solid #b9cdc1;border-radius:8px;background:#fff;color:#173b31}.spending-view-controls button{min-height:38px}.spending-view-controls small{grid-column:1/-1;color:#60766e}.spending-view-controls small:empty{display:none}.spending-category-filter{position:relative}.spending-category-filter summary{display:flex;align-items:center;justify-content:space-between;min-height:38px;padding:8px 10px;border:1px solid #b9cdc1;border-radius:8px;background:#fff;color:#31594a;font-size:12px;font-weight:750;cursor:pointer;list-style:none}.spending-category-filter summary::-webkit-details-marker{display:none}.spending-category-filter summary::after{content:"▾";margin-left:10px}.spending-category-filter[open] summary::after{content:"▴"}.spending-category-options{position:absolute;z-index:20;top:calc(100% + 5px);right:0;width:max-content;min-width:210px;max-height:280px;overflow:auto;padding:8px;border:1px solid #b9cdc1;border-radius:10px;background:#fff;box-shadow:0 10px 24px rgba(20,63,52,.18)}.spending-category-options label{display:flex;grid-template-columns:none;align-items:center;gap:8px;padding:7px 8px;border-radius:7px;font-size:12px;cursor:pointer}.spending-category-options label:hover{background:#edf4ef}.spending-category-options input{width:16px;min-height:16px;margin:0}.spending-category-options .category-filter-actions{display:flex;gap:6px;padding:4px}.spending-category-options .category-filter-actions button{flex:1;min-height:30px;padding:5px 8px;font-size:10px}@media(max-width:900px){.spending-view-controls{grid-template-columns:repeat(2,minmax(0,1fr))}.spending-view-controls button{width:100%}}@media(max-width:560px){.spending-view-controls{grid-template-columns:1fr}.spending-category-options{right:auto;left:0}}
#addSpendingCategory,#deleteSpendingCategory,#addSpendingItemFromSummary,#returnFromSpending,#clearSpendingView{min-height:38px;padding:8px 12px;border:1px solid #b9cdc1;border-radius:8px;background:#f2f7f3;color:#173b31;font-size:12px;font-weight:750}
.spending-category-actions{display:grid;grid-template-columns:repeat(2,max-content);gap:6px}
.spending-actions #returnFromSpending,.social-security-actions #returnFromSocialSecurity{font-size:10px}
#addSpendingItemFromSummary{background:#6fc3a4;border-color:#4fae8b;color:#10241e;box-shadow:0 3px 10px rgba(36,116,91,.18)}
#addSpendingItemFromSummary:hover{background:#5bb793;border-color:#3e9576;box-shadow:0 4px 12px rgba(36,116,91,.24)}
#addSpendingItemFromSummary:focus-visible{outline:3px solid rgba(36,116,91,.28);outline-offset:2px}
.planner-return-row{display:flex;justify-content:flex-end;margin-top:14px}
.spending-use-actions .primary-small{justify-self:start;width:auto;min-height:34px;padding:7px 11px;border:1px solid #c7d9ce;border-radius:8px;background:#f2f7f3;color:var(--ink);font-size:10px;font-weight:750}
.social-security-page{padding:28px}.social-security-page .page-title-row{align-items:flex-start;gap:24px}.social-security-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:center;gap:14px;margin:24px 0 22px}.social-security-summary article{background:#edf4ef;border:1px solid #d0ded5;border-radius:14px;padding:16px;display:grid;gap:5px}.social-security-summary span,.social-security-summary small{color:#577068}.social-security-summary strong{font:700 22px/1.15 Georgia,serif;color:#173b31}.social-security-table-wrap{max-width:820px;overflow-x:auto;border:1px solid #d5e0d9;border-radius:14px}.social-security-table{width:100%;border-collapse:collapse}.social-security-table th{background:#f2f6f3;color:#49645b;font-size:13px;text-align:left}.social-security-table th,.social-security-table td{padding:11px 14px;border-bottom:1px solid #e0e8e3}.social-security-table td:first-child{font-weight:700;color:#275a49}.social-security-table .social-benefit-wrap{display:flex;align-items:center;gap:6px}.social-security-table input{width:100%;padding:9px 10px;border:1px solid #c6d6cc;border-radius:8px;background:#fff;color:#173b31}@media(max-width:700px){.social-security-summary{grid-template-columns:1fr}}

@media (max-width: 1400px) {
  .executive-summary { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .executive-summary-heading { grid-row: span 2; }
  .executive-summary article:nth-of-type(3) { border-left: 0; }
  .plan-toolbar {
    grid-template-columns: minmax(470px, 1fr) minmax(460px, 1.2fr);
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
  }
  .plan-toolbar > div + div { padding-left: 8px; }
  .plan-picker { grid-column: 1; grid-row: 1; }
  .main-analysis-control { grid-column: 2; grid-row: 1; }
  .household-size-control { grid-column: 1; grid-row: 2; justify-self: start; }
  .toolbar-actions { grid-column: 2; grid-row: 2; }
  .plan-picker-controls { flex-wrap: wrap; }
  .planning-stage-control,
  .household-size-control { min-width: 0; gap: 3px; }
  .planning-stage-control > span,
  .household-size-control > span { font-size: 8px; }
  .stage-switch { padding: 2px; border-radius: 8px; }
  .stage-switch button { min-height: 26px; padding: 2px 6px; font-size: clamp(9px, .8vw, 10px); }
  .main-analysis-control .stage-switch button { min-height: 27px; padding: 2px 4px; font-size: clamp(8px, .7vw, 9px); }
  .toolbar-group-label { display: none; }
  .toolbar-action-controls { flex-wrap: wrap; }
  .scenario-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px 18px;
  }
  .scenario-intro { grid-column: 1 / -1; }
  .scenario-recalculate-slot { position: static; align-self: center; transform: none; }
  .scenario-utilities { min-width: 0; flex-wrap: wrap; justify-content: flex-end; }
}

@media (max-width: 1180px) {
  .plan-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-picker,
  .toolbar-actions { grid-column: 1 / -1; }
  .plan-toolbar > div + div { padding-left: 0; border-left: 0; }
  .household-size-control,
  .planning-stage-control { padding-top: 5px; border-top: 1px solid #e0e8e3; }
  .toolbar-action-controls { justify-content: flex-start; }
}

@media (max-width: 1100px) {
  .intro { flex-wrap: wrap; }
  .topbar { order: -1; width: 100%; min-width: 0; }
  .topbar nav { gap: clamp(8px, 2vw, 22px); }
  .topbar nav button, .topbar nav .user-options-menu > summary { min-width: 0; padding: 7px 5px; font-size: 11px; text-align: center; white-space: normal; }
  .plan-focal-hero { grid-template-columns: minmax(0,1fr) auto; }
  .hero-withdrawal-snapshot { grid-column: 1 / -1; grid-row: 2; }
  .plan-focal-hero > .hero-guidance { grid-template-columns: 1fr; }
  .scenario-header {
    display: grid;
    grid-template-columns: minmax(0, auto) minmax(0, 1fr);
    align-items: center;
    gap: 12px 18px;
  }
  .scenario-intro { grid-column: 1 / -1; }
  .scenario-recalculate-slot { position: static; align-self: center; transform: none; }
  .scenario-utilities { min-width: 0; flex-wrap: wrap; justify-content: flex-end; }
  .scenario-utilities button { min-width: 112px; padding-inline: 8px; }
  .scenario-person-grid { grid-template-columns: 1fr; }
  .scenario-household-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .executive-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .executive-summary-heading { grid-column: 1 / -1; grid-row: auto; }
  .executive-summary article:nth-of-type(odd) { border-left: 0; }
  .recommendation-brief { grid-template-columns: auto 1fr; }
  .recommendation-impact { grid-column: 2; padding: 12px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .recommendation-brief button { grid-column: 2; justify-self: start; }
  .topbar { height: auto; min-height: 58px; }
  .topbar nav { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
  .topbar .nav-utilities{grid-column:1/-1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}
  .topbar nav button, .topbar nav .user-options-menu > summary { height: 100%; min-height: 48px; padding: 6px 3px; font-size: clamp(9px, 1.6vw, 11px); line-height: 1.15; }
  .scenario-overview { grid-template-columns: 1fr; }
  .plan-toolbar { grid-template-columns: 1fr; align-items: stretch; }
  .plan-toolbar > div + div { padding-top: 12px; padding-left: 0; border-top: 1px solid #e0e8e3; border-left: 0; }
  .toolbar-actions { justify-content: flex-start; }
  .toolbar-action-controls { flex-wrap: wrap; justify-content: flex-start; }
  .toolbar-actions button, .scenario-utilities button, .page-title-row button { min-height: 30px; padding: 5px 8px; font-size: 9px; }
  .scenario-person-fields .input-wrap,
  .scenario-financial-fields .input-wrap,
  .scenario-household-grid .input-wrap { min-height: 32px; }
  .input-wrap input { padding-top: 7px; padding-bottom: 7px; font-size: 12px; }
}
@media (max-width: 700px) {
  .executive-summary { grid-template-columns: 1fr; }
  .executive-summary article { border-top: 1px solid var(--line); border-left: 0; }
  .recommendation-brief { grid-template-columns: 1fr; gap: 12px; }
  .recommendation-marker { display: none; }
  .recommendation-impact,
  .recommendation-brief button { grid-column: 1; }
  .page-shell { padding: 32px 15px; }
  .topbar { padding: 0; }
  .saved { display: none; }
  .topbar nav { gap: 2px; }
  .intro { align-items: flex-start; flex-direction: column; }
  .intro-masthead { align-items: flex-start; flex-direction: column; gap: 12px; }
  .masthead-logo-frame { width: 100%; max-width: 100%; }
  .masthead-logo { width: 100%; max-width: 320px; height: auto; }
  .intro-actions { width: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; }
  .page-title-row { flex-wrap: wrap; gap: 12px; }
  .social-security-page .page-title-row { display: block; }
  .social-security-page .spending-actions { justify-content: flex-start; margin-top: 16px; }
  .toolbar-menu-popover { right: auto; left: 0; max-width: calc(100vw - 40px); }
  .toolbar-data-menu .toolbar-menu-popover { right: 0; left: auto; }
  .plan-type.wide { width: 100%; max-width: 290px; }
  .guided-stage-control { width: 100%; max-width: 290px; min-width: 0; }
  .about-principles { grid-template-columns: 1fr; }
  .scenario-header { display: flex; align-items: stretch; flex-direction: column; gap: 14px; }
  .scenario-recalculate-slot { position: static; align-self: center; transform: none; }
  .scenario-utilities { width: 100%; }
  .scenario-utilities button { flex: 1 1 120px; min-width: 0; }
  .hero-card { padding: 30px 24px; }
  .plan-focal-hero { grid-template-columns: 1fr; }
  .plan-focal-hero > .hero-guidance { grid-column: 1; }
  .hero-withdrawal-snapshot { grid-column: 1; grid-row: auto; }
  .hero-card h2 { font-size: 43px; }
  .ring { width: 110px; height: 110px; }
  .insights-row, .simple-page > div:not(.page-title-row), .scenario-comparison.visible { grid-template-columns: 1fr; }
  .scenario-person-grid, .scenario-financial-fields, .scenario-household-grid { grid-template-columns: 1fr; }
  .scenario-household-grid .inflation-target-entry { grid-column: auto; grid-row: auto; }
  .household-paired-fields,
  .guided-inheritance-pair { grid-template-columns: 1fr; }
  .scenario-person-fields,
  .guided-retirement-grid,
  .guided-savings-grid,
  .guided-assumptions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rate-cards.scenario-rates,
  .hero-withdrawal-snapshot .rate-cards.scenario-rates.has-replenishment { grid-template-columns: 1fr; }
  .hero-outlook-values { grid-template-columns: 1fr; }
  .hero-guidance-comparison { grid-template-columns: 1fr; }
  .hero-guidance-comparison article + article { border-left: 0; border-top: 1px solid rgba(255,255,255,.14); }
  .legend { display: none; }
  .chart-head { flex-direction: column; }
  .chart-controls { align-items: flex-start; }
  .welcome-dialog form { padding: 38px 25px 0; }
  .welcome-grid { grid-template-columns: 1fr; }
  .guided-retirement-grid,
  .guided-savings-grid,
  .guided-assumptions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guided-household-grid .guided-person-one,
  .guided-household-grid .guided-person-two { grid-column: 1; grid-row: auto; }
  .guided-savings-grid .guided-pension { grid-row: 2; }
  .guided-savings-grid .guided-annuity { grid-row: 12; }
}
@media (max-width: 480px) {
  .page-shell { padding-right: 10px; padding-left: 10px; }
  .topbar nav button, .topbar nav .user-options-menu > summary { min-height: 44px; font-size: 8px; }
  .scenario-title-row { align-items: flex-start; flex-direction: column; gap: 8px; }
  .scenario-recalculate-slot { width: 100%; align-items: stretch; flex-direction: column; }
  .scenario-header .scenario-recalculate-slot #recalculatePlan,
  .scenario-header .scenario-recalculate-slot #undoPlanChange,
  .recalculation-action #recalculatePlan.results-outdated,
  .calculation-mode-toggle { width: 100%; min-width: 0; }
  .recalculation-buttons { width: 100%; }
  .recalculation-buttons button { flex: 1; }
  .calculation-mode-toggle button { flex: 1; }
  .scenario-person-fields,
  .scenario-financial-fields,
  .scenario-household-grid { grid-template-columns: 1fr; }
  .scenario-person-fields > label,
  .scenario-financial-fields > label { grid-column: auto !important; grid-row: auto !important; }
  .scenario-person-fields .input-wrap,
  .scenario-financial-fields .input-wrap,
  .scenario-household-grid .input-wrap,
  .scenario-person-fields .age-parts { max-width: none; }
  .about-dialog form,
  .report-dialog form,
  .save-dialog form,
  .derived-planner-dialog form { padding: 30px 24px 24px; }
}
@media (max-height: 820px) {
  .welcome-dialog form { padding: 32px 34px 0; }
  .welcome-step h2 { margin: 14px 0 7px; font-size: 31px; }
  .welcome-step > p { margin-bottom: 17px; }
  .welcome-step.active { padding-bottom: 14px; }
  .welcome-footer { padding: 12px 0 16px; }
}
@media (max-height: 650px) {
  .welcome-dialog { width: min(780px, calc(100vw - 20px)); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
  .welcome-dialog form { height: calc(100vh - 24px); height: calc(100dvh - 24px); padding: 24px 28px 0; }
  .welcome-step h2 { margin: 8px 0 5px; font-size: 27px; }
  .welcome-step > p { margin-bottom: 12px; font-size: 12px; }
  .welcome-grid { gap: 9px 12px; }
  .guided-savings-grid { gap: 7px 12px; }
  .welcome-grid input { margin-top: 4px; padding-top: 8px; padding-bottom: 8px; }
  .welcome-grid .guided-money-input,
  .welcome-grid .guided-percent-input { margin-top: 4px; }
  .welcome-step.active { padding-bottom: 10px; }
  .welcome-footer { padding: 8px 0 10px; }
}
@media (max-width: 700px) and (max-height: 650px) {
  .welcome-dialog form { padding-right: 20px; padding-left: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  button:not(:disabled):hover { transform: none; }
  .entry-confirmed { animation: none; border-color: #42a57e; background: #f4fbf7; }
}
.spending-table-wrap{max-height:clamp(320px,calc(100vh - 250px),720px);overflow:auto}
.spending-table thead th{position:sticky;top:0;z-index:4;background:#f2f6f3;box-shadow:0 1px 0 #d5e0d9}
.spending-paste-tip{margin:0 0 10px;padding:10px 12px;border:1px solid #c8d9cf;border-radius:10px;background:#f7faf8;color:#49645b;font-size:13px}.spending-paste-tip strong{color:#214f40}
.spending-table .expense-name{min-width:300px}
.spending-table th:nth-child(6),.spending-table td:nth-child(6){width:135px;min-width:135px;max-width:135px}
.spending-table th:nth-child(10),.spending-table td:nth-child(10){width:155px;min-width:155px;max-width:155px}
.spending-table{min-width:1220px;border-collapse:separate;border-spacing:0}.spending-table .expense-amount{min-width:100px}.spending-table th:nth-child(3),.spending-table td:nth-child(3){width:185px;min-width:185px;max-width:185px}.spending-table [data-field="category"]{min-width:165px}.spending-table th:nth-child(2),.spending-table td:nth-child(2){width:120px;min-width:120px;max-width:120px}.spending-table th:nth-child(5),.spending-table td:nth-child(5){width:165px;min-width:165px;max-width:165px}.spending-table .expense-stage{min-width:145px}.spending-table th:nth-child(7),.spending-table td:nth-child(7){width:95px;min-width:95px;max-width:95px}.spending-table th:nth-child(8),.spending-table td:nth-child(8){width:115px;min-width:115px;max-width:115px}.spending-table th:nth-child(8){white-space:normal}.spending-table th:nth-child(9),.spending-table td:nth-child(9){width:155px;min-width:155px;max-width:155px}.spending-table [data-field="priority"]{min-width:135px}.spending-table .expense-year{min-width:70px;max-width:90px}
.spending-table th:first-child,.spending-table td:first-child{position:sticky;left:0;width:320px;min-width:320px;max-width:320px;z-index:3;background:#fff}
.spending-table th:nth-child(2),.spending-table td:nth-child(2){position:sticky;left:320px;z-index:3;background:#fff;box-shadow:8px 0 12px -12px rgba(20,63,52,.65)}
.spending-table thead th:first-child,.spending-table thead th:nth-child(2){z-index:5;background:#f2f6f3}
.spending-table tbody tr:hover td:first-child,.spending-table tbody tr:hover td:nth-child(2),.spending-table tbody tr:focus-within td:first-child,.spending-table tbody tr:focus-within td:nth-child(2){background:#f7faf8}
.spending-horizontal-scrollbar{display:none;position:fixed;bottom:max(8px,env(safe-area-inset-bottom));height:20px;overflow-x:scroll;overflow-y:hidden;z-index:950;border:1px solid #b9cec2;border-radius:9px;background:#edf4ef;box-shadow:0 3px 14px rgba(20,63,52,.2);scrollbar-color:#5c8977 #dce9e1;scrollbar-width:auto}
.spending-horizontal-scrollbar.visible{display:block}
.spending-horizontal-scrollbar>div{height:1px;min-width:1px}
.spending-horizontal-scrollbar::-webkit-scrollbar{height:14px}
.spending-horizontal-scrollbar::-webkit-scrollbar-track{background:#dce9e1;border-radius:8px}
.spending-horizontal-scrollbar::-webkit-scrollbar-thumb{background:#5c8977;border:2px solid #dce9e1;border-radius:8px}
.spending-horizontal-scrollbar::-webkit-scrollbar-thumb:hover{background:#356b57}
@media print{.spending-horizontal-scrollbar{display:none!important}}
.social-security-table-wrap{max-width:1100px}
.social-security-actions{align-self:flex-start}.social-security-actions .saved-spending-profile-picker{min-width:250px}.social-security-actions select{width:auto}
.planner-selection-grid{display:grid;gap:16px;margin:20px 0}.planner-selection-grid label{display:grid;gap:8px}.planner-selection-grid label>span{display:flex;gap:8px;align-items:center;font-weight:700}.planner-selection-grid input[type="checkbox"]{width:auto}.planner-selection-grid select{width:100%}
.dialog-preference-toggle{display:flex;align-items:center;gap:9px;width:max-content;margin:18px 0 0;font-weight:700;color:var(--ink);cursor:pointer}.dialog-preference-toggle input[type="checkbox"]{width:18px;height:18px;margin:0;accent-color:var(--accent)}

/* Dark-theme form surfaces must follow the visible wrapper, not only the
   transparent input nested inside it. Keep controls distinct from cards. */
html[data-theme="dark"] :is(.age-field, .guided-social-age).field-disabled { color:#83978f; }
html[data-theme="dark"] :is(.age-field, .guided-social-age).field-disabled :is(.input-wrap, .guided-age-parts > span) {
  background:#273a34!important;
  border-color:#455b54!important;
}
html[data-theme="dark"] :is(.age-field, .guided-social-age).field-disabled input:disabled {
  color:#8fa099!important;
  -webkit-text-fill-color:#8fa099!important;
}
html[data-theme="dark"] :is(.input-wrap,.range-entry,.welcome-grid .guided-age-parts > span,.welcome-grid .guided-money-input,.welcome-grid .guided-percent-input,.welcome-grid .guided-suffix-input) {
  background:#10241e!important;
  border-color:#527267!important;
  color:var(--ink)!important;
  box-shadow:none;
}
html[data-theme="dark"] :is(.input-wrap,.range-entry):focus-within,
html[data-theme="dark"] :is(.welcome-grid .guided-age-parts > span,.welcome-grid .guided-money-input,.welcome-grid .guided-percent-input,.welcome-grid .guided-suffix-input):focus-within {
  border-color:#79b79f!important;
  box-shadow:0 0 0 3px rgba(111,195,164,.2)!important;
}
html[data-theme="dark"] :is(.input-wrap,.range-entry,.guided-money-input,.guided-percent-input,.guided-suffix-input) :is(b,small,span) { color:#b8cbc3; }
html[data-theme="dark"] :is(.plan-picker-controls,.toolbar-actions,.scenario-utilities,.page-title-row,.social-security-actions,.recalculation-buttons,.calculation-mode-toggle,.rate-presets,.spending-actions,.spending-view-controls,.spending-category-options,.dialog-actions,.welcome-footer) button,
html[data-theme="dark"] :is(.quiet-button,.insight-action button,.user-options-reset) {
  background:#24483c;
  border-color:#527267;
  color:#e6f0eb;
}
html[data-theme="dark"] :is(button.primary,button.primary-small,.calculation-mode-toggle button.selected,.insight-action button.apply) {
  background:#6fc3a4;
  border-color:#6fc3a4;
  color:#10241e;
}
html[data-theme="dark"] :is(.plan-type button.active,.stage-switch button.active,.segmented button.active) { background:#31594b; color:#dff5ec; }
html[data-theme="dark"] :is(.delete-plan-button,.start-new-plan-button,.user-options-reset) { background:#4a302d!important; border-color:#8d625d!important; color:#ffd8d2!important; }
html[data-theme="dark"] .plan-picker-controls #deletePlan { background:#9e4337!important; border-color:#9e4337!important; color:#fff!important; }
html[data-theme="dark"] .social-security-actions #deleteSocialSecurityPlan:disabled { color:#ffd8d2!important; -webkit-text-fill-color:#ffd8d2!important; }
html[data-theme="dark"] :is(.scenario-input-card,.scenario-household-card,.rate-cards.scenario-rates article,.scenario-comparison article,.welcome-footer,.report-dialog form) { background:#173129; border-color:var(--line); }
html[data-theme="dark"] :is(.spending-table th,.spending-summary article,.spending-category-options label:hover) { background:#203d34; color:var(--ink); }
html[data-theme="dark"] :is(.scenario-lab,.scenario-input-section,.scenario-rate-section,.impact-strip,.spending-use-panel,.spending-view-controls,.empty-spending-plan,.plan-start-choice,.dialog-note) {
  background:#173129!important;
  border-color:#3e5d52!important;
  color:var(--ink)!important;
}
html[data-theme="dark"] :is(.scenario-input-card,.scenario-input-card.spouse-1,.scenario-input-card.spouse-2,.scenario-household-card,.rate-cards.scenario-rates article,.scenario-comparison article,.scenario-calculated-field,.insight-impact-details div,.spending-summary article,.social-security-summary article) {
  background:#1d3a31!important;
  border-color:#49685d!important;
  color:var(--ink)!important;
  box-shadow:none;
}
html[data-theme="dark"] .scenario-input-card.spouse-1 { border-top-color:#6fc3a4!important; }
html[data-theme="dark"] .scenario-input-card.spouse-2 { border-top-color:#d8ac61!important; }
html[data-theme="dark"] .scenario-household-card { border-top-color:#83b6d4!important; }
html[data-theme="dark"] :is(.plan-type,.stage-switch,.segmented,.calculation-mode-toggle) { background:#10241e; border-color:#49685d; }
html[data-theme="dark"] :is(.toolbar-menu:not(.user-options-menu) summary,.scenario-header .scenario-recalculate-slot #recalculatePlan,.scenario-header .scenario-recalculate-slot #undoPlanChange,.spending-category-filter summary) {
  background:#24483c;
  border-color:#527267;
  color:var(--ink);
}
html[data-theme="dark"] :is(.scenario-utilities button:disabled,.scenario-header .scenario-recalculate-slot button:disabled) { background:#1a3029; border-color:#3e574e; color:#849a91; }
html[data-theme="dark"] :is(.welcome-dialog form,.about-dialog form,.report-dialog form,.welcome-footer,.calculation-popup-card) { background:#173129; color:var(--ink); }
html[data-theme="dark"] :is(.spending-table-wrap,.social-security-table-wrap) { background:#173129; border-color:#3e5d52; }
html[data-theme="dark"] :is(.spending-table td,.social-security-table td) { background:#173129; border-color:#355249; color:var(--ink); }
html[data-theme="dark"] :is(.spending-table th,.social-security-table th,.spending-table thead th:first-child,.spending-table thead th:nth-child(2)) { background:#24483c; border-color:#49685d; color:#d9e9e2; }
html[data-theme="dark"] :is(.spending-table th:first-child,.spending-table td:first-child,.spending-table th:nth-child(2),.spending-table td:nth-child(2)) { background:#173129; }
html[data-theme="dark"] :is(.spending-table tbody tr:hover td,.spending-table tbody tr:focus-within td) { background:#203d34!important; }
html[data-theme="dark"] :is(.spending-table input,.spending-table select,.spending-view-controls input,.spending-view-controls select,.spending-category-header #spendingCategoryFilter,.social-security-table input) { background:#10241e; border-color:#527267; color:var(--ink); }
html[data-theme="dark"] .spending-horizontal-scrollbar { background:#203d34; border-color:#527267; scrollbar-color:#8fbbaa #173129; }
html[data-theme="dark"] :is(.spending-summary span,.spending-summary small,.spending-use-panel small,.spending-view-controls label,.spending-view-controls small,.social-security-summary span,.social-security-summary small,.scenario-calculated-field span,.scenario-calculated-field small,.insight-impact-details dt,.insight-impact-details small) { color:#b4c8bf; }
html[data-theme="dark"] .insight-result-explanation { color:#b4c8bf; }
html[data-theme="dark"] :is(.spending-summary strong,.spending-use-panel strong,.social-security-summary strong,.social-security-table td:first-child,.insight-impact-details dd) { color:#e6f0eb; }
html[data-theme="dark"] :is(.scenario-person-name:hover,.scenario-person-name:focus) { background:#10241e; color:var(--ink); }
html[data-theme="dark"] .input-wrap:has(input.derived-indicator),
html[data-theme="dark"] .guided-money-input:has(input.derived-indicator) { background:#203d34!important; border-color:#608578!important; color:var(--ink)!important; }
html[data-theme="dark"] input.derived-indicator { color:#d9eee5!important; }
/* Shared informational and empty-state surfaces appear throughout every tab.
   Keep this catch-all beside the dark form rules so newly rendered states do
   not fall back to their light card palette. */
html[data-theme="dark"] :is(.insights-row article,.simple-page article,.rate-cards article,.user-manual-sections article,#assumptionsReport article,.about-principles article,.manual-dashboard-guide > p:last-child,.spending-paste-tip) {
  background:#1d3a31!important;
  border-color:#49685d!important;
  color:var(--ink)!important;
  box-shadow:none;
}
html[data-theme="dark"] .insights-row article:last-child { background:#263b31!important; }
html[data-theme="dark"] :is(.insights-row small,.simple-page p,.user-manual-sections p,.user-manual-sections ul,.user-manual-sections ol,#assumptionsReport p,#assumptionsReport li,.about-principles span,.spending-paste-tip,.spending-paste-note) { color:#b8cbc3!important; }
html[data-theme="dark"] :is(.insights-row b,.insights-row strong,.simple-page h3,.user-manual-sections h4,.about-principles strong,.spending-paste-tip strong) { color:var(--ink)!important; }
html[data-theme="dark"] :is(.insights-row .icon,.help-tip,.welcome-dialog .guided-help-tip,.dialog-close) { background:#24483c!important; border-color:#527267!important; color:#a8dbc8!important; }
html[data-theme="dark"] :is(.insights-row .icon.gold,.result-narrative.warning .narrative-icon) { background:#493a27!important; color:#efc67f!important; }
html[data-theme="dark"] .insights-row .icon.blue { background:#233f4a!important; color:#a9d4e4!important; }
html[data-theme="dark"] .assumption-warning { background:#443622!important; border:1px solid #80683a!important; color:#f0d8a6!important; }
html[data-theme="dark"] .milestone-labels .milestone-label { background:rgba(23,49,41,.96); border-color:#527267; color:#d9eee5; box-shadow:0 2px 7px rgba(0,0,0,.28); }
html[data-theme="dark"] .welcome-progress { background:#10241e; }
html[data-theme="dark"] .welcome-step-markers li { color:#a8bbb3; }
html[data-theme="dark"] .welcome-step-markers li::before { background:#355249; }
html[data-theme="dark"] .welcome-step-markers span { border-color:#527267; background:#10241e; color:#b8cbc3; }
html[data-theme="dark"] .welcome-step-markers li.active span { border-color:#6fc3a4; color:#9ad8c1; box-shadow:0 0 0 4px rgba(111,195,164,.12); }
html[data-theme="dark"] .welcome-step-markers li.complete::before { background:#5c927c; }
html[data-theme="dark"] .welcome-step-markers li.complete span { border-color:#6fc3a4; background:#2f725a; color:#fff; }
html[data-theme="dark"] .welcome-step.active { scrollbar-color:#8fbbaa #173129; }
html[data-theme="dark"] .welcome-step.active::-webkit-scrollbar-track { background:#173129; }
html[data-theme="dark"] #recalculatePlan:not(.results-outdated) { background:#24483c; border-color:#527267; color:var(--ink); }
html[data-theme="dark"] #recalculatePlan:not(.results-outdated):hover { background:#31594b; }
.social-security-table{min-width:1040px;table-layout:fixed}.social-security-table th:first-child{width:140px}.social-security-table th:nth-child(2),.social-security-table th:nth-child(3){width:450px}.social-security-table input{width:100%;min-width:320px;font-size:17px;appearance:textfield;-moz-appearance:textfield}.social-security-table input::-webkit-inner-spin-button,.social-security-table input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.input-wrap:has(input.derived-indicator),.guided-money-input:has(input.derived-indicator){cursor:pointer;background:#edf4ef!important;border-color:#9fb9aa!important;color:#214f40!important}
input.derived-indicator{cursor:pointer;background:transparent!important;border-color:transparent!important;color:#214f40!important;font-weight:700}
input.derived-indicator:focus{outline:0}
.input-wrap:has(input.derived-indicator:focus),.guided-money-input:has(input.derived-indicator:focus){outline:3px solid rgba(55,121,94,.2);outline-offset:2px}
.derived-planner-dialog{width:min(92vw,480px);border:0;border-radius:22px;padding:0;box-shadow:0 24px 70px rgba(16,48,38,.28)}
.derived-planner-dialog::backdrop{background:rgba(15,43,35,.48);backdrop-filter:blur(3px)}
.derived-planner-dialog{max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow:hidden}
.derived-planner-dialog form{max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);padding:30px;display:grid;gap:12px;overflow-y:auto;overscroll-behavior:contain;text-align:left}
.derived-planner-dialog h2{margin:0;color:#173b31;font:700 28px/1.15 Georgia,serif}
.derived-planner-dialog p{margin:0;color:#526b62;line-height:1.55}
.derived-planner-dialog .dialog-actions{margin-top:10px;justify-content:flex-end}
.derived-dialog-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:50%;background:#dcece3;color:#23664e;font-size:25px;font-weight:800}
.planner-save-note{flex-basis:100%;color:var(--muted);font-size:10px;text-align:left}
@media(max-width:800px){.planner-save-note{text-align:left}}

/* Tooltip content is rendered in a fixed, viewport-clamped popover by the
   renderer. Keeping the nested/pseudo versions out of layout prevents hidden
   help text from creating page-wide horizontal scrollbars. */
.help-tip .help-box,
button[data-tooltip]::before{display:none}
.guided-help-popover.button-tooltip-popover{width:min(240px,calc(100vw - 24px));border:1px solid #2d5b4d;box-shadow:0 9px 24px rgba(17,51,42,.24);font-size:10px}
/* Match the expense filter heading to the other spending control labels. */
.spending-filter-field{display:grid;gap:5px;color:#49645b;font-size:11px;font-weight:750}
html[data-theme="dark"] .spending-filter-field{color:#b4c8bf}
/* Book-style user manual */
.user-manual-dialog{width:min(900px,calc(100vw - 32px))!important}
.user-manual-dialog form{scroll-behavior:smooth;background:linear-gradient(90deg,#f2f0e8 0,#fffdf8 7%,#fffdf8 93%,#f2f0e8 100%)!important}
.user-manual-dialog .dialog-close{position:sticky;top:12px;z-index:20;display:block;margin:-20px 0 -12px auto;box-shadow:0 3px 12px rgba(23,59,50,.12)}
.manual-title-page{padding:34px 24px 38px;margin:0 0 24px;border-top:1px solid #c6d3ca;border-bottom:1px solid #c6d3ca;text-align:center}
.manual-title-page .manual-edition{margin:0;color:#6a7d75;font-size:10px;font-weight:800;letter-spacing:.22em}
.manual-title-page h2{margin:16px 0 10px!important;font-size:42px!important}
.manual-title-page .section-lead{max-width:540px;margin:0 auto;color:#61736c;line-height:1.7}
.manual-toc{padding:24px 28px;margin-bottom:30px;border:1px solid #d6ddd7;background:rgba(255,255,255,.72)}
.manual-part-label,.user-manual-sections .manual-chapter-number{margin:0 0 5px!important;color:#8a7042!important;font-size:10px!important;font-weight:800;text-transform:uppercase;letter-spacing:.18em}
.manual-toc h3{margin:0 0 16px;color:var(--ink);font:600 25px Georgia,serif}
.manual-toc ol{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 28px;margin:0;padding:0;list-style:none;counter-reset:manual-chapter}
.manual-toc li{counter-increment:manual-chapter;border-bottom:1px dotted #bac7bf}
.manual-toc a{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:9px 2px;color:#31594a;text-decoration:none;line-height:1.35}
.manual-toc a:hover,.manual-toc a:focus-visible{color:var(--green);text-decoration:underline}
.manual-toc b{font:600 12px Georgia,serif;color:#8a7042}
.user-manual-sections{gap:28px!important}
.user-manual-sections article{scroll-margin-top:18px;padding:28px 32px!important;border:1px solid #d7ddd8!important;border-left:1px solid #d7ddd8!important;border-radius:2px!important;background:rgba(255,255,255,.78)!important;box-shadow:0 5px 18px rgba(32,57,48,.06)}
.user-manual-sections h3{padding-bottom:11px;margin-bottom:15px!important;border-bottom:1px solid #d9e1dc;font-size:24px!important}
.user-manual-sections p,.user-manual-sections li{font-size:13px;line-height:1.72!important}
html[data-theme="dark"] .user-manual-dialog form{background:linear-gradient(90deg,#10251f 0,#173129 7%,#173129 93%,#10251f 100%)!important}
html[data-theme="dark"] .manual-title-page{border-color:#527267}
html[data-theme="dark"] .manual-title-page .manual-edition,html[data-theme="dark"] .manual-title-page .section-lead{color:#b8cbc3}
html[data-theme="dark"] .manual-toc{border-color:#527267;background:rgba(16,36,30,.65)}
html[data-theme="dark"] .manual-toc h3{color:var(--ink)}
html[data-theme="dark"] .manual-toc li{border-color:#527267}
html[data-theme="dark"] .manual-toc a{color:#c1d5cc}
html[data-theme="dark"] .user-manual-sections .manual-mode-grid section{border-color:#527267;background:#173129}
html[data-theme="dark"] .manual-mode-key{background:#173129}
@media(max-width:650px){.manual-toc ol,.manual-mode-grid,.manual-mode-key{grid-template-columns:1fr}.manual-title-page{padding:26px 10px}.manual-title-page h2{font-size:34px!important}.manual-toc{padding:20px}.user-manual-sections article{padding:23px 20px!important}}
/* Keep every dropdown indicator the same compact size and alignment. */
select:not([multiple]){-webkit-appearance:none;appearance:none;padding-right:32px!important;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2331594a' d='M1 1h8L5 5z'/%3E%3C/svg%3E")!important;background-repeat:no-repeat!important;background-position:right 12px center!important;background-size:10px 6px!important}
.toolbar-menu:not(.user-options-menu) summary::after,.spending-category-filter summary::after{content:"";flex:0 0 10px;width:10px;height:6px;margin-left:10px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2331594a' d='M1 1h8L5 5z'/%3E%3C/svg%3E") center/10px 6px no-repeat}
.toolbar-menu:not(.user-options-menu)[open] summary::after,.spending-category-filter[open] summary::after{content:"";transform:rotate(180deg)}
html[data-theme="dark"] select:not([multiple]){background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23d8e8e0' d='M1 1h8L5 5z'/%3E%3C/svg%3E")!important}
html[data-theme="dark"] .toolbar-menu:not(.user-options-menu) summary::after,html[data-theme="dark"] .spending-category-filter summary::after{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23d8e8e0' d='M1 1h8L5 5z'/%3E%3C/svg%3E")}
#savedSpendingPlanSelect,#savedSocialSecurityPlanSelect{padding-left:14px}


/* Let the withdrawal snapshot reflow when a browser side panel reduces the
   calculator's available width without changing the viewport breakpoint. */
.plan-focal-hero > * { min-width: 0; }
.hero-withdrawal-snapshot {
  min-width: 0;
  container: withdrawal-snapshot / inline-size;
}
.hero-withdrawal-snapshot :is(.scenario-rate-heading,.rate-cards.scenario-rates,.scenario-retirement-values,.hero-outlook-values),
.hero-withdrawal-snapshot .rate-cards.scenario-rates article,
.hero-withdrawal-snapshot .scenario-calculated-field { min-width: 0; }
.hero-withdrawal-snapshot :is(span,small,b,strong,output) {
  max-width: 100%;
  overflow-wrap: anywhere;
}
@container withdrawal-snapshot (max-width: 760px) {
  .hero-withdrawal-snapshot .rate-cards.scenario-rates,
  .hero-withdrawal-snapshot .rate-cards.scenario-rates.has-replenishment {
    grid-template-columns: 1fr;
  }
}
@container withdrawal-snapshot (max-width: 480px) {
  .hero-withdrawal-snapshot {
    display: flex;
    flex-direction: column;
  }
  .hero-withdrawal-snapshot .rate-cards.scenario-rates,
  .hero-withdrawal-snapshot .rate-cards.scenario-rates.has-replenishment,
  .hero-withdrawal-snapshot .scenario-retirement-values,
  .hero-withdrawal-snapshot .hero-outlook-values,
  .hero-withdrawal-snapshot .hero-outlook-values.has-replenishment {
    grid-template-columns: 1fr;
  }
}

/* Keep a restrained, consistent press response on every enabled button,
   even when a component-specific rule sets its normal transform or shadow. */
button:not(:disabled):not(.dialog-close) { position: relative; }
button:not(:disabled):not(.dialog-close)::before {
  content: "";
  position: absolute;
  inset: -5px 0;
  border-radius: inherit;
}
button:not(:disabled):not(.dialog-close):hover {
  position: relative;
  z-index: 2;
  transform: translateY(-1px) !important;
  filter: brightness(.99);
  box-shadow: 0 4px 10px rgba(23, 59, 50, .12) !important;
}
button:not(:disabled):not(.dialog-close):active {
  transform: translateY(0) scale(.995) !important;
  box-shadow: inset 0 1px 2px rgba(17, 51, 42, .16) !important;
}
@media (prefers-reduced-motion: reduce) {
  button:not(:disabled):not(.dialog-close):hover { transform: none !important; }
}
.topbar nav .user-options-menu > summary {
  transition: transform .1s ease, box-shadow .1s ease, filter .1s ease, background-color .1s ease;
}
.topbar nav .user-options-menu > summary:hover {
  z-index: 2;
  border-color: transparent;
  background: none;
  transform: translateY(-1px);
  filter: brightness(.99);
  box-shadow: 0 4px 10px rgba(23, 59, 50, .12);
}
.topbar nav .user-options-menu > summary:active {
  transform: translateY(0) scale(.995);
  box-shadow: inset 0 1px 2px rgba(17, 51, 42, .16);
}
@media (prefers-reduced-motion: reduce) {
  .topbar nav .user-options-menu > summary:hover { transform: none; }
  .tab-page.active,
  .calculated-result-value.value-updated,
  .result-narrative.result-state-updated,
  .ring.updated,
  .chart.chart-updated svg { animation: none !important; }
  .saved.status-updated,
  .plan-focal-hero.target-reached { animation: none !important; }
  .insight-action:has(button):hover { transform: none; }
  .topbar nav button[data-tab]::after { transition: none; }
}
@media (max-width: 560px) {
  .analysis-mode-switch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .welcome-step-markers b { display: none; }
  .welcome-step-markers { margin-bottom: 8px; }
}

.chart-labels { display: block; }
.chart-ticks { display: flex; justify-content: space-between; }
.chart-axis-title { display: block; margin-top: 6px; text-align: center; font-weight: 600; color: #52675f; }
.milestone-timing { display: block; margin-top: 3px; font-weight: 500; }
