#back-to-top {
  display: none !important;
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  color: white;
  padding: 0.5rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 4rem;
  text-decoration: none;
  border-radius: 50%;
  aspect-ratio: 1;
  box-shadow: rgba(22, 33, 74, 0.4) 0 5px .75rem .25rem;
  background-color: rgb(var(--color-heading));
  transition: transform 0.25s ease-in-out;
  z-index: 39;
}
#back-to-top:hover {
  transform: scale(1.1);
}
#back-to-top:focus-visible {
  outline: 4px solid white;
  outline-offset: -8px;
}
#back-to-top:active {
  transform: scale(0.9);
}
#back-to-top.show {
  display: flex !important;
  animation: fadeInBackToTop 0.5s;
}
#back-to-top.hiding {
  display: flex !important;
  animation: fadeOutBackToTop 0.5s;
}
@keyframes fadeInBackToTop {
  from {
    opacity: 0;
    transform: translateY(50%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeOutBackToTop {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(50%);
  }
}
@media(pointer: fine) and (min-width: 768px) {
  #back-to-top.hiding,
  #back-to-top.show {
    display: none !important;
  }
}