@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --ink: #1f1f1f;
  --muted: #666666;
  --green: #17594b;
  --lime: #d5edb4;
  --paper: #f6f7f3;
  --border: #e5e9e2;
  --red: #a85c50;
  --white: #ffffff;
  --curve: cubic-bezier(0.22,1,0.36,1);
  --layer-header: 2;
  --layer-toast: 10;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 14px/20px 'Manrope',sans-serif; -webkit-font-smoothing: antialiased; }
p { margin: 0; color: var(--muted); text-wrap: pretty; }
h1,h2,h3 { margin: 0; font-weight: 600; text-wrap: balance; }
h1 { max-width: 680px; font-size: 48px; line-height: 1; letter-spacing: -.04em; margin-bottom: 16px; background: linear-gradient(to right,#000000,#666666); background-clip: text; -webkit-background-clip: text; color: transparent; }
h1 em { font-style: normal; }
h2 { font-size: 20px; line-height: 28px; letter-spacing: -.025em; }
h3 { font-size: 16px; line-height: 24px; letter-spacing: -.025em; }
a { color: var(--green); text-underline-offset: 4px; }
button,input,select { font: inherit; color: inherit; }
button,a,input,select,summary { touch-action: manipulation; }
button,summary { cursor: pointer; }
button,a,input,select,summary { transition: color 300ms var(--curve), background-color 300ms var(--curve), border-color 300ms var(--curve), opacity 300ms var(--curve), transform 500ms var(--curve); }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
button:active:not(:disabled) { transform: scale(.98); }
button:disabled { opacity: .4; cursor: default; }
[hidden] { display: none !important; }
.skip-link { position: absolute; top: 16px; left: 24px; z-index: var(--layer-toast); transform: translateY(-200%); padding: 12px 16px; background: var(--green); color: var(--white); border-radius: 8px; }
.skip-link:focus { transform: translateY(0); }
.header { display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: 1440px; margin: 16px auto 0; padding: 16px 32px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--green); text-decoration: none; font-size: 24px; line-height: 32px; font-weight: 700; letter-spacing: -.04em; }
.brandmark { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--green); color: var(--white); font-size: 24px; letter-spacing: -.1em; padding-right: 4px; }
.brandmark span { color: var(--lime); }
.brand-light { font-weight: 500; }
.brand-dot { color: var(--green); }
nav { display: flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--white); }
.nav { border: 0; background: transparent; border-radius: 8px; color: var(--muted); padding: 12px 16px; font-size: 14px; line-height: 20px; font-weight: 500; }
.nav:hover { color: var(--green); background: var(--paper); }
.nav.active { background: var(--green); color: var(--white); font-weight: 600; }
.year { display: flex; align-items: center; gap: 8px; font-size: 12px; line-height: 16px; color: var(--muted); white-space: nowrap; }
.year span,.live-dot { display: block; width: 8px; height: 8px; background: var(--green); border-radius: 50%; flex-shrink: 0; }
main { max-width: 1440px; margin: auto; padding: 32px 32px 0; }
.intro { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 32px; }
.eyebrow { color: var(--green); font-size: 12px; line-height: 16px; letter-spacing: .1em; font-weight: 600; margin-bottom: 16px; }
.intro p { max-width: 680px; font-size: 16px; line-height: 24px; }
.intro-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 8px; padding: 8px 12px; min-height: 48px; font-size: 16px; line-height: 24px; font-weight: 600; background: var(--green); color: var(--white); }
.button:hover:not(:disabled) { background: var(--ink); }
.button.secondary { background: var(--white); color: var(--ink); border-color: var(--border); }
.button.secondary:hover:not(:disabled) { background: var(--paper); border-color: var(--muted); }
.intro-actions .button { font-size: 14px; line-height: 20px; }
.text-button { padding: 8px 0; min-height: 40px; background: transparent; border: 0; color: var(--green); font-size: 12px; line-height: 16px; font-weight: 600; text-align: left; text-underline-offset: 4px; }
.text-button:hover { text-decoration: underline; }

/* The form stays familiar; progress and help have their own visual hierarchy. */
.wizard-active #primary-nav { display: none !important; }
.wizard-active .intro,.wizard { max-width: 1200px; margin-left: auto; margin-right: auto; }
.wizard { scroll-margin-top: 24px; }
.wizard-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.wizard-top .eyebrow { margin: 0; }
.wizard-steps { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 8px; list-style: none; padding: 0; margin: 0 0 32px; }
.wizard-steps li { min-width: 0; }
.wizard-steps button { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 64px; padding: 12px; text-align: left; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); font-size: 12px; line-height: 16px; font-weight: 500; }
.wizard-steps button:hover { background: var(--white); border-color: var(--border); }
.step-number { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 32px; height: 32px; border: 1px solid var(--border); border-radius: 50%; background: var(--white); color: var(--muted); font-variant-numeric: tabular-nums; }
.wizard-steps button.current { background: var(--white); border-color: var(--green); color: var(--green); font-weight: 700; }
.current .step-number { background: var(--green); border-color: var(--green); color: var(--white); }
.past .step-number { background: var(--border); color: var(--green); }
.wizard-grid { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(0,1fr); gap: 24px; align-items: start; }
.wizard-main { min-width: 0; padding: 40px; background: var(--white); border-radius: 16px; }
.wizard-heading { margin-bottom: 24px; }
.wizard-heading h2 { font-size: 30px; line-height: 36px; }
.wizard-heading p { margin-top: 12px; font-size: 14px; line-height: 20px; max-width: 65ch; }
.privacy-notice { padding: 16px; margin-bottom: 16px; background: var(--paper); border-radius: 8px; }
.privacy-notice summary { display: block; color: var(--green); font-size: 12px; line-height: 16px; font-weight: 600; cursor: pointer; }
.privacy-notice summary::after { content: '+' / ''; float: right; }
.privacy-notice[open] summary::after { content: '−' / ''; }
.privacy-notice p { margin-top: 8px; font-size: 12px; line-height: 16px; }
.income-entry { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.65fr); gap: 16px; }
.example-note { margin: 0 0 24px; color: var(--muted); font-size: 12px; line-height: 16px; }
.wizard-help { padding: 32px; border-radius: 16px; background: var(--border); }
.help-symbol { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: 24px; border: 1px solid var(--green); border-radius: 12px; font-size: 20px; line-height: 28px; font-weight: 500; color: var(--green); }
.wizard-help h3 { font-size: 20px; line-height: 28px; margin-bottom: 12px; }
.wizard-help p { font-size: 14px; line-height: 20px; max-width: 65ch; }
.wizard-tip { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--white); }
.wizard-tip strong { display: block; margin-bottom: 8px; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--green); }
.wizard-privacy { display: flex; align-items: center; gap: 8px; color: var(--green); margin-top: 32px; font-size: 12px; line-height: 16px; }
.wizard-mobile-help { display: none; }
.wizard-actions { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--border); padding-top: 24px; margin-top: 32px; }
#wizard-next { min-width: 128px; }
#wizard-save { margin-top: 24px; }
.form-error { color: var(--red); border: 1px solid var(--red); border-radius: 8px; padding: 12px 16px; margin-top: 24px; font-size: 14px; line-height: 20px; }
[aria-invalid=true] { border-color: var(--red) !important; }

/* Inputs */
.field { display: block; margin-bottom: 24px; min-width: 0; }
.field>span,.field-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; line-height: 20px; font-weight: 600; margin-bottom: 8px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .prefix { position: absolute; left: 16px; color: var(--muted); pointer-events: none; font-size: 14px; line-height: 20px; }
.input-wrap .suffix { position: absolute; right: 16px; color: var(--muted); pointer-events: none; font-size: 12px; line-height: 16px; }
input[type=number],input[type=date],select { width: 100%; height: 48px; border: 1px solid var(--border); border-radius: 8px; background: var(--white); padding: 8px 16px; font-size: 16px; line-height: 24px; font-variant-numeric: tabular-nums; }
input[type=number] { padding-left: 32px; padding-right: 64px; font-weight: 500; }
input.no-prefix { padding-left: 16px; }
input:hover,select:hover { border-color: var(--muted); }
input:focus,select:focus { border-color: var(--green); }
.check { display: flex; align-items: flex-start; gap: 12px; margin: 16px 0; color: var(--muted); font-size: 14px; line-height: 20px; }
.check input { flex-shrink: 0; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--green); cursor: pointer; }
.hint { color: var(--muted); font-size: 12px; line-height: 20px; margin-top: 8px; max-width: 65ch; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-weight: 600; margin: 24px 0; padding-top: 24px; border-top: 1px solid var(--border); }
.switch { appearance: none; flex-shrink: 0; width: 48px; height: 32px; margin: 0; border: 0; border-radius: 9999px; background: var(--border); cursor: pointer; position: relative; }
.switch:before { content: ''; position: absolute; width: 24px; height: 24px; top: 4px; left: 4px; border-radius: 50%; background: var(--white); transition: transform 500ms var(--curve); }
.switch:checked { background: var(--green); }
.switch:checked:before { transform: translateX(16px); }
.two-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.two-fields input { padding-right: 16px; }
.child-card { background: var(--paper); border-radius: 12px; padding: 24px; margin: 24px 0; }
.child-heading { display: flex; justify-content: space-between; font-size: 16px; line-height: 24px; font-weight: 600; margin-bottom: 16px; }
.remove-child { background: var(--white); border: 1px solid var(--border); border-radius: 4px; color: var(--muted); font-size: 20px; line-height: 28px; padding: 0 8px; }
.remove-child:hover { color: var(--red); border-color: var(--red); }
.add-child { width: 100%; min-height: 48px; padding: 8px 12px; background: var(--white); color: var(--green); border: 1px dashed var(--green); border-radius: 8px; font-size: 16px; line-height: 24px; font-weight: 600; }
.add-child:hover { background: var(--paper); }
.mortgage-part { position: relative; min-width: 0; padding: 24px 16px 16px; margin: 24px 0; border: 1px solid var(--border); border-radius: 12px; }
.mortgage-part legend { padding: 0 8px; font-weight: 600; }
.mortgage-part>.remove-child { position: absolute; top: -16px; right: 8px; }
.mortgage-part-result { display: grid; gap: 8px; background: var(--paper); border-radius: 8px; padding: 16px; font-size: 12px; line-height: 20px; }
.mortgage-explanation,.mortgage-total { margin-top: 16px; }
.mortgage-total p { margin-top: 8px; }
.mortgage-split { display: block; margin: 12px 0; text-align: left; white-space: normal; }
.warning { background: var(--paper); border: 1px solid var(--border); color: var(--ink); border-radius: 8px; padding: 16px; font-size: 12px; line-height: 20px; margin-top: 12px; }

/* Results: a quiet starting point, a clear scenario, and one prominent change. */
.workspace { display: grid; grid-template-columns: 272px minmax(0,1fr); gap: 32px; align-items: start; }
.sidebar { padding: 24px; background: var(--white); border-radius: 16px; }
.side-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; justify-content: space-between; margin-bottom: 16px; }
.side-heading { font-size: 18px; line-height: 28px; font-weight: 600; cursor: pointer; list-style: none; }
.side-heading::-webkit-details-marker { display: none; }
.side-heading { position: relative; padding-right: 24px; }
.side-heading::after { content: '+' / ''; position: absolute; right: 0; top: 0; color: var(--green); }
details[open]>.side-heading::after { content: '−' / ''; }
details:not([open])>.side-heading { margin-bottom: 0; }
.small-badge { background: var(--paper); color: var(--muted); padding: 4px 8px; border-radius: 4px; font-size: 12px; line-height: 16px; }
.situation-item { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border-bottom: 1px solid var(--border); padding: 16px 0; }
.situation-item:last-child { border-bottom: 0; }
.situation-item>div { min-width: 0; }
.situation-label { display: block; color: var(--muted); font-size: 12px; line-height: 16px; margin-bottom: 8px; }
.situation-item strong { display: block; font-size: 14px; line-height: 20px; font-weight: 600; }
.situation-item p { font-size: 12px; line-height: 20px; margin-top: 8px; overflow-wrap: anywhere; }
.situation-item button { flex-shrink: 0; }
.summary-edit { margin-top: 24px; width: 100%; font-size: 14px; line-height: 20px; }
.review-list .situation-item { padding: 24px 0; }
.review-list .situation-item:first-child { padding-top: 0; }
.review-list .situation-item strong { font-size: 18px; line-height: 28px; }
.privacy { display: flex; gap: 8px; padding-top: 24px; margin-top: 24px; border-top: 1px solid var(--border); color: var(--green); }
.privacy strong,.privacy p { font-size: 12px; line-height: 20px; }
.privacy p { margin-top: 8px; }
.results { min-width: 0; }
.result-top,.section-title { display: flex; align-items: center; gap: 12px; }
.result-top { justify-content: space-between; margin-bottom: 24px; }
.result-top h2 { font-size: 18px; line-height: 28px; }
.segmented { display: flex; flex-shrink: 0; gap: 4px; padding: 4px; border-radius: 8px; background: var(--border); }
.segmented button { padding: 8px 12px; min-height: 40px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 12px; line-height: 16px; font-weight: 500; }
.segmented button:hover { color: var(--green); }
.segmented button.selected { background: var(--white); color: var(--green); font-weight: 700; }
.metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-bottom: 32px; }
.metric { min-width: 0; padding: 24px; border-radius: 12px; background: var(--white); }
.metric-label { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; font-weight: 600; }
.metric-label .dot { width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: var(--muted); }
.income-item { margin-top: 24px; }
.income-item>span { display: block; font-size: 12px; line-height: 16px; color: var(--muted); }
.metric-value { display: block; margin-top: 8px; font-size: 36px; line-height: 40px; font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.income-item+.income-item { padding-top: 24px; border-top: 1px solid var(--border); }
.metric-footer { margin-top: 16px; font-size: 12px; line-height: 16px; color: var(--muted); }
.metric.scenario { background: var(--green); color: var(--white); }
.metric.scenario .metric-label .dot { background: var(--lime); }
.metric.scenario .income-item>span,.metric.scenario .metric-footer { color: var(--white); opacity: .8; }
.metric.scenario .income-item+.income-item { border-color: currentColor; }
.metric.difference { grid-column: 1/-1; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; align-items: center; background: var(--border); }
.metric.difference .income-item { margin: 0; padding: 0; border: 0; }
.metric.difference .metric-value { font-size: 30px; line-height: 36px; color: var(--green); }
.metric.difference .metric-footer { grid-column: 1/-1; margin: 0; }
.income-definition { grid-column: 1/-1; font-size: 12px; line-height: 20px; max-width: 65ch; }
.income-definition strong { color: var(--ink); font-weight: 600; }
.scenario-panel,.card,.chart-card { margin-bottom: 24px; padding: 32px; background: var(--white); border-radius: 16px; }
.scenario-panel { border: 1px solid var(--border); background: transparent; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.panel-heading .eyebrow { margin-bottom: 8px; }
.panel-heading p { font-size: 14px; line-height: 20px; margin-top: 8px; }
.scenario-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 32px; }
.scenario-people:has(> :only-child) { grid-template-columns: 1fr; }
.scenario-person { min-width: 0; }
.scenario-person h3 { margin-bottom: 24px; }
.slider-label { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px; font-size: 14px; line-height: 20px; font-weight: 500; }
.slider-value { display: flex; align-items: center; gap: 4px; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; background: var(--white); white-space: nowrap; }
.slider-value input { border: 0; padding: 0; width: 80px; height: auto; background: transparent; text-align: right; font-size: 14px; line-height: 20px; }
.work-days .slider-value input { width: 64px; }
.slider { appearance: none; width: 100%; height: 8px; margin: 8px 0 16px; border: 0; border-radius: 4px; background: var(--border); accent-color: var(--green); cursor: pointer; }
.slider::-webkit-slider-thumb { appearance: none; width: 24px; height: 24px; border: 4px solid var(--white); outline: 1px solid var(--green); border-radius: 50%; background: var(--green); }
.slider::-moz-range-thumb { width: 16px; height: 16px; border: 4px solid var(--white); outline: 1px solid var(--green); border-radius: 50%; background: var(--green); }
.slider::-moz-range-progress { background: var(--green); height: 8px; border-radius: 4px; }
.slider-extents { display: flex; justify-content: space-between; font-size: 12px; line-height: 16px; color: var(--muted); }
.work-days,.scenario-child { margin-top: 24px; }
.work-hours-note { margin-top: 12px; color: var(--green); }
.scenario-assumptions { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 24px; }
.no-child { display: flex; align-items: center; gap: 16px; padding: 24px 0; color: var(--muted); font-size: 14px; line-height: 20px; }
.no-child-icon { color: var(--green); font-size: 24px; line-height: 32px; }
.scenario-insight { display: flex; gap: 12px; margin-top: 24px; padding: 16px; border-radius: 8px; background: var(--border); color: var(--green); font-size: 14px; line-height: 20px; }
.scenario-insight strong { font-weight: 700; }
.spark { font-size: 20px; line-height: 28px; }
.chart-card .panel-heading { align-items: flex-start; flex-wrap: wrap; }
.chart-legends { display: flex; flex-wrap: wrap; gap: 16px; }
.chart-legend { display: flex; align-items: center; gap: 8px; font-size: 12px; line-height: 16px; color: var(--muted); }
.chart-legend span { width: 16px; height: 2px; background: var(--green); }
.chart-legend .netto-line { height: 0; border-top: 2px dashed var(--muted); background: none; }
#chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-person { max-width: 320px; }
.chart-caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 12px; line-height: 20px; color: var(--muted); margin-top: 16px; }
.pressure-card { background: var(--border); }
.pressure-people { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,240px),1fr)); gap: 32px; margin-top: 24px; }
.pressure-big { margin: 16px 0 8px; color: var(--green); font-size: 48px; line-height: 1; font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.pressure-explain { font-size: 12px; line-height: 20px; }
.pressure-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--white); margin: 24px 0; }
.pressure-bar span { background: var(--green); }
.pressure-line { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; font-size: 14px; line-height: 20px; margin-top: 12px; }
.pressure-line strong { white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }
.pressure-people .hint { margin-top: 16px; }
.scope-note { font-size: 12px; line-height: 20px; color: var(--muted); max-width: 65ch; }
.scope-note strong { color: var(--ink); font-weight: 600; }
.shared-results { margin-top: 32px; }
.break-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; font-size: 14px; line-height: 20px; padding: 12px 0; }
.break-label { color: var(--muted); }
.break-row strong { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.break-total { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 16px; }
.break-total strong,.break-total .break-label { color: var(--green); font-weight: 700; }
.government-intro { font-size: 14px; line-height: 20px; margin-top: 8px; }
.government-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; margin: 24px 0; }
.government-summary { background: var(--paper); border-radius: 12px; padding: 24px; }
.government-summary h3 { margin: 16px 0 8px; }
.government-value { font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: -.025em; color: var(--green); font-variant-numeric: tabular-nums; margin-bottom: 24px; }
.government-value span { display: block; font-size: 12px; line-height: 16px; font-weight: 400; color: var(--muted); margin-top: 8px; letter-spacing: normal; }
.government-summary .break-row { font-size: 12px; line-height: 20px; }
.government-summary .break-row span { color: var(--muted); }
.page-heading { margin-bottom: 32px; }
.page-heading h2 { font-size: 30px; line-height: 36px; margin-bottom: 12px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.data-table th,.data-table td { text-align: right; padding: 16px 12px; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.data-table th { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--muted); }
.data-table th:first-child,.data-table td:first-child { text-align: left; }
.data-table tr.total td { font-weight: 700; color: var(--green); background: var(--paper); }
.data-table tr.group td { font-size: 12px; line-height: 16px; font-weight: 600; background: var(--paper); padding-top: 24px; }
.data-table tr.sub td { font-size: 12px; line-height: 20px; color: var(--muted); }
.source-text { color: var(--muted); font-size: 14px; line-height: 20px; }
.source-text p,.source-text li { max-width: 65ch; }
.source-text p+p { margin-top: 16px; }
.source-text li { margin-bottom: 16px; }
.source-text ul { padding-left: 24px; }
.source-text strong { font-weight: 600; color: var(--ink); }
.sources-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.source-link { display: flex; justify-content: space-between; gap: 16px; padding: 16px; border: 1px solid var(--border); border-radius: 8px; text-decoration: none; font-size: 14px; line-height: 20px; }
.source-link:hover { background: var(--paper); border-color: var(--green); }
.lookup { margin-top: 24px; }
.lookup summary { padding: 8px 0; cursor: pointer; font-size: 16px; line-height: 24px; font-weight: 600; }
.downloads { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.downloads a { display: inline-flex; align-items: center; min-height: 48px; padding: 8px 12px; background: var(--paper); border-radius: 8px; font-size: 14px; line-height: 20px; text-decoration: none; }
.downloads a:hover { background: var(--border); }
footer { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; border-top: 1px solid var(--border); padding: 24px 0 32px; margin-top: 64px; color: var(--muted); font-size: 12px; line-height: 20px; }
footer span:last-child { margin-left: auto; }
.footer-brand { color: var(--green); font-size: 16px; line-height: 24px; font-weight: 700; letter-spacing: -.04em; }
#toast { position: fixed; bottom: 24px; left: 50%; max-width: calc(100% - 32px); transform: translateX(-50%); background: var(--green); color: var(--white); padding: 12px 24px; border-radius: 8px; font-size: 14px; line-height: 20px; opacity: 0; pointer-events: none; transition: opacity 300ms var(--curve); z-index: var(--layer-toast); }
#toast.show { opacity: 1; }
#mobile-nav-slot { display: none; }
.reveal-pending { opacity: 0; transform: translateY(16px); transition: opacity 700ms var(--curve),transform 700ms var(--curve); }
.reveal-pending.is-visible { opacity: 1; transform: none; }

@media (max-width: 1150px) {
  .workspace { grid-template-columns: 240px minmax(0,1fr); gap: 24px; }
  h1 { font-size: 48px; }
  .header { gap: 16px; }
  .nav { padding: 12px; }
  .scenario-fields,.government-grid { grid-template-columns: 1fr; gap: 24px; }
  .scenario-person+.scenario-person { border-top: 1px solid var(--border); padding-top: 24px; }
  .wizard-main { padding: 32px; }
  .wizard-help { padding: 24px; }
  .wizard-steps button { flex-direction: column; text-align: center; }
  .metric-value { font-size: 30px; line-height: 36px; }
  .metric.difference { grid-template-columns: 1fr 1fr; }
  .metric.difference .metric-label { grid-column: 1/-1; }
  .result-top { align-items: flex-start; }
}
@media (max-width: 850px) {
  .header { flex-wrap: wrap; }
  .header nav { order: 3; width: 100%; justify-content: center; }
  .intro { align-items: flex-start; }
  .intro-actions { flex-direction: column; align-items: flex-end; }
  .intro h1 { font-size: 36px; line-height: 40px; }
  .workspace { grid-template-columns: 1fr; }
  .situation-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 24px; }
  .wizard-grid { grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); gap: 16px; }
  .wizard-main { padding: 24px; }
  .wizard-help { padding: 24px; }
  .wizard-heading h2 { font-size: 24px; line-height: 32px; }
  .wizard-steps { gap: 4px; }
  .wizard-steps button { padding: 8px 4px; }
  .scenario-fields,.government-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .scenario-person+.scenario-person { border: 0; padding: 0; }
  .sources-grid { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .header { margin-top: 8px; padding: 12px 16px; gap: 12px; }
  .brand { font-size: 20px; line-height: 28px; gap: 8px; }
  .brandmark { width: 32px; height: 32px; border-radius: 8px; font-size: 20px; }
  .year { font-size: 12px; line-height: 16px; gap: 4px; }
  main { padding: 32px 16px 0; }
  .intro { display: block; margin-bottom: 32px; }
  .intro h1 { font-size: 36px; line-height: 40px; }
  .intro p { font-size: 14px; line-height: 20px; }
  .eyebrow { margin-bottom: 12px; }
  .intro-actions { flex-direction: row; justify-content: flex-start; margin-top: 24px; }
  .intro-actions .button { font-size: 12px; line-height: 16px; }
  .wizard { scroll-margin-top: 16px; }
  .wizard-top { margin-bottom: 12px; }
  .wizard-steps { margin-bottom: 24px; gap: 4px; }
  .wizard-steps button { min-height: 48px; padding: 8px 4px; }
  .step-label { display: none; }
  .wizard-top .eyebrow { font-size: 12px; line-height: 16px; letter-spacing: 0; }
  .wizard-grid { display: block; }
  .wizard-main { padding: 24px; border-radius: 12px; }
  .wizard-help { display: none; }
  .wizard-mobile-help { display: block; margin-bottom: 24px; border-radius: 8px; padding: 12px 16px; background: var(--paper); }
  .wizard-mobile-help summary { color: var(--green); font-size: 12px; line-height: 20px; font-weight: 600; }
  .wizard-mobile-help p { margin-top: 12px; font-size: 12px; line-height: 20px; }
  .wizard-actions { gap: 8px; }
  .wizard-actions .button { font-size: 14px; line-height: 20px; }
  #wizard-next { min-width: 0; }
  .wizard .child-card { padding: 16px; }
  .wizard .mortgage-part { padding: 24px 12px 12px; }
  .two-fields { gap: 12px; }
  .income-entry { grid-template-columns: 1fr; gap: 0; }
  .situation-list { display: block; }
  .sidebar { padding: 24px; }
  .review-list .situation-item strong { font-size: 16px; line-height: 24px; }
  .results { min-width: 0; }
  #mobile-nav-slot { display: block; margin-bottom: 24px; }
  #mobile-nav-slot nav { display: flex; justify-content: space-between; gap: 0; width: 100%; }
  #mobile-nav-slot .nav { flex: 1; padding: 12px 8px; font-size: 12px; line-height: 16px; white-space: nowrap; }
  .result-top { align-items: flex-start; flex-wrap: wrap; }
  .result-top h2 { font-size: 16px; line-height: 24px; }
  .metrics { gap: 12px; }
  .metric { padding: 16px; border-radius: 8px; }
  .metric-label { font-size: 12px; line-height: 16px; }
  .metric-label .dot { display: none; }
  .metric-value { font-size: 24px; line-height: 32px; letter-spacing: -.025em; }
  .income-item { margin-top: 16px; }
  .income-item+.income-item { padding-top: 16px; }
  .metric.difference .metric-value { font-size: 24px; line-height: 32px; }
  .scenario-panel,.chart-card,.card { padding: 24px 16px; border-radius: 12px; }
  .panel-heading { align-items: flex-start; gap: 12px; }
  .panel-heading h2 { font-size: 18px; line-height: 28px; }
  .scenario-fields,.government-grid { grid-template-columns: 1fr; }
  .scenario-person+.scenario-person { border-top: 1px solid var(--border); padding-top: 24px; }
  .scenario-insight { padding: 16px 12px; font-size: 12px; line-height: 20px; }
  .government-summary { padding: 16px; }
  .data-table { font-size: 12px; line-height: 20px; }
  .data-table th,.data-table td { padding: 12px 8px; }
  footer { gap: 12px; margin-top: 40px; }
  footer span:last-child { width: 100%; margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,*::before,*::after { transition: none !important; animation: none !important; }
  .reveal-pending { opacity: 1; transform: none; }
}

.spaced-copy,.field-group { margin-top: 16px; }
.spaced-hint { margin-top: 8px; }
.source-heading { margin-bottom: 16px; }
.slider { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1' height='1'%3E%3Cpath fill='%2317594b' d='M0 0h1v1H0z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-size: var(--fill,0%) 100%; }

@media (max-width: 380px) {
  .metrics { grid-template-columns: 1fr; }
  .metric { padding: 24px; }
  .metric.difference { grid-template-columns: 1fr; }
  .metric-value,.metric.difference .metric-value { font-size: 30px; line-height: 36px; }
  .year { max-width: 128px; white-space: normal; }
  .header { align-items: center; }
}
