/* Fit only vertical fixed navigation; horizontal and mobile menus keep their layout. */
html body #nav[data-height-fit="true"]{
  --sidebar-space:clamp(6px,calc((var(--sidebar-height,100dvh) - 450px) / 20),26px);
  top:var(--sidebar-top,0px)!important;bottom:auto!important;
  height:var(--sidebar-height,100dvh)!important;max-height:var(--sidebar-height,100dvh)!important;
  min-height:0!important;box-sizing:border-box;
  padding-top:calc(var(--sidebar-space) + env(safe-area-inset-top,0px))!important;
  padding-bottom:calc(var(--sidebar-space) + env(safe-area-inset-bottom,0px))!important;
  overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;scrollbar-width:thin;
  gap:clamp(2px,1dvh,8px);
}
html body #nav[data-height-fit="true"]>.brand{
  flex-shrink:0;font-size:clamp(20px,3dvh,24px);
  margin-bottom:clamp(8px,calc((var(--sidebar-height,100dvh) - 500px) / 8),34px)!important;
}
html body #nav[data-height-fit="true"] .nav-section{flex:0 0 auto;gap:clamp(2px,calc((var(--sidebar-height,100dvh) - 500px) / 40),6px)}
html body #nav[data-height-fit="true"] .navbtn{
  min-height:44px;line-height:1.35;font-size:clamp(14px,2dvh,16px);
  padding-top:clamp(7px,calc((var(--sidebar-height,100dvh) - 480px) / 16),13px)!important;
  padding-bottom:clamp(7px,calc((var(--sidebar-height,100dvh) - 480px) / 16),13px)!important;
  flex-shrink:0;
}
html body #nav[data-height-fit="true"] .nav-footer{flex:0 0 auto;margin-top:auto;padding-top:6px}
html body #nav[data-height-fit="true"] .nav-user{padding-top:6px;padding-bottom:6px}
html body #nav[data-height-fit="true"] .nav-avatar{width:clamp(30px,5dvh,40px);height:clamp(30px,5dvh,40px);flex-shrink:0}
html body #nav[data-height-fit="true"] #ptDesktopNotificationBtn{min-height:44px;margin-bottom:4px;padding-top:8px;padding-bottom:8px}
html body #nav[data-height-fit="true"] .nav-accent{padding-top:4px;padding-bottom:4px}
