/* AV - How a call works (va-call-steps). Ported from the concept section 03-how.
   Signature moment "Talk, then act". A rail of numbered steps. A 24px citron pulse with a short
   trailing wake travels it as the track scrolls through view (no pinning), and the line behind it
   lights in signal. Nodes (20px half-discs) go pending (field-rest, scattered), now (paper), done
   (signal, facing right). The rail runs into the last step, a paper receipt, which prints when the
   pulse arrives: its 18 half-discs (12 x 24) snap into Ds and its label is marked in citron highlighter.
   The markup and these base rules are the final state. Everything that is "not yet" is scoped under
   .is-live, which only module.js adds, and never under reduced motion or ?static=1.
   Horizontal rail ("wide") from 1024px when the columns have room for their text; a vertical rail at
   x = 12px otherwise (see "The layout switch" below).
   The track carries --va-cs-n (steps before the receipt) from module.html.
   Everything is scoped under .va.va-call-steps and uses the tokens from va-kit.css. */

/* The layout switch. Every wide rule sits in @container va-cs (min-width: 55rem). The va-cs container
   only exists from 1024px, so at the default text size the switch is the 1024px breakpoint, as before;
   55rem follows the visitor's text size, so with larger text (150%, 200%) the six columns are used only
   where "Confirm." and "appointment" still fit in a column, and the vertical rail is used otherwise.
   module.js reads --va-cs-wide on the track to know which rail it is measuring. */
@media (min-width: 1024px) { .va.va-call-steps .va-wrap { container: va-cs / inline-size; } }

.va.va-call-steps {
  --node: 20px;
  --rail-w: 2px;
  --idx-h: 18px;                       /* mono index row: 13px at line-height 1.4 */
  --idx-gap: 14px;
  --rail-y: calc(var(--idx-h) + var(--idx-gap) + var(--node) / 2);
  --perf-pad: 18px;                    /* paper above the index row on the receipt */
  --rx: 20px;                          /* receipt inner padding */
  --trail: 120px;                      /* the pulse's wake */
  --ease-snap: var(--ease-out);
}

/* ---------- Header: eyebrow, H2, then the lead straight under it, at every width ---------- */
.va.va-call-steps .va-call-steps__head { display: grid; gap: 20px; }
.va.va-call-steps .va-call-steps__head-main { display: grid; gap: 20px; justify-items: start; }
.va.va-call-steps .va-call-steps__title { max-width: 18ch; }
.va.va-call-steps .va-call-steps__lead { max-width: 40ch; }

/* ---------- Track ---------- */
.va.va-call-steps .va-call-steps__track { position: relative; margin-top: 72px; timeline-scope: --va-cs-rail; }
@media (max-width: 767px) { .va.va-call-steps .va-call-steps__track { margin-top: 56px; } }
.va.va-call-steps .va-call-steps__probe { position: absolute; top: 0; left: 0; width: 0; height: 100vh; visibility: hidden; pointer-events: none; }
.va.va-call-steps .va-call-steps__steps { position: relative; z-index: 1; display: grid; gap: 44px; }

/* ---------- Rail, lit line, pulse ----------
   The rail (line and its lit segment) sits under the steps; the runway (pulse and wake) sits above
   them and is clipped at the rail's start, so the wake never shows before node 1.
   module.js sets --rail-a (node 1 centre) and --rail-len (to the receipt) on the track. */
.va.va-call-steps .va-call-steps__rail, .va.va-call-steps .va-call-steps__runway { position: absolute; pointer-events: none; }
.va.va-call-steps .va-call-steps__rail { background: color-mix(in srgb, var(--paper) 14%, transparent); border-radius: 1px; }
.va.va-call-steps .va-call-steps__fill { position: absolute; inset: 0; background: var(--signal); border-radius: inherit; }
.va.va-call-steps .va-call-steps__runway { z-index: 2; }
.va.va-call-steps .va-call-steps__run { position: absolute; inset: 0; display: none; }
.va.va-call-steps .va-call-steps__pulse { position: absolute; width: 24px; height: 24px; border-radius: 50%; opacity: 0; mix-blend-mode: plus-lighter;
  background: radial-gradient(circle, var(--citron) 0 5.5px, color-mix(in srgb, var(--citron) 55%, transparent) 6.5px, color-mix(in srgb, var(--citron) 18%, transparent) 9.5px, transparent 12px); }
/* The wake: a citron gradient along the rail behind the pulse. */
.va.va-call-steps .va-call-steps__pulse::before { content: ""; position: absolute; border-radius: 1px; }

/* Vertical rail (not wide): x = 12px. */
.va.va-call-steps .va-call-steps__rail, .va.va-call-steps .va-call-steps__runway { left: calc(12px - var(--rail-w) / 2); width: var(--rail-w); top: var(--rail-a, 9px); height: var(--rail-len, calc(100% - 9px)); }
.va.va-call-steps .va-call-steps__runway { clip-path: inset(-12px -24px -24px -24px); }
.va.va-call-steps .va-call-steps__fill { transform-origin: 50% 0; }
.va.va-call-steps .va-call-steps__pulse { left: calc(var(--rail-w) / 2 - 12px); bottom: -12px; }
.va.va-call-steps .va-call-steps__pulse::before { left: calc(12px - var(--rail-w) / 2); bottom: 12px; width: var(--rail-w); height: var(--trail); background: linear-gradient(to top, var(--citron), color-mix(in srgb, var(--citron) 30%, transparent) 45%, transparent); }

@container va-cs (min-width: 55rem) {
  .va.va-call-steps .va-call-steps__track { --va-cs-wide: 1; }
  .va.va-call-steps .va-call-steps__rail, .va.va-call-steps .va-call-steps__runway { top: calc(var(--rail-y) - var(--rail-w) / 2); height: var(--rail-w); left: var(--rail-a, calc(var(--node) / 2)); width: var(--rail-len, calc((100% + var(--col-gap)) * var(--va-cs-n, 5) / (var(--va-cs-n, 5) + 1) - var(--node) / 2)); }
  .va.va-call-steps .va-call-steps__runway { clip-path: inset(-24px -24px -24px -12px); }
  .va.va-call-steps .va-call-steps__fill { transform-origin: 0 50%; }
  .va.va-call-steps .va-call-steps__pulse { left: auto; right: -12px; bottom: auto; top: calc(var(--rail-w) / 2 - 12px); }
  .va.va-call-steps .va-call-steps__pulse::before { left: auto; right: 12px; bottom: auto; top: calc(12px - var(--rail-w) / 2); width: var(--trail); height: var(--rail-w); background: linear-gradient(to left, var(--citron), color-mix(in srgb, var(--citron) 30%, transparent) 45%, transparent); }
}

/* ---------- Step ---------- */
.va.va-call-steps .va-call-steps__step { position: relative; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding-left: 44px; }
.va.va-call-steps .va-call-steps__index { display: flex; align-items: center; gap: 8px; height: var(--idx-h); font-family: var(--font-mono); font-size: var(--fs-mono); line-height: 1.4; font-variant-numeric: tabular-nums; color: var(--signal); transition: color 400ms var(--ease-out); }
.va.va-call-steps .va-call-steps__node { position: absolute; left: calc(12px - var(--node) / 2); top: calc(var(--idx-h) / 2 - var(--node) / 2); width: var(--node); height: var(--node); }
.va.va-call-steps .va-call-steps__label { margin-top: 10px; color: var(--ink); transition: color 400ms var(--ease-out); }
/* The step name is held to its step: the step is an inline-size container and the name is capped at
   20cqi, so the longest name and its arrow (about 4.75em, "Confirm.") fit the step's width, and at 320px
   with 200% text no name breaks inside a word ("Answe|r."). At default text sizes 1em is always the
   smaller value (at most 17.6cqi, checked at 320 to 1920), so nothing moves there. The containment is
   safe: the step's width comes from its grid track, never from its content. In @supports, so without
   container units (Safari 15) the name keeps the kit's size instead of failing to body size. */
.va.va-call-steps .va-call-steps__step { container-type: inline-size; }
@supports (width: 1cqi) { .va.va-call-steps .va-call-steps__label { font-size: min(var(--fs-h3), 20cqi); } }
.va.va-call-steps .va-call-steps__line { margin-top: 10px; max-width: 30ch; font-size: var(--fs-body); line-height: 1.5; color: var(--ink-2); text-wrap: pretty; transition: color var(--t-ui) var(--ease-out); }

/* Tablet: label and line side by side, still on the vertical rail. From 1024px the same applies where
   larger text leaves too little room for the six columns (see the layout switch). The label column is
   220px, or five times the label size where that is wider (only with larger text), so at 200% text a
   label such as "Confirm." keeps its full stop. */
@media (min-width: 768px) and (max-width: 1023px) {
  .va.va-call-steps .va-call-steps__step { display: grid; grid-template-columns: minmax(0, max(220px, var(--fs-h3) * 5)) minmax(0, 1fr); column-gap: 24px; align-items: baseline; }
  .va.va-call-steps .va-call-steps__index { grid-column: 1 / -1; }
  .va.va-call-steps .va-call-steps__line { margin-top: 0; }
  .va.va-call-steps .va-call-steps__ds { grid-column: 2; }
}
@container va-cs (width < 55rem) {
  .va.va-call-steps .va-call-steps__step { display: grid; grid-template-columns: minmax(0, max(220px, var(--fs-h3) * 5)) minmax(0, 1fr); column-gap: 24px; align-items: baseline; }
  .va.va-call-steps .va-call-steps__index { grid-column: 1 / -1; }
  .va.va-call-steps .va-call-steps__line { margin-top: 0; }
  .va.va-call-steps .va-call-steps__ds { grid-column: 2; }
}
@container va-cs (min-width: 55rem) {
  .va.va-call-steps .va-call-steps__step { padding-left: 0; }
  .va.va-call-steps .va-call-steps__node { position: relative; left: auto; top: auto; margin-top: var(--idx-gap); }
  .va.va-call-steps .va-call-steps__label { margin-top: 26px; }
  .va.va-call-steps .va-call-steps__line { margin-top: 12px; max-width: 22ch; }
}

/* The node: a half-disc D whose flat edge sits on the node centre, on the rail. */
.va.va-call-steps .va-call-steps__d, .va.va-call-steps .va-call-steps__half { position: absolute; top: 0; width: 50%; height: 100%; background: var(--signal); }
.va.va-call-steps .va-call-steps__d { left: 50%; border-radius: 0 var(--node) var(--node) 0; transform-origin: 0 50%; transform: rotate(0deg);
  transition: transform 240ms var(--ease-snap), background-color 400ms var(--ease-out); }

/* A lock that opens, printed beside the index (Check). */
.va.va-call-steps .va-call-steps__lock { position: relative; display: inline-grid; place-items: center; width: 14px; height: 14px; color: var(--signal); }
.va.va-call-steps .va-call-steps__lock .va-i { grid-area: 1 / 1; width: 14px; height: 14px; transition: opacity 200ms var(--ease-out), transform 240ms var(--ease-out); }
.va.va-call-steps .va-call-steps__lock-shut { opacity: 0; }
.va.va-call-steps .va-call-steps__lock-open { opacity: 1; }

/* Two half-discs that meet into one (Confirm). */
.va.va-call-steps .va-call-steps__half { transition: transform 240ms var(--ease-snap), background-color 400ms var(--ease-out); }
.va.va-call-steps .va-call-steps__half--l { left: 0; border-radius: var(--node) 0 0 var(--node); }
.va.va-call-steps .va-call-steps__half--r { left: 50%; border-radius: 0 var(--node) var(--node) 0; }

/* ---------- The last step: the paper receipt ---------- */
/* Its focus ring sits outside the paper, on night, so it stays citron. */
.va.va-call-steps .va-call-steps__step--act { isolation: isolate; padding: var(--perf-pad) var(--rx) 24px 44px; margin-top: 4px; }
.va.va-call-steps .va-call-steps__paper { position: absolute; inset: 0; z-index: -1; border-radius: 0 0 var(--r-lg) var(--r-lg); background: var(--paper);
  -webkit-mask: radial-gradient(circle at 50% 0, transparent 3.5px, #000 4px) top left / 10px 100% repeat-x;
          mask: radial-gradient(circle at 50% 0, transparent 3.5px, #000 4px) top left / 10px 100% repeat-x;
  clip-path: inset(0 0 0 0); transition: clip-path 500ms var(--ease-out), transform 500ms var(--ease-out); }
/* The ghost slot the receipt prints into (only visible before it prints). */
.va.va-call-steps .va-call-steps__step--act::before { content: ""; position: absolute; inset: 0; z-index: -2; border-radius: 0 0 var(--r-lg) var(--r-lg); border: 1.5px dashed color-mix(in srgb, var(--paper) 22%, transparent); opacity: 0; transition: opacity 300ms var(--ease-out); }
.va.va-call-steps .va-call-steps__step--act .va-call-steps__node { top: calc(var(--perf-pad) + var(--idx-h) / 2 - var(--node) / 2); }
.va.va-call-steps .va-call-steps__step--act .va-call-steps__index { color: var(--ink-3-paper); }
.va.va-call-steps .va-call-steps__step--act .va-call-steps__label { color: var(--forest); }
.va.va-call-steps .va-call-steps__step--act .va-call-steps__line { color: var(--ink-2-paper); max-width: 26ch; margin-bottom: 26px; }
.va.va-call-steps .va-call-steps__step--act .va-call-steps__d { background: var(--forest); }
.va.va-call-steps .va-call-steps__step--act .va-call-steps__lock { color: var(--forest); }
/* The receipt's label carries a citron highlighter mark once printed: on paper citron is only ever a fill behind ink. */
.va.va-call-steps .va-call-steps__mark { position: relative; isolation: isolate; }
.va.va-call-steps .va-call-steps__mark::before { content: ""; position: absolute; z-index: -1; left: -0.1em; right: -0.08em; top: 0.12em; bottom: 0.02em; border-radius: 3px; background: var(--citron);
  transform-origin: 0 50%; transform: none; transition: transform 320ms var(--ease-out); }
/* The rail enters the paper: a forest line from the paper edge to the node. */
.va.va-call-steps .va-call-steps__inlet { position: absolute; background: var(--forest); transition: background-color 400ms var(--ease-out); }
.va.va-call-steps .va-call-steps__inlet { left: calc(50% - var(--rail-w) / 2); width: var(--rail-w); bottom: 50%; height: calc(var(--perf-pad) + var(--idx-h) / 2); }

/* The block of half-discs: 3 rows of 6, each 12 x 24. Aligned (facing right, the letter D) is the final state. */
.va.va-call-steps .va-call-steps__ds {
  --dw: 12px; --dgx: 16px; --dgy: 12px;
  display: grid; grid-template-columns: repeat(6, var(--dw)); gap: var(--dgy) var(--dgx); justify-content: start; align-self: stretch;
  margin-top: auto; padding-top: 24px; color: var(--forest);
  border-top: 1px dashed color-mix(in srgb, var(--night-900) 18%, transparent);
  transition: border-color 400ms var(--ease-out);
}
.va.va-call-steps .va-call-steps__ds > i { display: block; width: var(--dw); height: calc(var(--dw) * 2); border-radius: 0 var(--dw) var(--dw) 0; background: currentColor; transform: none;
  transition: transform 240ms var(--ease-snap), background-color 400ms var(--ease-out); transition-delay: calc(var(--n, 0) * 40ms); }

@container va-cs (min-width: 55rem) {
  /* The receipt is a bigger object than the steps: a wider last column, and from 1280px it overhangs
     the grid by up to 24px where the screen has room, as if printed out of the line. It spans both
     track rows, so it stands taller than the steps; the hint sits in the second row under the other steps. */
  .va.va-call-steps .va-call-steps__track { display: grid; grid-template-columns: repeat(var(--va-cs-n, 5), minmax(0, 1fr)) minmax(0, 1.2fr); column-gap: var(--col-gap); grid-template-rows: auto auto; }
  .va.va-call-steps .va-call-steps__steps { grid-column: 1 / -1; grid-row: 1; grid-template-columns: repeat(var(--va-cs-n, 5), minmax(0, 1fr)) minmax(0, 1.2fr); column-gap: var(--col-gap); row-gap: 0; align-items: start; }
  .va.va-call-steps .va-call-steps__hint { grid-column: 1 / -1; grid-row: 2; }
  .va.va-call-steps .va-call-steps__step--act { padding: var(--perf-pad) var(--rx) 24px; margin-top: calc(var(--perf-pad) * -1); }
  .va.va-call-steps .va-call-steps__step--act .va-call-steps__node { top: auto; }
  .va.va-call-steps .va-call-steps__inlet { left: auto; right: 50%; bottom: auto; top: calc(50% - var(--rail-w) / 2); height: var(--rail-w); width: calc(var(--rx) + var(--node) / 2); }
  @supports (grid-template-rows: subgrid) {
    .va.va-call-steps .va-call-steps__track { grid-template-rows: auto 1fr; }
    .va.va-call-steps .va-call-steps__steps { grid-row: 1 / span 2; grid-template-columns: subgrid; grid-template-rows: subgrid; }
    .va.va-call-steps .va-call-steps__step { grid-row: 1; }
    .va.va-call-steps .va-call-steps__step--act { grid-row: 1 / span 2; grid-column: -2 / -1; }
    .va.va-call-steps .va-call-steps__hint { grid-column: 1 / -2; grid-row: 2; align-self: start; margin-top: 40px; }
  }
}
@media (min-width: 1280px) { @container va-cs (min-width: 55rem) {
  /* The overhang takes up to 24px of the space beside the container, and only what is left after
     keeping the theme's 20px gutter clear: (100vw - 100cqi) / 2 is that space, measured against the
     track (the container's content width, Standard 1152px or Wide 1400px). In Wide below about
     1490px there is no spare space, so the receipt sits on the grid instead of running off the
     screen; in Standard and on wider screens it overhangs the full 24px. */
  .va.va-call-steps .va-call-steps__track { container-type: inline-size; }
  .va.va-call-steps .va-call-steps__step--act { margin-right: calc(-1 * clamp(0px, (100vw - 100cqi) / 2 - 20px, 24px)); --rx: 22px; }
} }
@media (max-width: 1279px) { @container va-cs (min-width: 55rem) {
  /* Narrow desktop: a wider receipt column and smaller Ds, so the block still fits inside the paper.
     (--rx is only read inside the track, so it is set there, inside the container.) */
  .va.va-call-steps .va-call-steps__track { --rx: 16px; }
  .va.va-call-steps .va-call-steps__track, .va.va-call-steps .va-call-steps__steps { grid-template-columns: repeat(var(--va-cs-n, 5), minmax(0, 1fr)) minmax(0, 1.35fr); }
  .va.va-call-steps .va-call-steps__ds { --dw: 10px; --dgx: 10px; --dgy: 10px; }
} }

/* ---------- The button: the whole step is the hit area ---------- */
.va.va-call-steps .va-call-steps__btn { display: inline-flex; align-items: center; gap: 0.2em; white-space: normal; text-wrap: balance; max-width: 100%; overflow-wrap: anywhere; hyphens: auto; text-align: left; color: inherit; font: inherit; letter-spacing: inherit; cursor: pointer; }
.va.va-call-steps .va-call-steps__btn::after { content: ""; position: absolute; inset: -12px -10px -16px; border-radius: var(--r-md); }
.va.va-call-steps .va-call-steps__step--act .va-call-steps__btn::after { inset: 0; border-radius: 0 0 var(--r-lg) var(--r-lg); }
.va.va-call-steps .va-call-steps__btn:focus-visible { outline: none; }
.va.va-call-steps .va-call-steps__btn:focus-visible::after { outline: 3px solid var(--focus); outline-offset: 3px; }
.va.va-call-steps .va-call-steps__go { width: 0.62em; height: 0.62em; color: var(--accent); opacity: 0; transform: translateY(-4px); transition: opacity var(--t-ui) var(--ease-out), transform var(--t-ui) var(--ease-out); }
.va.va-call-steps .va-call-steps__step--act .va-call-steps__go { color: var(--forest); }
.va.va-call-steps .va-call-steps__btn:focus-visible .va-call-steps__go { opacity: 1; transform: none; }
@media (hover: hover) {
  .va.va-call-steps .va-call-steps__step:hover .va-call-steps__go { opacity: 1; transform: none; }
  .va.va-call-steps .va-call-steps__step:hover .va-call-steps__line { color: var(--ink); }
  .va.va-call-steps .va-call-steps__step--act:hover .va-call-steps__line { color: var(--night-900); }
}
.va.va-call-steps .va-call-steps__btn:active::after { background: color-mix(in srgb, var(--ink) 4%, transparent); }

/* The hint: close under the track (desktop: under the steps before the receipt; vertical rail: under the receipt). */
.va.va-call-steps .va-call-steps__hint { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; margin-top: 28px; font-size: 0.875rem; line-height: 1.4; color: var(--ink-3); }
.va.va-call-steps .va-call-steps__hint .va-i { width: 14px; height: 14px; flex: none; color: var(--accent); }
@container va-cs (min-width: 55rem) { .va.va-call-steps .va-call-steps__hint { margin-top: 40px; } }
/* Phones: no single word left alone on the hint's last line. */
@media (max-width: 767px) { .va.va-call-steps .va-call-steps__hint { text-wrap: pretty; } }

/* =====================================================================
   Live mode (module.js, motion allowed). Pending and unprinted states.
   ===================================================================== */
.va.va-call-steps.is-live .va-call-steps__run { display: block; }
.va.va-call-steps.is-live .va-call-steps__fill { transform: scale(1, var(--fx, 0)); }
@container va-cs (min-width: 55rem) { .va.va-call-steps.is-live .va-call-steps__fill { transform: scale(var(--fx, 0), 1); } }

/* Pending: field-rest, scattered; the label waits in mist until the pulse reaches it. */
.va.va-call-steps.is-live .va-call-steps__step[data-state="pending"] .va-call-steps__index { color: var(--ink-3); }
.va.va-call-steps.is-live .va-call-steps__step[data-state="pending"]:not(.va-call-steps__step--act) .va-call-steps__label { color: var(--ink-2); }
.va.va-call-steps.is-live .va-call-steps__step[data-state="now"] .va-call-steps__index { color: var(--ink); }
.va.va-call-steps.is-live .va-call-steps__step[data-state="pending"] .va-call-steps__d { background: var(--field-rest); transform: rotate(var(--r, 90deg)); }
.va.va-call-steps.is-live .va-call-steps__step[data-state="pending"] .va-call-steps__half { background: var(--field-rest); }
.va.va-call-steps.is-live .va-call-steps__step[data-state="pending"] .va-call-steps__half--l { transform: translateX(-6px); }
.va.va-call-steps.is-live .va-call-steps__step[data-state="pending"] .va-call-steps__half--r { transform: translateX(6px); }
.va.va-call-steps.is-live .va-call-steps__step[data-state="pending"] .va-call-steps__lock { color: var(--ink-3); }
.va.va-call-steps.is-live .va-call-steps__step[data-state="pending"] .va-call-steps__lock-shut { opacity: 1; }
.va.va-call-steps.is-live .va-call-steps__step[data-state="pending"] .va-call-steps__lock-open { opacity: 0; transform: translateY(1px); }

/* Now: a paper flash on the node, then it settles to signal when done. The travelling pulse is the
   rail's citron, so the step never shows more than two citron marks with the receipt's highlighter. */
.va.va-call-steps.is-live .va-call-steps__step[data-state="now"] .va-call-steps__d,
.va.va-call-steps.is-live .va-call-steps__step[data-state="now"] .va-call-steps__half { background: var(--ink); transition-duration: 240ms, 120ms; }
/* The lock opens in full ink, like the index beside it. */
.va.va-call-steps.is-live .va-call-steps__step[data-state="now"] .va-call-steps__lock { color: var(--ink); }

/* The receipt before it prints: a dashed slot, night-coloured text, scattered Ds in field-rest. */
.va.va-call-steps.is-live:not(.is-printed) .va-call-steps__step--act::before { opacity: 1; }
.va.va-call-steps.is-live:not(.is-printed) .va-call-steps__paper { clip-path: inset(0 0 100% 0); transform: translateY(-8px); transition-duration: 0ms; }
.va.va-call-steps.is-live:not(.is-printed) .va-call-steps__step--act .va-call-steps__index { color: var(--ink-3); }
.va.va-call-steps.is-live:not(.is-printed) .va-call-steps__step--act .va-call-steps__label { color: var(--ink-2); }
.va.va-call-steps.is-live:not(.is-printed) .va-call-steps__step--act .va-call-steps__line { color: var(--ink-2); }
.va.va-call-steps.is-live:not(.is-printed) .va-call-steps__step--act .va-call-steps__go { color: var(--accent); }
.va.va-call-steps.is-live:not(.is-printed) .va-call-steps__step--act .va-call-steps__d { background: var(--field-rest); transform: rotate(var(--r, 180deg)); }
.va.va-call-steps.is-live:not(.is-printed) .va-call-steps__inlet { background: var(--line); }
/* On print the forest line draws in from the paper edge to the node. */
.va.va-call-steps.is-live .va-call-steps__inlet::after { content: ""; position: absolute; inset: 0; background: var(--forest); transform-origin: 50% 0; transform: scale(1, 0); transition: transform 260ms var(--ease-out) 60ms; }
.va.va-call-steps.is-live.is-printed .va-call-steps__inlet::after { transform: none; }
@container va-cs (min-width: 55rem) {
  .va.va-call-steps.is-live .va-call-steps__inlet::after { transform-origin: 0 50%; transform: scale(0, 1); }
  .va.va-call-steps.is-live.is-printed .va-call-steps__inlet::after { transform: none; }
}
.va.va-call-steps.is-live:not(.is-printed) .va-call-steps__ds { color: var(--field-rest); border-top-color: var(--line); }
/* Scattered: each half-disc turned and knocked off its place; the snap puts it back, facing right. */
.va.va-call-steps.is-live:not(.is-ds) .va-call-steps__ds > i { transform: translate(var(--x, 0), var(--y, 0)) rotate(var(--r, 0deg)) scale(0.82); }
.va.va-call-steps.is-live:not(.is-ds) .va-call-steps__mark::before { transform: scale(0, 1); }

/* While printing, text inks in top to bottom, just behind the paper edge; then the Ds snap and the label is marked. */
.va.va-call-steps.is-printed .va-call-steps__step--act .va-call-steps__index { transition-delay: 40ms; }
.va.va-call-steps.is-printed .va-call-steps__step--act .va-call-steps__d { transition-delay: 90ms; }
.va.va-call-steps.is-printed .va-call-steps__step--act .va-call-steps__label { transition: color 300ms var(--ease-out) 140ms; }
.va.va-call-steps.is-printed .va-call-steps__step--act .va-call-steps__line { transition: color 300ms var(--ease-out) 230ms; }
.va.va-call-steps.is-printed .va-call-steps__ds { transition-delay: 330ms; }
.va.va-call-steps.is-ds .va-call-steps__mark::before { transition-delay: 420ms; }

/* ---------- Scroll-driven pulse (where supported) ----------
   Desktop: the pulse runs node 1 to the receipt as the rail moves from 80% to 35% of the viewport.
   Vertical rail: it holds at the middle of the viewport while the rail passes under it.
   The module.js fallback uses the same mapping. */
@supports (animation-timeline: view()) {
  /* Inset 0: otherwise the timeline inherits the page's scroll-padding-top and drifts from the JS mapping. */
  .va.va-call-steps.is-live.has-timeline .va-call-steps__rail { view-timeline: --va-cs-rail block; view-timeline-inset: 0; }
  .va.va-call-steps.is-live.has-timeline .va-call-steps__run,
  .va.va-call-steps.is-live.has-timeline .va-call-steps__fill,
  .va.va-call-steps.is-live.has-timeline .va-call-steps__pulse {
    animation-timing-function: linear; animation-fill-mode: both; animation-duration: auto;
    animation-timeline: --va-cs-rail; animation-range: cover 50vh cover calc(100% - 50vh);
  }
  .va.va-call-steps.is-live.has-timeline .va-call-steps__run { animation-name: va-cs-run-y; }
  .va.va-call-steps.is-live.has-timeline .va-call-steps__fill { animation-name: va-cs-fill-y; }
  .va.va-call-steps.is-live.has-timeline .va-call-steps__pulse { animation-name: va-cs-pulse; }
  @container va-cs (min-width: 55rem) {
    .va.va-call-steps.is-live.has-timeline .va-call-steps__run,
    .va.va-call-steps.is-live.has-timeline .va-call-steps__fill,
    .va.va-call-steps.is-live.has-timeline .va-call-steps__pulse { animation-range: cover 20vh cover 65vh; }
    .va.va-call-steps.is-live.has-timeline .va-call-steps__run { animation-name: va-cs-run-x; }
    .va.va-call-steps.is-live.has-timeline .va-call-steps__fill { animation-name: va-cs-fill-x; }
  }
}
@keyframes va-cs-run-x { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@keyframes va-cs-run-y { from { transform: translateY(-100%); } to { transform: translateY(0); } }
@keyframes va-cs-fill-x { from { transform: scale(0, 1); } to { transform: scale(1, 1); } }
@keyframes va-cs-fill-y { from { transform: scale(1, 0); } to { transform: scale(1, 1); } }
@keyframes va-cs-pulse {
  0% { opacity: 0; transform: scale(0.5); }
  4% { opacity: 1; transform: scale(1); }
  93% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.4); }
}

/* Windows high contrast: keep the rail, nodes and receipt edge visible. */
@media (forced-colors: active) {
  .va.va-call-steps .va-call-steps__rail, .va.va-call-steps .va-call-steps__fill,
  .va.va-call-steps .va-call-steps__d, .va.va-call-steps .va-call-steps__half, .va.va-call-steps .va-call-steps__ds > i { forced-color-adjust: none; background: CanvasText; }
  .va.va-call-steps .va-call-steps__step--act { border: 1px solid CanvasText; }
  .va.va-call-steps .va-call-steps__paper { display: none; }
}
