.stages-wrapper {
  position: relative;
  margin: 1.5rem auto;
  isolation: isolate;
}

.stages-container {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.stages-container .stage {
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  isolation: isolate;
}

.stages-container .stage img {
  position: relative;
  max-width: 100%;
}

.stages-container .stage span {
  display: grid;
  position: absolute;
  place-items: center;
  text-align: center;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 2.2rem;
  height: 2.2rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ffda00;
  font-weight: 800;
  font-size: 1.5rem;
  transition: all 0.2s ease;
  color: white;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.stage-tooltips-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.stage-tooltips-container .stage-tooltip {
  display: flex;
  flex-flow: column;
  align-items: center;
  text-align: center;
  gap: 0.4rem;
  position: absolute;
  z-index: 1;
  background-color: white;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  width: 140px;
  padding: 0.75rem;
  border-radius: 1rem;
  transform-origin: center bottom;
  opacity: 0;
  visibility: hidden;
  pointer-events: all;
  transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s ease;
}

.stage-tooltips-container .stage-tooltip.active {
  opacity: 1;
  visibility: visible;
}

.stage-tooltips-container .stage-tooltip .stage-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #a6cd5f;
  margin: 0;
}

.stage-tooltips-container .stage-tooltip .stage-description {
  margin: 0;
}

.stage-tooltips-container .stage-tooltip img {
  max-width: 100%;
}

.stages-container .stage:hover,
.stages-container .stage.active {
  filter: brightness(1.1);
  transform: scale(1.05);
  z-index: 2;
}

.stages-container .stage:hover span,
.stages-container .stage.active span {
  width: 3.2rem;
  height: 3.2rem;
  font-size: 2rem;
}

.stages-container:has(.stage:hover) .stage:not(:hover),
.stages-container:has(.stage.active) .stage:not(.active) {
  filter: opacity(0.75);
}
