:root {
  --ink: #1b2a33;
  --muted: #56676d;
  --paper: #f3f6f5;
  --surface: #ffffff;
  --rule: #d3dcd9;
  --ledger: #1e6b52;
  --ledger-soft: #e2efe9;
  color-scheme: light;
  font-family: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
a { color: var(--ledger); font-weight: 600; }
.top, .bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 20px;
  padding: 14px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}
.bottom { border-top: 1px solid var(--rule); border-bottom: 0; font-size: 0.875rem; }
/* Footer links, the same on every page (src/lib/footer.js): left-aligned, wrapping, tall enough to tap. */
.bottom nav { width: 100%; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 18px; margin: 0; padding: 0; list-style: none; }
.footer-links a { display: inline-block; padding: 6px 0; }
.brand { font-size: 1.25rem; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.top nav { display: flex; gap: 18px; font-size: 0.875rem; }
.prose { max-width: 68ch; margin: 0 auto; padding: 28px 20px 48px; }
.prose h1 { font-size: 1.75rem; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 12px; }
.prose h2 { font-size: 1.125rem; margin: 28px 0 8px; }
.lede { font-size: 1.0625rem; color: var(--muted); }
.prose li { margin-bottom: 6px; }
.note { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--rule); font-size: 0.8125rem; color: var(--muted); }
.stats { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0 0 20px; padding: 0; list-style: none; }
.stats li { font-size: 0.9375rem; color: var(--muted); }
.stats strong { display: block; font-size: 1.5rem; color: var(--ledger); letter-spacing: -0.02em; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th, td { padding: 8px 6px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
th { font-weight: 600; color: var(--muted); }
td.num, th.num { text-align: right; white-space: nowrap; }
.county-list { columns: 2; column-gap: 32px; padding-left: 20px; }
@media (max-width: 600px) { .county-list { columns: 1; } table { font-size: 0.8125rem; } }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 24px; }
.button {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--ledger);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}
.button:hover { background: #17573f; }
button.button { font: inherit; font-weight: 700; cursor: pointer; }
.pro-chip { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--ledger-soft); color: var(--ledger); font-size: 0.6875rem; font-weight: 700; line-height: 1.6; vertical-align: 1px; }
.cta-aside { flex-basis: 100%; font-size: 0.875rem; color: var(--muted); }
.crumbs { margin: 0 0 8px; font-size: 0.8125rem; color: var(--muted); }
.crumbs a { font-weight: 600; }
.city-list { columns: 3; column-gap: 28px; padding-left: 20px; }
@media (max-width: 600px) { .city-list { columns: 2; } }
.homes { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 12px; }
.home {
  margin: 0;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
}
.home p { margin: 4px 0; }
.home-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.home-rate { font-size: 1.375rem; font-weight: 700; color: var(--ledger); letter-spacing: -0.02em; }
.home-rate small { font-size: 0.8125rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.home-loan { font-size: 0.875rem; color: var(--muted); }
.home-addr { font-weight: 600; }
.home-addr a { color: var(--ink); }
.home-facts { font-size: 0.9375rem; color: var(--muted); }
.home-facts strong { color: var(--ink); }
.home-money {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 6px;
  padding: 10px 12px;
  background: var(--ledger-soft);
  border-radius: 8px;
}
.home-money div { min-width: 0; }
.home-money dt { font-size: 0.75rem; color: var(--muted); }
.home-money dd { margin: 2px 0 0; font-weight: 700; font-size: 1rem; }
@media (max-width: 480px) { .home-money { grid-template-columns: 1fr 1fr; } }
.home-locked { font-size: 0.875rem; color: var(--muted); }
.home-gap { font-size: 0.9375rem; }
/* What it costs each month (scripts/build-pages.mjs costsHtml, src/components/ProHome.jsx) */
.costs { margin: 12px 0 4px; }
.costs caption { text-align: left; padding: 0 0 6px; font-size: 0.9375rem; }
.costs th { font-weight: 400; color: var(--ink); }
.costs .muted { font-size: 0.8125rem; }
.costs-note, .costs-line { font-size: 0.875rem; }
.costs-line { margin: 10px 0 6px; }
.save-slot { display: contents; }
.save-home { display: inline-flex; align-items: center; gap: 6px; }
.save-home svg { flex: none; }
.save-msg { flex-basis: 100%; margin: 0; font-size: 0.875rem; color: var(--muted); }
/* Pro numbers on a Details page, filled in for a signed-in Pro account (src/components/ProHome.jsx) */
.pro-buyer h3 { font-size: 1rem; margin: 20px 0 2px; }
.pro-buyer-note { font-size: 0.8125rem; margin-top: 6px; }
.home-links { font-size: 0.875rem; }
.muted { color: var(--muted); font-weight: 400; }
.table-note { margin: 6px 0 0; font-size: 0.8125rem; color: var(--muted); }
.warn { padding: 10px 12px; border-radius: 8px; background: #fdf3dc; color: #6b4a00; font-size: 0.9375rem; }
.confirmed { padding: 10px 12px; border-radius: 8px; background: #e3f3e8; color: #1d5b33; font-size: 0.9375rem; }
.button-quiet { background: var(--surface); color: var(--ledger); border: 1px solid var(--ledger); }
.button-quiet:hover { background: var(--ledger-soft); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px 20px; margin: 0 0 8px; }
.facts dt { font-size: 0.8125rem; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 600; }
.similar { padding-left: 20px; }
.home-table td a { font-weight: 600; }
/* Phones: drop Beds, never the rate (nth-child hid the rate on city pages, which have no City column). */
@media (max-width: 600px) { .home-table .beds { display: none; } }
.table-scroll { max-width: 100%; overflow-x: auto; }
.guide-list { list-style: none; padding: 0; }
.guide-list li { margin-bottom: 14px; }
.guide-list a { display: block; font-size: 1.0625rem; }
.guide-list span { color: var(--muted); font-size: 0.9375rem; }
.sources { font-size: 0.875rem; padding-left: 20px; }
/* "How this loan pays down" (scripts/paydown.mjs, public/paydown.js) */
.paydown { margin: 12px 0 10px; padding: 14px 16px 12px; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; }
.pd-legend { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0 0 12px; font-size: 0.875rem; }
.pd-key { display: inline-block; width: 16px; border-top: 2px solid var(--c); border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.pd-chart { padding: 10px 0 0 40px; }
.pd-plot { position: relative; height: 200px; outline-offset: 4px; }
.pd-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pd-grid { stroke: #e3e9e7; stroke-width: 1; vector-effect: non-scaling-stroke; }
.pd-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.pd-band { opacity: 0.16; }
.pd-ytick { position: absolute; left: -8px; transform: translate(-100%, -50%); font-size: 0.75rem; color: var(--muted); }
.pd-xaxis { position: relative; height: 22px; margin-top: 6px; }
.pd-xtick { position: absolute; top: 0; transform: translateX(-50%); font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.pd-xtick.first { transform: none; }
.pd-xtick.last { transform: translateX(-100%); }
.pd-dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--surface); }
.pd-label { position: absolute; font-size: 0.8125rem; font-weight: 600; color: var(--ink); white-space: nowrap; pointer-events: none; }
.pd-above-right { transform: translate(4px, calc(-100% - 8px)); }
.pd-below-left { transform: translate(-100%, 8px); }
.pd-payoff { transform: translate(10px, calc(-100% - 4px)); }
.pd-payoff.pd-flip { transform: translate(calc(-100% - 8px), calc(-100% - 24px)); }
.pd-cross { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px solid var(--muted); pointer-events: none; }
.pd-tip { position: absolute; top: 0; z-index: 1; min-width: 190px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; box-shadow: 0 2px 10px rgba(27, 42, 51, 0.12); font-size: 0.8125rem; pointer-events: none; }
.pd-tip-head { margin-bottom: 4px; color: var(--muted); }
.pd-tip-row { white-space: nowrap; }
.pd-tip-row strong { font-size: 0.9375rem; }
.paydown figcaption { margin-top: 2px; font-size: 0.8125rem; color: var(--muted); }
.pd-table { margin: 0 0 12px; }
.pd-table summary { cursor: pointer; color: var(--ledger); font-weight: 600; }
.pd-table table, .pd-schedule { margin-top: 8px; }
@media (max-width: 480px) { .pd-plot { height: 180px; } .pd-chart { padding-left: 34px; } .pd-xtick.minor, .pd-wide { display: none; } }
/* Contact page (/contact/, public/contact.js) and the contact line on home pages */
.home-contact { font-size: 0.875rem; color: var(--muted); }
.link-button { padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--ledger); text-decoration: underline; cursor: pointer; }
.contact-form { margin: 20px 0 8px; }
.contact-reasons { margin: 0 0 18px; padding: 0; border: 0; }
.contact-reasons legend { margin-bottom: 8px; padding: 0; font-weight: 700; }
.contact-reason { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 8px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; cursor: pointer; }
.contact-reason:has(input:checked) { border-color: var(--ledger); background: var(--ledger-soft); }
.contact-reason input { flex: none; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--ledger); }
.contact-reason strong { display: block; }
.contact-reason small { display: block; color: var(--muted); font-size: 0.875rem; }
.contact-home { padding: 10px 12px; border-radius: 8px; background: var(--ledger-soft); font-size: 0.9375rem; }
.contact-field { margin: 0 0 16px; }
.contact-field label { display: block; margin-bottom: 4px; font-weight: 700; }
.contact-field input, .contact-field textarea, .contact-field select { display: block; width: 100%; padding: 10px 12px; border: 1px solid #9fb0ab; border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; }
.contact-field textarea { min-height: 140px; resize: vertical; }
.contact-field input:focus, .contact-field textarea:focus, .contact-field select:focus, .contact-reason input:focus-visible { outline: 2px solid var(--ledger); outline-offset: 1px; }
.contact-field [aria-invalid="true"] { border-color: #b3261e; }
.contact-field small { display: block; margin-top: 4px; color: var(--muted); font-size: 0.8125rem; }
.contact-status { min-height: 1.5em; margin: 0 0 8px; font-size: 0.9375rem; }
.contact-error { color: #b3261e; font-weight: 600; }
.contact-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-done { margin: 20px 0; padding: 16px 18px; border-radius: 10px; background: #e3f3e8; color: #1d5b33; }
.contact-done:focus { outline: none; }
.contact-done h2 { margin-top: 0; }
.contact-form button[disabled] { opacity: 0.6; cursor: wait; }
.contact-alt { margin-top: 24px; font-size: 0.875rem; }
.contact-form .button { border: 0; }
.contact-form [hidden] { display: none !important; }
.contact-picked { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; }
.contact-picked .link-button { margin-left: auto; }

/* "Talk to an assumption expert": the card on home pages and guides, the link in a home's buttons,
   and the questions on the contact form (scripts/build-pages.mjs expertCard, expertQuestions) */
.cta-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px; text-decoration: none; }
.cta-link:hover { text-decoration: underline; }
.cta-link svg { flex: none; }
.expert-card { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: flex-start; margin: 24px 0 12px; padding: 20px 20px 18px; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; }
.expert-icon { flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 999px; background: var(--ledger-soft); color: var(--ledger); }
.expert-body { flex: 1 1 360px; min-width: 0; }
.expert-body h2 { margin: 0 0 4px; }
.expert-body p { margin: 0 0 14px; }
.expert-action { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 !important; }
.expert-who { font-size: 0.8125rem; color: var(--muted); }
@media (max-width: 480px) { .expert-action .button { display: block; width: 100%; text-align: center; } }
.expert-questions { margin: 4px 0 18px; }
.expert-intro { margin: 0 0 14px; }
.expert-q { margin: 0 0 16px; padding: 0; border: 0; }
.expert-q legend { margin-bottom: 8px; padding: 0; font-weight: 700; }
.expert-q small { display: block; margin-top: 6px; color: var(--muted); font-size: 0.8125rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; background: var(--surface); border: 1px solid #9fb0ab; border-radius: 999px; cursor: pointer; }
.chip:has(input:checked) { border-color: var(--ledger); background: var(--ledger-soft); box-shadow: inset 0 0 0 1px var(--ledger); font-weight: 600; }
.chip input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--ledger); }
.chip input:focus-visible { outline: 2px solid var(--ledger); outline-offset: 2px; }
.expert-cash select { max-width: 340px; }
.expert-note { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 0.8125rem; color: var(--muted); }
.waitlist select { min-height: 44px; }
