/* The parent site's journal system supplies colors, typography and spacing. */
:root { color-scheme: dark; scroll-behavior: smooth; }
* { box-sizing: border-box; }
.reading-guide {
  box-sizing: content-box;
  max-width: var(--container-width);
  padding: 48px 24px 24px;
}
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
a { text-underline-offset: 4px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 4px;
}
[hidden] { display: none !important; }
h1, h2, h3, p, figure { margin: 0; }
button { border: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link { position: absolute; top: -80px; left: 20px; background: var(--text-color); color: var(--bg-color); padding: 12px; z-index: 30; }
.skip-link:focus { top: 8px; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 52px; }
.site-header .avatar { flex-shrink: 0; }
.site-header .tagline { margin-bottom: 0; }
.home-link { font-size: .75rem; color: var(--muted-text); white-space: nowrap; text-decoration: none; border-bottom: 1px solid var(--accent-dim); }
@media (hover:hover) { .home-link:hover { color: var(--accent); } }
.reading-intro .blog-meta { font-size: .75rem; color: var(--muted-text); }
.blog-meta > span { padding: 0 8px; color: var(--accent); }
h1 { font-family: Georgia, 'Times New Roman', serif; font-size: 2.6rem; font-weight: 400; letter-spacing: -.045em; line-height: 1.2; margin: 13px 0 18px; }
.intro-copy { font-size: .9rem; color: var(--secondary-text); line-height: 1.8; }
.reading-position { margin: 26px 0; padding-left: 17px; border-left: 2px solid var(--accent); }
.position-label { color: var(--accent); text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; }
.reading-position p { margin-top: 6px; font-size: .8rem; line-height: 1.75; color: var(--secondary-text); }
.reading-position strong { color: var(--text-color); font-weight: 500; }
.reading-position p span { color: var(--muted-text); font-size: .75rem; }
.reading-position .position-label { display: block; }
.reading-position select { display: block; width: 100%; max-width: 420px; margin-top: 10px; background: #171714; color: var(--text-color); border: 1px solid var(--accent-dim); border-radius: 3px; font-size: .85rem; padding: 11px 10px; }
.chapter-list { list-style: none; padding: 0; margin: 22px 0 0; border-bottom: 1px solid var(--accent-dim); }
.chapter-entry { border-top: 1px solid var(--accent-dim); }
.chapter-entry summary { list-style: none; cursor: pointer; padding: 16px 28px 16px 0; position: relative; display: flex; flex-direction: column; gap: 4px; }
.chapter-entry summary::-webkit-details-marker { display: none; }
.chapter-entry summary::after { content: '+'; position: absolute; right: 2px; top: 22px; color: var(--accent); font-size: .95rem; }
.chapter-entry details[open] summary::after { content: '−'; }
.chapter-number { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-text); }
.chapter-title, .chapter-entry h3 { font-family: Georgia, 'Times New Roman', serif; font-size: 1.15rem; font-weight: 400; color: var(--text-color); }
@media (hover:hover) { .chapter-entry summary:hover .chapter-title { color: var(--accent); } }
.chapter-titles { font-size: .75rem; line-height: 1.7; color: var(--muted-text); margin: 0 0 12px; }
.chapter-summary { font-size: .875rem; line-height: 1.85; color: var(--secondary-text); margin: 2px 0 6px; }
.chapter-moments { margin: 16px 0 14px; }
.chapter-people { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; padding-bottom: 20px; font-size: .8rem; }
.chapter-people > span { color: var(--muted-text); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }
.chapter-entry.locked { padding: 16px 0; }
.chapter-entry.locked h3 { color: var(--muted-text); margin-top: 4px; }
.chapter-entry.locked .chapter-titles { margin: 6px 0 0; }
.chapter-lock { font-size: .7rem; color: var(--muted-text); margin-top: 6px; font-style: italic; }
.quick-search { margin: 28px 0 30px; position: relative; }
.quick-search > label { display: block; color: var(--secondary-text); font-size: .75rem; margin-bottom: 8px; }
.search-input-row { display: flex; align-items: center; border: 1px solid var(--accent-dim); padding: 0 12px; gap: 10px; background: #141412; border-radius: 3px; }
.search-input-row:focus-within { border-color: var(--accent); }
.search-input-row input { flex: 1; min-width: 0; border: 0; padding: 13px 0; color: var(--text-color); background: transparent; font-size: .875rem; }
.search-input-row input:focus-visible { outline-offset: 0; }
.search-input-row input::placeholder { color: var(--muted-text); }
.search-input-row > button { background: transparent; color: var(--accent); font-size: .8rem; min-height: 44px; padding: 0 6px; }
kbd { border: 1px solid #454238; border-radius: 3px; color: var(--muted-text); width: 22px; height: 24px; text-align: center; font: .75rem/22px system-ui, sans-serif; }
#quick-search-output { margin-top: 10px; padding: 12px 16px; border: 1px solid var(--accent-dim); border-radius: 3px; background: #141412; }
.search-count { font-size: .75rem; color: var(--muted-text); }
#quick-results { list-style: none; padding: 0; margin: 10px 0 0; }
#quick-results button { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; text-align: left; width: 100%; background: transparent; border-top: 1px solid #343127; padding: 12px 0; }
#quick-results strong { font: 1rem Georgia, serif; color: var(--accent); }
#quick-results span { font-size: .75rem; color: var(--secondary-text); text-align: right; }
@media (hover:hover) { #quick-results button:hover strong { text-decoration: underline; text-underline-offset: 4px; } }
.section-nav { position: sticky; top: 2px; z-index: 10; margin: 0 0 36px; background: var(--bg-color); border-block: 1px solid var(--accent-dim); }
.nav-inner { display: flex; justify-content: space-between; gap: 14px; }
.nav-inner a { color: var(--muted-text); font-size: .8rem; padding: 14px 0 13px; text-decoration: none; border-bottom: 1px solid transparent; margin-bottom: -1px; }
.nav-inner a.active { color: var(--accent); border-bottom-color: var(--accent); }
.guide-section { margin: 0; padding: 20px 0 40px; scroll-margin-top: 76px; }
.guide-section + .guide-section { border-top: 1px solid var(--accent-dim); padding-top: 34px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 12px; }
h2 { font: 400 1.45rem/1.4 Georgia, 'Times New Roman', serif; letter-spacing: -.025em; color: var(--text-color); }
h3 { font: 400 1.15rem/1.5 Georgia, 'Times New Roman', serif; }
.section-meta { font-size: .72rem; color: var(--muted-text); white-space: nowrap; }
.section-description { font-size: .85rem; color: var(--secondary-text); line-height: 1.8; margin-bottom: 22px; }
.tree-switch { display: flex; flex-wrap: wrap; gap: 18px; margin: 0 0 16px; }
.tree-switch button { min-height: 44px; padding: 8px 0; font-size: .78rem; background: transparent; border-bottom: 1px solid transparent; color: var(--secondary-text); }
.tree-switch button[aria-selected=true] { color: var(--accent); border-bottom-color: var(--accent); }
@media (hover:hover) { .tree-switch button:hover { color: var(--text-color); } }
.wide-figure { width: min(900px, calc(100vw - 48px)); position: relative; left: 50%; transform: translateX(-50%); }
.tree-shell {
  --figure-ink: #2f302b;
  --figure-muted: #625e53;
  --figure-line: #c9c1ad;
  --figure-accent: #6e5327;
  background: var(--plate-bg);
  color: var(--figure-ink);
  border-radius: 4px;
  padding: 32px 38px 25px;
  color-scheme: light;
}
.tree-shell button:focus-visible { outline-color: var(--figure-accent); }
.eyebrow { font-size: .72rem; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.tree-shell .eyebrow { color: var(--figure-accent); }
.tree-root { text-align: center; }
.tree-root p { font: 1rem/1.7 Georgia, serif; margin-top: 8px; }
.cousin-branches { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 44px; padding-top: 30px; position: relative; }
.cousin-branches::before { content: ''; position: absolute; top: 17px; left: 25%; width: 50%; height: 13px; border: 1px solid var(--figure-line); border-bottom: 0; }
.cousin-branches::after { content: ''; position: absolute; left: 50%; top: 0; height: 17px; border-left: 1px solid var(--figure-line); }
.family-branch { min-width: 0; text-align: center; }
.branch-label { font-size: .72rem; color: var(--figure-muted); display: flex; align-items: center; justify-content: center; gap: 8px; margin: 18px 0 13px; }
.family-dot { width: 7px; height: 7px; border: 1px solid var(--figure-accent); display: inline-block; transform: rotate(45deg); }
.family-dot.rust { background: var(--figure-accent); }
.parent-row { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 140px; }
.parent-row > div, .parent-row > button { min-width: 0; }
.union { color: var(--figure-accent); font: 1.1rem Georgia, serif; }
.name-node { font: 1.2rem/1.3 Georgia, serif; display: block; color: var(--figure-ink); background: transparent; border-bottom: 1px solid transparent; border-radius: 0; padding: 8px 6px; max-width: 100%; }
@media (hover:hover) { .name-node:hover { color: var(--figure-accent); border-bottom-color: var(--figure-accent); } }
.name-node small { display: block; font: .72rem/1.55 system-ui, sans-serif; color: var(--figure-muted); margin-top: 6px; }
.name-node.compact { display: inline-block; padding-block: 3px; font-size: 1.1rem; }
.and { display: block; font-size: .72rem; line-height: 1.4; color: var(--figure-muted); }
.descent { height: 25px; width: 1px; background: var(--figure-line); margin: auto; position: relative; }
.descent::after { content: ''; position: absolute; bottom: 0; left: -2px; width: 5px; height: 5px; border-right: 1px solid var(--figure-line); border-bottom: 1px solid var(--figure-line); transform: rotate(45deg); }
.children-box { border-top: 1px solid var(--figure-accent); border-bottom: 1px solid var(--figure-line); min-height: 300px; padding: 20px 10px; }
.children-box > .eyebrow { margin-bottom: 9px; }
.children-box > .name-node { margin: 0 auto; }
.name-node.featured { font-size: 1.35rem; }
.branch-foot { font-size: .75rem; line-height: 1.8; color: var(--figure-muted); margin-top: 18px; }
.brother-nodes { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; }
.brother-nodes .featured { grid-column: 1/-1; justify-self: center; }
.elder-strip { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 44px; padding: 25px 0 21px; border-bottom: 1px solid var(--figure-line); }
.elder-strip > div { display: grid; grid-template-columns: auto 1fr; gap: 17px; align-items: start; }
.elder-strip p { color: var(--figure-muted); font-size: .75rem; line-height: 1.75; }
.elder-divider { display: none; }
.inline-name { font: inherit; text-align: left; padding: 0; color: var(--accent); background: transparent; border-bottom: 1px solid var(--accent-dim); }
@media (hover:hover) { .inline-name:hover { border-bottom-color: var(--accent); } }
.tree-shell .inline-name { font: 1.1rem/1.4 Georgia, serif; color: var(--figure-ink); border-color: var(--figure-line); }
@media (hover:hover) { .tree-shell .inline-name:hover { color: var(--figure-accent); border-color: var(--figure-accent); } }
.tree-note { font-size: .75rem; color: var(--figure-muted); line-height: 1.8; margin-top: 20px; }
.family-figure figcaption { font-size: .72rem; color: var(--muted-text); margin-top: 12px; line-height: 1.7; }
.family-figure figcaption > span { color: var(--accent); margin-right: 8px; font-variant-caps: all-small-caps; letter-spacing: .08em; }
.ancestry-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 30px; margin: 28px 0; }
.lineage { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.lineage-parents { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; min-height: 56px; }
.lineage-parents .inline-name { font-size: 1rem; }
.lineage-parents > span { font-size: .8rem; color: var(--figure-muted); }
.lineage-arrow { font: 1.4rem Georgia, serif; color: var(--figure-accent); margin: 9px 0; }
.lineage > .name-node { border-block: 1px solid var(--figure-line); width: 100%; min-height: 77px; display: flex; flex-direction: column; justify-content: center; }
.lineage > p { font-size: .75rem; line-height: 1.7; color: var(--figure-muted); margin-top: 14px; }
.marginal-note { border-left: 2px solid var(--figure-accent); padding: 2px 0 2px 18px; margin: 26px 0; }
.note-label { color: var(--figure-accent); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.marginal-note p { font-size: .8rem; line-height: 1.8; margin-top: 6px; }
.second-generation { margin-top: 30px; }
.next-generation { margin-bottom: 0; }
.birth-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 44px; margin: 25px 0; }
.mother-name { margin: 0 auto 17px; font-size: 1.4rem; }
.birth-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--figure-line); padding: 15px 0; }
.birth-row > span { font-size: .72rem; color: var(--figure-muted); text-align: right; }
.mother-note { font-size: .75rem; color: var(--figure-muted); line-height: 1.75; margin-top: 20px; }
.birth-legend { font-size: .75rem; color: var(--figure-muted); line-height: 1.75; }
.karna-note { border-top: 1px solid var(--figure-line); padding-top: 23px; margin-top: 23px; }
.karna-note h3 { font-size: 1.15rem; margin: 10px 0; }
.karna-note h3 .inline-name { font: inherit; }
.karna-note p:not(.eyebrow) { font-size: .8rem; line-height: 1.85; }
.karna-note .small { margin-top: 10px; color: var(--figure-muted); font-size: .75rem !important; }
.cast-filters { display: flex; flex-wrap: wrap; gap: 6px 19px; margin: 9px 0 15px; }
.cast-filters button { min-height: 42px; font-size: .75rem; color: var(--muted-text); background: transparent; padding: 4px 0; border-bottom: 1px solid transparent; }
.cast-filters button[aria-pressed=true] { color: var(--accent); border-bottom-color: var(--accent); }
.character-index { border-top: 1px solid var(--accent-dim); }
.character-card { display: grid; grid-template-columns: 154px 1fr 12px; align-items: baseline; gap: 18px; width: 100%; padding: 18px 0; text-align: left; background: transparent; border-bottom: 1px solid var(--accent-dim); }
.character-name { font: 1rem/1.5 Georgia, serif; color: var(--text-color); }
.character-description { font-size: .8rem; line-height: 1.75; color: var(--secondary-text); }
.row-arrow { color: var(--accent); font-size: .85rem; }
@media (hover:hover) { .character-card:hover .character-name { color: var(--accent); } }
.empty-state { padding: 25px 0; }
.empty-state h3 { font-size: 1rem; margin-bottom: 10px; }
.empty-state p { color: var(--secondary-text); font-size: .8rem; }
.index-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-top: 20px; font-size: .75rem; }
.index-foot a { color: var(--muted-text); text-decoration: none; border-bottom: 1px solid var(--accent-dim); }
.index-foot a span { font-size: .72rem; color: var(--accent); margin-left: 5px; }
.person-selects { display: grid; grid-template-columns: minmax(0,1fr) 20px minmax(0,1fr); gap: 16px; align-items: end; }
.person-selects label { font-size: .75rem; color: var(--secondary-text); }
.person-selects select { display: block; width: 100%; min-width: 0; background: #171714; color: var(--text-color); border: 1px solid var(--accent-dim); border-radius: 3px; font-size: .9rem; padding: 12px 10px; margin-top: 8px; }
.connection-symbol { text-align: center; color: var(--accent); font: 1.2rem Georgia, serif; padding-bottom: 12px; }
.find-connection { margin-top: 15px; padding: 10px 14px; background: transparent; color: var(--accent); border: 1px solid var(--accent-dim); border-radius: 3px; font-size: .8rem; min-height: 44px; }
.find-connection > span { padding-left: 16px; }
@media (hover:hover) { .find-connection:hover { border-color: var(--accent); } }
.common-pairs { display: flex; flex-wrap: wrap; gap: 3px 17px; margin: 19px 0 20px; align-items: center; }
.common-pairs > span { color: var(--muted-text); font-size: .75rem; }
.common-pairs button { padding: 7px 0; min-height: 38px; color: var(--secondary-text); background: transparent; text-decoration: underline; text-decoration-color: var(--accent-dim); text-underline-offset: 4px; font-size: .75rem; }
.connection-result { border-left: 2px solid var(--accent); padding: 1px 0 1px 21px; margin-top: 14px; }
.connection-result .eyebrow { font-size: .72rem; }
.connection-result h3 { font-size: 1.2rem; line-height: 1.55; margin: 10px 0; }
.connection-result > p:not(.eyebrow) { color: var(--secondary-text); font-size: .85rem; line-height: 1.85; }
.connection-result .trail-note { color: var(--muted-text); font-size: .75rem !important; margin-top: 14px; }
.trail-list { padding: 0; margin: 17px 0; list-style: none; }
.trail-list li { color: var(--secondary-text); font-size: .85rem; line-height: 2; border-top: 1px solid var(--accent-dim); padding: 10px 0; }
.trail-list span { margin-inline: 5px; }
.recap { padding-left: 22px; margin: 22px 0 35px; font-size: .875rem; color: var(--secondary-text); line-height: 1.85; }
.recap li { padding: 0 0 15px 5px; }
.recap li::marker { color: var(--accent); font-size: .75rem; }
.recap strong { color: var(--text-color); font-weight: 500; }
.pocket-notes h3 { margin-bottom: 18px; }
.pocket-notes details { border-top: 1px solid var(--accent-dim); padding: 14px 0; }
.pocket-notes summary { font-size: .85rem; color: var(--text-color); cursor: pointer; }
.pocket-notes details p { font-size: .85rem; line-height: 1.85; color: var(--secondary-text); margin-top: 13px; }
.sources-section { border-top: 1px solid var(--accent-dim); padding: 22px 0; margin: 0; }
.sources-section summary { color: var(--muted-text); font-size: .75rem; cursor: pointer; }
.source-copy { padding-top: 21px; }
.source-copy p { color: var(--secondary-text); font-size: .8rem; line-height: 1.85; margin-bottom: 16px; }
.source-copy .source-warning { color: var(--accent); }
.source-links { display: flex; flex-wrap: wrap; gap: 12px 22px; font-size: .75rem; margin: 17px 0; }
.source-links a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-dim); }
.guide-footer { border-top: 1px solid var(--accent-dim); padding-top: 22px; display: flex; gap: 20px; justify-content: space-between; font-size: .75rem; }
.guide-footer a { color: var(--muted-text); text-decoration: none; }
@media (hover:hover) { .guide-footer a:hover { color: var(--accent); } }
.field-note { font-size: .8rem; margin-top: 20px; line-height: 1.8; color: var(--secondary-text); }
dialog { width: min(520px, calc(100% - 32px)); max-height: 88dvh; padding: 0; background: #141412; color: var(--text-color); border: 1px solid #73603d; border-radius: 4px; box-shadow: 0 20px 80px #0009; }
dialog::backdrop { background: #000b; }
.dialog-shell { padding: 23px 30px 30px; }
.dialog-toolbar { display: flex; align-items: center; justify-content: space-between; margin: 0 0 23px; min-height: 36px; position: sticky; top: 0; z-index: 2; background: #141412; }
.dialog-toolbar button { background: transparent; padding: 8px 0; min-height: 40px; color: var(--secondary-text); font-size: .75rem; }
#dialog-close { margin-left: auto; }
#dialog-close span { font-size: 1.2rem; padding-left: 10px; }
.dialog-shell h2 { font-size: 1.9rem; margin: 12px 0 8px; }
.dialog-role { color: var(--secondary-text); font-size: .8rem; }
.dialog-anchor { font: 1.15rem/1.7 Georgia, serif; padding: 18px 0; margin: 20px 0; border-block: 1px solid var(--accent-dim); }
#dialog-description { color: var(--secondary-text); font-size: .875rem; line-height: 1.85; }
.dialog-aliases { font-size: .75rem; color: var(--muted-text); margin-top: 17px; }
.dialog-subheading { font-size: 1rem; margin-top: 25px; }
#dialog-relations { list-style: none; padding: 0; margin: 13px 0 0; }
#dialog-relations li { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; border-top: 1px solid var(--accent-dim); padding: 12px 0; font-size: .8rem; }
#dialog-relations li > span { color: var(--secondary-text); }
#dialog-relations .inline-name { text-align: right; }
.dialog-foot { font-size: .72rem; color: var(--muted-text); margin-top: 25px; }
body.modal-open { overflow: hidden; }
@media (max-width: 700px) {
  .reading-guide { padding-top: 28px; }
  .site-header { margin-bottom: 35px; }
  .site-header .avatar { width: 44px; height: 44px; }
  .site-header .header-row { gap: 12px; }
  .site-header .name { font-size: 1.05rem; }
  .site-header .tagline { font-size: .72rem; }
  .home-link { font-size: .72rem; }
  h1 { font-size: 2.25rem; }
  .tree-shell { padding: 26px 22px 22px; }
  .cousin-branches { gap: 25px; }
  .parent-row { gap: 6px; }
  .parent-row .name-node { font-size: 1rem; }
  .elder-strip { gap: 25px; }
  .elder-strip > div { display: block; }
  .elder-strip p { margin-top: 9px; }
  .ancestry-grid { gap: 18px; }
  .lineage-parents { flex-direction: column; min-height: 95px; }
  .lineage > .name-node { font-size: 1rem; }
  .birth-grid { gap: 28px; }
  .birth-row { flex-direction: column; align-items: start; gap: 6px; }
  .birth-row > span { text-align: left; }
}
@media (max-width: 520px) {
  .reading-guide { padding-inline: 20px; }
  .wide-figure { width: calc(100vw - 40px); }
  .nav-inner { gap: 10px; }
  .nav-inner a { font-size: .72rem; }
  .reading-position { margin-block: 23px; }
  .search-input-row input { font-size: 16px; }
  .search-input-row input::placeholder { font-size: .8rem; }
  kbd { display: none; }
  .quick-search { margin-bottom: 23px; }
  h2 { font-size: 1.25rem; }
  .section-description { font-size: .85rem; }
  .section-meta { font-size: .72rem; }
  .tree-switch { gap: 15px; }
  .tree-switch button { font-size: .72rem; }
  .tree-shell { padding: 24px 18px 22px; }
  .tree-root p { font-size: .95rem; }
  .cousin-branches { grid-template-columns: minmax(0,1fr); gap: 25px; padding-top: 20px; }
  .cousin-branches::before, .cousin-branches::after { display: none; }
  .parent-row { flex-direction: column; gap: 0; min-height: 0; margin-top: 16px; }
  .parent-row .name-node { font-size: 1.2rem; }
  .parent-row .union { font-size: .85rem; line-height: 1.4; }
  .parent-row > div .and { display: inline-block; padding-inline: 9px; }
  .parent-row > div { padding-block: 8px; }
  .children-box { min-height: 0; padding: 19px 8px; }
  .children-box > .name-node { font-size: 1.2rem; }
  .name-node.featured { font-size: 1.3rem; }
  .brother-nodes { gap: 7px; }
  .brother-nodes .name-node { font-size: 1.15rem; }
  .brother-nodes .featured { font-size: 1.3rem; }
  .branch-label { margin-top: 6px; }
  .elder-strip { grid-template-columns: minmax(0,1fr); gap: 22px; }
  .elder-strip > div { display: grid; grid-template-columns: 67px 1fr; gap: 16px; }
  .elder-strip p { margin: 0; }
  .ancestry-grid { grid-template-columns: minmax(0,1fr); gap: 30px; }
  .lineage-parents { flex-direction: row; min-height: 0; gap: 8px; }
  .lineage > .name-node { font-size: 1.2rem; }
  .lineage p { max-width: 300px; }
  .birth-grid { grid-template-columns: minmax(0,1fr); }
  .birth-row { flex-direction: row; align-items: baseline; gap: 12px; }
  .birth-row > span { text-align: right; }
  .birth-row .inline-name { font-size: 1rem; }
  .character-card { grid-template-columns: minmax(0,1fr) 12px; gap: 7px 13px; padding: 17px 0; }
  .character-name { grid-column: 1; }
  .character-description { grid-column: 1; font-size: .82rem; }
  .row-arrow { grid-row: 1; grid-column: 2; }
  .cast-filters { gap: 3px 19px; }
  .index-foot { font-size: .75rem; }
  .person-selects { grid-template-columns: minmax(0,1fr) 10px minmax(0,1fr); gap: 8px; }
  .person-selects select { padding: 12px 5px; font-size: 16px; }
  .connection-symbol { font-size: 1rem; }
  .find-connection { width: 100%; }
  .common-pairs { gap: 4px 16px; }
  .common-pairs > span { flex-basis: 100%; }
  .connection-result { padding-left: 17px; }
  .connection-result h3 { font-size: 1.1rem; }
  .guide-footer { flex-wrap: wrap; gap: 14px 20px; }
  .dialog-shell { padding: 18px 22px 25px; }
  .dialog-shell h2 { font-size: 1.7rem; }
  #dialog-relations li { gap: 13px; }
}
@media (max-width: 359px) {
  .home-link { display: none; }
  .tree-switch { gap: 11px; }
  .tree-switch button { font-size: .72rem; }
  .tree-shell { padding-inline: 15px; }
  .birth-row { flex-direction: column; gap: 4px; }
  .birth-row > span { text-align: left; }
  .person-selects { grid-template-columns: minmax(0,1fr); gap: 8px; }
  .connection-symbol { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .reading-guide { background: white; color: #222; max-width: none; padding: 0; }
  .site-header, .quick-search, .section-nav, .tree-switch, .cast-filters, .relationship-form, .common-pairs, .sources-section, .guide-footer, dialog { display: none !important; }
  .wide-figure { width: 100%; left: 0; transform: none; }
  .guide-section { break-inside: avoid; }
  h1, h2, h3, .character-name { color: #222; }
  p, .character-description, .recap, .pocket-notes p { color: #444 !important; }
}

/* Elders are a shared annotation, never positioned under one branch. */
.shared-elder-label { margin-top: 28px; border-top: 1px solid var(--figure-line); padding-top: 18px; color: var(--figure-accent); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.elder-strip { display: block; padding-top: 18px; }
.elder-strip > div { display: grid; grid-template-columns: 80px minmax(0,1fr); gap: 20px; }
.elder-strip > div + .elder-divider + div { margin-top: 16px; }
.elder-strip p { margin: 0; }
.reader-note { margin-top: 20px; border-left: 2px solid var(--accent); padding-left: 15px; }
.reader-note > span { font-size: .72rem; color: var(--accent); }
.reader-note p { margin-top: 8px; color: var(--secondary-text); font-size: .8rem; line-height: 1.85; }
@media (max-width:520px) {
  .parent-row > div .name-node.compact { display: block; text-align: center; margin-inline: auto; }
  .parent-row > div .and { display: block; padding-block: 5px; }
  .elder-strip > div { grid-template-columns: 65px minmax(0,1fr); gap: 15px; }
  .shared-elder-label { font-size: .72rem; line-height: 1.8; }
}

/* Late in the file so it beats the base tab layout. */
@media (max-width:520px) {
  .tree-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
  .tree-switch button { text-align: left; }
}
.reader-note.dialog-update { border-left-color: var(--accent-dim); }
.reader-note.dialog-update > span { color: var(--secondary-text); }
.reader-note.dialog-update summary { font-size: .75rem; color: var(--muted-text); cursor: pointer; }
.reader-note.dialog-update ol { list-style: none; padding: 0; margin: 8px 0 0; }
.reader-note.dialog-update li { color: var(--secondary-text); font-size: .8rem; line-height: 1.8; padding: 0 0 10px; }
.note-chapter { display: inline-block; min-width: 46px; color: var(--accent); font-size: .7rem; letter-spacing: .04em; }
.bookmark-row { display: flex; gap: 10px; align-items: stretch; margin-top: 10px; max-width: 520px; }
.bookmark-row select { margin-top: 0; flex: 1; min-width: 0; }
.bookmark-row button { flex-shrink: 0; padding: 0 14px; min-height: 44px; font-size: .78rem; color: var(--accent); background: transparent; border: 1px solid var(--accent-dim); border-radius: 3px; }
@media (hover:hover) { .bookmark-row button:hover { border-color: var(--accent); } }
#bookmark-link { margin-top: 10px; font-size: .78rem; color: var(--secondary-text); }
#bookmark-link button { background: transparent; color: var(--accent); padding: 0; border-bottom: 1px solid var(--accent-dim); font-size: .78rem; }
.reader-note.dialog-update > span em { font-style: normal; color: var(--accent); margin-left: 6px; }
.reader-note.dialog-update details { margin-top: 12px; }
@media (max-width:420px) { .bookmark-row { flex-direction: column; } .bookmark-row button { align-self: flex-start; } }
.bookmark-row button.pending { color: var(--bg-color); background: var(--accent); border-color: var(--accent); }
[role=tabpanel]:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
@media print { .guide-section { break-inside: auto !important; } .reading-position, #bookmark-link, .chapter-entry.locked, .reader-note.dialog-update details summary { display: none !important; } .tree-shell > [role=tabpanel] { margin-bottom: 28px; break-inside: avoid; } }
@media print {
  .reading-guide strong, .chapter-title, .chapter-entry h3, .recap strong, .pocket-notes summary, .character-name, .section-heading h2, h1 { color: #1d1b16 !important; }
  .chapter-number, .chapter-titles, .chapter-people > span, .section-meta, .eyebrow, .note-label { color: #6b5a33 !important; }
  .reading-guide .inline-name, .chapter-people .inline-name, .recap li::marker { color: #6b5a33 !important; }
  .chapter-entry summary::after { content: none !important; }
}

.character-print { display: none; }
@media print {
  html, body, .reading-guide { background: #fff !important; }
  .tree-shell > [role=tabpanel] { break-inside: auto !important; }
  .family-figure figcaption, #recap, #recap-intro, .index-foot, .row-arrow, .quick-search, #character-dialog { display: none !important; }
  .character-print { display: block; font-size: .78rem; line-height: 1.6; color: #444; margin-top: 4px; }
  .character-card { break-inside: avoid; }
}
@media (max-width:360px) { .nav-inner a { font-size: .68rem; } }
@media print {
  @page { margin: 0; }
  .reading-guide { padding: 16mm 15mm !important; }
  .character-card { display: block !important; padding: 10px 0 !important; }
  .character-card .character-name { display: block; }
}
.chapter-entry { scroll-margin-top: 76px; }
@media (max-width:520px) { .chapter-people .inline-name, .tree-shell .inline-name { padding-block: 10px; } }
.print-stop { display: none; }
@media print { .print-stop { display: block; font-size: .8rem; color: #6b5a33; margin: 8px 0; } }
.chapter-here { margin-left: 10px; color: var(--accent); letter-spacing: .06em; }
.chapter-entry.current .chapter-title { color: var(--accent); }
@media print { .screen-only { display: none !important; } }
html { scroll-padding-top: 76px; }
.print-only { display: none; }
@media print { .print-only { display: block; } }
