/* The flow-chart hero. Headlines and descriptions are HTML in an ordered
   list. SVG draws only miniatures and connecting lines, and every SVG is
   aria-hidden. One layout at every width: a single downward column, so the
   chart can never break into a second row. */
.flow__caption {
  max-width: none;
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1.2;
  text-wrap: balance;
}

/* One sentence saying whose experience the chart shows. It is display text
   like the lede above it, so it escapes the measure cap. */
.flow__intro {
  max-width: none;
  margin-block-start: var(--space-1);
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--color-ink-soft);
  text-wrap: pretty;
}
.flow__steps {
  list-style: none;
  padding: 0;
  margin-block-start: var(--space-4);
  counter-reset: flow-step;
  display: grid;
}
.flow__step {
  counter-increment: flow-step;
  display: grid;
  grid-template-columns: calc(var(--space-5) * 1.25) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: var(--space-3);
}
.flow__mini {
  grid-column: 1;
  grid-row: 1;
  display: block;
  width: calc(var(--space-5) * 1.25);
  height: var(--space-6);
}
.flow__line {
  grid-column: 1;
  grid-row: 2;
  justify-self: center;
  position: relative;
  width: calc(var(--space-2) * 2);
  min-block-size: var(--space-4);
  margin-block: var(--space-1);
}
.flow__line > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* A branching step gets a longer line so the split is readable. */
.flow__line--fork { min-block-size: var(--space-5); }

/* Strokes come from the token and stay exactly that wide at any size. */
.flow svg { stroke-width: var(--border); }
.flow svg * { vector-effect: non-scaling-stroke; }

.flow__text {
  grid-column: 2;
  grid-row: 1 / -1;
  max-width: var(--measure);
  padding-block-end: var(--space-4);
}
.flow__step:last-child .flow__text { padding-block-end: 0; }
.flow__headline {
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.3;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.flow__headline::before {
  content: counter(flow-step) ". ";
  font-variant-numeric: tabular-nums;
}
.flow__description {
  margin-block-start: var(--space-1);
  font-size: var(--text-base);
  color: var(--color-ink-soft);
  text-wrap: pretty;
  overflow-wrap: break-word;
}

/* Same boundary as the phone overrides in tokens.css. 200% zoom of a
   laptop window lands here too. */
@media (max-width: 40rem) {
  .flow__step {
    grid-template-columns: var(--space-5) minmax(0, 1fr);
    column-gap: var(--space-2);
  }
  .flow__mini { width: var(--space-5); height: calc(var(--space-5) * 1.2); }
  .flow__text { padding-block-end: var(--space-3); }
  .flow__headline { font-size: var(--text-base); font-weight: 700; line-height: 1.35; }
  .flow__description { font-size: var(--text-sm); }
}

@media print {
  .flow__step { break-inside: avoid; }
}
