/* Shared return control with the Sprint hover palette. */
body .site-back-to-top {
  --header-beam-depth: 16px;
  position: fixed;
  right: calc(24px + env(safe-area-inset-right, 0px));
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 45;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 56px;
  height: 56px;
  margin: 0;
  padding: 0;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(145deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .02) 60%), rgba(var(--site-black-rgb), .68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 6px 24px rgba(var(--site-black-rgb), .18);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  backdrop-filter: blur(16px) saturate(1.25);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .6s ease, transform .6s ease, background-color .7s cubic-bezier(.16, 1, .3, 1), color .7s cubic-bezier(.16, 1, .3, 1), border-color .7s cubic-bezier(.16, 1, .3, 1);
}
body .site-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}
body .site-back-to-top svg { width: 24px; height: 24px; }
/* A gentle lift with a longer return lets the arrow settle after hover. */
body :is(.site-back-to-top, .ap-back-to-top) > svg {
  translate: 0 0;
  transition: translate .9s cubic-bezier(.16, 1, .3, 1);
}
@media (hover: hover) and (pointer: fine) {
  body :is(.site-back-to-top, .ap-back-to-top):hover > svg {
    translate: 0 -4px;
    transition-duration: .65s;
  }
}
body :is(.site-back-to-top, .ap-back-to-top):focus-visible > svg {
  translate: 0 -4px;
}
body.site-panel .site-back-to-top:is(:hover, :focus-visible) {
  background: #fff;
  color: var(--site-black);
  border-color: var(--site-black);
}
body .site-back-to-top:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -5px;
}
/* A modal menu owns the screen; its existing inert lifecycle stays intact. */
body:is(.menu-open, .sc-menu-open) .site-back-to-top {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
@media (max-width: 768px) {
  body .site-back-to-top {
    width: 52px;
    height: 52px;
    right: calc(16px + env(safe-area-inset-right, 0px));
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
}
@media (prefers-reduced-motion: reduce) {
  body .site-back-to-top { transition: none; transform: none; }
  body :is(.site-back-to-top, .ap-back-to-top) > svg,
  body :is(.site-back-to-top, .ap-back-to-top):is(:hover, :focus-visible) > svg {
    translate: none;
    transition: none;
  }
}
@media (forced-colors: active) {
  body .site-back-to-top { background: ButtonFace; border-color: ButtonText; color: ButtonText; }
  body .site-back-to-top:focus-visible { outline-color: Highlight; }
}
