.steps__route,
.steps__joint,
.steps__icon {
  display: none;
}

@media (min-width: 1024px) {
  #how-it-works {
    background-color: var(--bg-soft);
    background-image: radial-gradient(rgba(109, 70, 245, 0.14) 1px, transparent 1.2px);
    background-size: 22px 22px;
  }

  #how-it-works .shell {
    display: grid;
    width: min(100% - 64px, 1340px);
  }

  #how-it-works .eyebrow {
    margin: 0;
    color: var(--ink);
    font-size: clamp(2.35rem, 3.3vw, 3.15rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.02;
    text-transform: none;
  }

  #how-title {
    order: 2;
    justify-self: end;
    max-width: 11em;
    margin: 20px 0 0;
    font-size: clamp(1.65rem, 2.2vw, 2.15rem);
    font-weight: 800;
    line-height: 1.08;
    text-align: right;
  }

  #how-it-works .steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: minmax(620px, auto);
    gap: 32px;
    align-items: stretch;
    width: 100%;
    max-width: none;
    height: 660px;
    min-height: 660px;
    order: 1;
    margin-top: 28px;
    padding-left: 0;
  }

  #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) 28%, transparent);
    stroke-width: 2;
  }

  .steps__route-draw {
    stroke: var(--accent);
    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 color-mix(in srgb, var(--accent) 55%, white);
    pointer-events: none;
  }

  #how-it-works .steps__item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    height: 100%;
    padding: var(--drop, 0) 0 0;
  }

  #how-it-works .steps__item:nth-child(1 of .steps__item) { --drop: 280px; }
  #how-it-works .steps__item:nth-child(2 of .steps__item) { --drop: 176px; }
  #how-it-works .steps__item:nth-child(3 of .steps__item) { --drop: 252px; }
  #how-it-works .steps__item:nth-child(4 of .steps__item) { --drop: 88px; }
  #how-it-works .steps__item:nth-child(5 of .steps__item) { --drop: 0; }

  #how-it-works .steps__marker {
    align-self: center;
  }

  #how-it-works .steps__num {
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
  }

  #how-it-works .steps__item > div {
    display: grid;
    align-content: start;
    gap: 8px;
    min-height: 196px;
    padding: 22px 18px 24px;
    border: 1px solid rgba(214, 190, 242, 0.55);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-soft);
  }

  .steps__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 6px;
    border-radius: 14px;
    background: #f3eeff;
    color: #6d46f5;
  }

  .steps__icon svg {
    width: 26px;
    height: 26px;
  }

  #how-it-works .steps__item h3 {
    font-size: 1.28rem;
  }

  #how-it-works .steps__item p {
    margin-top: 0;
    font-size: 1.02rem;
    line-height: 1.45;
  }
}

@media (min-width: 1024px) {
  [data-theme="dark"] #how-it-works {
    background-image: radial-gradient(rgba(210, 198, 255, 0.14) 1px, transparent 1.2px);
  }

  [data-theme="dark"] #how-it-works .steps__item > div {
    border-color: rgba(196, 176, 230, 0.22);
    background: rgba(28, 22, 42, 0.9);
    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__joint {
    background: #1a1424;
    box-shadow: 0 0 0 2px #a78bfa;
  }
}
