:root {
  color-scheme: light;
  --ink: #15362f;
  --ink-soft: #48635d;
  --muted: #5f7069;
  --line: #e2eae5;
  --line-strong: #cad9d1;
  --paper: #f5f8f6;
  --white: #ffffff;
  --green-900: #173d34;
  --green-800: #205947;
  --green-700: #28735a;
  --green-600: #318465;
  --green-100: #e9f4ed;
  --green-50: #f3f8f4;
  --gold: #d7a348;
  --gold-100: #fcf4e3;
  --rose: #b94a49;
  --rose-100: #fff0ef;
  --shadow-card: 0 12px 32px rgb(21 54 47 / 6%);
  --shadow-floating: 0 18px 50px rgb(21 54 47 / 10%);
  --radius-card: 18px;
  --radius-control: 10px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Source Han Sans TC", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a,
input,
summary {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid rgb(49 132 101 / 45%);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.container {
  width: min(var(--container), calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-160%);
  border-radius: 8px;
  background: var(--green-900);
  color: var(--white);
}

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

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid rgb(21 54 47 / 7%);
  background: rgb(255 255 255 / 90%);
  backdrop-filter: blur(16px);
}

.nav,
.brand,
.nav-links,
.hero-grid,
.hero-card-heading,
.hero-metrics,
.section-heading,
.card-heading,
.panel-intro,
.result-card-heading,
.net-worth-pair,
.break-even-row,
.summary-list > div,
.chart-heading,
.chart-legend,
.scenario-card-top,
.footer-inner {
  display: flex;
  align-items: center;
}

.nav {
  min-height: 72px;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  gap: 10px;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--green-900);
  color: var(--white);
  font-size: 16px;
}

.nav-links {
  gap: 30px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 550;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--green-700);
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease;
}

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

.button-quiet {
  border-color: var(--line);
  background: var(--white);
  color: var(--ink-soft);
}

.button-quiet:hover,
.button-outline:hover {
  border-color: var(--green-700);
  background: var(--green-50);
  color: var(--green-800);
}

.button-outline {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--ink);
}

.hero {
  padding: 72px 0 78px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 82% 18%, rgb(218 233 220 / 70%), transparent 35%),
    linear-gradient(120deg, #f3f8f4 0%, #edf4ee 55%, #f7f7ef 100%);
}

.hero-grid {
  align-items: center;
  justify-content: space-between;
  gap: 64px;
}

.hero-copy {
  max-width: 610px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green-700);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #54a37c;
  vertical-align: 1px;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 20px;
  color: var(--green-900);
  font-size: clamp(36px, 4.7vw, 58px);
  font-weight: 760;
  letter-spacing: -0.055em;
  line-height: 1.2;
}

.hero-description {
  max-width: 540px;
  margin-bottom: 26px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.8;
}

.trust-points {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.trust-points span,
.editable-tag,
.live-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 650;
}

.trust-points span {
  padding: 5px 10px;
  border: 1px solid #dce8de;
  background: rgb(255 255 255 / 64%);
  color: var(--green-800);
}

.hero-assumptions {
  width: min(390px, 100%);
  flex: 0 0 auto;
  padding: 24px;
  border: 1px solid rgb(255 255 255 / 80%);
  border-radius: 20px;
  background: rgb(255 255 255 / 82%);
  box-shadow: var(--shadow-floating);
  backdrop-filter: blur(10px);
}

.hero-card-heading {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 20px;
}

.hero-card-heading .eyebrow {
  margin-bottom: 3px;
  font-size: 10px;
}

.hero-card-heading h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.editable-tag {
  padding: 5px 9px;
  background: var(--green-100);
  color: var(--green-700);
  white-space: nowrap;
}

.hero-metrics {
  flex-wrap: wrap;
  gap: 10px;
}

.hero-metric {
  display: flex;
  min-width: calc(50% - 5px);
  flex: 1;
  flex-direction: column;
  gap: 4px;
  padding: 12px 13px;
  border: 1px solid #edf1ed;
  border-radius: 11px;
  background: #fbfcfb;
}

.hero-metric span {
  color: var(--muted);
  font-size: 11px;
}

.hero-metric strong {
  color: var(--green-900);
  font-size: 17px;
  letter-spacing: -0.03em;
}

.hero-metric-wide {
  flex-basis: 100%;
}

.micro-copy {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.section {
  padding: 76px 0;
}

.calculator-section {
  padding-top: 70px;
  padding-bottom: 70px;
}

.section-heading {
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 30px;
}

.section-heading h2 {
  margin: 0 0 7px;
  color: var(--green-900);
  font-size: clamp(25px, 3vw, 34px);
  letter-spacing: -0.045em;
  line-height: 1.25;
}

.section-heading p:not(.eyebrow) {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.validation-summary {
  margin-bottom: 20px;
  padding: 15px 18px;
  border: 1px solid #efc3c0;
  border-radius: 12px;
  background: var(--rose-100);
  color: #812f2e;
  font-size: 13px;
}

.validation-summary ul {
  margin: 6px 0 0;
  padding-left: 19px;
}

.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.form-column {
  display: grid;
  gap: 18px;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.form-card {
  padding: 25px 27px 27px;
}

.card-heading {
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 23px;
}

.section-index {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  background: var(--green-100);
  color: var(--green-700);
  font-size: 12px;
  font-weight: 750;
}

.card-heading h3 {
  margin: 1px 0 3px;
  font-size: 18px;
  letter-spacing: -0.025em;
}

.card-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}

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

.field {
  min-width: 0;
}

.field label,
.mode-fieldset legend {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
}

.field label span {
  color: #5f7069;
  font-weight: 450;
}

.field input,
.field select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  transition: border-color 130ms ease, box-shadow 130ms ease;
}

.field input:hover,
.field select:hover {
  border-color: #9db8a8;
}

.field input:focus,
.field select:focus {
  border-color: var(--green-600);
  outline: 0;
  box-shadow: 0 0 0 3px rgb(49 132 101 / 12%);
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"] {
  border-color: var(--rose);
  background: #fffafa;
}

.field-hint,
.field-error {
  min-height: 19px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.field-hint strong {
  color: var(--green-800);
  font-weight: 700;
}

.field-error {
  color: var(--rose);
}

.mode-fieldset {
  margin: 21px 0 18px;
  padding: 0;
  border: 0;
}

.mode-fieldset legend {
  margin-bottom: 9px;
  padding: 0;
}

.segmented-control {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f6f8f6;
}

.segment-option {
  position: relative;
  cursor: pointer;
}

.segment-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.segment-option span {
  display: block;
  padding: 7px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.segment-option input:checked + span {
  background: var(--white);
  box-shadow: 0 1px 4px rgb(21 54 47 / 12%);
  color: var(--green-800);
}

.segment-option input:focus-visible + span {
  outline: 3px solid rgb(49 132 101 / 45%);
  outline-offset: 2px;
}

.mortgage-panel {
  padding: 17px;
  border: 1px solid #e8eee8;
  border-radius: 13px;
  background: #fafcf9;
}

.mortgage-panel .field-hint {
  margin-bottom: 0;
}

.panel-intro {
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-intro h4 {
  margin: 0 0 3px;
  font-size: 13px;
}

.panel-intro p {
  max-width: 380px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.segment-list {
  display: grid;
  gap: 10px;
}

.segment-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
}

.segment-row legend {
  padding: 0 5px;
  color: var(--green-800);
  font-size: 10px;
  font-weight: 750;
}

.optional-tag {
  color: var(--muted);
  font-weight: 450;
}

.segment-row .field label {
  font-size: 10px;
}

.segment-row .field input {
  height: 39px;
  padding-inline: 8px;
  font-size: 12px;
}

.segment-row .field-error {
  min-height: 0;
}

.divider {
  height: 1px;
  margin: 22px 0 18px;
  background: var(--line);
}

.mortgage-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: 9px;
  background: var(--green-50);
  color: var(--ink-soft);
  font-size: 10px;
}

.mortgage-breakdown strong {
  color: var(--green-800);
}

.subsection-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 22px 0 13px;
  padding-bottom: 9px;
  border-bottom: 1px solid #eef2ef;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.subsection-title span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 450;
}

.result-card {
  overflow: hidden;
  padding: 24px;
}

.result-card-heading {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 17px;
}

.result-card-heading .eyebrow {
  margin-bottom: 3px;
  font-size: 9px;
}

.result-card-heading h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.025em;
}

.live-tag {
  padding: 5px 9px;
  background: #f2f6f2;
  color: var(--green-700);
  font-size: 9px;
}

.live-tag .status-dot {
  width: 6px;
  height: 6px;
  margin-right: 5px;
}

.winner-panel {
  padding: 17px;
  border-radius: 13px;
  background: var(--green-900);
  color: var(--white);
}

.winner-panel[data-winner="renter"] {
  background: #315d56;
}

.winner-panel[data-winner="tie"] {
  background: #586d62;
}

.winner-panel p {
  margin: 0 0 2px;
  color: #c8dfd1;
  font-size: 11px;
  font-weight: 650;
}

.winner-panel strong {
  display: block;
  margin-bottom: 2px;
  font-size: clamp(24px, 3vw, 31px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1.3;
}

.winner-panel span {
  color: #c0d3ca;
  font-size: 10px;
}

.net-worth-pair {
  gap: 9px;
  margin: 12px 0;
}

.net-worth-tile {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.net-worth-tile span {
  color: var(--muted);
  font-size: 9px;
}

.net-worth-tile strong {
  color: var(--ink);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.break-even-row {
  gap: 9px;
  padding: 10px 0 13px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 11px;
}

.break-even-icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 8px;
  background: var(--gold-100);
  color: #775317;
  font-size: 15px;
  font-weight: 750;
}

.summary-list {
  display: grid;
  gap: 9px;
  padding: 13px 0;
}

.summary-list > div {
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
}

.summary-list strong {
  color: var(--ink);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.privacy-note {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.privacy-note span {
  color: var(--green-700);
  font-weight: 800;
}

.shortfall-notice {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #f1d8a8;
  border-radius: 10px;
  background: #fff9eb;
  color: #755316;
  font-size: 11px;
}

.results-section {
  background: #eef4ef;
}

.results-heading {
  align-items: flex-end;
}

.scenario-switch {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 3px;
  padding: 4px;
  border: 1px solid #dce6dd;
  border-radius: 11px;
  background: rgb(255 255 255 / 75%);
}

.scenario-switch button {
  min-width: 0;
  overflow: hidden;
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
}

.scenario-switch button[aria-pressed="true"] {
  background: var(--green-900);
  color: var(--white);
}

.scenario-readout {
  display: flex;
  min-height: 37px;
  align-items: center;
  gap: 8px;
  margin: -12px 0 18px;
  color: var(--ink-soft);
  font-size: 11px;
}

.scenario-readout strong {
  color: var(--green-800);
}

.chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(300px, 0.68fr);
  gap: 18px;
}

.chart-card {
  min-width: 0;
  padding: 22px 23px 20px;
}

.chart-heading {
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 15px;
}

.chart-heading h3 {
  margin: 0 0 4px;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.chart-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.chart-legend {
  flex: 0 0 auto;
  gap: 13px;
  color: var(--ink-soft);
  font-size: 9px;
}

.chart-legend span {
  white-space: nowrap;
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-radius: 50%;
  vertical-align: 0;
}

.legend-buy {
  background: #328465;
}

.legend-rent {
  background: #d0a14f;
}

.chart-container {
  position: relative;
  width: 100%;
  min-height: 230px;
}

.chart-container svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-gridline {
  stroke: #e8eeea;
  stroke-dasharray: 3 4;
  stroke-width: 1;
}

.chart-axis-label {
  fill: #5f7069;
  font-family: inherit;
  font-size: 10px;
}

.chart-data-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.chart-data-line-buy {
  stroke: #328465;
}

.chart-data-line-rent {
  stroke: #d0a14f;
}

.chart-data-area-buy {
  fill: rgb(50 132 101 / 8%);
}

.chart-point {
  stroke: #fff;
  stroke-width: 2;
}

.chart-point-buy {
  fill: #328465;
}

.chart-point-rent {
  fill: #d0a14f;
}

.chart-data-details {
  margin-top: 7px;
  border-top: 1px solid var(--line);
}

.chart-data-details summary {
  padding: 12px 0 0;
  color: var(--green-700);
  cursor: pointer;
  font-size: 10px;
  font-weight: 650;
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  font-size: 10px;
  text-align: right;
}

caption {
  margin-bottom: 6px;
  color: var(--muted);
  text-align: left;
}

th,
td {
  padding: 8px 9px;
  border-bottom: 1px solid #edf1ee;
  font-variant-numeric: tabular-nums;
}

th {
  color: var(--ink-soft);
  font-weight: 700;
}

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

.scenarios-section {
  background: var(--white);
}

.scenario-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
}

.scenario-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.scenario-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.scenario-toolbar .button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.scenario-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}

.scenario-base {
  background: #f5f9f5;
}

.scenario-card-top {
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 15px;
}

.scenario-icon {
  display: grid;
  width: 33px;
  height: 33px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: #dfece2;
  color: var(--green-800);
  font-size: 13px;
  font-weight: 750;
}

.scenario-icon-up {
  background: var(--green-100);
  color: var(--green-700);
}

.scenario-icon-down {
  background: var(--gold-100);
  color: #775317;
}

.scenario-card h3 {
  margin: 0 0 2px;
  font-size: 14px;
}

.scenario-card-top p,
.scenario-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.scenario-editable > summary {
  list-style: none;
  cursor: pointer;
}

.scenario-editable > summary::-webkit-details-marker {
  display: none;
}

.scenario-editable > summary::after {
  margin-left: auto;
  color: var(--muted);
  content: "＋";
  font-size: 14px;
}

.scenario-editable[open] > summary::after {
  content: "−";
}

.scenario-assumption-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 14px 0 0;
  border-top: 1px solid #e3ebe4;
  list-style: none;
}

.scenario-assumption-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}

.scenario-assumption-list strong {
  color: var(--ink);
  font-weight: 650;
}

.scenario-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 10px;
}

.scenario-fields .field label {
  min-height: 34px;
  font-size: 10px;
}

.scenario-fields .field input {
  height: 39px;
  padding-inline: 9px;
  font-size: 12px;
}

.scenario-fields .field select {
  height: 39px;
  padding: 0 9px;
  font-size: 12px;
}

.scenario-mode-note,
.scenario-actions {
  grid-column: 1 / -1;
}

.scenario-mode-panel {
  grid-column: 1 / -1;
}

.scenario-mode-panel[hidden] {
  display: none;
}

.scenario-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 6px;
}

.scenario-fields .field-error {
  min-height: 0;
}

.method-section {
  background: #eef4ef;
}

.method-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 70px;
  align-items: start;
}

.method-copy h2 {
  max-width: 460px;
  margin: 0 0 14px;
  color: var(--green-900);
  font-size: clamp(26px, 3vw, 35px);
  letter-spacing: -0.045em;
  line-height: 1.3;
}

.method-copy > p:last-child {
  max-width: 490px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.85;
}

.method-details {
  border-top: 1px solid #dbe5dc;
}

.method-details details {
  border-bottom: 1px solid #dbe5dc;
}

.method-details summary {
  position: relative;
  padding: 16px 30px 16px 0;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 680;
  list-style: none;
}

.method-details summary::-webkit-details-marker {
  display: none;
}

.method-details summary::after {
  position: absolute;
  top: 14px;
  right: 2px;
  color: var(--green-700);
  content: "+";
  font-size: 18px;
  font-weight: 450;
}

.method-details details[open] summary::after {
  content: "−";
}

.method-details details p {
  max-width: 620px;
  margin: -3px 0 16px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.8;
}

.disclaimer {
  margin: 50px 0 0;
  padding: 16px 18px;
  border: 1px solid #dce5dc;
  border-radius: 11px;
  background: rgb(255 255 255 / 55%);
  color: var(--muted);
  font-size: 10px;
}

.disclaimer strong {
  color: var(--ink-soft);
}

.site-footer {
  padding: 23px 0;
  border-top: 1px solid var(--line);
  background: var(--white);
}

.footer-inner {
  justify-content: space-between;
  gap: 18px;
}

.footer-inner .brand {
  font-size: 12px;
}

.footer-inner .brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 13px;
}

.footer-inner p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

@media (max-width: 980px) {
  .hero-grid {
    gap: 36px;
  }

  .form-card {
    padding: 22px;
  }

  .result-card {
    padding: 20px;
  }

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

  .method-layout {
    gap: 38px;
  }
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 72px;
  }

  .container {
    width: min(100% - 32px, var(--container));
  }

  .nav {
    min-height: 62px;
    gap: 10px;
  }

  .nav-links {
    display: none;
  }

  .reset-button {
    min-height: 38px;
    padding-inline: 11px;
    font-size: 11px;
  }

  .hero {
    padding: 48px 0 52px;
  }

  .hero-grid {
    align-items: flex-start;
    flex-direction: column;
    gap: 27px;
  }

  h1 {
    font-size: clamp(36px, 9.5vw, 48px);
  }

  .hero-description {
    font-size: 14px;
  }

  .hero-assumptions {
    width: 100%;
  }

  .section,
  .calculator-section {
    padding: 52px 0;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 22px;
  }

  .section-heading .button {
    align-self: stretch;
  }

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

  .form-column {
    grid-row: 1;
  }

  .result-card {
    padding: 19px;
  }

  .shortfall-notice {
    margin-top: 10px;
  }

  .scenario-switch {
    align-self: stretch;
    justify-content: space-between;
  }

  .scenario-switch button {
    flex: 1;
  }

  .scenario-readout {
    margin-top: -6px;
  }

  .scenario-cards {
    grid-template-columns: 1fr;
  }

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

  .method-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .disclaimer {
    margin-top: 34px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-inner p {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .container {
    width: calc(100% - 24px);
  }

  .nav .brand {
    font-size: 13px;
  }

  .nav .brand-mark {
    width: 30px;
    height: 30px;
  }

  .form-card {
    padding: 18px 15px;
    border-radius: 14px;
  }

  .card-heading {
    gap: 10px;
    margin-bottom: 19px;
  }

  .card-heading h3 {
    font-size: 16px;
  }

  .field-grid,
  .field-grid-three {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .mortgage-panel {
    padding: 12px;
  }

  .segment-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
  }

  .segment-row .field:last-child {
    grid-column: 1 / -1;
  }

  .panel-intro {
    flex-direction: column;
  }

  .net-worth-pair {
    align-items: stretch;
  }

  .net-worth-tile {
    padding: 9px;
  }

  .net-worth-tile strong {
    font-size: 12px;
  }

  .summary-list > div {
    font-size: 9px;
  }

  .summary-list strong {
    font-size: 9px;
  }

  .chart-card {
    padding: 17px 14px;
  }

  .chart-heading {
    flex-direction: column;
    gap: 10px;
  }

  .chart-container {
    min-height: 175px;
  }

  .scenario-fields {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .scenario-card {
    padding: 16px;
  }
}

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