/* Explanatory figures (13fweb style guide, "Figures"): plates on the surface colour, the Ledger palette, IBM Plex,
   and a caption that starts with "Figure N.". Two kinds: drawn SVG (the line check), and a flow of steps as a list
   with small SVG icons, so that its text reflows on a phone. */

.figure { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 18px 22px 16px; gap: 14px; }

/* ------------------------------------------------------------------ the line check */
.fig-linecheck { display: block; width: 100%; max-width: 520px; height: auto; font-family: var(--serif); fill: var(--ink); }
.fig-paper { fill: var(--surface-alt); stroke: var(--rule); }
.fig-label { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; fill: var(--muted); }
.fig-ink { fill: none; stroke: var(--ink-soft); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fig-ink.faint { stroke: var(--faint); }
.fig-found { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.fig-link { fill: none; stroke: var(--accent); stroke-width: 1.2; }
.fig-dot { fill: var(--accent); }
.fig-mark { fill: none; stroke: var(--frame); stroke-width: 1; }
.fig-mark.found { fill: var(--accent); stroke: var(--accent); }
.fig-mark.missing { stroke: var(--ink); stroke-width: 1.5; }
.fig-text { font-size: 14px; fill: var(--ink); }
.fig-flag { fill: var(--surface); stroke: var(--ink-soft); stroke-width: 1; stroke-dasharray: 3 3; }
.fig-status { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; fill: var(--muted); }
.fig-status.strong { fill: var(--ink); }

/* The links of the line check draw in once, after the page loads. */
.fig-found, .fig-link { stroke-dasharray: 400; stroke-dashoffset: 0; animation: draw-in 1.1s ease-out .4s backwards; }
.fig-dot, .fig-flag { animation: show .3s ease-out 1.3s backwards; }
@keyframes draw-in { from { stroke-dashoffset: 400; } }
@keyframes show { from { opacity: 0; } }

/* ------------------------------------------------------------------ a flow of steps */
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; }
.flow > li { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.flow svg { width: 40px; height: 40px; margin-bottom: 4px; fill: none; stroke: var(--accent-text); stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round; }
.flow svg .fill { fill: var(--accent-tint); }
.flow strong { font-family: var(--sans); font-size: 16px; line-height: 1.35; }
.flow span { font-family: var(--sans); font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
/* An arrow between two steps, on wide screens where the steps sit in one row. */
@media (min-width: 641px) {
  .flow > li + li::before { content: ""; position: absolute; left: -12px; top: 16px; width: 8px; height: 8px;
    border-top: 1.5px solid var(--faint); border-right: 1.5px solid var(--faint); transform: rotate(45deg); }
}
/* A step that loops back, such as "run it again". */
.flow-loop { display: flex; gap: 10px; align-items: flex-start; padding-top: 12px; border-top: 1px dashed var(--frame);
  font-family: var(--sans); font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
.flow-loop svg { flex: 0 0 auto; width: 20px; height: 20px; fill: none; stroke: var(--accent-text); stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 640px) {
  .figure { padding: 14px; border-radius: 10px; }
  .flow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
