@font-face { font-family: "Instrument Sans"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/static/fonts/instrument-sans-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Sans"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/static/fonts/instrument-sans-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("/static/fonts/instrument-sans-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("/static/fonts/instrument-sans-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 300 400; font-display: swap;
  src: url("/static/fonts/newsreader-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 300 400; font-display: swap;
  src: url("/static/fonts/newsreader-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 300 500; font-display: swap;
  src: url("/static/fonts/newsreader-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 300 500; font-display: swap;
  src: url("/static/fonts/newsreader-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Tokens (ported from the approved spike): limestone ground, ink text, lapis
   for links and focus, old gold for partner edges and the life bar. */
:root {
  --ground: #F2F1ED;
  --ground-2: #E9E7E1;
  --ink: #23262D;
  --ink-2: #555961;
  --ink-3: #666970;
  --rule: #D5D3CC;
  --lapis: #2E4A8B;
  --lapis-soft: #C9D3EA;
  --gold: #A8863A;
  --gold-soft: #E4D6AE;
  --olive: #6F7D6A;
  --sea: #DCE2E9;
  --land: #EEECE5;
  --land-edge: #CFCBC0;
  --water-line: #9AAAC0;
  --water-ink: #4F6283;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --measure: 66ch;
  --gutter: clamp(16px, 4vw, 48px);
  --wide: 1040px;
  --col: 1040px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #151A26; --ground-2: #1D2331; --ink: #E6E4DD; --ink-2: #B0B3BA; --ink-3: #8D919B;
    --rule: #2E3443; --lapis: #9FB4E6; --lapis-soft: #2A3652; --gold: #D0B065; --gold-soft: #4A3F23; --olive: #9DAA97;
    --sea: #11151F; --land: #222A3A; --land-edge: #3A4254; --water-line: #3E5378; --water-ink: #8EA3C7;
  }
  :root:not([data-theme="light"]) .leaflet-relief-pane { filter: invert(1); mix-blend-mode: screen; opacity: calc(0.35 * var(--relief-k, 1)); }
}
:root[data-theme="dark"] {
  --ground: #151A26; --ground-2: #1D2331; --ink: #E6E4DD; --ink-2: #B0B3BA; --ink-3: #8D919B;
  --rule: #2E3443; --lapis: #9FB4E6; --lapis-soft: #2A3652; --gold: #D0B065; --gold-soft: #4A3F23; --olive: #9DAA97;
  --sea: #11151F; --land: #222A3A; --land-edge: #3A4254; --water-line: #3E5378; --water-ink: #8EA3C7;
}
:root[data-theme="dark"] .leaflet-relief-pane { filter: invert(1); mix-blend-mode: screen; opacity: calc(0.35 * var(--relief-k, 1)); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 64px; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.55;
  font-feature-settings: "tnum";
  overflow-wrap: break-word;
}
a { color: var(--lapis); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--lapis) 35%, transparent); }
a:hover { border-bottom-color: var(--lapis); }
:focus-visible { outline: 2px solid var(--lapis); outline-offset: 3px; border-radius: 1px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; line-height: 1.08; letter-spacing: -0.01em; }
p { margin: 0; }
.noPage { color: var(--ink); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--ground); padding: 8px 14px; border: 0; z-index: 20; }
.skip:focus { left: 8px; }

/* Masthead */
.masthead { display: flex; align-items: center; gap: 14px; padding: 16px max(var(--gutter), calc((100% - var(--col)) / 2)); border-bottom: 1px solid var(--rule); }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); border: 0; font-family: var(--serif); font-size: 22px; }
.brand svg { fill: var(--ink); stroke: var(--ink); }

.mastNav { display: flex; gap: 2px 18px; flex-wrap: wrap; font-size: 14px; }
.mastNav a { color: var(--ink-2); border: 0; padding-block: 4px; }
.mastNav a:hover, .mastNav a[aria-current] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 5px; }
@media (max-width: 640px) {
  .masthead { flex-wrap: wrap; }
  .mastNav { flex-basis: 100%; order: 3; row-gap: 2px; }
}

main { max-width: calc(var(--col) + 2 * var(--gutter)); margin-inline: auto; padding: 0 var(--gutter) 64px; }

/* Breadcrumbs */
.breadcrumbs { padding-top: 20px; font-size: 14px; color: var(--ink-3); }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 0; }
.breadcrumbs li:not(:last-child)::after { content: "\203A"; margin: 0 9px; color: var(--ink-3); }
.breadcrumbs a { color: var(--ink-2); border: 0; display: inline-block; padding: 4px 0; }
.breadcrumbs a:hover { color: var(--lapis); }
.breadcrumbs [aria-current] { color: var(--ink-3); display: inline-block; padding: 4px 0; }
#verses .plateHead { max-width: 760px; }
.nw { white-space: nowrap; }

/* Hero */
.hero { padding: clamp(28px, 6vw, 72px) 0 8px; max-width: var(--wide); }
.hero h1 { font-size: clamp(52px, 11vw, 132px); font-weight: 300; font-variation-settings: "opsz" 72; letter-spacing: -0.025em; line-height: 0.98; }
.hero h1 .in { font-size: 0.45em; color: var(--ink-2); letter-spacing: -0.01em; }
.also, .title { font-family: var(--serif); font-size: clamp(20px, 2.4vw, 26px); color: var(--ink-2); margin-top: 10px; }
.also i { font-style: italic; color: var(--ink); }
.title + .also, .also + .title { margin-top: 2px; }
.life, .beingKind { margin-top: 18px; font-size: 17px; color: var(--ink); }
.chron { color: var(--ink-3); font-size: 0.88em; white-space: nowrap; }
.life .chron { margin-left: 6px; }
.summary { font-family: var(--serif); font-size: clamp(20px, 2.2vw, 24px); line-height: 1.42; max-width: 60ch; margin-top: 24px; }
.summary a { border-bottom-color: color-mix(in srgb, var(--lapis) 45%, transparent); }
.bioSource { margin-top: 10px; font-size: 13px; color: var(--ink-3); }

.facts {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); gap: 16px 28px;
  margin: 36px 0 0; padding-top: 20px; border-top: 1px solid var(--ink);
}
.facts div:has(dd a + a + a + a) { grid-column: span 2; }
.facts dt { font-size: 13px; color: var(--ink-3); }
.facts dd { margin: 2px 0 0; font-size: 16px; line-height: 1.45; }

/* Computed specifics: quotable sentences, each hung from a short gold rule. */
.specifics { list-style: none; margin: 32px 0 0; padding: 0; max-width: 64ch; display: grid; gap: 12px; }
.specifics li { font-family: var(--serif); font-size: 19px; line-height: 1.45; padding-left: 26px; position: relative; }
.specifics li::before { content: ""; position: absolute; left: 0; top: 0.78em; width: 14px; border-top: 1.5px solid var(--gold); }
.specNote { margin-top: 12px; padding-left: 26px; font-size: 13px; color: var(--ink-3); }
.specNote .chron { font-size: inherit; }

/* Section nav */
.plates {
  display: flex; gap: 4px 22px; margin: 48px calc(-1 * var(--gutter)) 0; padding: 11px var(--gutter);
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-size: 14px;
  position: sticky; top: 0; background: color-mix(in srgb, var(--ground) 94%, transparent); backdrop-filter: blur(6px); z-index: 500;
  overflow-x: auto; scrollbar-width: none; white-space: nowrap;
}
.plates::-webkit-scrollbar { display: none; }
.plates a { color: var(--ink-2); border: 0; padding: 4px 0; }
.plates a:hover, .plates a.on { color: var(--lapis); }

/* Plates (sections) */
.plate { padding: 64px 0 8px; max-width: var(--wide); }
.plate h2 { font-size: clamp(32px, 4vw, 46px); font-variation-settings: "opsz" 60; }
.plate h3 { font-size: 22px; margin-top: 40px; }
.plateHead { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.caption { color: var(--ink-2); max-width: var(--measure); margin-top: 12px; font-size: 15px; }
.hint { color: var(--ink-3); font-size: 13px; margin-top: 8px; }
figure { margin: 24px 0 0; }

/* Tree */
.tree { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding: 0 var(--gutter); overflow-x: auto; min-height: 120px; }
#tree svg { display: block; font-family: var(--sans); overflow: visible; }
#tree .edge { fill: none; stroke: var(--ink-3); stroke-width: 1; }
#tree .edge.divine { stroke-dasharray: 2 5; }
#tree .edge.partner { stroke: var(--gold); stroke-width: 1.5; }
#tree .node circle { fill: var(--ground); stroke: var(--ink-2); stroke-width: 1.2; }
#tree .node.female circle { stroke: var(--olive); }
#tree .node.divine circle { stroke-dasharray: 2 2; }
#tree .node.self circle { fill: var(--lapis); stroke: var(--lapis); }
#tree .node text, #tree .group text { fill: var(--ink); font-size: 13px; paint-order: stroke; stroke: var(--ground); stroke-width: 4px; stroke-linejoin: round; }
#tree .node.self text { font-family: var(--serif); font-size: 18px; }
#tree .node text.yrs { fill: var(--ink-3); font-size: 10.5px; font-family: var(--sans); }
#tree .partnerLabel { fill: var(--gold); font-size: 10.5px; font-style: italic; paint-order: stroke; stroke: var(--ground); stroke-width: 3px; }
#tree .node.linked { cursor: pointer; }
#tree .node.linked:hover text, #tree .node.linked:focus-visible text { fill: var(--lapis); }
#tree .node:focus-visible { outline: none; }
#tree .node:focus-visible circle { stroke: var(--lapis); stroke-width: 2.5; }
#tree .group { cursor: pointer; }
#tree .group rect { fill: var(--ground); stroke: var(--ink-3); stroke-dasharray: 3 3; }
#tree .group rect.hit { fill: transparent; stroke: none; pointer-events: all; }
#tree .group:hover rect:not(.hit), #tree .group:focus-visible rect:not(.hit) { stroke: var(--lapis); stroke-dasharray: none; }
#tree .group text { fill: var(--ink-2); }
#tree .group:hover text { fill: var(--lapis); }
#tree .group:focus-visible { outline: none; }
#tree .gen { fill: var(--ink-3); font-size: 11px; }
#tree .genline { stroke: var(--rule); stroke-dasharray: 2 4; }
/* R-5: a hovered or focused person's line of descent; the rest dims. */
#tree svg.hasLit .node:not(.lit), #tree svg.hasLit .edge:not(.lit), #tree svg.hasLit .group:not(.lit) { opacity: 0.3; }
#tree .edge.lit { stroke: var(--lapis); }
@media (prefers-reduced-motion: no-preference) {
  #tree .node, #tree .edge, #tree .group { transition: opacity 0.15s ease; }
}
/* R-2: the "Show grandchildren" button, a pill like the poster link. */
.treeControls { margin-top: 10px; }
.treeMore { display: inline-flex; align-items: center; min-height: 44px; padding: 7px 16px; border: 1px solid var(--lapis); border-radius: 999px; background: transparent; color: var(--lapis); font: inherit; font-size: 15px; cursor: pointer; }
.treeMore:hover { background: color-mix(in srgb, var(--lapis) 10%, transparent); }

/* Stories */
.stories { list-style: none; margin: 24px 0 0; padding: 0; max-width: 800px; }
.stories li { display: grid; grid-template-columns: 8ch 1fr auto; gap: 16px; padding: 12px 0; border-top: 1px solid var(--rule); align-items: baseline; }
.stories li:last-child { border-bottom: 1px solid var(--rule); }
.stories .year { color: var(--ink-3); font-size: 14px; white-space: nowrap; }
.stories .name { font-family: var(--serif); font-size: 20px; line-height: 1.3; color: var(--ink); border: 0; }
.stories .name:hover { color: var(--lapis); }
.stories .ref { color: var(--ink-2); font-size: 14px; white-space: nowrap; }

/* Map */
.map { height: clamp(320px, 52vw, 500px); margin-top: 24px; border: 1px solid var(--rule); background: var(--sea); }
.leaflet-container { font-family: var(--sans); background: var(--sea); }
/* Shaded relief (white where flat or sea): multiply darkens only the slopes;
   the dark theme inverts it and screens, so slopes lighten (blocks above). */
.leaflet-relief-pane { mix-blend-mode: multiply; opacity: calc(0.55 * var(--relief-k, 1)); }
.leaflet-bar a { background: var(--ground); color: var(--ink); border-color: var(--rule); }
.leaflet-touch .leaflet-bar { border: 1px solid var(--rule); }
.placeTip, .riverLabel, .seaLabel { background: transparent; border: 0; box-shadow: none; padding: 0; font-family: var(--sans); }
.placeTip { color: var(--ink); font-size: 12px; text-shadow: 0 0 3px var(--land), 0 0 3px var(--land); }
.riverLabel { color: var(--water-ink); font-family: var(--serif); font-style: italic; font-size: 13px; }
.seaLabel { color: var(--water-ink); font-family: var(--serif); font-style: italic; font-size: 14px; letter-spacing: 0.04em; white-space: nowrap; }
.placeTip::before, .riverLabel::before, .seaLabel::before { display: none; }
.leaflet-container .leaflet-control-attribution { font-size: 10px; background: color-mix(in srgb, var(--ground) 85%, transparent); color: var(--ink-2); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--ground); color: var(--ink); box-shadow: none; border: 1px solid var(--rule); border-radius: 2px; }
.leaflet-popup-content { font-family: var(--sans); font-size: 14px; margin: 10px 14px; line-height: 1.45; }
.leaflet-popup-content .pn { font-family: var(--serif); font-size: 18px; display: block; }
.leaflet-popup-content .pm { color: var(--ink-2); display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 14px; font-size: 13px; color: var(--ink-3); }
.legend > span { display: inline-flex; align-items: center; gap: 7px; }
.bucket { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--olive); }
.bucket.possible { background: transparent; border: 1.5px solid var(--olive); }
.bucket.uncertain { background: transparent; border: 1.5px dashed var(--ink-3); }
.bucket.none { background: transparent; border: 1px solid var(--ink-3); }
.bucket.unknown { background: transparent; border: 1px dotted var(--ink-3); }
.placeList { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 0 28px; font-size: 15px; }
.placeList li { display: grid; grid-template-columns: 8px 1fr auto; gap: 0 10px; align-items: center; border-top: 1px solid var(--rule); }
.placeList .pl a, .placeList .pl .noPage { display: inline-block; padding: 9px 0; border-bottom: 0; }
.placeList .pl a:hover { text-decoration: underline; text-underline-offset: 3px; }
.placeList .n { color: var(--ink-3); font-size: 13px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Timeline */
#timelineFig { min-height: 120px; }
#timelineFig svg { display: block; width: 100%; height: auto; font-family: var(--sans); overflow: visible; }
#timelineFig .overview .track { fill: var(--ground-2); }
#timelineFig .overview .era { stroke: var(--ink-2); stroke-width: 1.5; }
#timelineFig .overview .window { fill: var(--gold-soft); stroke: var(--gold); stroke-width: 1; }
#timelineFig .overview text { fill: var(--ink-3); font-size: 11px; }
#timelineFig .axis line, #timelineFig .axis path { stroke: var(--rule); }
#timelineFig .axis text { fill: var(--ink-3); font-size: 11px; }
#timelineFig .bar { fill: var(--ground-2); stroke: var(--ink-3); stroke-width: 0.6; }
#timelineFig .bar.self { fill: var(--gold); stroke: none; }
#timelineFig .bar.mentioned { fill: none; stroke: var(--ink-3); stroke-dasharray: 3 3; }
#timelineFig .bar.self.mentioned { fill: none; stroke: var(--gold); stroke-width: 1.5; }
#timelineFig .label { fill: var(--ink); font-size: 13px; }
#timelineFig .label.self { font-family: var(--serif); font-size: 16px; }
#timelineFig .label a, #timelineFig a .label { cursor: pointer; }
#timelineFig a:hover .label { fill: var(--lapis); }
#timelineFig .yrs { fill: var(--ink-3); font-size: 11px; font-family: var(--sans); }
#timelineFig .eraline { stroke: var(--ink-2); stroke-dasharray: 3 3; stroke-width: 1; }
#timelineFig .eraname { fill: var(--ink-2); font-size: 11px; letter-spacing: 0.02em; }
#timelineFig .timelineScroll { overflow-x: auto; scrollbar-width: thin; }
#timelineFig .timelineScroll svg { width: auto; max-width: none; }
#timelineFig .note { fill: var(--ink-3); font-size: 11px; }

/* Mentions: HTML bars, each a link to its book's verses */
.bars { list-style: none; margin: 24px 0 0; padding: 0; max-width: 760px; columns: 2 300px; column-gap: 40px; }
.bars li { break-inside: avoid; }
.bars a { display: grid; grid-template-columns: 9.5em 1fr 3.2em; gap: 10px; align-items: center; padding: 3px 0; color: var(--ink-2); border: 0; font-size: 13px; }
.bars .bk { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bars .track { height: 10px; position: relative; }
.bars .fill { position: absolute; inset: 0 auto 0 0; background: var(--lapis); border-radius: 1px; }
.bars .nt .fill { background: color-mix(in srgb, var(--lapis) 55%, var(--ground)); }
.bars .n { color: var(--ink); text-align: right; }
.bars a:hover .bk, .bars a:focus-visible .bk { color: var(--lapis); }
.bars a:hover .fill { background: var(--gold); }
.peopleRefs { margin-top: 16px; font-size: 15px; color: var(--ink-2); max-width: var(--measure); }
.counts { border-collapse: collapse; margin-top: 16px; width: 100%; max-width: 760px; font-size: 15px; }
.counts th, .counts td { text-align: left; padding: 10px 14px 10px 0; border-top: 1px solid var(--rule); vertical-align: baseline; }
.counts thead th { font-weight: 500; color: var(--ink-3); font-size: 13px; border-top: 0; padding-top: 0; }
.counts tbody th { font-weight: 500; white-space: nowrap; width: 4em; }
.counts tbody tr:last-child td, .counts tbody tr:last-child th { border-bottom: 1px solid var(--rule); }
.counts .nc { display: inline-block; margin-right: 18px; white-space: nowrap; }
.counts .nc i { font-family: var(--serif); font-size: 17px; color: var(--ink); margin-right: 3px; }
.method { color: var(--ink-2); max-width: var(--measure); margin-top: 14px; font-size: 14px; }

/* Verses */
.toggle { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; padding: 2px; }
.toggle button { font: inherit; font-size: 13px; background: none; border: 0; color: var(--ink-2); padding: 6px 13px; min-height: 32px; border-radius: 999px; cursor: pointer; }
.toggle button[aria-pressed="true"] { background: var(--ink); color: var(--ground); }
.toggle button:hover:not([aria-pressed="true"]) { color: var(--lapis); }
.book { margin-top: 0; border-top: 1px solid var(--rule); max-width: 760px; }
.caption + .book { margin-top: 24px; }
.book:last-of-type { border-bottom: 1px solid var(--rule); }
.book summary { display: flex; align-items: baseline; gap: 14px; padding: 14px 0; cursor: pointer; list-style: none; }
.book summary::-webkit-details-marker { display: none; }
.book summary::before { content: ""; width: 7px; height: 7px; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); transform: rotate(-45deg); transition: transform 0.2s ease; flex: none; position: relative; top: -2px; }
.book[open] summary::before { transform: rotate(45deg); }
.book .bk { font-family: var(--serif); font-size: 22px; }
.book .n { color: var(--ink-3); font-size: 14px; }
.book summary:hover .bk { color: var(--lapis); }
.verses { list-style: none; margin: 0; padding: 0 0 12px; max-width: 760px; }
.versesPage .verses { margin-top: 20px; border-bottom: 1px solid var(--rule); }
.verses .v { display: grid; grid-template-columns: 5.5ch 1fr; gap: 14px; padding: 11px 0; border-top: 1px solid color-mix(in srgb, var(--rule) 60%, transparent); }
.verses .ref { color: var(--ink-3); font-size: 13px; padding-top: 4px; border: 0; font-feature-settings: "tnum"; }
.verses .ref:hover { color: var(--lapis); }
.verses.folded .v:nth-child(n+11) { display: none; }
.book .showAll { margin: 4px 0 18px; }
.verses .v:target { background: color-mix(in srgb, var(--gold-soft) 45%, transparent); }
.verses .t { font-family: var(--serif); font-size: 18px; line-height: 1.55; max-width: 62ch; }
.bookIndex { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 0 28px; max-width: 900px; }
.bookIndex li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 8px 0; border-top: 1px solid var(--rule); font-size: 15px; }
.bookIndex .n { color: var(--ink-3); font-size: 13px; }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; margin-top: 28px; max-width: 760px; font-size: 15px; }
.pager .prev::before { content: "\2039\00a0"; }
.pager .next::after { content: "\00a0\203A"; }
.pager .all { margin: 0 auto; }

/* Related */
.related { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 0 28px; }
.related li { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--rule); font-size: 16px; }
.related .n { color: var(--ink-3); font-size: 13px; white-space: nowrap; }

/* Easton */
.eastonText { margin-top: 18px; max-width: var(--measure); color: var(--ink-2); font-size: 15px; display: grid; gap: 12px; }
.eastonText.clamped { max-height: 11em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.more { font: inherit; font-size: 14px; margin-top: 12px; background: none; border: 1px solid var(--ink-3); color: var(--ink); padding: 7px 16px; min-height: 36px; border-radius: 999px; cursor: pointer; }
.more:hover { border-color: var(--ink); }

/* Colophon */
.colophon {
  border-top: 1px solid var(--ink); margin: 40px max(var(--gutter), calc((100% - var(--col)) / 2)) 0; max-width: var(--col); padding: 28px 0 56px; font-size: 14px; color: var(--ink-2);
  display: grid; grid-template-columns: minmax(0, 60ch) minmax(0, 1fr); gap: 24px 56px;
}
.colNote { display: grid; gap: 10px; align-content: start; }
.siteLinks { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 2px 18px; font-family: var(--sans); font-size: 14px; }
.siteLinks a { color: var(--ink-2); border: 0; display: inline-block; padding: 4px 0; }
.siteLinks a:hover { color: var(--lapis); }
.colophon h2 { font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--ink-3); margin: 0 0 6px; letter-spacing: 0; }
.colophon h2 ~ h2 { margin-top: 18px; }
.colophon .sources { list-style: none; margin: 0; padding: 0; }
.colophon .sources li { padding: 3px 0; display: flex; flex-wrap: wrap; gap: 0 10px; align-items: baseline; }
.colophon .lic { color: var(--ink-3); font-size: 12px; }
.colophon .sources a { display: inline-block; padding: 3px 0; }


/* ---------- Places, events, books and chapters (Task 11) ---------- */

/* Place header: the one locating sentence, then the grade as a quiet label */
.where { font-family: var(--serif); font-size: clamp(22px, 2.6vw, 28px); line-height: 1.3; color: var(--ink); margin-top: 14px; }
.title + .where { margin-top: 6px; }
.locLine { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 14px; color: var(--ink-3); }
.km { color: var(--ink-3); font-size: 13px; white-space: nowrap; }

.where.unknownLoc { color: var(--ink-2); }
.stories .name a { color: var(--ink); border: 0; }
.stories .name a:hover { color: var(--lapis); }

/* Standalone links get a 24px target (WCAG 2.5.8); inline prose links are exempt */
.facts dd a, .stories .name a, .counted a, .related a, .aliveList a, .pagerEnd a { display: inline-block; padding-block: 2px; min-width: 24px; }
.pagerEnd .all { padding-block: 4px; }

/* The place at the centre of its map */
.leaflet-interactive.near { cursor: pointer; }
.placeTip.selfTip { font-family: var(--serif); font-size: 16px; color: var(--ink); }

/* Nearby: a quiet list with distances, aligned to the right */
.nearList { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 0 28px; font-size: 15px; }
.nearList li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border-top: 1px solid var(--rule); }
.nearList .pl a { display: inline-block; padding: 9px 0; }
.nearList .n { color: var(--ink-3); font-size: 13px; white-space: nowrap; }

/* Event places: the list under the map without counts */
.event .placeList li { grid-template-columns: 8px 1fr; }
.event .placeList .n { display: none; }
.plate h3:first-child { margin-top: 24px; }

/* Previous / next at the foot of an event, book or chapter */
.pagerEnd { max-width: var(--wide); margin-top: 72px; padding-top: 20px; border-top: 1px solid var(--ink); align-items: baseline; }
.pagerEnd .prev, .pagerEnd .next { font-family: var(--serif); font-size: clamp(19px, 2vw, 22px); border: 0; }
.pagerEnd .prev:hover, .pagerEnd .next:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.pagerEnd .all { font-size: 14px; color: var(--ink-2); border: 0; order: 2; flex-basis: 100%; text-align: center; }
.pagerEnd .prev { order: 0; }
.pagerEnd .next { order: 1; margin-left: auto; text-align: right; }

/* Book: the chapter grid. A serif numeral over two hairlines, people (lapis)
   and places (olive), each against the book's busiest chapter. */
.legend .key { display: inline-block; width: 16px; height: 2px; }
.key.pb, .chapterGrid .pb { background: var(--lapis); }
.key.lb, .chapterGrid .lb { background: var(--olive); }
.chapterGrid { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 0 14px; max-width: var(--wide); }
.chapterGrid a { display: flex; flex-direction: column; gap: 8px; padding: 10px 0 14px; border: 0; border-top: 1px solid var(--rule); color: var(--ink); }
.chapterGrid .cn { font-family: var(--serif); font-size: 26px; line-height: 1; font-variation-settings: "opsz" 36; }
.chapterGrid .cb { display: grid; gap: 3px; }
.chapterGrid .pb, .chapterGrid .lb { display: block; height: 2px; border-radius: 1px; }
.chapterGrid a:hover { border-top-color: var(--lapis); }
.chapterGrid a:hover .cn, .chapterGrid a:focus-visible .cn { color: var(--lapis); }
.chapterGrid .vc { display: block; margin-top: 4px; font-family: var(--sans); font-size: 12px; color: var(--ink-3); }

/* Chapter hub: four short columns */
.hub { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 8px 36px; margin-top: 8px; }
.hub h3 { font-size: 20px; margin: 24px 0 8px; }
.counted { list-style: none; margin: 0; padding: 0; }
.counted li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 7px 0; border-top: 1px solid var(--rule); font-size: 15px; }
.counted .n { color: var(--ink-3); font-size: 13px; white-space: nowrap; }

/* Alive at this point: names with life spans, hung from gold like the specifics */
.aliveList { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 0 28px; }
.aliveList li { display: flex; flex-direction: column; padding: 8px 0 8px 26px; position: relative; }
.aliveList li::before { content: ""; position: absolute; left: 0; top: 1.2em; width: 14px; border-top: 1.5px solid var(--gold); }
.aliveList a, .aliveList .noPage { font-family: var(--serif); font-size: 19px; border: 0; align-self: flex-start; }
.aliveList a:hover { color: var(--ink); }
.aliveList .n { color: var(--ink-3); font-size: 13px; }

/* Chapter text: read as running prose, verse numbers set small in the line */
.chapterText { margin-top: 24px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); max-width: 760px; }
.chapterText summary { display: flex; align-items: baseline; gap: 14px; padding: 14px 0; cursor: pointer; list-style: none; }
.chapterText summary::-webkit-details-marker { display: none; }
.chapterText summary::before { content: ""; width: 7px; height: 7px; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); transform: rotate(-45deg); transition: transform 0.2s ease; flex: none; position: relative; top: -2px; }
.chapterText[open] summary::before { transform: rotate(45deg); }
/* Ruling 32: below 600px the server-default open text (open="open") is hidden by
   CSS until the reader opens it, so a slow network never flashes it. */
@media (max-width: 600px) {
  .chapterText[open="open"] > .verses { display: none; }
  .chapterText[open="open"] summary::before { transform: rotate(-45deg); }
}
.chapterText .bk { font-family: var(--serif); font-size: 22px; }
.chapterText .n { color: var(--ink-3); font-size: 14px; }
.chapterText summary:hover .bk { color: var(--lapis); }
.chapterText .verses { display: block; padding: 4px 0 28px; font-family: var(--serif); font-size: 20px; line-height: 1.75; max-width: 64ch; word-spacing: 0.04em; }
.chapterText .verses .v { display: inline; padding: 0; border: 0; }
.chapterText .verses .t { display: inline; font-size: inherit; line-height: inherit; }
.chapterText .verses .ref { font-family: var(--sans); font-size: 11px; vertical-align: 0.6em; line-height: 0; padding: 0; margin: 0 0.3em 0 0.4em; color: var(--lapis); }
.chapterText .verses .v:first-child .ref { margin-left: 0; }
.chapterText .verses .v:target { background: none; }
.chapterText .verses .v:target .t { background: color-mix(in srgb, var(--gold-soft) 60%, transparent); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
@media (max-width: 640px) {
  .hero h1 { font-size: clamp(48px, 15vw, 72px); }
  .stories li { grid-template-columns: 1fr auto; gap: 2px 12px; }
  .stories .year { grid-column: 1; grid-row: 1; }
  .stories .ref { grid-column: 2; grid-row: 1; text-align: right; }
  .stories .name { grid-column: 1 / -1; }
  .facts div:has(dd a + a + a + a) { grid-column: auto; }
  .specifics li { font-size: 18px; }
  .bars a { grid-template-columns: 7.5em 1fr 3em; }
  .counts thead { display: none; }
  .counts tbody th { padding-right: 10px; }
  .colophon { grid-template-columns: 1fr; }
  .verses .v { grid-template-columns: 1fr; gap: 2px; }
  .verses .t { font-size: 17px; }
  .chapterText .verses { font-size: 18px; line-height: 1.7; }
  .chapterGrid { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 0 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before { transition: none !important; animation: none !important; }
}


/* ---------- Home, directories and search (Task 12) ---------- */

::selection { background: var(--lapis-soft); color: var(--ink); }
.search input { caret-color: var(--lapis); }

/* Masthead link to the home page search box */
.masthead .mastSearch { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; padding: 6px 0; font-size: 14px; color: var(--ink-2); border: 0; }
.mastSearch svg, .searchIcon { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; flex: none; }
.mastSearch:hover { color: var(--lapis); }

/* The search box: an index line set in the display serif, ruled in ink */
.search { position: relative; max-width: 720px; margin-top: 28px; }
.searchLabel { display: block; font-size: 14px; color: var(--ink-2); margin-bottom: 6px; }
.searchField { display: flex; align-items: center; gap: 12px; border-bottom: 1.5px solid var(--ink); color: var(--ink-3); }
.searchField:focus-within { border-bottom-color: var(--lapis); color: var(--lapis); }
.search input {
  flex: 1; min-width: 0; font: inherit; font-family: var(--serif); font-size: clamp(22px, 3vw, 28px); font-weight: 300;
  color: var(--ink); background: transparent; border: 0; padding: 10px 0 12px; border-radius: 0; -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: var(--ink-3); opacity: 1; font-style: italic; }
.search input:focus { outline: none; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.searchHero input { font-size: clamp(26px, 4.4vw, 40px); padding: 12px 0 14px; }
.searchStatus { min-height: 1.5em; margin-top: 8px; font-size: 13px; color: var(--ink-3); }
.searchResults {
  position: absolute; left: 0; right: 0; top: calc(100% - 1.5em - 8px); z-index: 600; list-style: none; margin: 0; padding: 4px 0;
  background: var(--ground); border: 1px solid var(--rule); border-top: 0; max-height: min(64vh, 560px); overflow-y: auto;
  box-shadow: 0 18px 32px -24px color-mix(in srgb, var(--ink) 45%, transparent);
}
.searchResults li a {
  display: grid; grid-template-columns: auto auto 1fr auto; align-items: baseline; gap: 2px 8px;
  padding: 9px 14px; border: 0; color: var(--ink);
}
.searchResults .rn { font-family: var(--serif); font-size: 19px; line-height: 1.3; }
.searchResults .rk { color: var(--ink-3); font-size: 13px; white-space: nowrap; }
.searchResults .rh { color: var(--ink-2); font-size: 13px; font-style: italic; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.searchResults .rc { grid-column: 4; color: var(--ink-3); font-size: 13px; white-space: nowrap; }
.searchResults [aria-selected="true"] a { background: var(--ground-2); }
.searchResults [aria-selected="true"] .rn { color: var(--lapis); }

/* Home (home page C; ported from docs/superpowers/mockups-2026-10-16-home/build_c.py) */
.home { --col: 1180px; }
.homeMain .plate, .homeMain .homeHero { max-width: none; }
.homeHero { padding: clamp(36px, 8vw, 96px) 0 8px; }
.homeHero h1 { font-size: clamp(40px, 7.4vw, 92px); font-weight: 300; font-variation-settings: "opsz" 72; letter-spacing: -0.025em; line-height: 1.02; max-width: 14ch; }
.homeHero .search { margin-top: clamp(28px, 4vw, 48px); }
.heroC { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: 0 clamp(32px, 4.5vw, 64px); align-items: center; }
.heroC > :only-child, .pair > :only-child { grid-column: 1 / -1; }
.heroC h1 { font-size: clamp(42px, 6.2vw, 80px); max-width: 10ch; }
.heroC .sub { margin-top: 20px; font-family: var(--serif); font-size: clamp(19px, 1.9vw, 23px); line-height: 1.4; color: var(--ink-2); max-width: 36ch; }
.heroC .search { margin-top: clamp(24px, 3vw, 40px); }
/* The tree draws at the card's width (tree.js reads the host's width). */
.treeCard { margin: 0; min-width: 0; border: 1px solid var(--rule); background: var(--ground-2); padding: 16px 18px 18px; }
.treeCard .treeBox { overflow-x: auto; }
.treeCard #tree { min-height: 120px; }
.treeCard #tree .node text, .treeCard #tree .group text, .treeCard #tree .partnerLabel { stroke: var(--ground-2); }
@media (max-width: 600px) { .treeCard .yrs, .treeCard .partnerLabel { display: none; } }
.treeCard figcaption { margin-top: 10px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 20px; align-items: baseline; }
.treeCard .cap { font-family: var(--serif); font-size: 18px; line-height: 1.35; color: var(--ink); max-width: var(--measure); }
.goLink { font-size: 15px; white-space: nowrap; }
.secH { font-size: clamp(28px, 3.2vw, 38px); font-variation-settings: "opsz" 60; }
.mapC .map { height: 500px; margin-top: 18px; }
.mapFoot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; align-items: baseline; margin-top: 10px; }
.mapFoot .caption { margin: 0; }
.pair { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 32px clamp(28px, 4vw, 48px); align-items: start; padding-top: 64px; }
.kicker { font-size: 13px; font-weight: 500; color: var(--ink-3); letter-spacing: 0.02em; margin: 0 0 8px; }
.today { padding: 22px 24px 24px; background: var(--ground-2); border: 1px solid var(--rule); }
.today h2 { font-size: clamp(28px, 3.4vw, 40px); font-variation-settings: "opsz" 60; }
.today h2 a { color: var(--ink); border: 0; }
.today h2 a:hover { color: var(--lapis); }
.today .f { margin-top: 8px; color: var(--ink-2); }
.today .note { margin-top: 8px; font-family: var(--serif); font-size: 19px; line-height: 1.45; max-width: 60ch; }
.today .src { font-size: 13px; color: var(--ink-3); }
.todayWrap .caption { margin-top: 10px; }
.chartC { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 0 24px; align-items: stretch; border: 1px solid var(--rule); color: var(--ink); padding: 0; }
.chartC:hover, .chartC:focus-within { border-color: var(--ink-3); }
/* The card is a div; its text block is the one link (the slice's names are links of their own). */
.chartC .chartLink { color: var(--ink); border-bottom: 0; }
.chartC .crop { display: block; min-width: 0; overflow: hidden; background: var(--ground-2); border-right: 1px solid var(--rule); }
.chartC .chartSlice { display: block; height: 100%; max-height: 330px; }
.chartC .txt { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 20px 20px 22px 0; }
.chartC .t { font-family: var(--serif); font-size: clamp(26px, 2.6vw, 32px); line-height: 1.1; }
.chartC .l { color: var(--ink-2); font-size: 15px; }
.chartC .go { align-self: flex-start; margin-top: 6px; font-size: 15px; color: var(--lapis); border-bottom: 1px solid color-mix(in srgb, var(--lapis) 35%, transparent); }
.chartC:hover .t, .chartC .chartLink:focus-visible .t { color: var(--lapis); }
.chartC:hover .go, .chartC .chartLink:focus-visible .go { border-bottom-color: var(--lapis); }
@media (max-width: 860px) {
  .heroC { grid-template-columns: minmax(0, 1fr); }
  .treeCard { margin-top: 36px; padding: 12px 12px 14px; }
  .pair { grid-template-columns: minmax(0, 1fr); padding-top: 48px; }
  .mapC .map { height: 340px; }
}
@media (max-width: 760px) {
  .mapC .riverLabel { display: none; }
  .today { padding: 18px 16px 20px; }
  .chartC { grid-template-columns: 176px minmax(0, 1fr); gap: 0 16px; }
  .chartC .txt { padding: 16px 16px 18px 0; }
  .chartSlice .yr { display: none; }   /* the years clip at the card's right edge on a phone */
}

.mostGrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 8px 48px; margin-top: 8px; }
.mostCol h3 { font-size: 22px; margin: 28px 0 10px; }
.mostCol h3 a { color: var(--ink); border: 0; display: inline-block; padding-block: 2px; }
.mostCol h3 a:hover { color: var(--lapis); }
.mostNote { margin-top: 10px; font-size: 14px; }
.ranked { list-style: none; margin: 0; padding: 0; }
.ranked a { display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; align-items: baseline; padding: 9px 0 0; border: 0; color: var(--ink); }
.ranked .rn { font-family: var(--serif); font-size: 19px; line-height: 1.3; }
.ranked .rc { color: var(--ink-2); font-size: 14px; }
.ranked .ru { color: var(--ink-3); font-size: 13px; }
.ranked .rb { grid-column: 1 / -1; height: 1px; background: var(--rule); }
.ranked .rb span { display: block; height: 2px; margin-top: -0.5px; background: var(--gold); }
.ranked a:hover .rn, .ranked a:focus-visible .rn { color: var(--lapis); }
.ranked a:hover .rb span { background: var(--lapis); }

.browse { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 0 28px; }
.browse a { display: flex; flex-direction: column; gap: 2px; padding: 14px 0 16px; border: 0; border-top: 1px solid var(--ink); color: var(--ink); }
.browse .bn { font-family: var(--serif); font-size: clamp(26px, 3vw, 32px); line-height: 1.1; }
.browse .bc { color: var(--ink-3); font-size: 14px; }
.browse a:hover .bn, .browse a:focus-visible .bn { color: var(--lapis); }
.methodsLine { margin-top: 28px; color: var(--ink-2); font-size: 15px; max-width: var(--measure); }

/* Directories: catalogue drawers, a large letter hung at the left of each */
.dirHero { padding-bottom: 0; }
.dirHero .caption { margin-top: 6px; }
.letters {
  display: flex; flex-wrap: nowrap; gap: 0; margin: 40px calc(-1 * var(--gutter)) 0; padding: 4px var(--gutter);
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-size: 15px;
  position: sticky; top: 0; z-index: 500; background: color-mix(in srgb, var(--ground) 94%, transparent); backdrop-filter: blur(6px);
  overflow-x: auto; scrollbar-width: none;
}
.letters::-webkit-scrollbar { display: none; }
.letters a, .letters span { flex: 1 0 auto; min-width: 28px; text-align: center; padding: 7px 4px; border: 0; }
.letters a { color: var(--ink); }
.letters a:hover { color: var(--lapis); }
.letters span { color: color-mix(in srgb, var(--ink-3) 55%, transparent); }
.dirBody { max-width: var(--wide); }
.dirGroup { display: grid; grid-template-columns: 96px 1fr; gap: 0 24px; padding-top: 40px; }
.dirGroup h2 { font-size: clamp(40px, 5vw, 60px); font-weight: 300; line-height: 1; color: var(--ink-3); padding-top: 6px; }
.dir-books .dirGroup h2, .dir-beings .dirGroup h2 { font-size: clamp(26px, 3vw, 34px); color: var(--ink); grid-column: 1 / -1; margin-bottom: 12px; }
.dir-books .dirGroup, .dir-beings .dirGroup { grid-template-columns: 1fr; }
.dirList { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--rule); }
.dirSolo { margin-top: 40px; }
.dirList li { display: grid; grid-template-columns: 1fr auto; gap: 0 16px; align-items: baseline; padding: 7px 0 9px; border-top: 1px solid var(--rule); }
.dirList .dh { min-width: 0; }
.dirList .dn { display: inline-block; padding-block: 2px; min-width: 24px; font-family: var(--serif); font-size: 19px; line-height: 1.3; color: var(--ink); border: 0; margin-right: 10px; }
.dirList .dn:hover, .dirList .dn:focus-visible { color: var(--lapis); }
.dirList .da { color: var(--ink-2); font-family: var(--serif); font-style: italic; font-size: 16px; }
.dirList .dc { color: var(--ink-3); font-size: 13px; white-space: nowrap; }
.dirList .dl { grid-column: 1 / -1; color: var(--ink-2); font-size: 14px; line-height: 1.45; max-width: 72ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bookList { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 0 28px; border-bottom: 0; }
.bookList li { grid-template-columns: 1fr auto; }

@media (max-width: 640px) {
  .dirGroup { grid-template-columns: 1fr; padding-top: 28px; }
  .dirGroup h2.letter { font-size: 36px; margin-bottom: 8px; }
  .dirList .dl { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .searchResults li a { grid-template-columns: auto 1fr auto; }
  .searchResults .rh { grid-column: 1 / -1; grid-row: 2; }
  .searchResults .rc { grid-column: 3; grid-row: 1; }
  .letters { display: grid; grid-template-columns: repeat(14, 1fr); overflow: visible; }
  .letters a, .letters span { min-width: 0; padding: 6px 0; }
}

/* Anchors land below the sticky letter strip (two rows on a phone) */
html:has(.letters) { scroll-padding-top: 72px; }
@media (max-width: 640px) { html:has(.letters) { scroll-padding-top: 104px; } }

/* Ruling 33: a split directory's letter index (drawer fronts) and letter pages */
.drawers { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 0 12px; max-width: var(--wide); }
.drawers a, .drawers .off { display: flex; flex-direction: column; gap: 4px; padding: 10px 0 14px; border: 0; border-top: 1px solid var(--rule); color: var(--ink); }
.drawers .lg { font-family: var(--serif); font-size: 40px; font-weight: 300; line-height: 1; }
.drawers .lc { color: var(--ink-3); font-size: 13px; }
.drawers .off { color: color-mix(in srgb, var(--ink-3) 55%, transparent); }
.drawers a:hover, .drawers a:focus-visible { border-top-color: var(--lapis); }
.drawers a:hover .lg, .drawers a:focus-visible .lg { color: var(--lapis); }
.rankedCols { columns: 3 240px; column-gap: 48px; max-width: var(--wide); margin-top: 16px; }
.rankedCols li { break-inside: avoid; }
.otherLetters { display: flex; flex-wrap: wrap; gap: 0 2px; margin-top: 20px; font-size: 14px; max-width: 720px; }
.otherLetters a { min-width: 24px; padding: 3px 4px; text-align: center; color: var(--ink-2); border: 0; }
.otherLetters a:hover { color: var(--lapis); }
.otherLetters a[aria-current] { color: var(--ground); background: var(--ink); border-radius: 2px; }
.dirLetter .letters { justify-content: flex-start; }
.dirLetter .letters a { flex: 0 0 auto; min-width: 36px; }
.dirLetter .dirGroup h2.letter { font-size: clamp(28px, 3.4vw, 40px); }
.dirLetter .pagerEnd { margin-top: 56px; }
.dirList .dk { color: var(--ink-3); font-size: 13px; margin-left: 6px; }
.dirList .da + .dk { margin-left: 10px; }
@media (max-width: 640px) {
  .dirLetter .letters { display: flex; flex-wrap: wrap; overflow: visible; }
  .dirLetter .letters a { min-width: 34px; padding: 6px 2px; }
  .drawers { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0 8px; }
  .drawers .lg { font-size: 32px; }
}


/* ---------- Content pages: methods, sources, about, privacy (Task 13) ---------- */

.article { max-width: var(--wide); padding-top: clamp(28px, 6vw, 64px); }
.articleHead h1 { font-size: clamp(44px, 8vw, 88px); font-weight: 300; font-variation-settings: "opsz" 72; letter-spacing: -0.025em; line-height: 1; }
.prose { max-width: var(--measure); font-family: var(--serif); font-size: 19px; line-height: 1.6; }
.articleHead .lede { font-family: var(--serif); font-size: clamp(20px, 2.2vw, 23px); line-height: 1.5; max-width: 56ch; margin-top: 24px; }
.prose > :first-child { margin-top: 0; }
.prose > h2:first-child { margin-top: 48px; }
.prose p, .prose ul, .prose ol, .prose .tableWrap { margin: 16px 0 0; }
.prose .tableWrap { overflow-x: auto; }
.prose h2 { font-size: clamp(28px, 3.4vw, 38px); font-variation-settings: "opsz" 60; margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--ink); }
.prose h3 { font-size: 22px; margin-top: 36px; }
.prose h2 + p, .prose h3 + p { margin-top: 14px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-top: 8px; padding-left: 0.2em; }
.prose li::marker { color: var(--ink-3); }
.prose li ul, .prose li ol { margin-top: 6px; }
.prose strong { font-weight: 500; }
.prose code { font-family: var(--sans); font-size: 0.8em; background: var(--ground-2); padding: 1px 3px; border-radius: 2px; overflow-wrap: anywhere; }
.prose table { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: 15px; line-height: 1.45; }
.prose th, .prose td { text-align: left; padding: 9px 14px 9px 0; border-top: 1px solid var(--rule); vertical-align: baseline; }
.prose thead th { font-weight: 500; color: var(--ink-3); font-size: 13px; border-top: 0; padding-top: 0; }
.prose tbody tr:last-child td { border-bottom: 1px solid var(--rule); }
.prose .num { text-align: right; }

/* On this page: a short list under the title; beside the text on wide screens */
.toc { margin-top: 28px; font-size: 14px; max-width: var(--measure); }
.toc h2 { font-family: var(--sans); font-size: 13px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; margin-bottom: 6px; }
.toc ol { list-style: none; margin: 0; padding: 0; columns: 2 200px; column-gap: 28px; }
.toc li { break-inside: avoid; border-top: 1px solid var(--rule); }
.toc a { display: block; padding: 6px 0; color: var(--ink-2); border: 0; }
.toc a:hover { color: var(--lapis); }
@media (min-width: 1100px) {
  .article:has(.toc) { display: grid; grid-template-columns: minmax(0, 66ch) 220px; column-gap: 72px; align-items: start; }
  .article:has(.toc) .articleHead { grid-column: 1 / -1; }
  .article .toc { grid-column: 2; grid-row: 2; position: sticky; top: 24px; margin-top: 66px; }
  .article .toc ol { columns: auto; }
  .article:has(.toc) .prose { grid-column: 1; grid-row: 2; }
}
@media (max-width: 640px) {
  .prose { font-size: 18px; }
  .prose table { font-size: 14px; }
}

/* ---------- Flagship graphic: Adam to Jesus (Task 18) ---------- */
.graphic { max-width: var(--wide); padding-top: clamp(28px, 6vw, 64px); }
.graphicHead h1 { font-size: clamp(48px, 9vw, 104px); font-weight: 300; font-variation-settings: "opsz" 72; letter-spacing: -0.025em; line-height: 1; }
.graphicHead .headline { font-family: var(--serif); font-size: clamp(21px, 2.4vw, 27px); line-height: 1.4; max-width: 34ch; margin-top: 20px; text-wrap: pretty; }
.graphicActions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 22px; font-size: 15px; }
.graphicActions a { display: inline-flex; align-items: baseline; gap: 8px; padding-block: 4px; }
.posterLink { border: 1px solid var(--lapis); border-radius: 999px; padding: 7px 16px !important; min-height: 44px; align-items: center !important; }
.posterLink:hover { background: color-mix(in srgb, var(--lapis) 10%, transparent); }
.posterSize { color: var(--ink-3); font-size: 13px; }
.genFigure { margin: 36px 0 0; }
.genLegend { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13px; color: var(--ink-2); }
.genLegend li { display: inline-flex; align-items: center; gap: 8px; }
.genLegend .key { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--lapis); }
.genLegend .key.ring { background: var(--ground); border: 1.5px solid var(--gold); }
.genLegend .key.dash { width: 22px; height: 0; border-radius: 0; background: none; border-top: 1.5px dashed var(--ink-2); }
.genealogy { border-top: 1px solid var(--ink); padding-top: 6px; }
.genealogy.scrolls { overflow-x: auto; }
.genSvg { display: block; font-family: var(--sans); }
.gen-ruler text { fill: var(--ink-3); font-size: 0.85em; }
.gen-ruler .gen-ruler-head { font-style: italic; }
.gen-tick { stroke: var(--rule); stroke-width: 1; }
.gen-edge { fill: none; stroke: var(--ink-3); stroke-width: 1.2; }
.gen-edge.shared { stroke: var(--ink-2); stroke-width: 1.6; }
.gen-edge.link { stroke: var(--ink-2); stroke-dasharray: 4 4; }
.gen-edge-label { fill: var(--ink-2); font-size: 0.82em; font-style: italic; }
.gen-head { font-family: var(--serif); font-size: 1.12em; fill: var(--ink); }
.gen-sub { fill: var(--ink-3); font-size: 0.8em; }
.gen-node circle { fill: var(--lapis); stroke: var(--ground); stroke-width: 1.5; }
.gen-node.trunk circle { fill: var(--ink); }
.gen-node.left-out circle { fill: var(--ground); stroke: var(--gold); stroke-width: 1.6; }
.gen-node.divine circle { fill: var(--gold); stroke: var(--ground); }
.gen-node.divine .nm { font-family: var(--serif); font-size: 1.35em; }
.gen-node text { fill: var(--ink); }
.gen-node .yr { fill: var(--ink-3); font-size: 0.86em; }
.gen-node .hit { fill: transparent; }
.gen-link { cursor: pointer; }
/* The home card's live top slice of the chart (genealogy.js drawSlice). */
.chartSlice { background: var(--ground-2); padding: 14px 12px 8px; overflow: hidden; }
.chartSlice .genSvg { max-height: 330px; }
.gen-link:hover .nm, .gen-link:focus-visible .nm { fill: var(--lapis); text-decoration: underline; }
.gen-link:focus-visible { outline: none; }
.gen-link:focus-visible circle { stroke: var(--lapis); stroke-width: 3; }
.posterCredit { display: none; }
.genLists { margin-top: 28px; max-width: var(--wide); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.genLists summary { cursor: pointer; padding: 12px 0; font-size: 15px; color: var(--ink-2); }
.genLists summary:hover { color: var(--lapis); }
.genListGrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 8px 48px; padding-bottom: 20px; }
.genList h3 { font-size: 20px; margin: 6px 0 8px; }
.genList ol { margin: 0; padding-left: 2.2em; font-size: 15px; columns: 2 130px; column-gap: 24px; }
.genList li { padding: 2px 0; break-inside: avoid; }
.genList li::marker { color: var(--ink-3); font-size: 13px; }
.genList .yr { color: var(--ink-3); font-size: 13px; white-space: nowrap; }
.genMethod { margin-top: 56px; }
.genMethod > h2 { font-size: clamp(28px, 3.4vw, 38px); font-variation-settings: "opsz" 60; padding-top: 18px; border-top: 1px solid var(--ink); }
.genMethod h3 { margin-top: 32px; }
.graphicIndex { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.graphicIndex li { border-top: 1px solid var(--ink); padding: 14px 0 18px; }
.graphicIndex .name { font-family: var(--serif); font-size: clamp(26px, 3vw, 32px); border: 0; }
.graphicIndex p { margin-top: 6px; font-family: var(--sans); font-size: 15px; color: var(--ink-2); }

/* The A2 poster (?poster=1, shot by `begat cards --kinds poster` at 4961×7016) */
html.poster { font-size: 3.2vw; }
html.poster, html.poster body { height: 100vh; overflow: hidden; }
html.poster .masthead, html.poster .breadcrumbs, html.poster .skip, html.poster .graphicActions,
html.poster .genLists, html.poster .genMethod, html.poster .colophon, html.poster .hint { display: none !important; }
html.poster main { max-width: none; padding: 3.5vw 4.5vw 0; }
html.poster .graphic { max-width: none; padding-top: 0; }
html.poster .graphicHead h1 { font-size: 8.5vw; }
html.poster .graphicHead .headline { font-size: 2.1vw; margin-top: 1.4vw; max-width: 46ch; }
html.poster .genFigure { margin-top: 2vw; }
html.poster .genLegend { font-size: 1.1vw; gap: 0.6vw 2.4vw; margin-bottom: 1vw; }
html.poster .genLegend .key { width: 0.9vw; height: 0.9vw; }
html.poster .genLegend .key.dash { width: 2.2vw; height: 0; }
html.poster .genealogy { border-top-width: 0.12vw; }
html.poster .posterCredit { display: block; font-size: 1vw; color: var(--ink-3); margin-top: 0.6vw; }
html.poster .onScreen { display: none; }
html.poster .gen-edge { stroke-width: 4; }
html.poster .gen-edge.shared { stroke-width: 5; }
html.poster .gen-edge.link { stroke-dasharray: 14 12; }
html.poster .gen-node circle { stroke-width: 4; }
html.poster .gen-node.left-out circle { stroke-width: 5; }
html.poster .gen-tick { stroke-width: 3; }
html.poster .genLegend .key.ring { border-width: 0.25vw; }
html.poster .genLegend .key.dash { border-top-width: 0.2vw; }

.allList { list-style: none; margin: 0; padding: 0; columns: 3 220px; column-gap: 32px; }
.allList li { break-inside: avoid; display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border-bottom: 1px solid var(--rule); }
.allList .dk { color: var(--ink-3); font-size: 13px; font-style: normal; margin: 0 auto 0 6px; }
.allList .dc { color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
