/* MG Tablet Header 1.1.0. Layout rules are scoped to the main header. */
/* The synchronous head bootstrap sets media attributes before first body paint.
   The deferred companion updates them on resize and after history restoration. */
html[data-mgth-tablet="1"] #sp-header#sp-header#sp-header #sp-logo {
  flex:0 1 var(--mgth-logo-width) !important;
  width:var(--mgth-logo-width) !important;
  max-width:var(--mgth-logo-width) !important;
  min-width:0 !important;
}
html[data-mgth-tablet="1"] #sp-header#sp-header#sp-header #sp-logo :is(svg.mg-executive-svg,img.logo-image,img.logo-image-phone) {
  width:100% !important;
  max-width:100% !important;
  height:auto !important;
  max-height:none !important;
}
html[data-mgth-tablet="1"] #sp-header#sp-header#sp-header .mg-p51-header-row {
  column-gap:24px !important;
}
html[data-mgth-tablet="1"] #sp-header#sp-header#sp-header #sp-menu {
  min-width:0 !important;
}
@media (min-width:992px) {
  html[data-mgth-tablet="1"] #sp-header#sp-header#sp-header {
    padding-inline:24px !important;
  }
  html[data-mgth-tablet="1"] #sp-header#sp-header#sp-header .mg-p51-header-row {
    padding-inline:0 !important;
  }
  html[data-mgth-tablet="1"] #sp-header#sp-header#sp-header #sp-logo {
    min-width:220px !important;
  }
  html[data-mgth-tablet="1"] #sp-header#sp-header#sp-header #sp-logo .logo,
  html[data-mgth-tablet="1"] #sp-header#sp-header#sp-header #sp-logo .logo > a {
    width:100% !important;
    max-width:100% !important;
  }
  html[data-mgth-tablet="1"] #sp-header#sp-header#sp-header #sp-menu {
    flex:0 0 auto !important;
    width:auto !important;
    max-width:none !important;
  }
  html[data-mgth-tablet="1"] #sp-header#sp-header#sp-header .sp-megamenu-parent {
    flex-wrap:nowrap !important;
  }
}
/* In narrow tablet portrait views, keep the site's existing two-row layout. */
@media (min-width:768px) and (max-width:991px) {
  html[data-mgth-tablet="1"] #sp-header#sp-header#sp-header #sp-logo {
    flex:0 0 100% !important;
    width:100% !important;
    max-width:100% !important;
  }
  html[data-mgth-tablet="1"] #sp-header#sp-header#sp-header #sp-logo :is(svg.mg-executive-svg,img.logo-image,img.logo-image-phone) {
    width:var(--mgth-logo-width) !important;
    max-width:100% !important;
  }
}
html[data-mgth-social-active="1"] #sp-header#sp-header#sp-header .sp-megamenu-parent > li.mg980-header-item,
html[data-mgth-social-active="1"] #sp-header#sp-header#sp-header .sp-megamenu-parent > li.mgth-social-item,
html[data-mgth-social-active="1"] #sp-header#sp-header#sp-header a.mg980-header-network {
  display:none !important;
}

/* Empty real elements, not opacity:0, display:none or pseudo-elements. These
   preserve the computed solid color Safari reads while clipping away paint. */
#mgth-safari-sample { display:none; }
@supports (-webkit-touch-callout:none) {
  html[data-mgth="1"] :is(.mg-browser-edge-9822,#mgth-safari-sample) {
    display:block !important;
    position:fixed !important;
    inset:0 0 auto 0 !important;
    width:100% !important;
    height:12px !important;
    min-height:12px !important;
    max-height:none !important;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
    outline:0 !important;
    box-shadow:none !important;
    background-color:var(--mgth-safari-color,#123d60) !important;
    background-image:none !important;
    opacity:1 !important;
    visibility:visible !important;
    z-index:2147483647 !important;
    pointer-events:none !important;
    user-select:none !important;
    -webkit-user-select:none !important;
    transition:none !important;
    animation:none !important;
  }
  html[data-mgth-safari="invisible"] :is(.mg-browser-edge-9822,#mgth-safari-sample) {
    -webkit-background-clip:text !important;
    background-clip:text !important;
  }
  html[data-mgth-safari="visible"] :is(.mg-browser-edge-9822,#mgth-safari-sample) {
    -webkit-background-clip:border-box !important;
    background-clip:border-box !important;
    height:max(12px,env(safe-area-inset-top,0px)) !important;
  }
  html:is([data-mgth-safari="off"],[data-mgth-safari="header-image"],[data-mgth-safari="header-split"]) :is(.mg-browser-edge-9822,#mgth-safari-sample) {
    display:none !important;
  }
  html[data-mgth-safari="invisible"][data-mgth-refresh] :is(.mg-browser-edge-9822,#mgth-safari-sample) {
    height:13px !important;
  }

  /* A: the real header is the color source, without an invisible helper.
     Use a normal painted image layer above its opaque technical color.
     Deliberately opaque: alpha over navy would introduce a blue cast. */
  html[data-mgth-safari="header-image"] #sp-header#sp-header#sp-header {
    background-color:var(--mgth-safari-color,#123d60) !important;
    background-image:linear-gradient(#fff,#fff) !important;
    background-size:100% 100% !important;
    background-repeat:no-repeat !important;
    background-clip:border-box !important;
    -webkit-background-clip:border-box !important;
    background-origin:border-box !important;
    backdrop-filter:none !important;
    -webkit-backdrop-filter:none !important;
  }
  /* Keep flow at page origin; the native Helix fixed sticky state still wins. */
  html:is([data-mgth-safari="header-image"],[data-mgth-safari="header-split"]) #sp-header#sp-header#sp-header:not(.header-sticky):not(.is-sticky):not(.sticky-header) {
    position:sticky !important;
    top:0 !important;
  }

  /* B: blue document fallback and a transparent sticky container. The
     original header paint lives on a decorative absolute child. */
  html[data-mgth-safari="header-split"],
  html[data-mgth-safari="header-split"] body {
    background-color:var(--mgth-safari-color,#123d60) !important;
    background-image:none !important;
  }
  html[data-mgth-safari="header-split"] body > .body-wrapper {
    background-color:var(--mgth-original-body-color,#fff) !important;
  }
  html[data-mgth-safari="header-split"] #sp-header#sp-header#sp-header {
    isolation:isolate;
    background-color:transparent !important;
    background-image:none !important;
    backdrop-filter:none !important;
    -webkit-backdrop-filter:none !important;
  }
  html[data-mgth-safari="header-split"] #sp-header > .mgth-header-surface {
    display:block;
    position:absolute;
    inset:0;
    z-index:-1;
    pointer-events:none;
    user-select:none;
    background-color:var(--mgth-original-header-color,#fff);
    background-image:var(--mgth-original-header-image,none);
    backdrop-filter:var(--mgth-original-header-filter,none);
    -webkit-backdrop-filter:var(--mgth-original-header-filter,none);
  }
}
.mgth-header-surface {display:none;}
@media print {
  html[data-mgth="1"] :is(.mg-browser-edge-9822,#mgth-safari-sample) { display:none !important; }
}
