/* =========================================================================
   ASHLAR LENDING — Core Stylesheet
   Brand: Navy #1B3A5C / Gold #B8960C, Arial
   Standard: WCAG 2.1 AA, tested against JAWS on Windows
   All colors below verified for AA contrast where used for text.
   ========================================================================= */

/* ---- Design tokens ---------------------------------------------------- */
:root {
  --navy:        #1B3A5C;   /* primary brand */
  --navy-deep:   #12283f;   /* darker navy for depth */
  --navy-line:   #2c4d72;   /* borders on navy */
  --gold:        #B8960C;   /* brand accent — buttons, borders, large elements */
  --gold-text:   #D4AF37;   /* brighter gold for SMALL text on navy (5.5:1 AA) */
  --gold-dark:   #7d6608;   /* gold for small text on WHITE (5.56:1 AA) */
  --ink:         #1a1f26;   /* body text on light (near-black) */
  --ink-soft:    #3d4550;   /* secondary text, still AA on white */
  --paper:       #ffffff;   /* main background */
  --mist:        #f4f6f9;   /* section tint */
  --mist-line:   #d9e0e9;   /* hairline dividers */
  --focus:       #B8960C;   /* focus ring color */

  --wrap: 1140px;
  --gap:  clamp(1rem, 2.5vw, 2rem);
  --radius: 6px;

  --font: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

/* ---- Reset-ish -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;   /* 17px base for readability */
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

/* ---- Skip link (first focusable element on every page) ---------------- */
.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  z-index: 1000;
  background: var(--navy);
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius);
  font-weight: bold;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0.5rem; }

/* ---- Visible focus indicator everywhere ------------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}
/* Fallback for browsers without :focus-visible */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* ---- Layout helpers --------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gap); }
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section--mist { background: var(--mist); }
.section--navy { background: var(--navy); color: #eef2f7; }
.stack > * + * { margin-top: 1rem; }

/* ---- Visually-hidden (screen-reader only) ----------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---- Typography ------------------------------------------------------- */
h1, h2, h3, h4 { line-height: 1.2; color: var(--navy); font-weight: bold; }
.section--navy h1, .section--navy h2, .section--navy h3 { color: #fff; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); letter-spacing: -0.01em; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.15rem); margin: 0 0 0.6em; }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); margin: 0 0 0.4em; }
p  { margin: 0 0 1rem; max-width: 68ch; }
a  { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--gold-dark); }
.section--navy a { color: #f0d97a; }

/* Eyebrow label */
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: bold;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin: 0 0 0.75rem;
}
.section--navy .eyebrow { color: var(--gold-text); }
.hero .eyebrow { color: var(--gold-text); }

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: bold;
  line-height: 1.2;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn--primary { background: var(--gold); color: #241d00; border-color: var(--gold); }
.btn--primary:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--ghost:hover { background: var(--navy); color: #fff; }
.section--navy .btn--ghost { color: #fff; border-color: #fff; }
.section--navy .btn--ghost:hover { background: #fff; color: var(--navy); }

/* =========================================================================
   HEADER + NAVIGATION
   ========================================================================= */
.site-header {
  background: var(--navy);
  color: #fff;
  border-bottom: 3px solid var(--gold);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: #fff;
  line-height: 1.1;
}
.brand:hover { color: #fff; }
.brand__name { font-size: 1.35rem; font-weight: bold; letter-spacing: 0.02em; }
.brand__tag  { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-text); }

/* Primary nav */
.primary-nav ul { list-style: none; display: flex; gap: 0.35rem; margin: 0; padding: 0; align-items: center; flex-wrap: wrap; }
.primary-nav a,
.primary-nav .menu-btn {
  display: inline-block;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius);
  background: transparent;
  border: none;
  font-family: var(--font);
  cursor: pointer;
}
.primary-nav a:hover,
.primary-nav .menu-btn:hover { background: var(--navy-line); color: #fff; }
.primary-nav a[aria-current="page"] { color: var(--gold-text); text-decoration: underline; text-underline-offset: 4px; }

/* Dropdown */
.has-menu { position: relative; }
.menu-btn { display: inline-flex; align-items: center; gap: 0.4rem; }
.menu-btn::after { content: "\25BE"; font-size: 0.7em; }
.menu-btn[aria-expanded="true"]::after { content: "\25B4"; }
.menu-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 260px;
  background: #fff;
  border: 1px solid var(--mist-line);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(18,40,63,0.18);
  padding: 0.5rem;
  z-index: 200;
}
.menu-panel[hidden] { display: none; }
.menu-panel ul { display: block; }
.menu-panel li { width: 100%; }
.menu-panel a {
  display: block;
  width: 100%;
  color: var(--navy);
  padding: 0.6rem 0.8rem;
  font-size: 1rem;
}
.menu-panel a:hover { background: var(--mist); color: var(--navy); }
.menu-panel .featured a { color: var(--gold-dark); }
.menu-panel .featured a::before { content: "\2605\00a0"; }  /* star */
.menu-panel .menu-divider { border-top: 1px solid var(--mist-line); margin: 0.4rem 0.2rem; }

/* =========================================================================
   HERO
   ========================================================================= */
.hero {
  background:
    linear-gradient(180deg, rgba(18,40,63,0.0) 0%, rgba(18,40,63,0.0) 100%),
    var(--navy);
  color: #eef2f7;
  position: relative;
  overflow: hidden;
}
.hero::after {
  /* subtle keystone/arch motif — the "ashlar" (dressed stone) reference.
     Decorative only; not announced to screen readers. */
  content: "";
  position: absolute;
  right: -120px;
  top: -80px;
  width: 420px; height: 420px;
  background: radial-gradient(circle at center, rgba(184,150,12,0.16), rgba(184,150,12,0) 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; padding-block: clamp(3rem, 8vw, 6rem); }
.hero h1 { color: #fff; max-width: 18ch; }
.hero__lead { font-size: clamp(1.1rem, 2.2vw, 1.4rem); color: #cfd9e6; max-width: 54ch; }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.75rem; }

/* =========================================================================
   CARDS / GRIDS
   ========================================================================= */
.grid { display: grid; gap: 1.25rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card {
  background: #fff;
  border: 1px solid var(--mist-line);
  border-radius: var(--radius);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
}
.card h3 { margin-top: 0; }
.card--link { transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.card--link:hover { border-color: var(--gold); box-shadow: 0 8px 22px rgba(18,40,63,0.10); }
.card__more { margin-top: auto; font-weight: bold; }
.card a { text-decoration: none; }
.card a:hover { text-decoration: underline; }

/* Category list card with gold rule */
.cat-card { border-left: 4px solid var(--gold); }

/* =========================================================================
   SCENARIO FORM
   ========================================================================= */
.form-wrap {
  background: #fff;
  border: 1px solid var(--mist-line);
  border-top: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  max-width: 720px;
}
.field { margin-bottom: 1.25rem; }
.field > label,
fieldset > legend {
  display: block;
  font-weight: bold;
  color: var(--navy);
  margin-bottom: 0.35rem;
}
.field .hint { font-size: 0.9rem; color: var(--ink-soft); margin: 0.15rem 0 0.4rem; }
.req { color: #a12b1e; }  /* required marker; also stated in label text */

input[type="text"],
input[type="tel"],
input[type="email"],
select,
textarea {
  width: 100%;
  font-family: var(--font);
  font-size: 1.0625rem;
  color: var(--ink);
  padding: 0.7rem 0.8rem;
  border: 2px solid #9aa7b6;
  border-radius: var(--radius);
  background: #fff;
}
textarea { min-height: 130px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--navy); }

fieldset {
  border: 1px solid var(--mist-line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 0.4rem;
  margin: 0 0 1.25rem;
}
.radio-row { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.radio-item { display: flex; align-items: center; gap: 0.45rem; margin-bottom: 0.8rem; }
.radio-item input { width: auto; }
.radio-item label { font-weight: normal; color: var(--ink); margin: 0; }

/* Conditional block (LLC question) */
.conditional[hidden] { display: none; }
.conditional {
  border-left: 4px solid var(--gold);
  padding-left: 1rem;
  margin-bottom: 1.25rem;
}

/* Live region for announcements (kept in DOM, visually hidden) */
.sr-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer {
  background: var(--navy-deep);
  color: #cdd7e3;
  padding-block: 2.5rem;
  font-size: 0.95rem;
  border-top: 3px solid var(--gold);
}
.site-footer a { color: #f0d97a; }
.footer-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.site-footer h2 { color: #fff; font-size: 1.05rem; margin-bottom: 0.6rem; }
.site-footer address { font-style: normal; line-height: 1.7; }
.compliance {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--navy-line);
  font-size: 0.85rem;
  color: #aebccd;
}
.compliance p { max-width: none; }
.eho { font-weight: bold; color: #fff; }

/* =========================================================================
   BREADCRUMB
   ========================================================================= */
.breadcrumb { background: var(--mist); border-bottom: 1px solid var(--mist-line); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0.75rem 0; font-size: 0.9rem; }
.breadcrumb li::after { content: "\203A"; margin-left: 0.4rem; color: var(--ink-soft); }
.breadcrumb li:last-child::after { content: ""; }
.breadcrumb a { color: var(--navy); }

/* ---- Utility ---------------------------------------------------------- */
.lead { font-size: 1.15rem; color: var(--ink-soft); }
.center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.pill {
  display: inline-block; font-size: 0.78rem; font-weight: bold;
  background: var(--mist); color: var(--navy);
  border: 1px solid var(--mist-line);
  padding: 0.2rem 0.6rem; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.06em;
}
.pill--ca { background: #fff7e0; border-color: #e6d28a; color: #6b5600; }

/* =========================================================================
   MARKET RATE FEED
   ========================================================================= */
.rate-feed {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  margin: 2rem 0;
}
.rate-feed h2 { color: #fff; margin-top: 0; }
.rate-feed__intro { color: #d7e0ea; max-width: 60ch; }
.rate-feed__list {
  list-style: none;
  margin: 1.5rem 0 1rem;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.rate-item {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.rate-item__label { font-size: 0.95rem; color: #d7e0ea; }
.rate-item__value { font-size: 2rem; font-weight: bold; color: var(--gold); line-height: 1.1; }
.rate-feed__updated { font-size: 0.9rem; color: #b9c6d4; margin: 0.5rem 0 0.75rem; }
.rate-feed__disclosure { font-size: 0.85rem; color: #b9c6d4; margin: 0.75rem 0 0; max-width: 70ch; }

/* Apply link in the primary nav — gold pill to stand out */
.primary-nav .nav-apply {
  background: var(--gold);
  color: #1a1a1a;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius);
  font-weight: bold;
}
.primary-nav .nav-apply:hover,
.primary-nav .nav-apply:focus { background: #a5850a; color: #fff; }

/* =========================================================================
   IMAGERY
   Hotlinked from Unsplash CDN (free, commercial use, no attribution required).
   ========================================================================= */
/* Hero with image background */
.hero--image {
  position: relative;
  background: var(--navy);
  overflow: hidden;
}
.hero--image .hero__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.28;
}
.hero--image .wrap { position: relative; z-index: 1; }

/* Standalone feature image (in-flow, rounded) */
.feature-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--mist-line);
}
.feature-img--tall { max-height: 520px; }

/* Section that pairs text with an image */
.img-band { margin: 2rem 0; }
.img-band figure { margin: 0; }
.img-band figcaption {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 0.4rem;
}

/* =========================================================================
   RESOURCES / ARTICLES
   ========================================================================= */
.article { max-width: 760px; }
.article .lead { font-size: 1.15rem; }
.article h2 { margin-top: 2rem; }
.article h3 { margin-top: 1.4rem; }
.article p, .article li { line-height: 1.7; }
.article ul, .article ol { padding-left: 1.3rem; }
.article li { margin-bottom: 0.5rem; }
.article-meta { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 1.5rem; }
.article-disclosure {
  background: var(--mist); border: 1px solid var(--mist-line);
  border-left: 4px solid var(--gold); border-radius: var(--radius);
  padding: 1rem 1.15rem; margin: 2rem 0; font-size: 0.9rem; color: var(--ink-soft);
}
.article-cta {
  background: var(--navy); color: #fff; border-radius: var(--radius);
  padding: clamp(1.4rem,4vw,2rem); margin: 2.5rem 0 1rem;
}
.article-cta h2 { color: #fff; margin-top: 0; }
.article-cta p { color: #d7e0ea; }
.related { background: var(--mist); border-radius: var(--radius); padding: 1.25rem 1.4rem; margin-top: 2rem; }
.related h2 { margin-top: 0; font-size: 1.15rem; }
.related ul { list-style: none; padding: 0; margin: 0; }
.related li { margin-bottom: 0.5rem; }
/* Resources index cards */
.res-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 1.5rem; }
.res-card { background:#fff; border:1px solid var(--mist-line); border-top:4px solid var(--gold); border-radius: var(--radius); padding: 1.4rem; }
.res-card h3 { margin-top: 0; font-size: 1.15rem; }
.res-card p { color: var(--ink-soft); }
.res-cat { margin-top: 2.5rem; padding-bottom: 0.4rem; border-bottom: 2px solid var(--gold); }

/* Article header image (cornerstone articles only) */
.article-hero-img {
  display: block; width: 100%; height: auto;
  max-height: 340px; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--mist-line);
  margin: 0 0 1.75rem;
}

/* =========================================================================
   BRAND LOGO
   ========================================================================= */
.brand { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0.15rem; }
.brand__logo { height: 52px; width: auto; display: block; }
.brand__tag { font-size: 0.7rem; letter-spacing: 0.04em; color: var(--gold); text-transform: uppercase; }
@media (max-width: 640px){ .brand__logo { height: 40px; } .brand__tag { font-size: 0.6rem; } }

/* Footer logo */
.footer-logo { height: 130px; width: auto; display: block; margin-bottom: 1rem; }

/* =========================================================================
   CALENDAR EMBED
   ========================================================================= */
.calendar-embed {
  margin: 1.5rem 0;
  border: 1px solid var(--mist-line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.calendar-embed iframe {
  width: 100%;
  min-height: 700px;
  border: 0;
  display: block;
}
.calendar-fallback { margin-top: 0.75rem; font-size: 0.95rem; }

/* Schedule nav link — outlined to complement the gold Apply pill */
.primary-nav .nav-schedule {
  border: 2px solid var(--gold);
  color: var(--navy);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius);
  font-weight: bold;
}
.primary-nav .nav-schedule:hover,
.primary-nav .nav-schedule:focus { background: var(--gold); color: #1a1a1a; }

/* =========================================================================
   HEADER REDESIGN — white header so the real logo (navy text + teal mark) shows
   ========================================================================= */
.site-header {
  background: #ffffff;
  color: var(--navy);
  border-bottom: 3px solid var(--gold);
}
.site-header .wrap { min-height: 84px; }
.brand { flex-direction: row; align-items: center; gap: 0; color: var(--navy); }
.brand:hover { color: var(--navy); }
.brand__logo { height: 60px; width: auto; display: block; }
.brand__name, .brand__tag { display: none; } /* logo image replaces the text brand */

/* Nav links become navy on the white header */
.primary-nav a,
.primary-nav .menu-btn { color: var(--navy); }
.primary-nav a:hover,
.primary-nav .menu-btn:hover { background: var(--mist); color: var(--navy); }
.primary-nav a[aria-current="page"] { color: var(--navy); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 5px; }

/* Dropdown panel already light; ensure its links stay readable */
.menu-panel { background: #fff; border: 1px solid var(--mist-line); }

/* Apply pill stays gold (good contrast on white) */
.primary-nav .nav-apply { background: var(--gold); color: #1a1a1a; }
.primary-nav .nav-apply:hover,
.primary-nav .nav-apply:focus { background: #a5850a; color: #fff; }

/* Schedule nav link — navy outline style to sit beside Apply */
.primary-nav .nav-schedule {
  border: 2px solid var(--navy);
  color: var(--navy);
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius);
  font-weight: bold;
}
.primary-nav .nav-schedule:hover,
.primary-nav .nav-schedule:focus { background: var(--navy); color: #fff; }

@media (max-width: 640px){ .brand__logo { height: 46px; } }

/* Footer logo */
.footer-logo { height: 92px; width: auto; display: block; margin-bottom: 1rem; background:#fff; padding: 8px 10px; border-radius: var(--radius); }

/* Calendar embed */
.calendar-embed {
  margin: 1.5rem 0;
  border: 1px solid var(--mist-line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.calendar-embed iframe { width: 100%; min-height: 700px; border: 0; display: block; }

/* Footer legal links */
.footer-legal { margin-bottom: 1rem; }
.footer-legal ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin: 0; padding: 0; }
.footer-legal a { color: #d7e0ea; font-size: 0.9rem; }
.footer-legal a:hover, .footer-legal a:focus { color: #fff; }

/* =========================================================================
   MOBILE NAVIGATION — hamburger toggle
   Desktop/tablet (>860px) unchanged: hamburger hidden, nav shows inline.
   Mobile (<=860px): nav collapses behind an accessible hamburger button.
   ========================================================================= */

/* The hamburger button is hidden by default (desktop/tablet) */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: transparent;      /* transparent — only the icon shows */
  color: var(--navy);
  border: 0;
  padding: 0;
  cursor: pointer;
  width: 48px;                  /* comfortable 48px touch target */
  height: 48px;
  border-radius: var(--radius);
}
.nav-toggle:hover .nav-toggle__bars,
.nav-toggle:hover .nav-toggle__bars::before,
.nav-toggle:hover .nav-toggle__bars::after { background: var(--gold); }
.nav-toggle:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
/* Hide the visible "Menu" text but keep it available to screen readers */
.nav-toggle__label {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* The three-bar icon, in navy, on a transparent button */
.nav-toggle__bars { display: inline-block; width: 24px; height: 3px; background: var(--navy); position: relative; border-radius: 2px; }
.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ""; position: absolute; left: 0; width: 24px; height: 3px; background: var(--navy); border-radius: 2px; }
.nav-toggle__bars::before { top: -8px; }
.nav-toggle__bars::after { top: 8px; }

@media (max-width: 860px) {
  /* Header stacks: brand row, then the collapsible nav */
  .site-header .wrap {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }
  /* Show the hamburger, place it opposite the logo */
  .nav-toggle { display: inline-flex; margin-left: auto; }

  /* The nav becomes a full-width vertical panel that collapses */
  .primary-nav {
    flex-basis: 100%;
    width: 100%;
  }
  .primary-nav[data-collapsed="true"] { display: none; }
  .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    flex-wrap: nowrap;
    padding-top: 0.5rem;
  }
  .primary-nav li { width: 100%; }
  /* Full-width, comfortably tappable rows */
  .primary-nav a,
  .primary-nav .menu-btn {
    display: block;
    width: 100%;
    padding: 0.75rem 0.6rem;
    min-height: 44px;
    font-size: 1.05rem;
    border-radius: var(--radius);
  }
  /* Apply / Schedule buttons go full-width too, keep their color */
  .primary-nav .nav-apply,
  .primary-nav .nav-schedule { text-align: center; margin-top: 0.25rem; }

  /* The Loan Programs dropdown panel: static (inline) on mobile, indented */
  .menu-panel {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 0.6rem;
    background: var(--mist);
  }
  .menu-panel a { padding-left: 1.4rem; }
}

/* Slightly smaller phones: a touch more breathing room already handled above */

/* =========================================================================
   MOBILE READABILITY REFINEMENTS (<=640px)
   Small tweaks that improve phone reading without touching desktop/tablet.
   ========================================================================= */
@media (max-width: 640px) {
  /* Prevent any accidental horizontal scrolling */
  html, body { overflow-x: hidden; }

  /* A touch more line height and comfortable body size on phones */
  body { font-size: 1.075rem; line-height: 1.65; }

  /* Keep content from hugging screen edges */
  .wrap { padding-inline: 1.1rem; }

  /* Tables, images, and embeds never overflow the viewport */
  img, iframe, table { max-width: 100%; }

  /* Calculator and card grids stack cleanly on phones */
  .calc-grid, .res-grid, .rate-feed__list { grid-template-columns: 1fr; }

  /* Slightly tighter hero padding so the fold shows content sooner */
  .hero .wrap, .hero--image .wrap { padding-block: clamp(2rem, 8vw, 3.5rem); }

  /* Ensure tap targets in body links/buttons are comfortable */
  .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
}
