/* nm-layout.css - Nevermind Runtime v2 slide layout system for the fixed 1920x1080 stage.
   One composition class on the rig's child; logical properties so RTL is native. */

/* ------------------------------------------------------------- optional theme presets */
.nm-theme-light {
  --nm-paper: #f7f4ee; --nm-ink: #1c1d21; --nm-muted: #6c6a66; --nm-line: #cfc9bf;
  --nm-accent: #c2410c; --nm-accent-2: #0f766e; --nm-surface: #fffdf9;
}
.nm-theme-dark {
  --nm-paper: #121418; --nm-ink: #ecebe7; --nm-muted: #9a9892; --nm-line: #3a3d44;
  --nm-accent: #f08a4b; --nm-accent-2: #3fb8a6; --nm-surface: #1b1e24;
}

/* ------------------------------------------------------------- tokens */
.nm-slide-pad, .nm-l, [class*="nm-l-"] {
  --nm-s-1: 8px; --nm-s-2: 16px; --nm-s-3: 24px; --nm-s-4: 32px;
  --nm-s-5: 48px; --nm-s-6: 64px; --nm-s-7: 96px; --nm-s-8: 128px;
  --nm-l-ink: var(--nm-ink, #1c1d21);
  --nm-l-paper: var(--nm-paper, var(--slide-bg, #f7f4ee));
  --nm-l-muted: var(--nm-muted, color-mix(in oklab, var(--nm-l-ink) 58%, var(--nm-l-paper)));
  --nm-l-line: var(--nm-line, color-mix(in oklab, var(--nm-l-ink) 22%, var(--nm-l-paper)));
  --nm-l-accent: var(--nm-accent, var(--lp-accent, #c2410c));
  --nm-l-surface: var(--nm-surface, color-mix(in oklab, var(--nm-l-paper) 80%, #fff));
  --nm-l-radius: var(--nm-radius, 20px);
  --nm-l-display: var(--nm-font-display, var(--nm-font-body, inherit));
  --nm-l-body: var(--nm-font-body, inherit);
  --nm-gutter: 32px;
}

/* ------------------------------------------------------------- safe area + 12-column grid */
.nm-slide-pad {
  position: absolute; inset: 0;
  box-sizing: border-box;
  padding-block: 96px 88px;
  padding-inline: 128px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--nm-gutter);
  row-gap: var(--nm-s-5);
  align-content: start;
  color: var(--nm-l-ink);
  font-family: var(--nm-l-body);
  font-size: 30px; line-height: 1.75;
}
.nm-slide-pad > * { min-width: 0; min-height: 0; }
.nm-slide-pad > * { grid-column: 1 / -1; }
.nm-span-1 { grid-column: span 1 !important; } .nm-span-2 { grid-column: span 2 !important; } .nm-span-3 { grid-column: span 3 !important; }
.nm-span-4 { grid-column: span 4 !important; } .nm-span-5 { grid-column: span 5 !important; } .nm-span-6 { grid-column: span 6 !important; }
.nm-span-7 { grid-column: span 7 !important; } .nm-span-8 { grid-column: span 8 !important; } .nm-span-9 { grid-column: span 9 !important; }
.nm-span-10 { grid-column: span 10 !important; } .nm-span-11 { grid-column: span 11 !important; } .nm-span-12 { grid-column: 1 / -1 !important; }
.nm-fill { block-size: 100%; }

/* ------------------------------------------------------------- type scale (Arabic, 1920x1080) */
.nm-t-display, .nm-t-h1, .nm-t-h2, .nm-t-h3, .nm-t-num { font-family: var(--nm-l-display); margin: 0; text-wrap: balance; }
.nm-t-display { font-size: 124px; line-height: 1.22; font-weight: 800; letter-spacing: -.005em; }
.nm-t-h1 { font-size: 84px; line-height: 1.3; font-weight: 800; }
.nm-t-h2 { font-size: 62px; line-height: 1.35; font-weight: 700; }
.nm-t-h3 { font-size: 42px; line-height: 1.45; font-weight: 700; }
.nm-t-lead { font-size: 36px; line-height: 1.7; font-weight: 400; color: var(--nm-l-muted); margin: 0; text-wrap: pretty; }
.nm-t-body { font-size: 30px; line-height: 1.8; margin: 0; text-wrap: pretty; }
.nm-t-caption { font-size: 24px; line-height: 1.65; color: var(--nm-l-muted); margin: 0; text-wrap: pretty; }
.nm-t-num { font-size: 168px; line-height: 1.05; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--nm-l-accent); }
.nm-t-accent { color: var(--nm-l-accent); }
.nm-t-muted { color: var(--nm-l-muted); }

/* ------------------------------------------------------------- components */
.nm-kicker {
  display: inline-flex; align-items: center; gap: 14px; margin: 0;
  font-size: 24px; font-weight: 700; line-height: 1.5; color: var(--nm-l-accent);
}
.nm-kicker::before { content: ""; inline-size: 36px; block-size: 3px; border-radius: 3px; background: currentColor; }
.nm-head { display: grid; gap: var(--nm-s-2); align-content: start; max-inline-size: 1400px; }
.nm-card {
  box-sizing: border-box; display: flex; flex-direction: column; gap: var(--nm-s-2);
  padding: 40px 44px; border-radius: var(--nm-l-radius);
  background: var(--nm-l-surface); border: 1.5px solid var(--nm-l-line);
  min-height: 0; overflow: hidden;
}
.nm-card > h3, .nm-card > .nm-card-title { margin: 0; font-family: var(--nm-l-display); font-size: 38px; line-height: 1.45; font-weight: 700; text-wrap: balance; }
.nm-card > p { margin: 0; font-size: 28px; line-height: 1.75; color: var(--nm-l-muted); text-wrap: pretty; }
.nm-card.is-accent { background: var(--nm-l-accent); border-color: var(--nm-l-accent); color: #fff; }
.nm-card.is-accent > p { color: color-mix(in oklab, #fff 82%, transparent); }
.nm-card.is-quiet { background: transparent; }
.nm-chip {
  display: inline-flex; align-items: center; gap: 10px; inline-size: fit-content;
  padding: 6px 22px; border-radius: 999px; font-size: 22px; font-weight: 600; line-height: 1.6;
  background: color-mix(in oklab, var(--nm-l-accent) 12%, var(--nm-l-paper)); color: color-mix(in oklab, var(--nm-l-accent) 80%, var(--nm-l-ink));
}
.nm-rule { border: 0; block-size: 2px; background: var(--nm-l-line); margin: 0; inline-size: 100%; }
.nm-rule.is-accent { inline-size: 96px; block-size: 4px; border-radius: 4px; background: var(--nm-l-accent); }
.nm-caption { font-size: 24px; line-height: 1.6; color: var(--nm-l-muted); }
/* point list: accent tick at the reading start, generous rhythm */
.nm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--nm-s-4); font-size: 32px; line-height: 1.7; }
.nm-list > li { position: relative; padding-inline-start: 40px; text-wrap: pretty; }
.nm-list > li::before { content: ""; position: absolute; inset-inline-start: 0; inset-block-start: .82em; inline-size: 18px; block-size: 3px; border-radius: 3px; background: var(--nm-l-accent); }
.nm-head > .nm-list { margin-block-start: var(--nm-s-3); }
/* a big number with its label (stat slides, split text columns) */
.nm-stat-block { display: flex; flex-direction: column; justify-content: center; gap: var(--nm-s-2); }
.nm-stat-block > .nm-t-body { color: var(--nm-l-muted); max-inline-size: 22ch; }
.nm-head > .nm-stat-block { margin-block-start: var(--nm-s-4); }
/* compare sides, rail parts, a figure inside a bento card */
.nm-side > .nm-t-h3 { margin-block-end: var(--nm-s-2); }
.nm-rail-head { justify-content: center; }
.nm-rail-main { display: flex; flex-direction: column; justify-content: center; gap: var(--nm-s-5); min-block-size: 0; }
.nm-card-figure { padding: 0; overflow: hidden; }
.nm-card-figure > :only-child { block-size: 100%; }

/* ------------------------------------------------------------- compositions */
/* title */
.nm-l-title { align-content: center; row-gap: var(--nm-s-4); }
.nm-l-title > * { grid-column: 1 / span 10; }
.nm-l-title > .nm-t-display, .nm-l-title > h1 { margin-block: 0; }

/* split: two areas; data-ratio 1:1 | 5:7 | 7:5 | golden */
.nm-l-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--nm-s-7); align-items: center; align-content: stretch; grid-template-rows: minmax(0, 1fr); }
.nm-l-split > * { grid-column: auto; }
.nm-l-split[data-ratio="5:7"] { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.nm-l-split[data-ratio="7:5"] { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.nm-l-split[data-ratio="golden"] { grid-template-columns: minmax(0, 1fr) minmax(0, 1.618fr); }
.nm-l-split[data-ratio="golden-r"] { grid-template-columns: minmax(0, 1.618fr) minmax(0, 1fr); }
.nm-l-split > figure, .nm-l-split > .nm-diagram { block-size: 100%; margin: 0; }

/* hero figure: header + one big figure */
.nm-l-hero-figure { grid-template-rows: auto minmax(0, 1fr); align-content: stretch; row-gap: var(--nm-s-5); }
.nm-l-hero-figure > :last-child { block-size: 100%; }

/* full figure + caption strip */
.nm-l-figure-full { padding: 0; grid-template-rows: minmax(0, 1fr) auto; row-gap: 0; align-content: stretch; }
.nm-l-figure-full > :first-child { block-size: 100%; }
.nm-l-figure-full > :first-child > img { inline-size: 100%; block-size: 100%; object-fit: cover; display: block; }
.nm-l-figure-full > :is(figcaption, .nm-caption):last-child {
  padding: 28px 128px; font-size: 26px; line-height: 1.6; color: var(--nm-l-ink);
  background: var(--nm-l-surface); border-block-start: 1.5px solid var(--nm-l-line);
}
.nm-l-figure-full.is-padded { padding: 64px 128px 0; row-gap: 32px; }

/* bento grids: optional .nm-head first, then cards */
:is(.nm-l-bento-3, .nm-l-bento-4, .nm-l-bento-5, .nm-l-bento-6) { grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); align-content: stretch; row-gap: var(--nm-gutter); }
:is(.nm-l-bento-3, .nm-l-bento-4, .nm-l-bento-5, .nm-l-bento-6):has(> .nm-head) { grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr); }
:is(.nm-l-bento-3, .nm-l-bento-4, .nm-l-bento-5, .nm-l-bento-6) > .nm-head { margin-block-end: var(--nm-s-3); }
.nm-l-bento-3 > :nth-child(1 of :not(.nm-head)) { grid-column: span 7; grid-row: span 2; }
.nm-l-bento-3 > :nth-child(n+2 of :not(.nm-head)) { grid-column: span 5; }
.nm-l-bento-4 > :nth-child(1 of :not(.nm-head)) { grid-column: span 6; grid-row: span 2; }
.nm-l-bento-4 > :nth-child(2 of :not(.nm-head)) { grid-column: span 6; }
.nm-l-bento-4 > :nth-child(n+3 of :not(.nm-head)) { grid-column: span 3; }
.nm-l-bento-5 > :nth-child(1 of :not(.nm-head)) { grid-column: span 5; grid-row: span 2; }
.nm-l-bento-5 > :nth-child(2 of :not(.nm-head)) { grid-column: span 4; }
.nm-l-bento-5 > :nth-child(3 of :not(.nm-head)) { grid-column: span 3; }
.nm-l-bento-5 > :nth-child(4 of :not(.nm-head)) { grid-column: span 3; }
.nm-l-bento-5 > :nth-child(5 of :not(.nm-head)) { grid-column: span 4; }
.nm-l-bento-6 > :nth-child(1 of :not(.nm-head)), .nm-l-bento-6 > :nth-child(6 of :not(.nm-head)) { grid-column: span 5; }
.nm-l-bento-6 > :nth-child(2 of :not(.nm-head)), .nm-l-bento-6 > :nth-child(5 of :not(.nm-head)) { grid-column: span 4; }
.nm-l-bento-6 > :nth-child(3 of :not(.nm-head)), .nm-l-bento-6 > :nth-child(4 of :not(.nm-head)) { grid-column: span 3; }

/* equal card rows */
:is(.nm-l-cards-2, .nm-l-cards-3, .nm-l-cards-4) { grid-template-rows: auto minmax(0, 1fr); align-content: stretch; }
:is(.nm-l-cards-2, .nm-l-cards-3, .nm-l-cards-4):not(:has(> .nm-head)) { grid-template-rows: minmax(0, 1fr); }
.nm-l-cards-2 > :not(.nm-head) { grid-column: span 6; }
.nm-l-cards-3 > :not(.nm-head) { grid-column: span 4; }
.nm-l-cards-4 > :not(.nm-head) { grid-column: span 3; }
:is(.nm-l-cards-2, .nm-l-cards-3, .nm-l-cards-4) > .nm-head { margin-block-end: var(--nm-s-3); }

/* rail: narrow start-side rail + main */
.nm-l-rail { grid-template-columns: 440px minmax(0, 1fr); column-gap: var(--nm-s-7); grid-template-rows: minmax(0, 1fr); align-content: stretch; }
.nm-l-rail > * { grid-column: auto; }
.nm-l-rail > :first-child { display: flex; flex-direction: column; gap: var(--nm-s-3); padding-inline-end: var(--nm-s-6); border-inline-end: 2px solid var(--nm-l-line); }

/* quote */
.nm-l-quote { align-content: center; justify-items: start; row-gap: var(--nm-s-5); }
.nm-l-quote > * { grid-column: 2 / span 10; }
.nm-l-quote blockquote { margin: 0; font-family: var(--nm-l-display); font-size: 68px; line-height: 1.5; font-weight: 700; text-wrap: balance; position: relative; }
.nm-l-quote blockquote::before { content: "\201D"; position: absolute; inset-inline-start: -0.62em; inset-block-start: -0.18em; font-size: 2.2em; line-height: 1; color: var(--nm-l-accent); }
.nm-l-quote :is(cite, figcaption, .nm-cite) { font-style: normal; font-size: 28px; color: var(--nm-l-muted); display: flex; align-items: center; gap: 18px; }
.nm-l-quote :is(cite, figcaption, .nm-cite)::before { content: ""; inline-size: 56px; block-size: 3px; background: var(--nm-l-accent); border-radius: 3px; }

/* stat row + steps: optional .nm-head first, then 2-6 equal columns (count detected) */
:is(.nm-l-stat-row, .nm-l-steps) { --nm-n: 3; grid-template-columns: repeat(var(--nm-n), minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr); align-content: stretch; }
:is(.nm-l-stat-row, .nm-l-steps):has(> .nm-head) { grid-template-rows: auto minmax(0, 1fr); }
:is(.nm-l-stat-row, .nm-l-steps):has(> :nth-child(2 of :not(.nm-head)):last-child) { --nm-n: 2; }
:is(.nm-l-stat-row, .nm-l-steps):has(> :nth-child(4 of :not(.nm-head)):last-child) { --nm-n: 4; }
:is(.nm-l-stat-row, .nm-l-steps):has(> :nth-child(5 of :not(.nm-head)):last-child) { --nm-n: 5; }
:is(.nm-l-stat-row, .nm-l-steps):has(> :nth-child(6 of :not(.nm-head)):last-child) { --nm-n: 6; }
:is(.nm-l-stat-row, .nm-l-steps) > .nm-head { grid-column: 1 / -1; }
:is(.nm-l-stat-row, .nm-l-steps) > :not(.nm-head) { grid-column: auto; }
.nm-l-stat-row { column-gap: 0; }
.nm-l-stat-row > :not(.nm-head) { display: flex; flex-direction: column; justify-content: center; gap: 12px; padding-inline: var(--nm-s-5); border-inline-start: 2px solid var(--nm-l-line); }
.nm-l-stat-row > :nth-child(1 of :not(.nm-head)) { border-inline-start: 0; padding-inline-start: 0; }
.nm-l-stat-row .nm-t-num { font-size: 140px; }
.nm-l-stat-row .nm-t-body { font-size: 32px; }

/* compare: last two children are the two sides, an optional first child is the header */
.nm-l-compare { grid-template-columns: minmax(0, 1fr) 2px minmax(0, 1fr); column-gap: var(--nm-s-6); grid-template-rows: minmax(0, 1fr); align-content: stretch; }
.nm-l-compare:has(> :nth-child(3)) { grid-template-rows: auto minmax(0, 1fr); }
.nm-l-compare > * { grid-column: 1 / -1; }
.nm-l-compare > :nth-last-child(2) { grid-column: 1; grid-row: -2; }
.nm-l-compare > :last-child { grid-column: 3; grid-row: -2; }
.nm-l-compare > :is(:nth-last-child(2), :last-child) { display: flex; flex-direction: column; justify-content: center; gap: var(--nm-s-2); }
.nm-l-compare::after { content: ""; grid-column: 2; grid-row: -2 / -1; background: var(--nm-l-line); border-radius: 2px; }

/* steps: numbered sequence in reading order */
.nm-l-steps { counter-reset: nm-step; }
.nm-l-steps > :not(.nm-head) { counter-increment: nm-step; position: relative; padding-block-start: 112px; display: flex; flex-direction: column; gap: 12px; align-self: center; }
.nm-l-steps > :not(.nm-head)::before {
  content: counter(nm-step, arabic-indic); position: absolute; inset-block-start: 0; inset-inline-start: 0;
  inline-size: 76px; block-size: 76px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--nm-l-display); font-size: 34px; font-weight: 800; color: #fff; background: var(--nm-l-accent);
}
.nm-l-steps > :not(.nm-head)::after {
  content: ""; position: absolute; inset-block-start: 37px; inset-inline-start: 100px; inset-inline-end: 8px; block-size: 2px; background: var(--nm-l-line);
}
.nm-l-steps > :last-child::after { display: none; }
.nm-l-steps:is(:dir(ltr), [data-numerals="latin"]) > :not(.nm-head)::before { content: counter(nm-step); }

/* section divider */
.nm-l-section { align-content: center; row-gap: var(--nm-s-3); }
.nm-l-section > * { grid-column: 1 / span 9; }
.nm-l-section > .nm-t-num, .nm-l-section > .nm-section-num { font-size: 220px; line-height: 1; color: var(--nm-l-accent); font-family: var(--nm-l-display); font-weight: 800; margin: 0; }
.nm-l-section > .nm-rule.is-accent { inline-size: 160px; }

/* wide gutters: use with data-links so connectors have room to route */
.nm-gap-wide { --nm-gutter: 96px; column-gap: 96px; }
.nm-gap-wide:is(.nm-l-bento-3, .nm-l-bento-4, .nm-l-bento-5, .nm-l-bento-6, .nm-l-cards-2, .nm-l-cards-3, .nm-l-cards-4) { row-gap: 88px; }

/* =============================================================================================================
   Compositions ported from the layout presets of zarazhangrui/frontend-slides (MIT, Copyright (c) 2025 Zara
   Zhang; the presets themselves are kept in resources/layout-presets for the editor, roadmap NM-21). Rewritten for
   Nevermind: logical properties (right to left is native), no Tailwind, the deck's own tokens and Arabic type
   sizes (body 28px or more, labels 24px). Preset of origin in each heading.
   ============================================================================================================= */

/* ledger: two facing columns whose rows line up (comparison/ledger-versus). .nm-head, then two .nm-side, each an
   h3 and rows (.nm-row: a title and an optional p). The rows of both sides share one pitch. */
.nm-l-ledger { grid-template-columns: minmax(0, 1fr) 2px minmax(0, 1fr); column-gap: var(--nm-s-7); grid-template-rows: auto minmax(0, 1fr); align-content: stretch; }
.nm-l-ledger > .nm-head { grid-column: 1 / -1; }
.nm-l-ledger > .nm-side:nth-of-type(1) { grid-column: 1; }
.nm-l-ledger > .nm-side:nth-of-type(2) { grid-column: 3; }
.nm-l-ledger::after { content: ""; grid-column: 2; grid-row: 2; background: var(--nm-l-line); }
.nm-l-ledger > .nm-side { display: grid; grid-auto-rows: minmax(132px, auto); align-content: start; gap: 0; }
.nm-l-ledger > .nm-side > h3 { margin: 0 0 var(--nm-s-3); font-family: var(--nm-l-display); font-size: 30px; font-weight: 700; color: var(--nm-l-muted); }
.nm-l-ledger > .nm-side.is-favoured > h3 { color: var(--nm-l-accent); }
.nm-l-ledger .nm-row { border-block-start: 1.5px solid var(--nm-l-line); padding-block: 22px; }
.nm-l-ledger .nm-row > :first-child { margin: 0; font-family: var(--nm-l-display); font-size: 36px; font-weight: 700; line-height: 1.4; }
.nm-l-ledger .nm-row > p { margin: 8px 0 0; font-size: 26px; line-height: 1.6; color: var(--nm-l-muted); }

/* keynote: one giant figure with its label and reading, an optional rail of 2-3 smaller figures at the end side
   (stats/keynote-figure). .nm-keynote (the figure block), .nm-keynote-rail (optional). */
.nm-l-keynote { grid-template-columns: minmax(0, 1fr) 460px; column-gap: var(--nm-s-7); align-content: center; }
.nm-l-keynote > * { grid-column: auto; }
.nm-l-keynote > .nm-head, .nm-l-keynote > .nm-kicker { grid-column: 1 / -1; }
.nm-l-keynote > :not(.nm-keynote-rail, .nm-head, .nm-kicker) { grid-column: 1; display: grid; gap: var(--nm-s-3); }
.nm-l-keynote .nm-t-num { font-size: 300px; line-height: .95; color: var(--nm-l-ink); }
.nm-l-keynote .nm-t-num > :is(small, .nm-unit) { font-size: .4em; color: var(--nm-l-accent); }
.nm-l-keynote .nm-t-num + :is(p, .nm-t-body) { font-size: 32px; color: var(--nm-l-muted); max-inline-size: 28ch; margin: 0; }
.nm-keynote-rail { grid-column: 2; display: grid; align-content: center; gap: 0; }
.nm-keynote-rail > * { border-block-start: 1.5px solid var(--nm-l-line); padding-block: 24px 30px; }
.nm-keynote-rail strong, .nm-keynote-rail .nm-t-num { display: block; font-family: var(--nm-l-display); font-size: 84px; line-height: 1; font-weight: 700; color: var(--nm-l-ink); }
.nm-keynote-rail span, .nm-keynote-rail p { display: block; margin: 12px 0 0; font-size: 24px; color: var(--nm-l-muted); }

/* stat strip: 3-4 equal tiles under a hairline each (stats/stat-strip). .nm-head, then one block per figure:
   .nm-t-num, a label (p) and an optional small note. */
.nm-l-stat-strip { --nm-n: 3; grid-template-columns: repeat(var(--nm-n), minmax(0, 1fr)); column-gap: var(--nm-s-6); grid-template-rows: auto minmax(0, 1fr); align-content: stretch; }
.nm-l-stat-strip:has(> :nth-child(4 of :not(.nm-head)):last-child) { --nm-n: 4; }
.nm-l-stat-strip:has(> :nth-child(2 of :not(.nm-head)):last-child) { --nm-n: 2; }
.nm-l-stat-strip > .nm-head { grid-column: 1 / -1; }
.nm-l-stat-strip > :not(.nm-head) { grid-column: auto; align-self: center; border-block-start: 1.5px solid var(--nm-l-line); padding-block-start: 36px; display: grid; gap: 18px; }
.nm-l-stat-strip .nm-t-num { font-size: 128px; line-height: .95; color: var(--nm-l-ink); }
.nm-l-stat-strip .nm-t-num > :is(small, .nm-unit) { font-size: .45em; color: var(--nm-l-accent); }
.nm-l-stat-strip :is(p, .nm-t-body) { margin: 0; font-size: 28px; line-height: 1.5; color: var(--nm-l-muted); }
.nm-l-stat-strip :is(small, .nm-t-caption):not(.nm-t-num *) { font-size: 22px; color: var(--nm-l-muted); }

/* ledger list: ruled rows of numeral, title and description (list/ledger-list). .nm-head, then an ol or ul whose
   li hold a title (strong or h3) and an optional p. */
.nm-l-ledger-list { grid-template-rows: auto minmax(0, 1fr); align-content: stretch; }
.nm-l-ledger-list > :is(ol, ul) { list-style: none; margin: 0; padding: 0; counter-reset: nm-ledger; align-self: center; }
.nm-l-ledger-list > :is(ol, ul) > li { counter-increment: nm-ledger; display: grid; grid-template-columns: 96px minmax(0, 1fr) minmax(0, 1.25fr); column-gap: var(--nm-s-5); align-items: baseline; padding-block: 26px; border-block-start: 1.5px solid var(--nm-l-line); }
.nm-l-ledger-list > :is(ol, ul) > li::before { content: counter(nm-ledger, arabic-indic); font-family: var(--nm-l-display); font-size: 30px; font-weight: 700; color: var(--nm-l-accent); }
/* left-to-right decks count in Western digits */
.nm-l-ledger-list:is(:dir(ltr), [data-numerals="latin"]) > :is(ol, ul) > li::before { content: counter(nm-ledger); }
.nm-l-ledger-list > :is(ol, ul) > li > :is(strong, h3) { margin: 0; font-family: var(--nm-l-display); font-size: 40px; line-height: 1.35; font-weight: 700; }
.nm-l-ledger-list > :is(ol, ul) > li > p { margin: 0; font-size: 28px; line-height: 1.6; color: var(--nm-l-muted); }

/* meridian: entries alternating above and below one horizontal track (timeline/meridian). .nm-head, then an ol
   whose li hold a date (small or time), a title (strong) and an optional p; the last li is "now". */
.nm-l-meridian { grid-template-rows: auto minmax(0, 1fr); align-content: stretch; }
.nm-l-meridian > ol { --nm-n: 4; list-style: none; margin: 0; padding: 0; position: relative; display: grid; grid-template-columns: repeat(var(--nm-n), minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr) 4px minmax(0, 1fr); column-gap: var(--nm-s-4); }
.nm-l-meridian > ol:has(> li:nth-child(3):last-child) { --nm-n: 3; }
.nm-l-meridian > ol:has(> li:nth-child(5):last-child) { --nm-n: 5; }
.nm-l-meridian > ol:has(> li:nth-child(6):last-child) { --nm-n: 6; }
.nm-l-meridian > ol::before { content: ""; grid-column: 1 / -1; grid-row: 2; background: var(--nm-l-line); border-radius: 2px; }
.nm-l-meridian > ol > li { position: relative; display: flex; flex-direction: column; gap: 8px; }
.nm-l-meridian > ol > li:nth-child(odd) { grid-row: 1; justify-content: flex-end; padding-block-end: 56px; }
.nm-l-meridian > ol > li:nth-child(even) { grid-row: 3; justify-content: flex-start; padding-block-start: 56px; }
.nm-l-meridian > ol > li:nth-child(1) { grid-column: 1; }
.nm-l-meridian > ol > li:nth-child(2) { grid-column: 2; }
.nm-l-meridian > ol > li:nth-child(3) { grid-column: 3; }
.nm-l-meridian > ol > li:nth-child(4) { grid-column: 4; }
.nm-l-meridian > ol > li:nth-child(5) { grid-column: 5; }
.nm-l-meridian > ol > li:nth-child(6) { grid-column: 6; }
.nm-l-meridian > ol > li::after { content: ""; position: absolute; inset-inline-start: 0; inline-size: 18px; block-size: 18px; border-radius: 50%; background: var(--nm-l-muted); }
.nm-l-meridian > ol > li:nth-child(odd)::after { inset-block-end: -11px; }
.nm-l-meridian > ol > li:nth-child(even)::after { inset-block-start: -11px; }
.nm-l-meridian > ol > li:last-child::after { background: var(--nm-l-accent); box-shadow: 0 0 0 8px color-mix(in oklab, var(--nm-l-accent) 18%, transparent); }
.nm-l-meridian > ol > li > :is(small, time) { font-size: 24px; font-weight: 700; color: var(--nm-l-accent); }
.nm-l-meridian > ol > li > strong { font-family: var(--nm-l-display); font-size: 34px; line-height: 1.35; }
.nm-l-meridian > ol > li > p { margin: 0; font-size: 26px; line-height: 1.55; color: var(--nm-l-muted); }

/* chapter: a giant faint numeral cropped by the end edge, the title low at the start, an optional rail of all
   chapters (section/chapter-gate). .nm-section-num, .nm-rule.is-accent, the title, a lead, .nm-chapter-rail. */
.nm-l-chapter { align-content: end; row-gap: var(--nm-s-3); overflow: hidden; padding-block-end: 64px; }
.nm-l-chapter > * { grid-column: 1 / span 8; position: relative; }
.nm-l-chapter > .nm-section-num { grid-column: auto; grid-row: auto; /* auto lines: the padding box, not the grid area, contains it */ position: absolute; inset-inline-end: -40px; inset-block-start: 50%; translate: 0 -55%; margin: 0; font-family: var(--nm-l-display); font-size: 620px; line-height: .8; font-weight: 800; color: color-mix(in oklab, var(--nm-l-ink) 7%, var(--nm-l-paper)); pointer-events: none; }
.nm-l-chapter > :is(h1, h2) { font-size: 124px; line-height: 1.15; }
.nm-chapter-rail { grid-column: 1 / -1 !important; display: flex; flex-wrap: wrap; gap: var(--nm-s-6); margin: var(--nm-s-6) 0 0; padding: 26px 0 0; list-style: none; border-block-start: 1.5px solid var(--nm-l-line); font-size: 24px; color: var(--nm-l-muted); }
.nm-chapter-rail > li { display: inline-flex; align-items: center; gap: 12px; }
.nm-chapter-rail > li::before { content: ""; inline-size: 12px; block-size: 12px; border-radius: 50%; background: currentColor; }
.nm-chapter-rail > li.is-current { color: var(--nm-l-accent); font-weight: 700; }
.nm-chapter-rail > li.is-current ~ li { opacity: .6; }
.nm-chapter-rail > li.is-current ~ li::before { background: none; border: 2px solid currentColor; box-sizing: border-box; }

/* plate: one large image with a caption plate over its bottom start corner (image/plate-caption). A figure (img
   and figcaption), then an optional .nm-head on the end side. */
.nm-l-plate { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); column-gap: var(--nm-s-6); grid-template-rows: minmax(0, 1fr); align-content: stretch; }
.nm-l-plate > * { grid-column: auto; }
.nm-l-plate > figure { position: relative; margin: 0; block-size: 100%; border-radius: var(--nm-l-radius); overflow: hidden; }
.nm-l-plate > figure > img { inline-size: 100%; block-size: 100%; object-fit: cover; display: block; }
.nm-l-plate > figure > figcaption { position: absolute; inset-inline-start: 0; inset-block-end: 0; max-inline-size: 70%; padding: 22px 32px; background: var(--nm-l-paper); color: var(--nm-l-ink); font-size: 24px; line-height: 1.55; border-start-end-radius: var(--nm-l-radius); }
.nm-l-plate > .nm-head { align-self: center; }

/* triptych: three images of equal weight with a caption each (image/triptych). .nm-head, then three figures. */
.nm-l-triptych { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto minmax(0, 1fr); align-content: stretch; column-gap: var(--nm-s-4); }
.nm-l-triptych > .nm-head { grid-column: 1 / -1; }
.nm-l-triptych > figure { grid-column: auto; margin: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 16px; min-block-size: 0; }
.nm-l-triptych > figure > :first-child { inline-size: 100%; block-size: 100%; object-fit: cover; border-radius: var(--nm-l-radius); min-block-size: 0; }
.nm-l-triptych > figure > figcaption { font-size: 24px; line-height: 1.5; color: var(--nm-l-muted); }

/* monolith: a centred title under a plumb line from the top edge, metadata at the bottom (opening/monolith). */
.nm-l-monolith { align-content: center; justify-items: center; text-align: center; row-gap: var(--nm-s-4); }
.nm-l-monolith > * { grid-column: 2 / span 10; }
.nm-l-monolith::before { content: ""; position: absolute; inset-block-start: 0; inset-inline-start: 50%; inline-size: 2px; block-size: 220px; background: var(--nm-l-accent); translate: -50% 0; }
.nm-l-monolith > :is(h1, h2, .nm-t-display) { font-size: 144px; line-height: 1.15; }
.nm-l-monolith > .nm-kicker::before { display: none; }
.nm-l-monolith > :is(.nm-caption, small, footer) { grid-column: auto; position: absolute; inset-block-end: 72px; font-size: 24px; color: var(--nm-l-muted); }

/* terminal: an inset hairline frame, the closing statement low at the start, a strip of 2-3 columns (contacts,
   sources, next steps) along the bottom (closing/terminal-frame). */
.nm-l-terminal { align-content: end; row-gap: var(--nm-s-5); }
.nm-l-terminal::before { content: ""; position: absolute; inset: 48px; border: 1.5px solid var(--nm-l-line); border-radius: 4px; pointer-events: none; }
.nm-l-terminal > * { grid-column: 1 / span 10; }
.nm-l-terminal > :is(h1, h2) { font-size: 96px; line-height: 1.25; }
.nm-l-terminal > :is(ul, .nm-terminal-strip) { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--nm-s-5); margin: 0; padding: 26px 0 0; list-style: none; border-block-start: 1.5px solid var(--nm-l-line); font-size: 26px; line-height: 1.5; color: var(--nm-l-muted); }

/* staircase: points that step down and inward one by one (list/staircase). .nm-head, then 3-5 blocks. */
.nm-l-staircase { grid-template-rows: auto; align-content: center; row-gap: var(--nm-s-3); }
.nm-l-staircase > :not(.nm-head) { grid-column: auto / span 7; padding-block: 18px; border-block-start: 1.5px solid var(--nm-l-line); font-size: 32px; line-height: 1.6; }
.nm-l-staircase > :nth-child(2 of :not(.nm-head)) { grid-column: 2 / span 7; }
.nm-l-staircase > :nth-child(3 of :not(.nm-head)) { grid-column: 3 / span 7; }
.nm-l-staircase > :nth-child(4 of :not(.nm-head)) { grid-column: 4 / span 7; }
.nm-l-staircase > :nth-child(5 of :not(.nm-head)) { grid-column: 5 / span 7; }
.nm-l-staircase > :nth-child(1 of :not(.nm-head)) { grid-column: 1 / span 7; }
.nm-l-staircase > :last-child:not(.nm-head) { border-block-start-color: var(--nm-l-accent); font-weight: 700; }

/* waypoint: a centred title above a journey line, one node per part, the current node larger and in the accent
   (section/waypoint). The title, then an ol of parts with li.is-current. */
.nm-l-waypoint { align-content: center; justify-items: center; text-align: center; row-gap: var(--nm-s-7); }
.nm-l-waypoint > * { grid-column: 2 / span 10; }
.nm-l-waypoint > ol { --nm-n: 4; inline-size: 100%; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--nm-n), minmax(0, 1fr)); position: relative; }
.nm-l-waypoint > ol:has(> li:nth-child(3):last-child) { --nm-n: 3; }
.nm-l-waypoint > ol:has(> li:nth-child(5):last-child) { --nm-n: 5; }
.nm-l-waypoint > ol:has(> li:nth-child(6):last-child) { --nm-n: 6; }
.nm-l-waypoint > ol::before { content: ""; position: absolute; inset-inline: calc(50% / var(--nm-n)); inset-block-start: 15px; block-size: 2px; background: var(--nm-l-line); }
.nm-l-waypoint > ol > li { position: relative; display: grid; justify-items: center; gap: 18px; padding-block-start: 0; font-size: 26px; color: var(--nm-l-muted); }
.nm-l-waypoint > ol > li::before { content: ""; inline-size: 32px; block-size: 32px; border-radius: 50%; background: var(--nm-l-muted); box-shadow: 0 0 0 8px var(--nm-l-paper); }
.nm-l-waypoint > ol > li.is-current { color: var(--nm-l-accent); font-weight: 700; }
.nm-l-waypoint > ol > li.is-current::before { background: var(--nm-l-accent); transform: scale(1.4); }
.nm-l-waypoint > ol > li.is-current ~ li::before { background: var(--nm-l-paper); border: 3px solid var(--nm-l-muted); box-sizing: border-box; }
