.steps__route,
.steps__joint {
  display: none;
}

#how-title {
  max-width: 12em;
  font-size: clamp(1.85rem, 8vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

#how-title .scroll-highlight__word {
  display: inline;
}

#how-it-works .section__lead {
  max-width: 36rem;
  font-size: 1.05rem;
  line-height: 1.5;
}

#how-it-works .eyebrow {
  color: #7d6e9e;
}

.steps__marker {
  padding-top: 16px;
}

.steps__card {
  border: 1px solid rgba(214, 190, 242, 0.55);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 34px rgba(70, 40, 120, 0.08);
}

.steps__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #f3eeff;
  color: #6d46f5;
}

.steps__icon svg {
  width: 22px;
  height: 22px;
}

.steps__when {
  margin-top: 12px;
  color: #6d46f5;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
}

.steps__yield {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(196, 181, 253, 0.55);
}

.steps__yield-label {
  display: block;
  color: #8a8298;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.steps__yield-value {
  display: block;
  margin-top: 4px;
  color: #6d46f5;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

[data-theme="dark"] #how-it-works .eyebrow {
  color: #c5b4f0;
}

[data-theme="dark"] .steps__card {
  border-color: rgba(196, 176, 230, 0.22);
  background: rgba(28, 22, 42, 0.92);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

[data-theme="dark"] .steps__icon {
  background: rgba(109, 70, 245, 0.18);
  color: #d2c6ff;
}

[data-theme="dark"] .steps__when,
[data-theme="dark"] .steps__yield-value {
  color: #d2c6ff;
}

[data-theme="dark"] .steps__yield {
  border-top-color: rgba(196, 176, 230, 0.28);
}

[data-theme="dark"] .steps__yield-label {
  color: #b7adc8;
}

@media (min-width: 1024px) {
  #how-it-works {
    background-color: #f6f4fb;
    background-image: radial-gradient(rgba(109, 70, 245, 0.16) 1.05px, transparent 1.2px);
    background-size: 18px 18px;
  }

  #how-it-works .shell {
    width: min(100% - 48px, 1180px);
  }

  #how-it-works .how-head {
    position: relative;
    z-index: 2;
    max-width: min(34rem, 36%);
  }

  #how-title {
    max-width: 12em;
    margin-top: 8px;
    font-size: clamp(2.35rem, 2.85vw, 3.15rem);
  }

  #how-it-works .section__lead {
    margin-top: 14px;
    font-size: 1.05rem;
  }

  #how-it-works .steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0 16px;
    align-items: start;
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 0;
    margin-top: -10.75rem;
    padding: 4px 0 8px;
  }

  #how-it-works .steps::before,
  #how-it-works .steps::after {
    display: none;
  }

  .steps__route {
    display: block;
    position: absolute;
    z-index: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
  }

  .steps__route-track,
  .steps__route-draw {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
  }

  .steps__route-track {
    stroke: color-mix(in srgb, var(--accent) 32%, white);
    stroke-width: 2;
  }

  .steps__route-draw {
    stroke: #7c4dff;
    stroke-width: 2.5;
    stroke-dasharray: 1;
    stroke-dashoffset: calc(1 - var(--step-progress));
  }

  .steps__joint {
    display: block;
    position: absolute;
    z-index: 1;
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -4px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 2px #c4b2f5;
    pointer-events: none;
  }

  #how-it-works .steps__item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    height: auto;
    padding: var(--rise, 0) 0 0;
  }

  #how-it-works .steps__item:nth-child(1 of .steps__item) { --rise: 268px; }
  #how-it-works .steps__item:nth-child(2 of .steps__item) { --rise: 206px; }
  #how-it-works .steps__item:nth-child(3 of .steps__item) { --rise: 148px; }
  #how-it-works .steps__item:nth-child(4 of .steps__item) { --rise: 74px; }
  #how-it-works .steps__item:nth-child(5 of .steps__item) { --rise: 0; }

  #how-it-works .steps__marker {
    align-self: center;
    padding-top: 0;
  }

  #how-it-works .steps__num {
    width: 46px;
    height: 46px;
    font-size: 1.05rem;
    box-shadow: 0 0 0 5px #f6f4fb;
  }

  #how-it-works .steps__card {
    min-height: 0;
    padding: 18px 16px 16px;
    border-radius: 14px;
  }

  #how-it-works .steps__item h3 {
    font-size: 1.2rem;
  }

  #how-it-works .steps__copy {
    font-size: 0.95rem;
  }

  [data-theme="dark"] #how-it-works {
    background-color: var(--bg-soft);
    background-image: radial-gradient(rgba(210, 198, 255, 0.14) 1px, transparent 1.2px);
  }

  [data-theme="dark"] #how-it-works .steps__num {
    box-shadow: 0 0 0 5px var(--bg-soft);
  }

  [data-theme="dark"] .steps__joint {
    background: #1a1424;
    box-shadow: 0 0 0 2px #a78bfa;
  }
}

@media (min-width: 1240px) {
  #how-it-works .how-head {
    max-width: 34rem;
  }
}
