.marquee {
  overflow: hidden;
  max-inline-size: 20rem;
  padding: 0.75rem 0;
  background: #f4f4f0;
  border: 1px solid #ccc;
  color: black;
}

.marquee__text {
  margin: 0;
  white-space: nowrap;
  font: 0.9rem system-ui, sans-serif;
  animation: scroll-x 8s linear infinite;
}

.marquee:hover .marquee__text,
.marquee:focus-within .marquee__text {
  animation-play-state: paused;
}

@keyframes scroll-x {
  from {
    translate: 0;
  }
  to {
    translate: -50%;
  }
}