.slides {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  max-inline-size: 16rem;
  border: 1px solid silver;
}

.slides li {
  padding: 2rem 1rem;
  background: white;
  color: black;
  text-align: center;
  scroll-snap-align: center;
}

.dots {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  scroll-target-group: auto;
}

.dots a {
  display: grid;
  place-items: center;
  inline-size: 1.5rem;
  block-size: 1.5rem;
  border: 1px solid black;
  border-radius: 50%;
  color: black;
  text-decoration: none;
  background: white;
}

.dots a:hover,
.dots a:focus-visible,
:target-current {
  background: black;
  color: white;
}