/* Shared fixed back-to-top control (home, hub, legal pages). */

.pt-back-top-sentinel-wrap {
  position: relative;
  height: 0;
  width: 0;
  overflow: visible;
  pointer-events: none;
}

.pt-back-top-sentinel {
  position: absolute;
  top: var(--pt-back-top-threshold, 360px);
  left: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  pointer-events: none;
  visibility: hidden;
}

.pt-back-top {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right, 0px));
  bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
  z-index: 6500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(32, 34, 37, 0.94);
  color: #f4f6f7;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s ease,
    border-color 0.15s ease,
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.pt-back-top[aria-hidden="true"] {
  pointer-events: none;
}

.pt-back-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.pt-back-top .material-symbols-rounded {
  display: block;
  font-size: 1.35rem;
  line-height: 1;
}

.pt-back-top:hover,
.pt-back-top:focus-visible {
  background: #12cc5a;
  border-color: #0d8a3a;
  color: #0a1210;
  outline: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35), 0 0 0 2px rgba(18, 204, 90, 0.28);
}

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

@media (max-width: 760px) {
  .pt-back-top {
    width: 3rem;
    height: 3rem;
    bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  }
}
