.intake-flow {
  --routing-rail: color-mix(in srgb, var(--ink) 34%, var(--paper));
  --routing-accent: var(--okay);
  --routing-node-fill: color-mix(in srgb, var(--line) 28%, var(--white));
  --routing-loop: 14s;
  --routing-junction: 2rem;
  --routing-gap: 1.35rem;
  --routing-lane-gap: 0.7rem;
  --routing-port: 2.25rem;
  --routing-pad: 0.58rem;
  --routing-class-x: calc(75% + var(--routing-gap) / 4);
  display: grid;
  gap: var(--routing-lane-gap);
  margin: 2.2rem 0 0;
  container-type: inline-size;
}
.intake-flow :is(.routing-routes, .routing-stages) { list-style: none; padding: 0; margin: 0; }
.intake-flow .routing-graph {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.intake-flow .routing-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--routing-gap) minmax(0, 1fr);
  align-items: stretch;
}
.intake-flow .routing-node {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: center;
  gap: 0.12rem;
  min-width: 0;
  padding: var(--routing-pad);
  border: 1px solid var(--line);
  border-radius: 0.18rem;
  background: var(--routing-node-fill);
}
.intake-flow strong { display: block; font-weight: 500; }
.intake-flow .routing-icon {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--ink);
}
.intake-flow :is(.routing-entry, .routing-stages) .routing-node .routing-icon {
  margin-block-end: 0.14rem;
}
.intake-flow .routing-source { --routing-delay: 0s; }
.intake-flow .routing-category {
  --routing-delay: 1.5s;
  background: color-mix(in srgb, var(--line) 58%, var(--white));
}
.intake-flow .routing-node::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: color-mix(in srgb, var(--routing-accent) 9%, var(--paper));
  box-shadow: inset 0 0 0 1px var(--routing-accent);
  opacity: 0;
  pointer-events: none;
  animation: steel-horizontal-node var(--routing-loop) var(--routing-delay, 0s) infinite;
}
.intake-flow .routing-arrow { position: relative; min-width: 0; --routing-wire-delay: 0.7s; }
.intake-flow .routing-arrow::before {
  content: "";
  position: absolute;
  inset-inline: 0 3px;
  inset-block-start: 50%;
  block-size: 1px;
  background: var(--routing-rail);
  animation: steel-horizontal-line var(--routing-loop) var(--routing-wire-delay) infinite;
}
.intake-flow .routing-arrow::after {
  content: "";
  position: absolute;
  inset-inline-end: 3px;
  inset-block-start: 50%;
  inline-size: 5px;
  block-size: 5px;
  border-block-start: 1px solid var(--routing-rail);
  border-inline-end: 1px solid var(--routing-rail);
  transform: translateY(calc(-50% + 0.5px)) rotate(45deg);
}
.intake-flow .routing-fork {
  position: relative;
  block-size: var(--routing-junction);
}
.intake-flow .routing-fork::before {
  content: "";
  position: absolute;
  inset-inline-start: var(--routing-class-x);
  inset-block: 0 50%;
  inline-size: 1px;
  background: var(--routing-rail);
}
.intake-flow .routing-fork::after {
  content: "";
  position: absolute;
  inset-inline: calc(var(--routing-junction) / 2) calc(100% - var(--routing-class-x) - 1px);
  inset-block: 50% 0;
  border-block-start: 1px solid var(--routing-rail);
  border-inline-start: 1px solid var(--routing-rail);
}
.intake-flow .routing-routes {
  display: grid;
  gap: var(--routing-lane-gap);
  padding-inline-start: var(--routing-junction);
}
.intake-flow .routing-route {
  position: relative;
  display: grid;
  grid-template-columns: minmax(100px, 1fr) var(--routing-gap) minmax(0, 3.5fr);
  align-items: start;
}
.intake-flow .routing-route::before {
  content: "";
  position: absolute;
  inset-inline-start: calc(-1 * var(--routing-junction) / 2);
  inset-block: 0 calc(-1 * var(--routing-lane-gap));
  inline-size: 1px;
  background: var(--routing-rail);
}
.intake-flow .routing-route:last-child::before { inset-block-end: calc(100% - var(--routing-port) - 1px); }
.intake-flow .routing-branch-wire {
  position: absolute;
  inset-inline: calc(-1 * var(--routing-junction) / 2) auto;
  inset-block-start: calc(var(--routing-port) - 8px);
  inline-size: calc(var(--routing-junction) / 2);
  block-size: 16px;
  --routing-wire-delay: calc(var(--routing-delay) - 0.2s);
}
.intake-flow .routing-lane { min-block-size: calc(var(--routing-port) * 2); }
.intake-flow .routing-lane-arrow {
  block-size: calc(var(--routing-port) * 2);
  --routing-wire-delay: calc(var(--routing-delay) + 0.35s);
}
.intake-flow .routing-order { --routing-delay: 2.75s; }
.intake-flow .routing-faq { --routing-delay: 9.15s; }
.intake-flow .routing-other { --routing-delay: 11.45s; }
.intake-flow .routing-items { --routing-delay: 3.4s; }
.intake-flow .routing-verify { --routing-delay: 4.85s; }
.intake-flow .routing-confirm { --routing-delay: 7.75s; }
.intake-flow .routing-stages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--routing-gap);
}
.intake-flow .routing-stage-arrow {
  position: absolute;
  inset-inline-start: 100%;
  inset-block: 0;
  inline-size: var(--routing-gap);
  --routing-wire-delay: calc(var(--routing-delay) + 0.6s);
}
.intake-flow .routing-result {
  min-block-size: calc(var(--routing-port) * 2);
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 0.55rem;
}
.intake-flow .routing-result .text-small { display: block; }
.intake-flow .routing-faq .routing-result { --routing-delay: 9.8s; }
.intake-flow .routing-other .routing-result { --routing-delay: 12.1s; }
.intake-flow .routing-recheck {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  padding-block-start: 0.5rem;
}
.intake-flow .routing-recheck strong { display: inline; }
.intake-flow .routing-recheck .routing-icon {
  flex: none;
  align-self: start;
  animation: steel-horizontal-recheck var(--routing-loop) 6.25s infinite;
}
@keyframes steel-horizontal-node {
  0%, 14%, 100% { opacity: 0; }
  3%, 9% { opacity: 1; }
}
@keyframes steel-horizontal-line {
  0%, 15%, 100% { background: var(--routing-rail); }
  4%, 10% { background: var(--routing-accent); }
}
@keyframes steel-horizontal-recheck {
  0%, 15%, 100% { color: var(--ink); }
  4%, 10% { color: var(--routing-accent); }
}
@container (min-width: 850px) {
  .intake-flow .routing-graph {
    grid-template-columns: minmax(235px, 0.9fr) var(--routing-junction) minmax(0, 2.05fr);
    align-items: center;
  }
  .intake-flow .routing-routes { padding-inline-start: 0; }
  .intake-flow .routing-route:first-child::before { inset-block-start: var(--routing-port); }
  .intake-flow .routing-fork::before {
    inset-inline: 0 50%;
    inset-block: 50% auto;
    inline-size: auto;
    block-size: 1px;
  }
  .intake-flow .routing-fork::after { content: none; }
  .intake-flow .routing-fork span {
    position: absolute;
    inset-inline-start: calc(50% - 1px);
    inset-block-start: calc(50% - 1px);
    inline-size: 3px;
    block-size: 3px;
    background: var(--routing-rail);
  }
}
@container (max-width: 585px) {
  .intake-flow .routing-graph {
    --routing-junction: 1.5rem;
    --routing-port: 1.6rem;
  }
  .intake-flow .routing-route { grid-template-columns: minmax(0, 1fr); }
  .intake-flow .routing-stages { grid-template-columns: minmax(0, 1fr); }
  .intake-flow .routing-lane-arrow,
  .intake-flow .routing-stage-arrow {
    inline-size: var(--routing-gap);
    block-size: var(--routing-gap);
    transform: rotate(90deg);
  }
  .intake-flow .routing-lane-arrow { justify-self: center; }
  .intake-flow .routing-stage-arrow {
    inset-inline-start: calc(50% - var(--routing-gap) / 2);
    inset-block: 100% auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .intake-flow .routing-node::before,
  .intake-flow .routing-arrow::before,
  .intake-flow .routing-recheck .routing-icon { animation: none; }
}

.intake-flow h2 { font-size: 1.35rem; line-height: 1.18; }
.intake-flow .routing-meta { font-size: .8125rem; color: var(--muted); }
