#implementation {
  scroll-margin-top: 24px;
}

.implementation-carousel .steps {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.implementation-carousel .steps li {
  flex: 1 1 190px;
  min-width: 0;
  border-top: 2px solid #2EE6C5;
  padding-top: 20px;
}

.step-number {
  display: block;
  margin-bottom: 8px;
  color: #2EE6C5;
  font: 700 16px/1 'Space Grotesk', system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}

.step-copy h3 {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.step-copy p {
  max-width: 42ch;
  color: #9AAEB3;
  font-size: 16px;
  overflow-wrap: anywhere;
}

[data-carousel-ready] .steps {
  --step-gap: clamp(10px, 1.6vw, 20px);
  --step-peek: clamp(40px, 15%, 160px);
  position: relative;
  flex-wrap: nowrap;
  gap: var(--step-gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

[data-carousel-ready] .steps::-webkit-scrollbar {
  display: none;
}

[data-carousel-ready] .steps li {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-content: center;
  gap: clamp(24px, 4vw, 56px);
  flex: 0 0 calc(100% - var(--step-peek) - var(--step-gap));
  min-height: 216px;
  padding: clamp(20px, 4vw, 44px);
  border: 1px solid #2A3E45;
  border-top: 2px solid #2EE6C5;
  border-radius: 18px;
  background: linear-gradient(120deg, #16272B, #10191D 80%);
  opacity: .5;
  scroll-snap-align: start;
  transition: opacity 200ms ease;
}

[data-carousel-ready] .steps li:last-child {
  flex-basis: 100%;
}

[data-carousel-ready] .steps li[aria-current="step"] {
  opacity: 1;
}

[data-carousel-ready] .step-number {
  margin: 0;
  font-size: clamp(44px, 6vw, 76px);
  letter-spacing: -.06em;
}

[data-carousel-ready] .step-copy h3 {
  font-size: clamp(23px, 3vw, 36px);
}

.step-controls:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}

.step-progress {
  color: #9AAEB3;
  font: 700 14px/1 'Space Grotesk', system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: .08em;
}

[data-step-current] {
  color: #2EE6C5;
}

.step-announcement {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.step-arrows {
  display: flex;
  gap: 8px;
}

.step-arrows button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #2A3E45;
  border-radius: 50%;
  background: #111B1F;
  color: #2EE6C5;
  cursor: pointer;
}

.step-arrows button:not([aria-disabled="true"]):hover {
  border-color: #2EE6C5;
  background: #162227;
}

.step-arrows button[aria-disabled="true"] {
  color: #6F858B;
  cursor: default;
}

.step-arrows svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 720px) {
  [data-carousel-ready] .steps {
    --step-peek: clamp(24px, 8%, 42px);
  }

  [data-carousel-ready] .steps:has(li:last-child:not([aria-current="step"])) {
    mask-image: linear-gradient(to right, #000 calc(100% - 16px), transparent);
  }

  [data-carousel-ready] .steps li {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 12px;
    min-height: 204px;
    padding: clamp(16px, 4vw, 24px);
  }

  [data-carousel-ready] .step-number {
    font-size: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-carousel-ready] .steps li {
    transition: none;
  }
}
