html { scroll-behavior: smooth; }
#page-top:focus { outline: none; }
.back-to-top {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 30;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid #4779eb;
  border-radius: 16px;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 8px 24px rgb(22 53 119 / 24%);
  text-decoration: none;
  transition: background .15s, box-shadow .15s;
}
.back-to-top svg { width: 22px; height: 22px; }
.back-to-top:hover { background: #1d4ed8; color: #fff; box-shadow: 0 10px 28px rgb(22 53 119 / 32%); }
.back-to-top:focus-visible { outline: 3px solid var(--ink, #172033); outline-offset: 4px; }
@media (max-width: 760px) {
  .back-to-top { right: max(16px, env(safe-area-inset-right)); }
  .back-to-top-portal { bottom: calc(88px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .back-to-top { transition: none; }
}
