.cz-dark-flow {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 1 / 1.89;
  overflow: hidden;
  background: #171614;
  color: #f6f2f0;
  font-family: var(--cz-font);
}

.cz-dark-flow .cz-marketplace-statusbar {
  background: #171614;
  color: #f6f2f0;
}
.cz-dark-flow .cz-marketplace-island { background: #080807; }

.cz-dark-flow__title {
  padding: 16.5cqw 4cqw 0;
  text-align: center;
  font-size: 5.35cqw;
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.12;
}

.cz-dark-flow__diagram {
  position: relative;
  isolation: isolate;
  height: 125cqw;
  margin: 3cqw 3.2cqw 0;
}

.cz-dark-flow__diagram > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.cz-dark-flow__diagram path {
  fill: none;
  stroke-width: .7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cz-dark-flow__wire { stroke: #fff; }
.cz-dark-flow__trace { stroke: #fa5d98; opacity: 0; }

.cz-dark-flow__step {
  position: absolute;
  top: calc(var(--row) * 100% / 140);
  left: var(--column, 50%);
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.7cqw;
  width: var(--step-width, 77%);
  min-height: var(--step-height, 13cqw);
  border: 1px solid #3c3639;
  border-radius: 3.8cqw;
  padding: 1.8cqw 2.2cqw;
  background: #252220;
  color: #f6f2f0;
  text-align: center;
  font-size: 3.8cqw;
  font-weight: 650;
  line-height: 1.2;
}

.cz-dark-flow__step i {
  flex: 0 0 5cqw;
  color: #fba0c3;
}
.cz-dark-flow__step i svg { display: block; width: 100%; }
.cz-dark-flow__step small {
  display: block;
  margin-top: .7cqw;
  font-size: .9em;
  font-weight: 500;
}

/* Successful outcomes use the same resting state in the hero and static preview. */
.cz-dark-flow__step[data-flow-final] {
  border-color: #38614e;
  background: #203d32;
  color: #d2f0df;
}
.cz-dark-flow__step[data-flow-final] i { color: inherit; }

@media (prefers-reduced-motion: no-preference) {
  .cz-dark-flow.is-playing .cz-dark-flow__trace {
    /* The dash enters at the start of the path and leaves at the end. */
    --trace-from: var(--signal-length, .14);
    --trace-to: -1;
    stroke-dasharray: var(--signal-length, .14) 1;
    stroke-linecap: butt;
    opacity: 1;
    filter: drop-shadow(0 0 1.6px #fb4d8d);
    animation: cz-feature-trace var(--trace-duration) var(--trace-at) linear both;
  }
  .cz-dark-flow.is-playing .cz-dark-flow__step {
    animation: cz-dark-flow-step .65s var(--step-at) ease-out both;
  }
  .cz-dark-flow.is-playing [data-flow-final] {
    animation-name: cz-dark-flow-complete;
  }

  .cz-dark-flow.is-paused :is(.cz-dark-flow__trace, .cz-dark-flow__step) {
    animation-play-state: paused;
  }
}

@keyframes cz-dark-flow-step {
  0% { border-color: #3c3639; }
  30% { border-color: #ea77a5; box-shadow: 0 0 2.7cqw #fb4d8d39; }
  100% { border-color: #3c3639; }
}

@keyframes cz-dark-flow-complete {
  0% { border-color: #3c3639; background: #252220; color: #f6f2f0; }
  38% { border-color: #87deb0; box-shadow: 0 0 4cqw #77d6a84d; }
  100% { border-color: #38614e; background: #203d32; color: #d2f0df; }
}
