/* Compact, unobtrusive back-to-top control shared across the site. */
.back-to-top {
  position: fixed;
  right: clamp(14px, 2vw, 24px);
  bottom: clamp(14px, 2vw, 24px);
  z-index: 1200;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(15, 39, 66, 0.88);
  color: #fff;
  box-shadow: 0 10px 28px rgba(15, 39, 66, 0.2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease, background-color 180ms ease;
}

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

.back-to-top svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (hover: hover) and (pointer: fine) {
  .back-to-top:hover {
    background: rgba(27, 111, 191, 0.96);
    transform: translateY(-2px);
  }
}

.back-to-top:focus-visible {
  outline: 3px solid rgba(79, 170, 229, 0.42);
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .back-to-top {
    right: 12px;
    bottom: 12px;
    width: 40px;
    height: 40px;
    box-shadow: 0 8px 22px rgba(15, 39, 66, 0.18);
  }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: opacity 1ms linear, visibility 1ms linear;
  }
}
