:root {
  --paper: #faf6ef;
  --paper-deep: #efe7d9;
  --ink: #24251f;
  --muted: #69685f;
  --olive: #56673b;
  --olive-dark: #3d4b29;
  --olive-pale: #e5eadb;
  --sand: #d8bf73;
  --peach: #e9c9ad;
  --line: #d8d0c2;
  --white: #fffdf8;
  --danger: #9c342c;
  --success: #40592f;
  --shadow: 0 24px 64px rgba(58, 51, 39, .10);
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

button, input, select { font: inherit; }

a { color: inherit; }

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  transform: translateY(-160%);
  background: var(--ink);
  color: white;
}

.skip-link:focus { transform: none; }

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(250, 246, 239, .96);
}

.header-inner, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand { display: inline-flex; min-height: 44px; flex-direction: column; justify-content: center; text-decoration: none; }
.brand-name { font-family: Georgia, "Times New Roman", serif; font-size: 20px; }
.brand-role { color: var(--muted); font-size: 12px; letter-spacing: .02em; }
.back-link { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 650; text-underline-offset: 4px; }

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  align-items: end;
  gap: clamp(32px, 7vw, 100px);
  padding-block: clamp(46px, 7vw, 88px) clamp(32px, 5vw, 60px);
}

.eyebrow, .step {
  margin: 0 0 12px;
  color: var(--olive);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 800px;
  margin-bottom: 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.75rem, 6vw, 5.35rem);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.045em;
}

.lead { max-width: 720px; margin-bottom: 0; color: var(--muted); font-size: clamp(17px, 2vw, 21px); }

.privacy-note {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
  padding: 22px 24px;
  border-left: 3px solid var(--olive);
  background: var(--olive-pale);
}

.privacy-note p { margin: 0; font-size: 14px; }
.privacy-mark { color: var(--olive); }

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(0, .97fr);
  align-items: start;
  gap: 22px;
  padding-bottom: 70px;
}

.calculator-card, .result-card, .empty-result {
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: var(--shadow);
}

.calculator-card { padding: clamp(24px, 4vw, 42px); }
.card-heading { margin-bottom: 28px; }
.card-heading h2, .result-card h2 { margin-bottom: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 500; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field-grid + .field-grid { margin-top: 20px; }
.amount-currency-grid { grid-template-columns: 1.15fr .85fr; }
.common-fields { grid-template-columns: 1.15fr .9fr 1fr; }
.field-group { min-width: 0; }

label, legend { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 750; }

input, select {
  width: 100%;
  min-height: 50px;
  border: 1px solid #bdb5a7;
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  padding: 12px 14px;
  outline: none;
}

select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--olive) 50%), linear-gradient(135deg, var(--olive) 50%, transparent 50%); background-position: calc(100% - 18px) 22px, calc(100% - 12px) 22px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }

input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid rgba(216, 191, 115, .75);
  outline-offset: 2px;
}

input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--danger); background: #fff7f5; }

.input-with-suffix { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; }
.input-with-suffix input { border-right: 0; }
.input-suffix { display: flex; align-items: center; min-width: 68px; border: 1px solid #bdb5a7; background: #f3eee5; padding: 8px 12px; color: var(--muted); font-size: 13px; font-weight: 700; white-space: nowrap; }
.wide-suffix .input-suffix { min-width: 112px; }

.field-hint, .field-error { min-height: 18px; margin: 6px 0 0; font-size: 12px; line-height: 1.35; }
.field-hint { color: var(--muted); }
.field-error { color: var(--danger); font-weight: 650; }

.commission-fieldset { margin: 24px 0 0; padding: 0; border: 0; }
.segmented-control { display: grid; grid-template-columns: repeat(4, 1fr); width: min(390px, 100%); }
.segmented-control label { margin: 0; }
.segmented-control input { position: absolute; width: 1px; height: 1px; min-height: 0; margin: 0; opacity: 0; pointer-events: none; }
.segmented-control span { display: flex; align-items: center; justify-content: center; min-height: 46px; border: 1px solid #bdb5a7; border-right: 0; background: #fff; cursor: pointer; }
.segmented-control label:last-child span { border-right: 1px solid #bdb5a7; }
.segmented-control input:checked + span { background: var(--olive); color: #fff; border-color: var(--olive); }
.segmented-control input:focus-visible + span { outline: 3px solid rgba(216, 191, 115, .75); outline-offset: 2px; position: relative; z-index: 1; }

.commission-value { max-width: 330px; margin-top: 18px; }
.options-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-top: 24px; }
.options-kicker { margin-bottom: 2px; color: var(--olive); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.options-help { margin-bottom: 0; color: var(--muted); font-size: 12px; }
.add-option-button, .remove-option, .details-close { border: 0; background: transparent; color: var(--olive-dark); padding: 5px 0; font-size: 12px; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.add-option-button:disabled { color: var(--muted); cursor: default; text-decoration: none; }
.payment-options { display: grid; gap: 10px; margin-top: 10px; }
.payment-option { min-width: 0; border-top: 1px solid var(--line); padding-top: 8px; }
.option-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.option-header h3 { margin: 0; font-size: 13px; font-weight: 800; }
.remove-option[hidden] { display: none; }
.option-grid { display: grid; grid-template-columns: minmax(120px, 1.15fr) minmax(90px, .72fr) minmax(190px, 1.35fr) minmax(94px, .76fr) minmax(104px, .82fr); align-items: start; gap: 8px; }
.option-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.option-field label, .option-field legend { margin-bottom: 3px; color: var(--muted); font-size: 12px; }
.option-field input { min-height: 40px; padding: 7px 8px; font-size: 16px; }
.option-commission { width: 100%; }
.option-commission span { min-height: 40px; padding-inline: 4px; font-size: 12px; white-space: nowrap; }
.option-field .field-error { font-size: 11px; line-height: 1.15; }
.form-status { min-height: 24px; margin-top: 20px; color: var(--olive-dark); font-size: 14px; font-weight: 650; }
.form-status.error { color: var(--danger); }

.primary-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  min-height: 54px;
  margin-top: 8px;
  border: 0;
  background: var(--olive);
  color: #fff;
  padding: 14px 20px;
  font-weight: 750;
  cursor: pointer;
}
.primary-button:hover { background: var(--olive-dark); }
.primary-button:disabled { cursor: wait; opacity: .68; }

.empty-result {
  display: grid;
  min-height: 320px;
  place-content: center;
  padding: 42px;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
}
.empty-result span { font-family: Georgia, "Times New Roman", serif; font-size: 72px; color: var(--paper-deep); }
.empty-result p { max-width: 390px; margin: 0; }

.result-card { background: var(--olive); color: #fff; overflow: hidden; }
.result-card > *:not(.breakdown) { margin-inline: clamp(24px, 4vw, 42px); }
.result-topline { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: clamp(28px, 4vw, 42px); }
.result-card .step { color: #dfe6d3; }
.status-badge { border: 1px solid rgba(255,255,255,.38); padding: 5px 9px; font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.result-card h2 { color: #e8eadf; font-family: inherit; font-size: 14px; font-weight: 650; }
.total-amount { margin-block: 5px 8px; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: clamp(2.5rem, 3.2vw, 3.25rem); font-weight: 650; font-variant-numeric: lining-nums tabular-nums; font-feature-settings: "lnum" 1, "tnum" 1; line-height: 1; letter-spacing: -.025em; }
.result-summary { max-width: 620px; color: #eef0e8; font-size: 15px; }

.effective-rate-line { margin-bottom: 0; color: #eef0e8; font-size: 15px; }
.key-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-block: 26px 20px; background: rgba(255,255,255,.22); }
.key-metrics > div { display: flex; min-width: 0; flex-direction: column; background: rgba(43, 55, 28, .45); padding: 16px; }
.key-metrics span { display: block; margin-bottom: 5px; color: #dfe6d3; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.key-metrics strong { display: block; margin-top: auto; font-size: 18px; font-variant-numeric: lining-nums tabular-nums; font-feature-settings: "lnum" 1, "tnum" 1; line-height: 1.15; }
.key-metrics strong span { display: inline; margin: 0; color: inherit; font-size: inherit; letter-spacing: 0; text-transform: none; }
.owner-analysis { margin-block: 18px; padding: 14px 16px; border-left: 3px solid var(--sand); background: rgba(255,255,255,.09); }
.owner-analysis p { margin: 0; color: #f3f4ef; font-size: 14px; line-height: 1.4; }
.owner-analysis p + p { margin-top: 7px; }
.details-toggle { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: calc(100% - 48px); min-height: 44px; border: 1px solid rgba(255,255,255,.46); background: transparent; color: #fff; padding: 9px 12px; font-weight: 750; cursor: pointer; }

.breakdown { background: var(--white); color: var(--ink); padding: clamp(24px, 4vw, 42px); }
.breakdown h3 { font-family: Georgia, "Times New Roman", serif; font-size: 25px; font-weight: 500; }
.breakdown dl { margin: 0; }
.breakdown dl > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.breakdown dt { color: var(--muted); }
.breakdown dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.breakdown .accent-row { color: var(--olive-dark); }
.breakdown .total-row { margin-top: 8px; border-bottom: 0; font-size: 18px; color: var(--ink); }

.source-note { padding-block: 16px 22px; color: #e8eadf; font-size: 13px; }
.source-note p { margin: 3px 0; }

.comparison-details { margin-bottom: 40px; border: 1px solid var(--line); background: var(--white); box-shadow: var(--shadow); padding: 24px 28px 18px; }
.comparison-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.comparison-heading h2 { margin-bottom: 0; font-family: Georgia, "Times New Roman", serif; font-size: 28px; font-weight: 500; }
.comparison-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 12px 0; padding: 9px 12px; background: var(--olive-pale); font-size: 12px; }
.comparison-meta p { margin: 0; }
.comparison-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
.comparison-table th, .comparison-table td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: right; vertical-align: middle; }
.comparison-table th:first-child, .comparison-table td:first-child { width: 27%; text-align: left; color: var(--muted); }
.comparison-table thead th { background: #f3eee5; color: var(--ink); font-weight: 800; }
.comparison-table .minimum-column { background: #f1f4ea; }
.comparison-table .minimum-note { display: block; margin-top: 2px; color: var(--olive-dark); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.comparison-table .metric-highlight th, .comparison-table .metric-highlight td { color: var(--ink); font-weight: 800; }
.comparison-table td { white-space: nowrap; font-variant-numeric: tabular-nums; }
.comparison-explanation { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.legal-note { margin-bottom: 36px; color: var(--muted); font-size: 13px; }
.legal-note p { max-width: 1040px; margin-bottom: 0; }

.site-footer { border-top: 1px solid var(--line); padding-block: 22px; }
.footer-inner { font-size: 13px; color: var(--muted); }
.footer-inner p { margin: 0; }
.footer-inner div { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-inner a { min-height: 44px; display: inline-flex; align-items: center; text-underline-offset: 4px; }

[hidden] { display: none !important; }

@media (max-width: 900px) {
  .intro, .workspace { grid-template-columns: 1fr; }
  .intro { align-items: start; gap: 28px; }
  .privacy-note { max-width: 620px; }
  .empty-result { min-height: 190px; }
  .option-grid { grid-template-columns: 1fr 1fr; }
  .option-commission-field { grid-column: 1 / -1; }
}

@media (min-width: 1100px) {
  body { font-size: 15px; line-height: 1.35; }
  .shell { width: min(1520px, calc(100% - 32px)); }
  .header-inner { min-height: 54px; }
  .brand-name { font-size: 19px; }
  .brand-role { font-size: 12px; }

  .intro {
    grid-template-columns: minmax(0, 1.45fr) minmax(370px, .55fr);
    align-items: center;
    gap: 28px;
    padding-block: 12px 14px;
  }
  .step { margin-bottom: 5px; font-size: 10px; }
  h1 { margin-bottom: 6px; font-size: clamp(2.35rem, 2.7vw, 3rem); line-height: 1; }
  .lead { max-width: 840px; font-size: 15px; line-height: 1.35; }
  .privacy-note { grid-template-columns: 14px 1fr; gap: 8px; padding: 10px 13px; }
  .privacy-note p { font-size: 12px; line-height: 1.35; }

  .workspace {
    grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
    align-items: stretch;
    gap: 16px;
    padding-bottom: 28px;
  }
  .calculator-card { display: flex; flex-direction: column; padding: 14px 17px; }
  .calculator-card, .result-card, .empty-result { height: 100%; }
  .card-heading { margin-bottom: 9px; }
  .card-heading h2 { font-size: 24px; }
  .field-grid { gap: 9px; }
  label, legend { margin-bottom: 4px; font-size: 13px; }
  input, select { min-height: 38px; padding: 7px 9px; font-size: 16px; }
  select { background-position: calc(100% - 17px) 16px, calc(100% - 11px) 16px; }
  .input-suffix { min-width: 60px; padding: 6px 8px; font-size: 12px; }
  .field-hint, .field-error { min-height: 0; margin-top: 3px; font-size: 11px; line-height: 1.2; }
  .field-error:empty { display: none; }
  .options-heading { align-items: center; margin-top: 7px; }
  .options-kicker { font-size: 10px; }
  .options-help, .add-option-button { font-size: 11px; }
  .add-option-button { padding: 2px 0; }
  .payment-options { gap: 6px; margin-top: 6px; }
  .payment-option { padding-top: 5px; }
  .option-header { margin-bottom: 5px; }
  .option-header h3 { font-size: 12px; }
  .remove-option { padding: 0; font-size: 11px; }
  .option-grid { gap: 6px; }
  .option-field label, .option-field legend { margin-bottom: 4px; font-size: 12px; line-height: 1.1; }
  .option-field input { min-height: 34px; padding: 5px 6px; font-size: 16px; }
  .option-commission span { min-height: 34px; font-size: 12px; }
  .option-field .field-error { margin-top: 2px; font-size: 11px; }
  .form-status { min-height: 17px; margin-top: auto; padding-top: 7px; font-size: 12px; }
  .primary-button { min-height: 44px; margin-top: 4px; padding: 10px 14px; font-size: 15px; }

  .empty-result { min-height: 280px; padding: 28px; }
  .result-card { min-width: 0; display: flex; flex-direction: column; }
  .result-card > *:not(.breakdown) { margin-inline: 20px; }
  .result-topline { padding-top: 14px; }
  .status-badge { max-width: 260px; padding: 5px 8px; font-size: 10px; line-height: 1.2; text-align: right; }
  .result-card h2 { font-size: 14px; }
  .total-amount { margin-block: 2px 5px; font-size: clamp(2.5rem, 3vw, 3.25rem); }
  .result-summary { margin-bottom: 0; font-size: 14px; line-height: 1.3; }
  .effective-rate-line { margin-top: 5px; font-size: 14px; }
  .key-metrics { margin-block: 11px 10px; }
  .key-metrics > div { padding: 10px 11px; }
  .key-metrics span { margin-bottom: 3px; font-size: 11px; }
  .key-metrics strong { font-size: 16px; }
  .owner-analysis { margin-block: 10px; padding: 10px 12px; }
  .owner-analysis p { font-size: 14px; line-height: 1.36; }
  .owner-analysis p + p { margin-top: 4px; }
  .details-toggle { width: calc(100% - 40px); min-height: 38px; padding: 7px 10px; font-size: 13px; }
  .source-note { display: flex; flex-wrap: wrap; gap: 3px 16px; margin-top: auto; padding-block: 9px 14px; font-size: 12px; }
  .source-note p { margin: 0; }
  .source-note #nominal-note { flex-basis: 100%; }

  .comparison-details { margin-bottom: 18px; padding: 18px 20px 14px; }
  .comparison-heading h2 { font-size: 27px; }
  .comparison-meta { margin: 9px 0; padding: 8px 10px; font-size: 13px; }
  .comparison-table { font-size: 13px; }
  .comparison-table th, .comparison-table td { padding: 7px 9px; }
  .comparison-explanation { font-size: 13px; }
  .legal-note p { max-width: 960px; }
  .site-footer { padding-block: 10px; }
  .footer-inner { min-height: 40px; font-size: 13px; }
  .footer-inner a { min-height: 40px; }
}

@media (min-width: 1100px) and (max-width: 1279px) {
  .workspace { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .option-grid { grid-template-columns: minmax(88px, 1.05fr) minmax(62px, .7fr) minmax(142px, 1.3fr) minmax(68px, .75fr) minmax(76px, .82fr); gap: 4px; }
  .option-field label, .option-field legend { font-size: 11px; white-space: nowrap; }
  .option-commission span { padding-inline: 2px; font-size: 11px; }
  .owner-analysis p { font-size: 14px; }
  .key-metrics { grid-template-columns: 1fr; }
  .key-metrics > div { padding: 8px 10px; }
  .source-note { display: block; }
  .source-note p { margin: 2px 0; }
}

@media (min-width: 1280px) {
  .key-metrics > div > span { min-height: 2.8em; }
  .key-metrics strong { margin-top: 0; }
}

@media (min-width: 1280px) and (max-height: 820px) {
  .intro { padding-block: 8px 10px; }
  .calculator-card { padding-block: 11px; }
  .card-heading { margin-bottom: 6px; }
  .field-hint { font-size: 11px; }
  .payment-options { gap: 4px; }
  .owner-analysis { padding-block: 8px; }
  .owner-analysis p { font-size: 14px; }
  .source-note { padding-block: 7px 10px; }
  .key-metrics { margin-block: 8px; }
  .key-metrics > div { padding-block: 8px; }
  .total-amount { font-size: 42px; }
  .result-topline { padding-top: 10px; }
  .form-status { margin-top: 4px; }
  .primary-button { min-height: 40px; }
  .option-field input, .option-commission span { min-height: 32px; }
  .option-header { margin-bottom: 3px; }
  .payment-option { padding-top: 3px; }
  .owner-analysis p + p { margin-top: 2px; }
  .result-summary, .effective-rate-line { font-size: 14px; }
  .key-metrics strong { font-size: 16px; }
  .key-metrics span { font-size: 11px; }
  .details-toggle { min-height: 36px; }
  .source-note { font-size: 11px; }
  .field-group:has([aria-invalid="true"]) .field-hint {
    display: none;
  }
}

@media (min-width: 1600px) and (min-height: 900px) {
  body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 17px;
    line-height: 1.42;
  }
  main { flex: 1; }
  .shell { width: min(1800px, calc(100% - 80px)); }
  .header-inner { min-height: 64px; }
  .brand-name { font-size: 21px; }
  .back-link { font-size: 15px; }

  .intro {
    grid-template-columns: minmax(0, 1.45fr) minmax(420px, .55fr);
    gap: 38px;
    padding-block: 18px 20px;
  }
  h1 { margin-bottom: 9px; font-size: clamp(3rem, 3.2vw, 3.75rem); }
  .lead { max-width: 960px; font-size: 17px; }
  .privacy-note { padding: 14px 17px; }
  .privacy-note p { font-size: 14px; }

  .workspace {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    padding-bottom: 24px;
  }
  .calculator-card { padding: 22px 25px; }
  .card-heading { margin-bottom: 14px; }
  .card-heading h2 { font-size: 30px; }
  .field-grid { gap: 14px; }
  label, legend { margin-bottom: 5px; font-size: 15px; }
  input, select { min-height: 46px; padding: 9px 11px; font-size: 18px; }
  select { background-position: calc(100% - 18px) 20px, calc(100% - 12px) 20px; }
  .input-suffix { min-width: 66px; padding-inline: 10px; font-size: 14px; }
  .field-hint, .field-error { margin-top: 4px; font-size: 12px; line-height: 1.3; }
  .options-heading { margin-top: 11px; }
  .options-kicker { font-size: 11px; }
  .options-help, .add-option-button { font-size: 12px; }
  .payment-options { gap: 9px; margin-top: 8px; }
  .payment-option { padding-top: 7px; }
  .option-header { margin-bottom: 7px; }
  .option-header h3 { font-size: 13px; }
  .remove-option { font-size: 12px; }
  .option-grid { gap: 9px; }
  .option-field label, .option-field legend { margin-bottom: 5px; font-size: 13px; }
  .option-field input { min-height: 40px; padding: 7px 8px; font-size: 18px; }
  .option-commission span { min-height: 40px; padding-inline: 5px; font-size: 14px; }
  .form-status { min-height: 20px; margin-top: 11px; font-size: 14px; }
  .primary-button { min-height: 52px; margin-top: 6px; padding: 12px 17px; font-size: 17px; }

  .result-card > *:not(.breakdown) { margin-inline: 28px; }
  .result-topline { padding-top: 22px; }
  .step { font-size: 11px; }
  .status-badge { max-width: 300px; padding: 6px 10px; font-size: 11px; }
  .result-card h2 { font-size: 16px; }
  .total-amount { margin-block: 5px 8px; font-size: 62px; }
  .result-summary, .effective-rate-line { font-size: 16px; line-height: 1.4; }
  .effective-rate-line { margin-top: 7px; }
  .key-metrics { margin-block: 18px 15px; }
  .key-metrics > div { padding: 15px 16px; }
  .key-metrics span { margin-bottom: 5px; font-size: 12px; }
  .key-metrics strong { font-size: 20px; }
  .owner-analysis { margin-block: 15px; padding: 14px 16px; }
  .owner-analysis p { font-size: 16px; line-height: 1.45; }
  .owner-analysis p + p { margin-top: 6px; }
  .details-toggle { width: calc(100% - 56px); min-height: 44px; padding: 9px 12px; font-size: 15px; }
  .source-note { gap: 4px 20px; padding-block: 12px 18px; font-size: 12px; }

  .legal-note { margin-bottom: 28px; font-size: 14px; }
  .legal-note p { max-width: 960px; }
  .site-footer { padding-block: 12px; }
  .footer-inner { min-height: 42px; font-size: 14px; }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 28px, 1180px); }
  .header-inner { min-height: 68px; }
  .brand-role { display: none; }
  .back-link { font-size: 0; }
  .back-link span { font-size: 18px; }
  .intro { padding-top: 38px; }
  h1 { font-size: clamp(2.55rem, 13vw, 4rem); }
  .workspace { padding-bottom: 42px; }
  .calculator-card { padding: 24px 18px; }
  .field-grid, .amount-currency-grid, .common-fields { grid-template-columns: 1fr; gap: 18px; }
  .field-grid + .field-grid { margin-top: 18px; }
  .options-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .option-grid { grid-template-columns: 1fr 1fr; }
  .option-name-field, .option-rate-field, .option-commission-field { grid-column: 1 / -1; }
  .key-metrics { grid-template-columns: 1fr; }
  .breakdown dl > div { gap: 12px; font-size: 13px; }
  .footer-inner { align-items: flex-start; flex-direction: column; gap: 4px; }
  .footer-inner div { gap: 14px; }
  .comparison-details { padding: 20px 16px; }
  .comparison-heading h2 { font-size: 24px; }
  .comparison-meta { grid-template-columns: 1fr; }
  .comparison-table, .comparison-table tbody, .comparison-table tr, .comparison-table th, .comparison-table td { display: block; width: 100%; }
  .comparison-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .comparison-table tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .comparison-table th, .comparison-table td, .comparison-table th:first-child, .comparison-table td:first-child { width: 100%; border: 0; padding: 4px 0; text-align: left; white-space: normal; }
  .comparison-table td::before { content: attr(data-option-label) ": "; color: var(--muted); font-weight: 500; }
  .owner-analysis p { font-size: 14px; }
}

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

/* Return through the tools catalogue and use the full desktop workspace. */
@media (min-width: 960px) {
  .shell { width: calc(100% - clamp(40px, 4vw, 80px)); max-width: none; }
}
@media (max-width: 620px) {
  .header-inner { gap: 12px; }
  .brand { min-width: 0; }
  .back-link { font-size: 12px; line-height: 1.3; max-width: 148px; text-align: right; }
}

/* A clear return action, using the approved site button style and no icon. */
.back-link {
  justify-content: center;
  gap: 0;
  padding: 10px 16px;
  border: 1px solid var(--olive);
  border-radius: 999px;
  background: var(--olive);
  color: var(--white);
  text-align: center;
  text-decoration: none;
  line-height: 1.3;
}
.back-link:hover { background: var(--olive-dark); border-color: var(--olive-dark); }
@media (max-width: 620px) {
  .back-link { max-width: 148px; padding-inline: 12px; font-size: 12px; }
}

/* Compact support links; calculation notices remain in the content. */
.site-footer { padding-block: 10px; }
.footer-inner { min-height: 44px; }
.footer-inner .footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 0 24px; min-width: 0; }
.footer-inner a { min-height: 44px; max-width: 100%; }

/* Make the direct feedback link visible while keeping the footer compact. */
.site-footer .feedback-link {
  color: #56673b;
  font-weight: 700;
  text-decoration-color: #56673b;
  text-decoration-thickness: 2px;
}
.site-footer .feedback-link:hover {
  color: #3d4b29;
  text-decoration-color: #3d4b29;
}
