/* The Shape of Things: stylesheet. System fonts only, no external requests. */
:root {
  --bg: #eef1ef;
  --surface: #f8faf9;
  --ink: #1b2430;
  --mute: #56636f;
  --rule: #c5cecb;
  --mimetic: #8f5f00;
  --metaphoric: #7a3e7e;
  --scientific: #1b5e7b;
  --metaphysical: #4f6b2a;
  --mimetic-t: #f0e3c6;
  --metaphoric-t: #eadcec;
  --scientific-t: #d9e8ee;
  --metaphysical-t: #e0e8d3;
  --danger: #9b2c2c;
  --danger-t: #f3dede;
  --sans: system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --serif: var(--sans);   /* was Charter, Iowan Old Style, Palatino, Georgia: rendered soft on Windows. Put that stack back here to restore the serif voice. */
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --measure: 40rem;
  --gutter: 16px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121a21; --surface: #18222a; --ink: #e3e9ec; --mute: #9aa8b2; --rule: #2f3b45;
    --mimetic: #e2b455; --metaphoric: #d49bd6; --scientific: #7cc0de; --metaphysical: #b1cc84;
    --mimetic-t: #2a2414; --metaphoric-t: #2a1f2c; --scientific-t: #16282f; --metaphysical-t: #1f2716;
    --danger: #f0a0a0; --danger-t: #2f1b1b;
  }
}
:root[data-theme="dark"] {
  --bg: #121a21; --surface: #18222a; --ink: #e3e9ec; --mute: #9aa8b2; --rule: #2f3b45;
  --mimetic: #e2b455; --metaphoric: #d49bd6; --scientific: #7cc0de; --metaphysical: #b1cc84;
  --mimetic-t: #2a2414; --metaphoric-t: #2a1f2c; --scientific-t: #16282f; --metaphysical-t: #1f2716;
  --danger: #f0a0a0; --danger-t: #2f1b1b;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 1rem; line-height: 1.55;
}
a { color: var(--scientific); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--scientific); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }

/* ---------- header */
.top { border-bottom: 1px solid var(--rule); background: var(--surface); }
.top-in { max-width: 72rem; margin: 0 auto; padding: 10px var(--gutter); display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 28px; }
.brand { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.nav a { color: var(--ink); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; font-size: 0.95rem; }
.nav a:hover { border-bottom-color: var(--mute); }
.nav a[aria-current="page"] { border-bottom-color: var(--ink); font-weight: 600; }
.lanes-bar { border-top: 1px solid var(--rule); }
.lanes-in { max-width: 72rem; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.lane-link { display: block; padding: 7px var(--gutter) 8px; font-size: 0.9rem; font-weight: 600; text-decoration: none; border-top: 4px solid var(--lane, var(--rule)); color: var(--lane, var(--ink)); }
.lane-link:hover { background: var(--lane-t, transparent); }
.lane-link[aria-current="page"] { background: var(--lane-t); }
.lane-mimetic { --lane: var(--mimetic); --lane-t: var(--mimetic-t); }
.lane-metaphoric { --lane: var(--metaphoric); --lane-t: var(--metaphoric-t); }
.lane-scientific { --lane: var(--scientific); --lane-t: var(--scientific-t); }
.lane-metaphysical { --lane: var(--metaphysical); --lane-t: var(--metaphysical-t); }

/* ---------- layout */
main { min-height: 60vh; padding-bottom: 48px; }
.wrap { max-width: 46rem; margin: 0 auto 0 max(0px, calc((100% - 72rem) / 2)); padding: 28px var(--gutter) 8px; }
.wrap.wide { max-width: 72rem; margin: 0 auto; }
.wrap.wide > .ways, .wrap.wide > .withdrawn-strip, .wrap.wide > .smallnote { max-width: 50rem; }
.wrap.tight { padding-left: 0; padding-right: 0; }
h1 { font-size: clamp(1.8rem, 4.2vw, 2.7rem); line-height: 1.1; letter-spacing: -0.02em; margin: 8px 0 14px; font-weight: 700; }
h2 { font-size: 1.35rem; line-height: 1.25; margin: 2.2rem 0 0.6rem; letter-spacing: -0.01em; }
h3 { font-size: 1.1rem; line-height: 1.3; margin: 1.6rem 0 0.4rem; }
p { margin: 0 0 1em; }
.contract { color: var(--mute); max-width: 40rem; font-size: 1.05rem; }
.chips { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; font-size: 0.82rem; font-weight: 600; padding: 1px 9px; border: 1px solid var(--lane, var(--mute)); color: var(--lane, var(--mute)); text-decoration: none; border-radius: 3px; background: var(--surface); }
.chip.thread { --lane: var(--mute); font-weight: 500; }
.smallnote { color: var(--mute); font-size: 0.92rem; }
.lane-title { color: var(--lane); }
h1.lane-title { border-top: 6px solid var(--lane); padding-top: 12px; }
.kind { color: var(--mute); font-size: 0.82rem; margin-left: 6px; }
.sum { display: block; color: var(--mute); font-size: 0.93rem; max-width: 38rem; }
ul.list, ul.entries { list-style: none; padding: 0; margin: 0 0 1rem; }
ul.list li { padding: 9px 0; border-bottom: 1px solid var(--rule); }
ul.list li > a:first-child { font-weight: 600; }
ul.entries { columns: 2 18rem; column-gap: 28px; }
ul.entries li { padding: 5px 0; break-inside: avoid; }

/* ---------- home */
.hero { max-width: 72rem; margin: 0 auto; padding: 44px var(--gutter) 6px; }
.hero h1 { font-size: clamp(2.3rem, 6.5vw, 4.4rem); letter-spacing: -0.035em; line-height: 1; margin: 0 0 16px; }
.lede { font-size: clamp(1.15rem, 2.2vw, 1.5rem); line-height: 1.4; max-width: 44rem; margin: 0; font-family: var(--serif); }
.gridnote { color: var(--mute); max-width: 44rem; margin-bottom: 12px; }
table.grid { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--rule); table-layout: fixed; }
table.grid th, table.grid td { border: 1px solid var(--rule); vertical-align: top; text-align: left; }
table.grid thead th { padding: 10px 14px; font-size: 1.05rem; }
table.grid thead th a { color: var(--ink); text-decoration: none; }
table.grid thead th a:hover { text-decoration: underline; }
table.grid td.corner { width: 9.5rem; border-top-color: transparent; border-left-color: transparent; background: var(--bg); }
table.grid tbody th { width: 9.5rem; padding: 12px 14px; border-left: 6px solid var(--lane); background: var(--lane-t); font-size: 1.05rem; }
table.grid tbody th a { color: var(--lane); text-decoration: none; font-weight: 700; }
table.grid td { padding: 12px 14px; font-size: 0.93rem; line-height: 1.4; }
table.grid td ul { list-style: none; margin: 0; padding: 0; }
table.grid td li { margin: 0 0 7px; }
table.grid td li.quote a { font-family: var(--serif); font-size: 1rem; color: var(--ink); }
table.grid td li.more { font-size: 0.85rem; }
table.grid td.empty { background: repeating-linear-gradient(135deg, transparent 0 9px, var(--rule) 9px 10px); opacity: 0.55; }
.ways { list-style: none; margin: 0 0 1.4rem; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--rule); background: var(--surface); }
.ways li { border: 1px solid var(--rule); border-left: 6px solid var(--lane); margin: -1px 0 0 -1px; }
.ways a { display: block; padding: 14px 16px; text-decoration: none; color: var(--ink); height: 100%; }
.ways a:hover { background: var(--lane-t); }
.ways strong { display: block; font-size: 1.1rem; margin-bottom: 3px; color: var(--lane); }
.ways span { color: var(--mute); font-size: 0.93rem; }
.withdrawn-strip, .withdrawn-box { border-left: 6px solid var(--danger); background: var(--danger-t); padding: 12px 16px; margin: 0 0 1rem; }
.withdrawn-box h2 { margin-top: 0; font-size: 1.1rem; }
.withdrawn-box p:last-child { margin-bottom: 0; }

/* ---------- prose */
.prose { font-family: var(--serif); font-size: 1.12rem; line-height: 1.7; max-width: var(--measure); }
body.lane-scientific .prose { font-family: var(--sans); font-size: 1.02rem; line-height: 1.6; }
.prose h2 { font-family: var(--sans); }
.prose h3, .prose h4 { font-family: var(--sans); }
.prose blockquote { margin: 1.2rem 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--scientific); font-family: var(--sans); font-size: 0.98rem; line-height: 1.55; }
.prose blockquote p { margin: 0 0 0.7em; }
.prose table { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: 0.93rem; line-height: 1.45; margin: 1rem 0 1.4rem; }
.prose th, .prose td { border: 1px solid var(--rule); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--scientific-t); }
.prose code { font-family: var(--mono); font-size: 0.9em; }
.prose p.addr { margin: 0.6rem 0; }
.prose p.addr code { overflow-wrap: anywhere; word-break: break-all; user-select: all; background: var(--surface); padding: .35em .6em; border-radius: 6px; display: inline-block; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin: 0.3rem 0; }

/* ---------- entries and status */
.badge { display: inline-block; font-family: var(--sans); font-size: 0.8rem; font-weight: 700; line-height: 1.5; padding: 0 8px; border: 1.5px solid var(--scientific); color: var(--scientific); border-radius: 3px; white-space: nowrap; vertical-align: 1px; }
.badge.s-tested { color: var(--metaphysical); border-color: var(--metaphysical); background: var(--metaphysical-t); }
.badge.s-derived, .badge.s-simulated { background: var(--scientific-t); }
.badge.s-hypothesis, .badge.s-conjecture, .badge.s-candidate, .badge.s-design-claim, .badge.s-review { color: var(--mimetic); border-color: var(--mimetic); background: var(--mimetic-t); }
.badge.s-stance, .badge.s-principle { color: var(--metaphysical); border-color: var(--metaphysical); border-style: dashed; }
.badge.s-definition, .badge.s-convention, .badge.s-metaphor { color: var(--mute); border-color: var(--mute); }
.badge.s-withdrawn { color: var(--danger); border-color: var(--danger); background: var(--danger-t); text-decoration: line-through; }
.status-line { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; color: var(--mute); }
.canon { color: var(--mute); font-size: 0.92rem; }
.entry .prose h2 { font-size: 1.1rem; }

/* ---------- cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 16px; margin: 0 0 1rem; }
.card { margin: 0; padding: 16px 18px; border: 1px solid var(--rule); border-left: 6px solid var(--mimetic); background: var(--surface); display: flex; flex-direction: column; gap: 12px; }
.card blockquote { margin: 0; font-family: var(--serif); font-size: 1.4rem; line-height: 1.22; font-weight: 600; letter-spacing: -0.01em; }
.card figcaption { font-size: 0.88rem; color: var(--mute); margin-top: auto; }
.card .more { display: block; margin-top: 6px; font-weight: 600; }

/* ---------- stories */
.story .register, .poem .register { color: var(--mute); font-size: 0.95rem; max-width: var(--measure); }
.story-text { font-size: 1.2rem; line-height: 1.75; }
.story-text hr { border: 0; text-align: center; margin: 2.2rem 0; }
.story-text hr::after { content: "\2022\2003\2022\2003\2022"; color: var(--mute); letter-spacing: 0; }
.story-text h2 { font-size: 1.4rem; margin-top: 2.6rem; }
.poem-text { font-size: 1.2rem; line-height: 1.6; }
.poem-text p { margin-bottom: 1.3em; }
.key { margin: 3.5rem 0 1rem; padding: 4px 20px 18px; border-top: 6px solid var(--scientific); background: var(--scientific-t); font-family: var(--sans); font-size: 0.95rem; line-height: 1.5; }
.key h2 { margin-top: 1.1rem; color: var(--scientific); }
.key h3 { font-size: 1rem; }
.key table { width: 100%; border-collapse: collapse; margin: 1rem 0; background: var(--surface); }
.key th, .key td { border: 1px solid var(--rule); padding: 8px 10px; text-align: left; vertical-align: top; }
.key th { background: transparent; font-size: 0.9rem; }
.key ul { padding-left: 1.2rem; }

/* ---------- ledger */
.claim { border-top: 1px solid var(--rule); padding: 16px 0 14px; }
.claim header { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.cid { font-weight: 700; color: var(--mute); }
.claim-text { font-size: 1.15rem; font-weight: 600; margin: 6px 0 8px; max-width: 52rem; line-height: 1.35; }
.claim dl { display: grid; grid-template-columns: 11rem 1fr; gap: 6px 16px; margin: 0; max-width: 56rem; font-size: 0.95rem; }
.claim dt { color: var(--mute); }
.claim dd { margin: 0; }
.claim:target { background: var(--scientific-t); outline: 2px solid var(--scientific); outline-offset: 8px; }
.claim[hidden] { display: none; }
.filters { display: none; margin: 1.2rem 0; padding: 12px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.js .filters { display: block; }
.fgroup { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0; }
.fgroup span { width: 5rem; color: var(--mute); font-size: 0.9rem; }
.fgroup button { font: inherit; font-size: 0.88rem; padding: 3px 11px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); border-radius: 3px; cursor: pointer; }
.fgroup button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.count { margin: 8px 0 0; color: var(--mute); font-size: 0.9rem; }
.legend { margin-top: 2rem; }
.legend summary { cursor: pointer; font-weight: 600; }
.legend ul { list-style: none; padding: 0; }
.legend li { margin: 8px 0; }
[data-js-only] { display: none; }
.js [data-js-only] { display: block; }

/* ---------- papers */
.papers { list-style: none; padding: 0; }
.papers li { border-top: 1px solid var(--rule); padding: 6px 0 16px; }
.papers h3 { margin-bottom: 4px; max-width: 46rem; }
.papers .meta { color: var(--mute); font-size: 0.93rem; margin-bottom: 6px; }
.erratum-note { border-left: 4px solid var(--danger); padding: 6px 12px; background: var(--danger-t); font-size: 0.93rem; max-width: 42rem; }

/* ---------- schematic */
.schematic-wrap { overflow-x: auto; border: 1px solid var(--rule); background: var(--surface); padding: 8px 4px; }
.swipe { display: none; color: var(--mute); font-size: 0.85rem; margin: 0 8px 4px; }
svg.schematic { display: block; width: 100%; min-width: 820px; height: auto; }
.schematic .w { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.schematic .wd { fill: none; stroke: var(--mute); stroke-width: 1.6; stroke-dasharray: 5 4; }
.schematic .dot { fill: var(--ink); }
.schematic .t { font: 15px var(--sans); fill: var(--ink); }
.schematic .t.sm { font-size: 13px; }
.schematic .t.b { font-weight: 700; }
.schematic .mute { fill: var(--mute); }
.schematic .lnk { fill: var(--scientific); }
.schematic .fill-ink { fill: var(--ink); }
.schematic .fill-mute { fill: var(--mute); }
.schematic .part { fill: var(--bg); stroke: var(--ink); stroke-width: 2; }
.schematic .node { fill: var(--scientific-t); stroke: var(--scientific); stroke-width: 3; }
.schematic .membrane { fill: none; stroke: var(--scientific); stroke-width: 1.8; stroke-dasharray: 7 5; }
.schematic .curve { fill: none; stroke: var(--scientific); stroke-width: 2.6; stroke-linecap: round; }
.schematic .meter { fill: var(--bg); stroke: var(--ink); stroke-width: 2; }
.schematic .needle { stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }
.schematic a { cursor: pointer; }
.schematic a:hover text, .schematic a:focus text { text-decoration: underline; }
.schematic a:focus-visible { outline: 3px solid var(--scientific); outline-offset: 3px; }
table.types { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
table.types th, table.types td { border: 1px solid var(--rule); padding: 8px 10px; text-align: left; vertical-align: top; background: var(--surface); }

/* ---------- front door */
[hidden] { display: none !important; }
.opener { max-width: 72rem; margin: 0 auto; padding: 56px var(--gutter) 8px; }
.opener-line { font-family: var(--serif); font-size: clamp(1.6rem, 4.2vw, 2.9rem); line-height: 1.22; letter-spacing: -0.012em; max-width: 36rem; margin: 0 0 22px; font-weight: 500; }
.opener-go { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin: 0; }
.opener-go span { color: var(--mute); font-size: 0.95rem; max-width: 34rem; }
.intro { padding-top: 22px; padding-bottom: 0; }
.intro .lede { font-size: 1.1rem; color: var(--mute); max-width: 40rem; }
.button { display: inline-block; font: inherit; font-weight: 700; font-size: 1rem; padding: 9px 18px; border: 2px solid var(--ink); background: var(--ink); color: var(--bg); text-decoration: none; border-radius: 3px; cursor: pointer; }
.button:hover { background: transparent; color: var(--ink); }
.button.ghost { background: transparent; color: var(--ink); font-weight: 600; }
.button.ghost:hover { background: var(--ink); color: var(--bg); }
.bookpanel { display: grid; gap: 4px; padding: 16px 20px 16px; border: 1px solid var(--rule); border-left: 6px solid var(--scientific); background: var(--surface); text-decoration: none; color: var(--ink); max-width: 50rem; margin-top: 22px; }
.bookpanel:hover { background: var(--scientific-t); }
.bookpanel.lane-metaphoric { border-left-color: var(--metaphoric); }
.bookpanel.lane-metaphoric .bp-label, .bookpanel.lane-metaphoric .bp-go { color: var(--metaphoric); }
.bookpanel.lane-metaphoric:hover { background: var(--metaphoric-t); }
.bookpanel + .bookpanel { margin-top: 14px; }
.bookpanel strong { font-family: var(--serif); font-size: 1.5rem; line-height: 1.15; }
.bp-label { font-size: 0.85rem; font-weight: 700; color: var(--scientific); }
.bp-sub { font-family: var(--serif); font-style: italic; color: var(--mute); }
.bp-text { font-size: 0.97rem; max-width: 40rem; margin-top: 4px; }
.bp-go { font-weight: 700; color: var(--scientific); margin-top: 6px; }
.small-h { font-size: 1rem; margin: 1.6rem 0 0.3rem; color: var(--mute); font-weight: 600; }

/* ---------- card page */
.cardpage { max-width: 44rem; }
.bigcard { margin: 18px 0 8px; padding: 26px 24px; border: 1px solid var(--rule); border-left: 8px solid var(--mimetic); background: var(--surface); }
.bigcard blockquote { margin: 0; font-family: var(--serif); font-size: clamp(1.7rem, 5vw, 2.6rem); line-height: 1.18; font-weight: 600; letter-spacing: -0.015em; }
.claims-text { font-size: 1.1rem; max-width: 38rem; margin-top: 0; }
.sharebar { margin: 1.4rem 0 0.6rem; gap: 10px; align-items: center; flex-wrap: wrap; }
.js .sharebar { display: flex; }
.copied { color: var(--mute); font-size: 0.92rem; }
.card blockquote a { color: inherit; text-decoration: none; }
.card blockquote a:hover { text-decoration: underline; }

/* ---------- book */
.book-hub, .book-chapter { max-width: 46rem; }
.book-sub { font-family: var(--serif); font-style: italic; font-size: 1.35rem; color: var(--mute); margin: -6px 0 6px; line-height: 1.3; }
.byline { font-weight: 600; margin: 0 0 18px; }
.book-banner { border: 1px solid var(--rule); border-left: 6px solid var(--mimetic); background: var(--mimetic-t); padding: 10px 16px; margin: 16px 0 20px; font-size: 0.95rem; max-width: 42rem; }
.book-banner p { margin: 0; }
.book-banner.compact { font-size: 0.88rem; padding: 8px 14px; }
.book-hub .start { margin: 18px 0 8px; }
.book-hub h2 { margin-top: 2.2rem; }
.part { margin: 1.6rem 0 0; }
.part h3 { margin: 0 0 2px; font-size: 1.25rem; }
.part-tag { font-family: var(--serif); font-style: italic; color: var(--mute); margin: 0 0 6px; }
ol.chapters, ul.chapters { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.chapters li { border-bottom: 1px solid var(--rule); padding: 9px 2px; }
.chapters a { font-weight: 600; text-decoration: none; }
.chapters a:hover { text-decoration: underline; }
.cn { display: inline-block; min-width: 8rem; color: var(--mute); font-weight: 500; }
.chapters .sum { margin-left: 8.2rem; }
ul.list.plain { list-style: disc; padding-left: 1.2rem; }
.crumbs { color: var(--mute); font-size: 0.9rem; margin: 0 0 14px; }
.crumbs a { color: var(--mute); }
.part-head { margin: 8px 0 28px; padding: 14px 18px; border-left: 6px solid var(--scientific); background: var(--scientific-t); }
.part-name { margin: 0; font-weight: 700; color: var(--scientific); }
.part-head .part-tag { font-size: 1.25rem; margin: 2px 0 6px; }
.chap-label { margin: 0; font-weight: 700; color: var(--mute); }
.book-chapter h1 { margin-top: 2px; }
.book-text { font-size: 1.14rem; line-height: 1.7; }
.book-text h2 { font-size: 1.45rem; margin-top: 2.4rem; line-height: 1.2; }
.book-text h3 { font-size: 1.15rem; margin-top: 1.8rem; }
.book-text blockquote { font-family: var(--serif); font-size: 1.12rem; }
blockquote.epigraph { margin: 14px 0 20px; padding: 2px 0 2px 18px; border-left: 3px solid var(--rule); font-family: var(--serif); font-style: italic; max-width: 34rem; }
blockquote.epigraph p { margin: 0; }
blockquote.epigraph footer { font-style: normal; font-size: 0.92rem; color: var(--mute); margin-top: 4px; }
.part-head blockquote.epigraph { border-color: var(--scientific); }
.tbl { overflow-x: auto; margin: 1rem 0 1.6rem; border: 1px solid var(--rule); background: var(--surface); }
.tbl table { margin: 0; min-width: 34rem; }
.book-text .tbl table { font-size: 0.9rem; }
.chap-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 3rem 0 0; }
.chap-nav a { display: block; padding: 12px 14px; border: 1px solid var(--rule); background: var(--surface); text-decoration: none; color: var(--ink); font-weight: 600; }
.chap-nav a:hover { background: var(--scientific-t); }
.chap-nav a span { display: block; font-size: 0.82rem; color: var(--mute); font-weight: 500; }
.chap-nav .next { text-align: right; grid-column: 2; }
.chap-nav .prev { grid-column: 1; }
.chap-nav > span:empty { display: block; }

/* ---------- footer */
.foot { border-top: 1px solid var(--rule); padding: 18px var(--gutter) 40px; color: var(--mute); font-size: 0.88rem; }
.foot p { max-width: 72rem; margin: 0 auto 6px; }

/* ---------- small screens */
@media (max-width: 760px) {
  .lanes-in { grid-template-columns: 1fr 1fr; }
  .ways { grid-template-columns: 1fr; }
  .claim dl { grid-template-columns: 1fr; gap: 0; }
  .claim dd { margin-bottom: 8px; }
  .swipe { display: block; }
  table.grid, table.grid tbody, table.grid tr, table.grid th, table.grid td { display: block; width: auto; }
  table.grid thead { display: none; }
  table.grid { border: 0; background: transparent; }
  table.grid tr { margin-bottom: 14px; border: 1px solid var(--rule); background: var(--surface); }
  table.grid tbody th { width: auto; border: 0; border-left: 6px solid var(--lane); }
  table.grid td { border: 0; border-top: 1px solid var(--rule); }
  table.grid td.empty { display: none; }
  table.grid td::before { content: attr(data-thread); display: block; font-weight: 700; font-size: 0.85rem; color: var(--mute); margin-bottom: 4px; }
  .key table, .key tbody, .key tr, .key td { display: block; width: auto; }
  .key thead { display: none; }
  .key tr { margin-bottom: 14px; border: 1px solid var(--rule); }
  .key td { border: 0; border-top: 1px solid var(--rule); }
  .key td:first-child { border-top: 0; font-weight: 600; }
  .key td:nth-child(2)::before { content: "Stands in for: "; font-weight: 700; }
  .key td:nth-child(3)::before { content: "Status: "; font-weight: 700; }
  .key td:nth-child(4)::before { content: "Do not claim: "; font-weight: 700; }
  .prose { font-size: 1.07rem; }
  .book-text { font-size: 1.07rem; }
  .chap-nav { grid-template-columns: 1fr; }
  .chap-nav .next, .chap-nav .prev { grid-column: 1; text-align: left; }
  .chapters .sum { margin-left: 0; }
  .cn { display: block; min-width: 0; }
  .opener { padding-top: 32px; }
  .story-text { font-size: 1.12rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
@media print { .top, .foot, .filters { display: none; } body { background: #fff; color: #000; } }

/* book insets */
.chapters li.inset{margin-left:1.4rem;border-left:2px solid var(--rule);padding-left:.8rem}
.book-banner.page-status{margin-top:0}

/* floating tip icon, bottom right, every page */
.shingle { position: fixed; right: 16px; bottom: 16px; z-index: 20; display: grid; place-items: center; width: 52px; height: 52px; background: var(--ink); color: var(--bg); border: 2px solid var(--bg); border-radius: 50%; text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.28); }
.shingle:hover { transform: translateY(-2px); }
.shingle:focus-visible { outline: 3px solid var(--scientific); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .shingle:hover { transform: none; } }
.foot { padding-bottom: 72px; }
@media (max-width: 480px) { .shingle { right: 10px; bottom: 10px; width: 48px; height: 48px; } }
@media print { .shingle { display: none; } }

/* support button */
.prose a.btn-kofi { display: inline-flex; align-items: center; gap: .6rem; padding: .7rem 1.2rem; background: var(--ink); color: var(--bg); border-radius: 12px; font: 600 1rem/1.2 var(--sans); text-decoration: none; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.prose a.btn-kofi svg { flex: none; }
.prose a.btn-kofi:hover { text-decoration: underline; text-underline-offset: 3px; }
.prose a.btn-kofi:focus-visible { outline: 3px solid var(--scientific); outline-offset: 3px; }
@media print { .prose a.btn-kofi { background: none; color: inherit; border: 1px solid; box-shadow: none; } }

/* personal note on About */
.prose p.plea { margin: 1.2rem 0; padding: 10px 0 10px 18px; border-left: 4px solid var(--scientific); font-size: 1.08rem; line-height: 1.5; }

/* figure on a light panel: the figure's text is dark, so it stays on white in dark mode */
.fig-light { margin: 1.2rem 0; max-width: 40rem; }
.fig-light img { display: block; width: 100%; height: auto; background: #fff; padding: 12px; border: 1px solid var(--rule); border-radius: 6px; }
.fig-light figcaption { font-size: 0.9rem; line-height: 1.45; color: var(--mute); margin-top: 8px; }

.excerpt .from { color: var(--mute); font-size: 0.95rem; margin: 18px 0 0; }
.excerpt .prose h3 { margin: 1.8rem 0 0.4rem; font-size: 1.15rem; }
