/* A quiet, fixed return-to-top control with room beside the footer text. */
.has-back-to-top .footer-meta { padding-right: 64px; }
.back-to-top {
  position: fixed;
  z-index: 30;
  right: max(28px, env(safe-area-inset-right));
  bottom: max(28px, env(safe-area-inset-bottom));
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #72979f;
  border-radius: 50%;
  color: #d7f3f4;
  background: #0b1b28;
  box-shadow: 0 4px 16px rgb(3 12 20 / 18%);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity .2s ease, transform .2s ease, background-color .2s ease;
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
@media (hover: hover) {
  .back-to-top:hover { background: #244452; }
}
.back-to-top:focus-visible { outline: 3px solid #54d5da; outline-offset: 4px; }
body.modal-open .back-to-top { visibility: hidden; pointer-events: none; }
@media (max-width: 700px) {
  .back-to-top {
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    width: 44px;
    height: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: none; transform: none; }
}
@media (forced-colors: active) {
  .back-to-top { color: ButtonText; background: ButtonFace; border-color: ButtonText; box-shadow: none; }
}
