/* ============================================================
   Crane Finance — styles.css
   ============================================================ */

/* ─── Design Tokens ─── */
:root {
  --pine:      #123f3b;
  --pine-2:    #0d302d;
  --pine-3:    #0a2422;
  --sage:      #dce8df;
  --sage-2:    #c8dace;
  --cream:     #f6f2e8;
  --gold:      #d69a36;
  --gold-2:    #b8821f;
  --orange:    #c86d32;
  --ink:       #172524;
  --muted:     #5f6d69;
  --muted-2:   #8a9e99;
  --white:     #ffffff;
  --line:      #d7dfdc;
  --line-2:    #eaeeed;
  --bg-alt:    #f8faf9;
  --shadow:    0 18px 55px rgba(15,48,45,.12);
  --shadow-sm: 0 4px 18px rgba(15,48,45,.08);
  --radius:    24px;
  --radius-sm: 14px;
  --max:       1180px;
}

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select { font: inherit; }

/* ─── Layout Utilities ─── */
.container {
  width: min(calc(100% - 36px), var(--max));
  margin-inline: auto;
}

/* ─── Skip Link ─── */
.skip { position: absolute; left: -9999px; top: auto; }
.skip:focus {
  left: 16px;
  top: 16px;
  background: #fff;
  color: var(--pine);
  padding: 12px 18px;
  z-index: 9999;
  border-radius: 8px;
  font-weight: 700;
  box-shadow: var(--shadow);
}

/* ─── Focus ─── */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ─── Notice Bar ─── */
.notice {
  background: var(--pine-2);
  color: #c8dcda;
  font-size: .82rem;
  text-align: center;
  padding: 9px 16px;
  line-height: 1.4;
}
.notice strong { color: #fff; }

/* ─── Header / Nav ─── */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(18,63,59,.09);
}

.nav-wrap {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 20px;
  /* no justify-content:space-between — spacing handled by margin-left:auto below */
}
.nav-actions { margin-left: auto; display: flex; gap: 9px; flex-shrink: 0; }

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-weight: 850;
  letter-spacing: -.025em;
  font-size: 1.22rem;
  color: var(--pine);
  flex-shrink: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 50% 50% 46% 54%;
  background: var(--pine);
  position: relative;
  flex-shrink: 0;
}
.brand-mark::before {
  content: "";
  position: absolute;
  width: 17px; height: 17px;
  border: 3px solid var(--gold);
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  transform: rotate(-18deg);
  left: 10px; top: 7px;
}
.brand-mark::after {
  content: "";
  position: absolute;
  width: 18px; height: 3px;
  background: var(--gold);
  transform: rotate(-35deg);
  left: 7px; top: 26px;
  border-radius: 3px;
}

/* Scope strictly to header nav — prevents bleed into .toc-section which also uses <nav> */
header nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
}

header nav a {
  text-decoration: none;
  font-weight: 700;
  font-size: .9rem;
  color: var(--ink);
  padding: 7px 11px;
  border-radius: 8px;
  transition: background .15s, color .15s;
}
header nav a:hover { background: var(--sage); color: var(--pine); }



/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 999px;
  padding: 12px 22px;
  text-decoration: none;
  font-weight: 800;
  font-size: .9rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  line-height: 1;
  white-space: nowrap; /* BUG FIX: prevent button text from wrapping and breaking nav layout */
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(214,154,54,.28);
}
.btn-primary:hover {
  background: var(--gold-2);
  box-shadow: 0 12px 30px rgba(214,154,54,.35);
}
.btn-dark { background: var(--pine); color: #fff; }
.btn-dark:hover { background: var(--pine-2); }
.btn-outline { border-color: var(--pine); color: var(--pine); background: transparent; }
.btn-outline:hover { background: var(--sage); }
.btn-lg { padding: 15px 28px; font-size: 1rem; }

/* ─── Hamburger Button ─── */
.menu-btn {
  display: none;
  background: none;
  border: 0;
  /* BUG FIX: remove padding so it sits flush; use margin-left:auto to push it
     to the far right of the nav-wrap when nav links are hidden */
  padding: 6px;
  margin-left: auto;
  color: var(--ink);
  font-size: 1.45rem;
  cursor: pointer;
  border-radius: 8px;
  line-height: 1;
}
.menu-btn:hover { background: var(--sage); }

/* ─── Hero ─── */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(118deg, var(--cream) 0 54%, var(--sage) 54%);
  padding: 76px 0 70px;
}
.hero::before {
  content: "";
  position: absolute;
  width: 460px; height: 460px;
  border-radius: 50%;
  background: rgba(214,154,54,.11);
  right: -140px; top: -180px;
  pointer-events: none;
}
/* BUG FIX: hero::after is also suppressed on mobile alongside ::before */
.hero::after {
  content: "";
  position: absolute;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(18,63,59,.05);
  left: -60px; bottom: -80px;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: 52px;
  position: relative;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: .8rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  font-weight: 900;
  color: var(--orange);
  margin-bottom: 4px;
}
.eyebrow::before {
  content: "";
  width: 24px; height: 2px;
  background: currentColor;
  flex-shrink: 0;
}

h1 {
  font-size: clamp(2.6rem, 5.5vw, 5rem);
  line-height: .97;
  letter-spacing: -.06em;
  margin: 14px 0 20px;
  color: var(--pine);
}
h1 span { color: var(--orange); }

.hero-copy { font-size: 1.12rem; color: #455652; max-width: 580px; margin: 0 0 24px; }

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 0;
  margin: 0 0 28px;
  list-style: none;
  font-weight: 750;
  font-size: .95rem;
  color: var(--ink);
}
.hero-points li::before { content: "✓ "; color: var(--orange); font-weight: 900; }

.hero-btns { display: flex; gap: 11px; flex-wrap: wrap; }

.micro { font-size: .76rem; color: var(--muted); margin: 14px 0 0; }

/* ─── Loan Card ─── */
.loan-card {
  background: #fff;
  border: 1px solid rgba(18,63,59,.1);
  border-radius: 28px;
  padding: 30px;
  box-shadow: var(--shadow);
}
.loan-card-title { font-size: 1.5rem; line-height: 1.2; margin: 0 0 6px; color: var(--pine); font-weight: 800; }
.loan-card > p { margin: 0 0 22px; color: var(--muted); font-size: .92rem; }

.amount-display { display: flex; align-items: flex-end; justify-content: space-between; margin: 0 0 10px; }
.amount-display span { font-size: .82rem; color: var(--muted); }
.amount-display strong { font-size: 2.4rem; color: var(--pine); font-weight: 900; line-height: 1; }

input[type=range] { width: 100%; accent-color: var(--orange); cursor: pointer; }
.range-row { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted-2); margin-top: 6px; }

.field { margin-top: 18px; }
.field label { display: block; font-weight: 800; font-size: .86rem; margin-bottom: 7px; color: var(--ink); }
.field select {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: #fff;
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.field select:focus { border-color: var(--pine); }

.loan-card .btn { width: 100%; margin-top: 20px; justify-content: center; }
.loan-card .micro { text-align: center; }

/* ─── Trust Bar ─── */
.trust-bar { background: var(--pine); color: #fff; }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.trust-item { padding: 22px 24px; border-right: 1px solid rgba(255,255,255,.13); }
.trust-item:last-child { border-right: 0; }
.trust-item b { display: block; font-size: 1.05rem; margin-bottom: 3px; }
.trust-item span { font-size: .8rem; color: #b8d0cc; }

/* ─── TOC ─── */
.toc-section {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 36px 0;
}
.toc-inner { display: flex; gap: 16px 32px; align-items: center; flex-wrap: wrap; }
.toc-label {
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 900;
  color: var(--muted);
  /* BUG FIX: <p> has browser default margin; zero it out to prevent
     layout gaps in both row and column directions */
  margin: 0;
  white-space: nowrap;
  flex-shrink: 0;
}
.toc-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.toc-list a {
  display: inline-block;
  padding: 7px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .84rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--pine);
  transition: background .15s, border-color .15s;
}
.toc-list a:hover { background: var(--sage); border-color: var(--sage-2); }

/* ─── Sections ─── */
section { padding: 90px 0; }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head h2 {
  font-size: clamp(1.9rem, 3.8vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -.04em;
  color: var(--pine);
  margin: 10px 0 14px;
}
.section-head p { color: var(--muted); font-size: 1.05rem; margin: 0; }

/* ─── Bottom Line ─── */
.bottom-line { background: var(--pine); color: #fff; padding: 50px 0; }

/* BUG FIX: use gap on grid instead of manual padding/margin combo */
.bottom-line-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
}
.bl-item {
  padding: 0 40px 0 0;
  border-right: 1px solid rgba(255,255,255,.15);
  margin-right: 40px;
}
.bl-item:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.bl-verdict { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 900; color: var(--gold); margin-bottom: 6px; }
.bl-item h3 { font-size: 1.15rem; margin: 0 0 8px; color: #fff; }
.bl-item p { font-size: .88rem; color: #b0c8c4; margin: 0; line-height: 1.55; }

/* ─── Lender Overview ─── */
.overview-grid { display: grid; grid-template-columns: 1fr 360px; gap: 52px; align-items: start; }

.prose h3 { font-size: 1.25rem; color: var(--pine); margin: 32px 0 12px; }
.prose h3:first-child { margin-top: 0; }
.prose p { color: var(--muted); margin: 0 0 18px; }
.prose ul { color: var(--muted); padding-left: 22px; margin: 0 0 18px; }
.prose li { margin-bottom: 7px; }

.lender-badge {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  position: sticky;
  top: 100px;
}
.lender-badge h3 { font-size: 1rem; color: var(--pine); margin: 0 0 18px; font-weight: 800; }
.badge-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.badge-row:last-child { border-bottom: 0; padding-bottom: 0; }
.badge-row span:first-child { color: var(--muted); flex-shrink: 0; }
.badge-row span:last-child { font-weight: 800; color: var(--pine); text-align: right; max-width: 55%; }
.badge-cta { margin-top: 22px; }
.badge-cta .btn { width: 100%; justify-content: center; }

/* ─── Rates Table ─── */
.rates-section { background: var(--bg-alt); }
.rate-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
table { width: 100%; border-collapse: collapse; background: #fff; font-size: .92rem; }
thead { background: var(--pine); color: #fff; }
th { padding: 14px 20px; text-align: left; font-weight: 800; font-size: .84rem; letter-spacing: .03em; }
td { padding: 14px 20px; border-bottom: 1px solid var(--line-2); color: var(--ink); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) td { background: var(--bg-alt); }
.rate-note { font-size: .78rem; color: var(--muted); margin-top: 14px; }

/* ─── Loan Calculator ─── */
.calc-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  margin-top: 40px;
  box-shadow: var(--shadow-sm);
}
.calc-wrap h3 { font-size: 1.3rem; color: var(--pine); margin: 0 0 8px; }
.calc-wrap > p { color: var(--muted); font-size: .9rem; margin: 0 0 26px; }
.calc-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.calc-group label { display: block; font-weight: 800; font-size: .86rem; margin-bottom: 9px; color: var(--ink); }
.calc-group input[type=range] { width: 100%; }
.calc-group .val { font-size: 1.55rem; font-weight: 900; color: var(--pine); margin-bottom: 6px; }
.calc-result { margin-top: 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.result-box {
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  border: 1px solid var(--line);
}
.result-box .label {
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  font-weight: 900;
  color: var(--muted);
  margin-bottom: 6px;
}
/* BUG FIX: clamp font size so values don't overflow on narrow screens */
.result-box .value { font-size: clamp(1.1rem, 3.5vw, 1.6rem); font-weight: 900; color: var(--pine); }
.result-box.highlight { background: var(--pine); border-color: var(--pine); }
.result-box.highlight .label { color: #90b8b2; }
.result-box.highlight .value { color: #fff; }
.calc-disclaimer { font-size: .75rem; color: var(--muted); margin-top: 16px; line-height: 1.5; }

/* ─── Eligibility ─── */
.elig-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.elig-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.elig-card.req { border-top: 4px solid var(--pine); }
.elig-card.docs { border-top: 4px solid var(--gold); }
.elig-card h3 { font-size: 1.1rem; color: var(--pine); margin: 0 0 18px; }

.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: .92rem;
  color: var(--muted);
}
.check-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.check-list li::before { content: "✓"; color: var(--pine); font-weight: 900; flex-shrink: 0; margin-top: 2px; }

.elig-note {
  grid-column: 1 / -1;
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  font-size: .88rem;
  color: var(--muted);
  border-left: 4px solid var(--gold);
}

/* ─── Application Process ─── */
.process-section { background: var(--cream); }
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  top: 23px; /* half of tl-num height (46px / 2) */
  left: calc(12.5% + 23px); /* align between step centers */
  right: calc(12.5% + 23px);
  height: 2px;
  background: var(--line);
}

.tl-step { position: relative; text-align: center; padding: 0 16px; }
.tl-num {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--pine);
  color: #fff;
  font-weight: 900;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  position: relative;
  z-index: 1;
  /* BUG FIX: box-shadow color matches section bg; reset on mobile when bg changes */
  box-shadow: 0 0 0 6px var(--cream);
}
.tl-step h3 { font-size: 1rem; color: var(--pine); margin: 0 0 8px; }
.tl-step p { font-size: .87rem; color: var(--muted); margin: 0; }

.timing-bar { margin-top: 44px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.timing-item { background: #fff; border-radius: var(--radius-sm); padding: 20px; border: 1px solid var(--line); text-align: center; }
.timing-item .t-time { font-size: 1.4rem; font-weight: 900; color: var(--orange); margin-bottom: 4px; }
.timing-item .t-label { font-size: .82rem; color: var(--muted); }

/* ─── Pros / Cons ─── */
.procon-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.procon-card { border-radius: var(--radius); padding: 30px; }
.procon-card.pros { background: #eef6ef; border: 1px solid #c3dfc7; }
.procon-card.cons { background: #fef6ee; border: 1px solid #f0d5b8; }
.procon-card h3 { font-size: 1.1rem; margin: 0 0 18px; font-weight: 800; }
.procon-card.pros h3 { color: #1a5e28; }
.procon-card.cons h3 { color: #7a3b0e; }
.procon-list { list-style: none; padding: 0; margin: 0; }
.procon-list li { display: flex; gap: 10px; font-size: .92rem; padding: 9px 0; border-bottom: 1px solid rgba(0,0,0,.07); }
.procon-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.procon-list li span:first-child { flex-shrink: 0; font-size: 1rem; }
.procon-list li span:last-child { color: var(--muted); }

/* ─── FAQ ─── */
.faq-section { background: var(--bg-alt); }
details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin: 10px 0;
  padding: 0 22px;
}
summary {
  padding: 18px 0;
  font-weight: 800;
  cursor: pointer;
  color: var(--pine);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: .97rem;
  user-select: none;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.3rem; font-weight: 400; color: var(--muted); flex-shrink: 0; }
details[open] summary::after { content: "−"; }
details p { color: var(--muted); margin: 0; padding-bottom: 18px; font-size: .93rem; line-height: 1.65; }

/* ─── Articles ─── */
.articles-section { padding-bottom: 100px; }
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.article-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  transition: box-shadow .2s, transform .2s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.article-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.article-thumb { aspect-ratio: 16/9; overflow: hidden; background: var(--sage); }
.article-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.article-card:hover .article-thumb img { transform: scale(1.04); }
.article-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.article-cat { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 900; color: var(--orange); margin-bottom: 8px; }
.article-title { font-size: 1.05rem; font-weight: 800; color: var(--pine); line-height: 1.3; margin: 0 0 10px; }
.article-excerpt { font-size: .87rem; color: var(--muted); margin: 0 0 18px; flex: 1; }
.article-meta { font-size: .76rem; color: var(--muted-2); }
.articles-footer { text-align: center; margin-top: 40px; }

/* ─── CTA Band ─── */
.cta-band {
  padding: 52px 0;
  background: linear-gradient(125deg, var(--pine) 0%, #1c5e56 100%);
  color: #fff;
}
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.cta-inner h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); line-height: 1.08; margin: 0 0 10px; letter-spacing: -.03em; }
.cta-inner p { margin: 0; color: #c0d8d4; }

/* ─── Footer ─── */
footer { background: var(--pine-3); color: #fff; padding: 60px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 36px; margin-bottom: 44px; }
.footer-brand p { color: #8ab0ab; font-size: .88rem; max-width: 340px; margin: 14px 0 0; line-height: 1.6; }
footer h3 { font-size: .88rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted-2); margin: 0 0 14px; font-weight: 900; }
footer ul { list-style: none; padding: 0; margin: 0; }
footer li { margin: 0 0 10px; }
footer a { color: #9abfbb; text-decoration: none; font-size: .88rem; transition: color .15s; }
footer a:hover { color: #fff; }
.footer-divider { border: 0; border-top: 1px solid rgba(255,255,255,.1); margin: 0 0 28px; }
.fineprint { font-size: .74rem; color: #6a908a; line-height: 1.65; }
.fineprint p { margin: 0 0 12px; }
.fineprint p:last-child { margin: 0; }
.copyright { display: flex; justify-content: space-between; gap: 20px; margin-top: 28px; color: #547470; font-size: .75rem; flex-wrap: wrap; }


/* ================================================================
   RESPONSIVE BREAKPOINTS
   ================================================================ */

@media (max-width: 980px) {

  /* NAV — mobile dropdown (scoped to header nav only) */
  header nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    z-index: 999;
    box-shadow: 0 12px 30px rgba(0,0,0,.08);
  }
  header nav ul.open { display: flex; }

  /* hamburger pushes to far right; Apply Now stays visible */
  .menu-btn { display: block; margin-left: auto; }

  /* Hero */
  .hero-grid { grid-template-columns: 1fr; }
  .hero { background: var(--cream); }
  /* BUG FIX: hide both pseudo-elements on single-column hero */
  .hero::before,
  .hero::after { display: none; }

  /* Overview sidebar becomes stacked */
  .overview-grid { grid-template-columns: 1fr; }
  /* BUG FIX: reset sticky + top when not sticky */
  .lender-badge { position: static; top: auto; }

  /* Trust bar 2×2 */
  .trust-grid { grid-template-columns: 1fr 1fr; }
  /* BUG FIX: reset all borders first, then set only the ones we want */
  .trust-item { border-right: 1px solid rgba(255,255,255,.13); }
  .trust-item:nth-child(2n) { border-right: 0; }
  .trust-item:nth-child(3),
  .trust-item:nth-child(4) { border-top: 1px solid rgba(255,255,255,.13); }

  /* Timeline 2×2 */
  .timeline { grid-template-columns: 1fr 1fr; gap: 32px; }
  .timeline::before { display: none; }
  /* BUG FIX: reset box-shadow so ring doesn't bleed on non-cream bg */
  .tl-num { box-shadow: none; }

  .timing-bar { grid-template-columns: 1fr; }

  /* Bottom line stacks */
  .bottom-line-grid { grid-template-columns: 1fr; }
  .bl-item {
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.15);
    padding: 0 0 28px;
    margin: 0 0 28px;
  }
  .bl-item:last-child { border-bottom: 0; margin: 0; padding: 0; }

  /* Footer 2-col */
  .footer-grid { grid-template-columns: 1fr 1fr; }

  /* CTA stacks */
  .cta-inner { flex-direction: column; align-items: flex-start; }

  /* Form layouts */
  .elig-grid { grid-template-columns: 1fr; }
  .procon-grid { grid-template-columns: 1fr; }
  .calc-controls { grid-template-columns: 1fr; }

  /* Calc results stack vertically on tablet — 3→1 to prevent overflow */
  .calc-result { grid-template-columns: 1fr; }

  /* Articles 2-up */
  .articles-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .container { width: min(calc(100% - 24px), var(--max)); }

  .hero { padding: 50px 0; }
  h1 { font-size: 2.8rem; }
  section { padding: 64px 0; }

  /* Timeline fully stacked */
  .timeline { grid-template-columns: 1fr; }

  /* Trust bar 1-col — BUG FIX: clear all nth-child overrides from 980px */
  .trust-grid { grid-template-columns: 1fr; }
  .trust-item,
  .trust-item:nth-child(2n),
  .trust-item:nth-child(3),
  .trust-item:nth-child(4) {
    border-right: 0;
    border-top: 0;
    border-bottom: 1px solid rgba(255,255,255,.13);
  }
  .trust-item:last-child { border-bottom: 0; }

  /* Footer single col */
  .footer-grid { grid-template-columns: 1fr; }
  .copyright { flex-direction: column; }

  /* Articles single col */
  .articles-grid { grid-template-columns: 1fr; }

  /* TOC stacks label above pills — BUG FIX: align-items:flex-start so
     pills don't stretch to full width in column direction */
  .toc-inner { flex-direction: column; gap: 12px; align-items: flex-start; }
}

/* ─── Utility classes (replaces inline styles) ─── */

/* Bottom Line section heading */
.bottom-line .eyebrow { color: var(--gold); }
.bottom-line-heading {
  color: #fff;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: -.04em;
  margin: 10px 0 32px;
}
/* remove the intermediate class we added in HTML */
.bottom-line__eyebrow { color: var(--gold); }

/* Lender overview section-head tight spacing */
.section-head--tight { margin-bottom: 8px; }

/* Badge links (phone / email inside lender-badge) */
.badge-link {
  color: var(--pine);
  font-weight: 800;
  word-break: break-all;
}

/* Badge CTA micro text */
.badge-micro {
  text-align: center;
  margin-top: 10px;
}

/* Eligibility note with top margin when below process section */
.elig-note--spaced { margin-top: 32px; }

/* Inline anchor links in prose (FAQ, contact paragraphs) */
.prose-link {
  color: var(--pine);
  font-weight: 700;
}

/* Footer brand on dark background */
.brand--footer { color: #fff; }
.brand-mark--footer { background: rgba(255,255,255,.15); }

/* ─── Breadcrumbs ─── */
.breadcrumbs {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.breadcrumb-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: .83rem;
}
.breadcrumb-item { display: flex; align-items: center; gap: 6px; }
.breadcrumb-item:not(:last-child)::after {
  content: "/";
  color: var(--muted-2);
  font-size: .78rem;
}
.breadcrumb-item a {
  text-decoration: none;
  color: var(--muted);
  transition: color .15s;
}
.breadcrumb-item a:hover { color: var(--pine); }
.breadcrumb-item--current { color: var(--ink); font-weight: 700; }

/* ─── Article Layout ─── */
.article-hero {
  background: var(--cream);
  padding: 52px 0 0;
  border-bottom: 1px solid var(--line);
}
.article-hero-inner { max-width: 860px; margin-inline: auto; padding: 0 18px; }
.article-cat-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 900;
  color: var(--orange);
  margin-bottom: 16px;
}
.article-cat-label::before { content: ""; width: 20px; height: 2px; background: currentColor; }
.article-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -.04em;
  color: var(--pine);
  margin: 0 0 20px;
}
.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  font-size: .82rem;
  color: var(--muted);
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}
.article-meta-bar strong { color: var(--ink); }
.article-featured-img {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  display: block;
  border-radius: 0;
  aspect-ratio: 16/7;
  object-fit: cover;
}

/* Article body */
.article-body-wrap {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 60px;
  align-items: start;
  max-width: 1100px;
  margin-inline: auto;
  padding: 52px 18px 80px;
}
.article-content h2 {
  font-size: clamp(1.4rem, 2.8vw, 1.9rem);
  letter-spacing: -.03em;
  color: var(--pine);
  margin: 44px 0 14px;
  line-height: 1.15;
}
.article-content h2:first-child { margin-top: 0; }
.article-content h3 {
  font-size: 1.1rem;
  color: var(--pine);
  margin: 28px 0 10px;
}
.article-content p {
  color: var(--muted);
  margin: 0 0 18px;
  font-size: 1rem;
  line-height: 1.75;
}
.article-content ul, .article-content ol {
  color: var(--muted);
  padding-left: 22px;
  margin: 0 0 18px;
}
.article-content li { margin-bottom: 8px; line-height: 1.65; }
.article-content a { color: var(--pine); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.article-content a:hover { color: var(--orange); }
.article-content strong { color: var(--ink); }

/* Callout box */
.callout {
  background: var(--sage);
  border-left: 4px solid var(--pine);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin: 28px 0;
}
.callout p { margin: 0; color: var(--ink); font-size: .93rem; }

/* Article CTA */
.article-cta {
  background: var(--pine);
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
  margin: 44px 0 0;
}
.article-cta p { color: #b0c8c4; font-size: .9rem; margin: 0 0 18px; }
.article-cta .btn { display: inline-flex; }

/* Sidebar */
.article-sidebar { position: sticky; top: 100px; }
.sidebar-card {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}
.sidebar-card h3 { font-size: .9rem; color: var(--pine); margin: 0 0 14px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.sidebar-toc { list-style: none; padding: 0; margin: 0; }
.sidebar-toc li { border-bottom: 1px solid var(--line); }
.sidebar-toc li:last-child { border-bottom: 0; }
.sidebar-toc a { display: block; padding: 9px 0; font-size: .86rem; color: var(--muted); text-decoration: none; transition: color .15s; }
.sidebar-toc a:hover { color: var(--pine); }
.related-list { list-style: none; padding: 0; margin: 0; }
.related-list li { border-bottom: 1px solid var(--line); }
.related-list li:last-child { border-bottom: 0; }
.related-list a { display: block; padding: 10px 0; font-size: .86rem; color: var(--pine); text-decoration: none; font-weight: 700; line-height: 1.4; transition: color .15s; }
.related-list a:hover { color: var(--orange); }

/* Reviewer box */
.reviewer-box {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin-top: 48px;
}
.reviewer-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--pine);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.reviewer-info { font-size: .82rem; color: var(--muted); }
.reviewer-info strong { display: block; color: var(--ink); font-size: .9rem; margin-bottom: 2px; }

@media (max-width: 860px) {
  .article-body-wrap { grid-template-columns: 1fr; gap: 40px; }
  .article-sidebar { position: static; }
  .article-hero h1 { font-size: 2rem; }
}
@media (max-width: 640px) {
  .article-hero { padding: 36px 0 0; }
  .article-body-wrap { padding: 36px 18px 60px; }
}

.sidebar-card .check-list { font-size: .85rem; }
