/* Article figures: HTML replacements for the old raster infographics. Loaded only on pages that contain a .afig.
   Built by scripts/article-figures.py from src/data/article-figures.json. */
.prose .afig { --paper: #FBFAF5; --type: #1E2022; --faint-type: #6D6F68; --rule-type: #D9D6CB; position: relative; margin-block: 2em; background: var(--paper); color: var(--type); border: 1px solid var(--line-strong); box-shadow: 0 1px 0 rgba(0, 0, 0, .05), 0 18px 36px -24px rgba(21, 24, 26, .45); text-align: left; font-family: var(--f-body); font-size: 15.5px; line-height: 1.45; isolation: isolate; }
.prose .afig::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: repeating-linear-gradient(0deg, rgba(0, 0, 0, .022) 0 1px, transparent 1px 3px); }
.prose .afig > * + * { margin-top: 0; }
.prose .afig > .afig-head { display: flex; justify-content: space-between; gap: 12px; padding: 10px 18px; border-bottom: 1px dashed var(--rule-type); font-family: var(--f-mono); font-stretch: 87.5%; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint-type); }
.afig-body { padding: clamp(18px, 3vw, 28px); }
.prose .afig .afig-title { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 6px; padding: 0; border: 0; font-family: var(--f-display); font-stretch: 112%; font-weight: 740; font-size: clamp(20px, 2.2vw, 26px); line-height: 1.15; letter-spacing: -.02em; color: var(--type); }
.afig-title::before { content: ""; flex: none; width: 14px; height: 8px; margin-top: .45em; background: var(--yellow); }
.prose .afig .afig-lead { margin: 0 0 20px; color: var(--faint-type); max-width: 60ch; }
.prose .afig strong { color: var(--type); }
.afig-k { display: block; font-family: var(--f-mono); font-stretch: 87.5%; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint-type); }
/* Two (or more) labelled lists side by side */
.afig-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px clamp(20px, 3vw, 36px); }
.afig-cols .afig-k { padding-bottom: 8px; border-bottom: 2px solid var(--type); }
.prose .afig-list { display: block; margin: 0; padding: 0; }
.prose .afig-list > li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0 9px 22px; border-bottom: 1px solid var(--rule-type); }
.prose .afig .afig-list > li::before { top: 1.02em; width: 8px; height: 8px; background: var(--yellow); border: 1px solid var(--type); border-radius: 0; }
.afig-foot a { color: var(--type); text-decoration: underline; text-underline-offset: 3px; }
.afig-list .n { font-family: var(--f-mono); font-stretch: 87.5%; font-size: 11px; color: var(--faint-type); }
/* Numbered grid of short points */
.prose .afig-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 clamp(20px, 3vw, 36px); margin: 0; padding: 0; counter-reset: fx; }
.prose .afig-grid > li { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule-type); counter-increment: fx; font-weight: 600; color: var(--type); }
.prose .afig-grid > li::before { content: counter(fx, decimal-leading-zero); position: static; display: grid; place-items: center; width: 44px; height: 44px; background: var(--type); color: var(--paper); border: 0; font-family: var(--f-mono); font-stretch: 87.5%; font-size: 13px; font-weight: 600; }
/* Case card: facts plus a row of results */
.afig-case { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.prose .afig-facts { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 0; margin: 0; }
.afig-facts dt, .afig-facts dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--rule-type); }
.afig-facts dt { padding-top: 13px; }
.afig-stats { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; margin-top: 14px; border: 1px solid var(--type); }
.afig-stat { padding: 16px 18px; border-left: 1px solid var(--type); }
.afig-stat:first-child { border-left: 0; }
.afig-stat b { display: block; font-family: var(--f-display); font-stretch: 118%; font-weight: 760; font-size: clamp(30px, 4vw, 44px); line-height: 1; letter-spacing: -.03em; color: var(--type); }
.afig-stat:first-child b { box-shadow: inset 0 -.28em 0 var(--yellow); display: inline-block; }
.afig-stat span { display: block; margin-top: 8px; font-size: 14px; color: var(--faint-type); }
.prose .afig > .afig-foot { display: flex; justify-content: space-between; gap: 12px; padding: 8px 18px; border-top: 1px dashed var(--rule-type); font-family: var(--f-mono); font-stretch: 87.5%; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint-type); }
@media (max-width: 560px) {
  .prose .afig-facts { grid-template-columns: minmax(0, 1fr); }
  .afig-facts dt { padding-bottom: 0; border-bottom: 0; }
  .afig-stats { grid-auto-flow: row; }
  .afig-stat { border-left: 0; border-top: 1px solid var(--type); }
  .afig-stat:first-child { border-top: 0; }
}
:root[data-theme="dark"] .prose .afig { --paper: #1C2124; --type: #E8ECEB; --faint-type: #98A2A4; --rule-type: #2F373A; border-color: var(--panel-line); }
:root[data-theme="dark"] .prose .afig::after { display: none; }
/* Tables inside an article figure */
.prose .afig .afig-table { padding: 0; overflow-x: auto; }
.prose .afig table { display: table; width: 100%; min-width: 560px; border: 0; background: none; font-size: 14.5px; line-height: 1.45; }
.prose .afig th, .prose .afig td { padding: 12px 16px; border-bottom: 1px solid var(--rule-type); color: var(--type); }
.prose .afig th { background: none; color: var(--faint-type); border-bottom: 2px solid var(--type); }
.prose .afig tbody tr:last-child td { border-bottom: 0; }
.prose .afig td:first-child { font-weight: 650; }
.prose .afig td.num { font-family: var(--f-mono); font-stretch: 87.5%; font-size: 13px; white-space: nowrap; }
.afig-tag { display: inline-block; padding: 3px 8px; border: 1px solid var(--type); font-family: var(--f-mono); font-stretch: 87.5%; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.afig-tag.high { background: var(--type); color: var(--paper); }
.afig-tag.medium { background: var(--yellow); color: var(--on-yellow); border-color: var(--on-yellow); }
.prose .afig .afig-body:has(+ .afig-table) { padding-bottom: 6px; }
@media (max-width: 640px) {
  .prose .afig table, .prose .afig tbody, .prose .afig tr, .prose .afig td { display: block; min-width: 0; }
  .prose .afig thead { display: none; }
  .prose .afig tr { padding: 14px 18px; border-top: 1px solid var(--rule-type); }
  .prose .afig td { padding: 3px 0; border: 0; }
  .prose .afig td:first-child { font-size: 15.5px; padding-bottom: 6px; }
  .prose .afig td:not(:first-child)::before { content: attr(data-label); display: block; font-family: var(--f-mono); font-stretch: 87.5%; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint-type); margin-top: 6px; }
}
/* Hub and spokes: a centre circle with numbered points on both sides (rebuilt from the old circle infographics) */
.afig-hub { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) clamp(140px, 24%, 180px) minmax(0, 1fr); grid-template-rows: repeat(var(--rows, 5), minmax(72px, auto)); column-gap: clamp(36px, 6vw, 72px); }
.afig-hub > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.afig-hub > svg line { stroke: var(--type); stroke-width: 1; }
.afig-hub > svg circle { fill: var(--type); }
.afig-hub-core { grid-column: 2; grid-row: 1 / -1; align-self: center; position: relative; z-index: 1; aspect-ratio: 1; display: grid; place-content: center; gap: 8px; padding: 18px; text-align: center; border-radius: 50%; background: var(--paper); border: 2px solid var(--type); box-shadow: 0 0 0 8px var(--paper), 0 0 0 9px var(--rule-type); }
.afig-hub-core b { font-family: var(--f-display); font-stretch: 112%; font-weight: 760; font-size: clamp(16px, 1.7vw, 20px); line-height: 1.1; letter-spacing: -.02em; color: var(--type); }
.afig-hub-core i { justify-self: center; width: 28px; height: 6px; background: var(--yellow); }
.prose .afig-hub ol { display: contents; }
.prose .afig-hub li { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; padding: 6px 0; counter-increment: none; }
.prose .afig-hub li::before { content: none; }
.afig-hub li.l { grid-column: 1; flex-direction: row-reverse; text-align: right; }
.afig-hub li.r { grid-column: 3; }
.afig-hub .dot { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--type); font-family: var(--f-mono); font-stretch: 87.5%; font-size: 13px; font-weight: 600; color: var(--type); }
.afig-hub .txt { font-weight: 600; font-size: 14.5px; line-height: 1.3; color: var(--type); }
.prose .afig-hub a.txt, .prose .afig-hub a.txt:hover { text-decoration: none; background: none; color: var(--type); }
.prose .afig-hub a.txt::after { content: ""; position: absolute; inset: 0; }
.afig-hub .dot { transition: background-color var(--t-fast, .15s), color var(--t-fast, .15s), transform var(--t-fast, .15s); }
.prose .afig-hub li:has(a.txt:hover) a.txt, .prose .afig-hub li:has(a.txt:focus-visible) a.txt { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; text-underline-offset: 3px; }
.afig-hub li:has(a.txt:hover) .dot, .afig-hub li:has(a.txt:focus-visible) .dot { background: var(--yellow); border-color: var(--on-yellow); color: var(--on-yellow); transform: scale(1.08); }
@media (max-width: 760px) {
  .afig-hub { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .afig-hub > svg { display: none; }
  .afig-hub-core { grid-column: 1; grid-row: auto; justify-self: center; width: 170px; margin-bottom: 18px; }
  .afig-hub li.l, .afig-hub li.r { grid-column: 1; grid-row: auto !important; flex-direction: row; text-align: left; border-bottom: 1px solid var(--rule-type); }
}

/* Shared: a numbered circle, and a row whose text links to the matching section (the whole row is clickable). */
.afig .dot { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--type); font-family: var(--f-mono); font-stretch: 87.5%; font-size: 13px; font-weight: 600; color: var(--type); transition: background-color .15s, color .15s, transform .15s; }
.afig .dot.big { width: 84px; height: 84px; font-family: var(--f-display); font-stretch: 112%; font-size: 21px; font-weight: 760; letter-spacing: -.02em; }
.prose .afig a.txt, .prose .afig a.txt:hover { color: var(--type); background: none; text-decoration: none; }
.prose .afig a.txt::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.prose .afig .lk { position: relative; }
.prose .afig .lk:has(a.txt:hover) a.txt, .prose .afig .lk:has(a.txt:focus-visible) a.txt { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; text-underline-offset: 3px; }
.afig .lk:has(a.txt:hover) .dot, .afig .lk:has(a.txt:focus-visible) .dot { background: var(--yellow); border-color: var(--on-yellow); color: var(--on-yellow); transform: scale(1.08); }
.afig .lk:has(a.txt:hover) .afig-card-top, .afig .lk:has(a.txt:focus-visible) .afig-card-top { background: var(--yellow); }
.afig .t { display: block; font-weight: 650; color: var(--type); line-height: 1.3; }
.afig .d { display: block; margin-top: 4px; font-size: 14px; line-height: 1.45; color: var(--faint-type); }
.prose .afig ul.b { display: grid; gap: 4px; margin: 8px 0 0; padding: 0; }
.prose .afig ul.b > li { padding-left: 16px; font-size: 14px; line-height: 1.45; color: var(--faint-type); }
.prose .afig ul.b > li::before { top: .55em; width: 6px; height: 6px; background: var(--type); border: 0; border-radius: 0; }

/* Circles: a row of numbered (or valued) circles on a line */
.prose .afig-circles { position: relative; display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 24px 16px; margin: 0; padding: 0; }
.prose .afig-circles > li { display: grid; justify-items: center; align-content: start; gap: 10px; padding: 0; text-align: center; }
.prose .afig-circles > li::before { content: none; }
.afig-circles .dot { width: 64px; height: 64px; font-size: 14px; position: relative; z-index: 1; }
.afig-circles .dot.big { width: 92px; height: 92px; }
.afig-circles > li:not(.eol) .dot-wrap::after { content: ""; position: absolute; top: 50%; left: calc(50% + 40px); width: calc(100% - 80px + 16px); border-top: 1px dashed var(--type); }
.afig-circles .dot-wrap { position: relative; width: 100%; display: grid; justify-items: center; }
.afig-circles .dot.big + * { margin-top: 0; }

/* Cards: titled boxes, optionally numbered, with text or bullets */
.prose .afig-cards { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; }
.prose .afig-cards > li { padding: 0; border: 1px solid var(--type); background: var(--paper); display: flex; flex-direction: column; }
.prose .afig-cards > li::before { content: none; }
.afig-card-top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--type); font-family: var(--f-mono); font-stretch: 87.5%; font-size: 11px; font-weight: 600; letter-spacing: .08em; color: var(--type); transition: background-color .15s; }
.afig-card-top::before { content: ""; width: 10px; height: 10px; background: var(--yellow); border: 1px solid var(--type); }
.afig-card-in { padding: 12px 14px 14px; }

/* Steps: a left-to-right process with arrows; .loop adds a return arrow for cycles */
.prose .afig-steps { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 18px 28px; margin: 0; padding: 0; }
.prose .afig-steps > li { position: relative; display: grid; align-content: start; gap: 10px; padding: 0; }
.prose .afig-steps > li::before { content: none; }
.afig-steps li.eol .arr { display: none; }
.afig-steps .arr { position: absolute; top: 23px; left: 56px; right: -20px; border-top: 1.5px solid var(--type); }
.afig-steps .arr::after { content: ""; position: absolute; right: -1px; top: -6px; border: 5px solid transparent; border-left: 8px solid var(--type); border-right: 0; }
.afig-loop { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 8px 0 0; border-top: 1.5px dashed var(--type); font-family: var(--f-mono); font-stretch: 87.5%; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint-type); }
.afig-loop::before { content: "↺"; font-size: 16px; color: var(--type); }

/* Bars: horizontal bar chart */
.prose .afig-bars { display: grid; gap: 12px; margin: 0; padding: 0; }
.prose .afig-bars > li { display: grid; grid-template-columns: minmax(110px, 34%) minmax(0, 1fr); align-items: center; gap: 14px; padding: 0; }
.prose .afig-bars > li::before { content: none; }
.afig-bars .t { font-size: 14px; font-weight: 600; }
.afig-bar { position: relative; display: flex; align-items: center; min-height: 30px; }
.afig-bar i { display: block; height: 26px; width: var(--w); min-width: 2px; background: var(--type); }
.afig-bars li.hi .afig-bar i { background: var(--yellow); outline: 1px solid var(--type); outline-offset: -1px; }
.afig-bar b { margin-left: 10px; font-family: var(--f-mono); font-stretch: 87.5%; font-size: 13px; font-weight: 600; color: var(--type); white-space: nowrap; }
/* Columns: vertical bar chart */
.prose .afig-cols-chart { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: end; gap: 12px; height: 260px; margin: 0; padding: 0 0 0; border-bottom: 1.5px solid var(--type); }
.prose .afig-cols-chart > li { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; padding: 0; }
.prose .afig-cols-chart > li::before { content: none; }
.afig-cols-chart i { display: block; width: min(56px, 80%); height: var(--h); background: var(--type); }
.afig-cols-chart li.hi i { background: var(--yellow); outline: 1px solid var(--type); outline-offset: -1px; }
.afig-cols-chart b { margin-bottom: 6px; font-family: var(--f-mono); font-stretch: 87.5%; font-size: 12px; font-weight: 600; color: var(--type); }
.afig-cols-labels { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; margin-top: 8px; text-align: center; font-size: 13px; line-height: 1.3; color: var(--faint-type); }

/* Stats: big numbers */
.afig-statrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border: 1px solid var(--type); }
.afig-statrow .afig-stat { border-left: 1px solid var(--type); border-top: 0; }

/* Donut */
.afig-donut { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); align-items: center; gap: clamp(20px, 4vw, 44px); }
.afig-donut-ring { aspect-ratio: 1; border-radius: 50%; background: var(--g); display: grid; place-items: center; }
.afig-donut-ring::before { content: ""; width: 56%; aspect-ratio: 1; border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 1px var(--type); }
.afig-donut-ring { box-shadow: 0 0 0 1px var(--type); position: relative; }
.afig-donut-ring span { position: absolute; font-family: var(--f-display); font-stretch: 112%; font-weight: 760; font-size: 20px; color: var(--type); text-align: center; line-height: 1.1; max-width: 50%; }
.prose .afig-legend { display: grid; gap: 8px; margin: 0; padding: 0; }
.prose .afig-legend > li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 0 0 8px; border-bottom: 1px solid var(--rule-type); font-size: 14.5px; color: var(--type); }
.prose .afig-legend > li::before { content: none; }
.afig-legend i { width: 14px; height: 14px; background: var(--c); border: 1px solid var(--type); }
.afig-legend b { font-family: var(--f-mono); font-stretch: 87.5%; font-size: 13px; }

/* Funnel / pyramid: stacked bands of changing width */
.prose .afig-funnel { display: grid; justify-items: center; gap: 6px; margin: 0; padding: 0; }
.prose .afig-funnel > li { width: var(--w); min-width: 220px; max-width: 100%; padding: 12px 16px; text-align: center; background: var(--type); color: var(--paper); }
.prose .afig-funnel > li::before { content: none; }
.afig-funnel > li .t { color: var(--paper); }
.afig-funnel > li .d { color: color-mix(in srgb, var(--paper) 72%, transparent); }
.afig-funnel > li.hi { background: var(--yellow); }
.afig-funnel > li.hi .t, .afig-funnel > li.hi .d { color: var(--on-yellow); }

/* Timeline: vertical line with dated points */
.prose .afig-timeline { position: relative; display: grid; gap: 18px; margin: 0; padding: 0 0 0 28px; }
.prose .afig-timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; border-left: 1.5px solid var(--type); }
.prose .afig-timeline > li { position: relative; padding: 0; }
.prose .afig-timeline > li::before { content: ""; left: -28px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--type); }
.prose .afig-timeline > li:last-child::before { background: var(--yellow); }
.afig-when { display: block; font-family: var(--f-mono); font-stretch: 87.5%; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint-type); margin-bottom: 2px; }

/* Matrix: 2x2 with axis labels */
.afig-matrix { display: grid; grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto auto; gap: 0; }
.afig-matrix .ax-y { grid-row: 1 / 3; writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; }
.afig-matrix .ax-x { grid-column: 2 / 4; text-align: center; padding-top: 8px; }
.afig-matrix .ax-y, .afig-matrix .ax-x { font-family: var(--f-mono); font-stretch: 87.5%; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint-type); }
.afig-matrix .cell { padding: 16px; border: 1px solid var(--type); margin: -1px 0 0 -1px; min-height: 110px; }
.afig-matrix .cell.hi { background: var(--yellow); }
.afig-matrix .cell.hi .t, .afig-matrix .cell.hi .d { color: var(--on-yellow); }

/* Versus: two (or more) columns of points with a "vs" marker */
.afig-vs { position: relative; display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 0; border: 1px solid var(--type); }
.afig-vs > div { padding: 16px 18px; border-left: 1px solid var(--type); }
.afig-vs > div:first-child { border-left: 0; }
.afig-vs > div:last-child .afig-k { color: var(--type); }
.afig-vs > div:last-child .afig-k::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; background: var(--yellow); border: 1px solid var(--type); vertical-align: -1px; }
.afig-vs .afig-k { padding-bottom: 10px; margin-bottom: 4px; border-bottom: 2px solid var(--type); }
.afig-vs-mark { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--paper); border: 1px solid var(--type); font-family: var(--f-mono); font-stretch: 87.5%; font-size: 11px; font-weight: 600; color: var(--type); z-index: 1; }

@media (max-width: 640px) {
  .prose .afig-steps { grid-template-columns: minmax(0, 1fr); }
  .afig-steps li.eol .arr { display: block; }
  .afig-steps li:last-child .arr { display: none; }
  .prose .afig-cards { grid-template-columns: minmax(0, 1fr); }
  .prose .afig-steps > li { grid-template-columns: 46px minmax(0, 1fr); align-items: start; }
  .afig-steps .arr { top: 52px; bottom: -14px; left: 22px; right: auto; border-top: 0; border-left: 1.5px solid var(--type); }
  .afig-steps .arr::after { right: auto; top: auto; bottom: -1px; left: -6px; border: 5px solid transparent; border-top: 8px solid var(--type); border-bottom: 0; }
  .prose .afig-circles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .afig-circles > li .dot-wrap::after { display: none; }
  .afig-donut { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .afig-donut-ring { width: 180px; }
  .prose .afig-legend { width: 100%; }
  .prose .afig-bars > li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .afig-vs { grid-template-columns: minmax(0, 1fr); }
  .afig-vs > div { border-left: 0; border-top: 1px solid var(--type); }
  .afig-vs > div:first-child { border-top: 0; }
  .afig-vs-mark { display: none; }
  .afig-matrix .cell { min-height: 0; }
  .afig-statrow .afig-stat { border-left: 0; border-top: 1px solid var(--type); }
  .afig-statrow .afig-stat:first-child { border-top: 0; }
  .prose .afig-cols-chart { height: 200px; gap: 6px; }
  .afig-cols-labels { gap: 6px; font-size: 11.5px; }
}
.prose .afig .afig-title + :not(.afig-lead) { margin-top: 18px; }

/* Lanes: side-by-side vertical sequences (A vs B, before vs after) */
.afig-lanes { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 22px clamp(20px, 4vw, 44px); }
.afig-lanes .afig-k { padding-bottom: 10px; margin-bottom: 14px; border-bottom: 2px solid var(--type); }
.afig-lanes > div:last-child .afig-k { color: var(--type); }
.prose .afig-lanes ol { display: grid; gap: 14px; margin: 0; padding: 0; }
.prose .afig-lanes li { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 12px; padding: 0; }
.prose .afig-lanes li::before { content: none; }
.afig-lanes .dot { width: 40px; height: 40px; font-size: 12px; position: relative; z-index: 1; }
.afig-lanes li:not(:last-child)::after { content: ""; position: absolute; left: 19.5px; top: 40px; height: 14px; border-left: 1.5px solid var(--type); }
.afig-lanes > div:last-child .dot { background: var(--yellow); border-color: var(--on-yellow); color: var(--on-yellow); }
@media (max-width: 640px) { .afig-lanes { grid-template-columns: minmax(0, 1fr); } }
.afig-statrow .afig-stat b { font-size: clamp(26px, 3.2vw, 38px); white-space: nowrap; }

/* Rows: a vertical numbered sequence with titles and descriptions */
.prose .afig-rows { display: grid; gap: 0; margin: 0; padding: 0; }
.prose .afig-rows > li { position: relative; display: grid; grid-template-columns: 46px minmax(0, 1fr); align-items: start; gap: 16px; padding: 0 0 18px; }
.prose .afig-rows > li::before { content: none; }
.afig-rows > li:not(:last-child)::after { content: ""; position: absolute; left: 22.5px; top: 46px; bottom: 0; border-left: 1.5px solid var(--type); }
.afig-rows .dot { position: relative; z-index: 1; }
.afig-rows > li > span:last-child { padding-top: 12px; }
.prose .afig ul.b.two { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; }

/* Stack: several shapes in one figure, each under a subhead */
.afig-sec + .afig-sec { margin-top: 26px; padding-top: 22px; border-top: 1px dashed var(--rule-type); }
.prose .afig .afig-sub { margin: 0 0 14px; font-family: var(--f-display); font-stretch: 112%; font-weight: 720; font-size: 18px; line-height: 1.2; letter-spacing: -.01em; color: var(--type); }
.prose .afig .afig-sec .afig-lead { margin-top: -6px; }

/* Org: one lead role with the roles that report to it */
.afig-org { display: grid; justify-items: center; }
.afig-org-root { position: relative; max-width: 320px; padding: 14px 18px; text-align: center; background: var(--type); color: var(--paper); }
.afig-org-root .t { color: var(--paper); }
.afig-org-root .d { color: color-mix(in srgb, var(--paper) 72%, transparent); }
.afig-org-root::after { content: ""; position: absolute; left: 50%; top: 100%; height: 18px; border-left: 1.5px solid var(--type); }
.prose .afig-org-kids { position: relative; display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 14px; width: 100%; margin: 36px 0 0; padding: 0; }
.prose .afig-org-kids::before { content: ""; position: absolute; left: calc(50% / var(--cols)); right: calc(50% / var(--cols)); top: -18px; border-top: 1.5px solid var(--type); background: none; width: auto; height: 0; }
.prose .afig-org-kids > li { position: relative; padding: 12px 14px; border: 1px solid var(--type); background: var(--paper); }
.prose .afig-org-kids > li:not(.r1)::before { content: none; }
.prose .afig-org-kids > li.r1::before { content: ""; position: absolute; left: 50%; top: -19px; height: 18px; width: 0; border: 0; border-left: 1.5px solid var(--type); background: none; }
@media (max-width: 640px) { .prose .afig-org-kids::before { display: none; } .prose .afig-org-kids { grid-template-columns: minmax(0, 1fr); margin-top: 22px; } .prose .afig-org-kids > li::before { top: -15px; height: 14px; } .afig-org-root::after { height: 8px; } }
.prose .afig-grid > li.lk:has(a.txt:hover)::before, .prose .afig-grid > li.lk:has(a.txt:focus-visible)::before { background: var(--yellow); color: var(--on-yellow); transition: background-color .15s; }

/* Line chart (SVG). Series 0: solid ink; series 1: dashed ink with yellow points; series 2: light ink. */
.afig-linechart { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--f-mono); }
.afig-linechart .g { stroke: var(--rule-type); stroke-width: 1; }
.afig-linechart .ax { font-size: 11px; fill: var(--faint-type); }
.afig-linechart .v { font-size: 11.5px; font-weight: 600; fill: var(--type); }
.afig-linechart polyline { fill: none; stroke: var(--type); stroke-width: 2.5; stroke-linejoin: round; }
.afig-linechart polyline.s1 { stroke-dasharray: 7 5; }
.afig-linechart polyline.s2 { stroke: color-mix(in srgb, var(--type) 45%, var(--paper)); }
.afig-linechart circle { fill: var(--type); stroke: var(--paper); stroke-width: 2; }
.afig-linechart circle.s1 { fill: var(--yellow); stroke: var(--type); stroke-width: 1.5; }
.afig-linechart circle.s2 { fill: color-mix(in srgb, var(--type) 45%, var(--paper)); }
.prose .afig-linelegend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin: 14px 0 0; padding: 0; font-size: 14px; color: var(--type); }
.prose .afig-linelegend > li { display: flex; align-items: center; gap: 8px; padding: 0; }
.prose .afig-linelegend > li::before { content: none; }
.afig-linelegend i { width: 26px; height: 0; border-top: 2.5px solid var(--type); position: relative; }
.afig-linelegend i::after { content: ""; position: absolute; left: 8px; top: -6.5px; width: 9px; height: 9px; border-radius: 50%; background: var(--type); }
.afig-linelegend .s1 i { border-top-style: dashed; }
.afig-linelegend .s1 i::after { background: var(--yellow); border: 1.5px solid var(--type); top: -7.5px; }
.afig-linelegend .s2 i { border-color: color-mix(in srgb, var(--type) 45%, var(--paper)); }
.afig .d.p { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--rule-type); font-size: 13.5px; }

/* Pairs: left leads to right (task -> outcome, problem -> fix) */
.afig-pairs-h, .prose .afig-pairs > li { display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr); align-items: center; gap: 12px; }
.afig-pairs-h { padding-bottom: 8px; border-bottom: 2px solid var(--type); }
.prose .afig-pairs { display: grid; margin: 0; padding: 0; }
.prose .afig-pairs > li { padding: 14px 0; border-bottom: 1px solid var(--rule-type); }
.prose .afig-pairs > li::before { content: none; }
.afig-pairs-arr { position: relative; height: 0; border-top: 1.5px solid var(--type); }
.afig-pairs-arr::after { content: ""; position: absolute; right: -1px; top: -6.5px; border: 5.5px solid transparent; border-left: 9px solid var(--type); border-right: 0; }
.afig-pairs > li > span:last-child .t { box-shadow: inset 0 -.38em 0 var(--yellow-soft, #FBEDB8); display: inline; }
@media (max-width: 640px) { .afig-pairs-h, .prose .afig-pairs > li { grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr); gap: 8px; } }
:root[data-theme="dark"] .afig-pairs > li > span:last-child .t { box-shadow: inset 0 -.38em 0 rgba(242, 194, 48, .3); }
.afig-hub li .d { font-size: 13px; margin-top: 2px; }

/* Stairs: levels that build on each other, rising left to right */
.prose .afig-stairs { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); align-items: start; gap: 16px; margin: 0; padding: 0; }
.prose .afig-stairs > li { display: grid; gap: 10px; align-content: start; margin-top: calc(var(--up) * 44px); padding: 14px 0 0; border-top: 3px solid var(--type); }
.prose .afig-stairs > li::before { content: none; }
.afig-stairs .dot.big { width: 56px; height: 56px; font-size: 18px; }
.afig-stairs > li:last-child { border-top-color: var(--yellow); }
@media (max-width: 640px) { .prose .afig-stairs { grid-template-columns: minmax(0, 1fr); } .prose .afig-stairs > li { margin-top: 0; margin-left: calc((var(--cols) - 1 - var(--up)) * 14px); } }
.afig-hub li .txt { display: block; line-height: 1.25; }
.prose .afig-grid > li .t { font-weight: 600; } .prose .afig-grid > li .d { font-weight: 400; font-size: 13.5px; }

/* Stacked columns */
.prose .afig-stacked { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: end; gap: 12px; height: 280px; margin: 0; padding: 0; border-bottom: 1.5px solid var(--type); }
.prose .afig-stacked > li { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; padding: 0; }
.prose .afig-stacked > li::before { content: none; }
.afig-stacked > li > b { margin-bottom: 6px; font-family: var(--f-mono); font-stretch: 87.5%; font-size: 12px; font-weight: 600; color: var(--type); }
.afig-stacked .stk { display: flex; flex-direction: column-reverse; width: min(56px, 80%); height: calc(100% - 24px); justify-content: flex-start; }
.afig-stacked .stk i { display: grid; place-items: center; height: var(--h); background: var(--type); color: var(--paper); font-style: normal; overflow: hidden; }
.afig-stacked .stk i.s1 { background: var(--yellow); color: var(--on-yellow); outline: 1px solid var(--type); outline-offset: -1px; }
.afig-stacked .stk i span { font-family: var(--f-mono); font-stretch: 87.5%; font-size: 10.5px; }
.afig-stackleg .s0 i, .afig-stackleg .s1 i { width: 14px; height: 14px; border: 1px solid var(--type); background: var(--type); }
.afig-stackleg .s1 i { background: var(--yellow); }
.afig-stackleg i::after { display: none; }
.prose .afig .afig-note { margin: 12px 0 0; font-size: 13.5px; text-align: center; }
@media (max-width: 640px) { .prose .afig-stacked { gap: 4px; height: 220px; } .afig-stacked .stk i span { display: none; } .afig-stacked > li > b { font-size: 10px; } }
@media (max-width: 640px) { .afig-cols-chart.many b { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 10px; margin-bottom: 4px; } .afig-cols-chart.many + .afig-cols-labels { font-size: 9.5px; } }
