/* ==========================================================================
   LazyFox article figures — shared house shapes
   --------------------------------------------------------------------------
   Four recurring shapes cover almost every argument diagram in the blog:

     A. .afig-split / .afig-rail  — two-rail split: inspectable vs. decided
     B. .afig-bars / .afig-stack  — proportional bar: one quantity dominating
     C. .afig-ladder            — descending ladder: something falling away
     D. .afig-fan               — fan-out: one thing, several defensible readings
     E. .afig-tri               — three-band stack: requirements that hold at once
                                  (Data · Meaning · Trust — shared across posts)

   Plus three composites used more than once:
     .afig-panels   two-panel before/after
     .afig-stacks   stack vs. stack (layer mismatch)
     .afig-timeline drift over time

   All type, colour and spacing inherit the per-article :root tokens
   (--teal, --teal-mid, --teal-dark, --teal-light, --ink, --stone, --muted,
   --border, --red, --font-display). Nothing here defines a colour literally
   except white panel fills, so a token change propagates everywhere.

   Every figure is plain CSS/HTML: no SVG, no images, no JS dependency.
   Scales, prints, indexes, weighs nothing.
   ========================================================================== */


/* ── SHARED CHROME ─────────────────────────────────────────────────────── */

.afig-fig { margin: 46px 0 10px; }

.afig-fig-cap {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 18px;
}
.afig-fig-cap::before { content: ""; width: 24px; height: 1px; background: var(--teal); flex: none; }

/* legend row sits under the figure, one cell per zone */
.afig-fig-legend { display: flex; margin-top: 12px; gap: 20px; }
.afig-fig-legend > div {
  flex: 1 1 0; min-width: 0;
  font-size: 12px; line-height: 1.5; color: var(--muted);
  padding-top: 11px; border-top: 1px solid var(--border);
}
.afig-fig-legend > div.afig-lg-accent { border-top-color: var(--teal); color: var(--teal-mid); }
.afig-fig-legend > div.afig-lg-warn   { border-top-color: var(--red);  color: var(--red); }
/* when the figure above is the asymmetric rail, the last legend cell tracks the side rail */
/* under a three-column figure (the cliff): last cell spans exactly the last column */
.afig-fig-legend.afig-legend-thirds { gap: 14px; }
.afig-fig-legend.afig-legend-thirds > div:last-child { flex: 0 0 calc((100% - 28px) / 3); }
.afig-fig-legend.afig-legend-rail { gap: 0; }
.afig-fig-legend.afig-legend-rail > div:first-child { padding-right: 20px; }
.afig-fig-legend.afig-legend-rail > div:last-child  { flex: 0 0 168px; text-align: center; }

.afig-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
}
.afig-note { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.afig-num  { font-family: var(--font-display); font-weight: 400; color: var(--teal-dark); line-height: 1.1; letter-spacing: -0.02em; }

.afig-panel        { border: 1px solid var(--border); background: #FFFFFF; padding: 20px 24px; }
.afig-panel-accent { border: 1px solid var(--teal);   background: var(--teal-light); padding: 20px 24px; }
.afig-panel-quiet  { border: 1px solid var(--border); background: var(--stone); padding: 20px 24px; }


/* ── SHAPE A · TWO-RAIL SPLIT ──────────────────────────────────────────── */
/* Left rail: what a machine can inspect. Right rail: what people decided.   */

.afig-split { display: flex; align-items: stretch; }
.afig-split > .afig-col {
  flex: 1 1 0; min-width: 0;
  border: 1px solid var(--border); background: #FFFFFF; padding: 20px 24px;
}
.afig-split > .afig-col + .afig-col { border-left: none; }
.afig-split > .afig-col.afig-col-accent { border-color: var(--teal); background: var(--teal-light); }
.afig-split > .afig-col.afig-col-accent + .afig-col,
.afig-split > .afig-col + .afig-col.afig-col-accent { border-left: 1px solid var(--teal); }

.afig-col .afig-label { margin-bottom: 18px; display: block; }
.afig-col-accent .afig-label { color: var(--teal-mid); }

/* rows inside a rail */
.afig-row { font-size: 13px; line-height: 1.5; color: var(--ink); padding: 9px 0; border-top: 1px solid var(--border); }
.afig-row:first-of-type { border-top: none; padding-top: 0; }
.afig-col-accent .afig-row { border-top-color: rgba(15,110,86,0.16); color: var(--teal-dark); }
.afig-row-k { display: block; font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.afig-col-accent .afig-row-k { color: var(--teal-mid); }
.afig-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }

/* asymmetric variant: wide main rail + fixed narrow accent rail (jfig shape) */
.afig-rail { display: flex; align-items: stretch; }
.afig-rail > .afig-rail-main {
  flex: 1 1 auto; min-width: 0;
  border: 1px solid var(--border); border-right: none; background: #FFFFFF; padding: 20px 24px;
}
.afig-rail > .afig-rail-side {
  flex: 0 0 168px;
  border: 1px solid var(--teal); background: var(--teal-light);
  padding: 20px 16px; text-align: center;
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
}
.afig-rail-main .afig-note { margin-top: 20px; }
.afig-rail-side .afig-label { color: var(--teal-mid); margin-bottom: 2px; }
.afig-rail-side .afig-note  { color: var(--teal-mid); font-size: 11.5px; }
.afig-rail-side .afig-entry { font-family: var(--font-display); font-size: 18px; color: var(--teal-dark); line-height: 1.25; }

/* connected step track (dots joined by a hairline) */
.afig-steps { display: flex; margin: 0; padding: 0; list-style: none; }
.afig-steps > .afig-step {
  position: relative; flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 11px;
  font-size: 12.5px; font-weight: 500; color: var(--ink);
  line-height: 1.3; text-align: center; margin: 0; padding: 0 2px;
  overflow-wrap: break-word;
}
.afig-steps.afig-steps-six > .afig-step { font-size: 11.5px; }
.afig-steps > .afig-step::before {
  content: ""; position: absolute; z-index: 0;
  top: 4px; left: 50%; width: 100%; height: 1px; background: var(--border);
}
.afig-steps > .afig-step:last-child::before { width: calc(50% + 24px); }
.afig-dot {
  position: relative; z-index: 1; flex: none;
  width: 9px; height: 9px; border-radius: 50%;
  background: #FFFFFF; border: 1.5px solid var(--teal);
}


/* ── SHAPE B · PROPORTIONAL BAR ────────────────────────────────────────── */

/* B1 · comparison rows — several bars sharing one scale */
.afig-bars { display: flex; flex-direction: column; gap: 18px; }
.afig-bars-hd { font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding-bottom: 2px; border-bottom: 1px solid var(--border); }
.afig-bars-hd.afig-hd-accent { color: var(--teal-mid); border-bottom-color: var(--teal); }
.afig-bars-scale { font-size: 11px; color: var(--muted); text-align: right; margin-top: 4px; }
.afig-bar-row { display: block; }
.afig-bar-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 7px; }
.afig-bar-key  { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.afig-bar-val  { font-family: var(--font-display); font-size: 17px; color: var(--ink); letter-spacing: -0.02em; }
.afig-bar-track {
  position: relative; height: 34px; background: var(--stone);
  border: 1px solid var(--border); overflow: hidden;
}
.afig-bar-fill { position: absolute; top: 0; left: 0; bottom: 0; background: var(--teal); }
.afig-bar-fill.afig-fill-quiet { background: var(--teal-mid); opacity: 0.35; }
.afig-bar-fill.afig-fill-warn  { background: var(--red); }
/* a sliver too thin to read needs a tick so it stays visible at any width */
.afig-bar-fill.afig-fill-sliver { min-width: 3px; }
.afig-bar-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 7px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.afig-bar-foot .afig-foot-accent { color: var(--teal-mid); }

/* B2 · one bar, segmented to scale */
.afig-stack { display: flex; height: 44px; border: 1px solid var(--border); overflow: hidden; }
.afig-stack > .afig-seg {
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: var(--muted);
  background: var(--stone); border-right: 1px solid var(--border);
  min-width: 0; overflow: hidden; white-space: nowrap;
}
.afig-stack > .afig-seg:last-child { border-right: none; }
.afig-stack > .afig-seg.afig-seg-accent { background: var(--teal); color: #FFFFFF; border-right-color: var(--teal); }
.afig-stack-keys { display: flex; margin-top: 10px; }
.afig-stack-keys > div { flex: 1 1 0; min-width: 0; padding-right: 16px; font-size: 12px; line-height: 1.5; color: var(--muted); border-top: 1px solid var(--border); padding-top: 10px; }
.afig-stack-keys > div:last-child { padding-right: 0; }
.afig-stack-keys > div.afig-key-accent { border-top-color: var(--teal); color: var(--teal-mid); }
.afig-stack-keys strong { display: block; font-weight: 600; color: var(--ink); font-size: 12.5px; margin-bottom: 2px; }
.afig-stack-keys .afig-key-accent strong { color: var(--teal-dark); }


/* ── SHAPE C · DESCENDING LADDER ───────────────────────────────────────── */
/* Each rung loses something the rung above it had.                          */

.afig-ladder { border: 1px solid var(--border); background: #FFFFFF; }
.afig-rung {
  display: flex; align-items: center; gap: 18px;
  padding: 15px 22px; border-bottom: 1px solid var(--border);
}
.afig-rung:last-child { border-bottom: none; }
.afig-rung-name { flex: 0 0 152px; min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.afig-rung-name span { display: block; font-size: 11px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.afig-rung-body { flex: 1 1 auto; min-width: 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.afig-rung-meter { flex: 0 0 96px; }
.afig-meter { height: 8px; background: var(--stone); border: 1px solid var(--border); position: relative; overflow: hidden; }
.afig-meter-fill { position: absolute; top: 0; left: 0; bottom: 0; background: var(--teal); }
.afig-rung.afig-rung-weak  .afig-meter-fill { background: var(--teal-mid); opacity: 0.55; }
.afig-rung.afig-rung-weakest .afig-meter-fill { background: var(--red); opacity: 0.75; }
.afig-ladder-head { display: flex; gap: 18px; padding: 0 22px 10px; }
.afig-ladder-head > div { font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.afig-ladder-head .h-name  { flex: 0 0 152px; }
.afig-ladder-head .h-body  { flex: 1 1 auto; }
.afig-ladder-head .h-meter { flex: 0 0 96px; text-align: right; }

/* descending bars: same idea, used for a metric falling off a cliff */
.afig-cliff { display: flex; align-items: flex-end; gap: 14px; height: 208px; }
.afig-cliff > .afig-cliff-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.afig-cliff-val { font-family: var(--font-display); font-size: 22px; color: var(--teal-dark); letter-spacing: -0.02em; margin-bottom: 8px; text-align: center; }
.afig-cliff-bar { background: var(--teal); border: 1px solid var(--teal); }
.afig-cliff-col.afig-mid  .afig-cliff-bar { background: var(--teal-mid); border-color: var(--teal-mid); }
.afig-cliff-col.afig-low  .afig-cliff-bar { background: var(--red); border-color: var(--red); }
.afig-cliff-col.afig-low  .afig-cliff-val { color: var(--red); }
.afig-cliff-keys { display: flex; gap: 14px; margin-top: 10px; }
.afig-cliff-keys > div { flex: 1 1 0; min-width: 0; border-top: 1px solid var(--border); padding-top: 10px; font-size: 12px; line-height: 1.45; color: var(--muted); }
.afig-cliff-keys strong { display: block; font-weight: 600; color: var(--ink); font-size: 12.5px; margin-bottom: 2px; }
.afig-cliff-keys > div.afig-key-warn { border-top-color: var(--red); }
.afig-cliff-keys > div.afig-key-warn strong { color: var(--red); }


/* ── SHAPE D · FAN-OUT ─────────────────────────────────────────────────── */
/* One source, several readings, each defensible, converging on a decision.  */

.afig-fan { display: flex; align-items: stretch; gap: 0; }
.afig-fan-src {
  flex: 0 0 150px; display: flex; flex-direction: column; justify-content: center; gap: 6px;
  border: 1px solid var(--border); background: var(--stone); padding: 18px 16px; text-align: center;
}
.afig-fan-src .afig-entry { font-family: var(--font-display); font-size: 17px; color: var(--ink); line-height: 1.25; }
.afig-fan-arms { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 0 20px; }
.afig-arm {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 3px 12px;
  border: 1px solid var(--border); background: #FFFFFF; padding: 10px 14px;
}
.afig-arm-who { min-width: 0; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal-mid); }
.afig-arm-val { font-family: var(--font-display); font-size: 16px; color: var(--teal-dark); text-align: right; white-space: nowrap; }
.afig-arm-why { grid-column: 1 / -1; min-width: 0; font-size: 12px; color: var(--muted); line-height: 1.45; text-align: left; }
.afig-fan-sink {
  flex: 0 0 150px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px;
  border: 1px solid var(--red); background: #FFFFFF; padding: 18px 16px; text-align: center;
}
.afig-fan-sink .afig-mark { font-family: var(--font-display); font-size: 34px; color: var(--red); line-height: 1; }
.afig-fan-sink .afig-note { color: var(--red); font-size: 11.5px; }


/* ── SHAPE E · THE THREE-BAND STACK ────────────────────────────────────── */
/* Data · Meaning · Trust. Three requirements that have to hold at once,     */
/* carried by one layer underneath. Shared across posts — keep it identical. */

.afig-tri { border: 1px solid var(--border); background: #FFFFFF; }
.afig-tri-band { display: flex; align-items: flex-start; gap: 20px; padding: 17px 22px; border-bottom: 1px solid var(--border); }
.afig-tri-name {
  flex: 0 0 190px; min-width: 0;
  font-family: var(--font-display); font-size: 21px; font-weight: 400;
  color: var(--teal-dark); line-height: 1.15; letter-spacing: -0.02em;
}
.afig-tri-name a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(15,110,86,0.28); }
.afig-tri-name a:visited { color: inherit; }
.afig-tri-name a:hover { border-bottom-color: var(--teal); }
.afig-tri-name span {
  display: block; margin-top: 5px;
  font-family: var(--font-body); font-size: 10px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.afig-tri-body { flex: 1 1 auto; min-width: 0; font-size: 13px; color: var(--ink); line-height: 1.6; font-weight: 300; padding-top: 3px; }
/* the layer that carries all three */
.afig-tri-foot {
  display: flex; align-items: baseline; gap: 20px;
  padding: 16px 22px; background: var(--teal-light); border-top: 1px solid var(--teal);
}
.afig-tri-foot .afig-label { flex: 0 0 190px; color: var(--teal-mid); }
.afig-tri-foot .afig-label a { color: inherit; border-bottom: 1px solid rgba(15,110,86,0.3); }
.afig-tri-foot .afig-label a:visited { color: inherit; }
.afig-tri-foot .afig-note { flex: 1 1 auto; min-width: 0; color: var(--teal-mid); }

/* ── COMPOSITE · TWO PANELS (before / after) ───────────────────────────── */

.afig-panels { display: flex; gap: 16px; align-items: stretch; }
.afig-panels > .afig-pane {
  flex: 1 1 0; min-width: 0;
  border: 1px solid var(--border); background: #FFFFFF; padding: 20px 22px;
  display: flex; flex-direction: column; gap: 12px;
}
.afig-panels > .afig-pane.afig-pane-warn { border-color: var(--red); }
.afig-pane-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.afig-pane-warn .afig-pane-hd { border-bottom-color: rgba(201,64,64,0.25); }
.afig-pane-hd .afig-label { margin: 0; }
.afig-pane-hd .afig-count { font-family: var(--font-display); font-size: 16px; color: var(--ink); }
.afig-pane-warn .afig-pane-hd .afig-count { color: var(--red); }
.afig-unit { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink); line-height: 1.45; }
.afig-unit .afig-chip {
  flex: none; font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--teal-mid); background: rgba(29,158,117,0.08); padding: 3px 8px; border-radius: 3px;
}
.afig-pane-warn .afig-unit .afig-chip { color: var(--red); background: rgba(201,64,64,0.08); }
.afig-unit-val { margin-left: auto; font-family: var(--font-display); font-size: 15px; color: var(--teal-dark); }
.afig-pane-warn .afig-unit-val { color: var(--red); }


/* ── COMPOSITE · STACK VS. STACK ───────────────────────────────────────── */
/* Two architectures side by side, so a fix can visibly land on one band.    */

.afig-stacks { display: flex; align-items: stretch; gap: 0; }
.afig-stacks > .afig-tower { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.afig-tower-hd { font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; min-height: 28px; }
.afig-band {
  border: 1px solid var(--border); border-bottom: none; background: #FFFFFF;
  padding: 13px 16px; font-size: 12.5px; line-height: 1.4; color: var(--ink);
}
.afig-band:last-child { border-bottom: 1px solid var(--border); }
.afig-band .afig-band-k { display: block; font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.afig-band.afig-band-target { background: var(--teal-light); border-color: var(--teal); }
.afig-band.afig-band-target + .afig-band { border-top-color: var(--teal); }
.afig-band.afig-band-target .afig-band-k { color: var(--teal-mid); }
.afig-band.afig-band-miss { background: var(--stone); }
.afig-band-tall { padding-top: 30px; padding-bottom: 30px; }
/* the connector between the two towers */
.afig-stacks-link { flex: 0 0 86px; display: flex; align-items: flex-start; justify-content: center; position: relative; padding-top: 62px; }
.afig-stacks-link .afig-arrow { width: 100%; height: 1px; background: var(--teal); position: relative; }
.afig-stacks-link .afig-arrow::after {
  content: ""; position: absolute; right: 0; top: -3px;
  border-left: 6px solid var(--teal); border-top: 3.5px solid transparent; border-bottom: 3.5px solid transparent;
}
.afig-stacks-link .afig-arrow-lbl {
  position: absolute; left: 50%; transform: translateX(-50%); top: -22px; white-space: nowrap;
  font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal-mid);
}


/* ── COMPOSITE · TIMELINE ──────────────────────────────────────────────── */

.afig-timeline { display: flex; align-items: stretch; gap: 0; }
.afig-tl-end {
  flex: 0 0 176px; border: 1px solid var(--border); background: #FFFFFF; padding: 16px 18px;
  display: flex; flex-direction: column; gap: 6px; justify-content: center;
}
.afig-tl-end .afig-entry { font-family: var(--font-display); font-size: 16px; color: var(--ink); line-height: 1.3; }
.afig-tl-end.afig-tl-later { border-color: var(--red); }
.afig-tl-end.afig-tl-later .afig-note { color: var(--red); }
.afig-tl-mid { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 18px; }
.afig-tl-marks { display: flex; gap: 10px; position: relative; }
/* the hairline runs between the first and last dot, behind them */
.afig-tl-marks::before { content: ""; position: absolute; top: 3px; left: 16%; right: 16%; height: 1px; background: var(--border); }
.afig-tl-mark {
  flex: 1 1 0; min-width: 0; position: relative; padding-top: 18px;
  text-align: center; font-size: 11.5px; color: var(--muted); line-height: 1.4;
}
.afig-tl-mark::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 7px; height: 7px; border-radius: 50%; background: #FFFFFF; border: 1.5px solid var(--muted);
}


/* ── COMPOSITE · DIVERGING CURVES ──────────────────────────────────────── */
/* Two cost paths on one log-ish scale. Slope is the argument, not precision. */

.afig-curves { position: relative; border: 1px solid var(--border); background: #FFFFFF; padding: 22px 24px 0; }
.afig-curve-plot { position: relative; height: 210px; }
.afig-curve-grid { position: absolute; inset: 0; }
.afig-curve-grid > div { position: absolute; left: 0; right: 0; height: 1px; background: var(--border); opacity: 0.6; }
.afig-curve-pt { position: absolute; transform: translate(-50%, 50%); }
.afig-curve-pt .afig-node { width: 9px; height: 9px; border-radius: 50%; background: #FFFFFF; border: 1.5px solid var(--teal); margin: 0 auto; }
.afig-curve-pt.afig-warn .afig-node { border-color: var(--red); }
.afig-curve-pt .afig-pt-lbl {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 16px; white-space: nowrap;
  font-family: var(--font-display); font-size: 14px; color: var(--teal-dark);
}
.afig-curve-pt.afig-warn .afig-pt-lbl { color: var(--red); }
.afig-curve-seg { position: absolute; height: 1.5px; background: var(--teal); transform-origin: 0 50%; }
.afig-curve-seg.afig-warn { background: var(--red); }
.afig-curve-x { display: flex; border-top: 1px solid var(--border); margin-top: 4px; }
.afig-curve-x > div { flex: 1 1 0; min-width: 0; text-align: center; padding: 10px 4px 16px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.afig-curve-tag { position: absolute; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.afig-curve-tag.t-wiki { color: var(--red); }
.afig-curve-tag.t-lf   { color: var(--teal-mid); }


/* ── RESPONSIVE ────────────────────────────────────────────────────────── */

@media (max-width: 720px) {
  .afig-fig { margin: 36px 0 10px; }

  .afig-split { flex-direction: column; }
  .afig-split > .afig-col + .afig-col { border-left: 1px solid var(--border); border-top: none; }
  .afig-split > .afig-col.afig-col-accent + .afig-col,
  .afig-split > .afig-col + .afig-col.afig-col-accent { border-left-width: 1px; }
  .afig-split > .afig-col { padding: 18px; }

  .afig-rail { flex-direction: column; }
  .afig-rail > .afig-rail-main { border-right: 1px solid var(--border); border-bottom: none; padding: 18px; }
  .afig-rail > .afig-rail-side { flex: 1 1 auto; text-align: left; align-items: flex-start; padding: 16px 18px; }

  .afig-fig-legend { flex-direction: column; gap: 0; }
  .afig-fig-legend > div { padding-top: 10px; margin-top: 10px; }
  .afig-fig-legend.afig-legend-rail > div:last-child { flex: 1 1 auto; text-align: left; }
  .afig-fig-legend.afig-legend-thirds > div:last-child { flex: 1 1 auto; }
  .afig-fig-legend.afig-legend-rail > div:first-child { padding-right: 0; }

  .afig-rung { flex-wrap: wrap; gap: 10px 14px; padding: 14px 16px; }
  .afig-rung-name { flex: 1 1 100%; }
  .afig-rung-body { flex: 1 1 100%; order: 3; }
  .afig-rung-meter { flex: 0 0 72px; order: 2; margin-left: auto; }
  .afig-ladder-head { display: none; }

  .afig-fan { flex-direction: column; }
  .afig-fan-src, .afig-fan-sink { flex: 1 1 auto; text-align: left; align-items: flex-start; }
  .afig-fan-arms { padding: 12px 0; gap: 8px; }

  .afig-tri-band, .afig-tri-foot { flex-direction: column; gap: 8px; padding: 15px 17px; }
  .afig-tri-name, .afig-tri-foot .afig-label { flex: 1 1 auto; }
  .afig-tri-name { font-size: 19px; }

  .afig-panels { flex-direction: column; }

  .afig-stacks { flex-direction: column; gap: 0; }
  .afig-stacks-link { flex: 1 1 auto; padding: 10px 0 14px; height: 62px; }
  .afig-stacks-link .afig-arrow { width: 1.5px; height: 100%; margin: 0 auto; }
  .afig-stacks-link .afig-arrow::after { right: auto; left: -3.25px; top: auto; bottom: -1px;
    border-left: 4px solid transparent; border-right: 4px solid transparent;
    border-top: 7px solid var(--teal); border-bottom: none; }
  .afig-stacks-link .afig-arrow-lbl { top: 50%; left: 50%; transform: translate(-50%, -50%); background: var(--paper); padding: 2px 6px; }
  .afig-tower-hd { min-height: 0; margin-top: 4px; }

  .afig-timeline { flex-direction: column; }
  .afig-tl-end { flex: 1 1 auto; }
  .afig-tl-mid { padding: 16px 0; }
  .afig-tl-marks { flex-direction: column; gap: 12px; }
  .afig-tl-marks::before { display: none; }
  .afig-tl-mark { text-align: left; padding-top: 0; padding-left: 17px; }
  .afig-tl-mark::before { top: 5px; left: 0; transform: none; }

  .afig-stack { height: auto; flex-direction: column; }
  .afig-stack > .afig-seg { width: 100% !important; height: 34px; border-right: none; border-bottom: 1px solid var(--border); }
  .afig-stack > .afig-seg:last-child { border-bottom: none; }
  .afig-stack-keys { flex-direction: column; }
  .afig-stack-keys > div { width: 100% !important; padding-right: 0; margin-top: 10px; }

  .afig-cliff { height: 168px; gap: 10px; }
  .afig-cliff-val { font-size: 18px; }
  .afig-cliff-keys { flex-direction: column; gap: 0; }
  .afig-cliff-keys > div { margin-top: 10px; }

  .afig-curves { padding: 18px 16px 0; }
  .afig-curve-plot { height: 170px; }
}
