:root{--paper:#f7f6ef;--white:#fffef9;--ink:#202f27;--muted:#526458;--pine:#254737;--sage:#e7ecdc;--line:#d4d9cb;--gold:#967442;--serif:Georgia,'Times New Roman',serif;font:16px -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:var(--ink);background:var(--paper);color-scheme:light}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,textarea,select{touch-action:manipulation}button{color:var(--ink);background:none;cursor:pointer;border:0}button{min-height:38px}button:hover{color:#517546}button:disabled{opacity:.55;cursor:wait}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #8e9e6b;outline-offset:3px}input,select,textarea{background:var(--white);color:var(--ink);border:1px solid #a9b5a4;border-radius:7px;padding:11px 13px;max-width:100%}label{display:grid;gap:6px;font-size:.85rem;font-weight:600;margin:12px 0}textarea{min-height:76px;resize:vertical}.bar{min-height:70px;display:flex;align-items:center;gap:20px;padding:12px clamp(18px,5vw,84px);border-bottom:1px solid var(--line);background:var(--white)}.brand{display:inline-flex;align-items:center;gap:10px;color:var(--pine);text-decoration:none;font:bold 1.6rem var(--serif);white-space:nowrap}.bar-note{font-size:.85rem;color:var(--muted);border-left:1px solid var(--line);padding-left:20px}.bar nav{margin-left:auto;display:flex;gap:12px}.bar nav button{font-size:.86rem}.gate{display:grid;grid-template-columns:1.1fr 1fr;max-width:1040px;margin:clamp(42px,9vh,120px) auto;padding:0 32px;align-items:stretch}.gate-copy{background:var(--white);padding:clamp(28px,5vw,68px);border:1px solid var(--line);border-radius:18px 0 0 18px}.kicker{margin:0 0 16px;letter-spacing:.16em;text-transform:uppercase;font-size:.68rem;font-weight:700;color:var(--muted)}h1,h2,h3,p{overflow-wrap:anywhere}h1,h2,h3{font-family:var(--serif);font-weight:400;margin:0}.gate h1{font-size:clamp(3rem,5.4vw,5.2rem);line-height:.97;letter-spacing:-.055em}.gate h1 i{font-weight:400;color:#526a48}.intro{color:var(--muted);font-size:1rem;line-height:1.55;margin:24px 0}.gate form{max-width:345px}.gate form input{width:100%}.primary,.outline{border:1px solid var(--line);border-radius:7px;padding:9px 16px}.primary{background:var(--pine);color:white;border-color:var(--pine)}.primary:hover{background:#385b46;color:white}.gate .primary{width:100%;display:flex;justify-content:space-between;align-items:center;margin-top:14px}.print{background:#304d3b;border-radius:0 18px 18px 0;overflow:hidden;display:grid;place-items:center}.print svg{width:100%;height:100%;max-height:580px}.error{color:#983e31;font-size:.9rem}.error:empty{display:none}#workspace{max-width:1600px;margin:auto;padding:38px clamp(16px,4vw,62px) 60px}.page-title,.toolbar,.section-head,.modal-top,.row,.person-line{display:flex;align-items:center;gap:12px}.page-title,.section-head,.modal-top{justify-content:space-between}.page-title{margin-bottom:24px}.page-title .kicker{margin-bottom:6px}.page-title h1{font-size:clamp(2.2rem,4.3vw,4.7rem);letter-spacing:-.052em}.stats{display:flex;gap:18px;color:var(--muted);font-size:.82rem}.stats b{font-family:var(--serif);font-size:1.5rem;display:block;font-weight:400;color:var(--ink)}.toolbar{margin-bottom:20px}.search{position:relative;flex:1}.search>span{position:absolute;top:3px;left:14px;font-size:1.8rem;color:var(--muted)}.search input{width:100%;padding-left:44px}.outline{background:var(--white)}#results{position:absolute;z-index:3;top:100%;width:100%;max-height:50vh;overflow:auto;background:var(--white);border:1px solid var(--line);box-shadow:0 9px 20px #23382917;padding:6px;border-radius:6px}#results button,.relative{display:flex;width:100%;gap:8px;align-items:center;text-align:left;padding:8px;border-radius:5px}#results button:hover,.relative:hover{background:var(--sage)}.tree-pane,#profile{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--white)}.section-head{padding:17px 20px;border-bottom:1px solid var(--line);flex-wrap:wrap}.section-head h2,#modal-title{font-size:1.45rem}.switch{display:flex;background:#ebece2;border-radius:7px;padding:3px}.switch button{font-size:.8rem;border-radius:5px;padding:4px 10px;min-height:30px}.switch [aria-pressed=true]{background:var(--pine);color:white}.mini{width:32px;height:36px;object-fit:cover;flex:none;border-radius:4px}.silhouette{display:inline-grid;place-items:end center;overflow:hidden;background:var(--sage)}.silhouette svg{display:block;width:100%;height:100%}.meta,.muted,small{color:var(--muted);font-size:.82rem}.hint{color:var(--muted);font-size:.85rem;line-height:1.45;margin:8px 0}.profile-head{display:flex;align-items:center;gap:14px;background:#e7ecdf;padding:20px}.portrait{width:76px;height:92px;object-fit:cover;border-radius:7px;flex:none;font-size:1.8rem}.portrait-btn{padding:0;display:flex}.profile-head h2{font-size:clamp(1.5rem,2.5vw,2.1rem);line-height:1.04}.profile-head .kicker{margin-bottom:7px}.profile-body{padding:16px 20px}.actions{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:14px}.actions button,.more{border:1px solid var(--line);border-radius:6px;padding:7px 10px;font-size:.83rem;background:var(--white)}.actions .primary{background:var(--pine);color:white}.block{margin:18px 0}.block h3{font-size:1.25rem;margin-bottom:8px}.fact{margin:9px 0;display:grid;gap:2px;font-size:.93rem;white-space:pre-line}.fact small{color:var(--muted)}.gallery{display:flex;flex-wrap:wrap;gap:8px}.gallery button{padding:0}.gallery img{width:84px;height:94px;object-fit:cover;border-radius:5px}.relative{font-size:.9rem}.quiet{color:var(--muted);font-size:.85rem;padding:0}.note{white-space:pre-wrap;line-height:1.5}details{margin:13px 0;font-size:.85rem}summary{cursor:pointer;color:var(--muted)}pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:.76rem;background:var(--paper);padding:10px;border-radius:5px}.loading{text-align:center;margin:8vh 0;color:var(--muted)}dialog{border:1px solid var(--line);border-radius:12px;color:var(--ink);background:var(--white);width:min(580px,94vw);max-height:88vh;padding:0;box-shadow:0 12px 80px #14251744}dialog::backdrop{background:#162a21a8}.modal-top{padding:12px 18px;border-bottom:1px solid var(--line);position:sticky;top:0;background:var(--white);z-index:1}#close{font-size:1.5rem}#modal-body{padding:16px 20px 22px}#modal-body>img{width:100%;max-height:67vh;object-fit:contain}fieldset{border:1px solid var(--line);border-radius:6px;margin:12px 0;padding:6px 12px}legend{font-size:.88rem}#modal-body form>.primary{margin-top:12px}#toast:not(:empty){position:fixed;bottom:18px;left:50%;transform:translateX(-50%);background:var(--pine);color:white;padding:10px 18px;border-radius:6px;z-index:6}.sub{margin:0 0 10px;color:var(--muted)}.archive-note{padding:8px 0;border-top:1px solid var(--line)}
@media(max-width:760px){.gate{margin:32px auto;padding:0 16px;grid-template-columns:1fr}.gate-copy{border-radius:12px}.print{display:none}.bar{gap:10px;min-height:60px;padding:8px 14px}.bar-note{display:none}.bar nav{gap:2px}.bar nav button{font-size:.74rem;padding:4px}.brand{font-size:1.2rem}.brand img{width:30px;height:30px}#workspace{padding:22px 12px 48px}.page-title{align-items:start;display:block;margin-bottom:15px}.stats{margin-top:8px;gap:14px}.stats b{font:inherit;display:inline;font-weight:650}.toolbar{flex-wrap:wrap;gap:5px}.search{flex-basis:100%}.toolbar>.outline{font-size:.8rem;min-height:32px;padding:5px 9px}.section-head{padding:11px}.section-head h2{font-size:1.22rem}.profile-body,.profile-head{padding:14px}.gate h1{font-size:3.9rem}.bar nav{flex-wrap:wrap;justify-content:flex-end}.bar .brand{flex:none}}

.stats span{min-width:76px}
#workspace{max-width:none;padding:20px clamp(10px,2.6vw,48px) 18px}
.page-title{margin-bottom:14px}.page-title h1{font-size:clamp(2rem,3.3vw,3.4rem)}.page-title .kicker{display:none}.toolbar{margin-bottom:12px}
.tree-pane .section-head{padding:8px 14px;gap:8px}
.view-tools,.zoom-controls{display:flex;align-items:center;gap:8px}.view-tools{flex-wrap:wrap}
.section-head h2{margin-right:8px}.section-head .outline{font-size:.83rem;min-height:34px;padding:6px 12px}
.zoom-controls{border:1px solid var(--line);border-radius:7px;gap:0;background:var(--white)}
.zoom-controls button{width:34px;min-height:32px;font-size:1.1rem}.zoom-controls output{font-size:.8rem;min-width:40px;text-align:center;font-variant-numeric:tabular-nums}
.zoom-controls button:disabled{cursor:default}
#tree{--tree-paper:#dfe4d8;position:relative;overflow:auto;overflow-anchor:none;overscroll-behavior:contain;height:max(450px,calc(100dvh - 255px));background-color:var(--tree-paper);background-image:radial-gradient(#c7cec1 .9px,transparent 1px);background-size:18px 18px;cursor:grab;touch-action:none;user-select:none}
#tree.panning,#tree.panning *{cursor:grabbing}
#plane{position:relative;margin:0 auto;overflow:hidden}
#drawing{position:absolute;top:0;left:0;transform-origin:top left}
.connectors{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;stroke:#819783;stroke-width:1.6;fill:none}
.node-head{width:156px;position:absolute;background:var(--white);border:1px solid #aebaa7;border-radius:10px;box-shadow:0 2px 5px #273e2912}
.node-head.selected{outline:2px solid #436847;outline-offset:2px}
.person-line{display:block;width:100%;border-radius:9px;padding:0;overflow:hidden;text-align:center}
.card-visual{display:block;height:111px;position:relative;overflow:hidden;background:#e0e6d6}
.card-visual .mini{width:100%;height:100%;display:block;border-radius:0;object-fit:cover;object-position:50% 30%}
.card-visual .silhouette{display:grid;background:linear-gradient(145deg,#e9eddf,#d3deca)}
.card-caption{display:block;padding:9px 7px 17px}
.card-name{display:block;font:600 .92rem/1.17 var(--serif);overflow-wrap:anywhere}.card-name>span{display:block}
.card-caption .meta{display:block;margin-top:4px;font-size:.69rem;line-height:1.15}
.memorial{display:inline-block;position:relative;width:44px;height:30px;flex:none}
.memorial img{position:absolute;object-fit:contain;width:26px;height:28px;left:0;top:1px;transform:rotate(-15deg)}
.memorial img+img{left:17px;transform:rotate(7deg)}
.memorial-dates{display:flex;align-items:center;justify-content:flex-start;gap:4px;margin-top:5px}
.memorial-dates .meta{margin:0}
.toggler{position:absolute;right:calc(50% - 15px);bottom:-14px;width:30px;min-height:30px;padding:0;border:1px solid #799177;border-radius:50%;background:var(--white);color:var(--pine);font-weight:650;font-size:1.1rem;box-shadow:0 1px 3px #29432318}
.toggler[aria-expanded=true]{background:var(--pine);border-color:var(--pine);color:white}
.family-label{position:absolute;width:max-content;max-width:178px;text-align:center;background:var(--tree-paper);border-radius:4px;padding:2px 5px;font-size:.72rem;line-height:1.2;color:var(--muted)}
.family-label button{font:inherit;min-height:20px;padding:1px 2px;text-decoration:underline;text-underline-offset:2px}
#person-sheet{width:min(560px,94vw)}#profile{border:0;border-radius:0}
#hide-profile{font-size:.85rem}#person-sheet .modal-top>span{font-size:.83rem;color:var(--muted)}
@media(max-width:760px){#workspace{padding:12px 8px}.stats span{min-width:0}.page-title{margin-bottom:9px}.view-tools{gap:5px}.section-head h2{display:none}.tree-pane .section-head{padding:6px;gap:5px}.section-head .outline{padding:4px 6px;font-size:.76rem}.switch button{padding:4px 7px}.zoom-controls button{width:28px}.zoom-controls output{min-width:33px}#tree{height:max(380px,calc(100dvh - 272px))}}

#branch-note{margin:0;padding:10px 15px;background:var(--sage);color:var(--ink);font-size:.9rem;line-height:1.45}
.family-unit{position:absolute;width:max-content;text-align:center}
.family-members{display:flex;gap:30px;align-items:stretch}
.family-members>.node-head{position:relative;flex:none}
.family-members>.node-head+.node-head::before{content:'';position:absolute;right:100%;top:50%;width:30px;height:4px;border-block:1.5px solid #748974;pointer-events:none}
.family-unit:has(.children-toggle) .family-members{padding-bottom:15px}
.family-unit:has(.children-toggle) .node-head::after{content:'';position:absolute;top:100%;left:50%;height:9px;border-left:1.6px solid #819783}
.family-unit:has(.children-toggle) .family-members::after{content:'';position:absolute;bottom:6px;left:78px;right:78px;border-top:1.6px solid #819783}
.children-toggle{width:max-content;padding:1px 9px;min-height:24px;bottom:-11px;right:auto;left:50%;transform:translateX(-50%);border-radius:12px;font:600 .72rem/1.1 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;white-space:nowrap}
.family-pick{display:block;margin:0 auto 6px;min-height:25px;padding:3px 10px;border:1px solid #bdc6b7;border-radius:14px;background:#f7f8f0;color:#425546;font-size:.72rem}
.family-pick[aria-pressed=true]{background:#e2e9da;border-color:#8e9f86}
.node-head[data-family-role]{background:var(--kin-paper);border-color:var(--kin-border)}
.node-head[data-family-role=husband],.node-head[data-family-role=parent]{--kin-paper:#e5eeeb;--kin-border:#97afa6;--kin-ink:#3b5a50}
.node-head[data-family-role=wife]{--kin-paper:#f2e7ee;--kin-border:#bea5b4;--kin-ink:#694a5c}
.node-head[data-family-role=child]{--kin-paper:#f5ecd8;--kin-border:#c1ae83;--kin-ink:#685327}
.kin-role{display:block;margin:0 0 4px;color:var(--kin-ink);font-size:.68rem;font-weight:650;line-height:1.2}


#founders{display:flex;align-items:center;flex-wrap:wrap;gap:6px 14px;margin:0 0 14px}
#founder-title{color:var(--muted);font-size:.83rem;font-weight:600}
#founder-choices{display:flex;flex-wrap:wrap;gap:6px}
.founder-choice{min-height:36px;border:1px solid var(--line);border-radius:7px;background:var(--white);padding:7px 13px;font-size:.87rem}
.founder-choice[aria-pressed=true]{background:var(--pine);border-color:var(--pine);color:white}
@media(max-width:760px){#founders{gap:4px;margin-bottom:9px}#founder-title{flex-basis:100%;font-size:.76rem}.founder-choice{min-height:36px;padding:5px 8px;font-size:.81rem}}

#common-count{padding:5px 14px;color:var(--muted);font-size:.82rem;border-block-end:1px solid var(--line)}
.common-toggle{width:auto;min-width:30px;right:auto;left:50%;transform:translateX(-50%);padding-inline:6px;font-size:.77rem}
.common-lines path{stroke-linecap:round;stroke-linejoin:round}

.recovery-link{padding:5px 0;color:var(--muted);font-size:.85rem;text-decoration:underline;text-underline-offset:3px}
#modal-body>.primary{margin:10px 0 0 8px}
@media(max-width:760px){.bar{align-items:flex-start}#tools{max-width:70%}}

.bio-story,.bio-editor{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6;color:var(--ink)}
.bio-story{margin:.6rem 0 1rem}
.bio-mention,.bio-chip{display:inline;padding:0;border:0;background:transparent;color:var(--pine);font:inherit;text-decoration:underline;text-decoration-color:#809582;text-underline-offset:.18em}
.bio-back{margin:12px 16px 0;color:var(--pine);text-align:left}
.bio-toolbar,.bio-picker{display:flex;gap:8px;flex-wrap:wrap}
.bio-toolbar{margin:10px 0}
.bio-editor{min-height:10rem;max-height:48vh;overflow:auto;background:var(--white);border:1px solid #929e8f;border-radius:8px;padding:12px;cursor:text}
.bio-editor:focus{outline:2px solid #829277;outline-offset:1px}
.bio-editor:empty::before{content:attr(data-placeholder);color:var(--muted);pointer-events:none}
.bio-editor::after{content:'\200b'}
.bio-picker{margin:12px 0;padding:12px;border:1px solid var(--line);border-radius:8px;background:var(--paper)}
.bio-picker[hidden]{display:none}
.bio-picker label,.bio-results,.bio-picker .hint{width:100%;margin:0}
.bio-results{max-height:13rem;overflow:auto}
.bio-result{display:flex;width:100%;justify-content:space-between;gap:8px;text-align:left;padding:8px}
.bio-result small,.bio-photo figcaption{color:var(--muted)}
.bio-photo{display:block;margin:12px 0}
.bio-photo img{display:block;max-width:100%;max-height:360px;border-radius:6px;object-fit:contain}
.bio-photo figcaption{font-size:.85rem;margin-top:4px}
.bio-enlarge,.bio-thumb{padding:0}
.bio-gallery{display:flex;gap:6px;max-width:100%;overflow:auto}
.bio-thumb img{width:62px;height:62px;object-fit:cover;display:block}
.bio-thumb[aria-pressed=true]{border:2px solid var(--pine)}

.tree-pane .section-head{justify-content:flex-start;gap:8px 16px}
#expand-tree{background:var(--pine);border-color:var(--pine);color:white}
@media(max-width:650px){
  .tree-pane .section-head{gap:6px 10px;padding:8px}
  .tree-pane .section-head button{min-height:36px}
}
