:root{color-scheme:light;--ink:#182b32;--muted:#61737a;--edge:#dee5e5;--paper:#f9faf8;--deep:#102d34;--accent:#12685d;--cream:#eff2ea}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--paper);color:var(--ink);font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif}button,input,select{font:inherit}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #4c9d92;outline-offset:3px}a{color:inherit}.site-header{max-width:1280px;margin:auto;padding:24px 5%;display:flex;justify-content:space-between;align-items:center}.brand{display:flex;gap:11px;text-decoration:none;font-weight:850;font-size:13px;letter-spacing:1.1px;line-height:1.22}.brand small{font-size:9px;letter-spacing:2.3px;color:var(--muted)}.brand-mark{width:42px;height:42px;display:grid;place-items:center;background:var(--deep);color:white;border-radius:11px;font-family:Georgia,serif;font-size:25px}.site-header nav{display:flex;gap:26px;font-size:13px;font-weight:650}.site-header nav a{text-decoration:none}.hero{max-width:1280px;margin:auto;padding:65px 5% 82px;min-height:470px;display:grid;grid-template-columns:1.2fr .8fr;align-items:center;gap:40px}.eyebrow,.section-kicker{font-weight:800;letter-spacing:2.1px;font-size:10px;color:var(--accent)}h1{font-size:clamp(42px,5.4vw,75px);line-height:1.07;letter-spacing:-3.6px;margin:18px 0 19px;font-weight:800}h1 em{font-family:Georgia,serif;font-weight:400;color:var(--accent)}.lead{font-size:17px;color:#53666b;line-height:1.75;max-width:570px}.primary-link{display:inline-flex;gap:28px;align-items:center;padding:15px 23px;background:var(--deep);color:white;border-radius:7px;text-decoration:none;font-size:13px;font-weight:750;margin-top:13px}.hero-art{height:340px;background:#e4ece7;border-radius:190px 190px 12px 12px;position:relative;overflow:hidden;display:flex;align-items:flex-end;justify-content:center;color:#407b73}.hero-art svg{width:85%;height:90%;position:relative;z-index:1}.orb{position:absolute;border-radius:50%;border:1px solid #b4d0c5}.orb.one{width:300px;height:300px;top:25px;left:25px}.orb.two{width:185px;height:185px;top:75px;left:80px}.hero-caption{position:absolute;bottom:18px;left:24px;font-size:9px;font-weight:800;letter-spacing:1.7px;color:#426e69}.explore{background:#fff;border-top:1px solid var(--edge);padding:70px max(5%,calc((100% - 1150px)/2)) 95px}.section-head{display:flex;justify-content:space-between;gap:35px;align-items:end;margin:15px 0 30px}.section-head h2,.about h2{font-size:clamp(28px,3.2vw,42px);letter-spacing:-1.6px;line-height:1.15;margin:0 0 9px}.section-head p{font-size:14px;color:var(--muted);margin:0}.metrics{display:flex;gap:35px}.metrics div{display:flex;flex-direction:column;gap:4px}.metrics strong{font-size:30px;letter-spacing:-1.5px}.metrics small{font-size:9px;font-weight:800;letter-spacing:1.5px;color:var(--muted)}.filterbar{border:1px solid var(--edge);border-radius:12px;padding:16px;display:grid;grid-template-columns:1.6fr 1fr .85fr .8fr auto;align-items:end;gap:11px;background:#fbfcfa}.filter{min-width:0}.filter label{font-size:11px;font-weight:700;color:#43585e;display:block;margin-bottom:7px}.filter input,.filter select{height:41px;width:100%;border:1px solid var(--edge);background:white;border-radius:6px;padding:0 10px;color:var(--ink);font-size:12px}.clear{height:41px;padding:0 12px;background:white;border:1px solid var(--edge);border-radius:6px;font-size:11px;font-weight:700;color:var(--ink)}.content-layout{display:grid;grid-template-columns:1.16fr .84fr;gap:18px;margin-top:20px;align-items:start}.directory,.profile{border:1px solid var(--edge);border-radius:11px;background:#fff;overflow:hidden}.panel-head{display:flex;justify-content:space-between;align-items:center;padding:13px 17px;border-bottom:1px solid var(--edge)}#results-label{font-size:11px;color:var(--muted)}.tabs{display:flex;gap:4px;background:#f3f6f3;padding:4px;border-radius:7px}.tabs button{border:0;background:transparent;padding:8px 12px;border-radius:5px;font-size:12px;color:#637579;font-weight:700}.tabs button.active{background:white;color:var(--ink);box-shadow:0 1px 3px #0001}.person-list{max-height:620px;overflow-y:auto}.person-row{width:100%;display:flex;align-items:center;text-align:left;gap:12px;padding:12px 16px;background:white;border:0;border-bottom:1px solid #edf0ef;color:var(--ink)}.person-row:hover,.person-row.active{background:#f0f6f2}.person-row.active{box-shadow:inset 3px 0 var(--accent)}.avatar{width:45px;height:45px;object-fit:cover;border-radius:9px;border:1px solid #e3ebe7;flex:none}.row-title{font-size:13px;font-weight:750}.row-sub{font-size:11px;color:var(--muted);margin-top:4px;line-height:1.4}.arrow{margin-left:auto;color:var(--muted)}.profile{padding:22px;position:sticky;top:20px;max-height:660px;overflow:auto}.profile-heading{display:flex;align-items:center;gap:14px;margin-bottom:20px}.profile-heading .avatar{width:80px;height:80px;border-radius:12px}.profile h3{margin:0;font-size:24px;letter-spacing:-.7px;line-height:1.2}.profile-section{border-top:1px solid var(--edge);padding-top:15px;margin-top:16px}.profile-label{font-size:10px;color:#7b8b8e;font-weight:850;letter-spacing:1.3px;text-transform:uppercase;margin:0 0 9px}.profile-value{font-size:13px;line-height:1.6}.profile-value.muted{color:var(--muted)}.chips{display:flex;gap:6px;flex-wrap:wrap}.chip{padding:7px 9px;border:1px solid var(--edge);border-radius:5px;background:#f7f9f7;font-size:11px;color:var(--ink)}.breadcrumbs{display:flex;flex-wrap:wrap;align-items:center;gap:5px}.breadcrumbs button{border:0;background:none;color:var(--accent);padding:3px;font-size:11px}.breadcrumbs span{color:#abb7b5}.empty{padding:50px 20px;text-align:center;color:var(--muted);font-size:13px;line-height:1.7}.about{max-width:1280px;margin:auto;padding:90px 5%;display:grid;grid-template-columns:1fr 1fr;gap:70px}.about h2{max-width:470px;margin-top:20px}.about p{color:var(--muted);font-size:14px;line-height:1.8}.about .privacy-note{font-size:12px;background:var(--cream);padding:15px;border-left:3px solid var(--accent)}footer{border-top:1px solid var(--edge);padding:25px 5%;display:flex;justify-content:space-between;gap:15px;color:var(--muted);font-size:11px}@media(max-width:950px){.filterbar{grid-template-columns:repeat(2,1fr)}.clear{grid-column:span 2}.hero{padding-top:30px}.hero-art{height:280px}}@media(max-width:650px){.hero{grid-template-columns:1fr;padding-top:35px;padding-bottom:50px}.hero-art{height:205px;max-width:330px;width:100%}.section-head{display:block}.metrics{margin-top:22px}.content-layout{grid-template-columns:1fr}.person-list{max-height:380px}.profile{position:static;max-height:none}.about{grid-template-columns:1fr;gap:10px;padding-top:55px;padding-bottom:55px}footer{flex-direction:column}h1{letter-spacing:-2px}.site-header nav{gap:14px}}

/* Heritage atlas: indigo textile, aged bronze, warm earth and cultivated land. */
:root{--ink:#202b36;--muted:#6f7476;--edge:#e3dfd4;--paper:#f8f5ec;--deep:#26374b;--accent:#85602c;--cream:#f1e8d6}
body{background:var(--paper)}
.site-header{border-bottom:1px solid #ded8c8}
.brand-mark{background:var(--deep);border-radius:2px;transform:rotate(-2deg);width:46px;height:49px}
.brand-mark svg{width:32px;height:32px}
.hero{position:relative}.hero:before{content:"";position:absolute;inset:0;pointer-events:none;opacity:.18;background:repeating-linear-gradient(112deg,transparent 0 48px,#ba9f70 49px,transparent 50px 100px);mask-image:linear-gradient(to right,transparent,#000)}
.hero-art{background:radial-gradient(circle at 48% 40%,#e8d8b5 0%,#e2ceb0 58%,#c8ae83 100%);border-radius:170px 170px 5px 5px;color:#5b4839;border:1px solid #cbb48d;box-shadow:12px 12px 0 #ebe2cf;min-height:340px}
.hero-art .heritage-art{width:100%;height:100%;padding:10px;object-fit:contain}
.hero-caption{color:#594932}
h1 em{color:var(--accent)}.eyebrow,.section-kicker{color:var(--accent)}
.primary-link{border-radius:2px}.explore{background:#fffdf8}.filterbar{background:#f9f6ee}.filter input,.filter select,.clear,.directory,.profile{border-radius:4px}.tabs{background:#eee9dd}.tabs button.active{background:#fffdf8}
.person-row:hover,.person-row.active{background:#f6f0e3}.avatar{border-radius:4px}.chip{background:#f7f1e7;border-radius:3px}.about .privacy-note{border-color:var(--accent)}
/* A focused three-column lineage, not a diagram with hundreds of crossing edges. */
.directory:has(.lineage-map){grid-column:1/-1}.content-layout:has(.lineage-map){grid-template-columns:1fr}.content-layout:has(.lineage-map) .profile{position:static;max-height:none}
.map-explainer{padding:15px 19px;border-bottom:1px solid var(--edge);display:flex;gap:12px;align-items:baseline;flex-wrap:wrap;background:#f8f2e6;font-size:12px}.map-explainer strong{font-family:Georgia,serif;font-size:17px;font-weight:500}.map-explainer span{color:var(--muted)}
.lineage-map{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;padding:19px 14px 25px;min-height:235px;overflow-x:auto}
.lineage-column{padding:0 10px;min-width:0;position:relative}.lineage-column+.lineage-column{border-left:1px dashed #cab897}
.lineage-column h3{font-size:10px;font-weight:850;letter-spacing:1.3px;text-transform:uppercase;color:var(--accent);margin:0 0 14px;padding:0 3px}.lineage-column h3 span{font-variant-numeric:tabular-nums;opacity:.7}
.lineage-stack{display:flex;flex-direction:column;gap:8px}.lineage-card{padding:9px;min-width:0;width:100%;border:1px solid var(--edge);background:#fffdf8;text-align:left;display:flex;align-items:center;gap:9px;color:var(--ink);border-radius:3px;transition:background .15s,border-color .15s}.lineage-card:hover,.lineage-card:focus-visible{background:#f5ecda;border-color:#b59c71}.lineage-card.is-focused{border-color:var(--accent);background:#f9edda;box-shadow:inset 3px 0 var(--accent)}.lineage-card img{width:46px;height:46px;flex:none;object-fit:cover;border-radius:2px}.lineage-card span{min-width:0}.lineage-card strong{font-size:12px;display:block;overflow-wrap:anywhere}.lineage-card small{font-size:10px;color:var(--muted);display:block;margin-top:3px}.lineage-chevron{margin-left:auto;font-size:18px;color:var(--accent)}.lineage-secondary{margin-top:26px!important}.lineage-hint,.lineage-tally{font-size:11px;color:var(--muted);padding:11px 5px}.lineage-tally{border-top:1px solid var(--edge);margin-top:14px}
@media(max-width:750px){.lineage-map{grid-template-columns:1fr;gap:17px}.lineage-column+.lineage-column{border-left:none;border-top:1px dashed #cab897;padding-top:17px}.lineage-column{padding:0 4px}.hero-art{min-height:230px;box-shadow:6px 6px 0 #ebe2cf}}

/* Generation-colored SVG genealogy graph; desktop and mobile horizontal navigation */
.graph-toolbar{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:16px 19px;border-bottom:1px solid var(--line, #ded5c8)}
.graph-toolbar strong{font-family:inherit;font-size:16px}
.graph-toolbar p{font-size:12px;line-height:1.5;max-width:440px;margin:4px 0 0;opacity:.7}
.graph-actions{display:flex;align-items:center;gap:5px;flex-shrink:0}
.graph-actions button{font:inherit;cursor:pointer;border:1px solid #bcb09e;border-radius:7px;background:#f7f1e7;color:#35434c;min-width:31px;height:32px}
.graph-actions button:last-child{padding:0 10px}
.graph-actions span{font-size:11px;min-width:36px;text-align:center}
.graph-legend{display:flex;gap:10px;flex-wrap:wrap;padding:11px 17px;border-bottom:1px solid #ddd5c9}
.graph-legend-item{display:flex;gap:5px;align-items:center;color:#68635d;font-size:10px}
.graph-legend-item i{width:10px;height:10px;border-radius:50%}
.graph-scroll{width:100%;height:min(66vh,640px);min-height:385px;overflow:auto;background-color:#faf6ee;background-image:radial-gradient(#d3cabb 0.6px,transparent 0.6px);background-size:19px 19px;overscroll-behavior:contain}
.family-graph{display:block;min-width:0;max-width:none}
.graph-edge{fill:none;stroke:#c8c0b5;stroke-width:1.8;opacity:.6;transition:stroke .15s,opacity .15s}
.graph-edge.is-active{stroke:#9e7540;stroke-width:2.7;opacity:.95}
.graph-person{cursor:pointer;transition:opacity .15s}
.graph-person.is-dimmed{opacity:.19}
.graph-person.is-related:not(.is-dimmed){opacity:1}
.graph-ring{fill:none;stroke:transparent;stroke-width:3}
.graph-person.is-selected .graph-ring{stroke:#242e36;stroke-width:4}
.graph-person:focus-visible .graph-ring{stroke:#242e36}
.graph-initial{font:700 20px system-ui,sans-serif;fill:white;pointer-events:none}
.graph-name{font:600 12px system-ui,sans-serif;fill:#303840;pointer-events:none}
.graph-id{font:10px system-ui,sans-serif;fill:#76706a;pointer-events:none}
.graph-hint{font-size:11px;color:#79716a;padding:12px 17px;line-height:1.5}
@media(max-width:650px){.graph-toolbar{flex-direction:column;align-items:flex-start}.graph-scroll{height:480px}}

/* Dual encoding: fill = generation; outline = recorded gender. */
.graph-gender-legend{display:flex;flex-wrap:wrap;gap:18px;padding:11px 17px;border-bottom:1px solid #ddd5c9;background:#fcf8f0;font-size:11px;color:#625b53}
.gender-legend{display:inline-flex;align-items:center;gap:7px}
.gender-legend i{width:14px;height:14px;border:4px solid;border-radius:50%;display:inline-block;background:#f0e8d9}
.graph-card-toggle{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:650;padding:12px 17px;background:#fffaf2;cursor:pointer}
.graph-card-toggle input{accent-color:#876136;width:16px;height:16px}
.graph-card-section{padding:19px;background:#fffdf8;border-top:1px solid #ded5c8}
.graph-card-section h3{font:700 19px Georgia,serif;margin:0 0 14px;color:#303840}
.graph-card-section h3 small{font:400 12px system-ui,sans-serif;color:#766d61;margin-left:10px}
.graph-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:11px;max-height:540px;overflow:auto}
.graph-profile-card{display:flex;text-align:left;align-items:center;gap:11px;min-width:0;padding:10px;border:1px solid #ded5c8;border-radius:9px;background:#fff;color:#303840;cursor:pointer}
.graph-profile-card:hover,.graph-profile-card.active{border-color:#8b6941;background:#f8f0df}
.graph-profile-card img{width:56px;height:64px;border-radius:6px;object-fit:cover;background:#eee7da;flex:none}
.graph-card-text{display:flex;flex-direction:column;gap:4px;min-width:0}
.graph-card-text strong{font-size:12px;overflow-wrap:anywhere}
.graph-card-text small{font-size:10px;color:#6c665d;overflow-wrap:anywhere}
.graph-legend-item{max-width:230px;line-height:1.4}

/* V5: warmer sunrise palette, compact heritage banner, visual-first layout */
:root{--ink:#302c2a;--muted:#75685c;--edge:#e7d9c8;--paper:#fff7e9;--deep:#382d30;--accent:#a65b33;--cream:#f7e6cc}
body{background:#fff8ed}
.site-header{max-width:none;padding:12px max(4%,calc((100% - 1360px)/2));background:#fff7ed;border-bottom:1px solid #eadbca}
.site-header nav a:hover{color:#a65b33}
.brand-mark{background:#76513b;transform:none;border-radius:8px;width:39px;height:43px}
.brand-mark svg{width:26px;height:26px}
.hero{max-width:none;min-height:0;height:205px;padding:0 max(4%,calc((100% - 1360px)/2));display:flex;align-items:center;position:relative;overflow:hidden;background:#f6ddba}
.hero:before{display:none}
.hero-art{position:absolute;inset:0;width:100%;height:100%;min-height:0;border:0;border-radius:0;box-shadow:none;background:#f3d7b6 url('heritage-dawn.webp') center 57% / cover no-repeat}
.hero-art:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(255,244,225,.96),rgba(255,239,218,.88) 33%,rgba(255,235,205,.36) 58%,transparent 83%)}
.hero-text{position:relative;z-index:1;max-width:620px}
.hero h1{font-size:clamp(26px,3.15vw,43px);line-height:1.12;letter-spacing:-1.5px;margin:7px 0}
.hero h1 em{font-weight:500;color:#ac5635}
.hero .lead{font-size:13px;max-width:520px;line-height:1.55;color:#5f5149;margin:8px 0}
.hero .eyebrow{font-size:9px;color:#894d31}
.explore{padding:20px max(4%,calc((100% - 1360px)/2)) 55px;background:#fffaf2}
.section-head{margin:6px 0 16px;align-items:center}
.section-head h2{font-size:clamp(23px,2.4vw,31px);letter-spacing:-.8px}
.section-head p{font-size:12px}
.metrics{gap:18px}.metrics strong{font-size:24px}.metrics small{font-size:9px}
.section-kicker{font-size:9px}
.filterbar{padding:11px 12px;gap:9px;background:#fff7ea;border-radius:10px}
.filter input,.filter select,.clear{height:35px;border-radius:7px}
.content-layout{margin-top:11px;gap:13px}
.directory,.profile{border-radius:11px}
.content-layout:has(.graph-scroll){grid-template-columns:minmax(0,1fr)}
.content-layout:has(.graph-scroll) .directory{grid-column:1/-1}
.content-layout:has(.graph-scroll) .profile{position:static;max-height:none;display:block;padding:17px}
.content-layout:has(.graph-scroll) .profile-heading{margin-bottom:7px}
.content-layout:has(.graph-scroll) .profile-section{display:inline-block;vertical-align:top;margin:7px 15px 5px 0;min-width:140px;max-width:390px}
.panel-head{padding:9px 12px;background:#fff7ed}
.tabs{background:#f1dfc8;flex-wrap:wrap}
.tabs button{font-size:12px;padding:9px 15px;color:#7a543f;border-radius:6px}
.tabs button.active{background:#fff9ed;color:#743e29}
.graph-scroll{height:clamp(370px,54vh,620px);background-color:#fff9f0;background-image:radial-gradient(#dfcbb5 .7px,transparent .7px);background-size:20px 20px}
.family-graph{transition:width .18s ease,height .18s ease}
.graph-edge{stroke:#bdac98;stroke-width:2;opacity:.8}
.graph-edge.is-active{stroke:#b15c36;stroke-width:3}
.graph-person{transition:opacity .2s ease}
.graph-person:hover .graph-ring{stroke:#d49051;stroke-width:4}
.graph-legend,.graph-gender-legend{background:#fff8ec;gap:10px;padding:7px 13px}
.graph-toolbar{padding:10px 13px;background:#fffaf2}
.graph-toolbar strong{color:#58392f}
.graph-toolbar p{font-size:11px;margin:2px 0 0}
.graph-card-toggle{padding:8px 14px;background:#fff6e7}
.graph-card-grid{max-height:none}
.graph-profile-card{border-radius:9px;background:#fffaf2}
.graph-profile-card:hover{background:#f8e8d3}
@media(max-width:950px){.hero{height:188px}.filterbar{grid-template-columns:repeat(2,minmax(0,1fr))}.clear{grid-column:span 2}.metrics{gap:12px}}
@media(max-width:650px){.site-header{padding:10px 4%}.hero{height:190px;padding:0 5%;display:flex}.hero-art{height:100%;max-width:none;min-height:0;box-shadow:none}.hero-art:after{background:linear-gradient(90deg,#fff3dfed,#fff0d6d9 65%,#fae7cd73)}.hero h1{font-size:27px}.hero .lead{font-size:12px;max-width:95%}.section-head{margin:9px 0}.metrics{margin-top:8px}.explore{padding-top:15px}.graph-scroll{height:430px;min-height:350px}.content-layout:has(.graph-scroll) .profile-section{display:block}.panel-head{align-items:flex-start;gap:8px;flex-direction:column}.tabs button{padding:8px 9px}}

/* Profile cards are an actual independent top-level view. */
.content-layout:has(.people-cards){grid-template-columns:minmax(0,1fr)}
.content-layout:has(.people-cards) .directory{grid-column:1/-1}
.content-layout:has(.people-cards) .profile{position:static;max-height:none}
.people-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(215px,1fr));gap:11px;padding:15px;background:#fffaf2}
.people-card{display:flex;gap:12px;align-items:center;text-align:left;background:#fffdf8;border:1px solid #e7d9c8;padding:12px;border-radius:10px;color:#362f2c;min-width:0;transition:transform .16s,border-color .16s,box-shadow .16s}
.people-card:hover{transform:translateY(-2px);border-color:#c68c60;box-shadow:0 5px 15px #9d673016}
.people-card.active{border-color:#ac6037;background:#fff3e2}
.people-card img{width:69px;height:75px;border-radius:6px;object-fit:cover;background:#f4e7d8;flex:none}
.people-card span{min-width:0;display:flex;flex-direction:column;gap:5px}
.people-card strong{font-size:14px;overflow-wrap:anywhere}
.people-card small{font-size:11px;color:#84705e}
.content-layout:has(.people-cards) .person-list{max-height:none}


/* V6: higher legibility, indigo-and-sage portal; preserve the existing dawn photograph. */
:root{--ink:#233445;--muted:#5e6c71;--edge:#d6deda;--paper:#f1f4f0;--deep:#253e4a;--accent:#4d6e69;--cream:#e9efea}
body{background:#f1f4f0;color:var(--ink);font-size:16px}
.site-header{background:#f3f6f3;border-color:#dce4df}
.site-header nav a,.brand{color:#273e48}
.site-header nav a:hover{color:#4d6e69}
.brand-mark{background:#2c4953}
/* Do not change .hero-art background image, its crop, or the hero illustration. */
.explore{background:#f3f6f3}
.section-kicker,.eyebrow{color:var(--accent)}
.section-head h2{font-size:clamp(27px,2.65vw,37px)}
.section-head p{font-size:15px;line-height:1.5;color:#5e6c71}
.section-kicker{font-size:11px;letter-spacing:1.6px}
.metrics strong{font-size:29px;color:#2c4650}.metrics small{font-size:11px}
.filterbar{background:#eaf0ed;border-color:#d4dfd9;gap:12px;padding:14px}
.filter label{font-size:13px;color:#435962;margin-bottom:7px}
.filter input,.filter select,.clear{height:44px;font-size:14px;border-color:#c6d3cc;background:#fff;color:#233445}
.clear{font-weight:700}
.content-layout,.content-layout:has(.graph-scroll),.content-layout:has(.people-cards),.content-layout:has(.lineage-map){grid-template-columns:minmax(0,1fr) minmax(300px,340px);gap:14px;align-items:start}
.directory,.content-layout:has(.graph-scroll) .directory,.content-layout:has(.people-cards) .directory,.directory:has(.lineage-map){grid-column:1;min-width:0}
.profile,.content-layout:has(.graph-scroll) .profile,.content-layout:has(.people-cards) .profile,.content-layout:has(.lineage-map) .profile{grid-column:2;display:block;position:sticky;top:14px;max-height:calc(100vh - 32px);overflow:auto;padding:20px;background:#fff;border-radius:12px;box-shadow:0 6px 24px #173e3310}
/* Undo old graph-specific horizontal detail layout. */
.content-layout:has(.graph-scroll) .profile-heading{margin-bottom:19px}
.content-layout:has(.graph-scroll) .profile-section{display:block;vertical-align:baseline;min-width:0;max-width:none;margin:16px 0 0}
.panel-head{background:#f5f8f6;padding:12px 15px;gap:9px;flex-wrap:wrap}
.tabs{background:#e2eae6;gap:5px}
.tabs button{font-size:14px;padding:10px 13px;color:#49635f}
.tabs button:hover{background:#ecf3ef}
.tabs button.active{background:#fff;color:#24464b}
#results-label{font-size:13px}
.graph-toolbar{background:#fff;padding:13px 15px}
.graph-toolbar strong{font-size:18px;color:#253e4a}
.graph-toolbar p,.graph-hint{font-size:13px;line-height:1.55}
.graph-actions button{min-width:35px;height:37px;background:#f0f4f1;border-color:#bfcec7;color:#28434d;font-size:15px}
.graph-actions span{font-size:13px}
.graph-legend,.graph-gender-legend{background:#f5f8f6;border-color:#dce5df}
.graph-legend-item,.graph-gender-legend,.gender-legend{font-size:12px}
.graph-scroll{height:clamp(425px,62vh,710px);background-color:#f8faf8;background-image:radial-gradient(#d8e1dc .7px,transparent .7px)}
.graph-name{font:650 13px system-ui,sans-serif;fill:#243b46}
.graph-id{font:11px system-ui,sans-serif;fill:#53686b}
.graph-edge{stroke:#b8cac0}.graph-edge.is-active{stroke:#46746e}
.graph-person:hover .graph-ring{stroke:#6a9389}
.graph-card-toggle{font-size:14px;background:#eff4f0;color:#334b50}
.graph-card-toggle input{accent-color:#4d6e69}
.graph-card-section{background:#f8faf8}
.graph-card-section h3{font-size:21px;color:#273e48}
.graph-profile-card,.people-card,.lineage-card{background:#fff;border-color:#dce4df;border-radius:10px}
.graph-profile-card:hover,.people-card:hover,.lineage-card:hover{background:#eef5f0;border-color:#88a99d}
.graph-profile-card.active,.people-card.active,.lineage-card.is-focused{border-color:#4d6e69;background:#eaf3ee}
.graph-card-text strong,.lineage-card strong{font-size:15px}
.graph-card-text small,.lineage-card small{font-size:12px}
.people-cards{grid-template-columns:repeat(auto-fill,minmax(225px,1fr));background:#f6f9f7;gap:12px}
.people-card strong{font-size:16px}.people-card small{font-size:13px}
.profile-heading .avatar{width:74px;height:83px}
.profile h3{font-size:25px;line-height:1.2}
.profile-heading .row-sub{font-size:13px}
.profile-label{font-size:11px;color:#657a76;margin-bottom:8px}
.profile-value{font-size:15px;line-height:1.55}
.chip,.breadcrumbs button{font-size:13px}
.chip{background:#edf3ee;border:1px solid #d1e0d8;border-radius:7px}
.breadcrumbs button{color:#32645b}
.person-row .row-title{font-size:15px}.person-row .row-sub{font-size:13px}
.map-explainer{background:#edf4ef;font-size:14px}.map-explainer strong{font-size:19px}
.lineage-column h3{font-size:12px;color:#3c6960}
.lineage-hint,.lineage-tally{font-size:13px}
.about{padding-top:55px;padding-bottom:60px}.about p{font-size:15px}.about .privacy-note{font-size:13px}
/* A small floating card supplements, never replaces, the persistent profile panel. */
.person-preview{position:fixed;z-index:80;width:274px;max-width:calc(100vw - 16px);pointer-events:none;padding:12px;border:1px solid #bdcfc4;border-radius:12px;background:#fffffff7;box-shadow:0 15px 38px #14322c27;backdrop-filter:blur(8px);color:#233445}
.person-preview[hidden]{display:none}
.preview-heading{display:flex;gap:11px;align-items:center}
.preview-heading img{width:63px;height:70px;object-fit:cover;border-radius:8px;background:#edf3ef;flex:none}
.preview-heading strong,.preview-heading span,.preview-heading small{display:block}
.preview-heading strong{font-size:16px;line-height:1.3}
.preview-heading span{font-size:12px;color:#49645d;margin-top:5px}
.preview-heading small{font-size:11px;color:#65736d;margin-top:3px}
.preview-kin{border-top:1px solid #e1e9e3;padding-top:9px;margin-top:10px;font-size:12px;line-height:1.4}
.preview-instruction{font-size:11px;color:#67867c;margin-top:7px}
:focus-visible{outline:2px solid #4d6e69;outline-offset:2px}
@media(max-width:1030px){.content-layout,.content-layout:has(.graph-scroll),.content-layout:has(.people-cards),.content-layout:has(.lineage-map){grid-template-columns:minmax(0,1fr) 290px}.tabs button{padding:9px 10px;font-size:13px}}
@media(max-width:790px){.content-layout,.content-layout:has(.graph-scroll),.content-layout:has(.people-cards),.content-layout:has(.lineage-map){grid-template-columns:minmax(0,1fr)}.directory,.content-layout:has(.graph-scroll) .directory,.content-layout:has(.people-cards) .directory,.directory:has(.lineage-map){grid-column:1}.profile,.content-layout:has(.graph-scroll) .profile,.content-layout:has(.people-cards) .profile,.content-layout:has(.lineage-map) .profile{grid-column:1;position:static;max-height:none}.graph-scroll{height:450px}.person-preview{display:none!important}}
@media(max-width:650px){.hero .lead{font-size:14px}.section-head p{font-size:14px}.tabs button{font-size:13px}.filter label{font-size:13px}.section-head h2{font-size:26px}.metrics small{font-size:10px}}
@media(prefers-reduced-motion:reduce){.family-graph,.graph-person,.people-card,.lineage-card{transition:none}}

/* V7 — workbook controls and retained, quieter portal palette. Hero photo remains unchanged. */
.data-controls{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin:4px 0 12px;padding:14px 17px;background:#fff;border:1px solid var(--edge);border-radius:12px}
.data-controls strong{font-size:15px;color:#253e4a}.data-controls p{margin:4px 0 0;font-size:13px;color:#617079;line-height:1.5}.data-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.workbook-download,.workbook-upload{display:inline-flex;align-items:center;padding:11px 13px;border-radius:8px;border:1px solid #abc2b8;color:#2b514d;text-decoration:none;font-size:13px;font-weight:700;background:#edf4f0;cursor:pointer;white-space:nowrap}
.workbook-upload{background:#274b54;color:white;border-color:#274b54}.workbook-upload input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
#upload-status{font-size:12px;color:#81512d;flex-basis:100%}#upload-status:empty{display:none}
.preview-notice{margin:0 0 10px;padding:12px;background:#fff0ce;border:1px solid #d8b67d;border-radius:8px;font-size:13px;font-weight:600}
.preview-notice[hidden]{display:none}.preview-notice button{margin-left:10px;border:0;background:#805a37;color:white;padding:7px 10px;border-radius:6px;cursor:pointer}
@media(max-width:650px){.data-controls{align-items:flex-start;flex-direction:column}.data-actions{width:100%}.workbook-download,.workbook-upload{font-size:12px}.profile{padding:15px}}

/* V8 — warm limestone, terracotta, charcoal and copper portal, dawn art unchanged. */
:root{--ink:#342f32;--muted:#776b66;--edge:#e2d8cb;--paper:#f7f3ec;--deep:#3b3a3d;--accent:#a45e3c;--cream:#f6ecdc}
body{background:#f7f3ec;color:#342f32}
.site-header{background:#faf6ed;border-color:#e2d8cb}
.site-header nav a,.brand{color:#493c37}
.site-header nav a:hover{color:#a45e3c}
.brand-mark{background:#533e3a}
.explore{background:#fbf8f1}
.section-kicker,.eyebrow{color:#985a3e}
.section-head h2,.graph-toolbar strong,.profile h3,.graph-card-section h3{color:#423332}
.section-head p,.data-controls p,.graph-toolbar p{color:#76665f}
.metrics strong{color:#965436}
.filterbar{background:#f3eadd;border-color:#e3d5c2}
.filter label{color:#705647}
.filter input,.filter select,.clear{border-color:#d3bfab;color:#473a35;background:#fffdf9}
.filter input:focus,.filter select:focus{outline:2px solid #bd8465;outline-offset:1px}
.data-controls,.profile{background:#fffcf7;border-color:#e4d7c9}
.data-controls strong{color:#553e37}
.workbook-download{background:#f8eddf;border-color:#d5b69b;color:#835039}
.workbook-upload{background:#87563e;border-color:#87563e}
.panel-head{background:#f6eee4}
.tabs{background:#efe0ce}
.tabs button{color:#7b5b4b}
.tabs button:hover{background:#f7e8d8}
.tabs button.active{background:#fffdf8;color:#845039}
.graph-toolbar{background:#fffcf8}
.graph-actions button{background:#f8ecdc;border-color:#d6bda7;color:#684b3e}
.graph-legend,.graph-gender-legend{background:#faf3e9;border-color:#ead9c7}
.graph-scroll{background-color:#faf5ed;background-image:radial-gradient(#d9c9b6 .7px,transparent .7px)}
.graph-name{fill:#4b3b35}.graph-id{fill:#806c60}.graph-edge{stroke:#c9b4a1}.graph-edge.is-active{stroke:#a45e3c}
.graph-card-toggle{background:#f8eee2;color:#674b40}
.graph-card-section,.people-cards{background:#fcf6ed}
.graph-profile-card,.people-card,.lineage-card{background:#fffdf9;border-color:#e5d6c5}
.graph-profile-card:hover,.people-card:hover,.lineage-card:hover{background:#f9eee0;border-color:#b7896c}
.graph-profile-card.active,.people-card.active,.lineage-card.is-focused{border-color:#a45e3c;background:#f9ebda}
.profile-label{color:#91725e}
.chip{background:#f6ede1;border-color:#e3d0bf}
.breadcrumbs button{color:#a45e3c}
.map-explainer{background:#f6eddf}
.lineage-column h3{color:#95603d}
.person-preview{background:#fffcf8fa;border-color:#dec5b0;color:#453631}
.preview-heading span{color:#966046}
.preview-kin{border-color:#eedbc8}
:focus-visible{outline-color:#aa6945}
.profile-heading img,.people-card img,.graph-profile-card img,.lineage-card img,.preview-heading img{object-position:center 24%;background:#e9d9c6}
.profile-heading img{width:84px;height:95px}
.people-card img{width:79px;height:84px}
.graph-person{transition:opacity .18s ease,filter .18s ease}
.graph-person:hover{filter:drop-shadow(0 4px 8px #87563e55)}
@media(max-width:790px){.profile-heading img{width:70px;height:79px}}

/* V9: quieter archive chrome. The sunrise artwork and its cropping are unchanged. */
.source-link{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 12px;padding:12px 15px;background:#fdfbf7;border:1px solid #e6ded2;border-radius:10px}
.source-link span{display:flex;flex-direction:column;gap:3px}
.source-link strong{font-size:14px;color:#453b36}
.source-link small{color:#746961;font-size:12px;line-height:1.5}
.source-link a{font-size:13px;font-weight:650;text-decoration:none;color:#895537;background:#f5ebe0;border:1px solid #dac6b4;padding:9px 13px;border-radius:8px;white-space:nowrap}
.source-link a:hover{background:#ebdac8}
.graph-legend{display:flex;flex-wrap:wrap;gap:7px 10px;padding:9px 14px}
.graph-legend-item{white-space:nowrap;font-size:12px;color:#544940;display:inline-flex;gap:5px;align-items:center}
.graph-legend-item small{font-size:10px;color:#99877a}
.graph-scroll{height:clamp(520px,70vh,780px);background-image:radial-gradient(#ded4ca .6px,transparent .6px);background-size:24px 24px;scroll-behavior:smooth}
.graph-person{cursor:pointer}
.graph-person .graph-name{font-size:14px;font-weight:700}
.graph-person .graph-id{font-size:11px}
.graph-ring{stroke:#fffaf0}
.graph-person.is-selected .graph-ring{stroke:#b48255;stroke-width:4}
.graph-person:hover{filter:drop-shadow(0 5px 9px #573f3133)}
.graph-toolbar{gap:12px}
.graph-toolbar p{max-width:570px;font-size:13px}
@media(max-width:650px){.source-link{align-items:flex-start;flex-direction:column}.source-link a{white-space:normal}.graph-scroll{height:510px}}

/* V10: neo4j-style bounded branch clusters and independent clan/gender encoding. */
.graph-view-settings{display:flex;gap:22px;flex-wrap:wrap;padding:10px 16px;background:#f3f4ef;border-block:1px solid #e1e3da}
.graph-view-settings label{display:flex;gap:7px;align-items:center;font-size:13px;font-weight:650;color:#4c605e}
.graph-enclosures{pointer-events:none}.cluster-title{font-size:15px;font-weight:750;fill:#3c5354;letter-spacing:.15px}
.clan-halo{fill:none;stroke-width:3;stroke-dasharray:none}.clan-halo.is-muted{stroke-dasharray:4 5;opacity:.7}
.graph-edge.is-nonpaternal{stroke:#9ca5a2;stroke-dasharray:5 6;opacity:.7}
.graph-edge.is-deemphasized{opacity:.14}
.graph-person.is-line-dimmed{opacity:.26}
.graph-profile-card .clan-card-status{color:#63766b;font-weight:650}
.clan-qualification{display:block;color:#7b8986;font-size:11px;line-height:1.45;margin-top:6px}
.graph-cluster rect{filter:drop-shadow(0 3px 8px #2738320a)}

/* V11: Royal-blue heritage palette, legible typography, and cards before the graph.
   The existing sunrise hero artwork is intentionally untouched. */
:root{--ink:#172744;--muted:#53637c;--edge:#d2dcec;--paper:#edf3fc;--deep:#102e70;--accent:#1647b5;--cream:#e8f0ff}
body{background:#edf3fc;color:#172744;font-size:17px}
.site-header{background:#f8faff;border-bottom:1px solid #d3dff2}
.brand,.site-header nav a{color:#17366d}.brand small{color:#536b97}.brand-mark{background:#163d8c}
.explore{background:#f4f7fd}.section-kicker{color:#1e4ca5}.section-head h2{color:#152d61;font-size:clamp(30px,3vw,42px)}
.section-head p{font-size:16px;color:#4a5d7b;line-height:1.6}.metrics strong{color:#1743a0;font-size:33px}.metrics small{font-size:12px}
.source-link{background:#fff;border:1px solid #ccd9f1;padding:15px 19px}.source-link strong{font-size:17px;color:#16346b}.source-link small{font-size:14px;color:#566681}.source-link a{font-size:14px;background:#e9f0ff;border:1px solid #abc2ed;color:#1647a7}
.filterbar{background:#eaf0fb;border:1px solid #cfdbf1;padding:18px}.filter label{font-size:15px;color:#234677}.filter input,.filter select,.clear{font-size:16px;height:48px;border:1px solid #b9cbe9;background:white;color:#152c5a}.clear{font-size:14px}
.directory,.profile{border:1px solid #cfdcf1;background:#fff;box-shadow:0 8px 26px #163c8710}
.panel-head{padding:15px 18px;gap:12px}.tabs{background:#e9effa}.tabs button{font-size:16px;padding:11px 16px;color:#33578e}.tabs button.active{background:#1647b5;color:#fff;box-shadow:0 2px 8px #1746a52c}#results-label{font-size:14px;color:#516584}
.profile,.content-layout:has(.graph-scroll) .profile,.content-layout:has(.people-cards) .profile{background:#fff;padding:23px}.profile h3{font-size:27px;color:#18346b}.profile-heading .row-sub{font-size:15px;line-height:1.5}.profile-label{font-size:13px;color:#446397;letter-spacing:.65px}.profile-value{font-size:16px}.clan-qualification{font-size:13px;color:#667791}.chip{font-size:14px;background:#eef3fd;border-color:#cbdaf4;color:#173a79}.breadcrumbs button{font-size:14px;color:#174ab0}
.graph-toolbar{background:#f8faff;padding:16px 20px}.graph-toolbar strong{font-size:21px;color:#19366d}.graph-toolbar p{font-size:14px;color:#53647e;max-width:650px}.graph-actions button{background:#eaf1ff;border-color:#bdceeb;color:#1644a2;font-size:17px}.graph-actions span{font-size:14px}
.graph-legend,.graph-gender-legend{background:#f4f7fd;border-bottom:1px solid #dbe5f4}.graph-legend-item,.graph-gender-legend{font-size:14px;color:#405776}.graph-legend-item small{font-size:12px}.graph-view-settings{background:#ebf1fb;border-color:#d7e3f6}.graph-view-settings label{font-size:15px;color:#244881}
.graph-card-toggle{background:#dfeaff;font-size:16px;font-weight:750;color:#173b7a;padding:13px 19px}.graph-card-toggle input{accent-color:#1647b5;width:18px;height:18px}
.graph-card-section{padding:19px 18px;background:#f6f9ff;border-block:1px solid #d9e5f7}.graph-card-section h3{font-size:23px;color:#17376e}.graph-card-section h3 small{font-size:14px;color:#5a6c88}
.graph-card-grid,.people-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;max-height:430px;overflow-y:auto;padding:2px}
.people-cards{max-height:none;padding:18px;background:#f6f9ff}.graph-profile-card,.people-card{border:1px solid #d0def5;border-radius:12px;background:#fff;padding:12px;box-shadow:0 2px 7px #1647b509;min-width:0}
.graph-profile-card:hover,.people-card:hover{background:#ecf3ff;border-color:#4f7cce}.graph-profile-card.active,.people-card.active{background:#e5eeff;border-color:#1647b5;box-shadow:inset 3px 0 #1647b5}
.graph-profile-card img,.people-card img{width:69px;height:76px;border-radius:8px}.graph-card-text strong,.people-card strong{font-size:16px;color:#18356d}.graph-card-text small,.people-card small{font-size:13px;line-height:1.4;color:#536582}.graph-profile-card .clan-card-status{font-size:12px;color:#1647b5}
.graph-scroll{background-color:#f7faff;background-image:radial-gradient(#d1dcf1 .75px,transparent .75px);height:clamp(430px,62vh,700px)}.graph-edge{stroke:#a9bcdc}.graph-edge.is-paternal{stroke:#2457bb;stroke-width:2.5;opacity:.86}.graph-edge.is-active{stroke:#1647b5;stroke-width:3.6;opacity:1}.graph-edge.is-nonpaternal{stroke:#a0acbf;stroke-dasharray:5 6}.clan-halo{stroke-width:4}.clan-halo.is-muted{opacity:.7}.graph-person.is-selected .graph-ring,.graph-person:hover .graph-ring{stroke:#1647b5}.graph-name{fill:#132e61;font:700 14px system-ui,sans-serif}.graph-id{fill:#526687;font:12px system-ui,sans-serif}.graph-hint{font-size:14px;color:#536582}
.cluster-title{fill:#254775;font-size:15px}.graph-cluster rect{opacity:.65}
.person-preview{background:#fff;border:1px solid #a9c4f0;box-shadow:0 16px 38px #15366e33}.preview-heading span{font-size:13px;color:#31558d}.preview-kin{font-size:13px}.about p{font-size:16px}
@media(max-width:950px){.graph-card-grid,.people-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:1051px){.content-layout:has(.people-cards){grid-template-columns:minmax(0,1fr) minmax(300px,340px)}}
@media(max-width:1030px){.graph-card-grid,.people-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:790px){.graph-card-grid,.people-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.graph-card-grid,.people-cards{grid-template-columns:1fr}.tabs button{font-size:14px;padding:9px 11px}.profile{padding:17px}.filter label{font-size:14px}}

/* Keep exactly three cards per row on wide desktops. */
@media(min-width:951px){.graph-card-grid,.people-cards{grid-template-columns:repeat(3,minmax(0,1fr))}}


/* V12 FINAL — Cobalt heritage atlas. The original sunrise background and crop are unmodified. */
:root{--ink:#182742;--muted:#536782;--edge:#d7e2f2;--paper:#f5f7fc;--deep:#102b63;--accent:#2357cc;--cream:#eef3ff}
html{font-size:16px}body{background:var(--paper);font-size:17px;color:var(--ink);line-height:1.52}
.site-header{background:#fff;border-bottom:1px solid #e0e5ef;padding:13px max(3%,calc((100% - 1500px)/2))}
.brand{font-size:15px;letter-spacing:.9px;color:#132e64}.brand small{font-size:10px;letter-spacing:2px;color:#7586a2}
.brand-mark{width:43px;height:43px;background:linear-gradient(140deg,#143f9b,#102b61);border-radius:10px;box-shadow:0 4px 12px #122f6625}
.site-header nav{font-size:15px;gap:29px}.site-header nav a:hover{color:var(--accent)}
/* Banner image is inherited exactly from v11; typography only. */
.hero{height:215px;padding-inline:max(3%,calc((100% - 1500px)/2))}
.hero h1{font-size:clamp(32px,3.1vw,46px);color:#252f43}.hero h1 em{color:#a44c2f}.hero .lead{font-size:16px;line-height:1.5;color:#544a45;max-width:575px}.hero .eyebrow{font-size:11px;letter-spacing:2px}
.explore{padding:22px max(3%,calc((100% - 1500px)/2)) 58px;background:#f5f7fc}
.section-head{margin:8px 0 16px;align-items:center}.section-head h2{font-size:clamp(28px,2.4vw,36px);letter-spacing:-1px;margin:0 0 5px}.section-head p{font-size:15px;line-height:1.5}
.section-kicker{font-size:11px;letter-spacing:2px;color:#8a5b3e}.metrics{gap:23px}.metrics strong{font-size:34px;color:#123b8c}.metrics small{font-size:11px;letter-spacing:.9px}
.source-link{margin:0 0 13px;background:#fff;border:1px solid #dae4f4;box-shadow:0 2px 8px #0e377808;flex-wrap:wrap}
.source-link strong{color:#173770;font-size:16px}.source-link small{font-size:14px}.source-link a{font-size:15px;background:#eaf1ff;color:#1748ac;border:1px solid #c9d9f8;font-weight:800}
.filterbar{background:#fff;border:1px solid #d7e2f3;border-radius:14px;padding:16px;box-shadow:0 3px 12px #1537780a;grid-template-columns:minmax(220px,1.6fr) minmax(160px,1fr) minmax(140px,.8fr) minmax(135px,.8fr) auto}
.filter label{font-size:14px;font-weight:750;color:#354d70}.filter input,.filter select,.clear{height:48px;font-size:15px;border:1px solid #ccd9ec;border-radius:9px;background:#fcfdff}.filter input:focus,.filter select:focus{border-color:#3769cf}
.clear{padding:0 16px;color:#19478c;font-size:14px;font-weight:760;background:#edf3ff}
.content-layout,.content-layout:has(.graph-scroll),.content-layout:has(.people-cards),.content-layout:has(.lineage-map){display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:18px;margin-top:14px;align-items:start}
.directory,.content-layout:has(.graph-scroll) .directory,.content-layout:has(.people-cards) .directory,.directory:has(.lineage-map){grid-column:1;min-width:0;border:1px solid #d6e1f2;border-radius:15px;box-shadow:0 8px 28px #1b3c7810;background:#fff}
.profile,.content-layout:has(.graph-scroll) .profile,.content-layout:has(.people-cards) .profile,.content-layout:has(.lineage-map) .profile{grid-column:2;display:block;position:sticky;top:16px;max-height:calc(100vh - 32px);overflow-y:auto;background:#fff;border:1px solid #d5e1f0;border-radius:15px;padding:20px;box-shadow:0 8px 28px #1b3c7810}
.panel-head{background:#fff;display:flex;align-items:center;flex-direction:row;justify-content:space-between;gap:14px;padding:14px 17px;border-bottom:1px solid #e1e8f3}
.tabs{background:#eef3fb;border-radius:11px;padding:5px;flex-wrap:wrap}.tabs button{font-size:16px;font-weight:750;color:#3e5882;padding:11px 17px;border-radius:8px;white-space:nowrap}.tabs button.active{background:#1749bb;color:#fff;box-shadow:0 4px 11px #1d50b52e}.tabs button:hover:not(.active){background:#dce8fa}
#results-label{font-size:14px;color:#677894;white-space:nowrap}
.people-cards,.graph-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;max-height:none;overflow:visible;padding:16px;background:#f9fbff}
.people-card,.graph-profile-card{display:flex;align-items:center;gap:11px;min-width:0;min-height:113px;padding:12px;border:1px solid #dce5f3;border-radius:12px;background:#fff;color:#1c3157;box-shadow:0 2px 6px #13336c0a;transition:transform .18s,box-shadow .18s,border-color .18s}
.people-card:hover,.graph-profile-card:hover{transform:translateY(-3px);border-color:#5d84d7;background:#fff;box-shadow:0 9px 21px #1237761b}
.people-card.active,.graph-profile-card.active{background:#ebf2ff;border-color:#2458c6;box-shadow:inset 3px 0 #2357cc}
.people-card img,.graph-profile-card img{width:75px;height:88px;border-radius:9px;object-fit:cover;object-position:center 24%;background:#eae9e4;flex:none}
.people-card span,.graph-card-text{min-width:0;display:flex;flex-direction:column;gap:4px}
.people-card strong,.graph-card-text strong{font-size:17px;color:#1c376c;line-height:1.25;overflow-wrap:anywhere}
.people-card small,.graph-card-text small{font-size:13px;color:#60718b;line-height:1.45}
.card-generation,.people-card .card-generation,.graph-card-text .card-generation{font-size:11px;letter-spacing:.8px;color:#2557b6;font-weight:850;text-transform:uppercase}
.profile-heading{align-items:center;gap:14px}.profile-heading .avatar{width:86px;height:98px;border-radius:10px;object-fit:cover}.profile h3{font-size:27px;letter-spacing:-.5px;color:#17366e}.profile-heading .row-sub{font-size:14px;line-height:1.5}
.profile-label{font-size:11px;letter-spacing:.9px;color:#6680a5}.profile-value{font-size:16px;color:#2c4264}.clan-qualification{font-size:12px}.chip{font-size:13px;font-weight:700;border-radius:8px;background:#edf3ff;color:#1c4c9e;border-color:#d4e1f5}.breadcrumbs button{font-size:13px;color:#2454ae}
.graph-toolbar{background:#fff;padding:15px 18px}.graph-toolbar strong{font-size:21px;color:#193b80}.graph-toolbar p{font-size:14px;color:#68768b;line-height:1.5}.graph-actions button{font-size:17px;border-radius:8px;background:#eef4ff}
.graph-legend,.graph-gender-legend{background:#fafcff;padding:10px 16px}.graph-legend-item,.gender-legend{font-size:12px}.graph-view-settings{background:#f2f6ff;padding:10px 16px}.graph-view-settings label{font-size:14px}.graph-card-toggle{background:#eff5ff;padding:11px 16px;font-size:14px}
.graph-card-section{background:#f8fbff;padding:12px 16px}.graph-card-section h3{font-size:19px;margin:8px 0}.graph-card-grid{padding:0;background:transparent}
.graph-scroll{height:clamp(450px,65vh,730px);background-color:#fbfcff;background-image:radial-gradient(#dce6f6 .8px,transparent .8px);background-size:22px 22px;scroll-behavior:smooth}
.graph-edge.is-paternal{stroke:#2458c6;stroke-width:3}.graph-edge.is-active{stroke:#123f9b;stroke-width:4}.graph-person.is-selected .graph-ring{stroke:#2357cc}
.graph-name{font:750 15px system-ui,sans-serif;fill:#18366d}.graph-id{font:12px system-ui,sans-serif;fill:#61718d}.cluster-title{fill:#35578b;font-size:15px}
.map-explainer{background:#edf4ff;color:#29466d;font-size:14px}.lineage-map{padding:18px;gap:0}.lineage-column h3{color:#2756ad;font-size:13px}.lineage-card{min-height:76px;background:#fff;border:1px solid #d8e4f5;border-radius:10px}.lineage-card:hover,.lineage-card.is-focused{background:#eef4ff;border-color:#3568cf}.lineage-card strong{font-size:16px}.lineage-card small{font-size:12px}
.person-preview{background:#fff;border:1px solid #c0d4f5;box-shadow:0 17px 35px #143b802a}.preview-heading strong{font-size:17px}.preview-heading span{font-size:13px}
.about{padding:55px 5%;background:#fff}.about h2{color:#193c82}.about p{font-size:15px}.about .privacy-note{border-left-color:#2357cc;background:#f1f5fd}
:focus-visible{outline:3px solid #2357cc;outline-offset:2px}
@media(max-width:1240px){.content-layout,.content-layout:has(.graph-scroll),.content-layout:has(.people-cards),.content-layout:has(.lineage-map){grid-template-columns:minmax(0,1fr) 290px}.people-cards,.graph-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:980px){.filterbar{grid-template-columns:repeat(2,minmax(0,1fr))}.clear{grid-column:span 2}.content-layout,.content-layout:has(.graph-scroll),.content-layout:has(.people-cards),.content-layout:has(.lineage-map){grid-template-columns:minmax(0,1fr)}.directory,.content-layout:has(.graph-scroll) .directory,.content-layout:has(.people-cards) .directory,.directory:has(.lineage-map),.profile,.content-layout:has(.graph-scroll) .profile,.content-layout:has(.people-cards) .profile,.content-layout:has(.lineage-map) .profile{grid-column:1}.profile,.content-layout:has(.graph-scroll) .profile,.content-layout:has(.people-cards) .profile,.content-layout:has(.lineage-map) .profile{position:static;max-height:none}}
@media(max-width:680px){.hero{height:220px;padding:0 4%}.hero h1{font-size:31px}.hero .lead{font-size:13px}.explore{padding:18px 3.5% 42px}.section-head{display:block}.section-head p{font-size:14px}.metrics{margin-top:12px}.filterbar{grid-template-columns:1fr}.clear{grid-column:1}.panel-head{align-items:flex-start;flex-direction:column}.tabs{width:100%}.tabs button{font-size:14px;padding:9px 11px}.people-cards,.graph-card-grid{grid-template-columns:1fr}.graph-scroll{height:440px}.source-link{align-items:flex-start}.source-link a{white-space:normal}}
@media(prefers-reduced-motion:reduce){.people-card,.graph-profile-card{transition:none}}

/* Compact scrollable graph previews: graph remains visible near the fold. */
.graph-card-grid{max-height:260px;overflow-y:auto;overscroll-behavior:contain;padding:1px 5px 8px 1px;scrollbar-color:#bacce9 #f4f7ff;scrollbar-width:thin}
@media(max-width:680px){.graph-card-grid{max-height:300px}}

/* v14: heading → archive summary/workbook → search and view controls */
.section-head{display:block;margin:8px 0 10px}
.section-head p{max-width:780px}
.explore-overview{display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap;margin:12px 0 16px}
.explore-overview .metrics{display:flex;gap:30px;align-items:center;margin:0}
.explore-overview .metrics>div{display:flex;flex-direction:column;gap:3px;min-width:80px}
.workbook-link{display:inline-flex;align-items:center;gap:10px;min-height:46px;padding:11px 16px;border:1px solid #b8cdf5;background:#e7efff;border-radius:11px;color:#15429b;text-decoration:none;font-size:15px;font-weight:750;box-shadow:0 2px 8px #1e46920b;transition:background .16s,border-color .16s,transform .16s}
.workbook-link svg{width:20px;height:20px;flex:none}
.workbook-link:hover,.workbook-link:focus-visible{background:#d7e6ff;border-color:#668bd3;transform:translateY(-1px)}
.graph-scroll{cursor:grab;scroll-behavior:auto;touch-action:pan-x pan-y;user-select:none}
.graph-scroll.is-dragging{cursor:grabbing}
.graph-scroll.is-dragging *{cursor:grabbing!important}
.graph-person{cursor:pointer}
.graph-card-toggle input{accent-color:#1647b5}
@media(max-width:680px){.explore-overview{gap:13px}.explore-overview .metrics{gap:18px}.explore-overview .metrics>div{min-width:0}.workbook-link{width:100%;justify-content:center}}

/* Immersive graph view; regular layout is restored without reloading. */
body.graph-expanded{overflow:hidden}
body.graph-expanded .content-layout,body.graph-expanded .content-layout:has(.graph-scroll){display:block}
body.graph-expanded .content-layout .directory,body.graph-expanded .content-layout:has(.graph-scroll) .directory{position:fixed;inset:0;z-index:1000;display:flex;flex-direction:column;width:100vw;height:100dvh;margin:0;border:0;border-radius:0;box-shadow:none;background:#fff}
body.graph-expanded .content-layout .profile{display:none!important}
body.graph-expanded .directory .panel-head{flex:0 0 auto}
body.graph-expanded #results{flex:1 1 auto;min-height:0;max-height:none;display:flex;flex-direction:column;overflow-y:auto}
body.graph-expanded .graph-toolbar,body.graph-expanded .graph-legend,body.graph-expanded .graph-gender-legend,body.graph-expanded .graph-view-settings,body.graph-expanded .graph-card-toggle,body.graph-expanded .graph-hint{flex-shrink:0}
body.graph-expanded .graph-scroll{flex:1 1 auto;height:auto!important;min-height:180px;max-height:none;overscroll-behavior:contain}
body.graph-expanded .graph-card-section{flex:0 0 auto;max-height:28vh;overflow-y:auto}
#graph-expand{white-space:nowrap;font-weight:700}
body.graph-expanded #graph-expand{color:#fff;background:#1647b5;border-color:#1647b5}
@media(max-width:650px){body.graph-expanded .graph-legend,body.graph-expanded .graph-gender-legend{max-height:65px;overflow:auto}body.graph-expanded .graph-toolbar{gap:5px}body.graph-expanded .graph-toolbar p{display:none}}

/* v16: compact header statistics, banner-adjacent filters, view tabs in the summary position. */
.site-header{max-width:none;display:flex;justify-content:space-between;align-items:center;gap:22px;padding:12px max(3%,calc((100% - 1500px)/2))}
.header-actions{display:flex;align-items:center;justify-content:flex-end;gap:26px;min-width:0;flex-wrap:wrap}
.header-actions .explore-overview{display:flex;align-items:center;justify-content:flex-end;gap:17px;margin:0;flex-wrap:nowrap}
.header-actions .metrics{display:flex;align-items:center;gap:20px;margin:0}
.header-actions .metrics>div{min-width:0;gap:0}
.header-actions .metrics strong{font-size:21px;line-height:1.1;color:#1749bb;letter-spacing:-.6px}
.header-actions .metrics small{font-size:9px;letter-spacing:.7px;font-weight:750}
.header-actions .workbook-link{padding:9px 12px;font-size:12px;white-space:nowrap;min-height:38px;width:auto}
.header-actions .workbook-link svg{width:17px;height:17px}
.site-header nav{display:flex;gap:20px;white-space:nowrap}
.explore{padding-top:17px}
.explore>.filterbar{margin:0 0 16px;padding:12px 15px}
.explore>.section-kicker{margin-top:5px}
.explore .section-head{margin:9px 0 16px}
.explore>.panel-head{margin:0 0 13px;padding:0 0 11px;border-bottom:1px solid #e1e8f3;background:transparent}
.explore>.panel-head .tabs{display:flex;flex-wrap:wrap}
.explore>.content-layout{margin-top:0}
@media(max-width:1100px){.header-actions{gap:16px}.header-actions .explore-overview{gap:12px}.header-actions .metrics{gap:11px}.header-actions .metrics strong{font-size:19px}.site-header nav{gap:13px}}
@media(max-width:820px){.site-header{align-items:flex-start;flex-wrap:wrap;gap:10px}.header-actions{width:100%;justify-content:space-between;gap:12px}.header-actions .explore-overview{flex-wrap:wrap;justify-content:flex-start}.header-actions .workbook-link{width:auto}.header-actions nav{margin-left:auto}}
@media(max-width:520px){.header-actions{align-items:center}.header-actions .metrics{gap:14px}.header-actions .metrics strong{font-size:19px}.header-actions .metrics small{font-size:8px}.header-actions .workbook-link{font-size:11px;padding:8px 9px}.site-header nav{font-size:12px;gap:12px}.explore>.filterbar{padding:12px}.explore>.panel-head{gap:6px}}
/* Keep view navigation accessible when the graph is expanded. */
body.graph-expanded .explore>.panel-head{position:fixed;top:6px;left:16px;right:auto;z-index:1200;padding:4px;border-radius:11px;border:1px solid #cbd9f3;background:#ffffffed;box-shadow:0 5px 20px #152b5b2b}
body.graph-expanded .explore>.panel-head #results-label{display:none}

/* v19: image-first chart with names alongside faces and readable labels. */
.language-toggle{background:#e9efff;border:1px solid #9db5e9;border-radius:9px;padding:9px 14px;color:#1642a0;font:700 15px system-ui,sans-serif;cursor:pointer;white-space:nowrap}
.graph-name{font:750 17px system-ui,sans-serif;fill:#122b62;paint-order:stroke;stroke:#fff;stroke-width:3px;stroke-linejoin:round}
.graph-id{font:13px system-ui,sans-serif;fill:#4b5f80;paint-order:stroke;stroke:#fff;stroke-width:2.5px}
.graph-edge.is-maternal{stroke:#b48aa7;stroke-width:2.5;stroke-dasharray:7 5;fill:none}
.graph-person{transition:opacity .15s ease}
.graph-person:hover{filter:drop-shadow(0px 2px 5px #3452a466)}
.family-graph{overflow:visible}
@media(max-width:650px){.language-toggle{padding:6px 8px;font-size:12px}.graph-name{font-size:17px}}

/* Map-first layout: selected profiles are opened explicitly from the popup. */
.content-layout.visual-map-only,.content-layout.visual-map-only:has(.graph-scroll),.content-layout.visual-map-only:has(.lineage-map){grid-template-columns:minmax(0,1fr)}
.content-layout.visual-map-only .directory{grid-column:1}
.content-layout.visual-map-only .profile{display:none!important}
.person-preview{pointer-events:auto;z-index:1100;width:290px}
.preview-profile-link{display:inline-flex;align-items:center;gap:7px;margin-top:11px;padding:9px 13px;border:1px solid #9db8eb;border-radius:9px;color:#fff;background:#1647b5;font:700 13px system-ui,sans-serif;cursor:pointer}
.preview-profile-link:hover,.preview-profile-link:focus-visible{background:#103b9e}
@media(max-width:790px){.person-preview{display:block!important;max-width:calc(100vw - 24px)}}


/* v20.2 compact navigation: view selection between brand and archive statistics. */
.site-header{display:grid;grid-template-columns:auto minmax(0,1fr) auto;column-gap:clamp(12px,2vw,27px);align-items:center;padding-block:10px}
.header-view-tabs{display:flex;align-items:center;justify-content:center;gap:5px;min-width:0;background:#edf3ff;border:1px solid #dbe5f7;padding:4px;border-radius:12px}
.header-view-tabs button{appearance:none;border:0;background:transparent;color:#324e7f;font:700 clamp(12px,1.04vw,15px) system-ui,sans-serif;white-space:nowrap;border-radius:8px;padding:9px clamp(8px,1.1vw,15px);cursor:pointer;min-height:39px}
.header-view-tabs button:hover:not(.active){background:#dce8fc}
.header-view-tabs button.active{background:#1749bb;color:#fff;box-shadow:0 2px 8px #1749bb30}
.header-view-tabs button:focus-visible{outline:3px solid #da9049;outline-offset:2px}
.header-actions{gap:clamp(8px,1vw,16px);flex-wrap:nowrap}
.header-actions .explore-overview{gap:12px}
.header-actions .metrics{gap:12px}
.header-actions nav{gap:11px}
.header-actions .workbook-link{font-size:11px;padding:8px}
/* Free space above the visualizations while retaining useful filtering. */
.explore{padding-top:10px}
.explore>.filterbar{margin-bottom:8px;padding:10px 13px}
.explore>.content-layout{margin-top:0}
.graph-scroll{height:clamp(520px,73vh,950px)}
/* The tabs must remain reachable while a graph occupies the browser window. */
body.graph-expanded .header-view-tabs{position:fixed;top:7px;left:12px;z-index:1300;background:#ffffffee;box-shadow:0 6px 24px #132d6340}
@media(max-width:1300px){
 .site-header{grid-template-columns:auto minmax(0,1fr);row-gap:8px}
 .header-view-tabs{justify-content:flex-start;grid-column:2}
 .header-actions{grid-column:1/-1;justify-content:flex-end}
}
@media(max-width:800px){
 .site-header{display:flex;flex-wrap:wrap;justify-content:space-between;row-gap:8px}
 .header-view-tabs{order:3;flex:1 1 100%;overflow-x:auto;justify-content:flex-start}
 .header-actions{width:auto;flex:1 1 auto;justify-content:flex-end;flex-wrap:wrap}
 .header-actions .explore-overview{flex-wrap:wrap}
 .header-actions nav{display:none}
}
@media(max-width:520px){
 .header-actions .metrics strong{font-size:17px}
 .header-actions .workbook-link{font-size:11px}
 .header-view-tabs button{font-size:13px;min-height:42px;padding:9px 12px}
 .graph-scroll{height:clamp(420px,67dvh,650px)}
}

.header-view-tabs .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* v20.4: uncluttered portrait cards, subtly elevated controls, language beside workbook. */
.header-actions .explore-overview{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.header-actions .explore-overview .language-toggle{font-size:12px;font-weight:700;padding:8px 11px;background:#fffdf8;color:#1749bb;border:1px solid #cedcf3;border-radius:8px;box-shadow:0 2px 5px #173b8112;min-height:36px}
.header-actions .explore-overview .language-toggle:hover{background:#edf3ff;box-shadow:0 3px 8px #173b8120}
.header-view-tabs{background:transparent;border:0;padding:0;gap:8px}
.header-view-tabs button{background:#fffdf8;border:1px solid #d7dfeb;border-radius:10px;box-shadow:0 2px 5px #1b3b7020,0 1px 1px #1b3b7010;transition:box-shadow .18s ease,transform .18s ease,background .18s ease}
.header-view-tabs button:hover:not(.active){background:#f1f6ff;transform:translateY(-1px);box-shadow:0 4px 10px #1b3b7022}
.header-view-tabs button.active{background:#1749bb;border-color:#1749bb;color:#fff;box-shadow:0 3px 9px #1749bb38}
/* Portraits have no filled tiles; a thin outline and hover lift retain discoverability. */
.people-cards,.graph-card-section{background:transparent}
.people-card,.graph-profile-card{background:transparent!important;border:1px solid transparent;border-radius:10px;box-shadow:none}
.people-card:hover,.graph-profile-card:hover{background:transparent!important;border-color:#bdcde9;box-shadow:0 4px 14px #172f5b13;transform:translateY(-2px)}
.people-card.active,.graph-profile-card.active{background:transparent!important;border-color:#1749bb;box-shadow:0 0 0 1px #1749bb38}
.people-card img,.graph-profile-card img{background:transparent}
@media(max-width:800px){.header-actions .explore-overview{gap:8px}.header-actions .explore-overview .language-toggle{min-height:35px}}
@media(prefers-reduced-motion:reduce){.header-view-tabs button,.people-card,.graph-profile-card{transition:none}.header-view-tabs button:hover,.people-card:hover,.graph-profile-card:hover{transform:none}}

/* v20.5 — reliable compact header across desktop, tablet, and phone. */
.site-header{width:100%;min-width:0}
.site-header .brand{flex-shrink:0;white-space:nowrap}
.site-header .header-view-tabs{max-width:100%;width:max-content;justify-self:center}
.site-header .header-actions{min-width:0}
.header-actions .explore-overview{min-width:0}
.header-actions .metrics small{white-space:nowrap}
.header-actions .workbook-link{flex-shrink:0}
.header-actions .language-toggle{flex-shrink:0}
@media(min-width:1301px){
 .site-header{grid-template-columns:minmax(140px,auto) minmax(280px,1fr) auto}
 .header-actions{justify-self:end}
}
@media(min-width:821px) and (max-width:1300px){
 .site-header{grid-template-columns:auto minmax(0,1fr)}
 .header-view-tabs{grid-column:2;justify-self:end}
 .header-actions{grid-column:1 / -1;justify-self:stretch;justify-content:space-between}
}
@media(max-width:820px){
 .site-header .header-view-tabs{order:2;width:100%;flex:1 0 100%;justify-content:flex-start;overflow-x:auto;padding:3px 0 7px}
 .site-header .header-actions{order:3;width:100%;justify-content:space-between}
 .header-actions .explore-overview{flex-wrap:wrap}
}
@media(max-width:520px){
 .site-header .brand{font-size:12px}
 .site-header .header-actions{gap:9px}
 .header-actions .explore-overview{gap:8px}
 .header-actions .workbook-link{white-space:nowrap}
 .site-header .header-view-tabs button{flex:0 0 auto}
}

/* v20.6: Compact graph portraits; profile-card images are unchanged. */
.family-graph .graph-person{cursor:pointer}
.family-graph .graph-name{font-size:17px;font-weight:750;paint-order:stroke;stroke:#fff;stroke-width:3px;stroke-linejoin:round}
.family-graph .graph-id{font-size:12px;paint-order:stroke;stroke:#fff;stroke-width:2.5px}
.family-graph .graph-person:hover .graph-ring,.family-graph .graph-person.is-selected .graph-ring{stroke-width:2px}

/* Expand/collapse branch controls are distinct from the person selection target. */
.family-graph .graph-branch-toggle{cursor:pointer;outline:none}
.family-graph .graph-branch-toggle circle{fill:#fff;stroke:#1749bb;stroke-width:2.4;filter:drop-shadow(0 2px 3px #162d5730)}
.family-graph .graph-branch-toggle text{fill:#1749bb;font-size:18px;font-weight:750;pointer-events:none}
.family-graph .graph-branch-toggle:hover circle,.family-graph .graph-branch-toggle:focus-visible circle{fill:#e8f0ff;stroke-width:3}

/* v20.8 — spacious, dynamically reflowing heritage graph */
.hero{position:relative;isolation:isolate;overflow:hidden;min-height:250px;height:auto;padding:32px 4%;display:flex;align-items:center;background:#f7e5d3}
.hero .hero-backdrop{position:absolute;inset:0;z-index:-2;background-position:center;background-size:cover;transition:opacity 1.2s ease}
.hero .hero-original{background-image:url('heritage-dawn.webp');opacity:1}
.hero .hero-alternative{background-image:url('heritage-sunrise-alt.webp');opacity:0}
.hero.is-alt-art .hero-original{opacity:0}
.hero.is-alt-art .hero-alternative{opacity:1}
.hero:before{content:'';position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,#fff4e5e6,#fff3e5a6 58%,transparent)}
.hero .hero-text{width:100%;max-width:1100px;position:relative;z-index:1}
.hero h1{font-size:clamp(30px,3.2vw,46px);margin:7px 0 3px}
.hero .hero-secondary{font:600 clamp(23px,2.65vw,38px)/1.19 Georgia,serif;letter-spacing:-.02em;color:#273958;margin:0 0 8px}
.hero .lead{margin:0;max-width:780px;font-size:clamp(14px,1.2vw,17px);line-height:1.45}
.generation-chips{display:flex;align-items:center;flex-wrap:wrap;gap:6px;padding:5px 2px 10px}
.generation-chip-label{color:#857464;font:700 11px system-ui,sans-serif;letter-spacing:.07em;margin-right:4px}
.generation-chip{border:1px solid #dcd0bd;background:transparent;border-radius:7px;color:#2c4977;padding:5px 9px;font:650 12px system-ui,sans-serif;cursor:pointer}
.generation-chip small{font-size:10px;font-weight:500;color:#887d6e;margin-left:5px}
.generation-chip.selected{border-color:#1749bb;color:#1749bb;background:#eef3ff}
.graph-toolbar{position:sticky;top:0;z-index:21;box-shadow:0 3px 12px #142b4d10;padding:9px 12px}
.graph-toolbar .graph-view-title strong{font-size:16px}
.graph-actions{gap:5px}
.graph-actions button,.graph-actions select{min-height:34px;font-size:12px}
.graph-legend,.graph-gender-legend{display:none!important}
.graph-view-settings,.graph-card-toggle{padding:5px 12px}
.graph-hint{font-size:12px;padding:5px 12px}
.graph-scroll{height:clamp(590px,78vh,1150px);background-image:none;background-color:#fcfaf5}
.family-graph .graph-edge{fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:2.1;opacity:.78;filter:drop-shadow(.6px .4px .2px #b6a28d44)}
.family-graph .graph-edge.is-paternal{stroke-width:2.7;opacity:.95}
.family-graph .graph-cluster rect{stroke-linejoin:round}
.floating-full-view{position:fixed;right:18px;bottom:18px;z-index:990;border:1px solid #c5a66c;background:#173d8d;color:#fff;box-shadow:0 5px 18px #173d8d4d;border-radius:24px;padding:11px 18px;font:700 13px system-ui,sans-serif;cursor:pointer}
.floating-full-view[hidden]{display:none!important}
body.graph-expanded .floating-full-view{top:12px;bottom:auto;right:12px;z-index:1400;background:#fff;color:#173d8d}
.header-view-tabs button,.header-actions .workbook-link,.header-actions .language-toggle{box-shadow:none!important;background:transparent!important;border-radius:0!important;transform:none!important}
.header-view-tabs button.active{border-bottom:2px solid #bd8c43!important}
@media(max-width:750px){.hero{padding:22px 4%;min-height:240px}.hero h1{font-size:31px}.hero .hero-secondary{font-size:24px}.hero:before{background:#fff1e1b8}.graph-scroll{height:75dvh}.graph-toolbar{position:relative}.floating-full-view{right:10px;bottom:10px}}
@media(prefers-reduced-motion:reduce){.hero .hero-backdrop{transition:none}}


/* v20.9 — menu navigation, not raised tabs. Keep a clear active cue. */
.site-header .header-view-tabs{
  display:flex;align-items:center;gap:clamp(9px,1.5vw,21px);
  background:transparent!important;border:0!important;
  padding:0!important;border-radius:0!important;
  box-shadow:none!important;
}
.site-header .header-view-tabs button{
  appearance:none;position:relative;display:inline-flex;align-items:center;
  justify-content:center;min-height:42px;padding:10px 3px 12px;
  border:0!important;border-radius:0!important;
  background:transparent!important;box-shadow:none!important;
  color:#47546a;font-weight:600;
  transition:color .16s ease!important;transform:none!important;
}
.site-header .header-view-tabs button:hover:not(.active){
  color:#1749bb;background:transparent!important;box-shadow:none!important;
}
.site-header .header-view-tabs button.active{
  color:#153f99!important;font-weight:800;
  border:0!important;border-bottom:0!important;
  background:transparent!important;box-shadow:none!important;
}
.site-header .header-view-tabs button.active::after{
  content:"";position:absolute;bottom:3px;left:2px;right:2px;
  height:3px;border-radius:3px;background:#bc8538;
}
.site-header .header-view-tabs button:focus-visible{
  outline:2px solid #1749bb;outline-offset:3px;
}
/* While in full view the floating navigation remains a plain menu. */
body.graph-expanded .site-header .header-view-tabs{
  background:#fffcf5f2!important;border:1px solid #e9ddca!important;
  border-radius:9px!important;padding:4px 12px!important;
  box-shadow:0 5px 20px #162e5630!important;
}
@media(max-width:820px){
  .site-header .header-view-tabs{gap:16px;scrollbar-width:thin}
  .site-header .header-view-tabs button{flex:0 0 auto;padding-inline:2px}
}
@media(prefers-reduced-motion:reduce){
  .site-header .header-view-tabs button{transition:none!important}
}

/* v20.11: regular graph should use the available page height, not a capped
   730px widget. Fullscreen continues to use its existing flex viewport. */
.content-layout.visual-map-only:has(.graph-scroll) { align-items:stretch; }
.content-layout.visual-map-only:has(.graph-scroll) .directory { min-width:0; }
.content-layout.visual-map-only:not(:has(.people-cards)) .graph-scroll {
  height:calc(100dvh - 160px);
  min-height:660px;
  max-height:none;
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
.graph-direction-label {color:#53617a;font-weight:650;font-size:12px;margin-left:7px;white-space:nowrap}
.graph-actions #graph-direction {font-size:12px;min-height:34px;border-radius:7px;border:1px solid #c9d7ec;background:#fffcf5;color:#153f99;padding:4px 7px;max-width:150px}
@media(max-width:700px){.content-layout.visual-map-only:not(:has(.people-cards)) .graph-scroll{height:calc(100dvh - 135px);min-height:480px}.graph-direction-label{display:none}}
body.graph-expanded .graph-scroll{height:auto!important;max-height:none!important;min-height:180px!important}

/* v20.12: fullscreen filters share the standard branch/generation state. */
.graph-full-filters {display:none}
body.graph-expanded .graph-full-filters {
 display:flex;flex:0 0 auto;flex-wrap:wrap;align-items:center;gap:8px 12px;
 padding:8px 12px;border-top:1px solid #d5d9d6;background:#f7f7f3;
}
.graph-full-filters label {font:650 12px system-ui,sans-serif;color:#3a4e60}
.graph-full-filters select {min-width:120px;max-width:min(32vw,280px);padding:7px 9px;border:1px solid #b8c3c8;border-radius:5px;background:#fffdfa;color:#27384f;font:500 13px system-ui,sans-serif}
.graph-full-filters button {background:transparent;border:0;border-bottom:1px solid #ad8356;color:#264a78;padding:6px 3px;font:600 12px system-ui,sans-serif;cursor:pointer}
.graph-full-filters :focus-visible {outline:2px solid #1647b5;outline-offset:2px}
/* Slate-tinted paper: restrained contrast with ivory portraits and royal blue edges. */
.graph-scroll,body.graph-expanded .graph-scroll {
 background-color:#edf0ee;
 background-image:radial-gradient(circle at 50% 30%,#f5f6f2 0%,#e9edec 100%);
}
@media(max-width:650px){
 body.graph-expanded .graph-full-filters {gap:5px 8px;padding:6px 8px}
 body.graph-expanded .graph-full-filters select {min-width:90px;max-width:42vw}
}

/* v20.13: Full View filters remain above the canvas and share active selections. */
body.graph-expanded .graph-full-filters {position:sticky;top:0;z-index:35;box-shadow:0 2px 10px #263f4a12}
.graph-scroll {background:#f5f7fc}
body.graph-expanded .graph-scroll {background:#f5f7fc}

/* v20.14 — let the visual graph/map occupy the full banner width.
   Keep controls inset to the same content alignment as the hero copy.
   Profile-card view retains its established content width. */
.explore:has(> .content-layout.visual-map-only) {
  padding-inline:0;
}
.explore:has(> .content-layout.visual-map-only) > .filterbar,
.explore:has(> .content-layout.visual-map-only) > .generation-chips {
  margin-inline:max(3%, calc((100% - 1500px) / 2));
}
.explore > .content-layout.visual-map-only {
  width:100%;
  max-width:none;
  margin-inline:0;
  padding-inline:0;
  grid-template-columns:minmax(0,1fr);
}
.explore > .content-layout.visual-map-only > .directory {
  width:100%;
  min-width:0;
  max-width:none;
  grid-column:1/-1;
}
@media(max-width:700px) {
  .explore:has(> .content-layout.visual-map-only) > .filterbar,
  .explore:has(> .content-layout.visual-map-only) > .generation-chips {
    margin-inline:3%;
  }
}


/* v20.15 — Graph and lineage map belong to the page, not a separate card.
   Scope every override to the visual modes; profile cards keep their own design. */
.explore:has(> .content-layout.visual-map-only) {
  background:#f5f7fc;
  border-top:0;
}
.explore > .content-layout.visual-map-only,
.explore > .content-layout.visual-map-only > .directory {
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  outline:0;
}
/* Continuous page surface, including the graph's pan/scroll viewport. */
.content-layout.visual-map-only .graph-scroll {
  background:transparent!important;
  background-image:none!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  scrollbar-width:thin;
  scrollbar-color:#9babbd transparent;
}
.content-layout.visual-map-only .graph-toolbar {
  background:#f5f7fcf2!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  border-bottom:1px solid #dbe3ed!important;
  backdrop-filter:blur(6px);
}
.content-layout.visual-map-only .graph-view-settings,
.content-layout.visual-map-only .graph-card-toggle,
.content-layout.visual-map-only .graph-hint {
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  color:#627287;
}
.content-layout.visual-map-only .graph-view-settings {
  border-bottom:1px solid #e3e9f0!important;
}
.content-layout.visual-map-only .graph-hint {
  padding-block:9px;
  font-size:11px;
}
/* Map content also reads as a continuation of the page.
   Individual person cards keep their boundaries for usability. */
.content-layout.visual-map-only .lineage-map {
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
.content-layout.visual-map-only .map-explainer {
  background:transparent!important;
  border:0!important;
  color:#607086;
}
/* Restore a dedicated canvas only in Full View, where the site is hidden. */
body.graph-expanded .content-layout.visual-map-only .graph-scroll {
  background:#f5f7fc!important;
}
body.graph-expanded .content-layout.visual-map-only > .directory {
  background:#f5f7fc!important;
}
body.graph-expanded .content-layout.visual-map-only .graph-toolbar {
  background:#f5f7fcf2!important;
}
@media(prefers-reduced-transparency:reduce) {
  .content-layout.visual-map-only .graph-toolbar {backdrop-filter:none}
}

/* v20.18: mobile graph gestures and a non-obstructive person preview. */
.graph-scroll{touch-action:none;overscroll-behavior:contain}
.graph-scroll .family-graph{touch-action:none}
.preview-dismiss{position:absolute;top:6px;right:8px;display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border:0;border-radius:50%;background:transparent;color:#284879;font-size:25px;cursor:pointer}
.preview-heading{padding-right:24px}
@media(max-width:790px),(pointer:coarse){
  .person-preview:not([hidden]){position:fixed!important;left:8px!important;right:8px!important;top:auto!important;bottom:calc(10px + env(safe-area-inset-bottom))!important;width:auto!important;max-width:none!important;max-height:min(36dvh,220px);overflow-y:auto;padding:10px 36px 10px 10px;border-radius:12px;box-shadow:0 6px 20px #132b4c2b;backdrop-filter:none}
  .preview-heading img{width:42px;height:48px}
  .preview-heading strong{font-size:14px}
  .preview-kin{margin-top:6px;padding-top:6px}
  .preview-profile-link{margin-top:6px;padding:6px 10px}
  .preview-dismiss{display:flex}
}
/* Earlier mobile rules forced previews visible even when the hidden attribute was set. */
.person-preview[hidden]{display:none!important}

/* v21: one compact graph toolbar in normal and Full View. */
.graph-toolbar{position:sticky;top:0;z-index:40;padding:6px 9px;background:#fafbfbea;box-shadow:0 2px 10px #142b4d13}
.graph-toolbar .graph-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;width:100%}
.graph-toolbar .graph-actions>button,.graph-toolbar .graph-actions>select,.graph-compact-select select{min-height:32px;border-radius:7px;font-size:12px}
.graph-compact-select{display:flex;align-items:center;gap:5px;color:#465878;font:650 12px system-ui,sans-serif}
.graph-compact-select select{max-width:185px;min-width:90px;padding:3px 6px;border:1px solid #c9d7ec;background:#fffdf8;color:#173d8d}
.graph-compact-check{display:inline-flex;align-items:center;gap:4px;color:#465878;font:650 12px system-ui,sans-serif;white-space:nowrap}
.graph-compact-check input{accent-color:#7838c8}
.graph-spacer{flex:1 1 10px}
body.graph-expanded .site-header .header-view-tabs,body.graph-expanded .header-view-tabs,body.graph-expanded .graph-view-title,body.graph-expanded .graph-card-section,body.graph-expanded .graph-card-toggle,body.graph-expanded .graph-view-settings,body.graph-expanded .graph-hint,body.graph-expanded .explore>.panel-head{display:none!important}
body.graph-expanded .content-layout.visual-map-only .graph-toolbar{position:relative;top:0;flex:0 0 auto;z-index:40;padding:6px 9px;background:#fafbfbea!important;box-shadow:none}
body.graph-expanded .content-layout.visual-map-only .graph-scroll{flex:1 1 auto;min-height:0!important;height:auto!important;overflow:auto}
body.graph-expanded .floating-full-view{display:none!important}
/* The purple line identifies recorded father-to-child connections when enabled. */
.family-graph.is-paternal-focus .graph-edge.is-patrilineal,.family-graph.is-paternal-focus .graph-edge.is-active.is-patrilineal{stroke:#7838c8;stroke-width:4.5;opacity:1;filter:none}
.family-graph.is-paternal-focus .graph-edge.is-nonpaternal,.family-graph.is-paternal-focus .graph-edge.is-maternal{opacity:.16}
.family-graph .graph-profile-link{cursor:pointer;outline:none}
.family-graph .graph-profile-link rect{fill:#fffdf9;stroke:#9ab0d2;stroke-width:1.2}
.family-graph .graph-profile-link text{font:750 22px system-ui,sans-serif;fill:#224d9c;pointer-events:none}
.family-graph .graph-profile-link:hover rect,.family-graph .graph-profile-link:focus-visible rect{fill:#eef2ff;stroke:#7838c8;stroke-width:2}
.person-preview{display:none!important}
@media(max-width:700px){.graph-toolbar .graph-actions{gap:4px}.graph-compact-select{font-size:11px}.graph-compact-select select{max-width:135px;min-width:70px}.graph-spacer{flex-basis:0}}

/* v21 usability: low-profile profile navigation and compact graph controls. */
.family-graph .graph-profile-link {cursor:pointer;outline:none}
.family-graph .graph-profile-link rect {fill:transparent;stroke:none}
.family-graph .graph-profile-link text {font:400 13px system-ui,sans-serif;fill:#5773ad;stroke:none;pointer-events:none}
.family-graph .graph-profile-link:hover rect,
.family-graph .graph-profile-link:focus-visible rect {fill:#edf3fe;stroke:none}
.family-graph .graph-profile-link:hover text,
.family-graph .graph-profile-link:focus-visible text {fill:#1647b5}
.graph-actions #graph-direction,
.graph-actions #graph-expand-all,
.graph-actions #graph-collapse-all,
.graph-actions #graph-fit,
.graph-actions #graph-expand {min-width:32px;min-height:32px;padding:3px 7px;font-size:19px;line-height:1.1}

/* Selected person's recorded ancestral path; paternal emphasis remains purple. */
.family-graph .graph-edge.is-ancestral-path {
  stroke:#c4932f;
  stroke-width:4.5;
  opacity:1;
  filter:none;
  stroke-dasharray:none;
}
.family-graph.is-paternal-focus .graph-edge.is-ancestral-path.is-patrilineal {
  stroke:#7838c8;
  stroke-width:4.5;
  opacity:1;
}


/* v21 graph ergonomics: one centered toolbar in both chart modes.
   Overflow scrolls horizontally on narrow screens; controls never hug window edges. */
.content-layout.visual-map-only .graph-toolbar,
body.graph-expanded .content-layout.visual-map-only .graph-toolbar {
  padding-inline:clamp(16px, 4vw, 64px);
}
.content-layout.visual-map-only .graph-toolbar .graph-actions,
body.graph-expanded .content-layout.visual-map-only .graph-toolbar .graph-actions {
  width:min(100%, 1400px);
  margin-inline:auto;
  justify-content:center;
  gap:6px 9px;
}
.content-layout.visual-map-only .graph-toolbar .graph-spacer {display:none}
/* Normal page: reserve a practical viewport for exploration, rather than
   leaving the graph as a short strip above the footer. Full View uses flex. */
body:not(.graph-expanded) .content-layout.visual-map-only .graph-scroll {
  height:clamp(620px, 78dvh, 1100px);
  min-height:620px;
  max-height:none;
}
.graph-scroll,.graph-scroll .family-graph {touch-action:none}
.graph-scroll.is-dragging,.graph-scroll.is-dragging * {cursor:grabbing!important}
@media (max-width:700px) {
  .content-layout.visual-map-only .graph-toolbar,
  body.graph-expanded .content-layout.visual-map-only .graph-toolbar {padding-inline:12px}
  .content-layout.visual-map-only .graph-toolbar .graph-actions {justify-content:center}
  body:not(.graph-expanded) .content-layout.visual-map-only .graph-scroll {
    height:70dvh;
    min-height:420px;
  }
}

/* Clan profile directory: prioritize the selected person's details.
   This view alone gets a generous left profile and compact right directory. */
@media (min-width:791px) {
  .content-layout:has(.people-cards):not(.visual-map-only) {
    display:grid;
    grid-template-columns:minmax(0, 1.45fr) minmax(265px, .85fr);
    align-items:start;
    gap:16px;
  }
  .content-layout:has(.people-cards):not(.visual-map-only) > .profile {
    grid-column:1;
    grid-row:1;
    position:sticky;
    top:14px;
    max-height:calc(100dvh - 32px);
    min-width:0;
    overflow-y:auto;
  }
  .content-layout:has(.people-cards):not(.visual-map-only) > .directory {
    grid-column:2;
    grid-row:1;
    min-width:0;
  }
}
.content-layout:has(.people-cards) .people-cards {
  grid-template-columns:minmax(0,1fr);
  padding:8px;
  gap:4px;
  max-height:min(78dvh,900px);
  overflow-y:auto;
}
.content-layout:has(.people-cards) .people-card {
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
  min-height:56px;
  padding:5px 8px;
  text-align:left;
}
.content-layout:has(.people-cards) .people-card img {
  width:46px;
  height:48px;
  flex-shrink:0;
}
.content-layout:has(.people-cards) .people-card span {
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-width:0;
  gap:2px;
}
.content-layout:has(.people-cards) .people-card strong {
  display:-webkit-box;
  -webkit-line-clamp:1;
  -webkit-box-orient:vertical;
  overflow:hidden;
  overflow-wrap:anywhere;
  font-size:14px;
  line-height:1.35;
}
.content-layout:has(.people-cards) .people-card span > small:not(.card-generation) {
  display:block;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  font-size:12px;
  line-height:1.4;
}
/* Keep exactly two text lines: name and relationship. */
.content-layout:has(.people-cards) .people-card .card-generation,
.content-layout:has(.people-cards) .people-card span > small:last-child {display:none}
@media (max-width:790px) {
  .content-layout:has(.people-cards):not(.visual-map-only) {
    display:flex;
    flex-direction:column;
    gap:12px;
  }
  .content-layout:has(.people-cards):not(.visual-map-only) > .profile {
    order:0;
    width:100%;
    position:static;
    max-height:none;
  }
  .content-layout:has(.people-cards):not(.visual-map-only) > .directory {
    order:1;
    width:100%;
  }
  .content-layout:has(.people-cards) .people-cards {max-height:55dvh}
}

/* Restore the original continuous, light blue-gray page background.
   Full View and the JPEG page use the same palette, without a gray override. */
.content-layout.visual-map-only .graph-scroll,
body.graph-expanded .content-layout.visual-map-only .graph-scroll {
  background-color:#f5f7fc!important;
  background-image:none!important;
}
