:root {
  --navy-950: #0b2638;
  --navy-900: #123a54;
  --navy-800: #174e6c;
  --teal-700: #08766d;
  --teal-600: #0b8b80;
  --teal-100: #dff4ef;
  --blue-100: #e9f2f8;
  --gold-600: #a66105;
  --gold-100: #fff4d8;
  --red-700: #a12b2b;
  --red-100: #fff0ef;
  --green-700: #16663a;
  --green-100: #e9f6ed;
  --ink: #172833;
  --muted: #5a6973;
  --line: #ced9df;
  --line-light: #e5ecef;
  --surface: #ffffff;
  --background: #f4f7f8;
  --shadow: 0 12px 34px rgba(10, 44, 61, 0.09);
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--background);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

button,
input,
select {
  font: inherit;
}

button,
select,
input[type="radio"],
summary {
  cursor: pointer;
}

a {
  color: var(--navy-800);
}

a:hover {
  color: var(--teal-700);
}

:focus-visible {
  outline: 3px solid #f4a523;
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 10px 14px;
  color: #fff;
  background: var(--navy-950);
  border-radius: var(--radius-sm);
  transform: translateY(-160%);
  transition: transform 0.15s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  width: min(1440px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  position: relative;
  z-index: 20;
  color: #fff;
  background: var(--navy-950);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
}

.brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 760;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand:hover,
.header-link:hover {
  color: #fff;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--navy-950);
  background: #a5ded7;
  border-radius: 11px;
  font-size: 0.82rem;
  letter-spacing: -0.03em;
}

.header-link {
  color: #d9e8ef;
  font-size: 0.92rem;
  font-weight: 650;
  text-underline-offset: 4px;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 89% 10%, rgba(76, 189, 176, 0.24), transparent 32%),
    linear-gradient(124deg, var(--navy-950), #174c67 68%, #116e6a);
}

.hero::after {
  position: absolute;
  right: -120px;
  bottom: -180px;
  width: 440px;
  height: 440px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  content: "";
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(310px, 0.55fr);
  gap: clamp(48px, 8vw, 120px);
  align-items: center;
  padding-block: 72px 82px;
}

.eyebrow,
.step-label {
  margin: 0 0 8px;
  color: var(--teal-700);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #a9e1d9;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1 {
  max-width: 880px;
  margin: 0;
  font-size: clamp(2.35rem, 5vw, 4.7rem);
  line-height: 1.02;
  letter-spacing: -0.052em;
}

.hero-copy {
  max-width: 730px;
  margin: 24px 0 0;
  color: #dbeaf0;
  font-size: clamp(1rem, 1.5vw, 1.18rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 730;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #fff;
  background: var(--teal-700);
  border-color: var(--teal-700);
}

.button-primary:hover {
  color: #fff;
  background: #05645d;
  border-color: #05645d;
}

.hero .button-primary {
  color: var(--navy-950);
  background: #a9e1d9;
  border-color: #a9e1d9;
}

.hero .button-secondary {
  color: #fff;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
}

.button-secondary {
  color: var(--navy-900);
  background: #fff;
  border-color: #9db1bc;
}

.button-secondary:hover,
.button-quiet:hover,
.button-print:hover {
  color: var(--navy-950);
  background: var(--blue-100);
  border-color: var(--navy-800);
}

.button-quiet {
  color: var(--muted);
  background: transparent;
  border-color: transparent;
}

.button-print {
  min-height: 40px;
  padding: 8px 13px;
  color: var(--navy-900);
  background: #fff;
  border-color: var(--line);
  font-size: 0.86rem;
}

.privacy-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 22px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  backdrop-filter: blur(8px);
}

.privacy-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 0.96rem;
}

.privacy-card p {
  margin: 0;
  color: #dceaf0;
  font-size: 0.88rem;
}

.privacy-icon {
  display: grid;
  flex: 0 0 29px;
  height: 29px;
  place-items: center;
  color: var(--navy-950);
  background: #a9e1d9;
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 900;
}

.disclaimer {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 28px;
  padding: 18px 21px;
  color: #603b05;
  background: var(--gold-100);
  border: 1px solid #e6c984;
  border-radius: var(--radius-md);
}

.disclaimer-icon,
.budget-note > span {
  display: grid;
  flex: 0 0 25px;
  height: 25px;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 0.82rem;
  font-weight: 800;
}

.disclaimer h2 {
  margin: 0 0 2px;
  font-size: 1rem;
}

.disclaimer p {
  margin: 0;
  font-size: 0.88rem;
}

.app-layout {
  display: grid;
  grid-template-columns: minmax(370px, 0.78fr) minmax(570px, 1.22fr);
  gap: 26px;
  align-items: start;
  margin-top: 28px;
  margin-bottom: 60px;
}

.planner-panel,
.results-panel {
  min-width: 0;
  max-width: 100%;
  background: var(--surface);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.planner-panel {
  overflow: hidden;
}

.results-panel {
  padding: clamp(22px, 3vw, 34px);
}

.panel-heading,
.results-heading {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
}

.panel-heading {
  padding: 27px 28px 22px;
}

.panel-heading h2,
.results-heading h2 {
  margin: 0;
  color: var(--navy-950);
  font-size: clamp(1.45rem, 2vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.required-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  white-space: nowrap;
}

.required-note span,
label > span[aria-hidden="true"] {
  color: var(--red-700);
}

.form-alert {
  margin: 0 28px 18px;
  padding: 12px 14px;
  color: var(--red-700);
  background: var(--red-100);
  border: 1px solid #eab9b5;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 650;
}

.form-section {
  min-width: 0;
  margin: 0;
  padding: 24px 28px 27px;
  border: 0;
  border-top: 1px solid var(--line-light);
}

.form-section legend {
  display: flex;
  width: 100%;
  gap: 9px;
  align-items: center;
  padding: 0;
  color: var(--navy-900);
  font-size: 1.02rem;
  font-weight: 780;
}

.section-number {
  display: inline-grid;
  width: 27px;
  height: 27px;
  place-items: center;
  color: #fff;
  background: var(--navy-800);
  border-radius: 50%;
  font-size: 0.74rem;
}

.section-intro {
  margin: 9px 0 17px;
  color: var(--muted);
  font-size: 0.85rem;
}

.input-grid {
  display: grid;
  gap: 18px 16px;
  margin-top: 18px;
}

.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
  min-width: 0;
}

.field label,
.field-label {
  display: block;
  margin-bottom: 7px;
  color: #29404e;
  font-size: 0.78rem;
  font-weight: 720;
}

.field-label-row {
  display: flex;
  min-height: 19px;
  gap: 4px;
  align-items: center;
  margin-bottom: 7px;
}

.field-label-row label {
  min-height: 0;
  margin: 0;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

input[type="number"],
select {
  width: 100%;
  min-height: 44px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #9babb4;
  border-radius: var(--radius-sm);
}

input[type="number"] {
  padding: 9px 52px 9px 12px;
}

select {
  padding: 9px 34px 9px 11px;
}

input[type="number"]:hover,
select:hover {
  border-color: var(--navy-800);
}

input[type="number"]:focus,
select:focus {
  border-color: var(--teal-700);
  box-shadow: 0 0 0 3px rgba(8, 118, 109, 0.14);
  outline: none;
}

input[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: var(--red-700);
  box-shadow: 0 0 0 2px rgba(161, 43, 43, 0.1);
}

.has-prefix input {
  padding-left: 30px;
}

.input-prefix,
.input-suffix {
  position: absolute;
  z-index: 1;
  color: var(--muted);
  font-size: 0.82rem;
  pointer-events: none;
}

.input-prefix {
  left: 12px;
}

.input-suffix {
  right: 11px;
}

.field-help,
.field-error {
  min-height: 1.1em;
  margin: 5px 0 0;
  font-size: 0.7rem;
  line-height: 1.35;
}

.field-help {
  color: var(--muted);
}

.field-error {
  color: var(--red-700);
  font-weight: 680;
}

.field-error:empty {
  display: none;
}

.help-tip {
  display: inline-grid;
  width: 18px;
  height: 18px;
  margin: 0 0 0 2px;
  padding: 0;
  place-items: center;
  color: var(--navy-800);
  background: var(--blue-100);
  border: 1px solid #9bb7c7;
  border-radius: 50%;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  vertical-align: 1px;
}

.tooltip {
  position: fixed;
  z-index: 100;
  width: min(280px, calc(100vw - 24px));
  padding: 10px 12px;
  color: #fff;
  background: var(--navy-950);
  border-radius: 7px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  font-size: 0.76rem;
  line-height: 1.45;
}

.scenario-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.scenario-card {
  position: relative;
  display: grid;
  min-height: 102px;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 4px 8px;
  align-content: center;
  padding: 12px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.scenario-card:hover {
  border-color: var(--teal-700);
}

.scenario-card.selected {
  background: #eff9f7;
  border-color: var(--teal-700);
  box-shadow: inset 0 0 0 1px var(--teal-700);
}

.scenario-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.scenario-card:has(input:focus-visible) {
  outline: 3px solid #f4a523;
  outline-offset: 3px;
}

.radio-visual {
  position: relative;
  width: 17px;
  height: 17px;
  margin-top: 2px;
  border: 1.5px solid #7b8f9b;
  border-radius: 50%;
}

.selected .radio-visual {
  border-color: var(--teal-700);
}

.selected .radio-visual::after {
  position: absolute;
  inset: 3px;
  background: var(--teal-700);
  border-radius: 50%;
  content: "";
}

.scenario-name {
  font-size: 0.77rem;
  font-weight: 760;
}

.scenario-summary {
  grid-column: 1 / -1;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.3;
}

.assumption-box {
  margin-top: 14px;
  padding: 16px;
  background: #f5f8fa;
  border: 1px solid var(--line-light);
  border-radius: 10px;
}

.assumption-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.assumption-heading h3 {
  margin: 0;
  color: var(--navy-900);
  font-size: 0.86rem;
}

.assumption-heading p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.68rem;
}

.text-button {
  padding: 2px;
  color: var(--navy-800);
  background: transparent;
  border: 0;
  font-size: 0.68rem;
  font-weight: 720;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.compact-field label {
  min-height: 33px;
  margin-bottom: 4px;
  font-size: 0.67rem;
  line-height: 1.3;
}

.compact-field .field-label-row {
  min-height: 33px;
  margin-bottom: 4px;
}

.compact-field .field-label-row label {
  min-height: 0;
  margin: 0;
}

.compact-field input {
  min-height: 40px;
  padding-right: 30px;
}

.timing-row {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 7px;
}

.timing-row input {
  padding-right: 10px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 23px 28px 8px;
  border-top: 1px solid var(--line-light);
}

.auto-update-note {
  margin: 0;
  padding: 0 28px 25px;
  color: var(--muted);
  font-size: 0.7rem;
}

.results-heading {
  margin-bottom: 22px;
}

.status-card {
  display: flex;
  gap: 14px;
  align-items: center;
  min-height: 112px;
  padding: 19px 21px;
  border: 1px solid;
  border-radius: var(--radius-md);
}

.status-on-track {
  color: var(--green-700);
  background: var(--green-100);
  border-color: #a8d5b8;
}

.status-close {
  color: #744507;
  background: var(--gold-100);
  border-color: #e6c984;
}

.status-attention {
  color: var(--red-700);
  background: var(--red-100);
  border-color: #eab9b5;
}

.status-icon {
  display: grid;
  flex: 0 0 47px;
  height: 47px;
  place-items: center;
  background: currentColor;
  border-radius: 50%;
  font-size: 0;
}

.status-icon::after {
  color: #fff;
  content: attr(data-symbol);
  font-size: 1.2rem;
  font-weight: 900;
}

.status-kicker {
  margin: 0;
  color: currentColor;
  font-size: 0.7rem;
  font-weight: 790;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.status-card h3 {
  margin: 2px 0;
  font-size: 1.32rem;
  line-height: 1.2;
}

.status-card p:last-child {
  margin: 4px 0 0;
  color: #44545e;
  font-size: 0.8rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 15px;
}

.metric-card {
  min-width: 0;
  padding: 17px;
  background: #f8fafb;
  border: 1px solid var(--line-light);
  border-radius: 11px;
}

.metric-card p {
  min-height: 2.4em;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 690;
  line-height: 1.25;
}

.metric-card strong {
  display: block;
  color: var(--navy-950);
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.metric-card > span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.3;
}

.featured-metric {
  background: #eef8f6;
  border-color: #b8dcd6;
}

.positive-value {
  color: var(--green-700) !important;
}

.negative-value {
  color: var(--red-700) !important;
}

.budget-note {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-top: 14px;
  padding: 11px 13px;
  color: var(--navy-800);
  background: var(--blue-100);
  border-radius: var(--radius-sm);
}

.budget-note > span {
  flex-basis: 19px;
  height: 19px;
  font-size: 0.62rem;
}

.budget-note p {
  margin: 0;
  color: #3b5362;
  font-size: 0.72rem;
}

.chart-section,
.comparison-section {
  margin-top: 27px;
  padding-top: 24px;
  border-top: 1px solid var(--line-light);
}

.section-heading-row {
  display: flex;
  gap: 18px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-heading-row h3 {
  margin: 0;
  color: var(--navy-950);
  font-size: 1.05rem;
}

.section-heading-row p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 650;
}

.chart-legend span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.chart-legend i {
  display: inline-block;
  width: 14px;
  height: 3px;
  border-radius: 2px;
}

.legend-savings {
  background: var(--teal-700);
}

.legend-income {
  background: #356a9a;
}

.legend-spending {
  background: #b66c16;
}

.chart-wrap {
  position: relative;
  width: 100%;
  min-height: 300px;
  overflow: hidden;
  background: linear-gradient(180deg, #f9fbfc, #fff);
  border: 1px solid var(--line-light);
  border-radius: 10px;
}

.chart-wrap svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 300px;
}

.chart-grid-line {
  stroke: #dce5e9;
  stroke-width: 1;
}

.chart-axis-text {
  fill: #64737c;
  font-size: 11px;
}

.chart-retirement-line {
  stroke: #7e8e98;
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
}

.chart-retirement-text {
  fill: #53636d;
  font-size: 10px;
  font-weight: 700;
}

.chart-series {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.chart-savings-line {
  stroke: var(--teal-700);
}

.chart-income-line {
  stroke: #356a9a;
  stroke-width: 2;
}

.chart-spending-line {
  stroke: #b66c16;
  stroke-width: 2;
}

.chart-focus-point {
  fill: #fff;
  stroke: var(--navy-950);
  stroke-width: 2;
  opacity: 0;
}

.chart-interaction:focus .chart-focus-point,
.chart-interaction:hover .chart-focus-point {
  opacity: 1;
}

.chart-interaction:focus {
  outline: none;
}

.chart-interaction:focus .chart-focus-area {
  fill: rgba(244, 165, 35, 0.18);
}

.chart-tooltip-box {
  fill: var(--navy-950);
}

.chart-tooltip-text {
  fill: #fff;
  font-size: 11px;
}

.chart-hint {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.66rem;
}

details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

summary {
  padding: 12px 14px;
  color: var(--navy-900);
  font-size: 0.78rem;
  font-weight: 740;
}

.data-details {
  margin-top: 12px;
}

.table-scroll {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

caption {
  padding: 10px;
  color: var(--muted);
  font-size: 0.7rem;
  text-align: left;
}

th,
td {
  padding: 10px 9px;
  border-bottom: 1px solid var(--line-light);
  font-size: 0.7rem;
  text-align: right;
  white-space: nowrap;
}

th {
  color: #425966;
  background: #f5f8fa;
  font-weight: 750;
}

th:first-child,
td:first-child {
  text-align: left;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.comparison-table {
  min-width: 650px;
}

.comparison-table th,
.comparison-table td {
  padding-block: 12px;
}

.comparison-table th:nth-child(1),
.comparison-table td:nth-child(1),
.comparison-table th:nth-child(2),
.comparison-table td:nth-child(2) {
  text-align: left;
}

.comparison-table tr.active-scenario-row td {
  background: #eff9f7;
}

.scenario-table-name {
  color: var(--navy-900);
  font-weight: 780;
}

.current-badge {
  display: block;
  width: max-content;
  margin-top: 4px;
  padding: 2px 6px;
  color: var(--teal-700);
  background: var(--teal-100);
  border-radius: 999px;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.comparison-assumptions {
  color: var(--muted);
  font-size: 0.63rem;
}

.comparison-status {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 750;
}

.comparison-status.on-track {
  color: var(--green-700);
  background: var(--green-100);
}

.comparison-status.close {
  color: #744507;
  background: var(--gold-100);
}

.comparison-status.attention {
  color: var(--red-700);
  background: var(--red-100);
}

.method-details {
  margin-top: 22px;
  background: #fbfcfd;
}

.method-content {
  padding: 0 18px 15px;
  color: #44545e;
  font-size: 0.76rem;
}

.method-content ol {
  margin: 0;
  padding-left: 20px;
}

.method-content li + li {
  margin-top: 7px;
}

.method-content p {
  margin: 11px 0 0;
  font-weight: 700;
}

.site-footer {
  color: #dbe7ed;
  background: var(--navy-950);
}

.footer-grid {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  min-height: 140px;
  padding-block: 28px;
}

.footer-grid strong {
  color: #fff;
}

.footer-grid p {
  margin: 4px 0 0;
  font-size: 0.8rem;
}

.footer-grid a {
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.noscript-message {
  position: fixed;
  inset: auto 12px 12px;
  z-index: 1000;
  padding: 14px;
  color: #fff;
  background: var(--red-700);
  border-radius: var(--radius-sm);
  text-align: center;
}

@media (max-width: 1100px) {
  .app-layout {
    grid-template-columns: minmax(340px, 0.82fr) minmax(500px, 1.18fr);
  }

  .form-section,
  .panel-heading {
    padding-inline: 22px;
  }

  .form-actions {
    padding-inline: 22px;
  }

  .auto-update-note {
    padding-inline: 22px;
  }

  .scenario-options,
  .three-columns {
    grid-template-columns: 1fr;
  }

  .scenario-card {
    min-height: 72px;
  }

  .compact-field label {
    min-height: 0;
  }
}

@media (max-width: 880px) {
  .page-shell {
    width: min(100% - 32px, 720px);
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-block: 56px 62px;
  }

  .privacy-card {
    max-width: 520px;
  }

  .app-layout {
    grid-template-columns: 1fr;
  }

  .scenario-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .scenario-card {
    min-height: 102px;
  }

  .three-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .compact-field label {
    min-height: 33px;
  }
}

@media (max-width: 580px) {
  .page-shell {
    width: min(100% - 20px, 520px);
  }

  .header-inner {
    min-height: 62px;
  }

  .header-link {
    display: none;
  }

  h1 {
    font-size: clamp(2.25rem, 12vw, 3.25rem);
  }

  .hero-grid {
    padding-block: 46px 52px;
  }

  .hero-actions,
  .hero-actions .button {
    width: 100%;
  }

  .disclaimer {
    margin-top: 16px;
    padding: 15px;
  }

  .app-layout {
    gap: 16px;
    margin-top: 16px;
  }

  .planner-panel,
  .results-panel {
    border-radius: 14px;
  }

  .results-panel {
    padding: 20px 16px;
  }

  .panel-heading,
  .form-section {
    padding-inline: 18px;
  }

  .two-columns,
  .three-columns,
  .scenario-options {
    grid-template-columns: 1fr;
  }

  .scenario-card {
    min-height: 70px;
  }

  .compact-field label {
    min-height: 0;
  }

  .assumption-heading {
    display: block;
  }

  .assumption-heading .text-button {
    margin-top: 8px;
  }

  .form-actions {
    padding-inline: 18px;
  }

  .form-actions .button {
    width: 100%;
  }

  .auto-update-note {
    padding-inline: 18px;
  }

  .results-heading {
    display: block;
  }

  .button-print {
    width: 100%;
    margin-top: 14px;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .metric-card p {
    min-height: 0;
  }

  .section-heading-row {
    display: block;
  }

  .chart-legend {
    justify-content: flex-start;
    margin-top: 10px;
  }

  .chart-wrap,
  .chart-wrap svg {
    min-height: 255px;
  }

  .footer-grid {
    display: block;
  }

  .footer-grid a {
    display: inline-block;
    margin-top: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  @page {
    margin: 0.55in;
  }

  body {
    color: #000;
    background: #fff;
    font-size: 10pt;
  }

  .site-header,
  .hero,
  .disclaimer,
  .planner-panel,
  .button-print,
  .chart-hint,
  .data-details,
  .site-footer,
  .tooltip,
  .skip-link {
    display: none !important;
  }

  .page-shell {
    width: 100%;
  }

  .app-layout {
    display: block;
    margin: 0;
  }

  .results-panel {
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .results-panel::before {
    display: block;
    margin-bottom: 16px;
    content: "Personal Financial Planning Scenario Planner — Educational demonstration only; not financial, tax, investment, or legal advice.";
    font-size: 9pt;
    font-weight: 700;
  }

  .status-card,
  .metric-card,
  .chart-section,
  .comparison-section,
  .method-details {
    break-inside: avoid;
  }

  .chart-wrap {
    min-height: 250px;
  }

  .chart-wrap svg {
    min-height: 250px;
  }

  .method-details {
    display: block;
  }

  .method-details summary {
    list-style: none;
  }

  .method-details .method-content {
    display: block;
  }
}
