/* Shared screen navigation only. Study Guide has its own reader header. */
:root{--site-header-height:100px}
html{scroll-padding-top:calc(var(--site-header-height) + 12px)}
[data-sticky-header]{position:sticky;top:0;z-index:12;background:#fff;box-shadow:0 1px 0 #17324d18;isolation:isolate;padding-top:max(12px,env(safe-area-inset-top));padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right))}
.topbar[data-sticky-header]{height:auto;min-height:82px;padding-bottom:12px}
/* Keep the existing in-flow space: no fixed-position overlay or body spacer. */
.site-header[data-sticky-header]{max-width:none;padding-bottom:12px;border-bottom:1px solid #dce5ec;gap:12px 24px}
.site-header[data-sticky-header] .wordmark{flex:none}
.site-header[data-sticky-header]>nav{min-width:0;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;align-items:center;gap:20px;padding:8px;scroll-padding-inline:8px}
.site-header[data-sticky-header]>nav>a{flex:none;min-height:44px;display:inline-flex;align-items:center;white-space:nowrap}
/* The existing menus remain above page content, below native modal dialogs. */
[data-sticky-header] :is(.site-menu-panel,.resources-menu-panel){max-height:calc(100dvh - var(--site-header-height) - 20px);overflow-y:auto;overscroll-behavior:contain}
body>.skip,body>.schedule-skip{position:fixed;z-index:40}
.app-shell>.browse-panel,.student-rail{top:var(--site-header-height);height:calc(100dvh - var(--site-header-height))}
/* Focus may be scrolled by the browser before a nested reader has settled. */
@media(max-width:1100px){.topbar[data-sticky-header]{min-height:75px}}
@media(max-width:780px){.topbar[data-sticky-header]{min-height:68px}}
@media(max-width:760px){
 .site-header[data-sticky-header]{align-items:stretch;flex-direction:column;gap:2px;padding:8px 16px 4px;padding-top:max(8px,env(safe-area-inset-top));padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right))}
 .site-header[data-sticky-header] .wordmark{align-self:flex-start;min-height:38px}
 .site-header[data-sticky-header] .wordmark small{display:none}
 .site-header[data-sticky-header]>nav{gap:18px;width:100%;border-top:1px solid #e3eaee}
 .site-header[data-sticky-header]>nav>a{font-size:14px}
 [data-sticky-header].billing-header{align-items:center;gap:12px;padding-bottom:10px}
 .billing-header .brand{min-width:0;font-size:17px;gap:8px}
 .billing-header .brand small{display:none}
 .billing-header>a:last-child{max-width:110px;font-size:13px;min-height:44px;display:flex;align-items:center}
}
@media(max-width:900px){.student-rail{height:auto}}
@media(max-width:340px){[data-sticky-header].topbar,[data-sticky-header].resources-toolbar{flex-wrap:wrap}}
@media print{
 :root{--site-header-height:0px}
 html{scroll-padding-top:0}
 [data-sticky-header],body>.skip,body>.schedule-skip{display:none!important}
 .app-shell>.browse-panel,.student-rail{position:static;height:auto}
}
