:root {
  color-scheme: light;
  --ink: #14211d;
  --muted: #5e6b66;
  --paper: #f5f1e8;
  --card: #fffdf8;
  --line: #d8d2c5;
  --accent: #0d5c4b;
  --accent-dark: #083f34;
  --accent-soft: #dcebe5;
  --warm: #d96d3b;
  --warm-soft: #f5e3d7;
  --error: #a13427;
  --shadow: 0 22px 60px rgba(32, 43, 38, 0.09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 4%, rgba(217, 109, 59, 0.09), transparent 23rem),
    var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
}

button,
input,
select {
  font: inherit;
}

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

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: white;
  transform: translateY(-200%);
}

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

.site-header,
main,
footer {
  width: min(100% - 2rem, 960px);
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  border-bottom: 1px solid rgba(20, 33, 29, 0.12);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-weight: 760;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.wordmark-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  background: var(--ink);
  color: var(--paper);
  font-family: Georgia, serif;
}

.privacy-note {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.hero {
  max-width: 790px;
  padding: 6.5rem 0 4.5rem;
}

.eyebrow,
.section-kicker {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0.75rem 0 1.35rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.hero h1 em {
  color: var(--accent);
  font-weight: 500;
}

.hero-copy {
  max-width: 590px;
  margin: 0;
  color: #34443e;
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
}

.hero-proof {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1.3rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.calculator-shell,
.results {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.calculator-shell {
  padding: clamp(1.4rem, 5vw, 3.5rem);
}

.section-intro {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-bottom: 2.5rem;
}

.section-intro h2,
.result-heading h2,
.method h2 {
  margin: 0.15rem 0 0.3rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.section-intro p,
.result-heading p {
  margin-block: 0;
}

.section-intro > div > p:last-child {
  color: var(--muted);
}

.step-number {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #b9c7c2;
  border-radius: 50%;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 850;
}

.form-grid.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field-group {
  margin-bottom: 1.45rem;
}

.field-group label,
#zip-form label {
  display: block;
  margin-bottom: 0.55rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.field-help {
  margin: -0.35rem 0 0.7rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.money-input,
.select-wrap {
  display: flex;
  align-items: center;
  min-height: 58px;
  border: 1px solid #b8b3a9;
  border-radius: 12px;
  background: white;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.money-input:focus-within,
.select-wrap:focus-within,
.zip-row input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 92, 75, 0.14);
  outline: none;
}

.money-input > span:first-child {
  padding-left: 1rem;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 750;
}

.money-input > span:last-child {
  padding-right: 1rem;
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.money-input input,
.select-wrap select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 680;
}

.money-input input {
  padding: 0.9rem 0.55rem;
}

.money-input.compact {
  max-width: 360px;
}

.select-wrap {
  position: relative;
  max-width: 360px;
}

.select-wrap::after {
  position: absolute;
  right: 1rem;
  content: "↓";
  color: var(--accent);
  pointer-events: none;
}

.select-wrap select {
  height: 58px;
  padding: 0 2.5rem 0 1rem;
  appearance: none;
}

[aria-invalid="true"] {
  color: var(--error);
}

.money-input:has(input[aria-invalid="true"]),
.select-wrap:has(select[aria-invalid="true"]),
.zip-row input[aria-invalid="true"] {
  border-color: var(--error);
}

.field-error {
  min-height: 0.1rem;
  margin: 0.4rem 0 0;
  color: var(--error);
  font-size: 0.84rem;
  font-weight: 650;
}

.field-error:empty {
  margin: 0;
}

.form-status,
.destination-error {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--warm);
  border-radius: 6px;
  background: var(--warm-soft);
  color: #682d19;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 56px;
  padding: 0.9rem 1.15rem;
  border: 1px solid var(--accent);
  border-radius: 12px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: 780;
  transition: background 150ms ease, transform 150ms ease;
}

.primary-button:hover {
  background: var(--accent-dark);
}

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

.primary-button:focus-visible,
.text-button:focus-visible {
  outline: 3px solid rgba(217, 109, 59, 0.38);
  outline-offset: 3px;
}

.trust-copy {
  max-width: 720px;
  margin: 1.3rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.results {
  margin-top: 2rem;
  scroll-margin-top: 1rem;
}

.result-heading,
.price-card,
.unlikely-card,
.result-block,
.explanation,
.search-card {
  padding: clamp(1.4rem, 5vw, 3rem);
}

.result-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.text-button {
  flex: 0 0 auto;
  padding: 0.4rem 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-weight: 720;
}

.price-card {
  background: var(--accent);
  color: white;
}

.result-label {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.target-price {
  margin: 0.25rem 0 0.7rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.4rem, 10vw, 6.8rem);
  letter-spacing: -0.06em;
  line-height: 1;
}

.target-price span {
  display: inline-block;
  margin-left: 0.6rem;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  font-weight: 680;
  letter-spacing: 0;
}

.price-card > p:last-child {
  max-width: 600px;
  margin: 0;
  color: #d7eee6;
}

.unlikely-card {
  border-block: 1px solid #e5c5b2;
  background: var(--warm-soft);
}

.unlikely-card h3 {
  max-width: 680px;
  margin: 0.35rem 0 0.65rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 500;
  line-height: 1.15;
}

.unlikely-card p:last-child {
  max-width: 680px;
  margin-bottom: 0;
}

.economics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
}

.economics-grid > * + * {
  border-left: 1px solid var(--line);
}

.result-block {
  padding-block: 2.2rem;
}

.rent-change {
  margin: 0.5rem 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.75rem, 5vw, 2.7rem);
  letter-spacing: -0.035em;
}

.rent-change span {
  color: var(--warm);
}

.rent-change small {
  color: var(--muted);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.8rem;
}

.increase-amount {
  margin: 0.2rem 0 1.8rem;
  color: var(--error);
  font-weight: 780;
}

.cost-callout {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}

.cost-callout strong {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
  font-weight: 500;
  white-space: nowrap;
}

.math-block dl {
  margin: 0.5rem 0 0;
}

.math-block dl > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
}

.math-block dt {
  color: var(--muted);
  font-size: 0.86rem;
}

.math-block dd {
  margin: 0;
  font-weight: 780;
  text-align: right;
}

.explanation {
  border-bottom: 1px solid var(--line);
  background: #fbfaf5;
}

.explanation p {
  margin: 0;
}

.explanation p + p {
  margin-top: 0.55rem;
  color: var(--muted);
}

.scenarios-block {
  border-bottom: 1px solid var(--line);
}

.scenario-list {
  margin-top: 0.8rem;
}

.scenario-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.scenario-row:last-child {
  border-bottom: 0;
}

.scenario-row span:last-child {
  color: var(--muted);
}

.scenario-row strong {
  color: var(--ink);
}

.search-card {
  background: #e7eee9;
}

.search-card h3 {
  margin: 0.35rem 0 0.55rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 5vw, 2.7rem);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.search-card > p:not(.section-kicker) {
  max-width: 660px;
  margin-top: 0;
}

.secondary-search {
  background: #f1efe8;
}

#zip-form {
  margin-top: 1.4rem;
}

.zip-row {
  display: flex;
  gap: 0.7rem;
}

.zip-row input {
  width: 150px;
  min-height: 56px;
  padding: 0.8rem 1rem;
  border: 1px solid #aab7b1;
  border-radius: 12px;
  background: white;
  color: var(--ink);
  font-weight: 700;
  outline: 0;
}

.comparison-note {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.destination-error {
  margin-top: 1rem;
  margin-bottom: 0;
}

.method {
  max-width: 740px;
  margin: 6rem auto;
}

.compact-intro {
  margin-bottom: 1.2rem;
}

.method > p {
  margin-left: 67px;
  color: #35453f;
  font-size: 1.08rem;
}

.method .method-caveat {
  color: var(--muted);
  font-size: 0.84rem;
}

.debug-panel {
  margin: 2rem 0;
  padding: 1rem;
  border: 2px dashed #816e00;
  border-radius: 12px;
  background: #fff8c5;
}

.debug-panel h2,
.debug-panel p {
  margin-top: 0;
}

.debug-panel pre {
  overflow: auto;
  max-height: 380px;
  padding: 1rem;
  border-radius: 8px;
  background: #1f251f;
  color: #d8f0dc;
  font-size: 0.75rem;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0;
  border-top: 1px solid rgba(20, 33, 29, 0.12);
  color: var(--muted);
  font-size: 0.8rem;
}

@media (max-width: 700px) {
  .site-header,
  main,
  footer {
    width: min(100% - 1.2rem, 960px);
  }

  .site-header {
    min-height: 64px;
  }

  .privacy-note {
    display: none;
  }

  .hero {
    padding: 4.2rem 0 3rem;
  }

  .form-grid.two-column,
  .economics-grid {
    grid-template-columns: 1fr;
  }

  .economics-grid > * + * {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .calculator-shell,
  .results {
    border-radius: 18px;
  }

  .section-intro {
    gap: 0.85rem;
  }

  .step-number {
    width: 36px;
    height: 36px;
  }

  .money-input.compact,
  .select-wrap,
  .primary-button {
    width: 100%;
    max-width: none;
  }

  .result-heading {
    display: block;
  }

  .result-heading .text-button {
    margin-top: 1rem;
  }

  .target-price span {
    display: block;
    margin: 0.25rem 0 0;
  }

  .scenario-row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .zip-row {
    display: grid;
  }

  .zip-row input {
    width: 100%;
  }

  .method {
    margin: 4rem auto;
  }

  .method > p {
    margin-left: 0;
  }

  footer {
    flex-direction: column;
  }
}

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