/* Navigation repair adopted by the 19 existing localized Best pages in R4.
   Native details and fragment anchors remain usable without JavaScript.
   The 168px narrow-screen offset accommodates wrapped localized headers. */
:root { --hf-nav-anchor-offset: 100px; }
.article-body [id] { scroll-margin-block-start: var(--hf-nav-anchor-offset); }
@media (min-width: 900px) {
  .sidebar-wrap { align-self: stretch; }
  .sidebar {
    inset-block-start: 90px;
    max-height: calc(100vh - 110px);
    max-height: calc(100dvh - 110px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}
@media (max-width: 1023px) {
  :root { --hf-nav-anchor-offset: 168px; }
}
@media (max-width: 899px) {
  .mobile-toc { position: static; inset-block-start: auto; z-index: auto; }
}
@media print {
  .mobile-toc, .sidebar-wrap { display: none !important; }
}
