/* HomeMortgage.com - shared styles */
:root {
  --green: #145A43;
  --green-dark: #0B3B2C;
  --gold: #F6C66A;
  --gold-light: #FDF3DD;
  --mint: #EAF3EF;
  --ink: #10231C;
  --ink-2: #33433C;
  --muted: #3E4E47;
  --muted-2: #4A5A53;
  --line: #DCE3E0;
  --line-2: #E3E8E6;
  --bg-2: #F3F5F4;
  --input: #84938D;
  --chip: #B5C1BC;
  --footer: #0F1714;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #FFFFFF;
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif; margin: 0; line-height: 1.15; }
h1 { font-size: clamp(36px, 5vw, 60px); letter-spacing: -0.02em; font-weight: 800; line-height: 1.06; }
h2 { font-size: clamp(28px, 3.4vw, 42px); font-weight: 800; }
h3 { font-size: 21px; font-weight: 700; }
p { margin: 0; }
a { color: var(--green); }
a:hover { color: var(--green-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #F2B544; outline-offset: 2px;
}
img, svg { max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--gold); color: var(--ink); padding: 10px 16px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 8px; }

/* Layout */
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.narrow { max-width: 1000px; }
.article { max-width: 820px; }
.section { padding: clamp(56px, 7vw, 96px) 0; }
.section.tight { padding: clamp(40px, 5vw, 64px) 0; }
.alt { background: var(--bg-2); }
.green-band { background: var(--green); color: #FFFFFF; }
.stack { display: flex; flex-direction: column; gap: 24px; }
.stack-sm { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-3 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.center { text-align: center; }
.lead { font-size: clamp(19px, 1.8vw, 22px); color: var(--muted); max-width: 560px; }
.small { font-size: 15px; color: var(--muted-2); }
.muted { color: var(--muted); }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: #FFFFFF; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 14px; padding-bottom: 14px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo-mark { display: inline-flex; width: 40px; height: 40px; border-radius: 10px; align-items: center; justify-content: center; background: var(--green); color: #FFFFFF; }
.logo-text { font-family: "Plus Jakarta Sans", Inter, sans-serif; font-weight: 800; font-size: 21px; }
.logo-text span { color: #5B6B64; font-weight: 600; }
.main-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; font-size: 16px; }
.main-nav a { padding: 12px 0; color: var(--ink-2); text-decoration: none; font-weight: 500; }
.main-nav a[aria-current="page"] { color: var(--green); font-weight: 700; box-shadow: inset 0 -2px 0 var(--green); }
.main-nav a.btn { padding: 0 20px; color: #FFFFFF; box-shadow: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 0 26px; border-radius: 14px; border: 0;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; text-align: center;
}
.btn-sm { min-height: 46px; padding: 0 20px; border-radius: 12px; font-weight: 600; }
.btn-primary { background: var(--green); color: #FFFFFF; }
.btn-primary:hover { background: var(--green-dark); color: #FFFFFF; }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #F2B544; color: var(--ink); }
.btn-outline { background: #FFFFFF; color: var(--ink); border: 1px solid var(--chip); font-weight: 600; }
.btn-outline:hover { border-color: var(--green); color: var(--ink); }
.btn-link { align-self: flex-start; background: transparent; color: var(--green); padding: 0 4px; min-height: 48px; }
.facts { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Pills and badges */
.pill { display: inline-flex; align-items: center; align-self: flex-start; padding: 8px 16px; border-radius: 999px; background: #FFFFFF; font-size: 16px; font-weight: 700; color: var(--green); }
.badge { align-self: flex-start; display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 999px; background: var(--gold); color: var(--ink); font-size: 14px; font-weight: 700; }

/* Cards */
.card { border-radius: 20px; padding: 24px; background: #FFFFFF; }
.card-border { border: 1px solid var(--line); }
.card-green { background: var(--green); color: #FFFFFF; }
.card-green a { color: #FFFFFF; }
.tile { display: flex; flex-direction: column; gap: 10px; padding: 26px; border-radius: 20px; background: #FFFFFF; color: var(--ink); text-decoration: none; }
.tile:hover { color: var(--ink); box-shadow: 0 0 0 2px var(--green) inset; }
.tile .tile-sub { color: var(--muted); }
.tile-big { display: flex; align-items: center; min-height: 88px; padding: 20px 22px; border-radius: 18px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 20px; font-weight: 700; }
.tile-big:hover { border-color: var(--green); color: var(--ink); }
.icon-box { display: inline-flex; width: 80px; height: 80px; border-radius: 24px; align-items: center; justify-content: center; background: var(--mint); color: var(--green); }

/* Hero */
.hero .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.hero-copy { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.hero-card { flex: 1 1 380px; min-width: 0; max-width: 480px; background: #FFFFFF; border-radius: 24px; padding: 28px; box-shadow: 0 16px 40px rgba(16, 35, 28, 0.10); display: flex; flex-direction: column; gap: 14px; }
.choice-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.choice { display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: 20px; text-decoration: none; }
.choice strong { font-size: 22px; }
.choice-dark { background: var(--green); color: #FFFFFF; }
.choice-dark:hover { background: var(--green-dark); color: #FFFFFF; }
.choice-dark .choice-sub { color: rgba(255, 255, 255, 0.92); }
.choice-light { background: #FFFFFF; border: 2px solid var(--green); color: var(--ink); }
.choice-light:hover { background: var(--mint); color: var(--ink); }
.choice-light .choice-sub { color: var(--muted); }
.status-row { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; color: var(--ink); text-decoration: none; }
.status-row .dot { flex: 0 0 auto; display: inline-flex; width: 40px; height: 40px; border-radius: 999px; align-items: center; justify-content: center; font-weight: 800; }
.status-good { background: var(--mint); }
.status-good .dot { background: var(--green); color: #FFFFFF; }
.status-warn { background: var(--gold-light); }
.status-warn .dot { background: var(--gold); color: var(--ink); }
.status-save { background: var(--green); color: #FFFFFF; }
.status-save:hover { color: #FFFFFF; background: var(--green-dark); }
.status-row .grow { flex: 1 1 auto; font-weight: 600; }
.status-row .go { font-size: 16px; font-weight: 700; white-space: nowrap; }
.status-warn .go { color: var(--green); }
.status-save .go { color: var(--gold); }

/* Steps */
.steps { width: 100%; list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.steps li { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.steps strong { font-size: 22px; }
.num-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.num-list li { display: flex; align-items: flex-start; gap: 14px; }
.num { flex: 0 0 auto; display: inline-flex; width: 36px; height: 36px; border-radius: 999px; align-items: center; justify-content: center; background: var(--green); color: #FFFFFF; font-weight: 700; font-size: 17px; }
.num-list .num-text { padding-top: 4px; }

/* Forms and inputs */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field label, .field .label { font-weight: 600; }
.input {
  width: 100%; height: 60px; padding: 0 18px; border: 1px solid var(--input); border-radius: 14px;
  font: inherit; font-size: 22px; font-weight: 600; color: var(--ink); background: #FFFFFF;
}
.input-md { height: 56px; font-size: 18px; font-weight: 400; }
textarea.input { height: auto; min-height: 160px; padding: 14px 18px; font-size: 18px; font-weight: 400; resize: vertical; }
select.input { padding-right: 12px; }
.affix { position: relative; }
.affix .pre, .affix .post { position: absolute; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--muted-2); pointer-events: none; }
.affix .pre { left: 18px; }
.affix .post { right: 18px; }
.affix .input.has-pre { padding-left: 38px; }
.affix .input.has-post { padding-right: 44px; }
.hint { font-size: 15px; color: var(--muted-2); }
.fields { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button {
  min-height: 56px; min-width: 84px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--chip);
  background: #FFFFFF; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #FFFFFF; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; }
.inline-form .input { flex: 1 1 240px; }
.inline-form .btn { flex: 0 0 auto; }
.consent { font-size: 15px; color: var(--muted-2); }
.card-green .consent { color: rgba(255, 255, 255, 0.85); }

/* Calculator results */
.result {
  border-radius: 24px; padding: clamp(24px, 3vw, 36px); background: var(--bg-2);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px;
}
.result.good { background: var(--mint); }
.result.warn { background: var(--gold-light); }
.result.dark { background: var(--green); color: #FFFFFF; }
.result-copy { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.verdict { font-family: "Plus Jakarta Sans", Inter, sans-serif; font-size: clamp(36px, 4.6vw, 56px); line-height: 1.05; font-weight: 800; }
.result-line { font-size: 21px; }
.result-sub { font-size: 18px; color: var(--ink-2); }
.result.dark .result-sub { color: rgba(255, 255, 255, 0.92); }
.result-note { align-self: flex-start; padding: 12px 16px; border-radius: 12px; background: rgba(255, 255, 255, 0.14); font-size: 18px; }
.math { border: 1px solid var(--line); border-radius: 18px; padding: 8px 24px; }
.math-row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.math-row:last-of-type { border-bottom: 0; }
.math-row span { color: var(--muted); }
.math .small { padding: 0 0 14px; }
.timeline { display: flex; flex-direction: column; gap: 10px; }
.timeline-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding: 18px 20px; border-radius: 16px; background: var(--bg-2); }
.timeline-row strong { font-size: 22px; }
.timeline-row.highlight { background: var(--green); color: #FFFFFF; }
.timeline-row.highlight strong { color: var(--gold); }
.calc-nav { display: flex; flex-wrap: wrap; gap: 10px; }
.calc-nav a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--chip); color: var(--ink); text-decoration: none; font-size: 16px; font-weight: 600; }
.calc-nav a[aria-current="page"] { background: var(--green); border-color: var(--green); color: #FFFFFF; font-weight: 700; }
.offer { border-radius: 20px; background: var(--bg-2); padding: 24px; display: flex; flex-direction: column; gap: 16px; }

/* Articles */
.back { align-self: flex-start; padding: 6px 0; font-size: 16px; font-weight: 600; }
.answer { border-radius: 22px; background: var(--mint); padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.answer .eyebrow { font-size: 14px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--green); }
.answer .big { font-size: 24px; font-weight: 600; line-height: 1.4; }
.answer .rest { font-size: 19px; color: var(--ink-2); }
.article h2 { font-size: 28px; }
.fact { border-radius: 20px; border: 1px solid var(--line); padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.fact .fig { font-family: "Plus Jakarta Sans", Inter, sans-serif; font-size: 40px; font-weight: 800; color: var(--green); line-height: 1.1; }
.fact.dark { background: var(--green); color: #FFFFFF; border-color: var(--green); }
.fact.dark .fig { color: var(--gold); }
.fact .fact-sub { color: var(--muted); }
.fact.dark .fact-sub { color: rgba(255, 255, 255, 0.92); }
.fine { padding-top: 20px; border-top: 1px solid var(--line-2); font-size: 14px; color: var(--muted-2); }
.prose p + p { margin-top: 12px; }
.bullets { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }

/* Learn */
.search-box { position: relative; width: 100%; max-width: 640px; }
.search-box svg { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--muted-2); }
.search-box .input { height: 64px; padding-left: 56px; font-size: 20px; font-weight: 400; border-radius: 18px; }
.q-tile { display: flex; align-items: center; gap: 16px; min-height: 104px; padding: 22px; border-radius: 20px; background: var(--bg-2); color: var(--ink); text-decoration: none; }
.q-tile:hover { box-shadow: 0 0 0 2px var(--green) inset; color: var(--ink); }
.q-tile strong { font-size: 20px; line-height: 1.3; }
.q-icon { flex: 0 0 auto; display: inline-flex; width: 52px; height: 52px; border-radius: 14px; align-items: center; justify-content: center; background: #FFFFFF; color: var(--green); }
.q-tile.featured { background: var(--green); color: #FFFFFF; }
.q-tile.featured .q-icon { background: var(--gold); color: var(--ink); font-weight: 800; font-size: 24px; }
.no-results { display: none; }

/* Footer */
.site-footer { background: var(--footer); color: #C9D2CE; font-size: 15px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; padding-top: 32px; padding-bottom: 32px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.site-footer a { color: #E6ECE9; text-decoration: none; padding: 4px 0; }
.site-footer a:hover { color: #FFFFFF; text-decoration: underline; }

/* Version 2 */
.hero-dark { background: #0E3F30; color: #FFFFFF; }
.hero-dark h1 { color: #FFFFFF; }
.hero-dark .lead { color: rgba(255, 255, 255, 0.9); }
.pill-dark { background: rgba(255, 255, 255, 0.12); color: var(--gold); }
.hero-fine { font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, 0.85); }
.choice-gold { background: var(--gold); color: var(--ink); }
.choice-gold:hover { background: #F2B544; color: var(--ink); }
.choice-gold .choice-icon, .choice-gold .choice-sub { color: var(--ink); }
.choice-ghost { border: 2px solid rgba(255, 255, 255, 0.6); color: #FFFFFF; }
.choice-ghost:hover { background: rgba(255, 255, 255, 0.1); color: #FFFFFF; }
.choice-ghost .choice-icon { color: var(--gold); }
.choice-ghost .choice-sub { color: rgba(255, 255, 255, 0.9); }
.hero-card-link { color: var(--ink); text-decoration: none; }
.hero-card-link:hover { color: var(--ink); }
.mini-headline { font-family: "Plus Jakarta Sans", Inter, sans-serif; font-size: 26px; font-weight: 800; line-height: 1.2; }
.status-plain { background: var(--bg-2); }
.status-plain .dot { background: #FFFFFF; color: var(--green); }
.tile-line { border: 1px solid var(--line); }
.q-white { background: #FFFFFF; }
.q-white .q-icon { background: var(--mint); }
.q-tile .q-icon { font-weight: 800; font-size: 22px; }
.finding { border: 1px solid var(--line); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.finding a { margin-top: auto; font-weight: 600; padding: 6px 0; }
.finding-tag { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 14px; font-weight: 700; background: var(--mint); color: var(--green); }
.finding-tag.warn { background: var(--gold-light); color: var(--ink); }
.finding-tag.info { background: var(--bg-2); color: var(--ink-2); }

/* Page-specific bits */
.q-label { font-weight: 700; margin-top: 6px; }
.choice-icon { display: inline-flex; color: var(--green); }
.choice-icon.gold { color: var(--gold); }
.center-stack { align-items: center; }
.row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.green-band h2 { color: #FFFFFF; }
.band-sub { font-size: 20px; color: rgba(255, 255, 255, 0.92); }
.tile strong { font-size: 22px; }
.big-icon { display: inline-flex; min-height: 44px; align-items: center; font-family: "Plus Jakarta Sans", Inter, sans-serif; font-size: 40px; font-weight: 800; color: var(--green); }
.status-save .dot { background: var(--gold); color: var(--ink); }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.checks li { display: flex; align-items: flex-start; gap: 12px; }
.check { flex: 0 0 auto; display: inline-flex; width: 30px; height: 30px; border-radius: 999px; align-items: center; justify-content: center; background: var(--gold); color: var(--ink); }
.card-green h2 { color: #FFFFFF; }
.letter-wrap { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.letter { width: 100%; white-space: pre-line; border-radius: 18px; border: 1px solid var(--line); background: #FAFBFA; padding: 22px 24px; line-height: 1.6; }
.two-up { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }
.two-offers { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.offer-title { font-size: 24px; }
.save-line { font-size: 20px; font-weight: 700; }
.formula { font-family: "Plus Jakarta Sans", Inter, sans-serif; font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; }
.h-small { font-size: 22px; }
.prose-page h2 { font-size: 24px; margin-top: 8px; }
.copied { color: var(--green); font-weight: 700; }

@media (max-width: 560px) {
  body { font-size: 17px; }
  .hero .wrap { gap: 36px; }
  .hero-card { padding: 20px; }
  .result-line { font-size: 19px; }
  .main-nav { gap: 2px 18px; }
}
