/* The existing visit journey carries a quiet pulse from one step to the next. */
.visit-steps[data-flow-ready="true"] {
  position: relative;
  isolation: isolate;
}

.visit-steps[data-flow-ready="true"] .visit-step::after { display: none; }

.visit-flow-paths {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: -1;
}

.visit-flow-line {
  fill: none;
  stroke: #d0d0ca;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.visit-flow-beam {
  fill: none;
  stroke: #da251b;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-dasharray: 18 140;
  stroke-dashoffset: 20;
  vector-effect: non-scaling-stroke;
  opacity: 0;
}

.visit-flow-beam--glow {
  stroke-width: 6;
  filter: blur(3px);
}

.visit-steps[data-flow-motion="enabled"] .step-number {
  animation: visit-node 16s ease-in-out var(--flow-delay, 0s) infinite both !important;
  animation-play-state: paused !important;
}

.visit-steps[data-flow-motion="enabled"] .visit-flow-beam {
  animation: visit-beam 16s linear var(--flow-delay, 0s) infinite both !important;
  animation-play-state: paused !important;
}

.visit-steps[data-flow-motion="enabled"][data-flow-running="true"] .step-number,
.visit-steps[data-flow-motion="enabled"][data-flow-running="true"] .visit-flow-beam {
  animation-play-state: running !important;
}

/* Each highlight lasts about three seconds. The final six seconds stay quiet. */
@keyframes visit-node {
  0%, 3%, 22%, 100% {
    background-color: var(--paper, #f3f3f1);
    color: var(--red-text, #ce2118);
    border-color: var(--red, #da251b);
    box-shadow: 0 0 0 0 #da251b00, 0 0 0 #da251b00;
  }
  8%, 14% {
    background-color: #da251b;
    color: #fff;
    border-color: #da251b;
    box-shadow: 0 0 0 6px #da251b0d, 0 0 24px #da251b16;
  }
}

@keyframes visit-beam {
  0%, 10% { stroke-dashoffset: 20; opacity: 0; }
  13% { opacity: .8; }
  27% { stroke-dashoffset: -100; opacity: .8; }
  30%, 100% { stroke-dashoffset: -120; opacity: 0; }
}
