/* The Reading Room — Good Works Library
   Parchment by day, lamplight by night. One accent: Heaven's Fire. */

:root {
  --paper: #f3ead6;
  --paper-2: #ebe0c6;
  --card: #f8f1e1;
  --ink: #2a2017;
  --ink-2: #5c4c39;
  --ink-3: #8b7a60;
  --rule: #dccdab;
  --rule-2: #c6b18a;
  --fire: #b2351c;
  --fire-2: #d6552b;
  --gold: #957022;
  --seal: #b5301a;
  --seal-ink: #fbf0da;
  --link: #8f2c14;
  --hl: rgba(214, 85, 43, .15);
  --mark: rgba(214, 140, 43, .32);
  --shadow: 0 1px 0 rgba(255, 255, 255, .55) inset, 0 14px 32px -22px rgba(70, 45, 10, .45);
  --veil: rgba(42, 32, 23, .42);
  --grain-op: .5;

  --f-body: "EB Garamond", "Iowan Old Style", "Noto Serif", "Songti SC", "Noto Serif CJK SC", "Noto Serif CJK JP", "Noto Serif Devanagari", "Noto Serif Tibetan", serif;
  --f-display: "IM Fell English", "EB Garamond", serif;
  --f-sc: "IM Fell English SC", "EB Garamond", serif;
  --f-black: "UnifrakturMaguntia", "IM Fell English", serif;
  --f-hyper: "Atkinson Hyperlegible", "Helvetica Neue", sans-serif;

  --fs: 20px;
  --lh: 1.62;
  --measure: 66ch;
  --bar-h: 56px;
  color-scheme: light;
}

:root[data-theme="night"] {
  --paper: #15120e;
  --paper-2: #1c1813;
  --card: #1f1a14;
  --ink: #ebdfc7;
  --ink-2: #bba985;
  --ink-3: #85765c;
  --rule: #352d23;
  --rule-2: #4b3f30;
  --fire: #e26a40;
  --fire-2: #f08a55;
  --gold: #d3a64c;
  --seal: #bf3a1d;
  --seal-ink: #fbefd8;
  --link: #ee9064;
  --hl: rgba(226, 106, 64, .17);
  --mark: rgba(211, 166, 76, .3);
  --shadow: 0 1px 0 rgba(255, 220, 160, .04) inset, 0 18px 40px -24px rgba(0, 0, 0, .8);
  --veil: rgba(0, 0, 0, .6);
  --grain-op: .35;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --paper: #15120e;
    --paper-2: #1c1813;
    --card: #1f1a14;
    --ink: #ebdfc7;
    --ink-2: #bba985;
    --ink-3: #85765c;
    --rule: #352d23;
    --rule-2: #4b3f30;
    --fire: #e26a40;
    --fire-2: #f08a55;
    --gold: #d3a64c;
    --seal: #bf3a1d;
    --seal-ink: #fbefd8;
    --link: #ee9064;
    --hl: rgba(226, 106, 64, .17);
    --mark: rgba(211, 166, 76, .3);
    --shadow: 0 1px 0 rgba(255, 220, 160, .04) inset, 0 18px 40px -24px rgba(0, 0, 0, .8);
    --veil: rgba(0, 0, 0, .6);
    --grain-op: .35;
    color-scheme: dark;
  }
}

:root[data-size="s"] { --fs: 18px; }
:root[data-size="l"] { --fs: 22px; }
:root[data-size="xl"] { --fs: 25px; }
:root[data-lead="tight"] { --lh: 1.48; }
:root[data-lead="loose"] { --lh: 1.85; }
:root[data-measure="narrow"] { --measure: 56ch; }
:root[data-measure="wide"] { --measure: 80ch; }
:root[data-font="fell"] { --f-body: "IM Fell English", "EB Garamond", "Songti SC", "Noto Serif CJK SC", serif; }
:root[data-font="hyper"] { --f-body: "Atkinson Hyperlegible", "Helvetica Neue", "PingFang SC", "Noto Sans CJK SC", sans-serif; --lh: 1.7; }

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + 24px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--fs);
  line-height: var(--lh);
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body::before { /* paper grain */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: var(--grain-op);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .33 0 0 0 0 .18 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="night"] body::after, :root[data-theme="auto"] body::after {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 70vh;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse 60% 55% at 50% -10%, rgba(226, 106, 64, .07), transparent 70%);
}
@media (prefers-color-scheme: light) { :root[data-theme="auto"] body::after { display: none; } }
:root[data-theme="day"] body::after { display: none; }
main { position: relative; z-index: 1; flex: 1; width: 100%; }
a { color: var(--link); text-decoration-thickness: .06em; text-underline-offset: .18em; text-decoration-color: color-mix(in srgb, var(--link) 45%, transparent); }
a:hover { text-decoration-color: currentColor; }
::selection { background: var(--mark); }
button { font: inherit; color: inherit; }
kbd { font-family: var(--f-body); font-size: .72em; padding: .05em .45em; border: 1px solid var(--rule-2); border-bottom-width: 2px; border-radius: 4px; color: var(--ink-2); background: var(--card); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: var(--paper); padding: .4em .8em; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--fire); outline-offset: 2px; border-radius: 2px; }
.ic { display: inline-flex; width: 1.15em; height: 1.15em; vertical-align: -.2em; }
.ic svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.orn { text-align: center; color: var(--gold); letter-spacing: .35em; font-size: .9rem; margin: 1.2rem 0; user-select: none; }
.orn span { color: var(--rule-2); letter-spacing: -.05em; }
.dot { color: var(--ink-3); padding: 0 .1em; }

/* ------------------------------------------------------------------ bar */
.bar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 0 clamp(14px, 3vw, 32px);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--rule);
  font-size: 16px;
  transition: transform .28s ease;
}
.bar.away { transform: translateY(-100%); }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; flex-shrink: 0; }
.brand .seal { filter: drop-shadow(0 2px 3px rgba(120, 30, 10, .25)); transition: transform .3s ease; }
.brand:hover .seal { transform: rotate(-4deg) scale(1.04); }
.wordmark { font-family: var(--f-black); font-size: 1.42rem; line-height: 1; padding-top: .1em; letter-spacing: .01em; }
.searchbox {
  flex: 1;
  max-width: 440px;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: .6rem;
  height: 36px;
  padding: 0 .5rem 0 .8rem;
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-3);
  cursor: text;
  font-size: 15px;
  text-align: left;
}
.searchbox span:not(.ic) { flex: 1; font-style: italic; }
.searchbox:hover { border-color: var(--ink-3); }
.barnav { display: flex; gap: 1.1rem; font-family: var(--f-sc); font-size: 15px; letter-spacing: .03em; }
.barnav a { color: var(--ink-2); text-decoration: none; }
.barnav a:hover { color: var(--fire); }
.barnav a.out::after { content: " ↗"; font-size: .8em; color: var(--ink-3); }
.tools { display: flex; gap: .2rem; margin-left: auto; }   /* the far right of the bar (the search box that used to push them there is gone) */
.tool { width: 36px; height: 36px; border: 0; background: transparent; border-radius: 8px; color: var(--ink-2); cursor: pointer; display: grid; place-items: center; }
.tool:hover { background: var(--paper-2); color: var(--fire); }
.tool .ic { width: 20px; height: 20px; }
.tool[data-open="search"], .menu-only { display: none; }

.thread { position: fixed; left: 0; top: 0; bottom: 0; width: 3px; z-index: 45; background: transparent; pointer-events: none; display: none; }
.k-work .thread { display: block; }
.thread i { position: absolute; left: 0; top: 0; width: 100%; height: 0; background: linear-gradient(var(--gold), var(--fire) 60%, var(--fire-2)); box-shadow: 0 0 10px 1px color-mix(in srgb, var(--fire) 55%, transparent); border-radius: 0 0 3px 3px; transition: height .12s linear; }
.thread i::after { content: ""; position: absolute; bottom: -3px; left: -2px; width: 7px; height: 7px; border-radius: 50%; background: var(--fire-2); box-shadow: 0 0 10px 3px color-mix(in srgb, var(--fire-2) 70%, transparent); animation: flicker 2.6s infinite ease-in-out; }
@keyframes flicker { 0%, 100% { opacity: 1; transform: scale(1); } 45% { opacity: .75; transform: scale(.85); } 70% { opacity: .95; transform: scale(1.1); } }

/* ------------------------------------------------------------------ footer */
.foot { position: relative; z-index: 1; margin-top: 5rem; padding: 1rem 1.5rem 2.2rem; border-top: 1px solid var(--rule); text-align: center; font-size: 15px; color: var(--ink-2); }
.foot-name { display: flex; align-items: center; justify-content: center; gap: .5rem; flex-wrap: wrap; font-family: var(--f-sc); letter-spacing: .04em; margin: .5rem 0; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.2rem; margin: .5rem 0 1rem; }
.foot-links a { color: var(--ink-2); }
.motto { font-size: 15px; letter-spacing: .25em; color: var(--ink-3); margin: 0; overflow: hidden; white-space: nowrap; }

/* ------------------------------------------------------------------ crumbs */
.crumbs { font-family: var(--f-sc); font-size: 14px; letter-spacing: .04em; color: var(--ink-3); margin: 0 0 1.4rem; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .2rem; }
.crumbs li { display: inline-flex; align-items: center; }
.crumbs li + li::before { content: "›"; margin: 0 .45rem 0 .2rem; color: var(--rule-2); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--fire); }
.crumbs [aria-current] span { color: var(--ink); max-width: 30ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sib { border: 0; background: none; color: var(--ink-3); cursor: pointer; padding: 0 .3rem; font-size: .8em; border-radius: 4px; }
.sib:hover, .sib[aria-expanded="true"] { color: var(--fire); background: var(--paper-2); }
.pop {
  position: absolute; z-index: 60; min-width: 260px; max-width: min(420px, 92vw); max-height: 60vh; overflow: auto;
  background: var(--card); border: 1px solid var(--rule-2); border-radius: 10px; box-shadow: var(--shadow);
  padding: .4rem; font-family: var(--f-body); font-size: 16px; letter-spacing: 0;
}
.pop input { width: 100%; font: inherit; padding: .35rem .6rem; margin-bottom: .3rem; border: 1px solid var(--rule); border-radius: 6px; background: var(--paper); color: var(--ink); }
.pop a { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem .6rem; border-radius: 6px; color: var(--ink); text-decoration: none; line-height: 1.3; }
.pop a:hover, .pop a:focus { background: var(--hl); outline: none; }
.pop a[aria-current] { color: var(--fire); }
.pop a small { color: var(--ink-3); flex-shrink: 0; }
.pop .pop-h { font-family: var(--f-sc); font-size: 13px; color: var(--ink-3); padding: .3rem .6rem 0; letter-spacing: .05em; }

/* ------------------------------------------------------------------ badges */
.badge { display: inline-block; font-family: var(--f-sc); font-size: 12.5px; letter-spacing: .06em; line-height: 1; padding: .32em .6em .28em; border-radius: 3px; border: 1px solid var(--rule-2); color: var(--ink-2); background: var(--card); white-space: nowrap; vertical-align: .12em; }
.badge.t-good-works-translation { color: var(--seal-ink); background: var(--seal); border-color: var(--seal); }
.badge.t-source-text { color: var(--fire); border-color: color-mix(in srgb, var(--fire) 55%, transparent); }
.badge.t-introduction, .badge.t-reader-guide, .badge.t-syllabus, .badge.t-glossary { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 55%, transparent); }

/* ------------------------------------------------------------------ work layout */
.work-layout {
  display: grid;
  grid-template-columns: minmax(200px, 250px) minmax(0, calc(var(--measure) + 2px)) minmax(200px, 260px);
  justify-content: center;
  gap: clamp(28px, 4vw, 64px);
  padding: 2.6rem clamp(16px, 3vw, 40px) 2rem;
  max-width: 1500px;
  margin: 0 auto;
}
.work { min-width: 0; }
.rail { position: sticky; top: calc(var(--bar-h) + 1.6rem); align-self: start; max-height: calc(100vh - var(--bar-h) - 3rem); overflow-y: auto; overflow-x: hidden; font-size: 15px; line-height: 1.45; scrollbar-width: none; padding-bottom: 1rem; }
.rail::-webkit-scrollbar { display: none; }      /* the rails scroll by wheel and touch; no bars (Autumn, 2026-10-16) */
.fold > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: .5rem; user-select: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: "▸"; color: var(--ink-3); transition: transform .15s; }
.fold[open] > summary::before { transform: rotate(90deg); }
.fold > summary:hover, .fold > summary:hover::before { color: var(--fire); }
.fold:not([open]) > summary { border-bottom-color: transparent; }
.rail .badge { white-space: normal; max-width: 100%; }
.rail-h { font-family: var(--f-sc); font-weight: 400; font-size: 13.5px; letter-spacing: .08em; color: var(--ink-3); margin: 0 0 .6rem; padding-bottom: .4rem; border-bottom: 1px solid var(--rule); }
.rail-ed { padding-top: 0; }
.ed-note { color: var(--ink-2); font-style: italic; margin: .6rem 0 1rem; }
.rail-ed dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .45rem .8rem; margin: 0 0 1.2rem; }
.rail-ed dt { font-family: var(--f-sc); font-size: 12.5px; letter-spacing: .06em; color: var(--ink-3); padding-top: .15em; }
.rail-ed dd { margin: 0; color: var(--ink); overflow-wrap: break-word; }
:root[data-font="term"] .rail-ed dl { grid-template-columns: minmax(0, 1fr); gap: 0; }   /* the wide pixel font: each label above its value, full width */
:root[data-font="term"] .rail-ed dd { margin-bottom: .7rem; }
.witness { font-size: 14px; color: var(--ink-2); }
.ed-actions { display: flex; flex-direction: column; gap: .15rem; border-top: 1px solid var(--rule); padding-top: .8rem; }
.ed-actions > button, .ed-actions > a, .ed-actions summary, .dl > a, .dl > button {
  display: flex; align-items: center; gap: .55rem; width: 100%; text-align: left; border: 0; background: none; cursor: pointer;
  padding: .38rem .5rem; border-radius: 6px; color: var(--ink-2); text-decoration: none; font-size: 15px; list-style: none;
}
.ed-actions summary::-webkit-details-marker { display: none; }
.ed-actions > button:hover, .ed-actions > a:hover, .ed-actions summary:hover, .dl > a:hover, .dl > button:hover { background: var(--hl); color: var(--fire); }
.dl > a, .dl > button { padding-left: 2.2rem; }
.ed-actions .out::after { content: ""; }

.toc { list-style: none; padding: 0; margin: 0 0 1.4rem; }
.toc li { margin: 0; }
.toc a { display: block; padding: .22rem .6rem; border-left: 2px solid var(--rule); color: var(--ink-2); text-decoration: none; transition: border-color .15s, color .15s; }
.toc li.l3 a { padding-left: 1.35rem; font-size: 14px; }
.toc a:hover { color: var(--ink); border-left-color: var(--rule-2); }
.toc a.here { color: var(--fire); border-left-color: var(--fire); }
.parts { list-style: none; padding: 0; margin: 0 0 1.4rem; counter-reset: part; }
.parts li { counter-increment: part; }
.parts a { display: grid; grid-template-columns: 2em 1fr; gap: .3em; padding: .2rem .4rem; border-radius: 5px; color: var(--ink-2); text-decoration: none; font-size: 14px; }
.parts a::before { content: counter(part); color: var(--ink-3); text-align: right; font-variant-numeric: oldstyle-nums tabular-nums; }
.parts [aria-current] a { background: var(--hl); color: var(--fire); }
.toc-close { display: none; }

.title-block { text-align: center; margin: 0 0 2.4rem; }
.kicker { display: flex; justify-content: center; align-items: center; gap: .7rem; margin: 0 0 1rem; font-family: var(--f-sc); font-size: 14px; letter-spacing: .08em; color: var(--ink-3); }
.kicker .shelfname { color: var(--ink-3); text-decoration: none; }
.title-block h1 {
  font-family: var(--f-display); font-weight: 400; font-size: clamp(2.1rem, 1.3rem + 2.6vw, 3.4rem); line-height: 1.08;
  margin: 0 auto .5rem; max-width: 22ch; text-wrap: balance; letter-spacing: -.005em;
}
.title-block h1.part-h { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.5rem); }
.subtitle { font-style: italic; font-size: 1.18em; color: var(--ink-2); margin: .2rem auto .9rem; max-width: 36ch; text-wrap: balance; }
.meta { font-size: 15px; color: var(--ink-3); margin: .4rem 0 0; font-variant-numeric: oldstyle-nums; }
.views { display: inline-flex; margin-top: 1.4rem; border: 1px solid var(--rule-2); border-radius: 999px; padding: 3px; background: var(--card); font-size: 15px; }
.views button { border: 0; background: none; padding: .3rem .95rem; border-radius: 999px; cursor: pointer; color: var(--ink-2); display: inline-flex; gap: .4rem; align-items: center; }
.views button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.views button:hover:not([aria-pressed="true"]) { color: var(--fire); }

/* ------------------------------------------------------------------ the text */
.text { hanging-punctuation: first allow-end; overflow-wrap: break-word; }
.text p { margin: 0 0 .95em; text-wrap: pretty; }
:root[data-justify="on"] .text p { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.text h1, .text h2, .text h3, .text h4, .text h5 { font-weight: 400; line-height: 1.2; text-wrap: balance; }
.text h1 { font-family: var(--f-display); font-size: 2em; text-align: center; margin: 2.2em 0 .8em; }
.text h2 { font-family: var(--f-display); font-size: 1.55em; text-align: center; margin: 2.4em 0 1em; }
.text h2::after { content: "⟡"; display: block; font-size: .5em; color: var(--gold); margin-top: .5em; }
.text h3 { font-family: var(--f-sc); font-size: 1.12em; letter-spacing: .04em; color: var(--fire); margin: 2em 0 .7em; }
.text h4 { font-size: 1.04em; font-style: italic; margin: 1.6em 0 .5em; }
.text h5, .text h6 { font-size: 1em; font-variant: small-caps; margin: 1.4em 0 .4em; }
.sec-lead > h2:first-child { display: none; }
.text blockquote { margin: 1.4em 0; padding: .1em 0 .1em 1.4em; border-left: 2px solid color-mix(in srgb, var(--fire) 65%, transparent); color: var(--ink-2); }
.sec-lead > blockquote:first-of-type, .sec-head > blockquote:first-of-type { font-size: .93em; }
.text hr { border: 0; height: 1.6em; margin: 1.8em 0; position: relative; }
.text hr::after { content: "❧"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: var(--rule-2); font-size: 1.1em; }
.text ul, .text ol { padding-left: 1.5em; margin: 0 0 1em; }
.text li { margin: .25em 0; }
.text img { max-width: 100%; height: auto; display: block; margin: 1.4em auto; border-radius: 2px; cursor: zoom-in; }
.text figure { margin: 1.6em 0; text-align: center; }
.text figcaption { font-size: .85em; color: var(--ink-2); font-style: italic; }
.text code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .8em; background: var(--paper-2); padding: .1em .3em; border-radius: 3px; }
/* indented verse and inscriptions arrive as preformatted blocks: keep their spacing, read them as text */
.text pre { overflow: auto; background: none; padding: .2em 0 .2em 1.2em; border-left: 1px solid var(--rule-2); font-family: var(--f-body); font-size: .96em; line-height: var(--lh); white-space: pre-wrap; tab-size: 4; }
.text pre code { background: none; padding: 0; font-family: inherit; font-size: inherit; }
.table-wrap { overflow-x: auto; margin: 1.4em 0; border: 1px solid var(--rule); border-radius: 6px; }
.text table { border-collapse: collapse; width: 100%; font-size: .86em; line-height: 1.45; }
.text th, .text td { padding: .45em .7em; border-bottom: 1px solid var(--rule); vertical-align: top; text-align: left; }
.text th { font-family: var(--f-sc); font-weight: 400; letter-spacing: .03em; color: var(--ink-2); background: var(--paper-2); }
.text tr:last-child td { border-bottom: 0; }
.text sup { line-height: 0; }
.text a[href^="#"] { text-decoration-style: dotted; }
.wl-x { border-bottom: 1px dotted var(--ink-3); cursor: help; }
.callout { border: 1px solid var(--rule-2) !important; border-radius: 8px; padding: .9em 1.2em !important; background: var(--card); color: var(--ink) !important; box-shadow: var(--shadow); }
.callout-card p:last-child { margin-bottom: 0; }
.callout-card a { font-family: var(--f-sc); letter-spacing: .03em; }

/* sections */
.sec { position: relative; }
.sec-colophon, .sec-source-colophon, .sec-notes { font-size: .9em; color: var(--ink-2); }
.sec-colophon > h2, .sec-source-colophon > h2 { font-size: 1.3em; }
.sec-source {
  margin: 3em calc(-1 * clamp(0px, 2vw, 28px)) 2em;
  padding: .4em clamp(16px, 2vw, 28px) 1.2em;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 10px;
}
.sec-source::before {
  content: "Source"; position: absolute; top: -.75em; left: 1.4em; padding: .05em .7em; border-radius: 4px;
  font-family: var(--f-sc); font-size: 13px; letter-spacing: .1em; color: var(--seal-ink); background: var(--seal);
}
.sec-source p { font-size: 1.04em; }
.sec-source:lang(und) { font-feature-settings: normal; }

/* gutenberg-era markup carried by archival texts */
.pagenum, .pagenumr, .pagenuml { float: right; margin: .15em -0.5em 0 1em; font-size: .62em; font-style: normal; color: var(--ink-3); font-variant: small-caps; letter-spacing: .04em; user-select: none; }
.pagenuml { float: left; margin: .15em 1em 0 -.5em; }
.allsmcap { font-variant: all-small-caps; }
.smcap, .sc { font-variant: small-caps; }
.center, .tdc { text-align: center; }
.tdr { text-align: right; }
.nowrap { white-space: nowrap; }
.poetry-container { text-align: center; margin: 1.4em 0; }
.poetry { display: inline-block; text-align: left; }
.stanza { margin: 1em 0; }
.verse, .line, .poetry .verse { padding-left: 2.5em; text-indent: -2.5em; }
.indent0 { margin-left: 0; } .indent2 { margin-left: 1em; } .indent4 { margin-left: 2em; }
.footnote { font-size: .86em; color: var(--ink-2); margin: .6em 0; padding-left: 1.2em; border-left: 1px solid var(--rule); }
.fnanchor, .footnote-ref a { font-size: .72em; vertical-align: super; line-height: 0; text-decoration: none; padding: 0 .1em; }
.footnotes { font-size: .86em; color: var(--ink-2); border-top: 1px solid var(--rule); margin-top: 3em; padding-top: 1em; }
.parallell { float: left; width: 48%; } .parallelr { float: right; width: 48%; }
.titlepage { text-align: center; }
.blackletter { font-family: var(--f-black); }

/* paragraph marks */
.pmark { position: absolute; left: -2.6em; width: 2.2em; text-align: right; font-size: .7em; line-height: inherit; color: var(--ink-3); opacity: 0; text-decoration: none; transition: opacity .15s; font-variant-numeric: oldstyle-nums; user-select: none; }
.text p:hover > .pmark, .pmark:focus { opacity: 1; }
.text p { position: relative; }
.flash { animation: flash 2.4s ease-out; }
@keyframes flash { 0%, 40% { background: var(--mark); box-shadow: 0 0 0 .35em var(--mark); } 100% { background: transparent; box-shadow: 0 0 0 .35em transparent; } }
mark { background: var(--mark); color: inherit; border-radius: 2px; padding: 0 .05em; }

/* pager */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 4rem; padding-top: 1.6rem; border-top: 1px solid var(--rule); font-size: 16px; }
.pager a { display: flex; flex-direction: column; gap: .2rem; padding: .8rem 1rem; border: 1px solid var(--rule); border-radius: 8px; text-decoration: none; color: var(--ink); background: var(--card); line-height: 1.3; transition: border-color .15s, transform .15s; }
.pager a:hover { border-color: var(--fire); transform: translateY(-1px); }
.pager small { font-family: var(--f-sc); color: var(--ink-3); letter-spacing: .06em; font-size: 13px; }
.pager .next { grid-column: 2; text-align: right; }

.reading-tools { position: fixed; right: 18px; bottom: 18px; z-index: 30; display: none; flex-direction: column; gap: .4rem; }
.reading-tools button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--rule-2); background: var(--card); color: var(--ink-2); box-shadow: var(--shadow); cursor: pointer; display: grid; place-items: center; }
.reading-tools button:hover { color: var(--fire); border-color: var(--fire); }
.reading-tools .ic { width: 20px; height: 20px; }

.view-source .text > .sec:not(.sec-source):not(.sec-source-colophon):not(.sec-head) { display: none; }
.view-source .sec-source { margin-top: 0; }

/* ------------------------------------------------------------------ folder + home */
.folder-layout, .search-page, .home, .plain-page, .about-page, .nf { max-width: 1240px; margin: 0 auto; padding: 2.4rem clamp(16px, 3vw, 40px) 2rem; }
.plain-page, .about-page, .nf { max-width: 760px; }
.folder-head { text-align: center; margin: .6rem 0 2rem; }
.folder-head h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.3rem, 1.4rem + 3vw, 3.8rem); margin: .2rem 0 .4rem; line-height: 1.05; }
.folder-head .shelf-icon, .folder-head .shelf-sigil { width: 64px; height: 64px; font-size: 40px; margin: 0 auto .4rem; }
.folder-desc { font-style: italic; color: var(--ink-2); max-width: 46ch; margin: .3rem auto; text-wrap: balance; }
.folder-stats { font-size: 15px; color: var(--ink-3); margin: .4rem 0 0; }
.folder-note { max-width: var(--measure); margin: 0 auto 2.5rem; }
.band-h { font-family: var(--f-sc); font-weight: 400; font-size: 15px; letter-spacing: .1em; color: var(--ink-3); margin: 0 0 1rem; display: flex; align-items: baseline; gap: .6rem; }
.band-h .n { font-family: var(--f-body); letter-spacing: 0; color: var(--ink-3); font-size: 14px; }
.doorways { margin: 0 0 2.8rem; }
.door-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.tongue .door-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }   /* a lone doorway keeps a card's width */
.door { display: flex; flex-direction: column; gap: .35rem; padding: 1.1rem 1.2rem 1.2rem; border-radius: 10px; text-decoration: none; color: var(--ink); background: linear-gradient(160deg, var(--card), var(--paper-2)); border: 1px solid var(--rule-2); box-shadow: var(--shadow); position: relative; overflow: hidden; transition: transform .2s, border-color .2s; }
.door::after { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--fire) 18%, transparent), transparent 70%); }
.door:hover { transform: translateY(-2px); border-color: var(--fire); }
.door-kind { font-family: var(--f-sc); font-size: 13px; letter-spacing: .1em; color: var(--fire); }
.door-title { font-family: var(--f-display); font-size: 1.3rem; line-height: 1.15; }
.door-desc { font-size: 15px; color: var(--ink-2); line-height: 1.4; }
.shelves { margin: 0 0 2.8rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .9rem; }
.card { display: flex; flex-direction: column; gap: .3rem; padding: 1rem 1.1rem 1.1rem; border: 1px solid var(--rule); border-radius: 10px; background: var(--card); color: var(--ink); text-decoration: none; transition: border-color .18s, transform .18s, box-shadow .18s; min-height: 8.5rem; }
.card:hover { border-color: var(--rule-2); transform: translateY(-2px); box-shadow: var(--shadow); }
.card:hover .card-name { color: var(--fire); }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: .2rem; }
.card-count { font-size: 14px; color: var(--ink-3); font-variant-numeric: oldstyle-nums tabular-nums; }
.card-name { font-family: var(--f-display); font-size: 1.32rem; line-height: 1.15; transition: color .18s; }
.card-desc { font-size: 15px; color: var(--ink-2); line-height: 1.42; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.shelf-icon { width: 30px; height: 30px; object-fit: contain; display: block; }
.shelf-sigil { width: 30px; height: 30px; display: grid; place-items: center; font-family: var(--f-black); font-size: 21px; line-height: 1; color: var(--fire); border: 1px solid color-mix(in srgb, var(--fire) 40%, transparent); border-radius: 50%; background: color-mix(in srgb, var(--fire) 6%, transparent); }
.works-head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.2rem; margin-bottom: 1rem; }
.works-head .band-h { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip { border: 1px solid var(--rule-2); background: var(--card); color: var(--ink-2); border-radius: 999px; padding: .12rem .75rem; font-size: 14px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.sort { margin-left: auto; font-size: 14px; color: var(--ink-3); display: inline-flex; gap: .4rem; align-items: center; }
.sort select { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--rule-2); border-radius: 6px; padding: .1rem .4rem; }
.rows { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .1rem 1.4rem; padding: .75rem .2rem; border-bottom: 1px solid var(--rule); }
.row > a { text-decoration: none; color: var(--ink); font-size: 1.08em; line-height: 1.3; }
.row > a:hover .row-title { color: var(--fire); }
.row-meta { font-size: 14px; color: var(--ink-3); display: flex; gap: .5rem; align-items: center; justify-content: flex-end; white-space: nowrap; }
.row-desc { grid-column: 1 / -1; font-size: 15.5px; color: var(--ink-2); line-height: 1.45; max-width: 90ch; }
.row[hidden] { display: none; }

.home .masthead { text-align: center; padding: 2.2rem 0 1.4rem; }
.dateline { font-family: var(--f-sc); letter-spacing: .14em; font-size: 14px; color: var(--ink-3); margin: 0 0 .8rem; }
.home h1.blackletter { font-weight: 400; font-size: clamp(3rem, 1.4rem + 6.4vw, 7rem); line-height: .95; margin: 0; color: var(--ink); letter-spacing: .005em; text-shadow: 0 1px 0 color-mix(in srgb, var(--paper) 80%, white); }
.lede { font-style: italic; font-size: 1.2em; color: var(--ink-2); margin: 1rem auto .2rem; max-width: 38ch; text-wrap: balance; }
.bigsearch {
  display: flex; align-items: center; gap: .8rem; width: min(640px, 100%); margin: .8rem auto 1.2rem; padding: .85rem 1rem .85rem 1.3rem;
  border: 1px solid var(--rule-2); border-radius: 999px; background: var(--card); color: var(--ink-3); font-size: 1.05em; cursor: text; box-shadow: var(--shadow); text-align: left;
  transition: border-color .2s, box-shadow .2s;
}
.bigsearch:hover { border-color: var(--fire); }
.bigsearch span:not(.ic) { flex: 1; font-style: italic; }
.bigsearch .ic { width: 1.3em; height: 1.3em; color: var(--fire); }
.stats { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 2rem; padding: 0; margin: 0; font-size: 15px; color: var(--ink-3); }
.stats b { font-family: var(--f-display); font-weight: 400; font-size: 1.6em; color: var(--ink); margin-right: .3rem; font-variant-numeric: oldstyle-nums; }
.continue { margin: 2rem 0; }
.continue ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; }
.continue a { display: block; padding: .8rem 1rem; border: 1px solid var(--rule); border-left: 3px solid var(--fire); border-radius: 8px; background: var(--card); color: var(--ink); text-decoration: none; line-height: 1.3; }
.continue small { display: block; color: var(--ink-3); font-size: 13.5px; margin-top: .3rem; }
.home-cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 3rem; margin-top: 2.4rem; }
.shelf-filter input { font: inherit; font-size: 15px; padding: .3rem .8rem; border: 1px solid var(--rule-2); border-radius: 999px; background: var(--card); color: var(--ink); width: 200px; }
.home-side { display: flex; flex-direction: column; gap: 2rem; }
.side-box { border-top: 2px solid var(--ink); padding-top: .9rem; }
.side-links { list-style: none; padding: 0; margin: 0; }
.side-links li { margin: 0 0 .9rem; line-height: 1.3; }
.side-links a { font-family: var(--f-display); font-size: 1.2rem; text-decoration: none; color: var(--ink); }
.side-links a:hover { color: var(--fire); }
.side-links span { display: block; font-size: 14.5px; color: var(--ink-2); }
.recent ol { list-style: none; padding: 0; margin: 0; }
.recent li { margin: 0 0 1rem; font-size: 15px; line-height: 1.4; }
.recent time { display: block; font-family: var(--f-sc); font-size: 12.5px; letter-spacing: .08em; color: var(--fire); }
.recent .more a { font-family: var(--f-sc); font-size: 14px; letter-spacing: .05em; }

/* ------------------------------------------------------------------ overlays */
.veil { position: fixed; inset: 0; z-index: 80; background: var(--veil); backdrop-filter: blur(2px); display: none; }
.veil.on { display: block; animation: fade .18s ease-out; }
@keyframes fade { from { opacity: 0; } }
.dialog {
  position: fixed; z-index: 90; left: 50%; top: 9vh; transform: translateX(-50%); width: min(720px, 94vw); max-height: 80vh; overflow: auto;
  background: var(--card); border: 1px solid var(--rule-2); border-radius: 14px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .5); padding: 1rem 1.2rem 1.2rem;
  display: none; font-size: 17px;
}
.dialog.on { display: block; animation: rise .2s ease-out; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 8px); } }
.dialog h2 { font-family: var(--f-sc); font-weight: 400; font-size: 15px; letter-spacing: .1em; color: var(--ink-3); margin: .2rem 0 .9rem; }
.dialog .x { position: absolute; right: .7rem; top: .6rem; border: 0; background: none; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--ink-3); }
.sq { display: flex; align-items: center; gap: .7rem; border-bottom: 1px solid var(--rule); padding: 0 0 .7rem; margin-bottom: .5rem; }
.sq .ic { color: var(--fire); width: 1.3em; height: 1.3em; }
.sq input { flex: 1; border: 0; background: none; font: inherit; font-size: 1.25em; color: var(--ink); outline: none; }
.sres { list-style: none; padding: 0; margin: 0; }
.sres li a { display: block; padding: .6rem .7rem; border-radius: 8px; text-decoration: none; color: var(--ink); }
.sres li a:hover, .sres li a.sel { background: var(--hl); }
.sres .st { font-family: var(--f-display); font-size: 1.12em; line-height: 1.2; }
.sres .sc { font-family: var(--f-sc); font-size: 12.5px; letter-spacing: .06em; color: var(--ink-3); display: block; margin: .1rem 0 .2rem; }
.sres .sx { font-size: 15px; color: var(--ink-2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sfoot { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--ink-3); margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--rule); }
.sempty { color: var(--ink-3); font-style: italic; padding: .6rem .7rem; }

.settings { left: auto; right: clamp(10px, 3vw, 32px); top: calc(var(--bar-h) + 8px); transform: none; width: 340px; }
.settings.on { animation: none; }
.set-row { margin: 0 0 1rem; }
.set-row > span { display: block; font-family: var(--f-sc); font-size: 13px; letter-spacing: .08em; color: var(--ink-3); margin-bottom: .35rem; }
.seg { display: flex; border: 1px solid var(--rule-2); border-radius: 8px; overflow: hidden; }
.seg button { flex: 1; border: 0; background: none; padding: .35rem .3rem; cursor: pointer; color: var(--ink-2); font-size: 15px; }
.seg button + button { border-left: 1px solid var(--rule); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.seg .f-g { font-family: "EB Garamond", serif; } .seg .f-f { font-family: "IM Fell English", serif; } .seg .f-h { font-family: "Atkinson Hyperlegible", sans-serif; }

.cite-tabs { display: flex; gap: .3rem; margin-bottom: .7rem; }
.cite-tabs button { border: 1px solid var(--rule-2); background: none; border-radius: 999px; padding: .15rem .8rem; cursor: pointer; color: var(--ink-2); font-size: 14px; }
.cite-tabs button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.cite-out { font-size: 16px; line-height: 1.5; background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; padding: .8rem 1rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.cite-out.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; }
.btn { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--rule-2); background: var(--card); color: var(--ink); border-radius: 8px; padding: .35rem .9rem; cursor: pointer; font-size: 15px; text-decoration: none; }
.btn:hover { border-color: var(--fire); color: var(--fire); }
.btn.primary { background: var(--seal); color: var(--seal-ink); border-color: var(--seal); }
.btn-row { display: flex; gap: .5rem; margin-top: .8rem; flex-wrap: wrap; }
.small { font-size: 14px; color: var(--ink-3); }
.keys { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; font-size: 16px; }

.selbar { position: absolute; z-index: 70; display: none; gap: 2px; padding: 3px; background: var(--ink); border-radius: 999px; box-shadow: 0 8px 24px -10px rgba(0, 0, 0, .6); transform: translate(-50%, -100%); }
.selbar.on { display: flex; }
.selbar button { border: 0; background: none; color: var(--paper); font-size: 14px; padding: .25rem .75rem; border-radius: 999px; cursor: pointer; }
.selbar button:hover { background: color-mix(in srgb, var(--paper) 18%, transparent); }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 95; background: var(--ink); color: var(--paper); padding: .5rem 1rem; border-radius: 999px; font-size: 15px; box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .6); display: none; }
.toast.on { display: block; animation: rise2 .2s ease-out; }
.toast button { border: 0; background: none; color: var(--fire-2); text-decoration: underline; cursor: pointer; margin-left: .6rem; }
@keyframes rise2 { from { opacity: 0; transform: translate(-50%, 8px); } }
.fnpop { position: absolute; z-index: 75; max-width: min(440px, 90vw); background: var(--card); border: 1px solid var(--rule-2); border-radius: 10px; box-shadow: var(--shadow); padding: .7rem .9rem; font-size: 15.5px; line-height: 1.45; color: var(--ink); }
.fnpop p:last-child { margin-bottom: 0; }
.zoom { position: fixed; inset: 0; z-index: 99; background: rgba(10, 8, 6, .88); display: grid; place-items: center; cursor: zoom-out; }
.zoom img { max-width: 94vw; max-height: 92vh; object-fit: contain; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }

/* search page */
.sp-form { max-width: 760px; margin: 0 auto 2rem; }
.sp-form input { width: 100%; font: inherit; font-size: 1.3em; padding: .7rem 1.2rem; border: 1px solid var(--rule-2); border-radius: 999px; background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.sp-body { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 2.4rem; }
.sp-filters { font-size: 15px; }
.sp-filters fieldset { border: 0; padding: 0; margin: 0 0 1.4rem; }
.sp-filters legend { font-family: var(--f-sc); font-size: 13px; letter-spacing: .08em; color: var(--ink-3); margin-bottom: .4rem; }
.sp-filters label { display: flex; gap: .45rem; align-items: baseline; padding: .12rem 0; cursor: pointer; color: var(--ink-2); }
.sp-filters label small { margin-left: auto; color: var(--ink-3); }
.sp-filters .more { border: 0; background: none; color: var(--link); cursor: pointer; padding: .2rem 0; font-size: 14px; }
.sp-count { font-size: 15px; color: var(--ink-3); margin: 0 0 1rem; }
.sp-results .sres li { border-bottom: 1px solid var(--rule); }
.sp-results .sub { display: block; font-size: 14.5px; color: var(--ink-2); padding: .15rem 0 .15rem 1rem; border-left: 2px solid var(--rule); margin: .3rem 0 0 .7rem; text-decoration: none; }
.sp-results .sub:hover { border-left-color: var(--fire); }

/* ------------------------------------------------------------------ focus mode */
:root.focus .bar, :root.focus .rail, :root.focus .foot, :root.focus .crumbs, :root.focus .pager { opacity: 0; pointer-events: none; }
:root.focus .bar { transform: translateY(-100%); }
:root.focus .rail { visibility: hidden; }
:root.focus .reading-tools { opacity: .35; }
:root.focus .reading-tools:hover { opacity: 1; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1240px) {
  .work-layout { grid-template-columns: minmax(0, calc(var(--measure) + 2px)) minmax(200px, 250px); }
  .rail-ed { position: static; grid-column: 1; grid-row: 2; max-height: none; padding-top: 0; border-top: 1px solid var(--rule); margin-top: 1rem; padding-top: 1.4rem; }
  .work { grid-row: 1; }
  .rail-toc { grid-column: 2; grid-row: 1; }
  
  
}
@media (max-width: 960px) {
  .barnav { display: none; }
  .work-layout { grid-template-columns: minmax(0, 1fr); padding-top: 1.6rem; }
  .rail-toc {
    position: fixed; right: 0; top: 0; bottom: 0; width: min(340px, 88vw); max-height: none; z-index: 85; background: var(--card);
    border-left: 1px solid var(--rule-2); padding: 1.2rem 1rem; transform: translateX(105%); transition: transform .25s ease; box-shadow: -20px 0 50px -30px rgba(0, 0, 0, .5);
  }
  .rail-toc.on { transform: none; }
  .toc-close { display: block; position: absolute; right: .6rem; top: .4rem; border: 0; background: none; font-size: 1.6rem; color: var(--ink-3); cursor: pointer; }
  .reading-tools { display: flex; }
  .rail-ed { grid-column: 1; }
  .home-cols { grid-template-columns: 1fr; }
  .sp-body { grid-template-columns: 1fr; }
  
  
  
  
}
@media (max-width: 640px) {
  :root { --fs: 18.5px; --bar-h: 52px; }
  :root[data-size="l"] { --fs: 20.5px; }
  :root[data-size="xl"] { --fs: 23px; }
  :root[data-size="s"] { --fs: 17px; }
  .bar { gap: .5rem; }
  .wordmark { font-size: 1.15rem; }
  .searchbox { display: none; }
  .tool[data-open="search"] { display: grid; }
  .tools { margin-left: auto; }
  .row { grid-template-columns: 1fr; }
  .row-meta { justify-content: flex-start; flex-wrap: wrap; white-space: normal; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: 1; }
  .settings { right: 8px; left: 8px; width: auto; }
  .pmark { display: none; }
  .sec-source { margin-left: -8px; margin-right: -8px; }
  .shelf-filter input { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ------------------------------------------------------------------ print */
@media print {
  :root { --paper: #fff; --ink: #000; --ink-2: #222; --ink-3: #555; --rule: #bbb; --fire: #000; --link: #000; --card: #fff; --paper-2: #f4f4f4; }
  body::before, body::after, .bar, .thread, .rail, .foot, .reading-tools, .views, .crumbs, .pager, .pmark, .selbar, .toast { display: none !important; }
  .work-layout { display: block; padding: 0; }
  body { font-size: 11.5pt; }
  .title-block h1 { font-size: 24pt; }
  .text a { text-decoration: none; }
  .sec-source { break-before: page; background: none; border: 0; }
  .work::after { content: "From the Good Works Library, " attr(data-print-url); display: block; margin-top: 2em; font-size: 9pt; color: #555; }
}
.fn-orphan { font-family: var(--f-sc); font-size: .72em; color: var(--ink-3); vertical-align: super; line-height: 0; margin-right: .2em; }

/* ------------------------------------------------------------------ source numbers, concordance */
.smark { left: -3.2em; width: 2.9em; font-family: var(--f-sc); letter-spacing: .02em; }
.sec-source [data-s] { position: relative; }

.sanchor { position: relative; top: calc(-1 * var(--bar-h) - 20px); }

.kws { display: flex; flex-direction: column; }
.kw { display: grid; grid-template-columns: 1fr auto 1fr; grid-template-rows: auto auto; column-gap: .15em; align-items: baseline; padding: .35rem .4rem; border-radius: 6px; text-decoration: none; color: var(--ink-2); font-size: 17px; }
.kw:hover { background: var(--hl); }
.kw .kl { text-align: right; overflow: hidden; white-space: nowrap; direction: rtl; unicode-bidi: plaintext; }
.kw .kr { overflow: hidden; white-space: nowrap; }
.kw b { color: var(--fire); font-weight: 600; }
.kw small { grid-column: 1 / -1; font-size: 12.5px; color: var(--ink-3); font-family: var(--f-sc); letter-spacing: .04em; }
.conc-page .kw { font-size: 19px; border-bottom: 1px solid var(--rule); border-radius: 0; }
.conc-page .kws { max-width: 860px; margin: 0 auto; }
.cc-cloud { display: flex; flex-wrap: wrap; gap: .3rem .5rem; font-size: 1.6rem; max-width: 860px; margin: 0 auto; }
.cc-cloud a { text-decoration: none; color: var(--ink); padding: .1rem .4rem; border-radius: 6px; font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif; }
.cc-cloud a:hover { background: var(--hl); color: var(--fire); }
.conc-page .sp-count { text-align: center; }
.cc-note { max-width: 640px; margin: 2rem auto 0; text-align: center; }

.py { color: var(--fire); font-style: italic; }

.cc-tools { display: flex; justify-content: center; align-items: center; gap: 1rem; margin: 0 0 1rem; font-size: 15px; color: var(--ink-3); }
.cc-tools select { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--rule-2); border-radius: 6px; padding: .1rem .4rem; }

/* ------------------------------------------------------------------ aligned + interlinear */
.work-layout.aligned-on { grid-template-columns: minmax(0, 1fr) minmax(180px, 230px); max-width: 1640px; }
.work-layout.aligned-on .rail-ed { display: none; }
.aligned-on .text > .sec:not(.sec-colophon):not(.sec-source-colophon):not(.sec-notes) { display: none; }
.al-wrap { position: relative; margin: 0 0 3rem; }
.al-wrap .al-prov { font-size: 14px; color: var(--ink-3); font-style: italic; text-align: center; max-width: 70ch; margin: 0 auto 1.4rem; padding: .5rem 1rem; border: 1px dashed var(--rule-2); border-radius: 8px; }

.al-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(36px, 5vw, 84px); padding: .7rem 0; border-bottom: 1px solid color-mix(in srgb, var(--rule) 60%, transparent); }
.al-row.al-solo { opacity: .78; }

.al-row.al-solo .al-line + .al-line { margin-top: .6em; }

.al-line + .al-line { margin-top: .25em; }
.al-wrap .w { border-radius: 3px; cursor: pointer; transition: background .12s, box-shadow .12s, color .12s; box-shadow: 0 1px 0 color-mix(in srgb, var(--fire) 22%, transparent); }
.al-wrap .w:hover { background: var(--hl); }
.al-wrap .w.lit { background: color-mix(in srgb, var(--fire) 20%, transparent); color: var(--ink); box-shadow: 0 0 0 2px color-mix(in srgb, var(--fire) 30%, transparent); }
.al-wrap .w.lit-me { background: color-mix(in srgb, var(--gold) 34%, transparent); }

@keyframes thread { to { stroke-dashoffset: 0; } }
.il-row { padding: .4rem 0; }
.il-line { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .55rem .2rem; line-height: 1.3; margin: .2rem 0 .5rem; }
.il-w { display: inline-flex; flex-direction: column; align-items: center; padding: .1rem .3rem; border-radius: 6px; }
.il-w:hover { background: var(--hl); }
.il-src { font-size: 1.12em; }
.il-gl { font-size: .62em; color: var(--fire); font-style: italic; text-align: center; max-width: 11em; line-height: 1.15; margin-top: .15em; }
.il-none .il-gl { color: var(--ink-3); opacity: .5; font-style: normal; }
.il-tr { color: var(--ink-2); font-style: italic; border-left: 2px solid color-mix(in srgb, var(--fire) 50%, transparent); padding-left: .9rem; margin: .2rem 0 .4rem; font-size: .95em; }
@media (max-width: 960px) {
  
  .al-row { grid-template-columns: 1fr; }
  
}

/* ------------------------------------------------------------------ worlds */
.badge.t-world { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 55%, transparent); }
.badge.t-tongue { color: var(--fire); border-color: color-mix(in srgb, var(--fire) 50%, transparent); }
.world-card .w-years { font-family: var(--f-sc); font-size: 13px; letter-spacing: .06em; color: var(--fire); }
.w-epoch { font-style: italic; color: var(--ink-2); font-size: 15.5px; }
.w-desc { font-size: 1.12em; font-style: italic; color: var(--ink-2); text-align: center; max-width: 56ch; margin: -1rem auto 2.4rem; text-wrap: balance; }
.world-text .w-cat { font-family: var(--f-sc); font-size: 13px; letter-spacing: .14em; color: var(--fire); text-align: center; margin: 3.4em 0 -1.6em; }
.world-text h2 { margin-top: 2em; }
.world-text blockquote { font-style: italic; }
.world-text blockquote cite { display: block; font-style: normal; font-size: .82em; color: var(--ink-3); margin-top: .4em; }
.w-preview { margin: 2em 0; padding: 1.1em 1.3em .6em; border: 1px solid var(--rule-2); border-left: 3px solid var(--gold); border-radius: 10px; background: var(--card); box-shadow: var(--shadow); font-size: .95em; }
.w-preview .w-trad { font-family: var(--f-sc); font-size: 12.5px; letter-spacing: .1em; color: var(--gold); margin: 0 0 .4em; }
.w-preview .w-read { font-family: var(--f-sc); letter-spacing: .04em; }
.w-figs { list-style: none; padding: 0; margin: 0 0 1.2rem; }
.w-figs li { margin: 0 0 .8rem; line-height: 1.35; }
.w-figs b { display: block; font-weight: 500; color: var(--ink); }
.w-figs span { display: block; font-size: 14px; color: var(--ink-2); }
.w-figs small { color: var(--ink-3); font-size: 12.5px; }
.w-list { list-style: none; padding: 0; margin: 0 0 1.4rem; font-size: 14.5px; }
.w-list li { margin: .3rem 0; }
.w-list .soon { color: var(--ink-3); }

/* ------------------------------------------------------------------ tongues */
.tongue-head .t-native { font-size: 1.3em; color: var(--ink-2); margin: .1rem 0 .4rem; }
.t-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem; margin: 0 auto 2.2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--rule); font-family: var(--f-sc); font-size: 14.5px; letter-spacing: .04em; }
.t-tabs a { padding: .3rem .8rem; border-radius: 999px; color: var(--ink-2); text-decoration: none; border: 1px solid transparent; }
.t-tabs a:hover { border-color: var(--rule-2); color: var(--fire); }
.t-tabs a[aria-current] { background: var(--ink); color: var(--paper); }
.t-grid { display: grid; grid-template-columns: minmax(0, var(--measure)) 300px; gap: 3rem; justify-content: center; }
.t-side { font-size: 15px; }
.t-facts { display: grid; grid-template-columns: auto 1fr; gap: .45rem .9rem; margin: 0 0 1.6rem; padding: 1rem 1.1rem; border: 1px solid var(--rule); border-radius: 10px; background: var(--card); }
.t-facts dt { font-family: var(--f-sc); font-size: 12.5px; letter-spacing: .06em; color: var(--ink-3); padding-top: .15em; }
.t-facts dd { margin: 0; }
.t-sec { max-width: 1100px; margin: 2.6rem auto 0; }
.t-texts { list-style: none; padding: 0; margin: 0; columns: 2 320px; column-gap: 2.4rem; font-size: 16px; }
.t-texts li { break-inside: avoid; padding: .3rem 0; border-bottom: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 1rem; }
.t-texts small { color: var(--ink-3); font-size: 13px; white-space: nowrap; }
.t-top a { font-family: var(--f-body); font-size: 1.05rem; }
.t-doc { max-width: var(--measure); margin: 0 auto; }
.t-intro { text-align: center; font-style: italic; color: var(--ink-2); max-width: 60ch; margin: -1rem auto 1.6rem; }
.t-doc strong { color: var(--fire); font-weight: 600; }
.t-doc table { font-size: .9em; }
.prov-note { max-width: 72ch; margin: 0 auto 1.4rem; font-size: 14px; color: var(--ink-3); font-style: italic; text-align: center; padding: .5rem 1rem; border: 1px dashed var(--rule-2); border-radius: 8px; }
.dict td.d-sign { font-size: 1.5em; line-height: 1; }
.dict td.d-word { white-space: nowrap; font-weight: 600; }
.dict small { color: var(--ink-3); }
.signs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .8rem; }
.sign { display: flex; flex-direction: column; gap: .2rem; padding: .9rem 1rem; border: 1px solid var(--rule); border-radius: 10px; background: var(--card); }
.sign-glyph { font-size: 2.6rem; line-height: 1.1; color: var(--ink); }
.sign small { color: var(--ink-3); }
.sign-vals { font-size: 14.5px; color: var(--fire); }
.sign-note { font-size: 13.5px; color: var(--ink-2); line-height: 1.35; }
.challenges { display: grid; gap: 1rem; max-width: 900px; margin: 1.6rem auto 0; }
.challenge { border: 1px solid var(--rule); border-radius: 10px; padding: 1rem 1.2rem; background: var(--card); }
.challenge h3 { font-family: var(--f-display); font-weight: 400; margin: .2rem 0 .5rem; }
.challenge .ch-lines { font-size: 1.15em; }
.challenge summary { cursor: pointer; color: var(--fire); font-family: var(--f-sc); letter-spacing: .04em; }

/* exercises */
.ex-sec { max-width: var(--measure); }
.ex-progress { text-align: center; }
.ex-list { padding-left: 1.6rem; margin: 0; }
.ex-item { margin: 0 0 1.3rem; padding: .7rem 1rem .5rem; border: 1px solid var(--rule); border-radius: 10px; background: var(--card); }
.ex-item.ex-done { border-color: color-mix(in srgb, var(--gold) 60%, transparent); }
.ex-item.ex-done::marker { color: var(--gold); }
.ex-prompt { font-family: var(--f-sc); font-size: 13.5px; letter-spacing: .06em; color: var(--ink-3); margin: 0 0 .3rem; }
.ex-sign { font-size: 2.8rem; margin: 0; line-height: 1.1; }
.ex-q { font-size: 1.15em; margin: 0 0 .5rem; }
.ex-opts { display: flex; flex-wrap: wrap; gap: .35rem; margin: .3rem 0 .4rem; }
.ex-row { display: flex; gap: .4rem; flex-wrap: wrap; }
.ex-row input { flex: 1; min-width: 200px; font: inherit; padding: .35rem .7rem; border: 1px solid var(--rule-2); border-radius: 8px; background: var(--paper); color: var(--ink); }
.btn.ghost { background: none; }
.ex-fb { font-size: 15px; margin: .4rem 0 0; min-height: 1em; color: var(--ink-2); }
.ex-fb.ok { color: color-mix(in srgb, var(--gold) 80%, var(--ink)); }
.ex-fb.no { color: var(--fire); }
.provenance table td { font-size: 14px; }
@media (max-width: 960px) { .t-grid { grid-template-columns: 1fr; } }
.tongue-card .t-native { font-size: 1.05rem; color: var(--ink-2); }
.tongue-card .t-family { font-family: var(--f-sc); font-size: 12.5px; letter-spacing: .05em; color: var(--ink-3); line-height: 1.35; }
.tongue-card .t-count { color: var(--fire); font-size: 13.5px; }
.lookup-out { max-width: 820px; margin: 0 auto; }
.lk { border-bottom: 1px solid var(--rule); padding: .8rem 0; }
.lk-w { margin: 0 0 .3rem; font-size: 1.08em; }
.lk-d { margin: .15rem 0; color: var(--ink-2); font-size: .95em; }
.lk-of { color: var(--fire); font-style: italic; font-size: .92em; margin: .2rem 0; }
.lk-br { list-style: none; padding: 0; margin: .3rem 0; font-size: .92em; }
.lk-br li { margin: .2rem 0; }
.lk-fam { font-family: var(--f-sc); font-size: 12px; letter-spacing: .06em; color: var(--ink-3); display: inline-block; min-width: 7.5em; }
.nmap { position: relative; border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; background: var(--card); }
.nmap-svg { width: 100%; height: auto; display: block; cursor: grab; }
.nm-links line { stroke: var(--rule-2); stroke-opacity: .55; }
.nm-node circle { fill: var(--fire); fill-opacity: .75; stroke: var(--paper); stroke-width: 1; cursor: pointer; }
.nm-node.nm-strong circle { fill: var(--gold); }
.nm-node text { font-size: 9px; fill: var(--ink-2); pointer-events: none; font-family: var(--f-body); }
.nmap-card { position: absolute; right: 12px; top: 12px; width: min(380px, 80%); max-height: 70%; overflow: auto; background: var(--paper); border: 1px solid var(--rule-2); border-radius: 10px; padding: .4rem 1rem; box-shadow: var(--shadow); display: none; font-size: 15px; }
.nmap-card.on { display: block; }
.ways { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; margin: 1.6rem 0 1rem; }
@media (max-width: 1200px) { .ways { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.way { position: relative; display: flex; flex-direction: column; gap: .25rem; padding: 1.2rem 1.3rem 1.3rem; border: 1px solid var(--rule-2); border-radius: 12px; text-decoration: none; color: var(--ink); background: linear-gradient(155deg, var(--card), var(--paper-2)); overflow: hidden; transition: transform .2s, border-color .2s; }
.way::before { content: ""; position: absolute; inset: auto -40px -60px auto; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--fire) 16%, transparent), transparent 70%); }
.way:hover { transform: translateY(-3px); border-color: var(--fire); }
.way-k { font-family: var(--f-black); font-size: 2rem; line-height: 1; color: var(--fire); }
.way-t { font-family: var(--f-display); font-size: 1.25rem; }
.way-d { font-size: 15px; color: var(--ink-2); line-height: 1.4; }
@media (max-width: 960px) { .ways { grid-template-columns: 1fr 1fr; } .ways > .way:last-child:nth-child(odd) { grid-column: span 2; } }

/* ------------------------------------------------------------------ OLED and Terminal (Autumn, 2026-10-16: "make it oled and make it terminal font")
   The default look: true black for OLED screens, set in the IBM VGA 8x16 pixel font, Kagaribi's family.
   Pixel fonts stay crisp only on their grid, so every size here is a multiple of 8px (16 is the font's native size).
   Unifont fills CJK, accented Latin, polytonic Greek and runes in the same 8x16 cell; scripts that need shaping
   (Devanagari, Tibetan, Hebrew, Syriac, Arabic…) fall through to system fonts on purpose. */
@font-face { font-family: "RR VGA"; src: url("rr-vga.woff2") format("woff2"); font-display: swap; }
@font-face {
  font-family: "RR Unifont"; src: url("rr-unifont.woff2") format("woff2"); font-display: swap;
  unicode-range: U+0100-02FF, U+1E00-1EFF, U+2C60-2C7F, U+A720-A7FF, U+0370-03FF, U+1F00-1FFF, U+0400-052F, U+2C80-2CFF, U+16A0-16FF,
    U+2000-22FF, U+2460-27FF, U+2E80-2FDF, U+3000-33FF, U+3400-4DBF, U+4E00-9FFF, U+AC00-D7AF, U+1100-11FF, U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF;
}

:root[data-theme="oled"] {
  --paper: #000;
  --paper-2: #0b0b0b;
  --card: #050505;
  --ink: #f2f2f2;
  --ink-2: #b4b4b4;
  --ink-3: #8c8c8c;
  --rule: #1e1e1e;
  --rule-2: #333;
  --fire: #ff5f3a;
  --fire-2: #ff8a5c;
  --gold: #d9ab4f;
  --seal: #c23a1d;
  --seal-ink: #fff;
  --link: #ff8a5c;
  --hl: rgba(255, 95, 58, .18);
  --mark: rgba(255, 255, 255, .2);
  --shadow: none;
  --veil: rgba(0, 0, 0, .75);
  --grain-op: 0;
  color-scheme: dark;
}
:root[data-theme="oled"] body::before, :root[data-theme="oled"] body::after { display: none; }

:root[data-font="term"] {
  --f-term: "RR VGA", "RR Unifont", "Noto Serif Devanagari", "Noto Serif Tibetan", "SF Mono", Menlo, ui-monospace, monospace;
  --f-body: var(--f-term);
  --f-display: var(--f-term);
  --f-sc: var(--f-term);
  --f-black: var(--f-term);
  --fs: 24px;
}
:root[data-font="term"][data-size="s"] { --fs: 16px; }
:root[data-font="term"][data-size="l"] { --fs: 32px; }
:root[data-font="term"][data-size="xl"] { --fs: 40px; }
:root[data-font="term"] body {
  -webkit-font-smoothing: none; font-smooth: never; text-rendering: optimizeSpeed;
  font-kerning: none; font-variant-ligatures: none;
}
:root[data-font="term"] *, :root[data-font="term"] *::before, :root[data-font="term"] *::after {
  letter-spacing: 0 !important; font-variant-numeric: normal; border-radius: 0 !important;
}
:root[data-font="term"] :is(.searchbox, .barnav a) { white-space: nowrap; }
:root[data-font="term"] .searchbox { overflow: hidden; text-overflow: ellipsis; }
:root[data-font="term"] .text h3 { font-size: 1em; }
:root[data-font="term"] :is(.text h2) { font-size: 1.3333em; }

:root[data-font="term"] .wordmark,
:root[data-font="term"] .door-title,
:root[data-font="term"] .card-name,
:root[data-font="term"] .side-links a,
:root[data-font="term"] .stats b,
:root[data-font="term"] .t-top a,
:root[data-font="term"] .tongue-card .t-native,
:root[data-font="term"] .way-t { font-size: 24px; line-height: 1.25; }
:root[data-font="term"] .wordmark { padding-top: 0; }
:root[data-font="term"] .shelf-sigil { font-size: 16px; }
:root[data-font="term"] .way-k { font-size: 32px; line-height: 1.25; }
:root[data-font="term"] .title-block h1 { font-size: 48px; line-height: 1.17; max-width: 24ch; }
:root[data-font="term"] .title-block h1.part-h { font-size: 32px; }
:root[data-font="term"] .folder-head h1 { font-size: 48px; line-height: 1.17; }
:root[data-font="term"] .home h1.blackletter { font-size: 64px; line-height: 1.125; }
/* small labels: every fixed size under 20px becomes the font's native 16px */
:root[data-font="term"] .searchbox,
:root[data-font="term"] .barnav,
:root[data-font="term"] .foot,
:root[data-font="term"] .motto,
:root[data-font="term"] .crumbs,
:root[data-font="term"] .pop .pop-h,
:root[data-font="term"] .badge,
:root[data-font="term"] .rail,
:root[data-font="term"] .rail-h,
:root[data-font="term"] .rail-ed dt,
:root[data-font="term"] .witness,
:root[data-font="term"] :is(.ed-actions > button, .ed-actions > a, .ed-actions summary, .dl > a, .dl > button),
:root[data-font="term"] .toc li.l3 a,
:root[data-font="term"] .parts a,
:root[data-font="term"] .kicker,
:root[data-font="term"] .meta,
:root[data-font="term"] .views,
:root[data-font="term"] .sec-source::before,
:root[data-font="term"] .pager small,
:root[data-font="term"] .folder-stats,
:root[data-font="term"] .band-h,
:root[data-font="term"] .band-h .n,
:root[data-font="term"] .door-kind,
:root[data-font="term"] .door-desc,
:root[data-font="term"] .card-count,
:root[data-font="term"] .card-desc,
:root[data-font="term"] .chip,
:root[data-font="term"] .sort,
:root[data-font="term"] .row-meta,
:root[data-font="term"] .row-desc,
:root[data-font="term"] .dateline,
:root[data-font="term"] .stats,
:root[data-font="term"] .continue small,
:root[data-font="term"] .shelf-filter input,
:root[data-font="term"] .side-links span,
:root[data-font="term"] .recent li,
:root[data-font="term"] .recent time,
:root[data-font="term"] .recent .more a,
:root[data-font="term"] .dialog,
:root[data-font="term"] .dialog h2,
:root[data-font="term"] .sres .sc,
:root[data-font="term"] .sres .sx,
:root[data-font="term"] .sfoot,
:root[data-font="term"] .set-row > span,
:root[data-font="term"] .seg button,
:root[data-font="term"] .cite-tabs button,
:root[data-font="term"] .cite-out.mono,
:root[data-font="term"] .btn,
:root[data-font="term"] .small,
:root[data-font="term"] .selbar button,
:root[data-font="term"] .toast,
:root[data-font="term"] .fnpop,
:root[data-font="term"] .sp-filters,
:root[data-font="term"] .sp-filters legend,
:root[data-font="term"] .sp-filters .more,
:root[data-font="term"] .sp-count,
:root[data-font="term"] .sp-results .sub,
:root[data-font="term"] .kw,
:root[data-font="term"] .kw small,
:root[data-font="term"] .conc-page .kw,
:root[data-font="term"] .cc-tools,
:root[data-font="term"] .al-wrap .al-prov,
:root[data-font="term"] .world-card .w-years,
:root[data-font="term"] .w-epoch,
:root[data-font="term"] .world-text .w-cat,
:root[data-font="term"] .w-preview .w-trad,
:root[data-font="term"] .w-figs span,
:root[data-font="term"] .w-figs small,
:root[data-font="term"] .w-list,
:root[data-font="term"] .t-tabs,
:root[data-font="term"] .t-side,
:root[data-font="term"] .t-facts dt,
:root[data-font="term"] .t-texts small,
:root[data-font="term"] .prov-note,
:root[data-font="term"] .sign-vals,
:root[data-font="term"] .sign-note,
:root[data-font="term"] .ex-prompt,
:root[data-font="term"] .ex-fb,
:root[data-font="term"] .provenance table td,
:root[data-font="term"] .tongue-card .t-family,
:root[data-font="term"] .tongue-card .t-count,
:root[data-font="term"] .lk-fam,
:root[data-font="term"] .nmap-card,
:root[data-font="term"] .way-d { font-size: 16px; }
@media (max-width: 640px) {
  :root[data-font="term"] { --fs: 16px; }
  :root[data-font="term"][data-size="s"] { --fs: 16px; }
  :root[data-font="term"][data-size="l"] { --fs: 24px; }
  :root[data-font="term"][data-size="xl"] { --fs: 32px; }
  :root[data-font="term"] .wordmark,
  :root[data-font="term"] .door-title,
  :root[data-font="term"] .card-name,
  :root[data-font="term"] .side-links a,
  :root[data-font="term"] .way-t { font-size: 16px; }
  :root[data-font="term"] .way-k { font-size: 24px; }
  :root[data-font="term"] :is(.title-block h1, .folder-head h1) { font-size: 32px; }
  :root[data-font="term"] .title-block h1.part-h { font-size: 24px; }
  :root[data-font="term"] .home h1.blackletter { font-size: 32px; }
}
.seg .f-t { font-family: "RR VGA", monospace; }
@media print { /* paper is paper: print in the book face, black on white, whatever the screen look */
  :root[data-theme][data-font] {
    --paper: #fff; --ink: #000; --ink-2: #222; --ink-3: #555; --rule: #bbb; --fire: #000; --link: #000; --card: #fff; --paper-2: #f4f4f4;
    --f-body: "EB Garamond", "Iowan Old Style", "Noto Serif", "Songti SC", "Noto Serif CJK SC", serif;
    --f-display: "IM Fell English", "EB Garamond", serif; --f-sc: "IM Fell English SC", "EB Garamond", serif; --f-black: "UnifrakturMaguntia", serif;
    color-scheme: light;
  }
  :root[data-font="term"] body { font-size: 11.5pt; -webkit-font-smoothing: antialiased; }
  :root[data-font="term"] .title-block h1 { font-size: 24pt; }
}

/* ------------------------------------------------------------------ glossary hints (rr.js glossHints; rr/glossary.py) */
.gl { text-decoration: underline dotted; text-decoration-color: color-mix(in srgb, var(--fire) 60%, transparent); text-decoration-thickness: 1px; text-underline-offset: .22em; cursor: help; }
.gl:hover, .gl:focus-visible { color: var(--fire); text-decoration-color: currentColor; outline: none; }
:root[data-hints="off"] .gl { text-decoration: none; cursor: auto; color: inherit; }
.glpop { max-width: min(480px, 92vw); }
.glpop .gl-head { margin-bottom: .35rem; }
.glpop .gl-t { font-weight: 600; color: var(--fire); }
.glpop .gl-s { color: var(--ink-3); }
.glpop .gl-d { line-height: 1.5; }
.glpop .gl-more a { white-space: nowrap; }
:root[data-font="term"] .glpop .gl-t { font-weight: 400; }
:root[data-font="term"] :is(.glpop, .glpop .gl-d) { font-size: 16px; }
@media print { .gl { text-decoration: none; } }

/* ------------------------------------------------------------------ fixes from the reader walk-through (2026-10-16) */
/* below 960px the bar's links fold away: the menu button must take their place */
@media (max-width: 960px) { .menu-only { display: grid; } }
/* a pixel font has no italic, only a slant: long italic passages (lead notes, subtitles, the home line) stand upright, set off by tone */
:root[data-font="term"] :is(.text blockquote, .subtitle, .lede, .folder-desc),
:root[data-font="term"] :is(.text blockquote, .subtitle, .lede, .folder-desc) :is(em, i) { font-style: normal; }
:root[data-font="term"] .text blockquote { color: var(--ink-2); }
:root[data-font="term"] .text hr::after { content: "* * *"; color: var(--ink-3); font-size: 1em; white-space: pre; }
/* shelf icons drawn in dark ink vanish on a dark page: give them a light tile */
:root:is([data-theme="oled"], [data-theme="night"]) img.shelf-icon { background: #d8d8d8; padding: 3px; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] img.shelf-icon { background: #d8d8d8; padding: 3px; } }

/* ------------------------------------------------------------------ concordance: opening page, tally (2026-10-16) */
.cc-start { max-width: 900px; margin: 0 auto; }
.cc-try { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 2.2rem; }
.cc-try .chip { text-decoration: none; display: inline-flex; gap: .5em; align-items: baseline; }
.cc-try .chip small { color: var(--ink-3); }
.cc-table { width: 100%; border-collapse: collapse; }
.cc-table th { text-align: left; color: var(--ink-3); font-weight: 400; border-bottom: 1px solid var(--rule-2); padding: .35rem .5rem; }
.cc-table td { padding: .3rem .5rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.cc-table td:nth-child(n+2), .cc-table th:nth-child(n+2) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cc-texts ul { columns: 2 22ch; margin: .2rem 0 .6rem; padding-left: 1.1rem; }
.cc-texts li { break-inside: avoid; margin: .1rem 0; }
.cc-texts small { color: var(--ink-3); }
.linkish { background: none; border: 0; padding: 0; color: var(--link); cursor: pointer; text-align: left; }
.linkish:hover { text-decoration: underline; }
.cc-tally { list-style: none; margin: .6rem auto 1.2rem; padding: 0; max-width: 900px; max-height: 15.5rem; overflow: auto; border: 1px solid var(--rule); }
.cc-tally button { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 1rem; align-items: baseline; width: 100%; padding: .3rem .7rem; background: none; border: 0; border-bottom: 1px solid var(--rule); color: var(--ink); text-align: left; cursor: pointer; }
.cc-tally button:hover { background: var(--hl); }
.cc-tally button[aria-pressed="true"] { background: var(--hl); color: var(--fire); }
.cc-tally .tt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-tally small { color: var(--ink-3); white-space: nowrap; }
.cc-tally b { font-weight: 400; color: var(--fire); font-variant-numeric: tabular-nums; }
.cc-more { text-align: center; }
:root[data-font="term"] :is(.cc-table, .cc-tally, .cc-try .chip, .cc-texts) { font-size: 16px; }

/* ------------------------------------------------------------------ Good Works Translations: badges and the wing (2026-10-16) */
.cbadge { display: inline-block; font-size: 12.5px; line-height: 1; padding: .32em .6em .28em; border: 1px solid var(--fire); color: var(--fire); border-radius: 3px; text-decoration: none; white-space: nowrap; vertical-align: .12em; margin-left: .4rem; }
.cbadge.cb-new-translation { border-color: var(--rule-2); color: var(--ink-2); }
.cbadge.cb-care { border-style: dashed; }
.cbadge i { color: var(--ink-3); font-style: normal; }
.rail .cbadge { white-space: normal; margin-left: 0; max-width: 100%; line-height: 1.25; }   /* in the narrow edition rail the label wraps, never runs off */
a.cbadge:hover { background: var(--hl); }
.rail-ed dd .cbadge { margin-left: 0; }
.ed-sub { display: block; color: var(--ink-3); font-size: .9em; margin-top: .25rem; line-height: 1.4; }
.gwt-intro { max-width: 760px; margin: 0 auto 1.6rem; color: var(--ink-2); }
.gwt-legend { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; margin: 1rem 0 0; font-size: .92em; }
.gwt-legend dt { color: var(--fire); white-space: nowrap; }
.gwt-legend dd { margin: 0; }
.gwt-status { justify-content: center; margin: 0 0 1rem; }
.gwt-status small { color: inherit; opacity: .7; margin-left: .3em; }
.gwt-filters { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin: 0 auto 1rem; max-width: 900px; }
.gwt-filters input, .gwt-filters select { font: inherit; font-size: 15px; color: var(--ink); background: var(--card); border: 1px solid var(--rule-2); padding: .3rem .6rem; }
.gwt-filters input { flex: 1 1 18rem; }
.gwt-count { text-align: center; }
.gwt-list { list-style: none; padding: 0; margin: 0 auto; max-width: 900px; }
.gwt-list li { display: flex; align-items: baseline; gap: .8rem; border-bottom: 1px solid var(--rule); padding: .45rem .2rem; }
.gwt-list li > a { flex: 1; min-width: 0; text-decoration: none; color: var(--ink); }
.gwt-list li > a:hover .gt { color: var(--fire); }
.gwt-list small { display: block; color: var(--ink-3); }
.gwt-more { justify-content: center; border-bottom: 0 !important; }
:root[data-font="term"] :is(.cbadge, .gwt-filters input, .gwt-filters select, .gwt-legend, .gwt-list small) { font-size: 16px; }

/* ------------------------------------------------------------------ home, 2026-10-16 (Autumn: "put lately added under the top line as a ticker,
   get rid of begin here, put continue reading on the right of good works library") */
.ticker { display: flex; align-items: center; gap: .9rem; border-bottom: 1px solid var(--rule); background: var(--paper-2); padding: .45rem 1rem; font-size: 15px; }
.tk-label { flex: none; color: var(--fire); text-decoration: none; font-family: var(--f-sc); letter-spacing: .06em; white-space: nowrap; }
.tk-all { flex: none; color: var(--ink-3); text-decoration: none; white-space: nowrap; }
.tk-all:hover, .tk-label:hover { color: var(--fire); }
.tk-window { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
.tk-track { display: flex; width: max-content; animation: tk-roll var(--tk-dur, 160s) linear infinite; }
.tk-window:hover .tk-track, .tk-window:focus-within .tk-track { animation-play-state: paused; }
.tk-track ul { display: flex; list-style: none; margin: 0; padding: 0; }
.tk-track li { white-space: nowrap; padding-right: 2.4rem; color: var(--ink-2); }
.tk-track li a { color: var(--ink); text-decoration: none; }
.tk-track li a:hover { color: var(--fire); }
.tk-track time { color: var(--fire); margin-right: .35rem; }
.tk-shelf { color: var(--ink-3); margin-left: .35rem; }
.tk-shelf::before { content: "· "; }
@keyframes tk-roll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .tk-track { animation: none; }
  .tk-window { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .tk-track ul[aria-hidden] { display: none; }
}
.home-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; align-items: center; }
.home-top:has(.continue:not([hidden])) { grid-template-columns: minmax(0, 1fr) 340px; }
.home-top .continue { margin: 0; }
.home-top .continue ol { grid-template-columns: 1fr; }
.home-cols { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 960px) { .home-top:has(.continue:not([hidden])) { grid-template-columns: minmax(0, 1fr); } }
:root[data-font="term"] :is(.ticker, .tk-label) { font-size: 16px; }

/* the bar's search box was removed (Autumn, 2026-10-16: "get rid of the search here"); the magnifier opens search at every width */
.bar .tool[data-open="search"] { display: grid; }

/* ------------------------------------------------------------------ home, round 2 (2026-10-16) */
/* the home page has its own big search box: no magnifier in the bar there */
body.k-home .bar .tool[data-open="search"] { display: none; }
/* Shelves | Tongues */
.pane-switch { display: flex; gap: 0; margin: 0 0 1.2rem; border-bottom: 1px solid var(--rule-2); }
.pane-btn { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: .45rem 1.1rem .5rem; font: inherit; font-family: var(--f-sc); font-size: 1.15rem; letter-spacing: .05em; color: var(--ink-3); cursor: pointer; }
.pane-btn small { font-size: .7em; color: var(--ink-3); margin-left: .25em; }
.pane-btn:hover { color: var(--ink); }
.pane-btn[aria-selected="true"] { color: var(--fire); border-bottom-color: var(--fire); }
.card-tongue .shelf-sigil { font-family: var(--f-body); }
:root[data-font="term"] .pane-btn { font-size: 24px; }
:root[data-font="term"] .pane-btn small { font-size: 16px; }
/* Continue reading: See all */
.see-all { float: right; background: none; border: 0; padding: 0; font: inherit; font-family: var(--f-body); letter-spacing: 0; color: var(--link); cursor: pointer; text-transform: none; }
.see-all:hover { text-decoration: underline; }
/* Your reading (history and bookmarks) */
.reading-dialog { width: min(640px, 94vw); max-height: 86vh; overflow: auto; }
.rh-h { display: flex; align-items: baseline; gap: .6rem; font-family: var(--f-sc); font-weight: 400; font-size: 15px; letter-spacing: .08em; color: var(--ink-3); margin: 1.2rem 0 .4rem; }
.rh-h small { color: var(--ink-3); }
.rh-clear { margin-left: auto; }
.rh-list { list-style: none; margin: 0; padding: 0; }
.rh-list li { display: flex; align-items: center; gap: .5rem; border-bottom: 1px solid var(--rule); padding: .35rem 0; }
.rh-list a { flex: 1; min-width: 0; text-decoration: none; color: var(--ink); }
.rh-list a:hover .rh-t { color: var(--fire); }
.rh-t { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rh-list small { display: block; color: var(--ink-3); }
.rh-star, .rh-x { flex: none; background: none; border: 1px solid var(--rule-2); color: var(--ink-2); width: 2rem; height: 2rem; cursor: pointer; font: inherit; line-height: 1; }
.rh-star[aria-pressed="true"] { color: var(--fire); border-color: var(--fire); }
.rh-star:hover, .rh-x:hover { color: var(--fire); }
:root[data-font="term"] :is(.rh-h, .rh-list small, .see-all) { font-size: 16px; }
[data-action="bookmark"][aria-pressed="true"] { color: var(--fire); }
/* The Dictionary (rr/dictroom.py + dictPage in rr.js): meaning first, then our texts, then forms, then the 1874 entry */
.dict { max-width: 900px; margin: 0 auto; }
.d-langs { justify-content: center; margin: -1rem 0 1.6rem; }
.d-try { justify-content: center; }
.d-group { margin: 0 0 2rem; }
.d-list { list-style: none; margin: 0; padding: 0; }
.d-item { border-bottom: 1px solid var(--rule); }
.d-row { display: grid; grid-template-columns: minmax(12ch, 22ch) 1fr auto; gap: .2rem 1rem; align-items: baseline; width: 100%;
  background: none; border: 0; padding: .55rem .4rem; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.d-row:hover { background: var(--hl); }
.d-row[aria-expanded="true"] .d-rh b { color: var(--fire); }
.d-rh small, .d-rn { color: var(--ink-3); }
.d-rg { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-rn { font-variant-numeric: tabular-nums; white-space: nowrap; }
.d-why { color: var(--fire); font-style: italic; font-size: .85em; }
.d-open { padding: 0 0 1.4rem; }
.d-card { border-left: 2px solid var(--fire); padding: .4rem 0 .4rem 1.2rem; margin: .2rem 0 0 .4rem; }
.d-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .8rem; }
.d-hw { margin: 0; font-size: 1.5em; font-weight: 600; }
.d-kind, .d-tongue { color: var(--ink-3); }
.d-tongue { margin-left: auto; font-family: var(--f-sc); letter-spacing: .05em; }
.d-sign { font-size: 2em; line-height: 1; }
.d-sign-s { font-size: 1.1em; }
.d-gloss { font-size: 1.15em; margin: .5rem 0 .7rem; }
.d-gloss small { color: var(--ink-3); font-size: .7em; }
.d-pp { color: var(--ink-2); margin: 0 0 .8rem; }
.d-card h4 { font-family: var(--f-sc); font-weight: 400; font-size: 15px; letter-spacing: .1em; color: var(--ink-3); margin: 1.2rem 0 .4rem; display: flex; gap: 1rem; align-items: baseline; flex-wrap: wrap; }
.d-lib p { margin: .3rem 0; }
.d-lib a { color: var(--link); text-decoration: none; }
.d-lib a:hover { text-decoration: underline; }
.d-lib .kws { margin: .5rem 0 0; }
.d-lib .kw { color: var(--ink-2); }
.d-note { color: var(--ink-2); border-left: 2px dashed var(--rule-2); padding-left: .7em; }
.d-forms { margin: 1rem 0 0; }
.d-forms summary { cursor: pointer; font-family: var(--f-sc); letter-spacing: .1em; color: var(--ink-3); font-size: 15px; }
.d-forms summary small { letter-spacing: 0; font-family: var(--f-body); }
.d-ft { border-collapse: collapse; margin: .5rem 0; }
.d-ft th, .d-ft td { padding: .2rem .8rem .2rem 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; font-weight: 400; }
.d-ft thead th, .d-ft tbody th { color: var(--ink-3); }
.d-used { color: var(--fire); font-weight: 600; }
.d-used sup { font-weight: 400; color: var(--ink-3); margin-left: .1em; }
.d-flist small { color: var(--ink-3); }
.d-cvw { margin: .8rem 0 .2rem; }
.d-cvd { color: var(--ink-2); margin: .3rem 0; }
.d-tg { color: var(--ink-3); font-style: italic; }
.d-cv abbr { text-decoration: underline dotted var(--ink-3); text-underline-offset: .2em; cursor: help; }
.d-cv abbr.held { text-decoration-color: var(--fire); }
.d-cv abbr:hover, .d-cv abbr:focus-visible { color: var(--fire); }
.ab-pop { display: inline-block; margin: 0 .3em; padding: 0 .5em; border: 1px solid var(--rule-2); border-radius: 4px; background: var(--card); color: var(--ink); font-style: normal; }
.ab-pop a { color: var(--link); }
.d-spell { font-family: var(--f-body); letter-spacing: 0; font-size: 14px; }
.d-spell[aria-pressed="true"] { color: var(--fire); }
.d-facts { display: grid; grid-template-columns: max-content 1fr; gap: .2rem 1rem; margin: .4rem 0; }
.d-facts dt { color: var(--ink-3); }
.d-facts dd { margin: 0; }
.d-notes { color: var(--ink-2); }
.d-src { color: var(--ink-3); margin: 1.2rem 0 0; }
.d-top { margin: 0 0 2.4rem; }
.d-toplist { columns: 2 30ch; column-gap: 2.4rem; margin: .6rem 0 0; padding-left: 2.4em; }
.d-toplist li { break-inside: avoid; margin: 0 0 .25rem; color: var(--ink-3); }
.d-toplist a { text-decoration: none; color: var(--ink); }
.d-toplist a:hover b { color: var(--fire); }
.d-toplist .d-tg { font-style: normal; color: var(--ink-2); }
.d-toplist small { color: var(--ink-3); white-space: nowrap; }
.d-about ul { padding-left: 1.2em; }
.d-about li { margin: 0 0 .6rem; }
@media (max-width: 640px) {
  .d-row { grid-template-columns: 1fr auto; }
  .d-rg { grid-column: 1 / -1; white-space: normal; }
  .d-card { padding-left: .8rem; margin-left: 0; }
  .d-tongue { margin-left: 0; }
}
:root[data-font="term"] .d-card h4,
:root[data-font="term"] .d-forms summary,
:root[data-font="term"] .d-spell,
:root[data-font="term"] .d-gloss small,
:root[data-font="term"] .d-why,
:root[data-font="term"] .d-rh small,
:root[data-font="term"] .d-rn,
:root[data-font="term"] .d-rg,
:root[data-font="term"] .d-cvd,
:root[data-font="term"] .d-ft,
:root[data-font="term"] .d-flist,
:root[data-font="term"] .d-toplist small,
:root[data-font="term"] .d-toplist .d-tg,
:root[data-font="term"] .ab-pop,
:root[data-font="term"] .d-note,
:root[data-font="term"] .d-notes,
:root[data-font="term"] .d-pp { font-size: 16px; }
:root[data-font="term"] .d-hw { font-size: 32px; }
:root[data-font="term"] .d-gloss { font-size: 24px; }
:root[data-font="term"] .d-tg,
:root[data-font="term"] .d-why { font-style: normal; }
/* Search: the title layer (titles, authors, shelves and rooms, matched before the full text) */
.sp-titles { margin: 0 0 1.6rem; }
.sp-titles .sres li { border-bottom: 1px solid var(--rule); }
.sres a.s-title .st { color: var(--ink); }
.sres a.s-title { border-left: 2px solid var(--fire); border-radius: 0 8px 8px 0; }

/* ------------------------------------------------------------------ Listen (rr-listen.js: tiny-voca, in the reader's own browser) */
.listen-row { margin: 1.1rem 0 0; }
.listen-btn { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--rule-2); background: var(--card); color: var(--ink-2); border-radius: 999px; padding: .3rem 1rem .3rem .8rem; font-size: 15px; cursor: pointer; }
.listen-btn:hover { color: var(--fire); border-color: var(--fire); }
:root.listening .listen-btn { color: var(--fire); border-color: var(--fire); }
::highlight(rr-listen) { background-color: var(--mark); color: inherit; }
.rr-said { box-shadow: -10px 0 0 -8px var(--fire); }
:root.listening .text :is(.sec-head, .sec-body, .sec-translation) :is(p, li, dd, dt, h2, h3, h4, h5, h6) { cursor: pointer; }
.lmark { position: absolute; right: -37px; top: .1em; width: 30px; height: 30px; padding: 6px; border: 0; border-radius: 50%; background: none; color: var(--ink-3); opacity: 0; cursor: pointer; transition: opacity .15s; }
.lmark svg { width: 100%; height: 100%; fill: currentColor; stroke: none; }
.text p:hover > .lmark, .lmark:focus-visible { opacity: 1; }
.lmark:hover { color: var(--fire); background: var(--hl); }
@media (hover: none), (max-width: 960px) { .lmark { display: none; } }
.lplayer { position: fixed; left: 0; right: 0; margin: 0 auto; width: fit-content; bottom: 16px; z-index: 80; display: none; align-items: center; gap: .25rem; flex-wrap: wrap; justify-content: center;
  max-width: calc(100vw - 32px); padding: .3rem .45rem; background: var(--card); color: var(--ink-2); border: 1px solid var(--rule-2); border-radius: 999px; box-shadow: 0 12px 34px -14px rgba(0, 0, 0, .55); font-size: 15px; }
.lplayer.on { display: flex; animation: lrise .2s ease-out; }
@keyframes lrise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.lplayer button { border: 0; background: none; color: inherit; cursor: pointer; border-radius: 999px; min-width: 38px; height: 38px; display: inline-grid; place-items: center; font: inherit; }
.lplayer button:hover { background: var(--hl); color: var(--fire); }
.lplayer .ic { width: 20px; height: 20px; }
.lplayer .l-play { background: var(--ink); color: var(--paper); }
.lplayer .l-play:hover { background: var(--fire); color: var(--paper); }
.lplayer .l-text { padding: 0 .7rem; display: inline-flex; gap: .35rem; align-items: center; }
.lplayer .l-text .ic { width: 16px; height: 16px; }
.lplayer [data-l=follow][aria-pressed=true] { color: var(--fire); }
.lplayer .l-status { padding: 0 .5rem; min-width: 6.5em; }
.lplayer .l-pos { color: var(--ink-3); padding-right: .3rem; font-variant-numeric: tabular-nums; }
.lplayer .l-opts { display: inline-flex; border-left: 1px solid var(--rule); padding-left: .2rem; margin-left: .1rem; }
.lplayer [hidden] { display: none; }
:root.listening .toast { bottom: 96px; }
:root.listening .reading-tools { bottom: 92px; }
:root.listening main { padding-bottom: 80px; }
@media (max-width: 640px) {
  .lplayer { border-radius: 18px; bottom: 10px; width: auto; left: 10px; right: 10px; max-width: none; }
  .lplayer .l-status { min-width: 0; flex: 1 1 auto; text-align: left; }
  .lplayer .l-opts { order: 1; border-left: 0; width: 100%; justify-content: center; border-top: 1px solid var(--rule); padding-top: .15rem; margin-left: 0; }
  .lplayer .l-opts .l-text { padding: 0 .5rem; }
  :root.listening .reading-tools { bottom: 112px; }
  :root.listening .toast { bottom: 120px; }
}
:root[data-font="term"] .listen-btn,
:root[data-font="term"] .lplayer { font-size: 16px; }
@media print { .lplayer, .listen-row, .lmark { display: none !important; } }
