/* Lodestone, in the Extrafemi data-story world shared with Naija Eval: paper, deep-green ink, oxblood accent.
   Cardo for display, Lora for text, both self-hosted. Outcome colours (answered, slow, refused, rejected) are used only in the simulator. */
:root {
  --paper: #fdfcf9;
  --panel: #f3efe7;
  --surface: #fffefb;
  --ink: #0c322c;
  --ink-2: #33473f;
  --ink-3: #5e6f68;
  --rule: #d1cfc7;
  --rule-soft: rgb(12 50 44 / .09);
  --ox: #6b1410;
  --ox-wash: #f2e6e1;
  --on-ox: #fff8f4;
  --tan: #a3591a;
  --good: #1f6b4a; --good-wash: #dcebe2;
  --warn: #8a5410; --warn-wash: #f3e6cd;
  --bad: #9b2c1f; --bad-wash: #f4dfd9;
  --info: #2c5d8a; --info-wash: #dce6f0;
  --code-bg: #14221e; --code-ink: #e6eee9; --code-dim: #93a69d;
  --f-display: "Cardo", "Iowan Old Style", Georgia, serif;
  --f-body: "Lora", "Iowan Old Style", Georgia, serif;
  --f-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #12110e; --panel: #1b1915; --surface: #1f1c17; --ink: #eee9df; --ink-2: #cdc6b8; --ink-3: #9d9586;
    --rule: #38342c; --rule-soft: rgb(238 233 223 / .08); --ox: #f07c6c; --ox-wash: #3a211b; --on-ox: #1a0f0c; --tan: #d9a54a;
    --good: #6fc496; --good-wash: #1d3329; --warn: #e2a74b; --warn-wash: #382c17; --bad: #ef7b66; --bad-wash: #3b2220; --info: #7fb1e0; --info-wash: #1b2d40;
    --code-bg: #0b0a08; --code-ink: #e6eee9; --code-dim: #8f9a93; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #12110e; --panel: #1b1915; --surface: #1f1c17; --ink: #eee9df; --ink-2: #cdc6b8; --ink-3: #9d9586;
  --rule: #38342c; --rule-soft: rgb(238 233 223 / .08); --ox: #f07c6c; --ox-wash: #3a211b; --on-ox: #1a0f0c; --tan: #d9a54a;
  --good: #6fc496; --good-wash: #1d3329; --warn: #e2a74b; --warn-wash: #382c17; --bad: #ef7b66; --bad-wash: #3b2220; --info: #7fb1e0; --info-wash: #1b2d40;
  --code-bg: #0b0a08; --code-ink: #e6eee9; --code-dim: #8f9a93; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; font-size: clamp(100%, 0.82rem + 0.32vw, 128%); -webkit-text-size-adjust: 100%; }
body { background: var(--paper); color: var(--ink); font: 400 1rem/1.65 var(--f-body); margin: 0; -webkit-font-smoothing: antialiased; }
::selection { background: var(--ox); color: var(--on-ox); }
a { color: var(--ox); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ox); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; text-wrap: balance; margin: 0; letter-spacing: -0.015em; color: var(--ink); }
p { margin: 0; text-wrap: pretty; }
code { font-family: var(--f-mono); font-size: .84em; background: var(--panel); border: 1px solid var(--rule-soft); border-radius: 6px; padding: .08em .35em; overflow-wrap: anywhere; }
.tag { font: 500 clamp(.68rem, .66rem + .1vw, .74rem)/1.4 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.col { width: min(88rem, 100% - 2 * clamp(16px, 4vw, 64px)); margin-inline: auto; }
.num { font-variant-numeric: tabular-nums lining-nums; }
#main:focus { outline: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ticker */
.ticker { border-bottom: 1px solid var(--rule); overflow: hidden; white-space: nowrap; background: var(--paper); }
.ticker-track { display: inline-flex; padding-block: 9px; animation: tick 80s linear infinite; }
.ticker span { padding-inline: 22px; }
.ticker b { color: var(--ox); font-weight: 600; }
@keyframes tick { to { transform: translateX(-50%); } }
.ticker:hover .ticker-track { animation-play-state: paused; }

/* site bar */
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 999px; text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }
.sitebar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--rule); }
.sitebar-in { display: flex; align-items: center; gap: clamp(10px, 2vw, 28px); min-height: 60px; }
.brand { font: 700 1.3rem/1 var(--f-display); color: var(--ink); text-decoration: none; letter-spacing: -0.01em; flex: none; display: inline-flex; align-items: center; min-height: 44px; }
.brand:hover { color: var(--ox); text-decoration: none; }
.sections { flex: 1; min-width: 0; display: flex; justify-content: flex-end; gap: 2px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent); mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent); padding-inline: 10px; }
.sections::-webkit-scrollbar { display: none; }
.sections a { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-size: .92rem; white-space: nowrap; transition: color .15s, background .15s; }
.sections a:hover { color: var(--ink); background: var(--panel); }
.sections a[aria-current] { color: var(--ox); font-weight: 600; }
.icon-btn { flex: none; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: border-color .2s; }
.icon-btn:hover { border-color: var(--ink-3); }
.icon-btn svg { width: 17px; height: 17px; }
.progress { height: 2px; }
.progress span { display: block; height: 100%; width: 100%; background: var(--ox); transform-origin: left; transform: scaleX(var(--p, 0)); }

/* cover */
.cover { padding-block: 8px clamp(28px, 5vh, 56px); display: grid; gap: clamp(24px, 4vh, 48px); }
.stage { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 72px); align-items: center; padding-block: clamp(32px, 6vh, 64px) 0; }
.cover-main { display: grid; gap: clamp(18px, 2.6vh, 28px); max-width: 680px; }
.cover h1 { font-size: clamp(3.6rem, 2rem + 8vw, 6rem); line-height: .92; letter-spacing: -0.03em; }
.lede { font-size: clamp(1.08rem, 1rem + .45vw, 1.3rem); line-height: 1.55; color: var(--ink-2); max-width: 36em; }
.install { display: block; font: 500 .95rem/1.4 var(--f-mono); background: var(--code-bg); color: var(--code-ink); padding: 14px 18px; border-radius: 14px; overflow-x: auto; white-space: nowrap; width: fit-content; max-width: 100%; user-select: all; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { display: inline-flex; align-items: center; gap: 10px; font: 600 .95rem/1 var(--f-body); min-height: 48px; padding: 14px 22px; border-radius: 999px; text-decoration: none; border: 1px solid var(--rule); color: var(--ink); background: var(--surface); transition: transform .25s var(--ease), background .2s, border-color .2s; }
.pill:hover { border-color: var(--ink-3); transform: translateY(-1px); text-decoration: none; }
.pill.solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pill.solid:hover { background: var(--ox); border-color: var(--ox); }
.pill svg { width: 16px; height: 16px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.ghost { margin: 0; pointer-events: none; }
.ghost svg { width: 100%; height: auto; display: block; overflow: visible; max-width: 440px; margin-inline: auto; }
.ghost .ring { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.ghost .ring2 { fill: none; stroke: var(--rule); stroke-dasharray: 2 6; }
.ghost text { font: 500 10px var(--f-body); letter-spacing: .16em; fill: var(--ink-3); text-anchor: middle; }
.ghost .n1 { fill: var(--ox); } .ghost .n2 { fill: var(--ink); }
.ghost .hub { fill: var(--paper); stroke: var(--ink); stroke-width: 2; }
.needle { transform-origin: 150px 150px; animation: seek 7s ease-in-out infinite; }
@keyframes seek { 0%, 100% { transform: rotate(-18deg); } 30% { transform: rotate(24deg); } 55% { transform: rotate(-6deg); } 75% { transform: rotate(4deg); } }
.ghost figcaption { margin-top: 10px; text-align: center; }

/* chapter index */
.index { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--rule); border-radius: 22px; overflow: hidden; background: var(--surface); }
.index a { display: grid; grid-template-rows: auto 1fr auto; gap: 12px; padding: 22px 22px 18px; color: inherit; text-decoration: none; border-right: 1px solid var(--rule); transition: background .25s; min-width: 0; }
.index a:last-child { border-right: 0; }
.index a:hover { background: var(--panel); }
.index a:hover h3 { color: var(--ox); }
.index h3 { font-size: clamp(1.2rem, 1.05rem + .5vw, 1.45rem); line-height: 1.15; transition: color .2s; }
.index p { color: var(--ink-2); font-size: .92rem; line-height: 1.5; }
.index .foot { display: flex; align-items: baseline; gap: 10px; border-top: 1px solid var(--rule); padding-top: 12px; }
.index .foot b { font: 400 1.6rem/1 var(--f-display); color: var(--ox); white-space: nowrap; }
.index .foot { flex-wrap: wrap; }

/* chapters */
main { display: grid; gap: clamp(72px, 10vh, 120px); padding-block: clamp(56px, 8vh, 96px) clamp(64px, 9vh, 110px); }
section { display: grid; gap: 28px; min-width: 0; }
.divider { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--rule); padding-bottom: 10px; }
.divider .tag:first-child { color: var(--ox); }
.head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 64px); align-items: end; padding-top: 18px; }
.head h2 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); line-height: 1.04; }
.head p { color: var(--ink-2); max-width: 34em; }
h3.sub { font-size: clamp(1.3rem, 1.15rem + .6vw, 1.7rem); line-height: 1.15; }
.panel { background: var(--panel); border: 1px solid var(--rule); border-radius: 24px; padding: clamp(16px, 2.4vw, 26px); display: grid; gap: 18px; min-width: 0; }
.note, .cap { color: var(--ink-3); font-size: .93rem; max-width: 52em; }
.note b { color: var(--ink-2); }
.js .rise { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .rise.in { opacity: 1; transform: none; }

/* the problem: a ledger */
.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); counter-reset: f; }
.ledger li { display: grid; grid-template-columns: 56px minmax(0, 5fr) minmax(0, 7fr); gap: clamp(12px, 3vw, 40px); padding-block: 22px; border-bottom: 1px solid var(--rule); counter-increment: f; align-items: baseline; }
.ledger li::before { content: counter(f, decimal-leading-zero); font: 400 1.05rem var(--f-display); color: var(--ink-3); font-variant-numeric: lining-nums; }
.ledger h3 { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.6rem); line-height: 1.15; grid-column: 2; grid-row: 1 / span 2; }
.ledger li::before { grid-row: 1 / span 2; }
.ledger li:hover h3 { color: var(--ox); }
.ledger .what { color: var(--ink-2); grid-column: 3; }
.ledger .what p + p { margin-top: 8px; }
.ledger .fix { color: var(--ink); grid-column: 3; }
.ledger .fix b { font: 500 .72rem/1 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--good); margin-right: 8px; }

/* simulator */
.sim { display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: 18px; align-items: start; }
.scen { display: grid; gap: 6px; }
.scen button { font: 500 .95rem/1.3 var(--f-body); text-align: left; cursor: pointer; padding: 11px 14px; min-height: 44px; border: 1px solid var(--rule); border-radius: 14px; background: var(--surface); color: var(--ink); transition: background .2s, border-color .2s; }
.scen button small { display: block; font-weight: 400; font-size: .78rem; color: var(--ink-3); margin-top: 2px; }
.scen button:hover { border-color: var(--ink-3); }
.scen button[aria-pressed="true"] { background: var(--ox); color: var(--on-ox); border-color: var(--ox); }
.scen button[aria-pressed="true"] small { color: inherit; opacity: .85; }
.board { background: var(--surface); border: 1px solid var(--rule); border-radius: 18px; padding: clamp(14px, 2vw, 22px); min-width: 0; }
.board-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.board-top h3 { font-size: 1.4rem; }
.clock { font: 500 .85rem var(--f-mono); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.call { font: 500 .8rem/1.5 var(--f-mono); background: var(--code-bg); color: var(--code-ink); padding: 10px 14px; border-radius: 10px; margin: 12px 0 8px; overflow-x: auto; white-space: pre; }
.cfg { font: 400 .75rem var(--f-mono); color: var(--ink-3); margin: 0 0 16px; overflow-wrap: anywhere; }
.scale { position: relative; height: 18px; font: 500 .66rem var(--f-mono); color: var(--ink-3); border-bottom: 1px solid var(--ink); }
.scale span { position: absolute; transform: translateX(-50%); bottom: 3px; }
.lanes { position: relative; }
.lane { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; border-bottom: 1px dashed var(--rule); min-height: 40px; }
.lane .lab { font: 500 .68rem var(--f-body); text-transform: uppercase; letter-spacing: .14em; color: var(--ink-3); padding-right: 8px; }
.track { position: relative; height: 40px; }
.zone { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, transparent 0 6px, var(--warn-wash) 6px 12px); }
.bar { position: absolute; top: 8px; height: 24px; border-radius: 6px; font: 500 .66rem/24px var(--f-mono); padding: 0 8px; white-space: nowrap; overflow: hidden; width: 0; transition: width .7s var(--ease); }
.bar.ok { background: var(--good); color: var(--paper); }
.bar.slow { background: var(--warn-wash); color: var(--warn); border: 1px solid var(--warn); }
.bar.fail { background: var(--bad-wash); color: var(--bad); border: 1px solid var(--bad); }
.bar.bad { background: var(--info-wash); color: var(--info); border: 1px solid var(--info); }
.lane-skip { position: absolute; left: 6px; top: 10px; font: italic 400 .78rem var(--f-body); color: var(--ink-3); opacity: 0; transition: opacity .4s; white-space: nowrap; }
.budgetline, .freeline { position: absolute; top: 0; bottom: 0; pointer-events: none; }
.budgetline { border-left: 2px solid var(--bad); }
.freeline { border-left: 1.5px dashed var(--warn); }
.budgetline::after, .freeline::after { position: absolute; top: -17px; left: 4px; font: 500 .62rem var(--f-mono); white-space: nowrap; }
.budgetline::after { content: "budget 24 s"; color: var(--bad); left: auto; right: 4px; }
.freeline::after { content: "free share 9 s"; color: var(--warn); }
.budgetnote { position: absolute; right: 0; top: -1px; font: 500 .62rem var(--f-mono); color: var(--bad); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: .82rem; color: var(--ink-2); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -1px; margin-right: 7px; }
.log { margin-top: 16px; font: 400 .78rem/1.6 var(--f-mono); background: var(--code-bg); color: var(--code-ink); padding: 14px 16px; border-radius: 12px; min-height: 120px; max-height: 230px; overflow: auto; }
.log div { opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .3s; }
.log div.in { opacity: 1; transform: none; }
.log .k { color: #e8b58d; } .log .g { color: #8ed1ab; } .log .r { color: #f19a8a; } .log .d { color: var(--code-dim); }
.result { margin-top: 16px; padding: 16px 18px; border: 1px solid var(--rule); border-radius: 16px; display: none; }
.result.show { display: block; animation: pop .35s var(--ease); }
@keyframes pop { from { transform: scale(.985); opacity: 0; } to { transform: none; opacity: 1; } }
.result.win { background: var(--good-wash); border-color: var(--good); }
.result.lose { background: var(--bad-wash); border-color: var(--bad); }
.result .tag { color: var(--ink-2); }
.result p { margin-top: 6px; }
.result .mono { font: 500 .82rem var(--f-mono); }
.result blockquote { margin: 10px 0 0; padding-left: 12px; border-left: 3px solid var(--bad); font-style: italic; color: var(--ink); }
.replay { font: 500 .85rem var(--f-body); cursor: pointer; border: 1px solid var(--rule); border-radius: 999px; min-height: 44px; padding: 0 18px; background: var(--surface); color: var(--ink); }
.replay:hover { border-color: var(--ink-3); }
.replay-row { margin-top: 12px; text-align: right; }

/* three cards */
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.card { border: 1px solid var(--rule); border-radius: 20px; background: var(--surface); padding: 22px 24px; display: grid; gap: 8px; align-content: start; }
.card h3 { font-size: clamp(1.2rem, 1.05rem + .5vw, 1.5rem); line-height: 1.15; }
.card p { color: var(--ink-2); font-size: .95rem; }

/* tables */
.tablewrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: 18px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; min-width: 640px; }
th, td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--rule); }
th { font: 500 .7rem var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
tr:last-child td { border-bottom: 0; }
td small { color: var(--ink-3); }
td.num2, th.num2 { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chip { display: inline-block; font: 600 .72rem/1.5 var(--f-body); padding: 1px 9px; border-radius: 999px; border: 1px solid; }
.chip.ok { color: var(--good); border-color: var(--good); background: var(--good-wash); }
.chip.no { color: var(--bad); border-color: var(--bad); background: var(--bad-wash); }
.chip.warn { color: var(--warn); border-color: var(--warn); background: var(--warn-wash); }
.pool { display: flex; gap: 8px; flex-wrap: wrap; font: 500 .78rem var(--f-mono); }
.pool span { padding: 6px 12px; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); }
.pool .down { border-color: var(--bad); color: var(--bad); text-decoration: line-through; background: var(--bad-wash); }
.pool .live { border-color: var(--good); background: var(--good-wash); color: var(--good); font-weight: 700; }

/* failure kinds */
.errs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.err { border: 1px solid var(--rule); border-radius: 18px; background: var(--surface); padding: 16px 18px; cursor: pointer; transition: border-color .2s, transform .25s var(--ease); font: inherit; text-align: left; color: var(--ink); min-height: 44px; }
.err:hover { border-color: var(--ox); transform: translateY(-2px); }
.err code { background: none; border: 0; padding: 0; font-size: .95rem; font-weight: 600; color: var(--ox); display: block; }
.err .what { font-size: .92rem; margin-top: 4px; display: block; color: var(--ink-2); }
.err .say { font-size: .92rem; color: var(--ink); margin-top: 10px; font-style: italic; display: none; border-top: 1px solid var(--rule); padding-top: 10px; }
.err[aria-expanded="true"] .say { display: block; }
.err[aria-expanded="true"] { border-color: var(--ox); }

/* scorecards loop */
.loop { display: grid; grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr); align-items: center; gap: 10px; }
.node { border: 1px solid var(--rule); border-radius: 20px; padding: 22px 24px; background: var(--surface); }
.node h3 { font-size: 1.35rem; }
.node p { font-size: .95rem; color: var(--ink-2); margin-top: 6px; }
.arrows { display: grid; gap: 14px; font: 500 .66rem var(--f-mono); text-align: center; color: var(--ink-3); }
.arrows div { border-bottom: 1.5px solid var(--ink-3); position: relative; padding-bottom: 3px; }
.arrows .r::after { content: ""; position: absolute; right: -1px; bottom: -5px; border: 4px solid transparent; border-left: 7px solid var(--ink-3); }
.arrows .l::after { content: ""; position: absolute; left: -1px; bottom: -5px; border: 4px solid transparent; border-right: 7px solid var(--ink-3); }
.method { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--ink); list-style: none; margin: 0; padding: 0; }
.method li { padding: 16px 22px 18px 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); }
.method li:nth-child(odd) { border-right: 1px solid var(--rule); }
.method li:nth-child(even) { padding-left: 22px; padding-right: 0; }
.method li:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; }

/* using it */
.two { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(20px, 3vw, 44px); align-items: start; }
pre.snip { margin: 0; background: var(--code-bg); color: var(--code-ink); font: 400 .8rem/1.65 var(--f-mono); padding: 20px 22px; border-radius: 18px; overflow-x: auto; }
pre.snip .c { color: var(--code-dim); }
.steps { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.steps li { padding: 14px 0 16px; border-bottom: 1px solid var(--rule); color: var(--ink-2); font-size: .97rem; }
.steps li b { color: var(--ink); font-family: var(--f-display); font-size: 1.1rem; }

/* code map */
.map { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.src { padding: 14px 16px 16px 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: inherit; transition: background .15s; min-width: 0; }
.src:hover { background: var(--panel); }
.src code { background: none; border: 0; padding: 0; color: var(--ox); font-size: .85rem; }
.src p { font-size: .88rem; color: var(--ink-2); margin-top: 3px; }
.src .t { font: 600 .66rem var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--good); margin-left: 8px; }

/* footer */
.site-foot { background: var(--panel); border-top: 1px solid var(--rule); margin-top: clamp(40px, 8vh, 96px); }
.family { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding-top: clamp(32px, 5vh, 56px); }
.fam { display: grid; gap: 6px; align-content: start; padding: 22px 24px; border: 1px solid var(--rule); border-radius: 20px; background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .2s; }
.fam:hover { border-color: var(--ox); text-decoration: none; }
.fam strong { font: 700 clamp(1.3rem, 1.15rem + .6vw, 1.7rem)/1.1 var(--f-display); }
.fam span:not(.tag):not(.go) { color: var(--ink-2); max-width: 34em; }
.fam .go { display: inline-flex; align-items: center; gap: 6px; color: var(--ox); font-weight: 600; margin-top: 4px; }
.fam svg { width: 14px; height: 14px; }
.foot-cols { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 32px clamp(20px, 3vw, 48px); padding-block: 40px; }
.foot-cols .mark { font: 700 clamp(1.8rem, 1.5rem + 1vw, 2.3rem)/1 var(--f-display); letter-spacing: -0.02em; margin-bottom: 12px; }
.foot-cols p { color: var(--ink-2); font-size: .95rem; max-width: 30em; }
.foot-cols h3 { font: 500 .72rem/1.4 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.foot-cols ul { list-style: none; margin: 0; padding: 0; display: grid; }
.foot-cols li a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; }
.foot-cols li a:hover { color: var(--ox); text-decoration: underline; }
.foot-base { border-top: 1px solid var(--rule); padding-block: 22px 30px; display: grid; gap: 8px; color: var(--ink-3); font-size: .86rem; }
.foot-base p { max-width: 70em; }

/* 404 */
.notfound { padding-block: clamp(64px, 14vh, 160px); display: grid; gap: 18px; justify-items: start; }
.notfound h1 { font-size: clamp(3rem, 2rem + 5vw, 5.5rem); line-height: .95; letter-spacing: -0.03em; }
.notfound p { color: var(--ink-2); max-width: 32em; }

@media (max-width: 960px) {
  .index { grid-template-columns: repeat(2, 1fr); }
  .index a:nth-child(2) { border-right: 0; }
  .index a:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .map { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .sim, .two, .loop { grid-template-columns: 1fr; }
  .scen { grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); }
  .arrows { padding: 8px 25%; }
  .three, .errs { grid-template-columns: 1fr; }
  .foot-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-cols > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .head, .stage { grid-template-columns: 1fr; }
  .head { align-items: start; gap: 14px; }
  .ghost { max-width: 300px; margin-inline: auto; }
  .ledger li { grid-template-columns: 34px minmax(0, 1fr); }
  .ledger li::before, .ledger h3 { grid-row: auto; }
  .ledger .what, .ledger .fix { grid-column: 2; }
  .method { grid-template-columns: 1fr; }
  .method li:nth-child(n) { padding: 14px 0; border-right: 0; }
  .family { grid-template-columns: 1fr; }
  .divider .tag + .tag { display: none; }
}
@media (max-width: 560px) {
  .index { grid-template-columns: 1fr; }
  .index a { border-right: 0; border-bottom: 1px solid var(--rule); }
  .index a:last-child { border-bottom: 0; }
  .lane { grid-template-columns: 70px minmax(0, 1fr); }
  .map { grid-template-columns: 1fr; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .sitebar-in { min-height: 56px; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .rise { opacity: 1; transform: none; }
}
@media print {
  @page { size: A4 portrait; margin: 14mm; }
  .ticker, .sitebar, .skip, .actions, .scen, .replay-row, .site-foot .family { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .js .rise { opacity: 1; transform: none; }
  .err .say { display: block; }
  section { break-inside: avoid-page; }
  .log { max-height: none; }
}
