/* Amnalith figures.css · seat D · second version (ALIVE.md §6, on SITE.md §6.1)
   Large, iconic, living line diagrams, numbered and framed like the plates of an annual report.
   Loaded after site.css and icons.css. Uses only the tokens of :root and adds classes prefixed "fig".

   Order: tokens · frame · nodes · connectors (lines, arrowheads, pulse dots) · chain · stages bracket ·
          layers · kinds · lanes · motion (arrival, live loops, hover) · phone.

   Motion contract (ALIVE.md §2): the root is <figure class="fig ..." data-reveal="none" data-live>.
   Every start state and every loop is written under .motion; without it the figure is complete and still.
   Arrival keys on .fig.is-in, loops on .fig.is-live. Only transform (and translate, scale), opacity,
   are animated. Icons are seat V's (icons.css draws them in when the figure gets .is-in); this file only
   times them through --ico-delay and never sets stroke, dash or transition on an .ico (work/ICONS.md).

   Geometry kept throughout:
   - every line is a 1px CSS border, so it snaps to whole device pixels; a line through the centre of a
     square of size s sits at s/2 - .5px;
   - an arrowhead is the top and right borders of a 6px square turned 45 degrees; its tip lies 7.24px from
     the box's near edge; a line ends .5px short of the tip so it never pokes through;
   - a connector touches the shapes it joins, except between two node squares, where it leaves 8px of air
     (6px on the vertical, phone form). */

/* ===== Tokens (fallbacks until site.css carries the motion tokens) ======================== */
.fig {
  --fig-ease: var(--ease, cubic-bezier(.2, .7, .2, 1));
  --fig-ease-out: var(--ease-out, cubic-bezier(.16, 1, .3, 1));
  --fig-t-hover: var(--t-hover, 180ms);
  --fig-step: 90ms;                      /* nodes land 90ms apart (ALIVE §6) */
  --fig-pass: 600ms;                     /* the pulse crosses one connector in 600ms */
  --fig-cycle: 7s;                       /* one pulse from first node to last every 7 seconds */
  --fig-wait: 1400ms;                    /* the first pulse leaves once the arrival is over */

  --fig-line: var(--line-strong);        /* lines and outlines */
  --fig-rule: var(--line);               /* frame rule under the drawing, rules inside shapes */
  --fig-top: var(--line-strong);         /* frame rule above the title line */
  --fig-ink: var(--ink-900);             /* names, icons */
  --fig-body: var(--ink-700);
  --fig-sub: var(--ink-600);             /* second lines, the title */
  --fig-key: var(--ice-700);             /* key node fill, key shape rule */
  --fig-on-key: var(--white);            /* icon on the key node */
  --fig-arrow: var(--ice-700);
  --fig-num: var(--ice-700);
  --fig-pulse: var(--ice-500);           /* the travelling dot */
  --fig-glow: color-mix(in srgb, var(--ice-500) 30%, transparent);   /* its halo */
  --fig-flash: var(--ice-500);           /* a node's outline as the dot passes */
  --fig-fill: var(--white);              /* inside a node, a layer, a lane */
  --fig-sq: 48px;                        /* node square */
  --fig-sans: var(--font, "Geist", ui-sans-serif, system-ui, sans-serif);
  --fig-monof: var(--mono, "Geist Mono", ui-monospace, monospace);
}
.on-dark .fig, .fig.on-dark {
  --fig-line: var(--ox-700);
  --fig-rule: var(--line-on-dark);
  --fig-top: var(--ox-700);
  --fig-ink: var(--on-dark);
  --fig-body: var(--on-dark-body);
  --fig-sub: var(--on-dark-muted);
  --fig-key: var(--ice-500);
  --fig-on-key: var(--ox-900);
  --fig-arrow: var(--ice-500);
  --fig-num: var(--ice-300);
  --fig-pulse: var(--ice-500);
  --fig-glow: color-mix(in srgb, var(--ice-500) 38%, transparent);
  --fig-flash: var(--ice-500);
  --fig-fill: transparent;
}

/* ===== Frame ============================================================================ */
.fig {
  container: fig / inline-size;
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 1px 0 0;                      /* room for the top rule, drawn as ::before so it can draw across */
  border-bottom: 1px solid var(--fig-rule);
  color: var(--fig-body);
  font-family: var(--fig-sans);
  font-variant-numeric: tabular-nums;
  text-align: left;
  /* no word in a figure is ever broken inside the word: layouts change instead (and inherit this) */
  overflow-wrap: normal;
  word-break: normal;
  hyphens: manual;
}
.fig::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 0; border-top: 1px solid var(--fig-top); transform-origin: 0 50%; }
/* zero specificity, so every figure class below sets its own spacing */
:where(.fig) :where(p, ol, ul, li) { margin: 0; padding: 0; }
:where(.fig) :where(ol, ul) { list-style: none; }

/* the title line: the title alone, as a small label without its rule (no "Fig." number since v8) */
.fig__cap { display: block; margin: 0; padding: 16px 0 0; }
.fig__title { display: block; min-width: 0; font-size: .78125rem; font-weight: 600; letter-spacing: .16em; line-height: 1.45; text-transform: uppercase;
  color: var(--fig-sub); text-wrap: balance; }
/* the drawing: 48px of air above and below */
.fig__draw { padding-block: 48px; min-width: 0; }

/* icons inside figures: size, line and draw-in are icons.css's (24px, or ico--lg for 40px); here only placement */
.fig .ico { display: block; }

/* ===== Nodes: a square holding an icon, or the 10px mark of version 6 ===================== */
.fig-chain__mark, .fig-layer__mark, .fig-lanes__node {
  position: relative; display: grid; place-items: center; flex: none; box-sizing: border-box;
  width: var(--fig-sq); height: var(--fig-sq);
  border: 1px solid var(--fig-line); border-radius: 4px; background: var(--fig-fill); color: var(--fig-ink);
}
/* a node without an icon shows the 10px hollow mark, centred */
.fig-chain__mark:not(:has(svg))::before { content: ""; box-sizing: border-box; width: 10px; height: 10px; border: 1.5px solid var(--fig-ink); }
/* the key node: filled ice, its icon (or mark) in white (on dark: ox-900) */
.fig-chain__node--key .fig-chain__mark, .fig-layer--key .fig-layer__mark {
  background: var(--fig-key); border-color: var(--fig-key); color: var(--fig-on-key);
}
.fig-chain__node--key .fig-chain__mark::before { border-color: var(--fig-on-key); }
/* the ring that flashes ice as the pulse passes (only shown under .motion) */
.fig-chain__mark::after, .fig-layer::after, .fig-lanes__node::after {
  content: ""; position: absolute; inset: -1px; border: 1.5px solid var(--fig-flash); border-radius: 4px; opacity: 0; pointer-events: none;
}

/* ===== Connectors =========================================================================
   <span class="fig-link" aria-hidden="true"></span>: the line itself, ::before the arrowhead, ::after the
   travelling dot. Default: vertical, pointing down. --x: horizontal, pointing right. --up: pointing up.
   The dot box has the connector's own length, so "translate 100% of itself" is exactly one crossing.
   --fig-s0 (the scale it draws from) and --fig-p0 (where the dot starts) carry the orientation, so one
   keyframe name serves every orientation: Chrome restarts an animation whose name changes, and names
   chosen inside a container query flip during each frame's style pass. Never switch an animation's name
   (or a running element's display) inside a container query. */
.fig-link { --fig-s0: 1 0; --fig-p0: translateY(-100%); position: absolute; display: block; box-sizing: content-box; width: 0;
  border-left: 1px solid var(--fig-line); pointer-events: none; transform-origin: 50% 0; }
.fig-link--x { --fig-s0: 0 1; --fig-p0: translateX(-100%); transform-origin: 0 50%; }
.fig-link--up { --fig-p0: translateY(100%); transform-origin: 50% 100%; }
.fig-link::before { content: ""; position: absolute; box-sizing: border-box; width: 6px; height: 6px;
  border-top: 1.25px solid var(--fig-arrow); border-right: 1.25px solid var(--fig-arrow);
  left: -3px; bottom: .74px; transform: rotate(135deg); }
.fig-link::after { content: ""; position: absolute; left: -10.5px; top: 0; bottom: -11px; width: 22px; opacity: 0;
  background:
    radial-gradient(circle closest-side, var(--fig-pulse) 0 82%, transparent 100%) 50% calc(100% - 7px) / 8px 8px no-repeat,
    radial-gradient(circle closest-side, var(--fig-glow) 0 35%, transparent 100%) 50% 100% / 22px 22px no-repeat,
    linear-gradient(to bottom, transparent, var(--fig-pulse)) 50% calc(100% - 14px) / 2px min(44px, 100%) no-repeat;
  transform: var(--fig-p0); }
.fig-link--x { width: auto; height: 0; border-left: 0; border-top: 1px solid var(--fig-line); }
.fig-link--x::before { left: auto; bottom: auto; top: -3px; right: .74px; transform: rotate(45deg); }
.fig-link--x::after { left: 0; right: -11px; top: -10.5px; bottom: auto; width: auto; height: 22px;
  background:
    radial-gradient(circle closest-side, var(--fig-pulse) 0 82%, transparent 100%) calc(100% - 7px) 50% / 8px 8px no-repeat,
    radial-gradient(circle closest-side, var(--fig-glow) 0 35%, transparent 100%) 100% 50% / 22px 22px no-repeat,
    linear-gradient(to right, transparent, var(--fig-pulse)) calc(100% - 14px) 50% / min(44px, 100%) 2px no-repeat;
  transform: var(--fig-p0); }
.fig-link--up::before { bottom: auto; top: .74px; transform: rotate(-45deg); }
.fig-link--up::after { top: -11px; bottom: 0;
  background:
    radial-gradient(circle closest-side, var(--fig-pulse) 0 82%, transparent 100%) 50% 7px / 8px 8px no-repeat,
    radial-gradient(circle closest-side, var(--fig-glow) 0 35%, transparent 100%) 50% 0 / 22px 22px no-repeat,
    linear-gradient(to top, transparent, var(--fig-pulse)) 50% 14px / 2px min(44px, 100%) no-repeat;
  transform: var(--fig-p0); }
.fig-link--plain::before { content: none; }   /* a segment without an arrowhead */

/* ===== Chain: three to six nodes ===========================================================
   Vertical by default (phone, narrow slots), squares 40px. Horizontal on a computer (900px and up) when
   the chain's own width allows 140px per node: 420px for three, 560 for four, 700 for five, 840 for six;
   squares 48px. Container queries cannot depend on the node count, so the chain box is narrowed to 3/n of
   the figure and its children widened back by n/3: one query at 420px then means "140px per node". */
.fig-chain { --fig-n: 3; container: fig-chain / inline-size; width: calc(100% * 3 / var(--fig-n)); }
.fig-chain:has(> .fig-chain__list > :nth-child(4)) { --fig-n: 4; }
.fig-chain:has(> .fig-chain__list > :nth-child(5)) { --fig-n: 5; }
.fig-chain:has(> .fig-chain__list > :nth-child(6)) { --fig-n: 6; }
.fig-chain > * { width: calc(100% * var(--fig-n) / 3); }

.fig-chain__list { --fig-sq: 40px; display: grid; grid-template-columns: minmax(0, 1fr); }
.fig-chain__node { --k: 0; position: relative; display: grid; grid-template-columns: var(--fig-sq) minmax(0, 1fr); column-gap: 18px;
  align-content: start; padding-bottom: 40px; min-width: 0; }
.fig-chain__node:nth-child(2) { --k: 1; }
.fig-chain__node:nth-child(3) { --k: 2; }
.fig-chain__node:nth-child(4) { --k: 3; }
.fig-chain__node:nth-child(5) { --k: 4; }
.fig-chain__node:nth-child(6) { --k: 5; }
.fig-chain__node:last-child { padding-bottom: 0; }
.fig-chain__node:last-child > .fig-link { display: none; }
.fig-chain__mark { grid-column: 1; grid-row: 1 / span 3; align-self: start; }
.fig-chain__num, .fig-chain__name, .fig-chain__sub { grid-column: 2; min-width: 0; }
/* without a numeral, the name sits level with the middle of the square */
.fig-chain__mark + .fig-chain__name { padding-top: calc((var(--fig-sq) - 22px) / 2); }
.fig-chain__num { display: block; font-family: var(--fig-monof); font-size: .8125rem; font-weight: 500; letter-spacing: .02em; line-height: 16px;
  color: var(--fig-num); font-variant-numeric: tabular-nums; }
.fig-chain__num + .fig-chain__name { margin-top: 4px; }
.fig-chain__name { font-size: 16px; font-weight: 600; letter-spacing: -0.005em; line-height: 22px; color: var(--fig-ink); text-wrap: balance; }
.fig-chain__sub { margin-top: 4px; font-size: 14px; line-height: 1.5; color: var(--fig-sub); text-wrap: pretty; transition: color var(--fig-t-hover) var(--fig-ease); }
/* the connector, down from this square to 6px above the next one */
.fig-chain__node > .fig-link { left: calc(var(--fig-sq) / 2 - .5px); top: calc(var(--fig-sq) + 6px); bottom: 6.5px; }

@media (min-width: 900px) {
  @container fig-chain (min-width: 420px) {
    .fig-chain__list { --fig-sq: 48px; grid-template-columns: none; grid-template-rows: repeat(4, auto); grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
    /* rows are shared across nodes (subgrid), so names and second lines sit on common lines */
    .fig-chain__node { grid-row: span 4; grid-template-rows: subgrid; grid-template-columns: minmax(0, 1fr); column-gap: 0; padding: 0 24px 0 0; }
    .fig-chain__node:last-child { padding-right: 0; }
    .fig-chain__mark { grid-column: 1; grid-row: 1; margin-bottom: 20px; }
    .fig-chain__num { grid-row: 2; grid-column: 1; }
    .fig-chain__name { grid-row: 3; grid-column: 1; }
    .fig-chain__mark + .fig-chain__name { padding-top: 0; }
    .fig-chain__sub { grid-row: 4; grid-column: 1; }
    /* the connector, right from 8px after this square to 8px before the next (the next node starts at this node's edge) */
    .fig-chain__node > .fig-link { top: calc(var(--fig-sq) / 2 - .5px); bottom: auto; left: calc(var(--fig-sq) + 8px); right: 8.5px;
      width: auto; height: 0; border-left: 0; border-top: 1px solid var(--fig-line); transform-origin: 0 50%;
      --fig-s0: 0 1; --fig-p0: translateX(-100%); }
    .fig-chain__node > .fig-link::before { left: auto; bottom: auto; top: -3px; right: .74px; transform: rotate(45deg); }
    .fig-chain__node > .fig-link::after { left: 0; right: -11px; top: -10.5px; bottom: auto; width: auto; height: 22px;
      background:
        radial-gradient(circle closest-side, var(--fig-pulse) 0 82%, transparent 100%) calc(100% - 7px) 50% / 8px 8px no-repeat,
        radial-gradient(circle closest-side, var(--fig-glow) 0 35%, transparent 100%) 100% 50% / 22px 22px no-repeat,
        linear-gradient(to right, transparent, var(--fig-pulse)) calc(100% - 14px) 50% / min(44px, 100%) 2px no-repeat;
      transform: var(--fig-p0); }
  }
}

/* ===== Layers (fig-layers) ================================================================ */
.fig-layers { --fig-pad: 24px; --fig-gap: 40px; --fig-sq: 48px; display: grid; grid-template-columns: minmax(0, 1fr); row-gap: var(--fig-gap); }
.fig-layer { position: relative; min-width: 0; padding: 20px var(--fig-pad); border: 1px solid var(--fig-line); border-radius: 4px; background: var(--fig-fill); }
.fig-layer::after { inset: -1px; }
.fig-layer__head { display: flex; align-items: center; column-gap: 18px; min-width: 0; }
.fig-layer__name { font-size: 16px; font-weight: 600; letter-spacing: -0.005em; line-height: 22px; color: var(--fig-ink); text-wrap: balance; }
.fig-layer__sub { margin-top: 2px; font-size: 14px; line-height: 1.5; color: var(--fig-sub); text-wrap: pretty; }
/* the platform's name lines up with the other layers' names, past where their squares sit */
.fig-layer--platform > .fig-layer__name { padding-left: calc(var(--fig-sq) + 18px); }
/* the key shape: its left edge carries a 3px rule (the 1px outline plus 2px inside it) */
.fig-layer--key, .fig-lane--key { border-left-color: var(--fig-key); box-shadow: inset 2px 0 0 var(--fig-key); }
/* the connector from this layer up to the one above, through the middle of the squares, touching both */
.fig-layer > .fig-link { left: calc(var(--fig-pad) + var(--fig-sq) / 2 - .5px); top: calc(-1px - var(--fig-gap)); height: var(--fig-gap); }
/* the six cells of the platform, each an icon over its name: 2 by 3, 3 by 2 (from 360px; every split),
   or 6 in a row (from 880px; a fig-slot on a computer). Columns never shrink under their longest word. */
.fig-layer__cells { display: grid; grid-template-columns: repeat(2, minmax(min-content, 1fr)); margin-top: 18px; border-top: 1px solid var(--fig-rule); }
.fig-layer__cells > li { --k: 0; display: flex; flex-direction: column; row-gap: 10px; min-width: min-content; padding: 16px 12px 14px;
  border-left: 1px solid var(--fig-rule); font-size: 14px; font-weight: 500; line-height: 1.3; color: var(--fig-ink); }
.fig-layer__cells > li:nth-child(2) { --k: 1; }
.fig-layer__cells > li:nth-child(3) { --k: 2; }
.fig-layer__cells > li:nth-child(4) { --k: 3; }
.fig-layer__cells > li:nth-child(5) { --k: 4; }
.fig-layer__cells > li:nth-child(6) { --k: 5; }
.fig-layer__cells > li:nth-child(2n + 1) { padding-left: 0; border-left: 0; }
.fig-layer__cells > li:nth-child(2n) { padding-right: 0; }
.fig-layer__cells > li:nth-child(n + 3) { border-top: 1px solid var(--fig-rule); }
.fig-layer__cells > li:nth-child(n + 5) { padding-bottom: 0; }
.fig-layer__cells .ico { color: var(--fig-ink); }
@container fig (max-width: 519px) {
  .fig-layers { --fig-pad: 20px; --fig-sq: 40px; --fig-gap: 32px; }
}
@container fig (min-width: 360px) {
  .fig-layer__cells { grid-template-columns: repeat(3, minmax(min-content, 1fr)); }
  .fig-layer__cells > li:nth-child(n) { padding: 16px 12px 14px; border-left: 1px solid var(--fig-rule); border-top: 0; }
  .fig-layer__cells > li:nth-child(3n + 1) { padding-left: 0; border-left: 0; }
  .fig-layer__cells > li:nth-child(3n) { padding-right: 0; }
  .fig-layer__cells > li:nth-child(n + 4) { border-top: 1px solid var(--fig-rule); padding-bottom: 0; }
}
@container fig (min-width: 880px) {
  .fig-layer__cells { grid-template-columns: repeat(6, minmax(min-content, 1fr)); }
  .fig-layer__cells > li:nth-child(n) { padding: 16px 12px 0; border-left: 1px solid var(--fig-rule); border-top: 0; }
  .fig-layer__cells > li:first-child { padding-left: 0; border-left: 0; }
  .fig-layer__cells > li:last-child { padding-right: 0; }
}

/* ===== Lanes (fig-lanes): "You", a connector to each lane, two lanes =======================
   Side by side from 480px of figure width: a trunk down from "You", a bar across, a drop into each lane.
   Narrower: the lanes stack, indented, on a trunk at the left, each entered from the side.
   The dots: three go from You into the left lane, then one goes to the right lane and stops at its edge. */
.fig-lanes { --fig-gap: 24px; --fig-sq: 40px; position: relative; }
.fig-lanes__you { position: relative; display: flex; align-items: center; column-gap: 16px; font-size: 16px; font-weight: 600; line-height: 22px; color: var(--fig-ink); }
.fig-lanes__list { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); row-gap: var(--fig-gap); margin: 24px 0 0 48px; }
.fig-lane { position: relative; min-width: 0; padding: 20px 20px 22px; border: 1px solid var(--fig-line); border-radius: 4px; background: var(--fig-fill); }
.fig-lane__head { font-size: 16px; font-weight: 600; letter-spacing: -0.005em; line-height: 22px; color: var(--fig-ink); text-wrap: balance; }
.fig-lane__items { margin-top: 14px; border-top: 1px solid var(--fig-rule); }
.fig-lane__items > li { display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: 14px; align-items: start; padding: 13px 0;
  border-top: 1px solid var(--fig-rule); font-size: 15px; font-weight: 500; line-height: 24px; color: var(--fig-ink); }
.fig-lane__items > li:first-child { border-top: 0; }
.fig-lane__items > li:last-child { padding-bottom: 0; }
.fig-lane__items .ico { grid-row: 1; }
.fig-lane__note { grid-column: 2; margin-top: 2px; font-size: 14px; font-weight: 400; line-height: 1.5; color: var(--fig-sub); text-wrap: pretty; }
/* the left lane's key rule, glowing as each dot arrives (only under .motion) */
.fig-lane--key::after { content: ""; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 3px; border-radius: 4px 0 0 4px;
  background: var(--fig-key); box-shadow: 0 0 14px 2px var(--fig-pulse); opacity: 0; pointer-events: none; }

/* connectors, narrow form. All positions are from the lane's padding box (1px inside its outline). */
.fig-lanes__trunk { left: calc(var(--fig-sq) / 2 - .5px); top: var(--fig-sq); height: 24px; }      /* You down to the list */
.fig-lanes__bar { visibility: hidden; }
.fig-lane__drop { left: -29.5px; top: -1px; height: 32.5px; }                                         /* beside the lane, to its entry */
.fig-lane + .fig-lane .fig-lane__drop { top: calc(-1px - var(--fig-gap)); height: calc(var(--fig-gap) + 32.5px); }
.fig-lane__pass { left: -29.5px; top: 31.5px; bottom: -1px; }                                         /* on past the first lane */
.fig-lane + .fig-lane .fig-lane__pass { display: none; }
.fig-lane__entry { left: -29.5px; top: 31px; width: 28px; }                                           /* in from the side */
.fig-lane__drop::before { content: none; }                                                            /* narrow: the arrowhead is on the entry */
/* the travelling dots: 6px, ice, a soft halo; each one box, moved along its path */
/* path corners: narrow form, left dots down to the entry then in; the right dot down past the first lane
   (100% of its tall box) then in (see the container query for the wide form) */
.fig-lanes__dot { --fig-a1: translate(0, 56px); --fig-a2: translate(28px, 56px);
  --fig-b1: translate(0, 25%); --fig-b2: translate(0, 100%); --fig-b3: translate(28px, 100%);
  position: absolute; left: -33px; top: -29px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--fig-pulse); box-shadow: 0 0 0 3px var(--fig-glow), 0 0 10px 3px var(--fig-glow); opacity: 0; pointer-events: none; }
/* the right lane's dot: its box is as tall as its whole way down (past the first lane), so 100% is the way */
.fig-lanes__dot--d { height: auto; bottom: calc(-29.5px - var(--fig-gap)); background: none; box-shadow: none; border-radius: 0; }
.fig-lanes__dot--d::before { content: ""; position: absolute; left: 0; top: 0; width: 8px; height: 8px; border-radius: 50%;
  background: var(--fig-pulse); box-shadow: 0 0 0 3px var(--fig-glow), 0 0 10px 3px var(--fig-glow); }

@container fig (min-width: 480px) {
  .fig-lanes { --fig-sq: 48px; }
  .fig-lanes__list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--fig-gap); margin: 56px 0 0; }
  .fig-lane { padding: 22px 24px 24px; }
  .fig-lanes__trunk { left: 23.5px; top: 48px; height: 29px; }
  .fig-lanes__bar { visibility: visible; left: 23.5px; top: 76px; width: calc(50% + var(--fig-gap) / 2 + 1px); }
  .fig-lane__drop, .fig-lane + .fig-lane .fig-lane__drop { left: 22.5px; top: -29px; height: 28px; }
  .fig-lane__drop::before { content: ""; }
  .fig-lane__pass, .fig-lane__entry { visibility: hidden; }
  .fig-lanes__dot { left: 19px; top: -61px; --fig-a1: translate(0, 56px); --fig-a2: translate(0, 56px);
    --fig-b1: translate(0, 28px); --fig-b2: translate(100%, 28px); --fig-b3: translate(100%, 56px); }
  .fig-lanes__dot--d { width: calc(100% + 26px); height: 8px; bottom: auto; }
}

/* ===== Motion: arrival (once, on .is-in) ====================================================
   Order: the frame's top rule draws across; the title fades; each node lands (scale .8 to 1 and fade,
   90ms apart) and draws its icon; its connector draws after it; its words fade up behind. */
@keyframes fig-rule { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes fig-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fig-land { from { opacity: 0; scale: .8; } to { opacity: 1; scale: 1; } }
@keyframes fig-rise { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
@keyframes fig-rise-big { from { opacity: 0; translate: 0 24px; } to { opacity: 1; translate: 0 0; } }
/* connectors draw by scaling from their start (the arrowhead grows with them; the dot is not shown yet) */
@keyframes fig-draw { from { scale: var(--fig-s0, 1 0); } to { scale: 1 1; } }

/* start states, before the figure is on screen */
.motion .fig:not(.is-in)::before { transform: scaleX(0); }
.motion .fig:not(.is-in) :is(.fig__cap, .fig-chain__mark, .fig-chain__num, .fig-chain__name, .fig-chain__sub, .fig-link, .fig-layer, .fig-layer__cells > li, .fig-lanes__you, .fig-lane, .fig-lane__items > li) { opacity: 0; }

.motion .fig.is-in::before { animation: fig-rule 900ms var(--fig-ease-out) both; }
.motion .fig.is-in .fig__cap { animation: fig-fade 600ms var(--fig-ease) 120ms both; }
/* chain */
.motion .fig.is-in .fig-chain__node { --t0: calc(300ms + var(--k) * var(--fig-step)); }
.motion .fig.is-in .fig-chain__mark { animation: fig-land 520ms var(--fig-ease-out) var(--t0) both; }
.motion .fig.is-in .fig-chain__mark { --ico-delay: calc(var(--t0) + 120ms); }
.motion .fig.is-in .fig-chain__num { animation: fig-rise 600ms var(--fig-ease-out) calc(var(--t0) + 140ms) both; }
.motion .fig.is-in .fig-chain__name { animation: fig-rise 600ms var(--fig-ease-out) calc(var(--t0) + 180ms) both; }
.motion .fig.is-in .fig-chain__sub { animation: fig-rise 600ms var(--fig-ease-out) calc(var(--t0) + 230ms) both; }
.motion .fig.is-in .fig-chain__node > .fig-link { animation: fig-draw 560ms var(--fig-ease) calc(var(--t0) + 200ms) both; }

/* layers: bottom first */
.motion .fig.is-in .fig-layer { --t0: 220ms; animation: fig-rise-big 700ms var(--fig-ease-out) var(--t0) both; }
.motion .fig.is-in .fig-layer:nth-child(2) { --t0: 420ms; }
.motion .fig.is-in .fig-layer:nth-child(1) { --t0: 620ms; }
.motion .fig.is-in .fig-layer__mark { --ico-delay: calc(var(--t0) + 200ms); }
.motion .fig.is-in .fig-layer__cells > li { animation: fig-rise 520ms var(--fig-ease-out) calc(var(--t0) + 260ms + var(--k) * 60ms) both; }
.motion .fig.is-in .fig-layer__cells > li { --ico-delay: calc(var(--t0) + 300ms + var(--k) * 60ms); }
.motion .fig.is-in .fig-layer > .fig-link { animation: fig-draw 520ms var(--fig-ease) calc(var(--t0) + 260ms) both; }

/* kinds: clockwise */

/* lanes: You, then the connectors, then the lanes and their items */
.motion .fig.is-in .fig-lanes__you { animation: fig-rise 600ms var(--fig-ease-out) 260ms both; }
.motion .fig.is-in .fig-lanes__node { --ico-delay: 360ms; }
.motion .fig.is-in .fig-lanes__trunk { animation: fig-draw 360ms var(--fig-ease) 460ms both; }
.motion .fig.is-in .fig-lanes__bar { animation: fig-draw 480ms var(--fig-ease) 760ms both; }
.motion .fig.is-in .fig-lane { --t0: 760ms; animation: fig-rise 700ms var(--fig-ease-out) var(--t0) both; }
.motion .fig.is-in .fig-lane + .fig-lane { --t0: 940ms; }
.motion .fig.is-in .fig-lane .fig-link { animation: fig-draw 400ms var(--fig-ease) calc(var(--t0) + 120ms) both; }
.motion .fig.is-in .fig-lane__items > li { animation: fig-rise 520ms var(--fig-ease-out) calc(var(--t0) + 200ms) both; }
.motion .fig.is-in .fig-lane__items > li + li { animation-delay: calc(var(--t0) + 270ms); }
.motion .fig.is-in .fig-lane__items > li + li + li { animation-delay: calc(var(--t0) + 340ms); }
.motion .fig.is-in .fig-lane__items { --ico-delay: calc(var(--t0) + 260ms); }

/* ===== Motion: while live (loops run only while the figure is on screen) ====================
   One pulse travels from the first node to the last every 7 seconds: each connector carries it across
   in 600ms, one after another; each node's outline flashes ice for 300ms as the pulse reaches it. */
@keyframes fig-pass { 0% { opacity: 0; transform: var(--fig-p0); } 1.4% { opacity: 1; } 7.6% { opacity: 1; } 8.6%, 100% { opacity: 0; transform: none; } }
@keyframes fig-flash { 0% { opacity: 0; } 1% { opacity: 1; } 4.3% { opacity: 1; } 8%, 100% { opacity: 0; } }
/* the arrowhead nudges in its direction as the pulse reaches it */
@keyframes fig-nudge-up { 0%, 6.6% { translate: 0 0; } 8.6% { translate: 0 -3px; } 12%, 100% { translate: 0 0; } }

.motion .fig.is-live .fig-chain__node > .fig-link::after {
  animation: fig-pass var(--fig-cycle) linear calc(var(--fig-wait) + var(--k) * var(--fig-pass)) infinite both; }
.motion .fig.is-live .fig-chain__mark::after {
  animation: fig-flash var(--fig-cycle) linear calc(var(--fig-wait) + var(--k) * var(--fig-pass)) infinite both; }
/* layers: from Amnalith up to the platform, then up to the products */
.motion .fig.is-live .fig-layer > .fig-link::after { animation: fig-pass var(--fig-cycle) linear var(--fig-wait) infinite both; }
.motion .fig.is-live .fig-layer > .fig-link::before { animation: fig-nudge-up var(--fig-cycle) var(--fig-ease) var(--fig-wait) infinite both; }
.motion .fig.is-live .fig-layer:nth-child(2) > .fig-link::after,
.motion .fig.is-live .fig-layer:nth-child(2) > .fig-link::before { animation-delay: calc(var(--fig-wait) + var(--fig-pass)); }
.motion .fig.is-live .fig-layer--key::after { animation: fig-flash var(--fig-cycle) linear var(--fig-wait) infinite both; }
.motion .fig.is-live .fig-layer:nth-child(2)::after { animation: fig-flash var(--fig-cycle) linear calc(var(--fig-wait) + var(--fig-pass)) infinite both; }
.motion .fig.is-live .fig-layer:nth-child(1)::after { animation: fig-flash var(--fig-cycle) linear calc(var(--fig-wait) + 2 * var(--fig-pass)) infinite both; }
/* kinds: clockwise, every 8 seconds, an ice rule sweeps across the top of each cell in turn */
@keyframes fig-sweep { 0% { opacity: 0; scale: 0 1; } 2% { opacity: 1; } 12% { opacity: 1; scale: 1 1; } 18%, 100% { opacity: 0; scale: 1 1; } }
/* lanes: three dots into the left lane, one after another, then one to the right lane, which stops at its edge;
   the left lane's key rule glows as each dot arrives. One cycle: 9 seconds. */
@keyframes fig-dot-left  { 0% { opacity: 0; transform: translate(0, 0); } 2% { opacity: 1; } 8% { transform: var(--fig-a1); } 12% { opacity: 1; transform: var(--fig-a2); } 14%, 100% { opacity: 0; transform: var(--fig-a2); } }
@keyframes fig-dot-right { 0% { opacity: 0; transform: translate(0, 0); } 2% { opacity: 1; } 6% { transform: var(--fig-b1); } 17% { transform: var(--fig-b2); } 21% { opacity: 1; transform: var(--fig-b3); } 26%, 100% { opacity: 0; transform: var(--fig-b3); } }
/* the key rule glows three times a cycle, 900ms apart, as dots a, b and c arrive */
@keyframes fig-glow-3 { 0% { opacity: 0; } 1.5% { opacity: 1; } 6%, 10% { opacity: 0; } 11.5% { opacity: 1; } 16%, 20% { opacity: 0; } 21.5% { opacity: 1; } 26%, 100% { opacity: 0; } }

.motion .fig.is-live .fig-lanes__dot { animation: fig-dot-left 9s var(--fig-ease) 1500ms infinite both; }
.motion .fig.is-live .fig-lanes__dot--b { animation-delay: 2400ms; }
.motion .fig.is-live .fig-lanes__dot--c { animation-delay: 3300ms; }
.motion .fig.is-live .fig-lanes__dot--d { animation: fig-dot-right 9s var(--fig-ease) 4500ms infinite both; }
/* narrow: a dot arrives 12% of the cycle (1080ms) after it leaves */
.motion .fig.is-live .fig-lane--key::after { animation: fig-glow-3 9s linear 2580ms infinite both; }
@container fig (min-width: 480px) {
  /* wide: 8% of the cycle (720ms) */
  .motion .fig.is-live .fig-lane--key::after { animation-delay: 2220ms; }
}

/* ===== Motion: hover and focus ============================================================== */
.motion .fig-chain__mark, .motion .fig-layer__mark, .motion .fig-lanes__node { transition: translate var(--fig-t-hover) var(--fig-ease); }
.motion .fig-chain__node:is(:hover, :focus-within) .fig-chain__mark { translate: 0 -3px; }
.fig-chain__node:is(:hover, :focus-within) .fig-chain__sub { color: var(--fig-ink); }

/* ===== Phone: no text under 13px ============================================================ */
@media (max-width: 899px) {
  .fig__title{ font-size: 13px; }
}

/* ===== Layers as three solid tiles (DAYLIGHT.md §6.1; seat M, 17 Nov) =========================
   No frame and no "Fig." line: Products on the cyan block, the platform on white with its six icon cells,
   Amnalith on oxblood. Same list, same words, same arrival (bottom first) and the same pulse upward. */
.fig--tiles { padding: 0; border-bottom: 0; }
.fig--tiles::before { display: none; }
.fig--tiles .fig__draw { padding-block: 0; }
.fig--tiles .fig-layers { --fig-gap: 28px; --fig-pad: 28px; --fig-sq: 48px; }
.fig--tiles .fig-layer { padding: 26px var(--fig-pad); border: 0; border-radius: 6px; box-shadow: none; }
.fig--tiles .fig-layer::after { border-radius: 6px; }
.fig--tiles .fig-layer__name { font-size: 18px; line-height: 24px; }
.fig--tiles .fig-layer__sub { font-size: 15px; }
/* products: the cyan block, everything oxblood */
.fig--tiles .fig-layer--products { background: var(--ice-500); }
.fig--tiles .fig-layer--products :is(.fig-layer__name, .fig-layer__sub) { color: var(--ox-900); }
.fig--tiles .fig-layer--products .fig-layer__mark { background: var(--white); border-color: var(--white); color: var(--ox-900); }
/* the platform: white, a hairline, six icon cells on pale ice */
.fig--tiles .fig-layer--platform { background: var(--white); box-shadow: inset 0 0 0 1px var(--line); }
.fig--tiles .fig-layer--platform > .fig-layer__name { padding-left: 0; }
.fig--tiles .fig-layer__cells { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; border-top: 0; }
.fig--tiles .fig-layer__cells > li:nth-child(n) { padding: 14px 14px 12px; border: 0; border-radius: 6px; background: var(--ice-100); row-gap: 8px; }
.fig--tiles .fig-layer__cells .ico { color: var(--ice-700); }
/* Amnalith: oxblood, the mark in ice */
.fig--tiles .fig-layer--key { background: var(--ox-900); box-shadow: none; }
.fig--tiles .fig-layer--key .fig-layer__name { color: var(--white); }
.fig--tiles .fig-layer--key .fig-layer__sub { color: var(--on-dark-body); }
.fig--tiles .fig-layer--key .fig-layer__mark { background: var(--ice-500); border-color: var(--ice-500); color: var(--ox-900); }
/* the connectors run in the gap, from the oxblood tile up to the platform and up to the products */
.fig--tiles .fig-layer > .fig-link { border-left-color: var(--line-strong); }
@container fig (max-width: 359px) {
  .fig--tiles .fig-layer__cells { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* the layers tiles on the cyan block (company "How Amnalith is built"): Products turns white with a cyan mark, the
   platform pale ice with white cells, the connectors oxblood; Amnalith stays oxblood */
.g-cyan .fig--tiles .fig-layer--products { background: var(--white); }
.g-cyan .fig--tiles .fig-layer--products .fig-layer__mark { background: var(--ice-500); border-color: var(--ice-500); }
.g-cyan .fig--tiles .fig-layer--platform { background: var(--ice-100); box-shadow: none; }
.g-cyan .fig--tiles .fig-layer__cells > li:nth-child(n) { background: var(--white); }
.g-cyan .fig--tiles { --fig-line: color-mix(in srgb, var(--ox-900) 45%, transparent); }
.g-cyan .fig--tiles .fig-layer > .fig-link { border-left-color: var(--fig-line); }
