.step-progress {
  display: grid;
  gap: 12px;
  margin: 14px 0 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.step-progress__header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: baseline;
  justify-content: space-between;
}

.step-progress__counter {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.step-progress__title {
  color: var(--ink, #18212f);
  font-size: 16px;
}

.step-progress__steps {
  display: grid;
  grid-template-columns: repeat(var(--step-progress-count, 5), minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-progress__item {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  text-align: center;
}

.step-progress__item::after {
  content: "";
  position: absolute;
  top: 14px;
  left: calc(50% + 18px);
  right: calc(-50% + 18px);
  height: 2px;
  background: #cbd8e2;
}

.step-progress__item:last-child::after {
  content: none;
}

.step-progress__marker {
  z-index: 1;
  display: inline-grid;
  place-items: center;
  justify-self: center;
  width: 28px;
  height: 28px;
  color: var(--muted);
  border: 2px solid #b8c7d3;
  border-radius: 50%;
  background: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.step-progress__label {
  overflow-wrap: anywhere;
  color: inherit;
  font-size: 13px;
  font-weight: 700;
}

.step-progress__state {
  color: inherit;
  font-size: 11px;
}

.step-progress__item.is-complete {
  color: #176f42;
}

.step-progress__item.is-complete::after {
  background: #48a66d;
}

.step-progress__item.is-complete .step-progress__marker {
  color: #fff;
  border-color: #176f42;
  background: #176f42;
}

.step-progress__item.is-current {
  color: var(--accent);
}

.step-progress__item.is-current .step-progress__marker {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(8, 127, 140, 0.16);
}

.step-progress__item.is-current .step-progress__label,
.step-progress__item.is-current .step-progress__state {
  color: var(--ink, #18212f);
}

@media (max-width: 640px) {
  .step-progress__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .step-progress__steps {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .step-progress__item {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    grid-template-rows: auto;
    align-items: center;
    text-align: left;
  }

  .step-progress__item::after {
    top: 32px;
    bottom: -10px;
    left: 14px;
    right: auto;
    width: 2px;
    height: auto;
  }

  .step-progress__marker {
    justify-self: start;
  }

  .step-progress__state {
    text-align: right;
  }
}