/* Persistent navigation without changing the first-screen composition. */
:root { --sticky-admin-offset: 0px; --sticky-header-safe: 128px; }
html { scroll-padding-top: var(--sticky-header-safe); }
.site-insider .site-header,
.site-racing .site-header,
.site-crypto .site-header {
  position: sticky;
  top: var(--sticky-admin-offset);
  z-index: 60;
}
.site-insider .site-header, .site-racing .site-header { background: var(--paper); }
.site-crypto .site-header { background: #101820; }
.site-academy .site-header {
  position: fixed;
  top: calc(var(--sticky-admin-offset) + 20px);
  left: 0;
  right: 0;
  z-index: 60;
}
.site-crypto.home .site-header {
  position: fixed;
  inset: var(--sticky-admin-offset) 0 auto;
  z-index: 60;
  background: #101820;
}
.header-scroll-ready .site-crypto.home .site-header:not(.is-scrolled) { background: transparent; }
.site-header { transition: background-color 200ms ease, box-shadow 200ms ease; }
.site-header.is-scrolled { box-shadow: 0 5px 18px #08161014; }
.site-academy .site-header.is-scrolled { box-shadow: none; }
.site-academy .site-header.is-scrolled .header-inner { box-shadow: 0 6px 26px #10241c24; }
.site-crypto.home .site-header.is-scrolled .header-inner { border-bottom-color: transparent; }
.site-header .mobile-nav { max-height: calc(100svh - var(--sticky-header-safe)); }
main :target { scroll-margin-top: 16px; }
@media(min-width:901px) {
  .article-toc { top: var(--sticky-header-safe); max-height: calc(100svh - var(--sticky-header-safe) - 24px); }
}
@media(min-width:601px) {
  .guide-toc { top: var(--sticky-header-safe); max-height: calc(100svh - var(--sticky-header-safe) - 24px); }
}
@media(max-width:600px) {
  .site-academy .site-header { top: calc(var(--sticky-admin-offset) + 14px); }
}
@media(prefers-reduced-motion:reduce) { .site-header { transition: none; } }
@media print { .site-header { display: none !important; } }
