/* Atlantic Mortgage & Finance Corporation — design system
   Lexend (headings) + Source Sans 3 (body) · Atlantic navy + gold
   See design-system/atlantic-mortgage/MASTER.md */

@font-face {
  font-family: "Lexend";
  src: url("/assets/fonts/Lexend-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/SourceSans3-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/SourceSans3-italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --navy: #0B2447;
  --navy-deep: #071833;
  --navy-soft: #13335F;
  --blue: #1D63D8;
  --blue-dark: #154EAE;
  --gold: #F0A929;
  --gold-dark: #D89112;
  --bg: #FFFFFF;
  --bg-alt: #F3F7FC;
  --ink: #0F1B2D;
  --text: #33415C;
  --muted: #5A6B85;
  --line: #DCE5F0;
  --on-navy: #C9D6EA;
  --radius: 12px;
  --shadow: 0 4px 16px rgba(11, 36, 71, 0.08);
  --shadow-lg: 0 12px 32px rgba(11, 36, 71, 0.14);
  --font-head: "Lexend", "Segoe UI", sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 0.6em;
  font-weight: 600;
}
h1 { font-size: clamp(2rem, 4.5vw, 3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); letter-spacing: -0.015em; }
h3 { font-size: 1.22rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--blue-dark); }
address { font-style: normal; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.ic { width: 1.1em; height: 1.1em; vertical-align: -0.18em; }
.ic--caret { width: 0.85em; height: 0.85em; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Signature tide-line */
.tide, .section-head::after {
  content: "";
  display: block;
  height: 3px;
  width: 72px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--navy) 0%, var(--blue) 55%, var(--gold) 100%);
}
.section-head { margin-bottom: 2rem; }
.section-head::after { margin-top: 0.85rem; }
.section-head--center { text-align: center; }
.section-head--center::after { margin-left: auto; margin-right: auto; }
.section-head .kicker {
  display: block;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.5rem;
}
.section-head p.lede { color: var(--muted); max-width: 62ch; margin: 0.6rem 0 0; }
.section-head--center p.lede { margin-inline: auto; }

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  padding: 13px 26px;
  border-radius: 10px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
  text-align: center;
  white-space: nowrap;
}
.btn--sm { padding: 9px 18px; font-size: 0.92rem; }
.btn--lg { padding: 15px 34px; font-size: 1.08rem; }
.btn--gold { background: var(--gold); color: var(--navy-deep); }
.btn--gold:hover { background: var(--gold-dark); color: var(--navy-deep); box-shadow: 0 4px 14px rgba(240, 169, 41, 0.4); }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-soft); color: #fff; }
.btn--ghost { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn--ghost:hover { background: var(--navy); color: #fff; }
.btn--ghost-light { border-color: rgba(255,255,255,0.65); color: #fff; background: transparent; }
.btn--ghost-light:hover { background: rgba(255,255,255,0.12); border-color: #fff; color: #fff; }

/* Topbar */
.topbar { background: var(--navy-deep); color: var(--on-navy); font-size: 0.85rem; }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 7px; padding-bottom: 7px; }
.topbar__phone { color: #fff; font-weight: 600; text-decoration: none; white-space: nowrap; }
.topbar__phone:hover { color: var(--gold); }
@media (max-width: 640px) { .topbar__note { display: none; } .topbar__inner { justify-content: center; } }

/* Header / nav */
.header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand__img { display: block; width: auto; height: 52px; }
.brand__chip { display: inline-block; background: #fff; border-radius: 9px; padding: 8px 12px; }
.brand__chip .brand__img { height: 44px; }
@media (max-width: 640px) { .brand__img { height: 42px; } }

.nav__toggle {
  display: none;
  align-items: center; gap: 8px;
  background: none; border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 14px; font-family: var(--font-head); font-weight: 600; font-size: 0.95rem;
  color: var(--navy); cursor: pointer;
}
.nav__menu { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav__link {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-head); font-weight: 500; font-size: 0.97rem;
  color: var(--ink); text-decoration: none;
  padding: 26px 14px; background: none; border: none; cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: color 180ms ease, border-color 180ms ease;
  white-space: nowrap;
}
.nav__link:hover { color: var(--blue); }
.nav__item { position: relative; }
.nav__item.has-children:hover > .nav__link,
.nav__item.has-children:focus-within > .nav__link { color: var(--blue); }
.nav__dropdown {
  position: absolute; top: 100%; left: 0; min-width: 250px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow-lg);
  list-style: none; margin: 0; padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
  z-index: 60;
}
.nav__item.has-children:hover > .nav__dropdown,
.nav__item.has-children:focus-within > .nav__dropdown,
.nav__item.has-children.open > .nav__dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav__dropdown a {
  display: block; padding: 9px 13px; border-radius: 7px;
  color: var(--text); text-decoration: none; font-size: 0.95rem;
  transition: background-color 160ms ease, color 160ms ease;
}
.nav__dropdown a:hover { background: var(--bg-alt); color: var(--blue-dark); }
.nav__item--cta { margin-left: 12px; }

/* Mega (multi-column) dropdown — Loan Programs */
.nav__dropdown--mega {
  display: grid;
  grid-template-columns: repeat(3, minmax(196px, 1fr));
  gap: 2px 22px;
  min-width: 640px;
}
@media (max-width: 1100px) and (min-width: 861px) {
  .nav__dropdown--mega { right: 0; left: auto; }
}
.nav__mega-col > ul { list-style: none; margin: 0; padding: 0; }
.nav__mega-title {
  display: block;
  font-family: var(--font-head); font-weight: 600; font-size: 0.72rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  padding: 8px 13px 6px; margin-bottom: 2px;
  border-bottom: 1px solid var(--line);
}
a.nav__mega-title { transition: color 160ms ease; }
a.nav__mega-title:hover { color: var(--blue); background: none; }

@media (max-width: 1100px) {
  .nav__toggle { display: inline-flex; }
  .nav__menu {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    padding: 10px 16px 18px;
    max-height: calc(100vh - 130px);
    overflow-y: auto;
  }
  .nav__menu.open { display: flex; }
  .nav { position: static; }
  .header { position: relative; }
  .nav__link { width: 100%; justify-content: space-between; padding: 13px 6px; border-bottom: 1px solid var(--line); }
  .nav__dropdown {
    position: static; opacity: 1; visibility: hidden; transform: none;
    display: none; box-shadow: none; border: none;
    padding: 0 0 6px 14px; min-width: 0;
  }
  .nav__item.open > .nav__dropdown { display: block; visibility: visible; }
  .nav__dropdown--mega { grid-template-columns: 1fr; min-width: 0; }
  .nav__item.open > .nav__dropdown--mega { display: block; }
  .nav__mega-title { padding-left: 0; margin-top: 6px; }
  .nav__item--cta { margin: 14px 0 0; }
  .nav__item--cta .btn { display: block; }
}

/* Hero */
.hero {
  background:
    radial-gradient(820px 460px at 88% -12%, rgba(240, 169, 41, 0.14), transparent 62%),
    radial-gradient(720px 460px at -8% 112%, rgba(29, 99, 216, 0.22), transparent 58%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 78%);
  color: var(--on-navy);
  position: relative;
  overflow: hidden;
}
.hero h1 { color: #fff; margin-bottom: 0.45em; }
.hero .accent { color: var(--gold); }
.hero__lede { font-size: 1.17rem; margin-bottom: 1.9em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 13px; margin-bottom: 2.1em; }
.hero__chips { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 0; margin: 0; list-style: none; font-size: 0.9rem; }
.hero__chips li { display: flex; align-items: center; gap: 7px; }
.hero__chips .ic { color: var(--gold); }
.hero__wave { position: absolute; bottom: -1px; left: 0; right: 0; line-height: 0; }
.hero__wave svg { width: 100%; height: 56px; display: block; }

/* Centered typographic hero */
.hero--center .hero__inner {
  position: relative; z-index: 1;
  max-width: 860px; margin: 0 auto;
  text-align: center;
  padding: 92px 20px 128px;
}
.hero--center h1 { font-size: clamp(2.3rem, 5.2vw, 3.6rem); }
.hero__eyebrow {
  font-family: var(--font-head);
  font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.4em;
}
.hero--center .hero__lede { max-width: 52ch; margin-left: auto; margin-right: auto; }
.hero--center .hero__actions { justify-content: center; }
.hero--center .hero__chips { justify-content: center; }
.hero__lines { position: absolute; left: 0; right: 0; bottom: 36px; pointer-events: none; }
.hero__lines svg { width: 100%; height: 240px; display: block; }
@media (max-width: 880px) {
  .hero--center .hero__inner { padding: 60px 20px 100px; }
  .hero__lines svg { height: 160px; }
}

/* Sections */
.section { padding: 72px 0; }
.section--alt { background: var(--bg-alt); }
.section--navy { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 90%); color: var(--on-navy); }
.section--navy h2, .section--navy h3 { color: #fff; }
.section--tight { padding: 48px 0; }

/* Trust strip */
.trust { border-bottom: 1px solid var(--line); background: #fff; }
.trust__inner { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 18px 44px; padding: 22px 20px; }
.trust__item { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-size: 0.92rem; font-weight: 500; color: var(--navy); }
.trust__item .ic { width: 1.35em; height: 1.35em; flex: none; color: var(--gold-dark); }
@media (max-width: 640px) {
  /* Phones: left-aligned vertical stack reads as a clean checklist, not a centered cluster. */
  .trust__inner { flex-direction: column; flex-wrap: nowrap; align-items: flex-start; justify-content: flex-start; gap: 13px; padding: 18px 22px; }
  .trust__item { font-size: 0.9rem; }
}
.trust__item a { color: inherit; text-decoration: none; }
.trust__item a:hover { color: var(--blue); }

/* Cards */
.cards { display: grid; gap: 22px; }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
.cards--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px) { .cards--3, .cards--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cards--3, .cards--4, .cards--2 { grid-template-columns: 1fr; } }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 200ms ease, border-color 200ms ease;
}
.card:hover { box-shadow: var(--shadow-lg); border-color: #C5D4E8; }
.card__icon {
  width: 46px; height: 46px; border-radius: 11px;
  background: var(--bg-alt); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.card__icon .ic { width: 24px; height: 24px; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--blue); }
.card p { font-size: 0.97rem; color: var(--muted); flex: 1; }
.card .card__link {
  font-family: var(--font-head); font-weight: 600; font-size: 0.92rem;
  color: var(--blue); text-decoration: none; margin-top: 4px;
}
.card .card__link:hover { color: var(--blue-dark); text-decoration: underline; }
a.card { text-decoration: none; cursor: pointer; }

/* Path cards (homepage funnel) */
.path-card { position: relative; padding-top: 30px; }
.path-card .card__link::after { content: " \2192"; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; counter-reset: step; }
@media (max-width: 880px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 26px 24px 24px 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.step__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--navy); color: var(--gold);
  font-family: var(--font-head); font-weight: 700; font-size: 1.1rem;
  margin-bottom: 14px;
}
.step h3 { margin-bottom: 0.4em; }
.step p { font-size: 0.97rem; color: var(--muted); margin: 0; }

/* Tables (licensing etc.) */
.table-wrap { overflow-x: auto; }
table.data {
  width: 100%; border-collapse: collapse; font-size: 0.98rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
table.data th { background: var(--navy); color: #fff; font-family: var(--font-head); font-weight: 600; text-align: left; padding: 12px 16px; }
table.data td { padding: 12px 16px; border-top: 1px solid var(--line); }
table.data tr:nth-child(even) td { background: var(--bg-alt); }

/* Article layout (library pages) */
.page-hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 90%);
  color: var(--on-navy);
  padding: 44px 0 50px;
}
.page-hero h1 { color: #fff; margin: 0.1em 0 0.15em; }
.page-hero .breadcrumbs { font-size: 0.85rem; margin: 0; }
.page-hero .breadcrumbs a { color: var(--on-navy); text-decoration: none; }
.page-hero .breadcrumbs a:hover { color: var(--gold); }
.page-hero .breadcrumbs span[aria-hidden] { margin: 0 6px; opacity: 0.6; }
.page-hero .lede { margin: 0.4em 0 0; max-width: 70ch; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; padding: 56px 0 72px; }
.layout--single { grid-template-columns: minmax(0, 1fr); max-width: 820px; }
@media (max-width: 980px) { .layout { grid-template-columns: 1fr; } }

.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin-bottom: 0.45em; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; }
.prose table td, .prose table th { border: 1px solid var(--line); padding: 9px 12px; }
.prose blockquote { margin: 0 0 1.1em; padding: 14px 20px; border-left: 4px solid var(--gold); background: var(--bg-alt); border-radius: 0 8px 8px 0; }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 2em 0; }

.sidebar { align-self: start; position: sticky; top: 96px; display: grid; gap: 22px; }
.sidebar__box { background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.sidebar__box h3 { font-size: 1.02rem; margin-bottom: 0.8em; }
.sidebar__box ul { list-style: none; margin: 0; padding: 0; }
.sidebar__box li { margin: 0; }
.sidebar__box li a {
  display: block; padding: 8px 10px; border-radius: 7px;
  color: var(--text); text-decoration: none; font-size: 0.93rem;
  transition: background-color 160ms ease, color 160ms ease;
}
.sidebar__box li a:hover { background: #fff; color: var(--blue-dark); }
.sidebar__box li a[aria-current="page"] { background: var(--navy); color: #fff; font-weight: 600; }
.sidebar__box--cta { background: var(--navy); border-color: var(--navy); color: var(--on-navy); }
.sidebar__box--cta h3 { color: #fff; }
.sidebar__box--cta .btn { display: block; margin-top: 10px; }

/* FAQ accordion */
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 12px; box-shadow: var(--shadow); }
.faq-item summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 18px 22px;
  font-family: var(--font-head); font-weight: 600; color: var(--ink); font-size: 1.04rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .ic { flex: none; color: var(--blue); transition: transform 200ms ease; }
.faq-item[open] summary .ic { transform: rotate(45deg); }
.faq-item .faq-item__body { padding: 0 22px 20px; color: var(--text); }

/* Specialty / niche-program pages */
.page-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
@media (max-width: 560px) {
  /* Phones: full-width, evenly-stacked CTA buttons with bigger tap targets. */
  .page-hero__cta { flex-direction: column; align-items: stretch; }
  .page-hero__cta .btn { width: 100%; justify-content: center; }
}
.spec-main { min-width: 0; }
.spec-section { margin-top: 52px; }
.spec-section > h2 {
  font-size: 1.55rem; margin: 0 0 0.2em;
}
.spec-section > .spec-sub { color: var(--muted); margin: 0 0 1.3rem; max-width: 64ch; }
.spec-section .steps { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 620px) { .spec-section .steps { grid-template-columns: 1fr; } }

/* Scenario "who it's for" cards */
.scenario { padding: 22px 22px 20px; }
.scenario h3 { font-size: 1.08rem; margin: 0 0 0.3em; }
.scenario p { margin: 0; }
.scenario .card__icon { background: var(--navy); color: var(--gold); }

/* Quick-facts eligibility panel */
.quickfacts {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; box-shadow: var(--shadow); overflow: hidden; margin: 0;
}
.quickfacts__row { display: flex; gap: 18px; padding: 14px 20px; border-top: 1px solid var(--line); }
.quickfacts__row:first-child { border-top: none; }
.quickfacts__row:nth-child(even) { background: var(--bg-alt); }
.quickfacts dt {
  flex: 0 0 36%; margin: 0; font-family: var(--font-head); font-weight: 600;
  color: var(--navy); font-size: 0.95rem;
}
.quickfacts dd { margin: 0; flex: 1; color: var(--text); font-size: 0.98rem; }
@media (max-width: 560px) {
  .quickfacts__row { flex-direction: column; gap: 4px; }
  .quickfacts dt { flex-basis: auto; }
}

/* Related-program strip */
.related-strip .card h3 { font-size: 1.05rem; }

/* Reviews / social-proof band */
.reviews {
  margin-top: 52px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-alt); padding: 26px 28px; box-shadow: var(--shadow);
}
.reviews__head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.reviews__score { display: flex; align-items: center; gap: 13px; }
.reviews__num { font-family: var(--font-head); font-weight: 800; font-size: 2.2rem; color: var(--navy); line-height: 1; }
.reviews__stars { color: var(--gold-dark); letter-spacing: 2px; }
.reviews__label { color: var(--muted); font-size: 0.92rem; }
.reviews__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.reviews__quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px; }
@media (max-width: 760px) { .reviews__quotes { grid-template-columns: 1fr; } .reviews__actions { margin-left: 0; } }
.review-quote { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin: 0; }
.review-quote p { margin: 8px 0 12px; font-size: 0.96rem; color: var(--text); }
.review-quote cite { font-style: normal; font-weight: 600; color: var(--navy); font-size: 0.9rem; }

/* Comparison table emphasis (broker-vs-bank) */
table.data td.is-us { background: rgba(240, 169, 41, 0.10); font-weight: 600; color: var(--navy); }
table.data th.is-us { background: var(--blue); }

/* Business-purpose lending — geographic US map (brand palette: blue available / grey not offered) */
.bpl-mapwrap { margin-top: 48px; }
.bpl-map { max-width: 760px; margin: 0 auto; }
#bplmap svg { width: 100%; height: auto; display: block; }
#bplmap path { fill: var(--bg-alt); stroke: #fff; stroke-width: 1; transition: fill 0.15s ease; }
#bplmap path.bpl-avail { fill: var(--blue); }
.bpl-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 18px; padding: 0; margin: 16px 0 0; font-size: 0.9rem; color: var(--text); }
.bpl-legend .sw { display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-right: 7px; vertical-align: -2px; }
.bpl-legend .sw--e { background: var(--blue); }
.bpl-legend .sw--x { background: var(--bg-alt); border: 1px solid var(--line); }
.bpl-note { font-size: 0.85rem; color: var(--muted); margin-top: 12px; }
.bpl-sr { font-size: 0.85rem; color: var(--muted); margin-top: 10px; }

/* Inline lead-capture form on niche pages */
.spec-form { scroll-margin-top: 90px; }
.spec-form__card {
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 30px 28px; box-shadow: var(--shadow);
}
.spec-form__card > h2 { margin: 0 0 0.25em; }
.spec-form__sub { color: var(--muted); margin: 0 0 20px; max-width: 60ch; }
.spec-form__card .cform { max-width: none; }
.cform__fineprint { font-size: 0.82rem; color: var(--muted); margin: 16px 0 0; }

/* Team */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 980px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .team-grid { grid-template-columns: 1fr; } }
.person { text-align: left; }
.person__photo {
  width: 108px; height: 108px; border-radius: 50%;
  object-fit: cover; border: 3px solid var(--bg-alt);
  box-shadow: var(--shadow); margin-bottom: 14px;
}
.person__initials {
  width: 108px; height: 108px; border-radius: 50%;
  background: var(--navy); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-size: 2rem; font-weight: 700;
  margin-bottom: 14px;
}
.person h3 { margin-bottom: 0.15em; }
.person .person__role { color: var(--blue-dark); font-family: var(--font-head); font-size: 0.9rem; font-weight: 600; margin-bottom: 0.5em; }
.person .person__meta { font-size: 0.93rem; color: var(--muted); margin-bottom: 0.9em; }
.person .person__meta a { color: var(--text); }
.person__actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: auto; }

/* Apply router — compact two-column chooser (both choices visible without scrolling) */
.apply-router { padding: 30px 0 40px; }
.apply-router__head { text-align: center; max-width: 760px; margin: 0 auto 28px; }
.apply-router__head .breadcrumbs { justify-content: center; font-size: 0.82rem; color: var(--muted); margin-bottom: 10px; }
.apply-router__head .breadcrumbs a { color: var(--muted); text-decoration: none; }
.apply-router__head .breadcrumbs a:hover { color: var(--blue); }
.apply-router__head .breadcrumbs span[aria-hidden] { margin: 0 6px; opacity: 0.6; }
.apply-router__head h1 { margin: 0 0 0.3em; }
.apply-router__head p { color: var(--muted); margin: 0; max-width: 60ch; margin-inline: auto; }

.apply-router__cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.apply-col {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 22px 24px;
}
.apply-col + .apply-col { background: var(--bg-alt); }
.apply-col__title {
  font-size: 1.05rem; margin: 0 0 14px;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}

/* Loan-officer rows */
.lo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lo-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff; text-decoration: none; color: var(--ink);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.lo-row:hover { border-color: var(--gold); box-shadow: var(--shadow); color: var(--ink); }
.lo-row__avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }
.lo-row__avatar--initials {
  display: flex; align-items: center; justify-content: center;
  background: var(--navy); color: var(--gold);
  font-family: var(--font-head); font-weight: 700; font-size: 0.95rem;
}
.lo-row__text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.lo-row__name { font-family: var(--font-head); font-weight: 600; font-size: 0.98rem; color: var(--ink); }
.lo-row__role { font-size: 0.82rem; color: var(--muted); }
.lo-row__cta {
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  font-family: var(--font-head); font-weight: 600; font-size: 0.9rem;
  color: var(--blue);
}
.lo-row:hover .lo-row__cta { color: var(--blue-dark); }
.lo-row__cta .ic { width: 1em; height: 1em; }

/* State map tiles */
.state-map-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.state-map {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 12px 8px 12px;
  border: 1px solid var(--line); border-radius: 11px;
  background: #fff; text-decoration: none; color: var(--ink);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}
.state-map:hover { border-color: var(--gold); box-shadow: var(--shadow); color: var(--ink); }
.state-map__fig { height: 56px; display: flex; align-items: center; justify-content: center; }
.state-map__svg { height: 100%; width: auto; max-width: 100%; }
.state-map__svg path { fill: var(--navy); transition: fill 180ms ease; }
.state-map:hover .state-map__svg path { fill: var(--gold-dark); }
.state-map__name { font-family: var(--font-head); font-weight: 600; font-size: 0.92rem; margin-top: 8px; line-height: 1.2; }
.state-map__lo { font-size: 0.78rem; color: var(--muted); margin-top: 1px; }

.apply-router__note { grid-column: 1 / -1; font-size: 0.9rem; color: var(--muted); margin: 16px 0 0; }

@media (max-width: 860px) {
  .apply-router__cols { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .state-map-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Core-program chips (secondary, de-emphasized vs specialty) */
.prog-chips {
  list-style: none; margin: 0 auto; padding: 0; max-width: 920px;
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
}
.prog-chips a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--ink); text-decoration: none;
  font-family: var(--font-head); font-weight: 500; font-size: 0.95rem;
  transition: border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}
.prog-chips a:hover { border-color: var(--blue); color: var(--blue); box-shadow: var(--shadow); }
.prog-chips .ic { width: 0.85em; height: 0.85em; color: var(--muted); }
.prog-chips a:hover .ic { color: var(--blue); }

/* Contact form */
.cform { max-width: 640px; display: grid; gap: 16px; }
.cform__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .cform__row { grid-template-columns: 1fr; } }
.cform label { display: grid; gap: 6px; font-family: var(--font-head); font-weight: 500; font-size: 0.95rem; color: var(--ink); }
.cform input, .cform select, .cform textarea {
  font: inherit; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; color: var(--ink); width: 100%;
}
.cform input:focus, .cform select:focus, .cform textarea:focus {
  outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue);
}
.cform textarea { resize: vertical; }
.cform__opt { font-weight: 400; color: var(--muted); }
.cform__consent { grid-template-columns: auto 1fr; align-items: start; gap: 10px; font-family: var(--font-body); font-weight: 400; font-size: 0.88rem; color: var(--muted); line-height: 1.5; }
.cform__consent input { width: 18px; height: 18px; margin-top: 2px; }
.cform button[type="submit"] { justify-self: start; margin-top: 4px; cursor: pointer; }
.cform__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Embeds */
.embed-frame { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.embed-frame iframe { display: block; width: 100%; border: 0; }
.embed-note { font-size: 0.9rem; color: var(--muted); margin-top: 12px; }

/* Calculator */
.calc-tabs { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 26px; }
.calc-tab {
  font-family: var(--font-head); font-weight: 600; font-size: 0.9rem;
  padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--text);
  cursor: pointer; text-decoration: none;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}
.calc-tab:hover { border-color: var(--blue); color: var(--blue); }
.calc-tab.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.calc-panel { display: none; }
.calc-panel.active { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 34px; }
@media (max-width: 880px) { .calc-panel.active { grid-template-columns: 1fr; } }
.calc-form { display: grid; gap: 16px; align-content: start; }
.calc-form label { font-family: var(--font-head); font-weight: 500; font-size: 0.92rem; color: var(--ink); display: grid; gap: 6px; }
.calc-form input, .calc-form select {
  font: inherit; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 9px;
  background: #fff; color: var(--ink); width: 100%;
}
.calc-form input:focus, .calc-form select:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.calc-result {
  background: var(--navy); color: var(--on-navy);
  border-radius: var(--radius); padding: 30px;
  align-self: start;
}
.calc-result h3 { color: #fff; }
.calc-result .calc-result__big {
  font-family: var(--font-head); font-size: 2.3rem; font-weight: 700; color: var(--gold);
  margin: 6px 0 16px; display: block;
}
.calc-result dl { display: grid; grid-template-columns: 1fr auto; gap: 7px 18px; margin: 0; font-size: 0.97rem; }
.calc-result dt { opacity: 0.85; }
.calc-result dd { margin: 0; text-align: right; font-weight: 600; color: #fff; }
.calc-disclaimer { font-size: 0.85rem; color: var(--muted); margin-top: 30px; max-width: 80ch; }

/* Blog */
.post-card { padding: 0; overflow: hidden; }
.post-card__body { padding: 24px 26px 26px; display: flex; flex-direction: column; flex: 1; }
.post-card time { font-size: 0.85rem; color: var(--muted); font-family: var(--font-head); }
.post-card h3 { margin: 0.4em 0 0.5em; font-size: 1.12rem; line-height: 1.35; }
.pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 44px; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 13px;
  border-radius: 9px; border: 1px solid var(--line);
  font-family: var(--font-head); font-weight: 600; font-size: 0.95rem;
  color: var(--text); text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
}
.pagination a:hover { background: var(--bg-alt); color: var(--blue-dark); }
.pagination .current { background: var(--navy); border-color: var(--navy); color: #fff; }

/* Awards */
.awards { display: flex; flex-wrap: wrap; gap: 18px; }
.award-chip {
  display: flex; align-items: center; gap: 13px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 15px 20px;
  text-decoration: none; color: var(--ink);
  transition: box-shadow 200ms ease;
}
.award-chip:hover { box-shadow: var(--shadow-lg); color: var(--ink); }
.award-chip .ic { width: 30px; height: 30px; color: var(--gold-dark); flex: none; }
.award-chip strong { font-family: var(--font-head); font-size: 0.95rem; display: block; }
.award-chip small { color: var(--muted); font-size: 0.82rem; }

/* Florida manufactured-home callout */
.fl-callout {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--on-navy);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 44px 48px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto;
  gap: 34px;
  align-items: center;
}
.fl-callout h2 { color: #fff; }
.fl-callout p { margin: 0; max-width: 60ch; }
.fl-callout__actions { display: grid; gap: 12px; justify-items: stretch; }
@media (max-width: 880px) {
  /* Single column on tablet/phone; buttons keep the default stretch (both full-width,
     matching each other) instead of shrinking to their own text width and left-aligning. */
  .fl-callout { grid-template-columns: 1fr; padding: 32px 26px; }
  /* The base .btn is white-space:nowrap (fine for short CTAs), but this card's longer
     button text can't fit on one line at the stretched width — that pushes the grid
     item past its track (min-content overrides stretch) and off the right edge of the
     card. Let it wrap and drop the grid min-width floor so it actually fills the track. */
  .fl-callout__actions .btn { white-space: normal; min-width: 0; }
}

/* CTA band + footer */
.cta-band { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%); color: var(--on-navy); }
.cta-band__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 26px; padding-top: 54px; padding-bottom: 54px;
}
.cta-band__title { color: #fff; margin-bottom: 0.25em; }
.cta-band__sub { margin: 0; max-width: 56ch; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 560px) {
  /* Phones: full-width, evenly-stacked CTA buttons — matches .page-hero__cta so a
     button never wraps alone at a mismatched width against the row above it. */
  .cta-band__actions { flex-direction: column; align-items: stretch; }
  .cta-band__actions .btn { width: 100%; justify-content: center; }
}

.footer { background: var(--navy-deep); color: var(--on-navy); font-size: 0.95rem; }
.footer a { color: #fff; text-decoration-color: rgba(255,255,255,0.4); }
.footer a:hover { color: var(--gold); }
.footer__grid {
  display: grid; grid-template-columns: 1.35fr 1fr 0.8fr 0.8fr;
  gap: 38px; padding: 58px 0 30px;
}
@media (max-width: 980px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .footer__grid { grid-template-columns: 1fr; } }
.footer h3 { color: #fff; font-size: 1rem; margin-bottom: 0.9em; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer .brand { margin-bottom: 16px; }
.footer__ehl { display: flex; align-items: center; gap: 10px; margin-top: 20px; color: #fff; }
.footer__legal { border-top: 1px solid rgba(255,255,255,0.14); padding: 24px 0 34px; font-size: 0.84rem; opacity: 0.85; }
.footer__legal p { margin-bottom: 0.6em; }

/* Utility */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}
.mt-0 { margin-top: 0; }
.mb-2 { margin-bottom: 2rem; }
.text-center { text-align: center; }
.center-cta { text-align: center; margin-top: 38px; }
.note {
  background: var(--bg-alt); border: 1px solid var(--line); border-left: 4px solid var(--gold);
  border-radius: 0 10px 10px 0; padding: 16px 20px; font-size: 0.97rem;
}
.note--navy { border-left-color: var(--blue); }
