/* John Bramley v23 — one site grid, one first-screen rule */
:root{
  --jb23-rail:1320px;
  --jb23-edge:64px;
  --jb23-nav:84px;
  --jb23-mobile-nav:74px;
  --jb23-navy:#06192b;
  --jb23-navy-2:#0a2947;
  --jb23-blue:#78b9f6;
  --jb23-ink:#10283f;
  --jb23-copy:#4f6274;
  --jb23-line:#d8e2ea;
  --jb23-soft:#f5f8fb;
}

/* ---------- UNIVERSAL GEOMETRY ---------- */
html,body{margin:0!important;max-width:none!important;overflow-x:clip!important}
body.jb-fieldguide{background:#fff!important}

body.jb-fieldguide .jb31-site-nav,
body.jb-fieldguide .site-nav{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  border-radius:0!important;
  left:0!important;
  right:0!important;
}

body.jb-fieldguide .jb31-nav-inner,
body.jb-fieldguide .site-nav-inner,
body.jb-fieldguide .nav-inner,
body.jb-fieldguide .section-inner,
body.jb-fieldguide .site-container,
body.jb-fieldguide footer .section-inner,
body.jb-fieldguide .cfg-inspired-reviews .section-inner{
  width:min(var(--jb23-rail),calc(100% - var(--jb23-edge)))!important;
  max-width:none!important;
  margin-left:auto!important;
  margin-right:auto!important;
  box-sizing:border-box!important;
}

/* Kill inherited floating-card geometry on primary first sections. */
body.jb-fieldguide main>.hero,
body.jb-fieldguide main>.intro,
body.jb-fieldguide main>.page-hero,
body.jb-fieldguide .realtor-hero-v2,
body.jb-fieldguide .cr-hero,
body.jb-fieldguide .hero-shell,
body.jb-fieldguide .about-hero-v22{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  box-sizing:border-box!important;
}

/* Desktop first screen = nav + hero, no accidental next-section sliver. */
@media (min-width:981px){
  body.page-home .hero-shell,
  body.page-home .hero-art,
  body.page-home .hero-layout,
  body.page-about .about-hero-v22,
  body.page-about .about-hero-v22-inner,
  body.page-reviews .cr-hero,
  body.page-realtors .realtor-hero-v2,
  body.page-realtors .realtor-hero-grid,
  body.jb-financing-page main>.hero,
  body.jb-financing-page main>.hero>.hero-inner,
  body.page-resources main>.intro,
  body.page-preapproval main>.intro,
  body.page-checklist main>.intro,
  body.page-mtgcalc main>.intro,
  body.page-calculators main>.intro,
  body.page-legal main>.page-hero{
    min-height:calc(100svh - var(--jb23-nav))!important;
    box-sizing:border-box!important;
  }
}

/* ---------- NAV ---------- */
body.jb-fieldguide .jb31-site-nav,
body.jb-fieldguide .site-nav{
  min-height:var(--jb23-nav)!important;
  height:var(--jb23-nav)!important;
  background:linear-gradient(90deg,#06192b 0%,#0a2947 58%,#123a5f 100%)!important;
  border-bottom:1px solid rgba(120,185,246,.18)!important;
}
body.jb-fieldguide .jb31-nav-inner,
body.jb-fieldguide .site-nav-inner,
body.jb-fieldguide .nav-inner{
  height:var(--jb23-nav)!important;
  min-height:var(--jb23-nav)!important;
}
body.jb-fieldguide .jb31-main-nav,
body.jb-fieldguide .main-nav,
body.jb-fieldguide .site-nav-links{gap:26px!important}

/* ---------- TYPOGRAPHIC LIMITS ---------- */
body.jb-fieldguide h1,
body.jb-fieldguide .hero h1,
body.jb-fieldguide .intro h1,
body.jb-fieldguide .page-hero h1{
  text-wrap:balance!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
}
body.jb-fieldguide main h2{
  text-wrap:balance!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
}

/* ---------- HOME ---------- */
@media (min-width:981px){
  body.page-home .hero-layout{padding:0!important;display:flex!important;align-items:center!important}
  body.page-home .hero-copy-plain{max-width:690px!important;width:min(690px,56vw)!important}
  body.page-home .hero-copy-plain h1{font-size:clamp(44px,4.3vw,62px)!important;max-width:13ch!important}
}

/* ---------- ABOUT ---------- */
@media (min-width:981px){
  body.page-about .about-hero-v22-main{
    padding:34px 0 18px!important;
    grid-template-columns:clamp(180px,17vw,250px) minmax(500px,700px)!important;
    gap:clamp(34px,4vw,60px)!important;
  }
  body.page-about .about-hero-v22 h1{font-size:clamp(43px,3.8vw,60px)!important}
  body.page-about .about-hero-v22-lede{font-size:17px!important;line-height:1.52!important}
  body.page-about .about-hero-v22-stats{padding:16px 0 18px!important}
}

/* ---------- REVIEWS ---------- */
body.page-reviews .cr-hero{display:flex!important;align-items:stretch!important}
body.page-reviews .cr-hero-grid{
  width:min(var(--jb23-rail),calc(100% - var(--jb23-edge)))!important;
  max-width:none!important;
  margin:0 auto!important;
  box-sizing:border-box!important;
}
@media (min-width:981px){
  body.page-reviews .cr-hero-grid{
    min-height:calc(100svh - var(--jb23-nav))!important;
    grid-template-columns:minmax(0,1fr) 260px!important;
    gap:64px!important;
    align-items:center!important;
    padding:42px 0 38px!important;
  }
  body.page-reviews .cr-hero-copy{max-width:760px!important}
  body.page-reviews .cr-hero h1{
    max-width:12.5ch!important;
    margin-bottom:20px!important;
    font-size:clamp(46px,4.5vw,64px)!important;
    line-height:.99!important;
  }
  body.page-reviews .cr-hero-lede{font-size:17px!important;line-height:1.58!important;max-width:46ch!important}
  body.page-reviews .cr-rating{align-self:center!important;padding:0!important}
  body.page-reviews .cr-rating-number{font-size:80px!important}
}
body.page-reviews .cr-reviews-section>.section-inner,
body.page-reviews .cr-close>.section-inner{
  width:min(var(--jb23-rail),calc(100% - var(--jb23-edge)))!important;
}

/* ---------- REALTOR LANDING ---------- */
body.page-realtors .realtor-hero-v2{border:0!important}
@media (min-width:981px){
  body.page-realtors .realtor-hero-grid{
    display:flex!important;
    align-items:center!important;
    padding:44px 0!important;
  }
  body.page-realtors .realtor-hero-copy{
    width:min(670px,58vw)!important;
    max-width:670px!important;
    padding:0!important;
    background:transparent!important;
  }
  body.page-realtors .realtor-hero-copy h1{
    font-size:clamp(44px,4.2vw,60px)!important;
    max-width:13ch!important;
  }
}

/* ---------- FINANCING + DETAIL PAGES ---------- */
body.jb-financing-page main>.hero{display:flex!important;align-items:stretch!important}
@media (min-width:981px){
  body.jb-financing-page main>.hero>.hero-inner{
    width:min(var(--jb23-rail),calc(100% - var(--jb23-edge)))!important;
    margin:0 auto!important;
    padding:48px 0!important;
    display:grid!important;
    grid-template-columns:minmax(0,1.22fr) minmax(280px,.72fr)!important;
    gap:64px!important;
    align-items:center!important;
  }
  body.jb-financing-page .hero h1{
    max-width:15ch!important;
    font-size:clamp(44px,4.2vw,60px)!important;
    line-height:1.01!important;
  }
  body.jb-financing-page .hero p{font-size:17px!important;line-height:1.62!important;max-width:50ch!important}
  body.jb-financing-page .hero-side{
    align-self:center!important;
    padding:28px 28px!important;
    border:1px solid rgba(255,255,255,.18)!important;
    background:rgba(4,24,42,.30)!important;
    backdrop-filter:blur(4px)!important;
  }
}

/* ---------- RESOURCE / TOOL PAGES ---------- */
body.page-resources main>.intro,
body.page-preapproval main>.intro,
body.page-checklist main>.intro,
body.page-mtgcalc main>.intro,
body.page-calculators main>.intro{
  display:flex!important;
  align-items:center!important;
  background:
    radial-gradient(circle at 82% 30%,rgba(120,185,246,.16),transparent 26%),
    linear-gradient(135deg,#f7fafc 0%,#edf5fb 100%)!important;
  border-bottom:1px solid var(--jb23-line)!important;
}
body.page-resources main>.intro>.section-inner,
body.page-preapproval main>.intro>.section-inner,
body.page-checklist main>.intro>.section-inner,
body.page-mtgcalc main>.intro>.section-inner,
body.page-calculators main>.intro>.section-inner{
  padding-top:48px!important;
  padding-bottom:48px!important;
}
@media (min-width:981px){
  body.page-resources main>.intro h1,
  body.page-preapproval main>.intro h1,
  body.page-checklist main>.intro h1,
  body.page-mtgcalc main>.intro h1,
  body.page-calculators main>.intro h1{
    max-width:16ch!important;
    font-size:clamp(44px,4.2vw,60px)!important;
  }
  body.page-resources .intro-copy,
  body.page-preapproval .intro-copy,
  body.page-checklist .intro-copy,
  body.page-mtgcalc .intro-copy,
  body.page-calculators .intro-copy{
    max-width:58ch!important;
    font-size:17px!important;
  }
}

/* ---------- LEGAL / UTILITY ---------- */
body.page-legal main>.page-hero{
  display:flex!important;
  align-items:center!important;
  background:linear-gradient(135deg,#f7fafc,#eef4f9)!important;
}
body.page-legal main>.page-hero>.section-inner{padding-top:48px!important;padding-bottom:48px!important}
body.page-legal main>.page-hero h1{max-width:17ch!important}
body.page-legal main>.page-hero p:not(.eyebrow){max-width:58ch!important;color:var(--jb23-copy)!important;font-size:17px!important}

/* ---------- TABLET / MOBILE ---------- */
@media (max-width:980px){
  :root{--jb23-edge:28px}
  body.jb-fieldguide .jb31-site-nav,
  body.jb-fieldguide .site-nav{height:var(--jb23-mobile-nav)!important;min-height:var(--jb23-mobile-nav)!important}
  body.jb-fieldguide .jb31-nav-inner,
  body.jb-fieldguide .site-nav-inner,
  body.jb-fieldguide .nav-inner{height:var(--jb23-mobile-nav)!important;min-height:var(--jb23-mobile-nav)!important}

  body.page-reviews .cr-hero-grid{width:calc(100% - 28px)!important;padding:54px 0 44px!important}
  body.page-reviews .cr-hero{min-height:auto!important}

  body.page-realtors .realtor-hero-v2,
  body.page-realtors .realtor-hero-grid,
  body.jb-financing-page main>.hero,
  body.jb-financing-page main>.hero>.hero-inner,
  body.page-resources main>.intro,
  body.page-preapproval main>.intro,
  body.page-checklist main>.intro,
  body.page-mtgcalc main>.intro,
  body.page-calculators main>.intro,
  body.page-legal main>.page-hero{
    min-height:auto!important;
  }

  body.page-realtors .realtor-hero-v2{margin:0!important;width:100%!important}
  body.jb-financing-page main>.hero>.hero-inner{padding:48px 0!important}
}

@media (max-width:640px){
  :root{--jb23-edge:24px}
  body.jb-fieldguide .section-inner,
  body.jb-fieldguide .site-container,
  body.jb-fieldguide .jb31-nav-inner,
  body.jb-fieldguide .nav-inner,
  body.jb-fieldguide footer .section-inner,
  body.page-reviews .cr-hero-grid{width:calc(100% - 24px)!important}
  body.page-reviews .cr-hero h1{max-width:none!important}
}
