/* Keep the original phone tools within reach while the brand scrolls away. */
/* On computers only the section navigation stays at the top after the brand
   has scrolled away. The measured height also clears anchor/focus targets. */
@media(min-width:761px){
 html{scroll-padding-block-start:calc(var(--desktop-header-bar-height,88px) + env(safe-area-inset-top,0px) + 12px)}
 body.reader-site .site-header,body.reader-site[data-section] .site-header{position:sticky;top:calc(env(safe-area-inset-top,0px) - var(--desktop-header-offset,0px));z-index:60}
 body.reader-site .site-header:has(.header-row :focus-visible){top:env(safe-area-inset-top,0px)}
 body.reader-site .site-header .site-nav,body.reader-site[data-section] .site-header .site-nav{max-block-size:min(40dvh,16rem);overflow-y:auto;overscroll-behavior:contain;scroll-padding-block:8px}
}
@media(max-width:760px){
 html{scroll-padding-block-start:calc(var(--mobile-header-bar-height,80px) + env(safe-area-inset-top,0px) + 12px)}
 body.reader-site .site-header,body.reader-site[data-section] .site-header{position:sticky;top:calc(env(safe-area-inset-top,0px) - var(--mobile-header-offset,0px));z-index:60}
 /* Keyboard users can still reach the brand link above the compact tools. */
 body.reader-site .site-header:has(.brand:focus-visible){top:env(safe-area-inset-top,0px)}
 body.reader-site .site-header .site-nav,body.reader-site[data-section] .site-header .site-nav{max-block-size:calc(var(--mobile-header-viewport-height,100dvh) - var(--mobile-header-bar-height,80px) - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 8px);overflow-y:auto;overscroll-behavior:contain}
 body.reader-site .site-header #reading-panel,body.reader-site[data-section] .site-header #reading-panel{max-block-size:calc(var(--mobile-header-viewport-height,100dvh) - var(--mobile-header-account-clearance,90px) - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 8px);overflow-y:auto;overscroll-behavior:contain}
}
