/* =========================================================
   AmeriFirst Capital — Design System
   ========================================================= */

:root {
  --navy: #04264D;
  --navy-700: #0A3868;
  --navy-600: #124A87;
  --navy-500: #1B5CA8;
  --red: #AF0620;
  --red-600: #C71F38;
  --red-500: #D9384E;
  --gold: #C9973F;
  --gold-light: #F0DDB0;

  --ink: #101B2D;
  --ink-soft: #3A4A63;
  --text: #1C2A40;
  --text-muted: #5B6779;
  --text-faint: #8994A3;

  --bg: #F6F8FB;
  --bg-alt: #EEF2F7;
  --white: #FFFFFF;
  --border: #E1E7EF;
  --border-strong: #C9D3E0;

  --success: #1E7B4D;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(4, 38, 77, 0.06);
  --shadow: 0 8px 24px -8px rgba(4, 38, 77, 0.18);
  --shadow-lg: 0 24px 60px -20px rgba(4, 38, 77, 0.30);

  --max: 1200px;
  --nav-h: 84px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.18; letter-spacing: -0.01em; color: var(--navy); }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 28px; }
.wrap-narrow { max-width: 880px; margin: 0 auto; padding: 0 28px; }

section { padding: 84px 0; }
.section-tight { padding: 56px 0; }
.bg-alt { background: var(--bg-alt); }
.bg-navy { background: var(--navy); color: #C9D6E8; }
.bg-navy h2, .bg-navy h3 { color: #fff; }

/* ---------- Type helpers ---------- */
.eyebrow {
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--red); display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
}
.eyebrow::before { content: ''; width: 22px; height: 2px; background: var(--gold); border-radius: 2px; }
.section-head { max-width: 640px; margin: 0 0 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 38px); }
.section-head p { margin-top: 14px; font-size: 16.5px; color: var(--text-muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 14.5px; padding: 13px 26px;
  border-radius: var(--radius-pill); border: 1.5px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 10px 24px -10px rgba(175,6,32,0.55); }
.btn-primary:hover { background: var(--red-600); }
.btn-navy { background: var(--navy); color: #fff; box-shadow: 0 10px 24px -10px rgba(4,38,77,0.5); }
.btn-navy:hover { background: var(--navy-700); }
.btn-white { background: #fff; color: var(--navy); box-shadow: var(--shadow); }
.btn-white:hover { background: #fff; box-shadow: var(--shadow-lg); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--navy); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); }
.btn-ghost-light:hover { border-color: #fff; }
.btn-sm { padding: 9px 18px; font-size: 13px; }
.btn-block { width: 100%; }

/* ---------- Nav ---------- */
.site-nav { position: sticky; top: 0; z-index: 200; background: rgba(255,255,255,0.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.site-nav .wrap { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img, .brand svg { height: 44px; width: auto; }
.nav-right { display: flex; align-items: center; gap: 24px; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links > li { position: relative; }
.nav-links a.nav-link {
  font-weight: 600; font-size: 14.5px; color: var(--navy);
  padding: 10px 0; display: flex; align-items: center; gap: 5px; white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.nav-links a.nav-link:hover, .nav-links a.nav-link.active { border-color: var(--red); color: var(--red); }
.nav-links .chev { width: 9px; height: 9px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg); margin-top: -3px; transition: transform .15s; }
.dropdown:hover .chev { transform: rotate(225deg); margin-top: 3px; }
.dropdown-menu {
  position: absolute; top: 100%; left: -14px; margin-top: 6px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  min-width: 220px; padding: 10px; opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.dropdown:hover .dropdown-menu, .dropdown:focus-within .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a { display: block; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; color: var(--text); }
.dropdown-menu a:hover { background: var(--bg-alt); color: var(--red); }
.nav-cta { white-space: nowrap; display: flex; align-items: center; gap: 12px; }
.nav-login { white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--navy); padding: 8px 4px; margin-right: 4px; transition: color .15s; }
.nav-login:hover { color: var(--red); }
.nav-mobile-cta { display: none; }
.nav-toggle { display: none; }

/* ---------- Mobile nav ---------- */
.nav-toggle-btn { display: none; background: none; border: none; padding: 6px; }
.nav-toggle-btn span { display: block; width: 24px; height: 2.5px; background: var(--navy); margin: 5px 0; border-radius: 2px; }

@media (max-width: 1100px) {
  .nav-links { position: fixed; top: var(--nav-h); left: 0; right: 0; height: calc(100vh - var(--nav-h)); background: #fff; display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 10px 20px 30px; overflow-y: auto; transform: translateX(100%); transition: transform .25s ease; z-index: 199; }
  .nav-links.open { transform: translateX(0); }
  .nav-links > li { border-bottom: 1px solid var(--border); }
  .nav-links a.nav-link { padding: 16px 4px; justify-content: space-between; }
  .dropdown-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; display: none; padding-left: 10px; }
  .dropdown.open .dropdown-menu { display: block; }
  .nav-cta { display: none; }
  .nav-mobile-cta { display: flex; flex-direction: column; gap: 12px; padding: 24px 0 8px; border-bottom: none !important; }
  .nav-toggle-btn { display: block; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(125deg, var(--navy) 0%, var(--navy-600) 48%, var(--red) 145%); padding: 76px 0 100px; color: #fff; }
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 400px at 85% 10%, rgba(255,255,255,0.14), transparent 60%);
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-pill); font-size: 12.5px; font-weight: 700; letter-spacing: 0.04em;
  margin-bottom: 22px; color: #F3E4C6;
}
.hero-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold-light); }
.hero h1 { font-size: clamp(34px, 4.4vw, 52px); color: #fff; max-width: 13ch; }
.hero h1 em { font-style: normal; color: var(--gold-light); }
.hero-sub { margin-top: 20px; font-size: 17.5px; line-height: 1.6; color: #D4DEEC; max-width: 46ch; }
.hero-ctas { margin-top: 32px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { margin-top: 40px; display: flex; gap: 34px; flex-wrap: wrap; }
.hero-stats .stat b { display: block; font-size: 24px; color: #fff; font-family: inherit; }
.hero-stats .stat span { font-size: 12.5px; color: #AEBEDA; text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- DSCR Calculator card (hero) ---------- */
.calc-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; color: var(--text); }
.calc-head { background: var(--bg-alt); padding: 18px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.calc-head .t1 { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); }
.calc-head .t2 { font-size: 11px; font-weight: 700; color: var(--red); }
.calc-body { padding: 26px; }
.calc-title { font-size: 19px; margin-bottom: 4px; }
.calc-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.field .input-wrap { position: relative; }
.field .input-wrap .prefix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-faint); font-weight: 600; }
.field input, .field select {
  width: 100%; padding: 12px 14px 12px 28px; border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 600; color: var(--navy); background: var(--bg);
  transition: border-color .15s;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--red); background: #fff; }
.field.no-prefix input { padding-left: 14px; }
.calc-result { margin-top: 20px; padding: 20px; border-radius: var(--radius); background: var(--bg-alt); border: 1px solid var(--border); text-align: center; }
.calc-result .ratio { font-size: 40px; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.calc-result .verdict { margin-top: 6px; font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: var(--radius-pill); display: inline-block; }
.verdict.good { background: #DEF3E6; color: var(--success); }
.verdict.warn { background: #FCEAD3; color: #9A5B0A; }
.verdict.bad { background: #FBE1E4; color: var(--red); }
.calc-foot { padding: 14px 26px; background: var(--bg-alt); font-size: 11.5px; color: var(--text-faint); border-top: 1px solid var(--border); }

/* ---------- Tabs (product portfolio) ---------- */
.tabbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 36px; }
.tabbar button { padding: 11px 22px; border-radius: var(--radius-pill); border: 1.5px solid var(--border-strong); background: #fff; font-weight: 700; font-size: 14px; color: var(--text-muted); transition: all .15s; }
.tabbar button:hover { border-color: var(--navy); color: var(--navy); }
.tabbar button.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---------- Program cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.program-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; position: relative;
}
.program-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.program-card .badge { position: absolute; top: 20px; right: 20px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; padding: 4px 10px; border-radius: var(--radius-pill); }
.badge.specialty { background: var(--red); color: #fff; }
.badge.nonqm { background: var(--gold-light); color: #7A5A18; }
.program-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--bg-alt); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; color: var(--navy); }
.program-icon svg { width: 26px; height: 26px; }
.program-card h3 { font-size: 18px; margin-bottom: 8px; }
.program-card p { font-size: 14px; color: var(--text-muted); line-height: 1.55; }
.program-card .pc-link { margin-top: 14px; display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--red); }
.pc-variants { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.pc-variants a { font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: var(--radius-pill); background: var(--bg-alt); color: var(--navy); border: 1px solid var(--border); }
.pc-variants a:hover { border-color: var(--navy); }

.card-grid.compact { grid-template-columns: repeat(4, 1fr); gap: 16px; }
.program-card.compact { padding: 18px; text-align: center; }
.program-card.compact .program-icon { margin: 0 auto 12px; width: 44px; height: 44px; }
.program-card.compact h3 { font-size: 14.5px; }

.view-all-wrap { text-align: center; margin-top: 40px; }

@media (max-width: 980px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid.compact { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .card-grid, .card-grid.compact { grid-template-columns: 1fr; }
}

/* ---------- Why us / feature grid ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.feature { padding: 8px; }
.feature .program-icon { background: var(--white); box-shadow: var(--shadow-sm); }
.feature h3 { font-size: 17px; margin-bottom: 8px; }
.feature p { font-size: 14.5px; color: var(--text-muted); }
@media (max-width: 900px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } }

/* ---------- CTA banner ---------- */
.cta-banner { background: linear-gradient(120deg, var(--navy), var(--navy-700) 60%, var(--red) 160%); color: #fff; border-radius: var(--radius-lg); padding: 56px; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-banner h2 { color: #fff; font-size: 28px; max-width: 22ch; }
.cta-banner p { color: #D4DEEC; margin-top: 10px; }
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Testimonials ---------- */
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testimonial { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; }
.testimonial .stars { color: var(--gold); font-size: 14px; margin-bottom: 14px; letter-spacing: 2px; }
.testimonial p.quote { font-size: 15px; color: var(--text); line-height: 1.6; }
.testimonial .who { margin-top: 18px; font-size: 13.5px; font-weight: 700; color: var(--navy); }
.testimonial .who span { display: block; font-weight: 500; color: var(--text-muted); font-size: 12.5px; }
@media (max-width: 900px) { .testimonial-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #AEBEDA; padding: 64px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.footer-brand img { height: 40px; }
.footer-brand p { margin-top: 16px; font-size: 13.5px; line-height: 1.6; color: #93A4C0; max-width: 32ch; }
.footer-col h4 { color: #fff; font-size: 13px; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 16px; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { font-size: 14px; color: #AEBEDA; transition: color .15s; }
.footer-col a:hover { color: #fff; }
.social-row { display: flex; gap: 12px; margin-top: 20px; }
.social-row a { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.25); display: flex; align-items: center; justify-content: center; transition: all .15s; }
.social-row a:hover { background: #fff; color: var(--navy); }
.social-row svg { width: 16px; height: 16px; }
.footer-legal { padding-top: 26px; font-size: 12px; line-height: 1.7; color: #7C8DAA; }
.footer-legal .copyright { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 16px; font-size: 12.5px; }
@media (max-width: 980px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Page header (inner pages) ---------- */
.page-header { background: linear-gradient(120deg, var(--navy), var(--navy-600) 70%, var(--red) 170%); color: #fff; padding: 56px 0 60px; }
.breadcrumb { font-size: 12.5px; color: #AEBEDA; margin-bottom: 14px; }
.breadcrumb a:hover { color: #fff; }
.page-header h1 { color: #fff; font-size: clamp(28px, 3.6vw, 40px); }
.page-header p { margin-top: 12px; color: #D4DEEC; max-width: 62ch; font-size: 16px; }

/* ---------- Sticky side-nav (loan programs, privacy) ---------- */
.side-layout { display: grid; grid-template-columns: 240px 1fr; gap: 48px; align-items: start; }
.side-nav { position: sticky; top: calc(var(--nav-h) + 24px); }
.side-nav-label { font-size: 11px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-faint); margin: 18px 0 8px; }
.side-nav-label:first-child { margin-top: 0; }
.side-nav a { display: block; padding: 8px 12px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 600; color: var(--text-muted); border-left: 2px solid transparent; }
.side-nav a:hover { color: var(--navy); }
.side-nav a.active { color: var(--red); border-left-color: var(--red); background: var(--bg-alt); }
@media (max-width: 900px) { .side-layout { grid-template-columns: 1fr; } .side-nav { position: static; display: flex; flex-wrap: wrap; gap: 6px; } }

/* ---------- Program detail blocks ---------- */
.program-detail { padding: 36px 0; border-bottom: 1px solid var(--border); scroll-margin-top: calc(var(--nav-h) + 20px); }
.program-detail:last-child { border-bottom: none; }
.program-detail h3 { font-size: 24px; margin-bottom: 10px; }
.program-detail .desc { color: var(--text-muted); font-size: 15.5px; max-width: 68ch; margin-bottom: 22px; }
.spec-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.spec-tile { background: var(--bg-alt); border-radius: var(--radius); padding: 16px 18px; }
.spec-tile .sl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-faint); font-weight: 700; }
.spec-tile .sv { font-size: 18px; font-weight: 800; color: var(--navy); margin-top: 4px; }
@media (max-width: 700px) { .spec-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Timeline (how it works) ---------- */
.timeline { position: relative; padding-left: 46px; }
.timeline::before { content: ''; position: absolute; left: 19px; top: 6px; bottom: 6px; width: 2px; background: var(--border-strong); }
.timeline-step { position: relative; padding-bottom: 42px; }
.timeline-step:last-child { padding-bottom: 0; }
.timeline-step .num {
  position: absolute; left: -46px; top: 0; width: 40px; height: 40px; border-radius: 50%;
  background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px;
  box-shadow: 0 0 0 6px var(--bg);
}
.timeline-step h3 { font-size: 19px; margin-bottom: 6px; }
.timeline-step .time { font-size: 12px; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; display: block; }
.timeline-step p { color: var(--text-muted); font-size: 15px; max-width: 62ch; }

.doc-checklist { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px; }
.doc-checklist h3 { margin-bottom: 18px; }
.doc-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.doc-tabs button { padding: 8px 16px; border-radius: var(--radius-pill); border: 1.5px solid var(--border-strong); background: #fff; font-size: 13px; font-weight: 700; color: var(--text-muted); }
.doc-tabs button.active { background: var(--red); border-color: var(--red); color: #fff; }
.doc-list li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: 14.5px; }
.doc-list li:last-child { border-bottom: none; }
.doc-list .check { width: 18px; height: 18px; border-radius: 50%; background: var(--bg-alt); color: var(--success); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 900; }

/* ---------- Resources / blog ---------- */
.filter-pills { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 36px; }
.filter-pills button { padding: 9px 18px; border-radius: var(--radius-pill); border: 1.5px solid var(--border-strong); background: #fff; font-weight: 700; font-size: 13.5px; color: var(--text-muted); }
.filter-pills button.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.article-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: transform .18s, box-shadow .18s; }
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.article-thumb { height: 150px; background: linear-gradient(135deg, var(--navy), var(--red)); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.5); font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.article-body { padding: 22px; }
.article-cat { font-size: 11px; font-weight: 800; color: var(--red); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px; }
.article-body h3 { font-size: 17px; margin-bottom: 8px; }
.article-body p { font-size: 13.5px; color: var(--text-muted); }
.article-meta { margin-top: 16px; font-size: 12px; color: var(--text-faint); }
@media (max-width: 980px) { .article-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .article-grid { grid-template-columns: 1fr; } }

.newsletter-box { background: var(--bg-alt); border-radius: var(--radius-lg); padding: 40px; text-align: center; margin-top: 60px; }
.newsletter-form { display: flex; gap: 10px; max-width: 420px; margin: 20px auto 0; }
.newsletter-form input { flex: 1; padding: 13px 16px; border-radius: var(--radius-pill); border: 1.5px solid var(--border-strong); font-size: 14px; }

/* ---------- About ---------- */
.about-story { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about-story .ph { aspect-ratio: 4/3; border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--navy), var(--red)); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.55); font-weight: 800; letter-spacing: 0.06em; }
.values-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.value-card { text-align: center; padding: 10px; }
@media (max-width: 980px) { .about-story { grid-template-columns: 1fr; } .values-grid { grid-template-columns: 1fr 1fr; } }

.license-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.license-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px; }
.license-card h3 { font-size: 19px; margin-bottom: 6px; }
.license-card .lic-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 18px; }
.state-pills { display: flex; flex-wrap: wrap; gap: 8px; max-width: 100%; }
.state-pills span { background: var(--bg-alt); color: var(--navy); font-size: 12.5px; font-weight: 700; padding: 6px 12px; border-radius: var(--radius-pill); border: 1px solid var(--border); }
.disclaimer-note { margin-top: 20px; font-size: 12.5px; color: var(--text-faint); line-height: 1.6; }
@media (max-width: 900px) { .license-cards { grid-template-columns: 1fr; } }

/* ---------- Forms (get a quote / apply now / partnership) ---------- */
.form-layout { display: grid; grid-template-columns: 1fr 340px; gap: 44px; align-items: start; }
.form-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 38px; box-shadow: var(--shadow-sm); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 7px; }
.form-field .req { color: var(--red); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm);
  font-size: 14.5px; color: var(--text); background: #fff;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: none; border-color: var(--red); }
.form-field textarea { resize: vertical; min-height: 100px; }
.checkbox-field { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--text-muted); margin-bottom: 22px; }
.checkbox-field input { width: 17px; height: 17px; margin-top: 2px; flex-shrink: 0; }
.sidebar-card { background: var(--bg-alt); border-radius: var(--radius-lg); padding: 28px; }
.sidebar-card h4 { font-size: 15px; margin-bottom: 14px; }
.sidebar-card li { display: flex; gap: 10px; font-size: 13.5px; color: var(--text-muted); padding: 8px 0; }
.sidebar-card .check { width: 18px; height: 18px; border-radius: 50%; background: #fff; color: var(--success); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 900; }
@media (max-width: 980px) { .form-layout { grid-template-columns: 1fr; } .form-row { grid-template-columns: 1fr; } }

/* ---------- Multi-step (apply now) ---------- */
.progress-bar { display: flex; align-items: center; margin-bottom: 40px; }
.progress-step { flex: 1; text-align: center; position: relative; }
.progress-step::before { content: ''; position: absolute; top: 17px; left: -50%; width: 100%; height: 2px; background: var(--border-strong); z-index: 0; }
.progress-step:first-child::before { display: none; }
.progress-step.done::before, .progress-step.active::before { background: var(--red); }
.progress-dot { position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%; background: #fff; border: 2px solid var(--border-strong); display: flex; align-items: center; justify-content: center; font-weight: 800; margin: 0 auto 8px; color: var(--text-faint); }
.progress-step.active .progress-dot { border-color: var(--red); color: var(--red); }
.progress-step.done .progress-dot { background: var(--red); border-color: var(--red); color: #fff; }
.progress-step .plabel { font-size: 12px; font-weight: 700; color: var(--text-faint); }
.progress-step.active .plabel { color: var(--navy); }
.form-step { display: none; }
.form-step.active { display: block; }
.step-actions { display: flex; justify-content: space-between; margin-top: 26px; }

.confirm-screen { text-align: center; padding: 60px 20px; }
.confirm-icon { width: 72px; height: 72px; border-radius: 50%; background: #DEF3E6; color: var(--success); display: flex; align-items: center; justify-content: center; margin: 0 auto 22px; font-size: 32px; }
.confirm-screen h2 { margin-bottom: 12px; }
.confirm-screen p { color: var(--text-muted); max-width: 46ch; margin: 0 auto; }

/* ---------- Calculators ---------- */
.calc-page-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.calc-tab-panel { display: none; padding: 36px; }
.calc-tab-panel.active { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.calc-results { background: var(--bg-alt); border-radius: var(--radius-lg); padding: 26px; }
.calc-results .big { font-size: 34px; font-weight: 800; color: var(--navy); }
.result-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.result-row:last-child { border-bottom: none; }
.result-row span:last-child { font-weight: 700; color: var(--navy); }
@media (max-width: 800px) { .calc-tab-panel.active { grid-template-columns: 1fr; } }

/* ---------- Glossary ---------- */
.glossary-search { position: relative; margin-bottom: 34px; }
.glossary-search input { width: 100%; padding: 15px 20px 15px 46px; border-radius: var(--radius-pill); border: 1.5px solid var(--border-strong); font-size: 15px; }
.glossary-search .icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--text-faint); }
.az-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 40px; }
.az-nav a { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--text-muted); background: var(--bg-alt); }
.az-nav a:hover { background: var(--navy); color: #fff; }
.glossary-letter { font-size: 26px; color: var(--red); margin: 34px 0 14px; scroll-margin-top: calc(var(--nav-h) + 20px); }
.glossary-letter:first-child { margin-top: 0; }
.glossary-term { padding: 16px 0; border-bottom: 1px solid var(--border); }
.glossary-term dt { font-weight: 700; color: var(--navy); font-size: 15.5px; margin-bottom: 4px; }
.glossary-term dd { margin: 0; font-size: 14px; color: var(--text-muted); }
.glossary-term.hide { display: none; }

/* ---------- FAQ ---------- */
.faq-cats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 36px; }
.faq-cats button { padding: 10px 20px; border-radius: var(--radius-pill); border: 1.5px solid var(--border-strong); background: #fff; font-weight: 700; font-size: 13.5px; color: var(--text-muted); }
.faq-cats button.active { background: var(--red); border-color: var(--red); color: #fff; }
.faq-group { display: none; }
.faq-group.active { display: block; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q { width: 100%; text-align: left; padding: 20px 0; display: flex; justify-content: space-between; align-items: center; background: none; border: none; font-size: 16px; font-weight: 700; color: var(--navy); }
.faq-q .plus { width: 22px; height: 22px; border-radius: 50%; background: var(--bg-alt); flex-shrink: 0; position: relative; }
.faq-q .plus::before, .faq-q .plus::after { content: ''; position: absolute; background: var(--navy); border-radius: 2px; }
.faq-q .plus::before { left: 6px; right: 6px; top: 50%; height: 2px; transform: translateY(-50%); }
.faq-q .plus::after { top: 6px; bottom: 6px; left: 50%; width: 2px; transform: translateX(-50%); transition: opacity .15s; }
.faq-item.open .plus::after { opacity: 0; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-a p { padding: 0 0 20px; color: var(--text-muted); font-size: 14.5px; max-width: 68ch; line-height: 1.6; }

/* ---------- Privacy policy ---------- */
.legal-body h2 { font-size: 20px; margin: 34px 0 12px; scroll-margin-top: calc(var(--nav-h) + 20px); }
.legal-body h2:first-child { margin-top: 0; }
.legal-body p, .legal-body li { font-size: 14.5px; color: var(--text-muted); line-height: 1.7; margin-bottom: 12px; }
.legal-body ul { padding-left: 20px; list-style: disc; }
.legal-body .updated { font-size: 12.5px; color: var(--text-faint); margin-bottom: 30px; }

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--border); margin: 0; }
.center { text-align: center; }
.mt-lg { margin-top: 60px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .form-layout { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  section { padding: 56px 0; }
  .cta-banner { padding: 34px; }
}
