/* Mega menu stability v1 — cache-busted
   Desktop menus stay inside the viewport and remain visible while the pointer
   travels from the trigger to the fixed panel. */
@media (min-width:981px){
  #ff-v12-header:not(.ff-guides-shell-header) .ff12-mega{
    position:fixed!important;
    top:64px!important;
    left:50%!important;
    right:auto!important;
    width:min(920px,calc(100vw - 24px))!important;
    max-width:920px!important;
    max-height:calc(100vh - 78px)!important;
    overflow:auto!important;
    overscroll-behavior:contain;
    transform:translate(-50%,-6px)!important;
  }
  #ff-v12-header:not(.ff-guides-shell-header) .ff12-docs>.ff12-mega{
    width:min(720px,calc(100vw - 24px))!important;
    max-width:720px!important;
  }
  #ff-v12-header:not(.ff-guides-shell-header) .ff12-nav-item.is-open>.ff12-mega{
    opacity:1!important;
    visibility:visible!important;
    pointer-events:auto!important;
    transform:translate(-50%,0)!important;
  }
  #ff-v12-header:not(.ff-guides-shell-header) .ff12-mega-grid,
  #ff-v12-header:not(.ff-guides-shell-header) .ff12-mega-group{
    min-width:0!important;
  }
  #ff-v12-header:not(.ff-guides-shell-header) .ff12-mega-group a{
    min-width:0!important;
  }
  #ff-v12-header:not(.ff-guides-shell-header) .ff12-mega-group a span:last-child{
    overflow-wrap:anywhere;
  }
}

@media (min-width:801px){
  #ff-v12-header.ff-guides-shell-header .ff12-mega{
    display:none!important;
    position:fixed!important;
    top:60px!important;
    left:50%!important;
    right:auto!important;
    width:min(920px,calc(100vw - 24px))!important;
    max-width:920px!important;
    max-height:calc(100vh - 74px)!important;
    overflow:auto!important;
    overscroll-behavior:contain;
    transform:translateX(-50%)!important;
  }
  #ff-v12-header.ff-guides-shell-header .ff12-nav-item.is-open>.ff12-mega{
    display:block!important;
    opacity:1!important;
    visibility:visible!important;
    pointer-events:auto!important;
  }
  #ff-v12-header.ff-guides-shell-header .ff12-mega-grid{
    min-width:0!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
  #ff-v12-header.ff-guides-shell-header .ff12-mega-group,
  #ff-v12-header.ff-guides-shell-header .ff12-mega-group a{
    min-width:0!important;
  }
  #ff-v12-header.ff-guides-shell-header .ff12-mega-group a span:last-child{
    overflow-wrap:anywhere;
  }
}