:root {
  --bg: #f4f5f7;
  --surface: #fff;
  --ink: #171719;
  --muted: #63666d;
  --line: #d9dce1;
  --blue: #006edc;
  --blue-dark: #0058b2;
  --gold: #9b7438;
  --dark: #111214;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--bg); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; line-height: 1.5; }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.container { width: min(92%, var(--max)); margin: 0 auto; }
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(244,245,247,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.nav { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 850; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; color: #fff; background: var(--dark); border-radius: 8px; font-size: 12px; }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 14px; font-weight: 650; }
.nav-links a:hover { color: var(--blue); }
.nav-cta { padding: 10px 16px; color: #fff; background: var(--blue); border-radius: 8px; }
.breadcrumbs { display: flex; gap: 8px; padding: 18px 0; color: var(--muted); font-size: 13px; }
.breadcrumbs a { color: var(--blue); }
.tool-intro { padding: 30px 0 38px; }
.intro-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .7fr); align-items: end; gap: 64px; }
.eyebrow { margin: 0 0 10px; color: var(--gold); font-size: 13px; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
h1 { max-width: 760px; margin: 0; font-size: clamp(46px, 7vw, 78px); line-height: .98; letter-spacing: 0; }
.intro-copy { max-width: 740px; margin: 22px 0 0; color: var(--muted); font-size: 20px; }
.intro-note { padding: 20px 0 4px 22px; border-left: 3px solid var(--gold); }
.intro-note strong { font-size: 17px; }
.intro-note p { margin: 7px 0 0; color: var(--muted); }
.beginner-guide { padding: 58px 0; color: #fff; background: var(--dark); }
.guide-heading { max-width: 820px; }
.guide-heading h2, .toolkit-heading h2 { margin: 0; font-size: 46px; line-height: 1.06; }
.guide-heading > p:last-child, .toolkit-heading > p:last-child { max-width: 760px; margin: 18px 0 0; color: rgba(255,255,255,.68); font-size: 18px; }
.guide-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 34px; overflow: hidden; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.14); }
.guide-steps article { min-height: 220px; padding: 26px; background: var(--dark); }
.guide-steps article > span { color: #e2c48f; font-size: 12px; font-weight: 850; }
.guide-steps h3 { margin: 22px 0 10px; font-size: 23px; }
.guide-steps p { margin: 0; color: rgba(255,255,255,.65); }
.term-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 28px; border-top: 1px solid rgba(255,255,255,.17); }
.term-strip > div { padding: 22px 24px 0 0; }
.term-strip strong, .term-strip span { display: block; }
.term-strip span { margin-top: 6px; color: rgba(255,255,255,.6); font-size: 13px; }
.calculator-section { padding: 0 0 72px; }
.beginner-guide + .calculator-section { padding-top: 58px; }
.mode-switch { width: fit-content; display: flex; gap: 4px; margin-bottom: 14px; padding: 4px; background: #e3e5e9; border-radius: 8px; }
.mode-button { min-height: 44px; padding: 10px 18px; color: #4f5258; background: transparent; border: 0; border-radius: 6px; cursor: pointer; font-weight: 800; }
.mode-button.active { color: var(--ink); background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.calculator-panel { display: none; }
.calculator-panel.active { display: block; }
.calculator-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr); align-items: stretch; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); box-shadow: 0 18px 46px rgba(24,30,38,.08); }
.input-panel { padding: 34px; border-right: 1px solid var(--line); }
.panel-heading { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 30px; }
.panel-heading > span { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; color: #fff; background: var(--dark); border-radius: 8px; font-size: 12px; font-weight: 850; }
.panel-heading h2 { margin: 0; font-size: 30px; line-height: 1.08; }
.panel-heading p { margin: 6px 0 0; color: var(--muted); }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.field { display: grid; gap: 8px; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field > span:first-child { font-size: 14px; font-weight: 750; }
.field small { color: var(--muted); line-height: 1.4; }
.money-input, .suffix-input, .field select { min-height: 54px; display: flex; align-items: center; overflow: hidden; background: #fff; border: 1px solid #bbc0c8; border-radius: 7px; }
.money-input:focus-within, .suffix-input:focus-within, .field select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,110,220,.13); }
.money-input b, .suffix-input b { padding: 0 14px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.money-input input, .suffix-input input { width: 100%; min-width: 0; padding: 0 14px; background: transparent; border: 0; outline: 0; font-size: 18px; font-weight: 750; }
.money-input b + input { padding-left: 0; }
.suffix-input input { padding-right: 0; }
.field select { width: 100%; padding: 0 40px 0 14px; outline: 0; color: var(--ink); font-weight: 700; }
.commitment-block { margin-top: 4px; border-top: 1px solid var(--line); }
.commitment-heading { padding: 20px 0 14px; }
.commitment-heading strong, .commitment-heading span { display: block; }
.commitment-heading span { margin-top: 5px; color: var(--muted); font-size: 13px; }
.commitment-block > label { display: grid; grid-template-columns: minmax(0, 1fr) 190px; align-items: center; gap: 18px; padding: 8px 0; }
.commitment-block > label > span:first-child { color: var(--muted); font-size: 14px; }
.commitment-block .money-input { min-height: 46px; }
.commitment-total { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 10px; padding: 18px 0; border-top: 1px dashed #b9bdc3; font-weight: 800; }
.commitment-total strong { font-size: 19px; }
.preset-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.preset-row > span { margin-right: 5px; color: var(--muted); font-size: 13px; font-weight: 700; }
.preset-row button { min-width: 58px; padding: 7px 10px; color: var(--muted); background: #f4f5f7; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; font-weight: 750; }
.preset-row button.selected { color: #fff; background: var(--blue); border-color: var(--blue); }
.result-panel { padding: 36px; color: #fff; background: #172738; }
.result-label { color: rgba(255,255,255,.7); font-size: 14px; font-weight: 750; }
.monthly-result { margin-top: 7px; font-size: clamp(42px, 5vw, 64px); font-weight: 850; line-height: 1; }
.result-caption { margin-top: 10px; color: rgba(255,255,255,.62); font-size: 13px; }
.result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 30px; overflow: hidden; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.15); border-radius: 7px; }
.result-grid > div { min-height: 92px; padding: 16px; background: #172738; }
.result-grid span { display: block; color: rgba(255,255,255,.62); font-size: 12px; }
.result-grid strong { display: block; margin-top: 7px; font-size: 18px; }
.cost-bar { height: 10px; display: flex; overflow: hidden; margin-top: 26px; background: rgba(255,255,255,.16); border-radius: 5px; }
.cost-bar span { background: #52a9ff; }
.cost-bar i { background: #d8b777; }
.bar-key { display: flex; gap: 18px; margin-top: 10px; color: rgba(255,255,255,.65); font-size: 12px; }
.bar-key span { display: inline-flex; align-items: center; gap: 6px; }
.bar-key b { width: 8px; height: 8px; border-radius: 2px; }
.key-principal { background: #52a9ff; }
.key-interest { background: #d8b777; }
.saving-box { margin-top: 24px; padding: 18px; color: #19321f; background: #dff3e4; border-radius: 7px; }
.saving-box span { font-size: 12px; font-weight: 750; }
.saving-box strong { display: block; margin-top: 4px; font-size: 20px; }
.saving-box p { margin: 5px 0 0; }
.rate-check { margin-top: 26px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.18); }
.rate-check h3 { margin: 0 0 12px; font-size: 15px; }
.rate-check > div { display: flex; justify-content: space-between; gap: 20px; padding: 8px 0; color: rgba(255,255,255,.68); }
.rate-check strong { color: #fff; }
.loan-snapshot { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-top: 0; background: #fff; }
.loan-snapshot > div { padding: 20px; border-right: 1px solid var(--line); }
.loan-snapshot > div:last-child { border-right: 0; }
.loan-snapshot span { display: block; color: var(--muted); font-size: 12px; }
.loan-snapshot strong { display: block; margin-top: 7px; font-size: 18px; }
.warning-note { margin-top: 26px; padding: 16px; color: #422f13; background: #f4e8d1; border-radius: 7px; font-size: 13px; }
.dsr-meter { height: 10px; margin-top: 24px; overflow: hidden; background: rgba(255,255,255,.16); border-radius: 5px; }
.dsr-meter span { display: block; width: 0; height: 100%; background: #52a9ff; transition: width .2s ease, background-color .2s ease; }
.dsr-explanation { margin: 8px 0 0; color: rgba(255,255,255,.67); font-size: 13px; }
.dsr-next-steps { margin-top: 24px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.16); }
.dsr-next-steps > strong { font-size: 17px; }
.dsr-next-steps ol { margin: 14px 0 0; padding-left: 20px; color: rgba(255,255,255,.72); }
.dsr-next-steps li { padding: 0 0 12px 5px; line-height: 1.5; }
.buyer-toolkit { padding: 72px 0; background: #fff; }
.toolkit-heading { max-width: 850px; margin-bottom: 32px; }
.toolkit-heading > p:last-child { color: var(--muted); }
.tool-accordion { margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.tool-accordion summary { min-height: 92px; display: grid; grid-template-columns: 38px 1fr 24px; align-items: center; gap: 18px; padding: 22px 28px; cursor: pointer; list-style: none; }
.tool-accordion summary::-webkit-details-marker { display: none; }
.tool-accordion summary > span { color: var(--gold); font-size: 12px; font-weight: 850; }
.tool-accordion summary > strong { font-size: 25px; }
.tool-accordion summary i { width: 12px; height: 12px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); transition: transform .18s ease; }
.tool-accordion[open] summary i { transform: rotate(225deg); }
.module-body { padding: 0 28px 30px; border-top: 1px solid var(--line); }
.module-copy { max-width: 800px; padding: 28px 0 22px; }
.module-copy h3 { margin: 0; font-size: 30px; }
.module-copy p { margin: 10px 0 0; color: var(--muted); font-size: 16px; }
.module-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, .75fr); gap: 28px; }
.module-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 18px; }
.module-results { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #f5f6f8; }
.module-results > div { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 66px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.module-results span { color: var(--muted); font-size: 13px; }
.module-results strong { text-align: right; font-size: 18px; }
.module-results .module-total { color: #fff; background: #172738; border-bottom: 0; }
.module-results .module-total span { color: rgba(255,255,255,.68); }
.module-results > p { margin: 0; padding: 16px 18px; color: var(--muted); font-size: 12px; }
.timeline-controls { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.timeline-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 22px; overflow: hidden; background: var(--line); border: 1px solid var(--line); border-radius: 8px; }
.timeline-summary > div { padding: 16px; background: #f5f6f8; }
.timeline-summary span, .timeline-summary strong { display: block; }
.timeline-summary span { color: var(--muted); font-size: 12px; }
.timeline-summary strong { margin-top: 6px; font-size: 18px; }
.timeline-table-wrap { margin-top: 20px; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.timeline-table { width: 100%; min-width: 940px; border-collapse: collapse; }
.timeline-table th, .timeline-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; font-size: 13px; }
.timeline-table th { color: #3f4248; background: #eceef1; }
.timeline-table th:first-child, .timeline-table td:first-child { text-align: left; }
.timeline-table td:first-child { max-width: 260px; font-weight: 750; }
.module-disclaimer { margin: 14px 0 0; color: var(--muted); font-size: 12px; }
.roi-inputs { grid-template-columns: 1fr; }
.roi-results .negative { color: #a22323; }
.roi-results .positive { color: #16743a; }
.property-cost-guide { padding: 72px 0; background: #f0f2f5; }
.cost-guide-heading { max-width: 850px; }
.cost-guide-heading h2 { margin: 0; max-width: 780px; font-size: 46px; line-height: 1.06; }
.cost-guide-heading > p:last-child { max-width: 760px; color: var(--muted); font-size: 17px; }
.cost-guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 34px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--line); }
.cost-guide-grid article { min-height: 255px; padding: 30px; background: #fff; }
.cost-guide-grid article > span { color: var(--gold); font-size: 12px; font-weight: 850; }
.cost-guide-grid h3 { margin: 18px 0 10px; max-width: 520px; font-size: 25px; line-height: 1.15; }
.cost-guide-grid p { margin: 0; color: var(--muted); line-height: 1.65; }
.source-note { margin: 20px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.source-note a { color: var(--blue); font-weight: 750; }
.next-step-section { padding: 72px 0; background: #fff; }
.next-step-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, .75fr); align-items: center; gap: 70px; }
.next-step-grid h2, .faq-grid h2 { margin: 0; font-size: 46px; line-height: 1.06; }
.next-step-grid > div > p:not(.eyebrow) { max-width: 700px; color: var(--muted); font-size: 18px; }
.text-link { display: inline-block; margin-top: 10px; color: var(--blue); font-weight: 800; }
.advisor-block { display: grid; grid-template-columns: 150px 1fr; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; }
.advisor-block img { width: 150px; height: 180px; object-fit: cover; object-position: center top; }
.advisor-block div { padding: 20px; }
.advisor-block strong { font-size: 18px; }
.advisor-block p { margin: 7px 0 12px; color: var(--muted); font-size: 14px; }
.advisor-block a { color: var(--blue); font-weight: 800; }
.faq-section { padding: 72px 0; }
.faq-grid { display: grid; grid-template-columns: .7fr 1fr; gap: 72px; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { padding: 20px 34px 20px 0; cursor: pointer; font-weight: 800; }
.faq-list p { margin: -5px 0 22px; color: var(--muted); }
footer { padding: 32px 0; color: rgba(255,255,255,.7); background: var(--dark); }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; }
.footer-inner strong { color: #fff; }

@media (max-width: 900px) {
  .intro-grid, .next-step-grid, .faq-grid, .module-layout { grid-template-columns: 1fr; gap: 30px; }
  .intro-note { max-width: 660px; }
  .calculator-layout { grid-template-columns: 1fr; }
  .input-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .loan-snapshot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .loan-snapshot > div:nth-child(2) { border-right: 0; }
  .loan-snapshot > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .guide-steps, .term-strip { grid-template-columns: 1fr; }
  .guide-steps article { min-height: 0; }
  .term-strip > div { padding-top: 18px; }
  .timeline-controls, .cost-guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .container { width: calc(100% - 28px); }
  .nav { min-height: 58px; }
  .nav-links > a:not(.nav-cta) { display: none; }
  .nav-cta { padding: 9px 12px; font-size: 14px; }
  .tool-intro { padding-top: 20px; }
  h1 { font-size: 48px; }
  .intro-copy { font-size: 17px; }
  .intro-note { padding: 16px 0 0; border-top: 2px solid var(--gold); border-left: 0; }
  .mode-switch { width: 100%; }
  .mode-button { flex: 1; padding-inline: 9px; font-size: 14px; }
  .input-panel, .result-panel { padding: 22px 18px; }
  .field-grid { grid-template-columns: 1fr; gap: 17px; }
  .field-wide { grid-column: auto; }
  .monthly-result { font-size: 44px; }
  .result-grid { grid-template-columns: 1fr 1fr; }
  .result-grid > div { min-height: 88px; padding: 14px; }
  .result-grid strong { font-size: 16px; }
  .loan-snapshot { grid-template-columns: 1fr; }
  .loan-snapshot > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .loan-snapshot > div:last-child { border-bottom: 0; }
  .next-step-section, .faq-section { padding: 54px 0; }
  .next-step-grid h2, .faq-grid h2, .guide-heading h2, .toolkit-heading h2, .cost-guide-heading h2 { font-size: 34px; }
  .advisor-block { grid-template-columns: 110px 1fr; }
  .advisor-block img { width: 110px; height: 180px; }
  .advisor-block div { padding: 16px; }
  .footer-inner { flex-direction: column; }
  .commitment-block > label { grid-template-columns: 1fr; gap: 6px; padding: 10px 0; }
  .tool-accordion summary { min-height: 76px; grid-template-columns: 28px 1fr 18px; gap: 10px; padding: 18px 16px; }
  .tool-accordion summary > strong { font-size: 19px; }
  .module-body { padding: 0 16px 22px; }
  .module-copy h3 { font-size: 26px; }
  .module-inputs, .timeline-controls, .timeline-summary, .cost-guide-grid { grid-template-columns: 1fr; }
  .module-results > div { min-height: 60px; }
  .cost-guide-grid article { min-height: 0; padding: 24px 20px; }
}
