/* John Bramley v46 — authoritative desktop shell cleanup */
:root{
  --jb46-rail:1320px;
  --jb46-edge:64px;
  --jb46-nav-h:76px;
  --jb46-nav-gap:14px;
  --jb46-shell:#edf3f7;
}

@media (min-width:981px){
  html,
  body,
  body.jb-fieldguide{
    margin:0!important;
    padding:0!important;
    background:var(--jb46-shell)!important;
  }

  /* Kill the full-width blue slab / stray white strip behind the actual nav rail. */
  body.jb-fieldguide header.site-nav.jb31-site-nav,
  body.jb-fieldguide header.site-nav,
  body.jb-fieldguide header.site-header,
  body.jb-fieldguide .site-nav.jb31-site-nav,
  body.jb-fieldguide .jb31-site-nav{
    width:100%!important;
    max-width:none!important;
    min-height:calc(var(--jb46-nav-h) + (var(--jb46-nav-gap) * 2))!important;
    height:calc(var(--jb46-nav-h) + (var(--jb46-nav-gap) * 2))!important;
    margin:0!important;
    padding:var(--jb46-nav-gap) 0!important;
    background:transparent!important;
    background-color:transparent!important;
    background-image:none!important;
    border:0!important;
    border-top:0!important;
    border-bottom:0!important;
    box-shadow:none!important;
    outline:0!important;
  }

  /* The only visible header surface is this rail. */
  body.jb-fieldguide .jb31-nav-inner{
    width:min(var(--jb46-rail),calc(100% - var(--jb46-edge)))!important;
    max-width:none!important;
    height:var(--jb46-nav-h)!important;
    min-height:var(--jb46-nav-h)!important;
    margin:0 auto!important;
    padding:0 28px!important;
    box-sizing:border-box!important;
    background:linear-gradient(90deg,#06192b 0%,#0a2947 58%,#123a5f 100%)!important;
    border:1px solid rgba(143,197,245,.18)!important;
    box-shadow:none!important;
  }

  /* Every page uses the same desktop rail. */
  body.jb-fieldguide .section-inner,
  body.jb-fieldguide .site-container,
  body.jb-fieldguide footer .section-inner,
  body.page-contact .contact-stage-inner{
    width:min(var(--jb46-rail),calc(100% - var(--jb46-edge)))!important;
    max-width:none!important;
    margin-left:auto!important;
    margin-right:auto!important;
    box-sizing:border-box!important;
  }

  /* HOME: image is the backdrop from the top edge; nav floats over it. */
  body.page-home{
    background:#06192b!important;
  }
  body.page-home header.site-nav.jb31-site-nav,
  body.page-home .jb31-site-nav{
    position:absolute!important;
    top:0!important;
    left:0!important;
    right:0!important;
    z-index:5000!important;
    pointer-events:auto!important;
  }
  body.page-home main,
  body.page-home main.page,
  body.page-home .hero-shell,
  body.page-home .hero-v31,
  body.page-home .hero-art{
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background-color:#06192b!important;
  }
  body.page-home .hero-shell,
  body.page-home .hero-v31,
  body.page-home .hero-art{
    height:100svh!important;
    min-height:100svh!important;
    max-height:100svh!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
  }
  body.page-home .hero-v31-inner{
    width:min(var(--jb46-rail),calc(100% - var(--jb46-edge)))!important;
    height:100svh!important;
    min-height:0!important;
    max-height:100svh!important;
    margin:0 auto!important;
    padding-top:calc(var(--jb46-nav-h) + (var(--jb46-nav-gap) * 2) + 18px)!important;
    padding-bottom:0!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }

  /* CONTACT: exact same left/right coordinates as the nav rail. */
  body.page-contact .contact-stage{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:0 0 18px!important;
    box-sizing:border-box!important;
    background:var(--jb46-shell)!important;
  }
  body.page-contact .contact-stage-inner{
    width:min(var(--jb46-rail),calc(100% - var(--jb46-edge)))!important;
    max-width:none!important;
    margin:0 auto!important;
    box-shadow:none!important;
  }

  /* Do not allow page-level wrappers to recreate a white band above first content. */
  body.jb-fieldguide > main,
  body.jb-fieldguide main.page{
    border-top:0!important;
    box-shadow:none!important;
  }
}

/* Locked mobile shell remains authoritative. */
@media (max-width:980px){
  body.jb-fieldguide .jb31-site-nav,
  body.jb-fieldguide .jb31-nav-inner,
  body.jb-fieldguide .contact-stage-inner{
    box-sizing:border-box!important;
  }
}
