.s-how {
  position: relative;
  overflow: clip;
}

.s-how__steps-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.s-how__row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.s-how__row--second {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.s-how__step-item {
  position: relative;
  min-width: 0;
}

.s-how__step-item:not(:last-child):not(.s-how__banner-item)::after {
  content: "";
  position: absolute;
  top: 2.375rem;
  right: calc(-0.625rem - 1px);
  width: 1.25rem;
  height: 1.25rem;
  z-index: var(--z-base);
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 10H16' stroke='%231B3A8A' stroke-width='1.8' stroke-linecap='round'/%3E%3Cpath d='M11 5L16 10L11 15' stroke='%231B3A8A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.72;
  pointer-events: none;
}

.s-how__row--second .s-how__step-item:last-of-type::after {
  display: none;
}

.s-how__step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
  padding: 1.75rem 1.5rem;
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base);
}

.s-how__step:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
}

.s-how__step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--brand);
  color: var(--white);
  font-size: var(--fs-15);
  font-weight: var(--fw-700);
  line-height: 1;
  flex-shrink: 0;
}

.s-how__step-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.s-how__step-title {
  font-size: var(--fs-16);
  font-weight: var(--fw-600);
  line-height: 1.35;
  color: var(--text-dark);
  letter-spacing: -0.01em;
}

.s-how__step-text {
  font-size: var(--fs-14);
  line-height: 1.55;
  color: var(--text-gray);
}

.s-how__step-time {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.25rem;
  font-size: var(--fs-12);
  font-weight: var(--fw-500);
  line-height: 1.25;
  color: var(--text-gray);
}

.s-how__step-time-icon {
  flex-shrink: 0;
  color: var(--text-gray);
}

.s-how__step--important {
  border-color: rgba(27, 58, 138, 0.25);
  box-shadow: 0 4px 16px rgba(27, 58, 138, 0.08);
}

.s-how__step-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-xs);
  background: var(--bg-green);
  color: var(--green);
  font-size: var(--fs-12);
  font-weight: var(--fw-600);
  line-height: 1.5;
  white-space: nowrap;
}

.s-how__step--final {
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: var(--shadow-brand-lg);
}

.s-how__step--final:hover {
  border-color: var(--brand-700);
  box-shadow: 0 8px 28px rgba(27, 58, 138, 0.42);
}

.s-how__step--final .s-how__step-title {
  color: var(--white);
}

.s-how__step--final .s-how__step-text {
  color: rgba(255, 255, 255, 0.8);
}

.s-how__step-num--final {
  background: rgba(255, 255, 255, 0.94);
  color: var(--brand);
}

.s-how__step-time--final {
  color: rgba(255, 255, 255, 0.7);
}

.s-how__step-time--final .s-how__step-time-icon {
  color: rgba(255, 255, 255, 0.7);
}

.s-how__banner-item {
  grid-column: span 2;
}

.s-how__banner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  height: 100%;
  padding: 1.75rem 2rem;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0) 100%),
    var(--bg-green);
  box-shadow: 0 8px 22px rgba(22, 163, 74, 0.08);
}

.s-how__banner-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-md);
  background: var(--green);
  color: var(--white);
  flex-shrink: 0;
  box-shadow: 0 8px 18px rgba(22, 163, 74, 0.22);
}

.s-how__banner-body {
  min-width: 0;
}

.s-how__banner-title {
  margin-bottom: 0.375rem;
  font-size: var(--fs-18);
  font-weight: var(--fw-700);
  line-height: 1.35;
  color: var(--green-700);
  letter-spacing: -0.02em;
}

.s-how__banner-text {
  font-size: var(--fs-14);
  line-height: 1.6;
  color: #166534;
}

@media (max-width: 64rem) {
  .s-how__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .s-how__row--second {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .s-how__banner-item {
    grid-column: span 2;
  }

  .s-how__step-item:not(.s-how__banner-item)::after {
    top: 2.25rem;
  }

  .s-how__step-item:nth-child(2)::after,
  .s-how__step-item:nth-child(4)::after {
    display: none;
  }

  .s-how__row--second .s-how__step-item:nth-child(1)::after {
    display: block;
  }

  .s-how__row--second .s-how__step-item:nth-child(2)::after {
    display: none;
  }
}

@media (max-width: 47.99875rem) {
  .s-how__steps-wrapper {
    gap: 0.75rem;
  }

  .s-how__row,
  .s-how__row--second {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .s-how__step-item {
    padding-bottom: 0;
  }

  .s-how__step-item:not(:last-child):not(.s-how__banner-item)::after {
    content: "";
    top: auto;
    right: auto;
    bottom: calc(-0.625rem - 1px);
    left: 1.5625rem;
    width: 1.25rem;
    height: 1.25rem;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 4L10 16' stroke='%231B3A8A' stroke-width='1.8' stroke-linecap='round'/%3E%3Cpath d='M5 11L10 16L15 11' stroke='%231B3A8A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }

  .s-how__step {
    border-radius: var(--radius-md);
    padding: 1.25rem;
    gap: 0.5rem;
  }

  .s-how__step-num {
    width: 2rem;
    height: 2rem;
    font-size: var(--fs-14);
  }

  .s-how__step-title {
    font-size: var(--fs-15);
  }

  .s-how__banner-item {
    grid-column: 1;
    margin-top: 0.75rem;
  }

  .s-how__banner {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
    gap: 1rem;
  }

  .s-how__banner-icon {
    margin-inline: auto;
  }

  .s-how__row--second .s-how__step-item:nth-child(2)::after {
    display: block;
  }

  .s-how__row--second .s-how__step-item:nth-child(2) {
    padding-bottom: 0;
  }

  .s-how .reveal--delay-1,
  .s-how .reveal--delay-2,
  .s-how .reveal--delay-3,
  .s-how .reveal--delay-4 {
    transition-delay: 0s;
  }
}

@media (hover: none), (pointer: coarse) {
  .s-how__step:hover {
    border-color: var(--border);
    box-shadow: none;
  }

  .s-how__step--important:hover {
    border-color: rgba(27, 58, 138, 0.25);
    box-shadow: 0 4px 16px rgba(27, 58, 138, 0.08);
  }

  .s-how__step--final:hover {
    border-color: var(--brand);
    box-shadow: var(--shadow-brand-lg);
  }
}