/* Shared navigation shell. It must work even if the 3D/pinned-story enhancement is late or unavailable. */
html.tme-menu-open,body.menu-open{overflow:hidden!important;overscroll-behavior:none}

/* Independent compact navigation ownership. Do not wait for data-story-layout. */
@media (max-width:1100px),(max-height:650px){
  .header.site-header{z-index:100!important}
  .header.site-header .desktop-nav{display:none!important}
  .header.site-header .menu-toggle{display:flex!important;position:relative;z-index:103;min-width:44px;min-height:44px;pointer-events:auto;touch-action:manipulation}
}
@media (max-width:1440px) and (max-height:1100px) and (hover:none) and (pointer:coarse){
  .header.site-header{z-index:100!important}
  .header.site-header .desktop-nav{display:none!important}
  .header.site-header .menu-toggle{display:flex!important;position:relative;z-index:103;min-width:44px;min-height:44px;pointer-events:auto;touch-action:manipulation}
}

/* A backdrop-filter on this ancestor can make fixed descendants relative to the
   header instead of the viewport. Remove it only while the menu is open. */
body.menu-open .header.site-header{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;background:#030706!important;z-index:100!important}
body.menu-open .header.site-header .menu-toggle{z-index:103!important}
body.menu-open .header.site-header .mobile-navigation:not([hidden]){
  display:block!important;
  position:fixed!important;
  right:0!important;
  bottom:0!important;
  left:0!important;
  width:100vw!important;
  height:calc(100dvh - var(--mobile-menu-top,68px))!important;
  min-height:0!important;
  max-height:none!important;
  box-sizing:border-box;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
  touch-action:pan-y pinch-zoom;
  padding:22px var(--gutter,24px) calc(30px + env(safe-area-inset-bottom));
  background:radial-gradient(ellipse at 100% 100%,#102e23,#030706 65%);
  pointer-events:auto!important;
  isolation:isolate;
  z-index:102!important;
  -webkit-overflow-scrolling:touch;
  top:var(--mobile-menu-top,68px)!important;
}
body.menu-open .header.site-header .mobile-navigation>a{display:flex!important;min-height:48px;align-items:center;justify-content:space-between;pointer-events:auto}
body.menu-open .header.site-header .mobile-navigation :is(a,button):focus-visible{outline:2px solid var(--accent,#20efb2);outline-offset:-2px}
body.menu-open .story-tools{visibility:hidden!important;pointer-events:none!important}
.header.site-header .mobile-navigation[hidden]{display:none!important}

/* If story JS fails before setting data-story-layout, the navigation remains available. */
body:not([data-story-layout]) .header.site-header .mobile-navigation:not([hidden]){pointer-events:auto}

@media print{.mobile-navigation{display:none!important}html.tme-menu-open,body.menu-open{overflow:visible!important}}
