:root {
  --ink: #171713;
  --ink-2: #3e3d35;
  --cream: #fffdf6;
  --paper: #ffffff;
  --butter: #f5df62;
  --butter-light: #fff7c9;
  --mint: #d9f0df;
  --coral: #ff8e73;
  --line: #deddd3;
  --muted: #706f66;
  --shadow: 0 18px 60px rgba(23, 23, 19, .1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--cream);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 15% 0%, #fff6bd 0, transparent 22rem), var(--cream); color: var(--ink); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.site-header {
  min-height: 78px; padding: 14px clamp(18px, 5vw, 72px); display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(23, 23, 19, .12); background: rgba(255, 253, 246, .88); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 20;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--butter); font-weight: 900; letter-spacing: -.04em; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1rem; letter-spacing: .02em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: .72rem; letter-spacing: .04em; }
.header-actions { display: flex; align-items: center; gap: 16px; }
.data-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: .78rem; color: var(--ink-2); }
.data-chip span { width: 8px; height: 8px; border-radius: 50%; background: #35a15e; box-shadow: 0 0 0 4px #e1f3e7; }
.lang-switch { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: white; }
.lang-switch button { border: 0; border-radius: 999px; padding: 7px 9px; background: transparent; color: var(--muted); cursor: pointer; font-size: .75rem; font-weight: 800; }
.lang-switch button.active { background: var(--ink); color: #fff; }

main { width: min(1180px, calc(100% - 36px)); margin: 0 auto; }
.intro { display: grid; grid-template-columns: 1.4fr .6fr; align-items: center; gap: 30px; padding: clamp(42px, 7vw, 92px) 0 34px; }
.eyebrow { margin: 0 0 12px; font-size: .75rem; letter-spacing: .17em; font-weight: 900; }
.intro h1 { max-width: 820px; margin: 0; font-size: clamp(2.4rem, 6vw, 5.4rem); line-height: .98; letter-spacing: -.065em; }
.intro > div > p:last-child { max-width: 680px; margin: 22px 0 0; color: var(--ink-2); font-size: clamp(1rem, 2vw, 1.22rem); line-height: 1.65; }
.sun-card { position: relative; min-height: 230px; overflow: hidden; border: 2px solid var(--ink); border-radius: 32px; background: var(--butter); box-shadow: 10px 10px 0 var(--ink); }
.sun-card .sun { position: absolute; width: 95px; height: 95px; border-radius: 50%; right: 28px; top: 25px; background: var(--coral); border: 3px solid var(--ink); }
.sun-card svg { position: absolute; width: 100%; bottom: 0; left: 0; }

.calculator-shell { overflow: hidden; border: 2px solid var(--ink); border-radius: 28px; background: var(--paper); box-shadow: var(--shadow); }
.controls { display: grid; grid-template-columns: minmax(200px, 1.25fr) 44px minmax(200px, 1.25fr) minmax(170px, .8fr) auto; align-items: end; gap: 14px; padding: 26px; border-bottom: 2px solid var(--ink); background: var(--ink); color: #fff; }
.field label { display: block; margin-bottom: 8px; font-size: .78rem; font-weight: 800; }
.field small { display: block; min-height: 16px; margin-top: 7px; color: #c7c6bd; font-size: .7rem; }
.input-wrap { position: relative; }
.input-wrap input, .input-wrap select { width: 100%; height: 52px; padding: 0 42px; border: 1px solid #5a5a54; border-radius: 13px; outline: none; background: #292925; color: #fff; font-size: .92rem; }
.input-wrap select { appearance: none; padding-right: 34px; cursor: pointer; }
.input-wrap input:focus, .input-wrap select:focus { border-color: var(--butter); box-shadow: 0 0 0 3px rgba(245, 223, 98, .22); }
.input-icon { position: absolute; left: 16px; top: 50%; z-index: 2; transform: translateY(-50%); color: var(--butter); font-size: .66rem; }
.input-icon.pin { font-size: .8rem; }
.currency-input > span { position: absolute; left: 16px; top: 50%; z-index: 2; transform: translateY(-50%); color: var(--butter); font-weight: 900; }
.swap-button { align-self: center; margin-top: 6px; width: 42px; height: 42px; border: 1px solid #66665f; border-radius: 50%; background: transparent; color: var(--butter); cursor: pointer; font-size: 1.15rem; transition: transform .2s, background .2s; }
.swap-button:hover { transform: rotate(180deg); background: #30302b; }
.primary-button { min-height: 52px; padding: 0 20px; border: 2px solid var(--butter); border-radius: 13px; background: var(--butter); color: var(--ink); cursor: pointer; font-weight: 900; transition: transform .15s, box-shadow .15s; }
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 8px 0 rgba(245, 223, 98, .18); }

.result-area { padding: clamp(24px, 4vw, 46px); }
.result-hero { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.result-kicker { margin: 0 0 7px; color: var(--muted); font-weight: 800; font-size: .85rem; text-transform: uppercase; letter-spacing: .09em; }
.big-number { font-size: clamp(3.3rem, 8vw, 6.8rem); line-height: .9; letter-spacing: -.07em; font-weight: 950; }
.result-summary { max-width: 650px; margin: 17px 0 0; color: var(--ink-2); line-height: 1.55; }
.metro-note { display: inline-flex; margin: 12px 0 0; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fbfaf4; color: var(--muted); font-size: .74rem; line-height: 1.35; }
.difference-badge { flex: 0 0 auto; width: 150px; height: 150px; display: grid; place-content: center; text-align: center; border: 2px solid var(--ink); border-radius: 50%; background: var(--butter-light); transform: rotate(4deg); }
.difference-badge.negative { background: var(--mint); }
.difference-badge strong { display: block; font-size: 2rem; letter-spacing: -.05em; }
.difference-badge span { max-width: 90px; font-size: .72rem; text-transform: uppercase; font-weight: 800; line-height: 1.2; }
.comparison-route { display: grid; grid-template-columns: minmax(0, 1fr) minmax(90px, .5fr) minmax(0, 1fr); align-items: center; gap: 16px; margin: 40px 0 22px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.comparison-route > div:first-child { text-align: left; }
.comparison-route > div:last-child { text-align: right; }
.comparison-route span, .comparison-route strong { display: block; }
.comparison-route > div > span { color: var(--muted); font-size: .72rem; text-transform: uppercase; font-weight: 800; }
.comparison-route strong { margin-top: 4px; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.route-line { display: flex; align-items: center; color: var(--coral); }
.route-line i { flex: 1; height: 1px; background: var(--line); }
.route-line span { margin: 0 8px; }
.monthly-impact { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.monthly-impact div { padding: 18px 20px; }
.monthly-impact div + div { border-left: 1px solid var(--line); }
.monthly-impact span, .monthly-impact strong { display: block; }
.monthly-impact span { color: var(--muted); font-size: .76rem; font-weight: 700; }
.monthly-impact strong { margin-top: 5px; font-size: 1.35rem; }
.housing-market { display: grid; grid-template-columns: minmax(220px, .85fr) minmax(0, 1.15fr); gap: 28px; align-items: center; margin-top: 18px; padding: clamp(22px, 3.5vw, 34px); border-radius: 22px; background: var(--ink); color: #fff; }
.housing-market-eyebrow { margin: 0 0 8px; color: var(--butter); font-size: .7rem; font-weight: 900; letter-spacing: .14em; }
.housing-market h2 { margin: 0; font-size: clamp(1.55rem, 3vw, 2.35rem); line-height: 1.05; letter-spacing: -.045em; }
.housing-market-copy > p:last-child { margin: 10px 0 0; color: #c9c8bf; font-size: .78rem; line-height: 1.5; }
.housing-market-stats { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border: 1px solid #4c4c46; border-radius: 17px; background: #24241f; }
.housing-market-stats article { min-width: 0; padding: 22px; }
.housing-market-stats article + article { border-left: 1px solid #4c4c46; }
.housing-market-stats span, .housing-market-stats strong, .housing-market-stats small { display: block; }
.housing-market-stats span { color: #d2d1c8; font-size: .75rem; font-weight: 800; }
.housing-market-stats strong { margin-top: 7px; color: var(--butter); font-size: clamp(1.8rem, 4vw, 2.75rem); letter-spacing: -.05em; }
.housing-market-stats small { margin-top: 5px; color: #aaa99f; font-size: .66rem; line-height: 1.4; }
.breakdown-header { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 42px 0 20px; }
.breakdown-header h2 { margin: 0; font-size: clamp(1.35rem, 3vw, 2rem); letter-spacing: -.04em; }
.breakdown-header p { margin: 6px 0 0; color: var(--muted); font-size: .9rem; }
.text-button { border: 0; border-bottom: 2px solid var(--ink); padding: 4px 0; background: transparent; cursor: pointer; font-weight: 800; white-space: nowrap; }
.category-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }
.category-card { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.category-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.category-name { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.category-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--butter-light); }
.category-change { font-weight: 900; }
.category-change.down { color: #247843; }
.bar-track { position: relative; height: 10px; margin: 18px 0 11px; border-radius: 999px; background: #ecebe4; overflow: hidden; }
.bar-fill { height: 100%; border-radius: inherit; background: var(--ink); transition: width .5s ease; }
.bar-fill.down { background: #5bb47a; }
.category-values { display: flex; justify-content: space-between; color: var(--muted); font-size: .73rem; }
.category-values strong { color: var(--ink); }
.budget-panel { margin-top: 18px; padding: 24px; border: 2px solid var(--ink); border-radius: 20px; background: #fbfaf4; }
.budget-panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 15px; }
.budget-panel h3 { margin: 0; }
.budget-panel p { margin: 5px 0 0; color: var(--muted); font-size: .85rem; }
.small-button { border: 1px solid var(--line); border-radius: 9px; padding: 8px 11px; background: #fff; cursor: pointer; font-weight: 800; font-size: .75rem; }
.budget-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 22px; }
.budget-grid label { display: block; font-size: .75rem; font-weight: 800; }
.budget-input { display: flex; align-items: center; margin-top: 7px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.budget-input span { padding-left: 12px; color: var(--muted); }
.budget-input input { width: 100%; min-width: 0; border: 0; outline: 0; padding: 12px 10px; background: transparent; }
.budget-total { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.budget-total span { font-size: .85rem; font-weight: 700; }
.budget-total strong { font-size: 1.45rem; }

.next-step { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 74px); align-items: center; margin: 70px 0 32px; padding: clamp(30px, 5vw, 58px); border-radius: 28px; background: var(--ink); color: #fff; }
.next-copy h2 { margin: 0; max-width: 560px; font-size: clamp(2.1rem, 4vw, 4rem); line-height: 1; letter-spacing: -.055em; }
.next-copy > p:not(.eyebrow) { color: #d4d3c9; line-height: 1.65; }
.next-copy .eyebrow { color: var(--butter); }
.trust-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.trust-list span { padding: 7px 10px; border: 1px solid #4b4b45; border-radius: 999px; color: #eeede6; font-size: .76rem; }
.lead-form { padding: 24px; border-radius: 20px; background: #fff; color: var(--ink); }
.lead-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.lead-grid label { display: block; font-size: .75rem; font-weight: 800; }
.lead-grid label.full { grid-column: 1 / -1; }
.lead-grid input { width: 100%; height: 47px; margin-top: 7px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; outline: none; }
.lead-grid input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(23,23,19,.08); }
.consent-row { display: flex; align-items: flex-start; gap: 9px; margin: 15px 0; color: var(--muted); font-size: .7rem; line-height: 1.4; }
.consent-row input { margin-top: 2px; accent-color: var(--ink); }
.full-button, .secondary-button { width: 100%; display: grid; place-items: center; min-height: 49px; }
.secondary-button { margin-top: 10px; border: 1px solid var(--ink); border-radius: 13px; text-decoration: none; font-weight: 900; }
.form-note { margin: 12px 0 0; text-align: center; color: var(--muted); font-size: .7rem; }
.methodology { margin: 26px 0 70px; }
.methodology details { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; }
.methodology summary { cursor: pointer; font-weight: 900; }
.method-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 28px; margin: 20px 0; color: var(--muted); font-size: .8rem; line-height: 1.55; }
.methodology a { font-weight: 800; font-size: .8rem; }
.source-links { display: flex; flex-wrap: wrap; gap: 18px; }

footer { display: flex; justify-content: space-between; gap: 25px; padding: 28px clamp(18px, 5vw, 72px); border-top: 1px solid var(--line); background: #fff; }
footer strong, footer span { display: block; }
footer span { margin-top: 3px; color: var(--muted); font-size: .75rem; }
footer > div:last-child { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; font-size: .78rem; font-weight: 800; }

@media (max-width: 980px) {
  .intro { grid-template-columns: 1fr; }
  .sun-card { display: none; }
  .controls { grid-template-columns: 1fr 1fr; }
  .field-origin { grid-column: 1; }
  .swap-button { display: none; }
  .controls .primary-button { grid-column: 2; }
  .next-step { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .site-header { min-height: 66px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand small, .data-chip { display: none; }
  main { width: min(100% - 22px, 1180px); }
  .intro { padding-top: 36px; }
  .intro h1 { font-size: clamp(2.25rem, 12vw, 3.6rem); }
  .calculator-shell { border-radius: 20px; }
  .controls { grid-template-columns: 1fr; padding: 18px; }
  .controls .primary-button, .field-origin { grid-column: auto; }
  .result-area { padding: 24px 18px; }
  .result-hero { align-items: flex-start; }
  .difference-badge { width: 96px; height: 96px; }
  .difference-badge strong { font-size: 1.35rem; }
  .difference-badge span { font-size: .58rem; }
  .comparison-route { grid-template-columns: 1fr; gap: 10px; }
  .comparison-route > div:last-child { text-align: left; }
  .route-line { display: none; }
  .monthly-impact { grid-template-columns: 1fr; }
  .monthly-impact div + div { border-left: 0; border-top: 1px solid var(--line); }
  .housing-market { grid-template-columns: 1fr; gap: 18px; }
  .breakdown-header { align-items: flex-start; flex-direction: column; }
  .category-list { grid-template-columns: 1fr; }
  .budget-grid { grid-template-columns: 1fr 1fr; }
  .next-step { margin-top: 35px; padding: 28px 18px; border-radius: 20px; }
  .lead-grid { grid-template-columns: 1fr; }
  .lead-grid label.full { grid-column: auto; }
  .method-grid { grid-template-columns: 1fr; gap: 8px; }
  footer { flex-direction: column; }
}

@media (max-width: 430px) {
  .brand strong { font-size: .88rem; }
  .big-number { font-size: 3.45rem; }
  .result-hero { gap: 12px; }
  .difference-badge { width: 82px; height: 82px; }
  .difference-badge span { display: none; }
  .housing-market-stats { grid-template-columns: 1fr; }
  .housing-market-stats article + article { border-left: 0; border-top: 1px solid #4c4c46; }
  .budget-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
