/* Konxheli family archive — local, dependency-free presentation. */

:root {
  color-scheme: light;
  --paper: #f7f8f2;
  --surface: #ffffff;
  --ink: #24372f;
  --muted: #7b867d;
  --forest: #214f43;
  --forest-deep: #183e34;
  --sage: #e9eee5;
  --sage-soft: #f2f5ed;
  --line: #e2e7dd;
  --connector: #cbd5c7;
  --ochre: #bd9451;
  --shadow: 0 6px 22px rgba(37, 63, 45, .035);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button { color: inherit; }
button:disabled { cursor: default; opacity: .46; }
a { color: var(--forest); text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, select, a { touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid #b59456; outline-offset: 4px; }
button:focus:not(:focus-visible) { outline: none; }
button svg, a svg { flex: 0 0 auto; }
svg { width: 20px; height: 20px; vertical-align: middle; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.skip-link { position: fixed; z-index: 100; top: 12px; left: 12px; padding: 12px 18px; border-radius: 8px; background: var(--forest); color: white; transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.loading { padding: 36px; color: var(--forest); }
.app-shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; min-width: 0; height: 100dvh; padding: 38px 23px 24px; border-right: 1px solid var(--line); background: #fbfcf7; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 48px; color: var(--forest); text-decoration: none; }
.brand-mark { display: flex; align-items: center; justify-content: center; flex: 0 0 40px; width: 40px; height: 44px; border: 1px solid #b9c8b7; border-radius: 14px 14px 4px 4px; background: var(--sage-soft); color: var(--forest); font: 25px Georgia, serif; }
.brand-mark svg { width: 26px; height: 26px; }
.brand-title { display: block; color: var(--forest); font: 24px/1.1 Georgia, "Times New Roman", serif; letter-spacing: -.7px; }
.brand-subtitle { display: block; margin-top: 6px; font-size: 9px; font-weight: 650; text-transform: uppercase; letter-spacing: 1.75px; color: #7e897b; }
.sidebar nav { display: grid; gap: 7px; }
.nav-button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 45px; padding: 11px 13px; border: 0; border-radius: 7px; background: transparent; color: #6d7a6f; text-align: left; font-size: 13px; font-weight: 500; transition: background .16s ease, color .16s ease; }
.nav-button:hover { color: var(--forest); background: #f0f3eb; }
.nav-button.active { background: #e7eee2; color: var(--forest); font-weight: 650; }
.nav-button svg { width: 18px; height: 18px; opacity: .85; }
.sidebar-label { margin: 35px 12px 12px; color: #94a08e; font-size: 9px; font-weight: 700; letter-spacing: 1.7px; text-transform: uppercase; }
.branch-shortcut { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 40px; padding: 10px 13px; background: none; border: 0; text-align: left; color: #62725e; font-size: 12px; }
.branch-shortcut:hover { background: var(--sage-soft); border-radius: 6px; }
.branch-shortcut > svg { width: 16px; height: 16px; }
.branch-shortcut::before { content: ""; width: 5px; height: 5px; background: #b8c5ad; border-radius: 50%; }
.branch-shortcut > span:last-child:not(:first-child) { margin-left: auto; }
.sidebar-bottom { margin-top: auto; padding-top: 32px; }
.archive-card { display: block; width: 100%; padding: 16px; border: 1px solid #e1e7d8; border-radius: 9px; background: #f0f3e9; color: #68775f; text-align: left; }
.archive-card svg { width: 20px; height: 20px; margin-bottom: 11px; color: #8a997c; }
.archive-card strong { display: block; margin-bottom: 5px; color: #435b45; font-size: 12px; font-weight: 600; }
.archive-card p, .archive-card small { display: block; font-size: 11px; line-height: 1.65; color: #87917d; }
.archive-card:hover { border-color: #b7c4aa; }
.sidebar-bottom > p, .sidebar-bottom > small { display: block; margin-top: 20px; color: #a0a999; font-size: 10px; text-align: center; }
.main-shell { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 87px; padding: 22px 47px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.36); }
.search-wrap { position: relative; width: min(410px, 100%); }
.search-input { display: block; width: 100%; min-height: 42px; padding: 10px 43px 10px 42px; border: 1px solid #e0e6da; border-radius: 7px; background: #fff; color: var(--ink); font-size: 12px; appearance: none; }
.search-input::placeholder { color: #939e8f; }
.search-input::-webkit-search-cancel-button { cursor: pointer; }
.search-icon { position: absolute; top: 50%; left: 14px; transform: translateY(-50%); color: #91a08b; pointer-events: none; }
.search-icon svg { width: 16px; height: 16px; }
.search-wrap > kbd { position: absolute; right: 11px; top: 11px; min-width: 21px; height: 21px; border: 1px solid var(--line); border-radius: 4px; font-size: 10px; text-align: center; color: #98a18f; background: #f9faf6; }
.search-results { position: absolute; top: calc(100% + 7px); left: 0; right: 0; z-index: 30; padding: 6px; max-height: min(400px, 60dvh); overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 38px rgba(30, 58, 40, .12); background: white; }
.search-result { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; border-radius: 6px; background: white; text-align: left; }
.search-result:hover, .search-result:focus-visible { background: var(--sage-soft); }
.search-result strong { display: block; color: var(--forest); font-size: 13px; }
.search-result small { display: block; font-size: 10px; color: var(--muted); }
.search-result .avatar { width: 33px; height: 33px; flex-basis: 33px; font-size: 12px; }
.search-results > p { padding: 14px; color: var(--muted); font-size: 12px; }
.language-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex: 0 0 auto; min-height: 37px; padding: 7px 10px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #6e7b67; font-size: 11px; font-weight: 600; }
.language-button:hover { border-color: var(--line); background: white; }
.language-button svg { width: 16px; height: 16px; }
.mobile-brand, .mobile-nav { display: none; }
.main-content { max-width: 1450px; margin: 0 auto; padding: 39px 47px 30px; }
.intro { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 0 25px; }
.eyebrow { margin-bottom: 11px; color: #8d9b83; font-size: 9px; font-weight: 700; letter-spacing: 2.2px; text-transform: uppercase; }
.intro h1 { margin: 0 0 10px; color: var(--forest-deep); font: 43px/1.12 Georgia, "Times New Roman", serif; letter-spacing: -1.5px; }
.intro-copy { max-width: 560px; color: #8a9482; font-size: 12px; line-height: 1.8; }
.intro-decoration { display: flex; align-items: center; justify-content: center; flex: 0 0 100px; width: 100px; height: 100px; border: 1px solid #e0e6d5; border-radius: 50%; color: #afbd9c; background: #f3f5eb; }
.intro-decoration svg { width: 58px; height: 58px; stroke-width: .8; }
.stats { display: flex; align-items: center; gap: 0; width: fit-content; margin: 0 0 30px; }
.stat { display: flex; align-items: baseline; gap: 8px; padding: 0 26px; border-right: 1px solid #dce3d3; }
.stat:first-child { padding-left: 0; }
.stat:last-child { padding-right: 0; border-right: 0; }
.stat-value { color: #38563d; font: 23px/1.2 Georgia, serif; }
.stat-label { color: #8c9784; font-size: 10px; }
.viewer { min-width: 0; overflow: hidden; border: 1px solid #e0e6d9; border-radius: 12px; background: white; box-shadow: var(--shadow); }
.viewer-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 70px; padding: 17px 24px; border-bottom: 1px solid #e9ede5; }
.viewer-heading { display: flex; align-items: center; gap: 9px; color: #405a42; font-size: 12px; font-weight: 650; }
.viewer-heading svg { width: 17px; height: 17px; color: #8ca17d; }
.viewer-heading h2 { font: inherit; }
.viewer-heading small { color: #8c9784; font-size: 10px; font-weight: 400; }
.toolbar-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; padding: 8px 12px; border: 1px solid #dfe6d8; border-radius: 6px; background: #fff; color: #66775c; font-size: 10px; font-weight: 500; text-decoration: none; transition: background .15s, border-color .15s; }
.button svg { width: 14px; height: 14px; }
.button:hover { border-color: #b9c8ad; background: #f7f9f2; }
.button-primary { border-color: var(--forest); background: var(--forest); color: white; }
.button-primary:hover { background: var(--forest-deep); border-color: var(--forest-deep); }
.button-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 34px; width: 34px; height: 34px; padding: 7px; border: 1px solid var(--line); border-radius: 6px; background: white; color: #788b6d; }
.button-icon:hover { border-color: #aabf9d; background: var(--sage-soft); }
.button-icon svg { width: 15px; height: 15px; }
.segmented { display: flex; align-items: center; padding: 3px; border: 1px solid #e4e9de; border-radius: 7px; background: #f5f7f0; }
.segmented button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 29px; padding: 5px 10px; border: 0; border-radius: 4px; color: #8a957f; background: none; font-size: 10px; }
.segmented button.active { color: #42613b; background: white; box-shadow: 0 1px 4px #25402d0c; }
.segmented button svg { width: 14px; height: 14px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 25px; overflow-x: auto; border-bottom: 1px solid #edf0e8; color: #a4af99; background: #fdfefb; scrollbar-width: thin; }
.breadcrumb button, .breadcrumb a { flex: 0 0 auto; padding: 2px 0; border: 0; background: transparent; color: #8c9980; font-size: 10px; text-decoration: none; }
.breadcrumb button:hover, .breadcrumb a:hover { color: var(--forest); }
.breadcrumb button:last-child, .breadcrumb a:last-child, .breadcrumb strong { color: #4d6c42; font-size: 10px; font-weight: 600; white-space: nowrap; }
.breadcrumb svg { flex: 0 0 12px; width: 12px; height: 12px; }
.tree-stage { position: relative; min-width: 0; min-height: 400px; padding: 28px 26px 34px; background-color: #fefefb; background-image: radial-gradient(#d6decc 0.65px, transparent .65px); background-size: 15px 15px; }
.ancestor-stack { display: flex; flex-direction: column; align-items: center; margin: 0 auto; }
.ancestor-pill { display: flex; align-items: center; gap: 8px; min-height: 33px; max-width: 100%; padding: 7px 16px; border: 1px solid #e1e7d8; border-radius: 6px; color: #8a9a7e; background: #f7f9f1; font-size: 10px; }
.ancestor-pill svg { width: 13px; height: 13px; }
.ancestor-pill:hover { border-color: #a8ba98; color: var(--forest); }
.ancestor-line { width: 1px; height: 22px; background: #cbd6c2; }
.focus-card { position: relative; width: min(345px, 100%); margin: 0 auto; padding: 20px 22px; border: 1px solid var(--forest); border-radius: 9px; background: var(--forest); color: white; box-shadow: 0 6px 14px #274a3a14; }
.focus-card .person-main { align-items: center; gap: 14px; }
.avatar { display: flex; align-items: center; justify-content: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%; background: #eef3e7; color: #8da17b; font: 15px Georgia, serif; }
.focus-card .avatar { flex-basis: 47px; width: 47px; height: 47px; border: 1px solid #ffffff20; background: #ffffff0d; color: #ceddbc; font: 21px Georgia, serif; }
.person-name { display: flex; align-items: center; gap: 6px; color: #45633d; font-size: 13px; font-weight: 650; text-align: left; }
.focus-card .person-name { color: white; font: 24px/1.2 Georgia, serif; letter-spacing: -.3px; }
.partner-name { display: block; margin-top: 3px; color: #91a084; font-size: 10px; line-height: 1.4; }
.focus-card .partner-name { color: #bdcfaf; font-size: 11px; margin-top: 6px; }
.focus-meta { display: flex; align-items: center; gap: 10px; margin-top: 17px; padding-top: 12px; border-top: 1px solid #ffffff18; color: #bbccad; font-size: 10px; }
.focus-meta > span + span::before { content: "·"; margin-right: 10px; opacity: .6; }
.focus-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.focus-actions .button { background: #ffffff0c; color: #d7e4cd; border-color: #ffffff25; }
.focus-actions .button:hover { background: #ffffff18; border-color: #ffffff60; }
.focus-card > .uncertain-dot { position: absolute; top: 15px; right: 15px; }
.branch-grid { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 28px 15px; margin-top: 39px; padding-top: 22px; }
.branch-grid::before { content: ""; position: absolute; top: 0; left: calc(100% / 6); right: calc(100% / 6); height: 1px; background: var(--connector); }
.branch-grid::after { content: ""; position: absolute; top: -39px; left: 50%; width: 1px; height: 39px; background: var(--connector); }
.branch-column { position: relative; min-width: 0; }
.branch-column::before { content: ""; position: absolute; top: -22px; left: 50%; height: 22px; width: 1px; background: var(--connector); }
.person-card { position: relative; min-width: 0; padding: 16px 14px 11px; border: 1px solid #dfe6d7; border-radius: 8px; background: white; box-shadow: 0 2px 4px #2d4b3303; transition: border-color .15s, box-shadow .15s; }
.person-card:hover { border-color: #b4c5a5; box-shadow: 0 3px 11px #2c502c08; }
.person-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
button.person-main { width: 100%; padding: 0; border: 0; background: none; text-align: left; }
.person-main > div:not(.avatar) { min-width: 0; }
.person-main .person-name { overflow-wrap: anywhere; }
.person-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 13px; padding-top: 10px; border-top: 1px solid #eef1e8; color: #9ba88e; font-size: 9px; }
.expand-button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 25px; padding: 3px 6px; border: 1px solid #e1e8d9; border-radius: 4px; color: #7f936f; background: #f8faf4; font-size: 9px; }
.expand-button:hover { color: var(--forest); border-color: #b3c69f; background: #edf4e5; }
.expand-button svg { width: 12px; height: 12px; }
.branch-children { position: relative; display: grid; gap: 7px; margin: 0 0 0 18px; padding: 13px 0 0 14px; }
.branch-children::before { content: ""; position: absolute; top: 0; bottom: 25px; left: 0; width: 1px; background: #d5dec9; }
.child-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 4px; min-height: 43px; padding: 8px 9px; border: 1px solid #e6ebdf; border-radius: 6px; background: #fafbf6; }
.child-row::before { content: ""; position: absolute; top: 50%; left: -15px; width: 14px; height: 1px; background: #d5dec9; }
.child-row > button:not(.button-icon):not(.expand-button) { display: flex; align-items: center; gap: 7px; min-width: 0; flex: 1; padding: 0; border: 0; background: none; text-align: left; color: #617c50; font-size: 10px; }
.child-row .person-name { color: #617c50; font-size: 10px; font-weight: 550; }
.child-row .partner-name { margin-top: 2px; font-size: 9px; }
.child-row .avatar { flex-basis: 25px; width: 25px; height: 25px; background: #edf2e4; color: #a1b18e; font-size: 10px; }
.child-row:hover { border-color: #b8caa6; background: #f5f8ef; }
.child-actions { display: flex; align-items: center; gap: 3px; flex: 0 0 auto; }
.child-actions button { min-width: 24px; min-height: 26px; padding: 4px; border: 0; background: none; color: #9cac8f; border-radius: 4px; }
.child-actions button:hover { color: var(--forest); background: #eaf0e1; }
.child-actions svg { width: 13px; height: 13px; }
.uncertain-dot { display: inline-block; flex: 0 0 5px; width: 5px; height: 5px; margin: 0 1px; border-radius: 50%; background: var(--ochre); }
.tree-empty { max-width: 390px; margin: 28px auto 0; padding: 20px; border: 1px dashed #d5dfca; border-radius: 9px; background: #f9fbf5; text-align: center; color: #8a9c7b; font-size: 12px; }
.tree-empty svg { display: block; width: 25px; height: 25px; margin: 0 auto 9px; color: #b3c2a4; }
.viewer-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 14px 24px; border-top: 1px solid #e7ecdf; color: #99a58e; font-size: 9px; background: #fff; }
.legend { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; }
.legend > span { display: inline-flex; align-items: center; gap: 5px; }
.legend svg { width: 12px; height: 12px; }
.source-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 22px; color: #9aa58f; font-size: 10px; text-align: center; line-height: 1.7; }
.source-note svg { flex: 0 0 13px; width: 13px; height: 13px; color: #a7b29c; }
.source-note button { padding: 0; border: 0; background: none; color: #7b906d; font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }
.people-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 15px; margin: 5px 0 23px; color: #8a9880; font-size: 12px; }
.people-toolbar input, .people-toolbar select { min-height: 39px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: white; color: #627a53; }
.people-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.directory-card { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 96px; padding: 18px; border: 1px solid #dfe7d6; border-radius: 9px; background: white; color: var(--forest); text-align: left; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.directory-card:hover { border-color: #a7bd94; transform: translateY(-1px); }
.directory-card .person-name { font-size: 13px; }
.directory-card small { display: block; margin-top: 5px; color: #99a58d; font-size: 9px; }
.directory-card > svg:last-child { margin-left: auto; width: 15px; height: 15px; color: #b6c1ad; }
.source-layout { display: grid; grid-template-columns: minmax(0, 1fr) 245px; align-items: start; gap: 24px; }
.source-photo-wrap { min-width: 0; max-height: 76dvh; overflow: auto; border: 1px solid #dddccb; border-radius: 10px; background: #e4e2d5; box-shadow: 0 8px 20px #645b370c; scrollbar-width: thin; }
.source-photo { display: block; width: 100%; height: auto; cursor: zoom-in; transition: width .15s; }
.source-photo.is-zoomed, .source-photo.zoomed { width: 1600px; max-width: none; cursor: zoom-out; }
.source-sidebar { padding: 23px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.source-sidebar h2 { margin-bottom: 12px; color: var(--forest); font: 23px/1.25 Georgia, serif; }
.source-sidebar h3 { margin: 20px 0 10px; font-size: 12px; color: #526e43; }
.source-sidebar p { margin-bottom: 15px; color: #8b9782; font-size: 11px; line-height: 1.8; }
.source-sidebar .button { width: 100%; margin-top: 10px; }
.source-facts { margin: 20px 0; }
.source-facts > div { padding: 10px 0; border-bottom: 1px solid #edf0e6; }
.source-facts dt { margin-bottom: 4px; color: #a0ab95; font-size: 9px; text-transform: uppercase; letter-spacing: 1px; }
.source-facts dd { margin: 0; color: #57714b; font-size: 12px; }
.notice { display: flex; align-items: flex-start; gap: 9px; margin: 16px 0; padding: 13px 16px; border: 1px solid #e9e2cd; border-radius: 7px; background: #fbf8ee; color: #9d8d65; font-size: 11px; line-height: 1.7; }
.notice svg { flex: 0 0 16px; width: 16px; height: 16px; margin-top: 2px; }
.notice p { margin: 0; font-size: inherit; color: inherit; }
.empty-state { padding: 55px 24px; color: #8c9e7c; text-align: center; }
.empty-state h2 { margin: 12px 0 8px; color: #547346; font: 26px Georgia, serif; }
.empty-state > svg { width: 34px; height: 34px; color: #b8c6a9; }
.outline { padding: 24px; }
.outline-node { min-width: 0; }
.outline-row { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 10px; border-bottom: 1px solid #edf1e7; border-radius: 5px; }
.outline-row:hover { background: #f7faf2; }
.outline-row > button:not(.expand-button):not(.button-icon) { flex: 1; min-width: 0; padding: 0; background: none; border: 0; text-align: left; }
.outline-row .avatar { flex-basis: 30px; width: 30px; height: 30px; font-size: 12px; }
.outline-row .person-name { font-size: 12px; }
.outline-row small { margin-left: auto; color: #9bab8d; font-size: 10px; }
.outline-children { margin-left: 22px; padding-left: 13px; border-left: 1px solid #dae3cf; }
.outline-row .expand-button { flex: 0 0 27px; width: 27px; min-height: 27px; padding: 4px; }
#toast { position: fixed; z-index: 60; left: calc(50% + 122px); bottom: 28px; width: max-content; max-width: min(410px, calc(100% - 32px)); padding: 12px 20px; border: 1px solid #ffffff18; border-radius: 8px; color: #f2f7ed; background: var(--forest-deep); box-shadow: 0 8px 32px #21433025; font-size: 12px; text-align: center; opacity: 0; pointer-events: none; transform: translate(-50%, 20px); transition: opacity .18s, transform .18s; }
#toast.toast-visible { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 1600px) {
  .main-content { padding-top: 48px; }
  .tree-stage { padding: 36px 45px 45px; }
  .branch-grid { gap: 28px; }
  .person-card { padding: 20px 19px 13px; }
}
@media (max-width: 1200px) {
  .app-shell { grid-template-columns: 218px minmax(0, 1fr); }
  .sidebar { padding: 30px 17px 22px; }
  .topbar { padding-left: 31px; padding-right: 31px; }
  .main-content { padding-left: 31px; padding-right: 31px; }
  .intro h1 { font-size: 38px; }
  .tree-stage { padding-left: 18px; padding-right: 18px; }
  .person-card { padding: 14px 10px 9px; }
  .person-card .avatar { flex-basis: 31px; width: 31px; height: 31px; font-size: 12px; }
  .person-card .person-main { gap: 8px; }
  .person-name { font-size: 12px; }
  .branch-grid { gap: 24px 11px; }
  .source-layout { grid-template-columns: minmax(0, 1fr) 220px; gap: 18px; }
  #toast { left: calc(50% + 109px); }
}
@media (max-width: 960px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .topbar { flex-wrap: wrap; gap: 15px; min-height: auto; padding: 20px 28px; }
  .mobile-brand { display: flex; align-items: center; gap: 9px; color: var(--forest); font: 24px Georgia, serif; text-decoration: none; }
  .mobile-brand .brand-mark { flex-basis: 30px; width: 30px; height: 34px; border-radius: 10px 10px 3px 3px; font-size: 20px; }
  .mobile-brand svg { width: 25px; height: 25px; }
  .search-wrap { width: min(370px, 50%); margin-left: auto; }
  .main-content { padding: 32px 28px 95px; }
  .mobile-nav { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: flex; align-items: stretch; justify-content: center; gap: 4px; min-height: 62px; padding: 7px 16px calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid #dce5d2; background: rgba(251,253,247,.97); backdrop-filter: blur(12px); }
  .mobile-nav .nav-button { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 3px; max-width: 170px; min-height: 46px; padding: 5px 12px; font-size: 9px; text-align: center; }
  .mobile-nav .nav-button svg { width: 20px; height: 20px; }
  .mobile-nav .nav-button.active { background: #edf3e5; }
  .intro-decoration { flex-basis: 84px; width: 84px; height: 84px; }
  .intro-decoration svg { width: 49px; height: 49px; }
  .tree-stage { padding: 28px 25px 35px; }
  .person-card { padding: 17px 14px 11px; }
  .branch-grid { gap: 25px 15px; }
  #toast { left: 50%; bottom: 83px; }
}
@media (max-width: 680px) {
  .topbar { gap: 15px; padding: 17px 19px; }
  .mobile-brand { font-size: 23px; }
  .language-button { margin-left: auto; min-height: 36px; }
  .search-wrap { order: 3; width: 100%; margin: 0; }
  .search-input { min-height: 44px; font-size: 13px; }
  .search-wrap > kbd { display: none; }
  .search-results { max-height: 54dvh; }
  .search-result { min-height: 54px; }
  .main-content { padding: 28px 18px 95px; }
  .intro { gap: 10px; padding-bottom: 21px; }
  .eyebrow { margin-bottom: 10px; font-size: 8px; letter-spacing: 1.8px; }
  .intro h1 { font-size: 34px; line-height: 1.13; letter-spacing: -1.1px; }
  .intro-copy { font-size: 11px; max-width: 310px; line-height: 1.7; }
  .intro-decoration { display: none; }
  .stats { display: flex; justify-content: space-between; width: 100%; margin-bottom: 24px; }
  .stat { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 0 17px; }
  .stat-value { font-size: 23px; }
  .stat-label { font-size: 9px; }
  .viewer { border-radius: 10px; }
  .viewer-toolbar { flex-wrap: wrap; gap: 11px; min-height: 0; padding: 14px; }
  .viewer-heading { font-size: 12px; }
  .viewer-heading small { font-size: 9px; }
  .toolbar-actions { gap: 6px; }
  .button { min-height: 40px; padding: 9px 10px; font-size: 10px; }
  .button-icon { flex-basis: 40px; width: 40px; height: 40px; }
  .segmented { padding: 2px; }
  .segmented button { min-height: 35px; padding: 7px 9px; font-size: 10px; }
  .breadcrumb { min-height: 46px; padding: 4px 15px; gap: 9px; }
  .breadcrumb button, .breadcrumb a { display: flex; align-items: center; min-height: 38px; font-size: 10px; }
  .tree-stage { min-height: 350px; padding: 24px 17px 27px; background-size: 13px 13px; }
  .ancestor-pill { min-height: 40px; padding: 9px 16px; }
  .ancestor-line { height: 18px; }
  .focus-card { width: 100%; max-width: 380px; padding: 20px; }
  .focus-card .person-name { font-size: 25px; }
  .focus-card .avatar { flex-basis: 49px; width: 49px; height: 49px; }
  .focus-meta { font-size: 10px; }
  .focus-actions { gap: 8px; }
  .focus-actions .button { min-height: 40px; }
  .branch-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 27px; padding-top: 0; padding-left: 15px; }
  .branch-grid::before { top: 0; bottom: 0; left: 0; right: auto; width: 1px; height: auto; }
  .branch-grid::after { top: -27px; left: 50%; height: 14px; }
  .branch-column::before { top: 30px; left: -15px; width: 15px; height: 1px; }
  .branch-column:first-child::after { content: ""; position: absolute; top: -14px; left: -15px; right: calc(50% - 7px); height: 14px; border-top: 1px solid var(--connector); border-left: 1px solid var(--connector); }
  .branch-column:last-child::before { box-shadow: -7px 18px 0 7px #fefefb; }
  .person-card { padding: 17px 16px 11px; }
  .person-card .avatar { flex-basis: 39px; width: 39px; height: 39px; font-size: 15px; }
  .person-card .person-main { gap: 12px; min-height: 44px; }
  .person-name { font-size: 14px; }
  .partner-name { font-size: 11px; }
  .person-meta { margin-top: 12px; padding-top: 8px; font-size: 10px; }
  .expand-button { min-height: 36px; padding: 6px 8px; font-size: 10px; }
  .expand-button svg { width: 13px; height: 13px; }
  .branch-children { margin-left: 18px; padding-left: 15px; gap: 8px; }
  .child-row { min-height: 51px; padding: 8px 10px; }
  .child-row > button:not(.button-icon):not(.expand-button) { min-height: 35px; font-size: 12px; }
  .child-row .avatar { flex-basis: 29px; width: 29px; height: 29px; font-size: 11px; }
  .child-row .person-name { font-size: 12px; }
  .child-row .partner-name { font-size: 10px; }
  .child-actions button { min-width: 36px; min-height: 36px; }
  .child-actions svg { width: 15px; height: 15px; }
  .viewer-footer { gap: 9px; padding: 14px 16px; font-size: 9px; }
  .source-note { align-items: flex-start; margin-top: 18px; padding: 0 7px; font-size: 9px; }
  .source-note svg { margin-top: 2px; }
  .people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .directory-card { gap: 9px; min-height: 100px; padding: 13px; }
  .directory-card .avatar { flex-basis: 30px; width: 30px; height: 30px; font-size: 12px; }
  .directory-card .person-name { font-size: 12px; }
  .directory-card .partner-name { font-size: 10px; }
  .directory-card > svg:last-child { display: none; }
  .people-toolbar { gap: 10px; margin-bottom: 18px; font-size: 11px; }
  .people-toolbar input, .people-toolbar select { min-height: 44px; max-width: 100%; font-size: 12px; }
  .source-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .source-photo-wrap { max-height: 65dvh; }
  .source-sidebar { padding: 21px; }
  .source-sidebar h2 { font-size: 25px; }
  .source-sidebar p { font-size: 12px; }
  .source-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
  .notice { padding: 12px; font-size: 10px; }
  .outline { padding: 12px 9px; }
  .outline-row { gap: 7px; min-height: 61px; padding: 7px 4px; }
  .outline-row .person-name { font-size: 12px; }
  .outline-row .avatar { display: none; }
  .outline-row .expand-button { flex-basis: 34px; width: 34px; min-height: 40px; }
  .outline-children { margin-left: 14px; padding-left: 7px; }
  .outline-row small { font-size: 9px; }
}
@media (max-width: 380px) {
  .main-content { padding-left: 13px; padding-right: 13px; }
  .intro h1 { font-size: 31px; }
  .stat { padding: 0 10px; }
  .stat-label { font-size: 8px; }
  .tree-stage { padding-left: 12px; padding-right: 12px; }
  .toolbar-actions { width: 100%; justify-content: space-between; }
  .people-grid { grid-template-columns: minmax(0, 1fr); }
  .directory-card { min-height: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
  .sidebar, .topbar, .mobile-nav, .toolbar-actions, .focus-actions, .source-note, #toast { display: none !important; }
  .app-shell { display: block; }
  .main-content { max-width: none; padding: 0; }
  .tree-stage { background: white; }
  .viewer { box-shadow: none; }
  .focus-card { color: var(--forest); background: #edf3e8; border-color: #b9cbb0; }
  .focus-card .person-name { color: var(--forest); }
  .focus-card .partner-name, .focus-meta { color: #617a53; }
  .branch-grid { break-inside: avoid; }
}


/* Markup-specific components */
.nav-button, .branch-shortcut, .directory-card, .search-result,
.person-name, .child-name, .ancestor-pill, .stat, .archive-card { text-decoration: none; }
.brand-period { color: var(--ochre); }
.nav-active-dot { width: 5px; height: 5px; margin-left: auto; border-radius: 50%; background: #6f8c60; }
.branch-shortcut { gap: 11px; }
.branch-shortcut::before { content: none; }
.branch-shortcut > svg { width: 12px; height: 12px; margin-left: auto; color: #a4b095; }
.branch-shortcut.current { background: #eef3e7; border-radius: 6px; color: #426438; }
.branch-color { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: #99ad89; }
.branch-color-1 { background: #b8a37c; }
.branch-color-2 { background: #a2b6b1; }
.branch-color-3 { background: #b5a6b3; }
.archive-card { padding: 10px 10px 13px; overflow: hidden; }
.archive-thumbnail { display: block; height: 79px; margin-bottom: 12px; overflow: hidden; border-radius: 5px; background: #dfdfcf; }
.archive-thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 15%; filter: saturate(.55); opacity: .8; }
.archive-card-title { display: block; padding: 0 4px; color: #5c7350; font: 15px/1.3 Georgia, serif; }
.archive-card-date { display: block; margin: 4px 4px 0; color: #93a084; font-size: 9px; }
.archive-link { display: flex; align-items: center; justify-content: space-between; margin: 12px 4px 0; padding-top: 10px; border-top: 1px solid #dde5d1; color: #6e865f; font-size: 9px; }
.archive-card .archive-link svg { width: 13px; height: 13px; margin: 0; }
.sidebar-signoff { display: flex !important; align-items: center; justify-content: center; gap: 6px; }
.sidebar-signoff svg { width: 12px; height: 12px; }
.topbar { min-height: 76px; padding-top: 17px; padding-bottom: 17px; }
.topbar-label { display: flex; align-items: center; gap: 13px; color: #85917b; font-size: 9px; font-weight: 600; letter-spacing: .6px; white-space: nowrap; }
.topbar-label span { color: #b7c1ab; font-weight: 400; }
.topbar-tools { display: flex; align-items: center; justify-content: flex-end; gap: 13px; margin-left: auto; }
.topbar-tools .search-wrap { width: clamp(220px, 22vw, 340px); }
.search-key { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; width: 19px; height: 20px; border: 1px solid #e7ecdf; border-radius: 4px; background: #fbfcf8; color: #a6b099; font-size: 10px; }
.search-results-heading { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 7px; color: #98a68b; font-size: 9px; }
.search-results-heading .button-icon { width: 25px; height: 25px; flex-basis: 25px; padding: 5px; }
.search-result > svg:last-child { margin-left: auto; width: 13px; height: 13px; color: #b4c1a8; }
.search-result .partner-name { font-size: 10px; }
.search-empty { padding: 10px 12px 17px; color: #8b9b7e; font-size: 11px; }
.search-empty strong { display: block; margin-bottom: 4px; color: #5c7750; font-size: 12px; font-weight: 600; }
.main-content { padding-top: 30px; }
.intro { padding-bottom: 24px; }
.intro-copy { max-width: 600px; }
.intro-copy > p { color: #8a9482; }
.eyebrow { display: flex; align-items: center; gap: 8px; }
.eyebrow > span { width: 5px; height: 5px; border-radius: 50%; background: #9bae88; }
.intro-decoration { flex-basis: 145px; width: 145px; height: 105px; border: 0; border-radius: 0; background: none; }
.intro-decoration svg { width: 145px; height: 105px; color: #b4bf9c; }
.stats { margin-bottom: 25px; }
.stat { gap: 8px; padding: 0 23px; border: 0; }
.stat > svg:first-child { width: 15px; height: 15px; margin-right: 3px; color: #94a281; }
.stat > svg:last-child:not(:first-child) { width: 12px; height: 12px; margin-left: 4px; color: #a3b18f; }
.stat-divider { width: 1px; height: 21px; background: #dde4d2; }
.viewer-toolbar { min-height: 64px; padding-top: 14px; padding-bottom: 14px; }
.breadcrumb { min-height: 40px; }
.breadcrumb > span[aria-current] { color: #527342; font-size: 10px; font-weight: 600; white-space: nowrap; }
.ancestor-pill { min-height: 27px; padding: 5px 15px; font-size: 9px; }
.ancestor-pill > svg { width: 11px; height: 11px; margin-left: 5px; opacity: .55; }
.ancestor-line { height: 13px; }
.focus-card { width: min(304px, 100%); padding: 15px 22px 17px; text-align: center; }
.focus-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 3px; }
.focus-label { display: inline-flex; align-items: center; gap: 5px; color: #b3c6a5; font-size: 7px; font-weight: 600; letter-spacing: 1.5px; }
.focus-label > span { width: 4px; height: 4px; border-radius: 50%; background: #adc79c; }
.focus-card-top .button-icon { flex-basis: 23px; width: 23px; height: 23px; padding: 4px; border-color: #ffffff20; color: #bbd1ab; background: #ffffff08; }
.focus-card-top .button-icon:hover { color: white; background: #ffffff15; }
.focus-card-top .button-icon svg { width: 12px; height: 12px; }
.focus-card .focus-avatar { width: 40px; height: 40px; margin: 0 auto 8px; background: #ffffff0b; font-size: 19px; }
.focus-card h2 { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 0; color: #fafbf5; font: 26px/1.2 Georgia, serif; letter-spacing: -.35px; overflow-wrap: anywhere; }
.focus-card > .partner-name { color: #b5c9a7; font-size: 10px; }
.focus-meta { justify-content: center; gap: 7px; margin-top: 10px; padding-top: 0; border: 0; color: #abc19a; font-size: 9px; }
.focus-meta > span + span::before { content: none; }
.reading-note { width: min(460px, 100%); margin: 12px auto; border: 1px solid #e8dfc7; border-radius: 6px; background: #fcfaf2; font-size: 10px; color: #9a8b63; }
.reading-note summary { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 31px; padding: 7px 12px; cursor: pointer; list-style: none; }
.reading-note summary::-webkit-details-marker { display: none; }
.reading-note summary::after { content: "+"; margin-left: 4px; }
.reading-note[open] summary::after { content: "−"; }
.reading-note p { padding: 3px 14px 8px; line-height: 1.7; }
.reading-note > a { display: inline-flex; align-items: center; gap: 5px; margin: 0 14px 12px; color: #947e4a; font-size: 10px; }
.reading-note > a svg { width: 12px; height: 12px; }
.children-label { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 6px; width: fit-content; min-height: 22px; margin: 17px auto 0; padding: 2px 9px; color: #8c9e7a; background: #fefefb; font-size: 9px; }
.children-label > span { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 50%; background: #edf2e5; color: #8fa579; font-size: 8px; }
.branch-grid { grid-template-columns: repeat(var(--branch-count, 3), minmax(0, 1fr)); margin-top: 19px; padding-top: 20px; }
.branch-grid::before { left: calc(50% / var(--branch-count, 3)); right: calc(50% / var(--branch-count, 3)); }
.branch-grid::after { top: -58px; height: 58px; }
.branch-grid[style*="--branch-count:1"] { max-width: 304px; margin-left: auto; margin-right: auto; }
.branch-grid[style*="--branch-count:2"] { max-width: 625px; margin-left: auto; margin-right: auto; }
.branch-column::before { top: -20px; height: 20px; }
.person-name { line-height: 1.35; }
.person-name:hover, .child-name:hover { color: var(--forest); text-decoration: underline; }
.person-arrow { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 22px; width: 22px; height: 28px; margin-left: auto; color: #a9b99b; }
.person-arrow:hover { color: var(--forest); }
.person-arrow svg { width: 13px; height: 13px; }
.person-card.is-expanded { border-color: #b7cba3; }
.person-meta .end-leaf { display: flex; align-items: center; height: 25px; color: #b2c0a2; }
.end-leaf svg { width: 14px; height: 14px; }
.person-card > .branch-children { margin-left: 9px; padding-left: 11px; }
.child-item { min-width: 0; }
.child-row > div:first-child { min-width: 0; }
.child-name { display: inline-flex; align-items: center; gap: 5px; color: #667e54; font-size: 10px; font-weight: 500; overflow-wrap: anywhere; }
.child-focus { display: inline-flex; align-items: center; justify-content: center; min-width: 25px; min-height: 27px; color: #a2b291; border-radius: 4px; }
.child-focus:hover { color: var(--forest); background: #eaf0df; }
.child-focus svg { width: 12px; height: 12px; }
.child-row::before { left: -12px; width: 11px; }
.nested-children { position: relative; display: grid; gap: 6px; margin: 0 0 0 9px; padding: 8px 0 0 10px; border-left: 1px solid #dce5d1; }
.nested-children .child-row::before { left: -11px; width: 10px; }
.nested-children .child-row { padding: 7px; }
.sibling-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 7px; margin-top: 26px; padding-top: 18px; border-top: 1px dashed #dfe6d5; }
.sibling-row > span { color: #9cac8b; font-size: 9px; margin-right: 3px; }
.sibling-link { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border: 1px solid #e0e7d5; border-radius: 5px; background: #fafcf5; color: #81956f; font-size: 9px; text-decoration: none; }
.sibling-link:hover { color: var(--forest); border-color: #b4c8a0; }
.viewer-footer > span:first-child { display: inline-flex; align-items: center; gap: 7px; }
.viewer-footer > span:first-child > svg { width: 13px; height: 13px; }
.legend { gap: 6px; }
.source-note p > a { margin-left: 4px; color: #829772; text-decoration: none; white-space: nowrap; }
.source-note p > a svg { width: 11px; height: 11px; margin-left: 3px; }
.tree-empty h3 { color: #829775; font-size: 12px; font-weight: 500; }
.tree-empty p { margin-top: 6px; font-size: 10px; line-height: 1.7; }
.tree-empty .button { margin-top: 15px; }
.directory { padding: 22px; }
.people-toolbar { margin-top: 0; margin-bottom: 13px; }
.people-toolbar .search-wrap { width: min(300px, 100%); }
.people-toolbar .search-input { padding-left: 42px; }
.directory-caption { color: #99a78c; font-size: 10px; }
.results-count { margin: 19px 0 12px; color: #8b9d7b; font-size: 10px; }
.directory-lineage { display: block; margin-top: 7px; color: #a0ad92; font-size: 8px; overflow-wrap: anywhere; }
.directory-card { gap: 11px; padding: 16px 13px; }
.directory-card > div { min-width: 0; }
.directory-card .person-name { overflow-wrap: anywhere; }
.directory-card .partner-name { font-size: 9px; }
.empty-state h3 { margin: 14px 0 6px; color: #69825a; font-size: 15px; font-weight: 500; }
.empty-state p { font-size: 12px; }
.source-viewer .viewer-toolbar .eyebrow { margin: 0; letter-spacing: 1.3px; font-size: 8px; }
.source-photo-wrap { border: 0; border-radius: 0; box-shadow: none; }
.source-photo { cursor: default; }
.source-photo-wrap.zoomed .source-photo { width: 1600px; max-width: none; }
.source-viewer .viewer-footer { justify-content: flex-start; gap: 8px; }
.source-viewer .viewer-footer > svg { width: 13px; height: 13px; }
.source-sidebar { padding: 24px; }
.source-leaf { display: inline-flex; align-items: center; justify-content: center; width: 39px; height: 39px; margin-bottom: 18px; border: 1px solid #e2ead8; border-radius: 50%; background: #f4f7ed; color: #a6b894; }
.source-leaf svg { width: 21px; height: 21px; }
.source-facts { display: block; margin: 23px 0; }
.source-facts dt { margin: 16px 0 5px; color: #a3b096; font-size: 8px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; }
.source-facts dd { margin: 0; color: #667e55; font-size: 11px; }
.source-sidebar .text-link { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 19px; color: #8da27b; font-size: 10px; text-decoration: none; }
.text-link svg { width: 13px; height: 13px; }
.outline-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px 22px; border-bottom: 1px solid #e9eee2; background: #fbfdf7; color: #94a585; font-size: 10px; }
.outline, .outline-children { list-style: none; }
.outline { margin: 0; }
.outline-children { margin-top: 0; margin-bottom: 0; }
.outline-count { margin-left: auto; color: #a3b196; font-size: 10px; white-space: nowrap; }
.outline-leaf { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 34px; width: 34px; height: 34px; color: #b2c4a2; }
.outline-leaf svg { width: 16px; height: 16px; }
@media (max-width: 1200px) {
  .topbar-label { font-size: 8px; gap: 8px; }
  .topbar-tools { gap: 7px; }
  .topbar-tools .search-wrap { width: 220px; }
  .person-arrow { flex-basis: 15px; width: 15px; }
  .person-card .person-name { font-size: 12px; }
  .person-card .partner-name { font-size: 9px; }
}
@media (max-width: 960px) {
  .topbar-label { display: none; }
  .topbar-tools { gap: 12px; }
  .topbar-tools .search-wrap { width: min(43vw, 340px); }
  .search-wrap { margin-left: 0; }
  .mobile-nav .nav-active-dot { display: none; }
  .intro-decoration { flex-basis: 125px; width: 125px; }
  .intro-decoration svg { width: 125px; }
}
@media (max-width: 680px) {
  .topbar { position: relative; display: block; padding: 18px 19px 16px; }
  .mobile-brand { width: fit-content; height: 32px; }
  .topbar-tools { display: block; margin-top: 16px; }
  .topbar-tools .search-wrap { width: 100%; }
  .topbar-tools .language-button { position: absolute; right: 18px; top: 15px; }
  .search-key { display: none; }
  .search-results-heading .button-icon { width: 36px; height: 36px; flex-basis: 36px; }
  .intro { padding-bottom: 21px; }
  .intro h1 { max-width: 340px; }
  .intro-copy > p { max-width: 320px; font-size: 12px; }
  .stat { position: relative; gap: 4px; padding: 0 13px; }
  .stat > svg:first-child { position: absolute; left: 13px; top: 5px; width: 13px; height: 13px; }
  .stat:first-child > svg:first-child { left: 0; }
  .stat > svg:last-child:not(:first-child) { display: none; }
  .stat-value { padding-left: 20px; }
  .stat-label { font-size: 8px; }
  .stat-divider { height: 29px; }
  .focus-card { padding: 16px 20px 20px; max-width: 360px; }
  .focus-card-top .button-icon { flex-basis: 35px; width: 35px; height: 35px; margin-top: -4px; margin-right: -4px; }
  .focus-card-top .button-icon svg { width: 15px; height: 15px; }
  .focus-label { font-size: 8px; }
  .focus-card .focus-avatar { width: 44px; height: 44px; margin-top: -3px; }
  .focus-card h2 { font-size: 28px; }
  .focus-card > .partner-name { font-size: 11px; }
  .focus-meta { font-size: 10px; margin-top: 12px; }
  .ancestor-pill { min-height: 38px; padding: 8px 15px; font-size: 10px; }
  .ancestor-line { height: 13px; }
  .children-label { margin-top: 19px; min-height: 25px; font-size: 10px; }
  .branch-grid { grid-template-columns: minmax(0, 1fr); max-width: none !important; margin-top: 19px; padding-top: 0; }
  .branch-grid::before { top: 0; bottom: 0; left: 0; right: auto; width: 1px; height: auto; }
  .branch-grid::after { top: -63px; left: 50%; width: 1px; height: 49px; }
  .branch-column::before { top: 30px; left: -15px; width: 15px; height: 1px; }
  .branch-column:first-child::after { right: calc(50% - 7px); }
  .person-card .person-name { font-size: 14px; }
  .person-card .partner-name { font-size: 11px; }
  .person-arrow { flex: 0 0 36px; width: 36px; height: 44px; }
  .person-arrow svg { width: 17px; height: 17px; }
  .person-card > .branch-children { padding-top: 13px; }
  .child-name { min-height: 28px; align-items: center; font-size: 12px; }
  .child-focus { min-width: 36px; min-height: 36px; }
  .child-focus svg { width: 14px; height: 14px; }
  .child-row .partner-name { font-size: 10px; }
  .child-actions .button-icon.small { flex: 0 0 36px; width: 36px; height: 36px; }
  .nested-children { margin-left: 7px; padding-left: 9px; }
  .nested-children .child-row { padding: 7px; }
  .sibling-row { gap: 6px; }
  .sibling-row > span { width: 100%; text-align: center; margin-bottom: 5px; }
  .sibling-link { min-height: 36px; padding: 7px 10px; font-size: 10px; }
  .reading-note summary { min-height: 42px; }
  .reading-note p { font-size: 11px; }
  .viewer-footer > span:first-child { align-items: flex-start; }
  .viewer-footer > span:first-child > svg { margin-top: 1px; }
  .source-note p > a { white-space: normal; }
  .directory { padding: 17px 13px; }
  .people-toolbar .search-wrap { width: 100%; }
  .people-toolbar .segmented { width: 100%; }
  .people-toolbar .segmented button { flex: 1; min-height: 40px; }
  .directory-caption { font-size: 9px; line-height: 1.7; }
  .directory-card { padding: 13px 11px; }
  .directory-card .person-name { font-size: 12px; }
  .directory-card .partner-name { font-size: 9px; }
  .directory-lineage { font-size: 8px; }
  .source-viewer .viewer-toolbar { flex-wrap: nowrap; }
  .source-viewer .viewer-toolbar .eyebrow { max-width: 120px; font-size: 8px; line-height: 1.7; }
  .source-facts { display: block; }
  .source-facts dt { font-size: 9px; }
  .source-facts dd { font-size: 12px; }
  .source-sidebar .text-link { min-height: 44px; }
  .outline-toolbar { padding: 13px; gap: 10px; font-size: 10px; }
  .outline-toolbar .button { flex: 0 0 auto; }
  .outline-row > .button-icon { width: 34px; height: 44px; flex-basis: 34px; padding: 7px; }
  .outline-leaf { flex-basis: 34px; width: 34px; height: 44px; }
  .outline-count { font-size: 8px; }
}

/* Comfortable reading and touch targets across generations. */
:root { font-size: 15px; }
.nav-button { font-size: 14px; min-height: 46px; }
.branch-shortcut { font-size: 13px; min-height: 42px; }
.sidebar-label { font-size: 10px; }
.brand-subtitle { font-size: 10px; letter-spacing: 1.25px; }
.archive-card-title { font-size: 17px; }
.archive-card-date, .archive-link { font-size: 11px; }
.sidebar-bottom > p { font-size: 11px; }
.topbar-label { font-size: 11px; letter-spacing: 0; }
.search-input { min-height: 44px; font-size: 14px; }
.search-result strong { font-size: 15px; }
.search-result small, .search-result .partner-name { font-size: 12px; }
.search-results-heading { font-size: 12px; }
.search-empty { font-size: 13px; }
.search-empty strong { font-size: 14px; }
.search-all { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 44px; margin-top: 5px; padding: 10px 13px; border: 0; border-top: 1px solid var(--line); border-radius: 0 0 5px 5px; background: #f5f8ef; color: #547844; font-size: 13px; font-weight: 500; text-decoration: none; }
.search-all:hover { background: #ebf1e2; }
.search-all svg { width: 15px; height: 15px; }
.language-button { min-height: 42px; font-size: 12px; }
.intro-copy, .intro-copy > p { font-size: 14px; line-height: 1.7; }
.eyebrow { font-size: 10px; }
.stat-label { font-size: 12px; }
.stat-value { font-size: 25px; }
.stat { padding-left: 20px; padding-right: 20px; }
.viewer-heading { font-size: 14px; }
.segmented button { min-height: 34px; font-size: 12px; }
.button { min-height: 38px; font-size: 12px; }
.button-icon { width: 38px; height: 38px; flex-basis: 38px; }
.breadcrumb { gap: 9px; }
.breadcrumb button, .breadcrumb a, .breadcrumb > span[aria-current] { font-size: 12px; }
.ancestor-pill { min-height: 33px; font-size: 12px; }
.ancestor-pill > svg { width: 13px; height: 13px; }
.focus-label { font-size: 9px; letter-spacing: 1.25px; }
.focus-card h2 { font-size: 29px; }
.focus-card > .partner-name { font-size: 13px; }
.focus-meta { font-size: 12px; }
.focus-meta > span + span::before { content: none; }
.children-label { font-size: 12px; }
.children-label > span { width: 20px; height: 20px; font-size: 10px; }
.person-name, .person-card .person-name { font-size: 16px; }
.partner-name, .person-card .partner-name { font-size: 13px; }
.person-meta { font-size: 12px; }
.expand-button { min-height: 33px; font-size: 12px; }
.person-arrow { width: 26px; flex-basis: 26px; height: 38px; }
.person-arrow svg { width: 16px; height: 16px; }
.person-card .person-main { flex-wrap: nowrap; }
.child-name, .child-row .person-name { font-size: 14px; }
.child-row .partner-name { font-size: 12px; }
.child-row { min-height: 46px; }
.child-actions button, .child-focus { min-width: 32px; min-height: 34px; }
.sibling-row > span, .sibling-link { font-size: 12px; }
.sibling-link { min-height: 32px; }
.reading-note { font-size: 12px; }
.reading-note summary { min-height: 37px; }
.reading-note > a { font-size: 12px; }
.viewer-footer { font-size: 12px; line-height: 1.6; }
.source-note { font-size: 12px; }
.tree-empty h3 { font-size: 15px; }
.tree-empty p { font-size: 13px; }
.directory-caption { font-size: 12px; }
.results-count { font-size: 12px; }
.directory-card .person-name { font-size: 15px; }
.directory-card .partner-name { font-size: 12px; }
.directory-lineage { font-size: 11px; }
.source-sidebar p { font-size: 13px; }
.source-facts dt { font-size: 10px; }
.source-facts dd { font-size: 13px; }
.source-sidebar .text-link { font-size: 12px; }
.source-viewer .viewer-toolbar .eyebrow { font-size: 10px; }
.notice { font-size: 12px; }
.outline { max-width: 100%; overflow-x: auto; }
.outline-toolbar { font-size: 12px; }
.outline-row .person-name { font-size: 15px; }
.outline-count { font-size: 12px; }
#toast { font-size: 14px; }
@media (max-width: 1200px) and (min-width: 961px) {
  .topbar-label { display: none; }
  .topbar-tools { width: 100%; justify-content: space-between; }
  .topbar-tools .search-wrap { width: min(390px, 75%); }
  .person-main { flex-wrap: wrap; }
  .person-card .avatar { flex-basis: 28px; width: 28px; height: 28px; }
  .person-card .person-main { gap: 7px; }
  .person-arrow { flex-basis: 18px; width: 18px; }
  .person-card .person-name { font-size: 15px; }
  .person-card .partner-name { font-size: 12px; }
  .person-meta { align-items: flex-start; flex-wrap: wrap; font-size: 11px; }
  .stat-label { font-size: 11px; }
}
@media (max-width: 960px) {
  .mobile-nav .nav-button { min-height: 48px; font-size: 11px; }
  .person-card .person-name { font-size: 16px; }
  .person-card .partner-name { font-size: 13px; }
}
@media (max-width: 680px) {
  .main-content { padding-bottom: 100px; }
  .topbar-tools .language-button { min-height: 44px; top: 12px; }
  .intro-copy > p { font-size: 14px; line-height: 1.7; }
  .eyebrow { font-size: 9px; }
  .stat { padding-left: 11px; padding-right: 11px; }
  .stat > svg:first-child { left: 11px; }
  .stat-value { font-size: 25px; }
  .stat-label { font-size: 11px; line-height: 1.4; }
  .stat-divider { height: 38px; }
  .viewer-heading { font-size: 14px; }
  .viewer-toolbar { gap: 11px; }
  .toolbar-actions { gap: 6px; }
  .button, .button-icon { min-height: 44px; }
  .button-icon { flex-basis: 44px; width: 44px; height: 44px; }
  .button { font-size: 12px; }
  .segmented button { min-height: 40px; font-size: 12px; }
  .breadcrumb { min-height: 48px; }
  .breadcrumb button, .breadcrumb a { min-height: 44px; font-size: 12px; }
  .breadcrumb > span[aria-current] { font-size: 12px; }
  .ancestor-pill { min-height: 44px; font-size: 13px; }
  .focus-card-top .button-icon { min-height: 44px; flex-basis: 44px; width: 44px; height: 44px; margin-top: -7px; margin-right: -8px; }
  .focus-card h2 { font-size: 30px; }
  .focus-card > .partner-name { font-size: 14px; }
  .focus-meta { font-size: 12px; }
  .children-label { font-size: 12px; }
  .person-card .person-name { font-size: 17px; }
  .person-card .partner-name { font-size: 13px; }
  .person-arrow { flex-basis: 44px; width: 44px; height: 44px; }
  .person-card .person-main { min-height: 48px; }
  .person-meta { align-items: center; font-size: 12px; }
  .expand-button { min-height: 44px; min-width: 44px; font-size: 12px; padding: 9px; }
  .child-row { min-height: 56px; }
  .child-name { min-height: 32px; font-size: 15px; }
  .child-row .partner-name { font-size: 12px; }
  .child-actions button, .child-actions .button-icon.small, .child-focus { min-width: 44px; min-height: 44px; width: 44px; height: 44px; flex-basis: 44px; }
  .nested-children { margin-left: 4px; padding-left: 7px; }
  .nested-children .child-row { padding-left: 6px; padding-right: 4px; }
  .sibling-row > span, .sibling-link { font-size: 12px; }
  .sibling-link { min-height: 44px; }
  .reading-note { font-size: 12px; }
  .reading-note summary { min-height: 44px; }
  .reading-note p, .reading-note > a { font-size: 12px; }
  .viewer-footer { font-size: 11px; }
  .source-note { font-size: 12px; }
  .people-toolbar .segmented button { min-height: 44px; }
  .directory-card .person-name { font-size: 15px; }
  .directory-card .partner-name { font-size: 12px; }
  .directory-caption { font-size: 12px; }
  .directory-lineage { font-size: 11px; }
  .people-grid { grid-template-columns: minmax(0, 1fr); }
  .directory-card { min-height: 88px; padding: 15px; }
  .directory-card .avatar { width: 39px; height: 39px; flex-basis: 39px; font-size: 16px; }
  .directory-card > svg:last-child { display: block; }
  .source-viewer .viewer-toolbar .eyebrow { max-width: 120px; font-size: 10px; }
  .source-sidebar p { font-size: 14px; }
  .source-facts dt { font-size: 10px; }
  .source-facts dd { font-size: 13px; }
  .notice { font-size: 12px; }
  .outline { padding: 12px 10px; }
  .outline-row { min-width: 240px; }
  .outline-row .person-name { font-size: 15px; }
  .outline-row > .button-icon { min-height: 44px; width: 44px; flex-basis: 44px; }
  .outline-count { font-size: 11px; }
  .outline-toolbar { font-size: 12px; }
  .outline-children { margin-left: 11px; padding-left: 6px; }
  .search-results-heading .button-icon { width: 44px; height: 44px; flex-basis: 44px; }
}

/* Secondary information remains legible on the light archive surfaces. */
.intro-copy > p, .stat-label, .source-note, .viewer-footer,
.directory-caption, .results-count, .directory-lineage,
.source-sidebar p, .source-facts dt, .source-facts dd,
.outline-toolbar, .outline-count, .sibling-row > span,
.search-result small, .search-results-heading { color: #68795f; }
.partner-name, .person-card .partner-name, .child-row .partner-name,
.directory-card .partner-name, .person-meta, .child-name { color: #677d59; }
.ancestor-pill, .breadcrumb a, .children-label, .sibling-link { color: #718366; }
.focus-card > .partner-name { color: #c5d8b9; }
.focus-meta { color: #c1d4b5; }
.notice, .reading-note { color: #827046; }
@media (max-width: 680px) {
  .intro-copy > p { color: #68795f; }
  .person-card .partner-name, .child-row .partner-name { color: #677d59; }
}





/* On phones the breadcrumb carries the full lineage; keep the nearest parent visible. */
@media (max-width: 680px) {
  .ancestor-stack .ancestor-pill:nth-last-child(4),
  .ancestor-stack .ancestor-line:nth-last-child(3) { display: none; }
}
