/* V216: balanced header geometry and vertically centered desktop navigation.
   Kept separate from CMS typography and mobile drawer positioning. */
@media (min-width: 901px) {
  html body header.top .bar,
  html body header.top.sc .bar,
  html body header.top.scrolled-deep .bar {
    display:grid!important;
    grid-template-columns: minmax(175px, 1fr) minmax(0, auto) minmax(175px, 1fr)!important;
    align-items:center!important;
    column-gap:clamp(16px,2vw,36px)!important;
    min-height:96px!important;
    padding-top:0!important;
    padding-bottom:0!important;
  }
  html body header.top .bar > a.logo {
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    align-self:center!important;
    grid-column:1!important;
    margin:0!important;
    line-height:0!important;
  }
  html body header.top .bar > a.logo img {
    display:block!important;
    width:185px!important;
    height:auto!important;
    max-height:70px!important;
    object-fit:contain!important;
  }
  html body header.top .bar > nav#nav {
    grid-column:2!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    align-self:center!important;
    min-width:0!important;
    height:auto!important;
    margin:0!important;
    padding:0!important;
    position:static!important;
  }
  html body header.top .bar > nav#nav > ul {
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:center!important;
    flex-wrap:nowrap!important;
    gap:clamp(13px,1.6vw,30px)!important;
    height:auto!important;
    min-height:0!important;
    padding:0!important;
    margin:0!important;
  }
  html body header.top .bar > nav#nav > ul > li {
    display:flex!important;
    align-items:center!important;
    align-self:center!important;
    height:auto!important;
    padding:0!important;
    margin:0!important;
  }
  html body header.top .bar > nav#nav > ul > li > a,
  html body header.top.sc .bar > nav#nav > ul > li > a,
  html body header.top.scrolled-deep .bar > nav#nav > ul > li > a {
    position:relative!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    align-self:center!important;
    min-height:44px!important;
    height:auto!important;
    margin:0!important;
    padding:6px 0!important;
    font-family:var(--helprite-font-body, sans-serif)!important;
    font-size:clamp(13px,.82vw,15.5px)!important;
    line-height:1.35!important;
    font-weight:650!important;
    white-space:nowrap!important;
    text-align:center!important;
    background:transparent!important;
  }
  html body header.top .bar > nav#nav > ul > li > a::after {
    bottom:1px!important;
  }
  html body header.top .bar > a.portal {
    grid-column:3!important;
    justify-self:end!important;
    align-self:center!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    box-sizing:border-box!important;
    min-height:50px!important;
    height:auto!important;
    margin:0!important;
    padding:12px 22px!important;
    border-radius:6px!important;
    font-size:14px!important;
    font-weight:700!important;
    line-height:1.3!important;
    white-space:nowrap!important;
  }
}
/* At narrower desktop widths prioritise a single, unwrapped menu row. */
@media (min-width: 901px) and (max-width: 1250px) {
  html body header.top .bar,
  html body header.top.sc .bar,
  html body header.top.scrolled-deep .bar {
    grid-template-columns:minmax(145px,.8fr) minmax(0,auto) minmax(145px,.8fr)!important;
    min-height:88px!important;
    column-gap:12px!important;
  }
  html body header.top .bar > a.logo img {width:155px!important;}
  html body header.top .bar > nav#nav > ul {gap:clamp(8px,1vw,15px)!important;}
  html body header.top .bar > nav#nav > ul > li > a {font-size:12.5px!important;}
  html body header.top .bar > a.portal {
    padding:10px 13px!important;
    min-height:44px!important;
    font-size:12.5px!important;
  }
}
@media (max-width: 900px) {
  /* Do not force desktop grid rules onto the existing drawer / toggle. */
  html body header.top .bar,
  html body header.top.sc .bar,
  html body header.top.scrolled-deep .bar {
    min-height:82px!important;
    align-items:center!important;
  }
  html body header.top .bar > a.logo img {
    width:165px!important;
    height:auto!important;
    max-height:60px!important;
    object-fit:contain!important;
  }
}
