/* TOP NAV AUTHORITATIVE V11 — loaded last.
   Fixed: underline geometry separated from dropdown activation; legacy wrapper hover neutralized.
   Stocks vertical trigger tightened to 25px; direction-aware behavior preserved.

   Owns ONLY desktop header/menu/search/Stocks dropdown behavior. */

@media (min-width:1001px){
  html body .topbar{
    position:relative!important;
    z-index:2147483000!important;
    overflow:visible!important;
    display:grid!important;
    grid-template-columns:minmax(285px,1fr) auto minmax(205px,300px)!important;
    align-items:center!important;
    column-gap:32px!important;
    min-height:104px!important;
    padding:0 3.5%!important;
  }

  html body .topbar .brand{
    min-width:0!important;
    max-width:420px!important;
    white-space:nowrap!important;
  }

  html body .topbar .nav{
    position:relative!important;
    z-index:2147483300!important;
    display:flex!important;
    flex-flow:row nowrap!important;
    align-items:center!important;
    justify-content:center!important;
    gap:34px!important;
    width:max-content!important;
    min-width:max-content!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
    white-space:nowrap!important;
  }

  html body .topbar .nav > a,
  html body .topbar .nav .nav-dropdown__label{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex:0 0 auto!important;
    margin:0!important;
    padding:0!important;
    font-size:18px!important;
    line-height:1.08!important;
    font-weight:800!important;
    letter-spacing:.005em!important;
    white-space:nowrap!important;
  }

  html body .topbar .nav > a{
    min-height:76px!important;
  }

  html body .topbar .nav .nav-dropdown__label{
    min-height:76px!important;
    height:76px!important;
    padding:0!important;
    position:relative!important;
    z-index:2147483550!important;
  }


  html body .topbar .search-shell{
    display:flex!important;
    position:relative!important;
    z-index:2147483100!important;
    justify-self:end!important;
    width:100%!important;
    min-width:190px!important;
    max-width:300px!important;
    margin:0!important;
  }

  html body .topbar .search-shell input{
    width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }

  html body .topbar .nav-dropdown{
    position:relative!important;
    z-index:2147483500!important;
    display:flex!important;
    align-items:center!important;
    flex:0 0 auto!important;
    min-height:76px!important;
    overflow:visible!important;
  }

  /* Parent container is alignment-only; label is the hover trigger. */

  /* No large hover blanket: it previously extended into the stock ticker. */
  html body .topbar .nav-dropdown::after{
    content:none!important;
    display:none!important;
    pointer-events:none!important;
  }

  html body .topbar .nav-dropdown__menu{
    display:block!important;
    position:absolute!important;
    z-index:2147483646!important;
    left:50%!important;
    top:72px!important;
    transform:translate(-50%,-4px)!important;
    min-width:280px!important;
    width:max-content!important;
    max-width:360px!important;
    margin:0!important;
    padding:12px!important;
    visibility:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
    overflow:visible!important;
    background:linear-gradient(180deg,rgba(7,25,27,.999),rgba(4,15,17,.999))!important;
    border:1px solid rgba(222,184,99,.52)!important;
    border-radius:16px!important;
    box-shadow:0 24px 68px rgba(0,0,0,.80),inset 0 1px 0 rgba(245,218,151,.08)!important;
    transition:opacity .08s ease,transform .08s ease,visibility 0s linear .12s!important;
  }

  /* Tiny bridge only across the visual seam; does not reach the ticker. */
  html body .topbar .nav-dropdown__menu::before{
    content:""!important;
    position:absolute!important;
    left:-8px!important;
    right:-8px!important;
    top:-5px!important;
    height:6px!important;
    pointer-events:auto!important;
    background:transparent!important;
  }


  /* IMPORTANT: older celestial-navigation.css contains parent :hover opening.
     Neutralize it. Hover alone on the 76px wrapper MUST NOT open the menu. */
  html body .topbar .nav-dropdown:hover:not(.force-open):not(.is-open):not(:focus-within) .nav-dropdown__menu{
    visibility:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
    transform:translate(-50%,-4px)!important;
  }

  /* The old runtime used this class. It is no longer a valid opener. */
  html body .topbar .nav-dropdown.dropdown-hover-lock:not(.force-open):not(.is-open):not(:focus-within) .nav-dropdown__menu{
    visibility:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
  }

  html body .topbar .nav-dropdown:focus-within .nav-dropdown__menu,
  html body .topbar .nav-dropdown.is-open .nav-dropdown__menu,
  html body .topbar .nav-dropdown.force-open .nav-dropdown__menu{
    visibility:visible!important;
    opacity:1!important;
    pointer-events:auto!important;
    transform:translate(-50%,0)!important;
    transition-delay:0s!important;
  }

  html body .topbar .nav-dropdown__menu a{
    display:block!important;
    position:relative!important;
    z-index:2147483647!important;
    padding:14px 18px!important;
    margin:0!important;
    border-radius:10px!important;
    white-space:nowrap!important;
    font-size:15.5px!important;
    line-height:1.25!important;
  }

  html body .market-ticker{
    position:relative!important;
    z-index:40!important;
  }
}

@media (min-width:1001px) and (max-width:1500px){
  html body .topbar{
    grid-template-columns:minmax(235px,.86fr) auto minmax(155px,225px)!important;
    column-gap:22px!important;
    padding-left:26px!important;
    padding-right:26px!important;
  }

  html body .topbar .nav{gap:28px!important}

  html body .topbar .nav > a,
  html body .topbar .nav .nav-dropdown__label{
    font-size:18px!important;
  }

  html body .topbar .search-shell{
    min-width:155px!important;
    max-width:225px!important;
  }
}

@media (min-width:1001px) and (max-width:1240px){
  html body .topbar{
    grid-template-columns:minmax(205px,.78fr) auto!important;
    column-gap:20px!important;
  }

  html body .topbar .search-shell{display:none!important}
  html body .topbar .nav{gap:23px!important}

  html body .topbar .nav > a,
  html body .topbar .nav .nav-dropdown__label{
    font-size:17px!important;
  }
}


/* V11: TOP-LEVEL HOVER/ACTIVE UNDERLINE IS VISUAL ONLY.
   Exactly 30px below each item's vertical center; it does NOT define dropdown hit area. */
@media (min-width:1001px){
  html body .topbar .nav > a,
  html body .topbar .nav .nav-dropdown__label{
    position:relative!important;
    border-bottom:0!important;
  }

  html body .topbar .nav > a::after,
  html body .topbar .nav .nav-dropdown__label::after{
    content:""!important;
    position:absolute!important;
    left:0!important;
    right:0!important;
    top:calc(50% + 30px)!important;
    height:3px!important;
    border-radius:3px!important;
    background:var(--lime,#a6b979)!important;
    opacity:0!important;
    pointer-events:none!important;
    transform:scaleX(.72)!important;
    transform-origin:center!important;
    transition:opacity .12s ease,transform .12s ease!important;
  }

  html body .topbar .nav > a:hover::after,
  html body .topbar .nav > a.active::after,
  html body .topbar .nav .nav-dropdown__label:hover::after,
  html body .topbar .nav .nav-dropdown__label.active::after{
    opacity:1!important;
    transform:scaleX(1)!important;
  }
}
