/* Back-to-top button (injected by /assets/js/site.js initScrollTop) */
.scroll-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  border: 2px solid #ffc20e;
  border-radius: 50%;
  background: #0e0f11;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    visibility 0s linear 0.25s,
    background-color 0.2s ease,
    color 0.2s ease;
}
.scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    visibility 0s linear 0s,
    background-color 0.2s ease,
    color 0.2s ease;
}
.scroll-top svg {
  display: block;
  width: 22px;
  height: 22px;
  pointer-events: none;
}
.scroll-top:hover,
.scroll-top:focus-visible {
  background: #ffc20e;
  color: #0e0f11;
}
.scroll-top:focus {
  outline: none;
}
.scroll-top:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}
@media (max-width: 767px) {
  .scroll-top {
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-top,
  .scroll-top.is-visible {
    transition: none;
    transform: none;
  }
}

/* ---------------------------------------------------------------------------
   Sticky header + mobile menu (header.site-header, enhanced by site.js
   initMobileNav). Site breakpoint for the header is lg = 1024px.
   --------------------------------------------------------------------------- */

/* InfoPages CSS sets `body,html{overflow-x:hidden}`; on <body> that creates a
   scroll container and silently disables `position: sticky` on the header.
   The html rule still clips horizontal overflow at the viewport, and
   .lab-root already uses overflow-x:clip. */
body {
  overflow-x: visible;
}
@supports (overflow: clip) {
  body {
    overflow-x: clip;
  }
}

.site-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 30;
}

/* Header is ~101px tall below 1024px, ~93px above. */
html {
  scroll-padding-top: 7.5rem;
}
@media (min-width: 1024px) {
  html {
    scroll-padding-top: 7rem;
  }
  /* Sticky sidebars/TOCs (top-24 = 96px) would sit under the header. */
  .lab-root .sticky.top-24,
  .lab-root .lg\:sticky.lg\:top-24 {
    top: 7rem;
  }
}

/* Native <details> menu (mobile/tablet, hidden from 1024px by lg:hidden). */
.site-header details > summary {
  gap: 8px;
  -webkit-user-select: none;
  user-select: none;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}
.site-header details > summary::-webkit-details-marker {
  display: none;
}
.site-header details > summary::marker {
  content: "";
}
/* Hamburger icon: middle bar + box-shadow bars, turns into an X when open. */
.site-header details > summary::before,
.site-header details > summary::after {
  content: "";
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.site-header details > summary::before {
  box-shadow:
    0 -5px 0 currentColor,
    0 5px 0 currentColor;
}
.site-header details > summary::after {
  /* Second bar, only used for the X; overlaps the first one. */
  order: -1;
  margin-right: -24px;
  transform: scaleX(0);
}
.site-header details[open] > summary::before {
  box-shadow: none;
  transform: rotate(45deg);
}
.site-header details[open] > summary::after {
  transform: rotate(-45deg);
}
.site-header details > summary:hover,
.site-header details[open] > summary {
  border-color: #ffc20e;
  background-color: #22252a;
}
.site-header details > summary:focus-visible {
  outline: 2px solid #ffc20e;
  outline-offset: 2px;
}

/* Dropdown panel: classes max-h-[75vh] / max-w-[calc(100vw-2rem)] used in the
   markup are not in the compiled CSS, so give them real values here. */
.site-header details > summary + div {
  z-index: 31;
  max-width: calc(100vw - 2rem);
  max-height: 75vh;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}
@supports (height: 100dvh) {
  .site-header details > summary + div {
    max-height: calc(100dvh - 8rem);
  }
}
.site-header details > summary + div a {
  display: flex;
  align-items: center;
  min-height: 40px;
  border-radius: 4px;
}
.site-header details > summary + div a:hover,
.site-header details > summary + div a:focus-visible {
  color: #ffc20e;
}
.site-header details a[aria-current="page"] {
  color: #ffc20e;
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .site-header details > summary,
  .site-header details > summary::before,
  .site-header details > summary::after {
    transition: none;
  }
}

/* Header "Download APK" button: centred in the header row when there is room,
   otherwise wrapped onto its own centred line. */
.site-header .header-row {
  position: relative;
  flex-wrap: wrap;
  row-gap: 0.5rem;
}
.site-header .header-cta {
  order: 3;
  flex: 0 0 100%;
  display: flex;
  justify-content: center;
}
@media (min-width: 640px) and (max-width: 1023.98px), (min-width: 1160px) {
  .site-header .header-cta {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    flex: none;
  }
}
/* Where the button wraps onto its own line the header is ~52px taller. */
@media (max-width: 639.98px) {
  html:has(.header-cta) {
    scroll-padding-top: 10.75rem;
  }
}
@media (min-width: 1024px) and (max-width: 1159.98px) {
  html:has(.header-cta) {
    scroll-padding-top: 10.25rem;
  }
  html:has(.header-cta) .lab-root .sticky.top-24,
  html:has(.header-cta) .lab-root .lg\:sticky.lg\:top-24 {
    top: 10.25rem;
  }
}
