/* Floating “back to top” — included site-wide */
.hl-scroll-top {
  position: fixed;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 1055;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  background: linear-gradient(155deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.42) 55%, rgba(0, 0, 0, 0.12) 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.hl-scroll-top.hl-scroll-top--visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.hl-scroll-top.hl-scroll-top--visible:hover {
  transform: scale(1.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  background: linear-gradient(155deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.5) 55%, rgba(0, 0, 0, 0.18) 100%);
}

.hl-scroll-top.hl-scroll-top--visible:focus-visible {
  transform: scale(1.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  background: linear-gradient(155deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.5) 55%, rgba(0, 0, 0, 0.18) 100%);
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

/* Desktop: larger, bottom-right (pairs with ranking metric info FAB when present) */
@media (min-width: 769px) {
  .hl-scroll-top {
    left: auto;
    right: 1.25rem;
    width: 56px;
    height: 56px;
  }

  .hl-scroll-top svg {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 480px) {
  .hl-scroll-top {
    left: 1rem;
    bottom: 1rem;
    width: 44px;
    height: 44px;
  }

  .hl-scroll-top svg {
    width: 20px;
    height: 20px;
  }
}
