/* Independent scrolling content + always reachable version footer. The SVG lives
 * in the zero-vertical-padding scroll box, so its viewport height adds no overflow. */
#navigation-scroll{position:relative}
:root{--site-header-height:76px}
.navigation-slot{display:contents}
.navigation-controls,.navigation-search{display:none}
/* The document scrollbar belongs below the fixed header, not beside it.
 * Prepaint pending and ready states share geometry; no-JS keeps native flow. */
:root:is([data-navigation-pending],[data-enhanced]) body{height:100dvh;overflow:hidden;padding:0}
:root:is([data-navigation-pending],[data-enhanced]) .site-header{position:fixed;inset:0 0 auto;height:var(--site-header-height);min-height:var(--site-header-height)}
:root:is([data-navigation-pending],[data-enhanced]) .page-scroll{position:absolute;inset:var(--site-header-height) 0 0;overflow-y:auto;overflow-x:hidden;scrollbar-gutter:stable}
:root[data-design-view=tui]:is([data-navigation-pending],[data-enhanced]) .page-scroll{bottom:44px}
:root:is([data-navigation-pending],[data-enhanced]) #hilster-navigation{top:0;height:calc(100dvh - var(--site-header-height))}
:root[data-design-view=tui]:is([data-navigation-pending],[data-enhanced]) #hilster-navigation{top:22px;height:calc(100dvh - var(--site-header-height) - 66px)}
:root:is([data-navigation-pending],[data-enhanced]) main :is(section[id],dt[id]){scroll-margin-top:calc(110px - var(--site-header-height))}
:root:is([data-navigation-pending],[data-enhanced]) main :is(h2,h3){scroll-margin-top:calc(108px - var(--site-header-height))}
:root:is([data-navigation-pending],[data-enhanced]) body.contact-modal-open .page-scroll{overflow:hidden}
#hilster-navigation .navigation-scroll>ul{padding-left:0;list-style:none;margin:1.4rem 0}
:root[data-enhanced] #hilster-navigation{display:flex;flex-direction:column;overflow:hidden;padding:20px 0 0}
:root[data-enhanced] #navigation-scroll{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;padding:0 16px 0 34px;scrollbar-width:thin;scrollbar-gutter:auto;overscroll-behavior:contain;touch-action:pan-y}
/* Native auto overflow: show the themed bar whenever content needs scrolling,
 * not only on hover; no bar or reserved track when everything fits. */
:root[data-enhanced] #navigation-scroll::after{content:"";display:block;height:6px}
:root[data-enhanced] #hilster-navigation>.sidebar-product{flex:0 0 auto;margin:0;padding:12px 16px 16px 34px;border:0;border-top:1px solid var(--border);background:var(--bg);z-index:1;max-height:45%;overflow-y:auto}
:root[data-enhanced] .sidebar-product>.sidebar-kicker{display:none}
:root[data-enhanced] .sidebar-product>strong{font-family:inherit;font-size:.78rem;line-height:1.4;margin:0 0 8px}
:root[data-enhanced] .sidebar-product>.version-control{margin-top:0}
/* At the top, align the first menu text with the content's small eyebrow.
 * The search is in the header on desktop, so no former form/list gap remains. */
@media(min-width:801px){
  :root[data-enhanced] .navigation-slot{display:block;min-width:0;min-height:calc(100dvh - var(--site-header-height))}
  :root[data-enhanced] .page-scroll>footer{padding-left:var(--navigation-footer-start,300px);flex-wrap:wrap}
  :root[data-enhanced] #hilster-navigation,
  :root[data-enhanced][data-design-view=tui] #hilster-navigation{position:fixed;left:var(--navigation-left);width:var(--navigation-width);top:var(--site-header-height);margin:0;box-sizing:border-box}
  :root[data-enhanced][data-design-view=tui] #hilster-navigation{top:calc(var(--site-header-height) + 22px)}
  :root[data-enhanced] #hilster-navigation{padding-top:30px}
  :root[data-enhanced] #navigation-scroll>ul{margin-top:0}
  :root[data-enhanced][data-design-view=tui] #hilster-navigation{padding-top:17px}
}
@media(max-width:800px){
  :root{--site-header-height:68px}
  /* Static no-script navigation is ordinary page content, not a scroll trap. */
  :root:not([data-enhanced]):not([data-navigation-pending]) #hilster-navigation{overflow:visible;overscroll-behavior:auto}
  :root:is([data-navigation-pending],[data-enhanced]) .menu-open .page-scroll{overflow:hidden}
  :root:is([data-navigation-pending],[data-enhanced]) #hilster-navigation,
  :root[data-design-view=tui]:is([data-navigation-pending],[data-enhanced]) #hilster-navigation{top:0;height:100dvh}
  :root[data-enhanced] #hilster-navigation{display:none;padding-top:12px}
  :root[data-enhanced] .menu-open #hilster-navigation{display:flex}
  /* Keep the same trace gutter as desktop: the terminal needs 10px before
   * the active border, plus room for its bend. 24px made it overlap by 9px. */
  :root[data-enhanced] #navigation-scroll{padding-left:34px}
  :root[data-enhanced] .navigation-controls{display:flex;flex:0 0 auto;gap:8px;align-items:center;justify-content:flex-start;padding:0 16px 12px 34px}
  /* Outside the scrolling tree: search and its outline stay visible at any
   * menu scroll position. Suggestions may overlay the tree without clipping. */
  :root[data-enhanced] .navigation-search{display:block;flex:0 0 auto;padding:6px 16px 6px 34px;position:relative;z-index:2}
  #hilster-navigation .navigation-search .documentation-search{margin:0}
  :root[data-enhanced] #navigation-scroll{padding-top:6px;scroll-padding-top:6px}
  :root[data-enhanced] #hilster-navigation>.sidebar-product{padding:12px 16px max(12px,env(safe-area-inset-bottom)) 34px}
  :root[data-enhanced] #hilster-navigation,
  :root[data-enhanced][data-design-view=tui] #hilster-navigation{width:min(88vw,330px);border:1px solid var(--border)}
  #hilster-navigation .navigation-controls #menu-close{position:static;box-sizing:border-box;flex:0 0 44px;width:44px;height:44px;min-height:44px;margin-left:auto;padding:0;font-size:26px;line-height:1;display:inline-flex;align-items:center;justify-content:center}
}
/* Stable control geometry across views; text/faces may change, hit areas do not.
 * Full scheme names fit in the mobile toolbar, so no ambiguous icon-only state. */
.site-header,.header-actions{column-gap:8px}
.site-header button,:root[data-design-view] .site-header button{font-size:.8rem}
.site-header .keyboard-help-open{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-height:44px;padding:8px}
.site-header .brand{white-space:nowrap}
.site-header #view-toggle,.navigation-controls #view-toggle{box-sizing:border-box;width:44px;height:44px;min-height:44px;padding:8px;font-size:.8rem;line-height:20px}
.site-header #view-toggle[aria-pressed=true],.navigation-controls #view-toggle[aria-pressed=true]{background:#815c60;border-color:#815c60;color:#fff}
.site-header #view-toggle[aria-pressed=true]:hover,.navigation-controls #view-toggle[aria-pressed=true]:hover{background:#6b494e;border-color:#6b494e;color:#fff}
.site-header #scheme-toggle,.navigation-controls #scheme-toggle{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-height:44px;padding:8px;font-size:.8rem;line-height:20px}
#scheme-toggle #scheme-label{display:none}
#scheme-toggle>span[aria-hidden]{display:inline-flex;align-items:center;justify-content:center;flex:0 0 20px;width:20px;height:20px;font-size:20px;line-height:20px}
#scheme-toggle svg{display:block;flex:none}
.site-header .support-open{box-sizing:border-box;width:132px;height:44px;min-height:44px;padding:8px;font-size:.8rem}
:root[data-design-view] .site-header .support-open{font-size:.8rem}
.site-header #menu-toggle{box-sizing:border-box;width:44px;height:44px;min-height:44px;padding:8px}
:root[data-design-view=tui] .site-header{padding:0 max(28px,calc((100vw - 1480px)/2))}
@media(max-width:800px){
  .site-header,:root[data-design-view=tui] .site-header{padding:0 12px}
  .site-header .support-open{width:124px}
  .site-header .brand{flex-shrink:0}
  :root[data-design-views=ready] .site-header #view-toggle,
  .site-header #scheme-toggle{display:none}
}
