.steps {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 22px 18px 1fr auto;
  gap: 10px;
  align-items: center;
  box-sizing: border-box;
  min-height: 44px;
  padding: 0 16px 0 12px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 14px;
  transition: background-color 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, color 0.24s ease;
}

.step > .icon {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.step-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  box-sizing: border-box;
  border-radius: 50%;
}

.step-mark::before {
  content: '';
  width: 7px;
  height: 7px;
  box-sizing: border-box;
  border: 1.5px solid var(--ink-line);
  border-radius: 50%;
}

.step-mark .orb {
  --orb-size: 18px;
  display: none;
}

.step[data-state="current"] .step-mark .orb { display: inline-block; }

.step-count {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.step[data-state="done"] { color: var(--ink); }

.step[data-state="done"] .step-mark {
  background: var(--glass-card);
  box-shadow: var(--shadow-dot);
}

.step[data-state="done"] .step-mark::before {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 0;
  background: var(--good);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1.8 5.2 4 7.3 8.2 2.8' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1.8 5.2 4 7.3 8.2 2.8' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.step[data-state="current"] {
  border-color: var(--glass-rim);
  background: var(--glass-card);
  box-shadow: var(--shadow-dot);
  color: var(--ink);
  font-weight: 500;
}

.step[data-state="current"]::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 30%, rgba(204, 178, 255, 0.22) 45%, rgba(242, 92, 168, 0.12) 52%, rgba(255, 255, 255, 0) 66%) 0 0 / 250% 100% no-repeat;
  pointer-events: none;
  animation: step-sheen 2.6s var(--ease-swap) infinite;
}

.step[data-state="current"] .step-mark::before { content: none; }

.step[data-state="current"] > .icon { opacity: 1; }

.step[data-state="next"] { color: var(--ink-faint); }

.step[data-state="failed"] { color: var(--bad); }

.step[data-state="failed"] .step-mark { background: rgba(180, 47, 70, 0.1); }

.step[data-state="failed"] .step-mark::before {
  width: 2px;
  height: 9px;
  border: 0;
  border-radius: 1px;
  background: var(--bad);
  box-shadow: 0 6px 0 -0.5px var(--bad);
  transform: translateY(-2px);
}

@keyframes step-sheen {
  from { background-position: 120% 0; }
  to { background-position: -40% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .step { transition: none; }
  .step[data-state="current"]::after { animation: none; }
}
