.shell {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 1460px;
  margin: 0 auto;
  padding: clamp(14px, 1.8vw, 20px);
  border: 1px solid rgba(101, 156, 228, 0.18);
  border-radius: 24px;
  background:
    radial-gradient(circle at 18% 12%, rgba(42, 118, 255, 0.1), transparent 28%),
    radial-gradient(circle at 86% 12%, rgba(73, 198, 255, 0.05), transparent 24%),
    linear-gradient(180deg, rgba(10, 22, 40, 0.96), rgba(7, 17, 31, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(205, 231, 255, 0.05),
    0 22px 54px rgba(2, 8, 20, 0.2),
    0 0 26px rgba(52, 135, 255, 0.06);
  overflow: hidden;
}

.shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(113, 157, 224, 0.04), transparent 72%);
  pointer-events: none;
}

.flowLine {
  position: absolute;
  top: 40px;
  left: calc(12.5% + 14px);
  right: calc(12.5% + 14px);
  height: 1px;
  background:
    linear-gradient(90deg, rgba(113, 164, 232, 0.12), rgba(122, 205, 255, 0.34), rgba(113, 164, 232, 0.12));
  pointer-events: none;
}

.flowLine::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(165, 219, 255, 0.52) 0.8px, transparent 1px);
  background-size: 14px 1px;
  opacity: 0.7;
}

.flowNode {
  position: absolute;
  top: 35px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #7cdaff;
  box-shadow:
    0 0 0 5px rgba(124, 218, 255, 0.08),
    0 0 16px rgba(67, 156, 255, 0.16);
  pointer-events: none;
}

.flowNodeOne {
  left: calc(25% - 5px);
}

.flowNodeTwo {
  left: calc(50% - 5px);
}

.flowNodeThree {
  left: calc(75% - 5px);
}

.step {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 8px;
  min-height: 152px;
  padding: 8px 14px 6px;
  border: 0;
  border-right: 1px solid rgba(124, 163, 206, 0.12);
  background: transparent;
  color: inherit;
  text-align: center;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

.step:last-child {
  border-right: 0;
}

.step:hover,
.step:focus-visible {
  transform: translateY(-4px);
}

.stepActive {
  box-shadow: inset 0 0 0 1px rgba(100, 174, 255, 0.12);
  border-radius: 18px;
  background: rgba(10, 23, 42, 0.36);
}

.stepNumber {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(101, 156, 228, 0.14);
  background: rgba(9, 21, 37, 0.86);
  color: rgba(177, 202, 228, 0.72);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease;
}

.stepIconWrap {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(101, 156, 228, 0.12);
  background: rgba(10, 23, 42, 0.72);
}

.stepIcon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(18, 39, 67, 0.8);
  color: rgba(143, 190, 236, 0.58);
  transition:
    color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.step strong {
  color: rgba(235, 241, 250, 0.88);
  font-size: 0.98rem;
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -0.03em;
  transition: color 180ms ease;
}

.stepDescription {
  max-width: none;
  color: rgba(185, 203, 224, 0.68);
  font-size: 0.76rem;
  line-height: 1.35;
  transition: color 180ms ease;
}

.stepIndicator {
  width: 34px;
  height: 3px;
  margin-top: auto;
  border-radius: 999px;
  background: rgba(138, 152, 170, 0.32);
  transition:
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.stepActive .stepNumber {
  border-color: rgba(103, 181, 255, 0.34);
  color: #f8fbff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 18px rgba(69, 154, 255, 0.14);
}

.stepActive .stepIcon {
  background: rgba(31, 88, 168, 0.88);
  color: #9fe0ff;
  box-shadow: 0 0 18px rgba(69, 154, 255, 0.12);
}

.stepActive strong {
  color: #fafcff;
}

.stepActive .stepDescription {
  color: rgba(214, 226, 241, 0.84);
}

.stepActive .stepIndicator {
  background: linear-gradient(90deg, #5f9fff 0%, #8ae0ff 100%);
  box-shadow: 0 0 12px rgba(95, 159, 255, 0.16);
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
  }

  .step {
    min-height: 148px;
  }

  .flowLine,
  .flowNode {
    display: none;
  }

  .step:nth-child(2n) {
    border-right: 0;
  }

  .step:nth-child(n + 3) {
    border-top: 1px solid rgba(124, 163, 206, 0.12);
  }
}

@media (max-width: 640px) {
  .shell {
    grid-template-columns: 1fr;
    padding: 16px;
    border-radius: 20px;
  }

  .step {
    min-height: 0;
    padding: 14px 12px;
    border-right: 0;
    border-top: 1px solid rgba(124, 163, 206, 0.12);
  }

  .step:first-child {
    border-top: 0;
  }

  .step strong {
    font-size: 1rem;
  }

  .stepDescription {
    font-size: 0.82rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .step,
  .stepNumber,
  .stepIcon,
  .stepIndicator {
    transition: none;
  }

  .step:hover,
  .step:focus-visible {
    transform: none;
  }
}
