.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 70;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px) scale(.9);
  transition: opacity .3s ease, transform .3s var(--ease), background-color .2s;
}

.back-to-top.is-visible {
  opacity: 1;
  transform: none;
}

.back-to-top.is-visible:hover {
  background: var(--color-primary-600);
  transform: translateY(-3px);
}

@media (max-width: 639.98px) {
  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 46px;
    height: 46px;
  }

  /* the cookie dialog spans the full width on phones */
  .has-cookie-banner .back-to-top { display: none; }
}
