@import url("tokens.css");
/* Slice-owned partials. Integration owns this list.
   @import must precede all other rules or browsers drop it. */
@import url("parts/calculators.css");
@import url("parts/cities.css");
@import url("parts/products.css");
@import url("parts/blog.css");
@import url("parts/rates.css");
@import url("parts/brand.css");

/* ============================================================
   Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--font-ui);
  font-size: var(--t-body);
  line-height: 1.65;
  font-feature-settings: "kern" 1;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.012em;
  margin: 0 0 var(--s4);
  text-wrap: balance;
}

h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); line-height: 1.25; }

p { margin: 0 0 var(--s4); }
p, li { max-width: var(--measure); }

a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--navy-hover); }

img, svg { max-width: 100%; height: auto; }

hr { border: 0; border-top: 1px solid var(--rule); margin: var(--s7) 0; }

:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.wrap { width: min(var(--max), calc(100% - 3rem)); margin-inline: auto; }
.wrap-narrow { width: min(var(--max-narrow), calc(100% - 3rem)); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: var(--paper);
  padding: var(--s3) var(--s4); z-index: 100;
}
.skip:focus { left: var(--s4); top: var(--s4); }

/* Every figure on the site aligns on the decimal. A column of
   rates that lines up reads as competence before it is read. */
.num, .rate-table td, .figure {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.eyebrow {
  font-family: var(--font-ui);
  font-size: var(--t-micro);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-3);
  margin: 0 0 var(--s3);
}

.lead {
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3rem);
  line-height: 1.6;
  color: var(--ink-2);
}

/* ============================================================
   Masthead - license lives here, not buried in the footer.
   One of fifteen broker sites researched does this.
   ============================================================ */
.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(8px);
}

.masthead-inner {
  display: flex; align-items: center; gap: var(--s6);
  min-height: 72px;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.4rem; font-weight: 600;
  color: var(--ink); text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.wordmark:hover { color: var(--ink); }

/* The license plate: compliance obligation rendered as a
   credential. Ochre rule ties it to the accent. */
.license-plate {
  font-size: var(--t-micro);
  line-height: 1.35;
  color: var(--ink-3);
  padding-left: var(--s4);
  border-left: 2px solid var(--accent);
}
.license-plate strong { color: var(--ink-2); font-weight: 600; }

.nav { margin-left: auto; display: flex; align-items: center; gap: var(--s5); }
.nav a {
  font-size: var(--t-small); font-weight: 500;
  color: var(--ink-2); text-decoration: none;
  padding: var(--s2) 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }

.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 1px solid var(--rule-strong);
  border-radius: var(--r-sm);
  padding: var(--s2) var(--s3);
  font: inherit; font-size: var(--t-small);
  color: var(--ink); cursor: pointer;
  min-height: 44px;
}

/* ============================================================
   Buttons - one filled style, one quiet style. No third.
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 var(--s5);
  font-family: var(--font-ui); font-size: var(--t-small); font-weight: 600;
  border-radius: var(--r-md); border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--navy); color: var(--paper-raised); }
.btn-primary:hover { background: var(--navy-hover); color: var(--paper-raised); }
.btn-quiet {
  background: transparent; color: var(--ink);
  border-color: var(--rule-strong);
}
.btn-quiet:hover { border-color: var(--ink-3); color: var(--ink); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }

/* ============================================================
   Hero
   ============================================================ */
.hero { padding: var(--s9) 0 var(--s7); }
.hero h1 {
  font-size: var(--t-display);
  letter-spacing: -0.025em;
  max-width: 18ch;
  margin-bottom: var(--s5);
}
.hero .lead { max-width: 54ch; margin-bottom: var(--s6); }

.hero-note {
  font-size: var(--t-small); color: var(--ink-3);
  margin-top: var(--s4);
}

/* ============================================================
   Section rhythm
   ============================================================ */
.section { padding: var(--s8) 0; border-top: 1px solid var(--rule); }
.section-head { margin-bottom: var(--s6); }
.section-head p { color: var(--ink-2); }

/* ============================================================
   Trust bar - reviews sit HIGH, with the true aggregate.
   Currently live at 72% page depth, below the lead form.
   ============================================================ */
.trust-bar {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s3) var(--s5);
  padding: var(--s5) 0;
  border-block: 1px solid var(--rule);
  background: var(--paper-sunk);
}
.trust-score {
  font-family: var(--font-display);
  font-size: 1.9rem; font-weight: 600; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.trust-meta { font-size: var(--t-small); color: var(--ink-3); }
.trust-stars { color: var(--accent); letter-spacing: 0.1em; }

.quote-grid {
  display: grid; gap: var(--s5);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: var(--s6);
}
.quote {
  border-left: 2px solid var(--accent);
  padding-left: var(--s4);
}
.quote blockquote {
  margin: 0 0 var(--s3);
  font-family: var(--font-display);
  font-size: 1.05rem; line-height: 1.55; color: var(--ink);
}
.quote cite {
  font-style: normal; font-size: var(--t-micro);
  color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em;
}

/* ============================================================
   Rate spread - the distribution IS the insight.
   Deliberately unlabeled as to lender: doctrine forbids naming
   competitors, and the spread carries the point without names.
   ============================================================ */
.spread { display: grid; gap: var(--s2); margin: var(--s6) 0; }
.spread-row {
  display: grid; grid-template-columns: 8.5rem 1fr 3rem;
  align-items: center; gap: var(--s4);
  font-size: var(--t-small);
}
.spread-label { color: var(--ink-2); font-variant-numeric: tabular-nums; }
/* display:block on both - these are spans, and an inline element
   ignores height, which renders the whole chart invisible. */
.spread-track {
  display: block;
  background: var(--paper-sunk);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  height: 26px;
  overflow: hidden;
}
.spread-fill {
  display: block;
  height: 100%; border-radius: 0;
  background: var(--navy); opacity: 0.7;
  min-width: 2px;
}
.spread-row.is-median .spread-fill { background: var(--accent); opacity: 1; }
.spread-count { color: var(--ink-3); text-align: right; font-variant-numeric: tabular-nums; }

.figure-row {
  display: grid; gap: var(--s6);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin: var(--s6) 0;
}
.figure-item .figure {
  display: block;
  font-family: var(--font-display);
  font-size: var(--t-figure);
  font-weight: 400;              /* light, not bold - calm, not loud */
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.figure-item .figure-label {
  display: block; margin-top: var(--s2);
  font-size: var(--t-micro); color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.07em;
}
.delta-down { color: var(--down); }
.delta-up   { color: var(--up); }

/* ============================================================
   Rate table + the assumptions block that makes it honest.
   Reg Z: APR with equal prominence, same screen as the rate.
   ============================================================ */
.rate-table {
  width: 100%; border-collapse: collapse;
  font-size: var(--t-small); margin: var(--s5) 0;
}
.rate-table th {
  text-align: left; font-weight: 600; color: var(--ink);
  border-bottom: 1px solid var(--rule-strong);
  padding: var(--s3) var(--s4) var(--s3) 0;
  font-size: var(--t-micro); text-transform: uppercase; letter-spacing: 0.06em;
}
.rate-table td {
  padding: var(--s3) var(--s4) var(--s3) 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-2);
}
/* Rate and APR are the same size and weight. The rate must not
   be more conspicuous than the APR - 12 CFR 1026.24(c). */
.rate-table .col-rate,
.rate-table .col-apr { color: var(--ink); font-weight: 600; }

.assumptions {
  background: var(--paper-sunk);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: var(--s4) var(--s5);
  font-size: var(--t-micro);
  line-height: 1.6;
  color: var(--ink-3);
  max-width: none;
}
.assumptions strong { color: var(--ink-2); }
.assumptions p { max-width: none; margin-bottom: var(--s2); }
.assumptions p:last-child { margin-bottom: 0; }

/* ============================================================
   Tap-first intake. One question, buttons, no typing, no
   progress bar. Contact is asked for AFTER value is shown.
   ============================================================ */
.intake {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: var(--s6);
  box-shadow: var(--shadow-md);
}
.intake h2 { margin-bottom: var(--s2); }
.intake-why {
  font-size: var(--t-small); color: var(--ink-3);
  margin-bottom: var(--s5); max-width: 52ch;
}
.choice-grid {
  display: grid; gap: var(--s3);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.choice {
  display: block; width: 100%; text-align: left;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--rule-strong); border-radius: var(--r-md);
  padding: var(--s4) var(--s5);
  font: inherit; cursor: pointer; min-height: 64px;
  transition: border-color .15s ease, background-color .15s ease;
}
.choice:hover { border-color: var(--navy); background: var(--navy-tint); }
.choice strong { display: block; font-weight: 600; margin-bottom: 2px; }
.choice span { font-size: var(--t-micro); color: var(--ink-3); }

/* ============================================================
   Advisor block - still photo, named, credentialed.
   Not a hero video: Unbounce's 35k-page analysis found video
   correlates with LOWER median conversion, worst in real estate.
   ============================================================ */
.advisor {
  display: grid; grid-template-columns: 160px 1fr; gap: var(--s6);
  align-items: start;
}
.advisor-photo {
  width: 160px; height: 200px;
  border-radius: var(--r-md);
  background: var(--paper-sunk);
  border: 1px solid var(--rule);
  display: grid; place-items: center;
  color: var(--ink-3); font-size: var(--t-micro); text-align: center;
  padding: var(--s3);
}
.advisor-cred {
  font-size: var(--t-micro); color: var(--ink-3);
  border-top: 1px solid var(--rule); padding-top: var(--s3); margin-top: var(--s4);
}

/* ============================================================
   Editorial / article
   ============================================================ */
.article-header { padding: var(--s8) 0 var(--s5); }
.article-meta {
  font-size: var(--t-micro); color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.article-body { padding-bottom: var(--s8); }
.article-body h2 { margin-top: var(--s7); }
.article-body h3 { margin-top: var(--s6); }
.article-body ul, .article-body ol { padding-left: var(--s5); }
.article-body li { margin-bottom: var(--s2); }

.callout {
  border-left: 2px solid var(--flag);
  background: var(--accent-tint);
  padding: var(--s4) var(--s5);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  margin: var(--s6) 0;
}
.callout p { margin-bottom: 0; }
.callout strong { color: var(--ink); }

.breadcrumb {
  font-size: var(--t-micro); color: var(--ink-3);
  padding-top: var(--s5);
}
.breadcrumb a { color: var(--ink-3); }

/* ============================================================
   Data list - the per-city facts that make a page real
   ============================================================ */
.datalist {
  display: grid; gap: 0;
  border-top: 1px solid var(--rule);
  margin: var(--s6) 0;
}
.datalist div {
  display: grid; grid-template-columns: 1fr auto;
  gap: var(--s4); align-items: baseline;
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--rule);
}
.datalist dt { color: var(--ink-2); font-size: var(--t-small); margin: 0; }
.datalist dd {
  margin: 0; color: var(--ink); font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.pill-row { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s4) 0; }
.pill {
  font-size: var(--t-micro); font-weight: 600;
  color: var(--ink-2); background: var(--paper-sunk);
  border: 1px solid var(--rule); border-radius: var(--r-sm);
  padding: var(--s1) var(--s3);
}

.card-grid {
  display: grid; gap: var(--s5);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.card {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: var(--s5);
}
.card h3 { margin-bottom: var(--s2); }
.card p { font-size: var(--t-small); margin-bottom: 0; }
a.card { text-decoration: none; display: block; }
a.card:hover { border-color: var(--navy); }

/* ============================================================
   Footer - full Illinois disclosure block.
   205 ILCS 635/2-9 requires the IL license number plus the
   regulator's address and phone on an originator's website.
   ============================================================ */
.footer {
  border-top: 1px solid var(--rule);
  background: var(--paper-sunk);
  padding: var(--s8) 0 var(--s6);
  margin-top: var(--s8);
}
/* Explicit tracks: repeat(auto-fit) cannot be combined with a
   leading fr track, which silently collapsed this to one column. */
.footer-cols {
  display: grid; gap: var(--s6);
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  margin-bottom: var(--s7);
}
@media (max-width: 900px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-cols { grid-template-columns: 1fr; }
}
.footer h4 {
  font-family: var(--font-ui); font-size: var(--t-micro);
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-3); margin-bottom: var(--s3);
}
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.footer-links a { font-size: var(--t-small); color: var(--ink-2); text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }

.legal {
  border-top: 1px solid var(--rule-strong);
  padding-top: var(--s5);
  font-size: var(--t-micro);
  line-height: 1.65;
  color: var(--ink-3);
}
.legal p { max-width: 80ch; margin-bottom: var(--s3); }
.legal strong { color: var(--ink-2); }

.eho {
  display: inline-flex; align-items: center; gap: var(--s2);
  margin-bottom: var(--s3);
}
/* Sized to sit at least equal to the largest other mark, per the
   HUD Part 109 appendix. Currently 16px on live city pages. */
.eho svg { width: 28px; height: 28px; }
.eho span { font-size: var(--t-micro); font-weight: 600; color: var(--ink-2); }

/* ============================================================
   Preview-only chrome. Never ships.
   ============================================================ */
.preview-banner {
  background: #1A1815; color: #F2EFE9;
  font-size: var(--t-micro); padding: var(--s3) 0;
}
.preview-banner .wrap { display: flex; gap: var(--s4); flex-wrap: wrap; align-items: center; }
.preview-banner a { color: #F2EFE9; text-decoration: underline; }
.preview-banner strong { color: #F0B36B; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .license-plate { font-size: 0.75rem; }
  .license-plate .lp-full { display: none; }
  .advisor { grid-template-columns: 1fr; }
  .advisor-photo { width: 128px; height: 160px; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; width: 100%;
    flex-direction: column; align-items: flex-start;
    gap: var(--s1); padding-bottom: var(--s4);
  }
  .nav.is-open { display: flex; }
  .masthead-inner { flex-wrap: wrap; gap: var(--s3); }
  .nav a { min-height: 44px; display: flex; align-items: center; width: 100%; }
  .hero { padding: var(--s7) 0 var(--s6); }
  .spread-row { grid-template-columns: 7rem 1fr 2.5rem; gap: var(--s3); }
  .intake { padding: var(--s5) var(--s4); }
  .rate-table { font-size: var(--t-micro); }
}

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

@media print {
  .masthead, .preview-banner, .intake, .nav-toggle { display: none; }
  body { background: #fff; }
}

/* ============================================================
   Additions from the Codex review pass
   ============================================================ */

/* Visually-hidden but announced. */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Footer group labels and card titles are real headings (h2) so the
   document outline is not fragmented, but they read at UI scale. */
.footer-h,
.card-title {
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: var(--t-micro);
  color: var(--ink-3);
  margin-bottom: var(--s3);
}
.card-title {
  font-family: var(--font-display);
  font-size: var(--t-h3);
  text-transform: none;
  letter-spacing: -0.012em;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: var(--s2);
}

/* The rate table must never push the page sideways on a phone.
   Focusable so keyboard users can reach the scroll. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.rate-table { min-width: 30rem; }

/* A zero bucket must render as zero, not as the 2px minimum, which
   would imply a non-zero count. */
.spread-fill.is-zero { min-width: 0; }

.assumptions-preview { color: var(--ink-3); }

@media (max-width: 720px) {
  /* Keep the credential visible on phones - it is the trust signal,
     so it moves rather than disappearing. */
  .masthead-inner { align-items: flex-start; }
  .license-plate {
    order: 3; width: 100%;
    padding-left: var(--s3); margin-top: var(--s2);
  }

  /* Rate label and count on one line, track full-width beneath, so the
     bar is not squeezed into 40% of a 312px row. */
  .spread-row {
    grid-template-columns: 1fr auto;
    gap: var(--s1) var(--s3);
  }
  .spread-track { grid-column: 1 / -1; height: 20px; }
  .spread-count { text-align: right; }
}

/* Calculator mount point - the interactive widget lands here; the
   worked examples below it are static so crawlers can read them. */
.calc-mount {
  border: 1px dashed var(--rule-strong);
  border-radius: var(--r-md);
  background: var(--paper-sunk);
  padding: var(--s6);
  margin: var(--s6) 0;
  text-align: center;
}
.calc-mount-note { color: var(--ink-3); font-size: var(--t-small); margin: 0; max-width: none; }
.calc-mount code { font-size: 0.85em; color: var(--ink-2); }

/* ============================================================
   Calculators — first-class tools, not a utility page.
   Educational, numbers-first, no ask until there is a result.
   ============================================================ */
.tool {
  display: grid; gap: var(--s6);
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  align-items: start;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: var(--s6);
  box-shadow: var(--shadow-md);
}
.tool-controls { display: grid; gap: var(--s5); }
.fld { display: grid; gap: var(--s2); }
.fld label {
  font-size: var(--t-small); font-weight: 600; color: var(--ink-2);
  display: flex; justify-content: space-between; gap: var(--s3);
}
.fld output { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.fld input[type=range] { width: 100%; accent-color: var(--navy); height: 24px; cursor: pointer; }
.fld input[type=number] {
  min-height: 44px; padding: 0 var(--s3);
  border: 1px solid var(--rule-strong); border-radius: var(--r-sm);
  background: var(--paper); color: var(--ink);
  font: inherit; font-size: var(--t-small); font-variant-numeric: tabular-nums;
}
.fld-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }

.tool-result {
  background: var(--paper-sunk);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: var(--s5);
}
.figure-xl {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 1.8rem + 2.4vw, 3.4rem);
  font-weight: 400; line-height: 1; color: var(--ink);
  letter-spacing: -0.02em; margin: var(--s2) 0 var(--s4);
}
.badge {
  display: inline-block; font-size: var(--t-micro); font-weight: 700;
  padding: var(--s1) var(--s3); border-radius: var(--r-sm);
  background: var(--paper); border: 1px solid var(--rule-strong); color: var(--ink-2);
  margin-bottom: var(--s4);
}
.badge.ok { border-color: var(--down); color: var(--down); }
.badge.no { border-color: var(--up); color: var(--up); }

.brkdn { display: grid; margin: 0 0 var(--s4); border-top: 1px solid var(--rule); }
.brkdn > div {
  display: grid; grid-template-columns: 1fr auto; gap: var(--s4);
  padding: var(--s3) 0; border-bottom: 1px solid var(--rule);
}
.brkdn dt { margin: 0; font-size: var(--t-small); color: var(--ink-2); }
.brkdn dd { margin: 0; font-weight: 600; color: var(--ink); }
.brkdn dd.neg { color: var(--up); }
.tool-note { font-size: var(--t-micro); color: var(--ink-3); margin: 0; max-width: none; }

/* Result-stage capture. Never above the result. */
.gate {
  margin-top: var(--s6);
  border: 1px solid var(--rule); border-radius: var(--r-md);
  background: var(--paper-raised); padding: var(--s5);
}
.gate h3 { margin-bottom: var(--s2); }
.gate-why { font-size: var(--t-small); color: var(--ink-3); max-width: 60ch; }
.gate-row { display: flex; gap: var(--s3); flex-wrap: wrap; }
.gate-row input {
  flex: 1 1 240px; min-height: 48px; padding: 0 var(--s4);
  border: 1px solid var(--rule-strong); border-radius: var(--r-md);
  background: var(--paper); color: var(--ink); font: inherit; font-size: var(--t-small);
}
.gate-status { font-size: var(--t-small); margin: var(--s3) 0 0; min-height: 1.2em; }
.gate-status.err { color: var(--up); }
.gate-done p { margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* The Second Opinion CTA closes every result. */
.second-op {
  margin-top: var(--s6);
  border-left: 3px solid var(--navy);
  background: var(--navy-tint);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: var(--s5) var(--s6);
}
.second-op h3 { margin-bottom: var(--s3); max-width: 34ch; }
.second-op p { font-size: var(--t-small); max-width: 62ch; }
.second-op .cred { font-size: var(--t-micro); color: var(--ink-3); margin: var(--s4) 0 0; }

.ruled-list { display: grid; border-top: 1px solid var(--rule); }
.ruled-list > div {
  display: grid; grid-template-columns: minmax(140px,1fr) 2fr; gap: var(--s2) var(--s6);
  padding: var(--s4) 0; border-bottom: 1px solid var(--rule);
}
.ruled-list h3 { margin: 0; font-size: var(--t-h3); }
.ruled-list p { margin: 0; font-size: var(--t-small); }

@media (max-width: 860px) {
  .tool { grid-template-columns: 1fr; }
  .ruled-list > div { grid-template-columns: 1fr; }
}

.gate-names { display: flex; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s3); }
.gate-names input {
  flex: 1 1 160px; min-height: 48px; padding: 0 var(--s4);
  border: 1px solid var(--rule-strong); border-radius: var(--r-md);
  background: var(--paper); color: var(--ink); font: inherit; font-size: var(--t-small);
}


/* APR renders at the SAME size and weight as the note rate it sits with.
   12 CFR 1026.24(c): a simple annual rate may not be more conspicuous
   than the APR. Do not shrink, grey, or otherwise de-emphasise this. */
.figure-item .figure-apr {
  display: block;
  margin-top: var(--s1);
  color: var(--ink);
}

/* ============================================================
   Legacy content, ported verbatim from production.
   Scoped so old class names and inline styles cannot leak into
   the design system. Restyle tracked in NEEDS-INTEGRATION.md.
   ============================================================ */
.legacy-content { padding-block: var(--s7); }
.legacy-content h1 { font-size: var(--t-h1); margin-bottom: var(--s5); }
.legacy-content h2 { font-size: var(--t-h2); margin-top: var(--s7); }
.legacy-content h3 { font-size: var(--t-h3); margin-top: var(--s5); }
.legacy-content p, .legacy-content li { max-width: var(--measure); }
.legacy-content ul, .legacy-content ol { padding-left: var(--s5); }
.legacy-content li { margin-bottom: var(--s2); }
.legacy-content a { color: var(--navy); }
.legacy-content table { width: 100%; border-collapse: collapse; font-size: var(--t-small); }
.legacy-content th, .legacy-content td {
  text-align: left; padding: var(--s3) var(--s4) var(--s3) 0;
  border-bottom: 1px solid var(--rule);
}
/* Old palette variables do not exist here - neutralise any that survived. */
.legacy-content [style*="var(--purple)"] { color: var(--navy) !important; }

/* ============================================================
   Homepage lead capture — 3-step intake (#start) and rate watch
   (#watch). Both were missing entirely: the rebuilt homepage had
   four dead .choice tiles and a "Watch rates for me" link to "#".

   Field controls repeat the .gate-row input treatment rather than
   inheriting it, because the gate lives inside a calculator result
   panel and these sit on the raised intake card. Same tokens, so
   they read as one system; separate selectors so restyling the
   calculator gate cannot silently reshape the homepage.
   ============================================================ */
.intake-step[hidden] { display: none; }
.intake-step h2 { outline: none; }

.intake-fields {
  display: grid; gap: var(--s3);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: var(--s4);
}
.intake-field { display: grid; gap: 6px; align-content: start; }
.intake-field label { font-size: var(--t-micro); color: var(--ink-3); }
.intake-field input, .intake-field select, .intake-field textarea {
  width: 100%; min-height: 48px; padding: 0 var(--s4);
  border: 1px solid var(--rule-strong); border-radius: var(--r-md);
  background: var(--paper); color: var(--ink); font: inherit; font-size: var(--t-small);
}
.intake-field textarea { min-height: 84px; padding: var(--s3) var(--s4); resize: vertical; }
.intake-field input.err, .intake-field select.err { border-color: var(--up); }
.intake-wide { grid-column: 1 / -1; }

/* The useful thing, shown before step 3 asks for contact details. */
.intake-useful {
  border-left: 3px solid var(--navy);
  background: var(--navy-tint);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: var(--s4) var(--s5);
  font-size: var(--t-small);
  margin: 0 0 var(--s4);
}
.intake-useful[hidden] { display: none; }
.intake-useful a { color: var(--navy); }

.intake-actions { display: flex; gap: var(--s3); flex-wrap: wrap; align-items: center; }
.intake-status { font-size: var(--t-small); margin: var(--s3) 0 0; min-height: 1.2em; }
.intake-status.err { color: var(--up); }
.intake-fineprint { font-size: var(--t-micro); color: var(--ink-3); margin: var(--s3) 0 0; max-width: 60ch; }
.intake-fineprint a { color: var(--navy); }
.intake-done[hidden] { display: none; }
.intake-done p { font-size: var(--t-small); max-width: 60ch; }

.watch-form { margin-top: var(--s5); max-width: 620px; }
