.page-scroll-controls {
  position: fixed;
  right: 0.25rem;
  bottom: calc(4rem + 0.75rem);
  z-index: 40;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 2.25rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.page-scroll-controls__button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 2.25rem;
  border: 0;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.page-scroll-controls__button + .page-scroll-controls__button {
  border-top: 1px solid #e5e7eb;
}

.page-scroll-controls__button:hover {
  background: #f3f4f6;
  color: #2583c3;
}

.page-scroll-controls__button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid #2583c3;
  outline-offset: -2px;
}

.page-scroll-controls__button svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (min-width: 640px) {
  .page-scroll-controls {
    right: 0.25rem;
  }
}

@media (min-width: 768px) {
  .page-scroll-controls {
    bottom: 2rem;
  }
}

@media (min-width: 1024px) {
  .page-scroll-controls {
    right: max(0.25rem, calc((100vw - 80rem) / 2 - 2.75rem));
    bottom: 2.5rem;
    width: 2.25rem;
  }

  .page-scroll-controls__button {
    height: 2.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-scroll-controls__button {
    transition: none;
  }
}
