.back-to-top {
  position: fixed;
  right: clamp(1rem, 2vw, 2rem);
  bottom: clamp(1rem, 2vw, 2rem);
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 3.25rem;
  padding-inline: 1rem;
  background: var(--navy);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--white);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 720;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.75rem);
  transition: opacity 180ms ease, transform 180ms ease, background-color 180ms ease;
  cursor: pointer;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: var(--blue);
}

.back-to-top svg {
  width: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

@media (max-width: 760px) {
  .back-to-top {
    width: 3.15rem;
    padding: 0;
    justify-content: center;
  }

  .back-to-top span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: none;
  }
}
