.potential-journey {
  position: relative;
  min-width: 0;
  height: 560px;
  margin-top: 10px;
}

.potential-journey-track {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.potential-journey-track path {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.journey-track-base,
.journey-track-bypass {
  stroke: var(--portal-line-strong);
  stroke-width: 1.5;
}

.journey-track-bypass {
  stroke: var(--portal-accent-border);
}

.journey-track-optional {
  stroke: var(--portal-line-strong);
  stroke-width: 1.5;
  stroke-dasharray: 5 8;
}

.journey-track-light {
  stroke: var(--portal-glow);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 12 88;
  filter: drop-shadow(0 0 5px var(--portal-glow));
  animation: journeyLightSweep 2.9s cubic-bezier(0.22, 0.61, 0.36, 1) 0.2s both;
}

.potential-stage-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(3, 180px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.potential-stage {
  grid-row: var(--stage-row);
  grid-column: var(--stage-column);
  align-self: start;
  min-width: 0;
}

.potential-stage > button,
.potential-stage > div {
  display: grid;
  width: 100%;
  justify-items: center;
  gap: 9px;
  padding: 59px 6px 0;
  border: 0;
  background: transparent;
  color: var(--portal-text);
  text-align: center;
}

.potential-stage > button { cursor: pointer; }

.potential-stage-number {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  margin: 0;
  place-items: center;
  border: 1px solid var(--portal-line-strong);
  border-radius: 50%;
  background: var(--portal-panel-strong);
  color: var(--portal-muted);
  font-size: 0.78rem;
  font-weight: 820;
  transition: transform 160ms ease;
}

.potential-stage > button:hover .potential-stage-number { transform: scale(1.08); }

.potential-stage.is-done .potential-stage-number {
  border-color: var(--portal-text);
  background: var(--portal-text);
  color: var(--portal-bg);
}

.potential-stage.is-current .potential-stage-number {
  width: 52px;
  height: 52px;
  margin-block: -5px;
  border-color: var(--portal-accent);
  color: var(--portal-accent);
  box-shadow: 0 0 0 8px var(--portal-accent-soft), 0 0 30px var(--portal-glow);
}

.potential-stage.is-optional .potential-stage-number {
  border-style: dashed;
}

.potential-stage.is-planned { opacity: 0.66; }

.potential-stage-copy {
  display: grid;
  max-width: 142px;
  gap: 3px;
  justify-items: center;
}

.potential-stage-copy strong {
  font-size: 0.84rem;
  line-height: 1.25;
}

.potential-stage-copy small {
  color: var(--portal-muted);
  font-size: 0.7rem;
  line-height: 1.25;
}

.potential-stage-copy em {
  margin-top: 2px;
  padding: 3px 7px;
  border: 1px solid var(--portal-accent-border);
  border-radius: 999px;
  color: var(--portal-accent);
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 740;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.optional-path-label {
  position: absolute;
  top: 145px;
  left: 41%;
  z-index: 3;
  display: grid;
  width: 190px;
  gap: 2px;
  padding: 9px 11px;
  border: 1px dashed var(--portal-line-strong);
  border-radius: 11px;
  background: var(--portal-panel-strong);
  text-align: center;
  transform: translateX(-50%);
}

.optional-path-label span {
  color: var(--portal-muted);
  font-size: 0.62rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.optional-path-label strong { font-size: 0.78rem; }

.optional-path-label small {
  color: var(--portal-muted);
  font-size: 0.68rem;
  line-height: 1.35;
}

@media (max-width: 1180px) {
  .potential-journey-wrap { overflow-x: auto; }
}
