/* Hub nav behaviour (preview 2026-12-04). Source: runs/2026-12-04_hub_shell/hub-nav.css
   The hub's own header (logo, search, language, dark mode, messages, notifications, New post, avatar; burger on phones)
   keeps its content and order. Only the container behaves like the bebetter prototype's site nav
   (runs/2026-11-17_bebetter_community_build/v2/nav/dist/nav.css .mm / .mm-bar / .mm.is-float): flush bar at the top,
   then past 24px of scroll a floating pill inset from the edges that follows the page.
   hub-nav.js sets html.hbn (hub pages incl. Knowledge Base and Academy; not admin, not the compose modal frame) and
   html.hbn-float. The header keeps its 64px box in both states (inset + pill height = 64), so nothing below it moves. */
html.hbn{--hbn-ease:cubic-bezier(0.16,1,0.3,1)}
html.hbn header:has(.main-navbar)::before{transition:opacity .25s ease}
html.hbn header:has(.main-navbar){transition:box-shadow .25s ease}
html.hbn header .main-navbar{transition:padding .4s var(--hbn-ease)}
html.hbn header .main-navbar>div>div{transition:background-color .25s ease,box-shadow .25s ease,max-width .4s var(--hbn-ease)}
html.hbn header .main-navbar .screen-padding-x-xs{transition:padding .4s var(--hbn-ease)}
html.hbn header .main-navbar .h-16{transition:height .4s var(--hbn-ease)}
html.hbn header .main-navbar a.logo{transition:transform .4s var(--hbn-ease);transform-origin:left center}

/* floating: the bar's ground fades, the row becomes a pill (prototype: 0.75rem 1rem inset, 4rem bar, 999px,
   white 90% with blur, a 1px ring plus a soft drop, logo 2.125rem -> 1.875rem) */
html.hbn.hbn-float header:has(.main-navbar){-webkit-backdrop-filter:none!important;backdrop-filter:none!important;pointer-events:none;
  box-shadow:none!important;overflow:visible!important;background:transparent!important;border-bottom-color:transparent!important}
/* the hub adds shadow-md on scroll, overflow-hidden would clip the pill's drop, and the KB pilot paints the bar paper with a hairline */
html.hbn.hbn-float header:has(.main-navbar)::before{opacity:0!important}
html.hbn.hbn-float header .main-navbar{padding:12px 16px 0}
html.hbn.hbn-float header .main-navbar>div>div{max-width:80rem!important;margin-left:auto;margin-right:auto;border-radius:999px;pointer-events:auto;
  background-color:rgba(255,255,255,.94);-webkit-backdrop-filter:blur(16px) saturate(1.4);backdrop-filter:blur(16px) saturate(1.4);
  box-shadow:0 0 0 1px rgba(24,35,66,.07),0 1px 2px rgba(24,35,66,.04),0 6px 18px -10px rgba(24,35,66,.16)}
html.hbn.hbn-float header .main-navbar .screen-padding-x-xs{padding:0 12px 0 24px}
html.hbn.hbn-float header .main-navbar .h-16{height:52px}
html.hbn.hbn-float header .main-navbar a.logo{transform:scale(.88)}
/* dark: the pill takes the dark surface and a light ring */
html.hbn.hbn-float.bb-hub-dark header .main-navbar>div>div{background-color:rgba(35,47,80,.94);
  box-shadow:0 0 0 1px rgba(255,255,255,.08),0 1px 2px rgba(0,0,0,.2),0 6px 18px -10px rgba(0,0,0,.5)}
/* phones and tablets (the hub shows its burger below 1024px): prototype 0.5rem inset, 3.5rem bar */
@media (max-width:1023.98px){
  html.hbn.hbn-float header .main-navbar{padding:8px 8px 0}
  html.hbn.hbn-float header .main-navbar .h-16{height:56px}
  html.hbn.hbn-float header .main-navbar .screen-padding-x-xs{padding:0 8px 0 12px}
}
@media (prefers-reduced-motion:reduce){
  html.hbn header:has(.main-navbar)::before,html.hbn header .main-navbar,html.hbn header .main-navbar *{transition:none!important}
}
