.to-top {
  position: fixed;
  right: 34px;
  bottom: 34px;
  z-index: 60;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  appearance: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  mix-blend-mode: difference;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-decoration: underline;
  text-decoration-color: rgb(255 255 255 / 55%);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  box-shadow: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 160ms ease, visibility 0s linear 160ms,
    text-decoration-color 120ms ease;
}

.to-top[data-shown="true"] {
  opacity: 1;
  visibility: visible;
  transition: opacity 160ms ease, visibility 0s,
    text-decoration-color 120ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .to-top:hover {
    text-decoration-color: currentColor;
  }
}

.to-top:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 3px;
}

@media (max-width: 620px) {
  .to-top {
    right: 18px;
    bottom: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .to-top,
  .to-top[data-shown="true"] {
    transition: none;
  }
}
