/* Layout: an archive reading room. Dark ink band for navigation, pale sage paper for pages,
   Spectral for names and headings, IBM Plex Sans for the interface, Plex Mono for dates and record numbers.
   Each family line keeps one colour everywhere: tree cards, map routes, chips and dots. */
:root {
  --bg: #EDF0EE;
  --surface: #F8FAF9;
  --raised: #FFFFFF;
  --ink: #1C2A29;
  --ink-2: #34423F;
  --muted: #4F5E5C;
  --rule: #BCC7C4;
  --rule-soft: #D5DDDA;
  --accent: #245866;
  --accent-ink: #1C2A29;
  --hl: #D6E5E8;
  --hl-soft: #EEF5F6;
  --band: #1C2A29;
  --band-ink: #F2F5F4;
  --band-muted: #C9D6D3;
  --band-field: #2E403C;
  --band-accent: #9FD0DC;
  --focus: #2F7D92;
  --scrim: rgba(12, 18, 17, 0.88);
  --map-sea: #DCE6E6;
  --map-land: #F4F6F2;
  --map-border: #C3CDC9;

  --t-doc-bg: #DDEEE3; --t-doc-fg: #1F5A35;
  --t-story-bg: #F6E8CF; --t-story-fg: #6E4A10;
  --t-inf-bg: #E8E2F2; --t-inf-fg: #4B3A73;
  --t-q-bg: #F6DEDA; --t-q-fg: #7A2C21;
  --t-cor-bg: #DCE8F1; --t-cor-fg: #234A68;
  --t-res-bg: #E4ECEA; --t-res-fg: #34423F;

  --l-schreiber: #8A5A2B;
  --l-schusterman: #3E7A4F;
  --l-benjamin: #2D6878;
  --l-weinstein: #6B4F8A;
  --l-stainthorp: #A0443A;
  --l-ladell: #A2386F;
  --l-healy: #5E7A1E;
  --l-pollitz: #3D4FA3;
  --l-gugenheim: #8A6A00;
  --l-mullaney: #2F7A6B;
  --l-other: #7C8A88;

  --serif: 'Spectral', Georgia, 'Times New Roman', serif;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --wrap: 1200px;
  --radius: 8px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111917; --surface: #172220; --raised: #1C2926; --ink: #E4ECE9; --ink-2: #C7D3CF; --muted: #97A8A4;
    --rule: #34463F; --rule-soft: #26352F; --accent: #8CC4D2; --accent-ink: #E4ECE9; --hl: #22393D; --hl-soft: #1A2C2E;
    --band: #0A1110; --band-ink: #E4ECE9; --band-muted: #A9BAB6; --band-field: #1B2826; --band-accent: #9FD0DC; --focus: #8CC4D2;
    --scrim: rgba(4, 8, 7, 0.92); --map-sea: #0F1A1B; --map-land: #1E2B28; --map-border: #34463F;
    --t-doc-bg: #1D3A28; --t-doc-fg: #A6DDB7; --t-story-bg: #3B2E14; --t-story-fg: #EBC98A; --t-inf-bg: #2E2742; --t-inf-fg: #CBB9EE;
    --t-q-bg: #43231E; --t-q-fg: #F2B2A6; --t-cor-bg: #1C3245; --t-cor-fg: #A9CDEA; --t-res-bg: #24312E; --t-res-fg: #C7D3CF;
    --l-schreiber: #D29A5E; --l-schusterman: #86C497; --l-benjamin: #7FB6C4; --l-weinstein: #B49BD6; --l-stainthorp: #E08A7F; --l-ladell: #E48BBA; --l-healy: #B7D172; --l-pollitz: #9DABEB; --l-gugenheim: #D8BC4A; --l-mullaney: #7CCBB8; --l-other: #8E9C9A;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111917; --surface: #172220; --raised: #1C2926; --ink: #E4ECE9; --ink-2: #C7D3CF; --muted: #97A8A4;
  --rule: #34463F; --rule-soft: #26352F; --accent: #8CC4D2; --accent-ink: #E4ECE9; --hl: #22393D; --hl-soft: #1A2C2E;
  --band: #0A1110; --band-ink: #E4ECE9; --band-muted: #A9BAB6; --band-field: #1B2826; --band-accent: #9FD0DC; --focus: #8CC4D2;
  --scrim: rgba(4, 8, 7, 0.92); --map-sea: #0F1A1B; --map-land: #1E2B28; --map-border: #34463F;
  --t-doc-bg: #1D3A28; --t-doc-fg: #A6DDB7; --t-story-bg: #3B2E14; --t-story-fg: #EBC98A; --t-inf-bg: #2E2742; --t-inf-fg: #CBB9EE;
  --t-q-bg: #43231E; --t-q-fg: #F2B2A6; --t-cor-bg: #1C3245; --t-cor-fg: #A9CDEA; --t-res-bg: #24312E; --t-res-fg: #C7D3CF;
  --l-schreiber: #D29A5E; --l-schusterman: #86C497; --l-benjamin: #7FB6C4; --l-weinstein: #B49BD6; --l-stainthorp: #E08A7F; --l-ladell: #E48BBA; --l-healy: #B7D172; --l-pollitz: #9DABEB; --l-gugenheim: #D8BC4A; --l-mullaney: #7CCBB8; --l-other: #8E9C9A;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); }
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.2vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.3rem; }
p { margin: 0; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.kicker { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--raised); color: var(--ink); padding: 8px 12px; z-index: 100; border-radius: 6px; }
.skip:focus { top: 8px; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(16px, 3vw, 32px); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.split > * { min-width: 0; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); gap: 28px; } }

/* ---------- header ---------- */
.band { background: var(--band); color: var(--band-ink); }
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; }
.head-in { display: flex; align-items: center; gap: 24px; padding-block: 12px; flex-wrap: wrap; }
.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--band-ink); line-height: 1.1; }
.brand:hover { color: var(--band-ink); }
.brand b { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; }
.brand span { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--band-muted); margin-top: 3px; }
.nav { display: flex; gap: 20px; flex-wrap: wrap; font-size: 0.95rem; }
.nav a { color: var(--band-muted); text-decoration: none; padding-block: 4px; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--band-ink); }
.nav a[aria-current="page"] { color: var(--band-ink); border-bottom-color: var(--band-accent); }
.hsearch { margin-left: auto; position: relative; }
.hsearch input[type="search"] { font: inherit; font-size: 0.9rem; padding: 8px 12px; border: 1px solid transparent; border-radius: 6px; background: var(--band-field); color: var(--band-ink); width: 240px; }
.hsearch input::placeholder { color: var(--band-muted); }
.menu-btn { display: none; margin-left: auto; background: transparent; border: 1px solid var(--band-muted); color: var(--band-ink); border-radius: 6px; padding: 6px 12px; font: inherit; font-size: 0.9rem; cursor: pointer; }
@media (max-width: 980px) {
  .menu-btn { display: inline-flex; }
  .nav { order: 3; width: 100%; flex-direction: column; gap: 0; }
  .nav a { padding: 10px 0; border-bottom: 1px solid var(--band-field); }
  .nav a[aria-current="page"] { border-bottom-color: var(--band-accent); }
  .head-in .nav[data-open="false"] { display: none; }
  .hsearch { order: 4; width: 100%; margin-left: 0; padding-bottom: 4px; }
  .hsearch input { width: 100%; }
}
.drop { position: absolute; right: 0; top: calc(100% + 6px); width: min(420px, calc(100vw - 32px)); background: var(--raised); color: var(--ink); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); padding: 6px; z-index: 60; max-height: 70vh; overflow: auto; }
.drop h4 { margin: 8px 8px 4px; font: 600 0.72rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.drop a { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 6px; text-decoration: none; color: var(--ink); }
.drop a:hover, .drop a.on { background: var(--hl-soft); }
.drop .all { color: var(--accent); font-weight: 600; justify-content: center; }

/* ---------- footer ---------- */
.site-foot { margin-top: 72px; }
.foot-in { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; padding-block: 28px; font-size: 0.9rem; color: var(--band-muted); }
.foot-in a { color: var(--band-ink); }
.surnames { font-family: var(--serif); font-size: 1.05rem; color: var(--band-ink); }

/* ---------- common pieces ---------- */
main { display: block; min-height: 60vh; }
.page { padding-block: 40px 0; display: flex; flex-direction: column; gap: 40px; }
.page-head { display: flex; flex-direction: column; gap: 10px; }
.page-head p { color: var(--ink-2); max-width: 65ch; }
.btn { display: inline-flex; align-items: center; gap: 8px; font: 600 0.95rem var(--sans); padding: 10px 16px; border-radius: 6px; border: 1px solid var(--band); background: var(--band); color: var(--band-ink); text-decoration: none; cursor: pointer; }
.btn:hover { color: var(--band-ink); filter: brightness(1.15); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn.ghost:hover { background: var(--hl-soft); filter: none; color: var(--ink); }
.btn.sm { padding: 6px 10px; font-size: 0.85rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 5px 12px; font: 0.88rem var(--sans); text-decoration: none; cursor: pointer; }
.chip:hover { background: var(--hl-soft); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--hl); border-color: var(--accent); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lc, var(--l-other)); flex: none; display: inline-block; }
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.panel h3 { font-size: 1.2rem; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .lbl { font-weight: 600; font-size: 0.9rem; }
input[type="text"], input[type="search"], input[type="email"], select, textarea { font: inherit; font-size: 0.95rem; color: var(--ink); background: var(--raised); border: 1px solid var(--rule); border-radius: 6px; padding: 9px 11px; width: 100%; }
textarea { min-height: 140px; resize: vertical; }
.hint { font-size: 0.85rem; color: var(--muted); }
.badge { display: inline-flex; align-items: center; font: 600 0.7rem var(--mono); letter-spacing: 0.06em; text-transform: uppercase; border-radius: 4px; padding: 2px 7px; white-space: nowrap; }
.b-doc { background: var(--t-doc-bg); color: var(--t-doc-fg); }
.b-story { background: var(--t-story-bg); color: var(--t-story-fg); }
.b-inf { background: var(--t-inf-bg); color: var(--t-inf-fg); }
.b-q { background: var(--t-q-bg); color: var(--t-q-fg); }
.b-cor { background: var(--t-cor-bg); color: var(--t-cor-fg); }
.b-res { background: var(--t-res-bg); color: var(--t-res-fg); }
.empty { color: var(--muted); font-style: italic; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--band); color: var(--band-ink); padding: 10px 16px; border-radius: 8px; z-index: 90; font-size: 0.9rem; }

/* person chip / row */
.pchip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--rule); background: var(--raised); border-radius: 999px; padding: 5px 12px 5px 6px; font-size: 0.9rem; color: var(--ink); text-decoration: none; }
.pchip:hover { background: var(--hl-soft); color: var(--ink); }
.pchip img, .pchip .ph0 { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.ph0 { background: var(--rule-soft); display: inline-block; border: 2px solid var(--lc, var(--l-other)); }
.prow { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.prow:hover { background: var(--hl-soft); color: var(--ink); }
.prow img, .prow .ph0 { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.prow .nm { font-weight: 600; overflow-wrap: anywhere; }
.prow .dt { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }
.prow .ln { font-size: 0.8rem; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; max-width: 170px; text-align: right; line-height: 1.3; }
.panel .prow { grid-template-columns: 40px minmax(0, 1fr); }
.panel .prow .ln { display: none; }
@media (max-width: 560px) { .prow { grid-template-columns: 40px minmax(0, 1fr); } .prow .ln { display: none; } }

/* ---------- home ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; padding-block: 48px 8px; }
.hero > * { min-width: 0; }
.hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
.hero p.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 56ch; }
.bigsearch { display: flex; gap: 8px; }
.bigsearch input { font-size: 1.05rem; padding: 12px 14px; }
.collage { display: grid; grid-template-columns: 1.15fr 1fr; grid-template-rows: auto auto; gap: 12px; }
.collage figure { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.collage figure:first-child { grid-row: span 2; }
.collage img { width: 100%; object-fit: cover; border-radius: 6px; background: var(--rule-soft); }
.collage figure:first-child img { height: 400px; }
.collage figure:not(:first-child) img { height: 194px; object-position: top; }
.collage figcaption { font-size: 0.8rem; color: var(--muted); }
.collage a { text-decoration: none; color: inherit; }
@media (max-width: 860px) { .hero { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 32px; } .collage figure:first-child img { height: 300px; } .collage figure:not(:first-child) img { height: 144px; } }
.stats { border-block: 1px solid var(--rule); }
.stats-in { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; padding-block: 20px; }
.stat b { display: block; font-family: var(--serif); font-size: 2rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 0.88rem; color: var(--muted); }
@media (max-width: 760px) { .stats-in { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.bcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .bcards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .bcards { grid-template-columns: minmax(0, 1fr); } }
.bcard { display: grid; grid-template-columns: 6px minmax(0, 1fr); background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; text-decoration: none; color: var(--ink); }
.bcard:hover { background: var(--hl-soft); color: var(--ink); }
.bcard > i { background: var(--lc); }
.bcard > div { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.bcard b { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; }
.bcard span { color: var(--ink-2); font-size: 0.92rem; }
.bcard .mono { font-size: 0.8rem; color: var(--muted); }
.feature { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; }
.feature > * { min-width: 0; }
@media (max-width: 860px) { .feature { grid-template-columns: minmax(0, 1fr); } }
.fstory { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--band); color: var(--band-ink); border-radius: 12px; overflow: hidden; text-decoration: none; }
.fstory:hover { color: var(--band-ink); }
.fstory img { width: 100%; height: 100%; min-height: 260px; object-fit: cover; }
.fstory div { padding: 28px; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.fstory .kicker { color: var(--band-accent); }
.fstory p { color: var(--band-muted); }
.fstory .go { color: var(--band-ink); font-weight: 600; }
@media (max-width: 560px) { .fstory { grid-template-columns: minmax(0, 1fr); } .fstory img { min-height: 200px; max-height: 240px; } }
.onthisday { display: flex; flex-direction: column; gap: 14px; }
.otd { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; font-size: 0.93rem; }
.otd .mono { font-size: 0.78rem; color: var(--muted); padding-top: 2px; }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .trio { grid-template-columns: minmax(0, 1fr); } }
.news { display: flex; flex-direction: column; gap: 10px; font-size: 0.93rem; }
.news .mono { font-size: 0.78rem; color: var(--muted); display: block; }
.banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; background: var(--hl); border: 1px solid var(--rule); border-radius: 12px; padding: 24px 28px; text-decoration: none; color: var(--ink); }
.banner:hover { color: var(--ink); background: var(--hl-soft); }
.banner b { font-family: var(--serif); font-size: 1.5rem; display: block; }

/* ---------- tree ---------- */
.tree-tools { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg a { padding: 8px 14px; font-size: 0.9rem; text-decoration: none; color: var(--ink); border-right: 1px solid var(--rule); }
.seg a:last-child { border-right: 0; }
.seg a[aria-current="true"] { background: var(--band); color: var(--band-ink); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.85rem; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.tree-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
@media (max-width: 1000px) { .tree-layout { grid-template-columns: minmax(0, 1fr); } }
.treebox { position: relative; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; overflow-x: auto; padding: 24px 16px; }
.hg { display: flex; flex-direction: column; align-items: center; gap: 0; min-width: max-content; margin-inline: auto; }
.gen { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.glabel { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.grow { display: flex; gap: 10px; justify-content: center; }
.conn { width: 2px; height: 20px; background: var(--rule); }
@media (max-width: 700px) { .glabel { align-self: flex-start; position: sticky; left: 0; } }
.pc { display: flex; align-items: stretch; width: 182px; min-height: 58px; background: var(--raised); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; text-decoration: none; color: var(--ink); text-align: left; }
.pc:hover { background: var(--hl-soft); color: var(--ink); }
.pc > i { background: var(--lc, var(--l-other)); width: 4px; flex: none; }
.pc img { width: 40px; height: 40px; flex: none; border-radius: 50%; object-fit: cover; margin: 8px 0 8px 8px; align-self: center; }
.pc > span { padding: 7px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.pc b { font-size: 0.86rem; line-height: 1.25; font-weight: 600; overflow-wrap: anywhere; }
.pc small { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.pc em { font-style: normal; font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.pc.sm { width: 150px; }
.pc.focus { border: 2px solid var(--accent); background: var(--hl); }
.pc.empty { border-style: dashed; background: transparent; color: var(--muted); }
.pc.empty > span { justify-content: center; font-size: 0.8rem; }
.tpanel { position: sticky; top: 96px; }
.tpanel .portrait { width: 100%; max-height: 260px; object-fit: cover; object-position: top; border-radius: 8px; }
.kv { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 6px 12px; font-size: 0.9rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.relbox { background: var(--hl-soft); border: 1px solid var(--rule); border-radius: 8px; padding: 12px 14px; font-size: 0.93rem; }
.fan svg { width: 100%; height: auto; max-width: 980px; display: block; margin-inline: auto; }
.fan text { font-family: var(--sans); fill: var(--ink); pointer-events: none; }
.fan .seg-a { cursor: pointer; }
.fan .seg-a:hover path { filter: brightness(0.94); }
.desc ul { list-style: none; margin: 0; padding-left: 22px; border-left: 1px solid var(--rule); display: flex; flex-direction: column; gap: 4px; }
.desc > ul { border-left: 0; padding-left: 0; }
.desc li { display: flex; flex-direction: column; gap: 4px; }
.desc details > summary { list-style: none; cursor: pointer; }
.desc details > summary::-webkit-details-marker { display: none; }
.dline { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 4px 0; }
.dline .tg { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.dline .sp { font-size: 0.85rem; color: var(--muted); }
.twist { display: inline-block; width: 14px; color: var(--muted); font-size: 0.75rem; }
details[open] > summary .twist { transform: rotate(90deg); }

/* ---------- person ---------- */
.ptop { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; }
.ptop > * { min-width: 0; }
.ptop .portrait { width: 220px; height: 270px; object-fit: cover; object-position: top; border-radius: 10px; background: var(--rule-soft); }
.ptop .noportrait { width: 220px; height: 270px; border-radius: 10px; border: 1px dashed var(--rule); display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; color: var(--muted); font-size: 0.9rem; }
@media (max-width: 680px) { .ptop { grid-template-columns: minmax(0, 1fr); } .ptop .portrait, .ptop .noportrait { width: 160px; height: 196px; } }
.pname { display: flex; flex-direction: column; gap: 10px; }
.lifeline { font-family: var(--mono); font-size: 1rem; color: var(--ink-2); }
.facts { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 6px 14px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.today { color: var(--muted); font-size: 0.88em; }
.youare { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--hl); border: 1px solid var(--accent); border-radius: 999px; padding: 6px 14px; font-size: 0.93rem; width: fit-content; max-width: 100%; }
.tl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tl li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-top: 1px solid var(--rule-soft); }
.tl li:first-child { border-top: 0; }
.tl .when { font-family: var(--mono); font-size: 0.82rem; color: var(--muted); padding-top: 2px; }
.tl .what { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tl .what b { font-weight: 600; }
.tl .note { color: var(--ink-2); font-size: 0.9rem; overflow-wrap: anywhere; }
@media (max-width: 560px) { .tl li { grid-template-columns: minmax(0, 1fr); gap: 4px; } }
.notes { display: flex; flex-direction: column; gap: 14px; }
.notes .n { display: flex; flex-direction: column; gap: 6px; padding-left: 14px; border-left: 3px solid var(--rule); }
.notes .n p { color: var(--ink); }
.fam { display: flex; flex-direction: column; gap: 14px; }
.fam h4 { margin: 0; font: 600 0.72rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.fam .list { display: flex; flex-direction: column; gap: 2px; }
.srcs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 0.9rem; }
.srcs b { display: block; }
.srcs span { color: var(--muted); font-family: var(--mono); font-size: 0.78rem; overflow-wrap: anywhere; }
.living-note { background: var(--hl-soft); border: 1px solid var(--rule); border-radius: 10px; padding: 18px 20px; max-width: 65ch; }

/* ---------- media ---------- */
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.mtile { display: flex; flex-direction: column; gap: 6px; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: var(--ink); font: inherit; }
.mtile img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 6px; background: var(--rule-soft); border: 1px solid var(--rule-soft); max-width: 100%; }
.mtile .t { font-size: 0.86rem; font-weight: 600; line-height: 1.3; }
.mtile .m { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.mtile:hover img { filter: brightness(0.92); }
.mtile .kind { position: relative; }
.mtile .kind .badge { position: absolute; left: 6px; top: 6px; }
.lb { position: fixed; inset: 0; background: var(--scrim); z-index: 80; display: grid; grid-template-columns: minmax(0, 1fr) 360px; }
.lb-img { display: flex; align-items: center; justify-content: center; padding: 56px 24px 24px; min-width: 0; min-height: 0; }
.lb-img img { max-width: 100%; max-height: calc(100vh - 100px); object-fit: contain; border-radius: 4px; }
.lb-side { background: var(--surface); color: var(--ink); padding: 56px 24px 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.lb-x { position: absolute; top: calc(10px + env(safe-area-inset-top, 0px)); right: 12px; z-index: 2; background: var(--raised); color: var(--ink); border: 1px solid var(--rule); border-radius: 6px; padding: 6px 12px; font: 600 0.9rem var(--sans); cursor: pointer; }
.lb-nav { display: flex; gap: 8px; }
@media (max-width: 860px) { .lb { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; } .lb-img { padding: 56px 12px 12px; } .lb-img img { max-height: 56vh; } .lb-side { max-height: 40vh; padding: 16px; } }

/* ---------- archive / people filters ---------- */
.filters { display: grid; grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; }
.filters > * { min-width: 0; }
@media (max-width: 900px) { .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } .filters > :first-child { grid-column: 1 / -1; } }
.alpha { display: flex; flex-direction: column; gap: 22px; }
.alpha h3 { font-size: 1.4rem; border-bottom: 1px solid var(--rule); padding-bottom: 4px; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
@media (max-width: 760px) { .cols { grid-template-columns: minmax(0, 1fr); } }

/* ---------- stories ---------- */
.scards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .scards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .scards { grid-template-columns: minmax(0, 1fr); } }
.scard { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.scard:hover { color: var(--ink); background: var(--hl-soft); }
.scard img, .scard .noimg { width: 100%; height: 190px; object-fit: cover; }
.scard .noimg { background: var(--band); display: flex; align-items: center; justify-content: center; color: var(--band-muted); font-family: var(--serif); font-size: 1.4rem; padding: 16px; text-align: center; }
.scard > div { padding: 4px 18px 18px; display: flex; flex-direction: column; gap: 8px; }
.scard b { font-family: var(--serif); font-size: 1.3rem; line-height: 1.2; }
.scard p { font-size: 0.92rem; color: var(--ink-2); }
.shero { background: var(--band); color: var(--band-ink); }
.shero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; padding-block: 48px; }
.shero-in > * { min-width: 0; }
.shero .kicker { color: var(--band-accent); }
.shero p { color: var(--band-muted); font-size: 1.08rem; }
.shero img { width: 100%; max-height: 380px; object-fit: cover; border-radius: 8px; }
@media (max-width: 860px) { .shero-in { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-block: 32px; } }
.prose { display: flex; flex-direction: column; gap: 20px; max-width: 68ch; }
.prose p { font-family: var(--serif); font-size: 1.2rem; line-height: 1.7; }
.prose h2 { margin-top: 12px; font-size: 1.75rem; }
.prose blockquote { margin: 4px 0; padding: 6px 0 6px 22px; border-left: 3px solid var(--l-ladell); }
.prose blockquote p { font-style: italic; font-size: 1.45rem; line-height: 1.45; }
.prose blockquote footer { margin-top: 8px; font-size: 0.88rem; color: var(--muted); }
.prose .verse { margin: 6px 0 6px 22px; padding-left: 16px; border-left: 2px solid var(--rule); font-family: var(--serif); font-style: italic; }
.prose .verse p { margin: 0 0 0.9em; line-height: 1.55; }
.prose .verse footer { font-style: normal; font-size: 0.88rem; color: var(--muted); }
.prose figure { margin: 4px 0; display: flex; flex-direction: column; gap: 8px; }
.prose figure button { padding: 0; border: 0; background: none; cursor: zoom-in; }
.prose figure img { width: 100%; max-height: 560px; object-fit: contain; background: var(--rule-soft); border-radius: 8px; }
.prose figcaption { font-size: 0.9rem; color: var(--muted); }
.prose .tagnote { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 14px 16px; }
.prose .tagnote p { font-family: var(--sans); font-size: 0.98rem; line-height: 1.55; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 0.93rem; }
.pager { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--rule); padding-top: 18px; }

/* ---------- journeys ---------- */
.mapwrap { position: relative; background: var(--map-sea); border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; touch-action: none; }
.mapwrap svg { display: block; width: 100%; height: clamp(320px, 56vh, 620px); cursor: grab; }
.mapwrap svg.drag { cursor: grabbing; }
.land { fill: var(--map-land); stroke: none; }
.borders { fill: none; stroke: var(--map-border); stroke-width: 0.8; vector-effect: non-scaling-stroke; }
.route { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; opacity: 0.72; cursor: pointer; }
.route.dim { opacity: 0.08; }
.route.on { opacity: 1; }
.pt { fill: var(--raised); stroke: var(--ink); vector-effect: non-scaling-stroke; stroke-width: 1.4; cursor: pointer; }
.pt.on { fill: var(--accent); }
.pt.dim { opacity: 0.25; }
.plabel { font-family: var(--sans); fill: var(--ink); paint-order: stroke; stroke: var(--map-land); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; font-weight: 600; }
.mapctl { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 6px; }
.mapctl button { width: 36px; height: 36px; border-radius: 6px; border: 1px solid var(--rule); background: var(--raised); color: var(--ink); font: 600 1.1rem var(--sans); cursor: pointer; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.jtools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 24px; align-items: center; }
@media (max-width: 860px) { .jtools { grid-template-columns: minmax(0, 1fr); } }
.yearbar { display: flex; align-items: center; gap: 12px; }
.yearbar input[type="range"] { flex: 1; min-width: 0; accent-color: var(--accent); }
.yearbar output { font-family: var(--mono); font-size: 1.1rem; width: 4ch; }
.tablewrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
th { font: 600 0.72rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); background: var(--surface); }
td.mono { white-space: nowrap; font-size: 0.82rem; }
tr:last-child td { border-bottom: 0; }

/* ---------- help ---------- */
.qlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.qlist li { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.formgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.formgrid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .formgrid { grid-template-columns: minmax(0, 1fr); } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; }
.check input { margin-top: 4px; }
.picker { position: relative; }
.picker .drop { left: 0; right: auto; width: 100%; }

@media (prefers-reduced-motion: no-preference) {
  .route { transition: opacity 0.2s; }
  html { scroll-behavior: smooth; }
}
/* pedigree */
.pedigree { overflow-x: auto; }
.pd-grid { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); column-gap: 18px; row-gap: 8px; min-width: 820px; }
.pd-cell + .pd-cell { }
.pd-head { font: 600 0.72rem/1.2 var(--mono, monospace); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding-bottom: 4px; }
.pd-cell { display: flex; align-items: center; position: relative; }
.pd-cell .pc { width: 100%; }
.pd-box { display: flex; width: 100%; background: var(--raised); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; text-decoration: none; color: var(--ink); }
.pd-box:hover { background: var(--hl-soft); color: var(--ink); }
.pd-box > i { width: 4px; flex: none; background: var(--lc, var(--l-other)); }
.pd-box > span { display: flex; flex-direction: column; gap: 2px; padding: 7px 10px; min-width: 0; }
.pd-box b { font-size: 0.9rem; line-height: 1.25; }
.pd-box small { font-size: 0.75rem; color: var(--muted); line-height: 1.3; }
/* timeline */
.tjump { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.tdec { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--rule); padding-top: 18px; }
.tlist, .tbd ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tlist li, .tbd li { display: grid; grid-template-columns: 9.5em 1fr; gap: 12px; align-items: baseline; }
.tlist li.tw { color: var(--muted); }
.tbd summary { cursor: pointer; color: var(--accent); }
.tbd ul { margin-top: 8px; }
@media (max-width: 560px) { .tlist li, .tbd li { grid-template-columns: 1fr; gap: 2px; } }
/* video tiles */
.mtile .kind { position: relative; }
.mtile .play { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.2rem; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.6); pointer-events: none; }
.lb-img video { max-width: 100%; max-height: 100%; background: #000; }
@media print {
  .site-head, .site-foot, .lb, .noprint, .tree-tools, .legend, .tpanel, .page-head p { display: none !important; }
  body { background: #fff; color: #000; }
  .tree-layout { display: block !important; }
  .treebox { overflow: visible !important; border: 0 !important; }
  .wrap, .page, .treebox, .pedigree { max-width: none !important; width: 100% !important; padding: 0 !important; }
  .pd-grid { --pdrow: 30px; min-width: 0; width: 100%; grid-template-columns: repeat(4, 1fr); row-gap: 4px; }
  .pd-box > span { padding: 4px 8px; }
  .pd-box b { font-size: 0.8rem; }
  .pd-box small { font-size: 0.68rem; }
  .pedigree > p { display: none; }
  .page-head { margin-bottom: 6px; }
  .tree-tools, .legend { display: none !important; }
  .pd-box { border-color: #999; background: #fff; }
}

/* Stories lists and family writing (7 Oct 2026) */
.slist { display: grid; gap: 10px; }
.srow { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); color: var(--ink); text-decoration: none; }
.srow:hover { background: var(--hl-soft); color: var(--ink); }
.srow b { font-family: var(--serif); font-size: 1.15rem; line-height: 1.25; }
.srow .small { color: var(--ink-2); }
h3.subh { font-size: 1rem; font-family: var(--sans, inherit); color: var(--ink-2); margin-top: 6px; }
.byline { font-style: italic; }
.prose.writing p { text-indent: 0; }
.ednote { background: var(--hl-soft); }
.fns { margin-top: 32px; border-top: 1px solid var(--rule); padding-top: 12px; font-size: 0.9rem; }
.fns h2 { font-size: 1.1rem; }
.fns ol { padding-left: 1.4em; display: grid; gap: 6px; }
sup.fnref a { text-decoration: none; padding: 0 1px; }
.rights { margin-top: 28px; border-top: 1px solid var(--rule); padding-top: 10px; }
@media print { .srow { break-inside: avoid; } }

/* Glossary, history notes, remembrance (11 Oct 2026) */
.extras { margin-top: 14px; }
.glist { display: grid; gap: 10px; }
.gl { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 16px; padding: 14px 16px; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); }
.gl.hl { outline: 2px solid var(--l-schreiber); }
.gl-w { display: flex; flex-direction: column; gap: 4px; }
.gl-w b { font-family: var(--serif); font-size: 1.25rem; }
.gl-m { display: flex; flex-direction: column; gap: 6px; }
.gl-q { font-style: italic; color: var(--ink-2); }
@media (max-width: 560px) { .gl { grid-template-columns: 1fr; gap: 6px; } }
.glmini { list-style: none; padding: 0; display: grid; gap: 6px; font-size: 0.92rem; }
.ctxlist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 800px) { .ctxlist { grid-template-columns: minmax(0, 1fr); } }
.ctx { padding: 14px 16px; border-left: 3px solid var(--l-ladell); background: var(--hl-soft); border-radius: 0 10px 10px 0; display: flex; flex-direction: column; gap: 6px; }
.ctx h3 { font-family: var(--serif); font-size: 1.1rem; }
.ctx p { font-size: 0.92rem; }
.ctxpanel .ctx { margin-bottom: 10px; }
.rem { list-style: none; padding: 0; display: grid; gap: 8px; }
.rem li { display: grid; grid-template-columns: minmax(180px, 1.2fr) 2fr auto auto; gap: 12px; align-items: center; padding: 10px 14px; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); }
.rem-n { display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 700px) { .rem li { grid-template-columns: 1fr; gap: 4px; } }
.rembar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; padding: 10px 14px; border-radius: 10px; background: var(--hl-soft); border: 1px solid var(--rule); font-size: 0.95rem; }

/* search results and update notice (16 Oct 2026) */
.srow mark { background: var(--hl); color: inherit; padding: 0 1px; border-radius: 2px; }
.srow .badge { width: fit-content; }
.updbar { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 95; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: center; background: var(--band); color: var(--band-ink); padding: 10px 16px; border-radius: 10px; font-size: 0.92rem; max-width: calc(100vw - 32px); box-shadow: 0 6px 24px rgba(0,0,0,.25); }
@media print { .updbar { display: none; } }

/* Person page shortcuts (14 Nov 2026) */
.pjump { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -8px 0 4px; padding: 10px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.pjump .pj-lab { font: 600 0.78rem var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted, #6b6b6b); margin-right: 4px; }
.pjump .pj-n { font: 0.78rem var(--mono, monospace); opacity: 0.7; }
#stories, #events, #notes, #docs, #photos, #sources, #family { scroll-margin-top: 96px; }
@media (max-width: 860px) { #stories, #events, #notes, #docs, #photos, #sources, #family { scroll-margin-top: 150px; } }

/* ============================================================
   Albums, the photo viewer, films and voices, family memories,
   route maps and the printable book (17 Nov 2026)
   ============================================================ */

/* ---- album cards ---- */
.acards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1000px) { .acards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .acards { grid-template-columns: minmax(0, 1fr); } }
.acard { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.acard:hover { color: var(--ink); background: var(--hl-soft); }
.acard:hover .acover img { transform: scale(1.03); }
.acover { position: relative; display: block; background: var(--rule-soft); aspect-ratio: 4 / 3; overflow: hidden; }
.acover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.25s ease; }
.acount { position: absolute; right: 10px; bottom: 10px; background: var(--scrim); color: #fff; border-radius: 999px; padding: 3px 11px; font: 600 0.8rem var(--mono); }
.abody { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 7px; }
.abody b { font-family: var(--serif); font-size: 1.25rem; line-height: 1.2; }
.abody .small { color: var(--ink-2); }
@media (prefers-reduced-motion: reduce) { .acover img { transition: none; } }

/* ---- photo viewer ---- */
.lb { position: fixed; inset: 0; background: #0D1211; z-index: 80;
  display: grid; grid-template-columns: minmax(0, 1fr) 360px;
  grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "bar side" "stage side" "strip side"; }
.lb[data-info="off"] { grid-template-columns: minmax(0, 1fr); grid-template-areas: "bar" "stage" "strip"; }
.lb[data-info="off"] .lb-side { display: none; }
.lb-bar { grid-area: bar; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; color: #fff; }
.lb-bar a { color: #fff; }
.lb-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.lb-bar .btn.ghost { background: var(--raised); color: var(--ink); border-color: var(--rule); }
.lb-stage { grid-area: stage; position: relative; display: flex; align-items: center; justify-content: center; padding: 8px 16px; min-width: 0; min-height: 0; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.lb-stage video { background: #000; }
.lb[data-zoom="on"] .lb-stage { overflow: auto; align-items: flex-start; justify-content: flex-start; cursor: zoom-out; }
.lb[data-zoom="on"] .lb-stage img { max-width: none; max-height: none; width: auto; border-radius: 0; }
.lb-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 46px; height: 68px;
  display: grid; place-items: center; border: 0; border-radius: 8px; cursor: pointer;
  background: rgba(20, 24, 23, 0.55); color: #fff; font-size: 2.1rem; line-height: 1; }
.lb-arrow:hover { background: rgba(20, 24, 23, 0.8); }
.lb-arrow.prev { left: 8px; } .lb-arrow.next { right: 8px; }
.lb[data-zoom="on"] .lb-arrow { display: none; }
.lb-strip { grid-area: strip; display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 0px)); scrollbar-width: thin; }
.lb-th { flex: 0 0 auto; width: 58px; height: 58px; padding: 0; border: 2px solid transparent; border-radius: 5px; background: none; cursor: pointer; overflow: hidden; opacity: 0.55; }
.lb-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-th:hover { opacity: 0.85; }
.lb-th.on { border-color: var(--accent, #9FD0DC); opacity: 1; }
.lb-side { grid-area: side; background: var(--surface); color: var(--ink); padding: 20px 22px 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.lb-side h3 { font-size: 1.2rem; line-height: 1.25; }
.lb-more { display: flex; flex-wrap: wrap; gap: 8px; }
.lb-more .chip { font-size: 0.82rem; }
@media (max-width: 860px) {
  .lb { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto; grid-template-areas: "bar" "stage" "strip" "side"; }
  .lb-bar { padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px; }
  .lb-side { max-height: 34vh; padding: 14px 16px 18px; border-top: 1px solid var(--rule); }
  .lb-side h3 { font-size: 1.08rem; }
  .lb-arrow { width: 38px; height: 56px; font-size: 1.7rem; }
  .lb-strip { padding: 6px 10px; }
  .lb-th { width: 44px; height: 44px; }
  /* with the details hidden the picture gets the whole screen */
  .lb[data-info="off"] .lb-stage { padding: 4px 8px; }
}
@media (max-width: 560px) { .lb-bar .mono { width: 100%; order: 2; } }

/* the photo being asked about, on the Can you help? form */
.aboutpic { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; align-items: start;
  background: var(--hl-soft); border: 1px solid var(--rule); border-radius: 10px; padding: 14px; }
.aboutpic img { width: 110px; height: 110px; object-fit: cover; border-radius: 6px; }
@media (max-width: 480px) { .aboutpic { grid-template-columns: 72px minmax(0, 1fr); } .aboutpic img { width: 72px; height: 72px; } }

/* ---- films and voices ---- */
.vframe { position: relative; background: #000; border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; }
.vframe iframe, .vframe video { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.chlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.chlist button { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; width: 100%; text-align: left;
  background: none; border: 1px solid transparent; border-radius: 8px; padding: 9px 12px; cursor: pointer; color: var(--ink); font: inherit; }
.chlist button:hover { background: var(--hl-soft); border-color: var(--rule); }
.chlist button[aria-current="true"] { background: var(--hl-soft); border-color: var(--rule); font-weight: 600; }
.chlist .mono { color: var(--accent); font-size: 0.86rem; }
@media (max-width: 480px) { .chlist button { grid-template-columns: 58px minmax(0, 1fr); gap: 8px; } }

/* ---- family memories ---- */
.shero.memhero { background: var(--hl-soft); }
.contribbar { border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.contribbar .lbl { font: 600 0.78rem var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.contribbar .chip img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.contribbar .chip .ph0 { width: 24px; height: 24px; border-radius: 50%; }
.memcard { display: flex; flex-direction: column; gap: 10px; margin: 26px 0; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--rule); border-left: 4px solid var(--lc, var(--accent, #9FD0DC)); border-radius: 0 10px 10px 0; }
.memwho { display: flex; align-items: center; gap: 10px; }
.memwho img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.memwho .ph0 { width: 36px; height: 36px; border-radius: 50%; background: var(--lc, var(--rule-soft)); }
.memwho span { display: flex; flex-direction: column; line-height: 1.3; }
.memwho b { font-family: var(--sans); font-size: 0.98rem; }
.memtext p { margin: 0 0 8px; text-indent: 0; }
.memtext p:last-child { margin-bottom: 0; }
.prose .memcard p { text-indent: 0; }

/* ---- route maps in stories ---- */
.routefig { margin: 30px 0; display: flex; flex-direction: column; gap: 10px; }
.rhead { display: flex; flex-direction: column; gap: 3px; }
.rhead b { font-family: var(--serif); font-size: 1.15rem; }
.rmap { display: block; width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 10px; }
.rmap .rbg { fill: var(--map-sea); }
.rmap .rline { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 7 5; }
.rmap .rstop { cursor: pointer; }
.rmap .rstop circle { fill: var(--ink); stroke: var(--map-sea); stroke-width: 2; }
.rmap .rstop .rnum { fill: var(--surface); font: 600 9px var(--mono); pointer-events: none; }
.rmap .rstop:hover circle, .rmap .rstop:focus circle { fill: var(--accent); }
.rmap .rstop:focus { outline: none; }
.rmap .rlab text { fill: var(--ink); font: 600 13px var(--sans); paint-order: stroke; stroke: var(--map-sea); stroke-width: 3.5px; stroke-linejoin: round; pointer-events: none; }
.rmap .rfurn text { fill: var(--muted); font: 600 11px var(--sans); }
.rmap .rfurn path { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.rstops { margin: 0; padding-left: 1.4em; display: grid; gap: 5px; font-size: 0.92rem; }
.prose .rstops li { text-indent: 0; }

/* ---- the printable book ---- */
.booktitle { text-align: center; border-top: 2px solid var(--rule); border-bottom: 2px solid var(--rule); padding: 48px 20px; display: flex; flex-direction: column; gap: 12px; }
.booktitle h1 { font-size: clamp(2rem, 6vw, 3.4rem); }
.bookcontents ol { padding-left: 1.6em; display: grid; gap: 6px; }
.bookstory { max-width: none; border-top: 1px solid var(--rule); padding-top: 28px; }
.bookstory > h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
.bookstory .dek { font-style: italic; color: var(--ink-2); text-indent: 0; }
.bookpage .acover img { transition: none; }

@media print {
  .pjump, .lb, .lb-strip, .acount { display: none !important; }
  .contribbar .chip img, .contribbar .chip .ph0, .memwho img, .memwho .ph0 { display: none; }
  .contribbar { border: 1px solid #999; }
  .bookstory { break-before: page; border-top: 0; }
  .bookstory:first-of-type { break-before: avoid; }
  .booktitle { break-after: page; border: 0; }
  .bookcontents { break-after: page; }
  .bookstory h2, .bookstory h3 { break-after: avoid; }
  .bookstory figure, .memcard, .tagnote, .routefig, blockquote, .verse, .fns li { break-inside: avoid; }
  .bookstory figure img { max-height: 10cm; width: auto; max-width: 100%; }
  .bookstory p, .memtext p { orphans: 3; widows: 3; }
  .memcard { border: 1px solid #999; border-left-width: 3px; }
  .prose { max-width: none; }
  .rmap { max-height: 9cm; }
  a[href^="#/"] { text-decoration: none; color: #000; }
}

/* two smaller banners side by side on the home page */
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 760px) { .duo { grid-template-columns: minmax(0, 1fr); } }
.banner.sm { padding: 18px 22px; flex-direction: column; align-items: flex-start; gap: 14px; }
.banner.sm b { font-size: 1.25rem; }
.banner.sm .btn { align-self: flex-start; }

/* an audio recording: a still to look at while you listen */
.aframe { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: center;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 18px; }
.aframe img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; display: block; }
.astack { display: flex; flex-direction: column; gap: 10px; }
.aframe audio { width: 100%; }
@media (max-width: 680px) { .aframe { grid-template-columns: minmax(0, 1fr); } .aframe img { max-width: 220px; margin: 0 auto; } }
