/* OilsPortal v0.38.3 · Public Header Stability Hotfix
   One viewport anchor for every public route. Page-local shells no longer move the header. */

:root[data-site-theme]{
  --public-shell-width:1180px;
  --public-shell-gutter:36px;
  --public-header-min-h:94px;
  --public-header-gap:32px;
}

/*
  Older routes were born in different releases and carry different top paddings:
  .shell 28px, .s 28px, .account-shell 26px, .lead-shell 28px, .wrap 0px.
  Normalize only the top-level public shell. Do not touch inner content containers.
*/
body > .wrap,
body > .shell,
body > .s,
body > .account-shell,
body > .lead-shell,
body > .op-shell,
body > main.wrap{
  width:min(var(--public-shell-width),calc(100% - var(--public-shell-gutter)))!important;
  margin-left:auto!important;
  margin-right:auto!important;
  padding-top:0!important;
}

/* Same header box everywhere. These selectors deliberately outrank route-local header rules. */
body > .wrap > header,
body > .shell > header,
body > .s > header,
body > .account-shell > header,
body > .lead-shell > header,
body > .op-shell > header,
body > main.wrap > header{
  box-sizing:border-box!important;
  width:100%!important;
  min-height:var(--public-header-min-h)!important;
  margin:0!important;
  padding:20px 0!important;
  display:grid!important;
  grid-template-columns:minmax(300px,max-content) minmax(0,1fr)!important;
  align-items:center!important;
  column-gap:var(--public-header-gap)!important;
  row-gap:10px!important;
}

body > .wrap > header [data-site-brand],
body > .wrap > header [data-site-name],
body > .shell > header [data-site-brand],
body > .shell > header [data-site-name],
body > .s > header [data-site-brand],
body > .s > header [data-site-name],
body > .account-shell > header [data-site-brand],
body > .account-shell > header [data-site-name],
body > .lead-shell > header [data-site-brand],
body > .lead-shell > header [data-site-name],
body > .op-shell > header [data-site-brand],
body > .op-shell > header [data-site-name]{
  margin:0!important;
  align-self:center!important;
  white-space:nowrap!important;
  line-height:1.12!important;
}

/* Navigation receives the same right edge, baseline and wrapping policy on every route. */
body [data-site-header-nav]{
  width:auto!important;
  min-width:0!important;
  margin:0!important;
  justify-self:end!important;
  justify-content:flex-end!important;
  align-self:center!important;
  flex-wrap:nowrap!important;
}

/* Main content starts from a predictable place too. No inherited header margin from account pages. */
body > .account-shell > header,
body > .lead-shell > header{
  margin-bottom:0!important;
}

/* 8 menu items + brand no longer fight for the last pixels. Switch deliberately at one breakpoint. */
@media(max-width:1080px){
  :root[data-site-theme]{
    --public-header-min-h:132px;
  }
  body > .wrap > header,
  body > .shell > header,
  body > .s > header,
  body > .account-shell > header,
  body > .lead-shell > header,
  body > .op-shell > header,
  body > main.wrap > header{
    grid-template-columns:1fr!important;
    align-content:center!important;
    padding:18px 0!important;
  }
  body [data-site-header-nav]{
    justify-self:start!important;
    justify-content:flex-start!important;
    flex-wrap:wrap!important;
    width:100%!important;
  }
}

@media(max-width:720px){
  :root[data-site-theme]{
    --public-shell-gutter:24px;
    --public-header-min-h:0px;
  }
  body > .wrap > header,
  body > .shell > header,
  body > .s > header,
  body > .account-shell > header,
  body > .lead-shell > header,
  body > .op-shell > header,
  body > main.wrap > header{
    padding:16px 0 18px!important;
    row-gap:12px!important;
  }
  body [data-site-header-nav]{
    gap:7px!important;
  }
}
