.journey-section {
  padding-top: 28px;
}

.journey {
  display: grid;
  gap: 24px;
}

.journey__header {
  display: grid;
  gap: 12px;
  max-width: 900px;
}

.journey__header h2,
.journey__header h3 {
  max-width: 18ch;
}

.journey__intro {
  max-width: 72ch;
  margin: 0;
}

.journey__rail,
.journey__fallback-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.journey__rail::before,
.journey__rail::after {
  content: "";
  position: absolute;
  top: 40px;
  left: 12.5%;
  right: 12.5%;
  height: 4px;
  border-radius: 999px;
  background: #d8e1ef;
}

.journey__rail::after {
  right: auto;
  width: var(--journey-progress-desktop, 0%);
  max-width: 75%;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--orange));
}

.journey--generic .journey__rail::after {
  display: none;
}

.journey-stage {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.journey-stage__button,
.journey__fallback-stage {
  display: grid;
  width: 100%;
  min-height: 198px;
  grid-template-rows: auto 1fr;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 18px 46px rgba(21, 24, 39, 0.08);
}

.journey-stage__button {
  font: inherit;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.journey-stage__button:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 22px 54px rgba(37, 99, 235, 0.13);
}

.journey-stage__button:focus-visible {
  outline: 3px solid rgba(249, 115, 22, 0.34);
  outline-offset: 3px;
}

.journey-stage__node {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border: 2px solid #b8c5d8;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-family: "Sora", system-ui, sans-serif;
  font-weight: 900;
}

.journey-stage__copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.journey-stage__tag,
.journey__fallback-stage span {
  display: inline-flex;
  width: fit-content;
  min-height: 28px;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.09);
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.journey-stage__label,
.journey__fallback-stage strong {
  font-family: "Sora", system-ui, sans-serif;
  font-size: 1.08rem;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.journey-stage__desc,
.journey__fallback-stage p {
  color: var(--muted);
  line-height: 1.55;
}

.journey__fallback-stage p {
  margin: 0;
}

.journey-stage__detail {
  margin: 10px 0 0;
  padding: 14px 16px;
  border: 1px solid rgba(21, 24, 39, 0.09);
  border-radius: 8px;
  background: #fff;
}

.journey-stage__detail ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.journey-stage__detail li {
  position: relative;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.45;
}

.journey-stage__detail li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--orange);
}

.journey-stage--done .journey-stage__node {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.journey-stage--current .journey-stage__button {
  border-color: rgba(249, 115, 22, 0.44);
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.1), rgba(255, 255, 255, 0.96));
}

.journey-stage--current .journey-stage__node {
  border-color: var(--orange);
  background: var(--orange);
  color: #fff;
  box-shadow: 0 0 0 8px rgba(249, 115, 22, 0.14);
}

.journey-stage--current .journey-stage__tag {
  background: rgba(249, 115, 22, 0.13);
  color: var(--orange-deep);
}

.journey-stage--locked .journey-stage__node {
  background: #f3f6fb;
  color: #78859a;
}

.journey-stage--locked .journey-stage__tag {
  background: #eef2f7;
  color: #667085;
}

.journey__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.journey__caption {
  max-width: 66ch;
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

.quiz-journey-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.quiz-journey-panel .journey__header h3 {
  max-width: none;
  font-size: clamp(1.25rem, 2.4vw, 1.8rem);
}

.quiz-journey-panel .journey__intro {
  font-size: 0.98rem;
}

.quiz-journey-panel .journey-stage__button {
  min-height: 186px;
  box-shadow: none;
}

@media (max-width: 860px) {
  .journey__rail,
  .journey__fallback-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .journey__rail::before,
  .journey__rail::after {
    display: none;
  }
}

@media (max-width: 680px) {
  .journey {
    gap: 20px;
  }

  .journey__rail,
  .journey__fallback-grid {
    grid-template-columns: 1fr;
  }

  .journey__rail::before,
  .journey__rail::after {
    display: block;
    top: 24px;
    bottom: 24px;
    left: 24px;
    right: auto;
    width: 4px;
    height: auto;
  }

  .journey__rail::after {
    height: var(--journey-progress-mobile, 0%);
    max-height: calc(100% - 48px);
  }

  .journey--generic .journey__rail::after {
    display: none;
  }

  .journey-stage__button,
  .journey__fallback-stage {
    min-height: 0;
    grid-template-columns: 48px minmax(0, 1fr);
    grid-template-rows: auto;
    align-items: start;
  }

  .journey-stage__detail {
    margin-left: 62px;
  }

  .journey__footer {
    display: grid;
    justify-content: stretch;
  }
}
