:root{--paper:#faf7ef;--ink:#203e37;--gold:#a18146;--line:#dedbcd;--muted:#586b60;--white:#fffefa;--amber:#985b29;--shadow:0 12px 40px #203e371b;color-scheme:light}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:15px/1.55 'Segoe UI',system-ui,sans-serif}button,input,textarea,select{font:inherit}button,a,input,select,textarea{outline-offset:4px}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--gold)}::selection{background:#d7c398;color:var(--ink)}button{cursor:pointer}button:disabled{cursor:wait;opacity:.55}a{color:inherit;text-underline-offset:4px}svg{fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}h1,h2,h3,p{margin-top:0}h1,h2{font-family:Georgia,'Times New Roman',serif;font-weight:400;letter-spacing:-.025em;text-wrap:balance}h1{font-size:clamp(28px,3vw,42px);line-height:1.15;margin-bottom:8px}h2{font-size:29px;line-height:1.2}h3{font-size:16px;font-weight:650;margin:28px 0 10px}p{max-width:70ch}.masthead{display:flex;align-items:center;justify-content:space-between;padding:22px 36px;border-bottom:1px solid var(--line);gap:20px}.brand{display:flex;gap:13px;align-items:center;text-decoration:none;font:29px/1 Georgia,serif;letter-spacing:-.02em}.brand svg{width:36px;height:36px;color:var(--gold);stroke-width:1.6}.brand-sub{display:block;font:11px/1.4 'Segoe UI',sans-serif;letter-spacing:.02em;margin-top:6px;color:var(--muted)}.header-actions{display:flex;align-items:center;gap:26px}.text-link{display:inline-flex;align-items:center;gap:7px;padding:0;background:transparent;border:0;text-decoration:none;font-size:13px}.text-link:hover{text-decoration:underline}.text-link svg{width:17px;height:17px}.button{display:inline-flex;justify-content:center;align-items:center;gap:8px;min-height:40px;padding:9px 15px;border:1px solid transparent;background:transparent;color:var(--ink);border-radius:6px;text-decoration:none;white-space:nowrap}.button.primary{background:var(--ink);color:var(--paper)}.button.primary:hover{background:#31594c}.button.subtle:hover{background:#ecece1}.header-actions .button{border-color:#b1baad}.workspace-heading{display:flex;align-items:end;justify-content:space-between;padding:26px 36px 20px;gap:20px}.workspace-heading p{margin:0;color:var(--muted);font-size:14px}.tree-status{font-size:12px!important;white-space:nowrap;display:flex;align-items:center;gap:8px}.tree-status::before{content:'';width:6px;height:6px;border-radius:50%;background:#648363}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 36px 18px}.view-tabs{display:flex;border-bottom:1px solid #c5cabc;gap:8px}.view-tabs button{border:0;border-bottom:2px solid transparent;background:transparent;padding:10px 14px;color:var(--muted);font-weight:500}.view-tabs button[aria-pressed=true]{color:var(--ink);border-bottom-color:var(--ink)}.view-tabs button:hover{background:#eeeee3}.toolbar-options{display:flex;gap:8px;align-items:center}.toggle{display:flex;align-items:center;gap:8px;font-size:13px;white-space:nowrap}.toggle input{accent-color:var(--ink);width:16px;height:16px}.workspace{display:flex;height:calc(100dvh - 315px);min-height:440px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.canvas-area{position:relative;flex:1;min-width:0;overflow:hidden;background:#f1f0e5}.canvas-area:before{content:'';position:absolute;inset:0;pointer-events:none;background-image:radial-gradient(#7d8f7638 .8px,transparent .8px);background-size:24px 24px}#viewport{position:absolute;inset:0;overflow:hidden;touch-action:none;cursor:grab}#viewport.dragging{cursor:grabbing}#world{position:absolute;left:0;top:0;transform-origin:0 0;will-change:transform}#connections{position:absolute;inset:0;overflow:visible;stroke-width:1.6;pointer-events:none}#connections .parent{stroke:var(--gold)}#connections .spouse{stroke:#6d8273;stroke-width:1.8}#connections .probable{stroke:var(--amber);stroke-dasharray:7 6;stroke-width:2}.person-node{position:absolute;display:flex;flex-direction:column;align-items:stretch;justify-content:center;text-align:left;border:1px solid #aab3a3;border-radius:12px;background:var(--white);color:var(--ink);padding:14px 17px;user-select:none;font-size:15px;line-height:1.3;box-shadow:none;overflow:hidden}.person-node .node-name{font-weight:650;line-height:1.25;overflow-wrap:anywhere}.person-node .node-note{font-size:11px;color:var(--muted);margin-top:9px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.person-node.shared{background:var(--ink);border-color:var(--ink);color:var(--paper)}.person-node.shared .node-note{color:#d8d6b7}.person-node:hover{border-color:var(--gold);outline:2px solid #a1814655;outline-offset:0}.person-node.selected{outline:3px solid var(--gold);outline-offset:3px}.group-node{justify-content:flex-start;padding:10px;gap:6px}.group-person{border:0;background:transparent;color:inherit;font:inherit;text-align:left;padding:7px;border-radius:4px}.group-person:hover{background:#a1814626}.group-person+.group-person{border-top:1px solid #9da88980}.canvas-caption{position:absolute;top:17px;left:22px;right:18px;display:flex;justify-content:space-between;align-items:center;pointer-events:none;gap:12px;font-size:12px;color:var(--muted)}.probable-legend{display:flex;gap:7px;align-items:center}.probable-legend i{width:25px;border-top:2px dashed var(--amber)}.canvas-controls{position:absolute;bottom:18px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:3px;padding:5px 7px;background:var(--white);border:1px solid var(--line);border-radius:9px;white-space:nowrap;box-shadow:0 5px 18px #203e3712}.square{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;min-width:34px;border:0;background:transparent;color:var(--ink);border-radius:5px;font-size:22px;line-height:1}.square:hover{background:#e9ecdf}#zoom-value{font-size:12px;font-variant-numeric:tabular-nums;width:43px;text-align:center}.control-divider{height:22px;border-left:1px solid var(--line);margin:0 7px}.canvas-controls .button{font-size:12px;min-height:32px;padding:6px 9px}.canvas-loading{position:absolute;inset:0;display:grid;place-items:center;background:var(--paper);font:24px Georgia}.canvas-loading[hidden]{display:none}#inspector{width:320px;min-width:320px;background:var(--paper);border-left:1px solid var(--line);overflow:auto;scrollbar-color:#b4bba9 var(--paper)}.inspector-bar{display:flex;align-items:center;justify-content:space-between;padding:14px 22px;border-bottom:1px solid var(--line);font-size:12px;color:var(--muted)}#person-detail{padding:25px 23px}#person-detail h2{font-size:29px;margin-bottom:18px}#person-detail p{font-size:13px;color:var(--muted);white-space:pre-wrap;overflow-wrap:anywhere}#person-detail dl{margin:22px 0;font-size:13px}dt{color:var(--muted);font-size:11px;margin-top:14px}dd{margin:2px 0 0}dd:empty{display:none}.detail-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:22px}.detail-actions .button{font-size:12px;padding:8px 10px}.relationship-list{list-style:none;margin:0;padding:0;border-top:1px solid var(--line)}.relationship-list li{padding:10px 0;border-bottom:1px solid var(--line);display:flex;gap:6px;align-items:center}.relationship-person{border:0;text-align:left;color:var(--ink);background:transparent;flex:1;font-size:12px;padding:0}.relationship-person span{display:block;font-size:10px;color:var(--muted);margin-bottom:3px}.relationship-list .remove-link{font-size:16px;width:25px;min-width:25px;height:25px}.probable-box{font-size:12px;color:#78471f;padding:12px;background:#f3e9d8;border:1px dashed #a18146;margin:20px 0}.page-footer{padding:15px 36px;display:flex;justify-content:space-between;gap:24px;color:var(--muted);font-size:11px}.page-footer p{margin:0;max-width:90ch}.page-footer .text-link{font-size:11px;white-space:nowrap}.notice{margin:0 36px 14px;border:1px solid #b3905a;padding:12px 15px;background:#f8ecd6;font-size:13px}.notice button{margin-left:12px}.notice[hidden],[hidden]{display:none!important}dialog{color:var(--ink);background:var(--paper);border:1px solid #aeb7a7;border-radius:13px;box-shadow:var(--shadow);padding:28px;width:min(570px,calc(100vw - 28px));max-height:90dvh;overflow:auto}dialog::backdrop{background:#182d2973}.dialog-heading{display:flex;align-items:flex-start;gap:15px;justify-content:space-between}.dialog-heading h2{margin-bottom:18px}.dialog-heading .square{margin:-7px -8px 0 0}dialog p{font-size:14px;color:var(--muted)}label:not(.toggle){display:block;font-size:12px;font-weight:600;margin:17px 0 6px}input:not([type=checkbox]),select,textarea{width:100%;border:1px solid #aeb7a7;background:#fffefa;color:var(--ink);border-radius:5px;padding:10px 12px;min-height:43px;caret-color:var(--ink)}input::placeholder,textarea::placeholder{color:#647362}textarea{resize:vertical}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.form-actions{display:flex;justify-content:space-between;gap:12px;margin-top:22px}.form-error{color:#963d2b!important;font-size:13px!important;white-space:pre-wrap}.form-error:empty{display:none}.field-note{font-size:12px;margin-top:6px}.directory-list{margin-top:20px;max-height:55dvh;overflow:auto}.directory-entry{display:block;width:100%;text-align:left;border:0;border-top:1px solid var(--line);background:transparent;padding:14px 8px;color:var(--ink)}.directory-entry:hover{background:#e9edde}.directory-entry span{display:block;color:var(--muted);font-size:12px;margin-top:4px}.export-list{display:flex;flex-direction:column;align-items:stretch;gap:8px}.export-list .button{justify-content:flex-start;border-color:var(--line)}.empty-state{padding:24px 0;color:var(--muted)}.source-entry{border-bottom:1px solid var(--line);padding:14px 0}.source-entry p{margin:4px 0 0}.source-entry strong{font-size:14px}.inspector-hidden #inspector{display:none}
@media(min-width:1700px){.workspace{height:calc(100dvh - 323px)}#inspector{width:350px;min-width:350px}.masthead,.toolbar,.workspace-heading,.page-footer{padding-left:46px;padding-right:46px}}
@media(max-width:1000px){.masthead{padding:18px 22px}.workspace-heading{padding:24px 22px 18px}.toolbar{padding:0 22px 16px;flex-wrap:wrap;gap:9px}.toolbar-options{margin-left:auto}.workspace{height:calc(100dvh - 350px)}#inspector{width:285px;min-width:285px}.view-tabs button{padding:9px 11px}.page-footer{padding:14px 22px}.header-actions{gap:14px}.tree-status{white-space:normal;text-align:right}.workspace-heading p{font-size:13px}}
@media(max-width:700px){.masthead{padding:16px 18px;gap:12px}.brand{font-size:24px;gap:8px}.brand svg{width:27px;height:31px}.brand-sub{font-size:9px}.header-actions .text-link{display:none}.header-actions .button{font-size:11px;min-height:35px;padding:7px 10px}.workspace-heading{padding:22px 18px 17px;display:block}.workspace-heading h1{font-size:29px}.workspace-heading p{font-size:12px}.tree-status{margin-top:11px!important;text-align:left;font-size:11px!important}.toolbar{padding:0 14px 12px;gap:10px}.view-tabs{width:100%;justify-content:space-between}.view-tabs button{flex:1;padding:10px 7px;font-size:13px}.toolbar-options{width:100%;justify-content:space-between;gap:2px}.toolbar-options .button{padding:7px 8px;font-size:11px;min-height:33px}.toggle{font-size:11px}.workspace{height:calc(100dvh - 330px);min-height:360px;position:relative}.canvas-caption{left:14px;font-size:10px;top:14px}.probable-legend{display:none}.canvas-controls{bottom:14px;padding:4px;max-width:calc(100% - 20px)}.canvas-controls .button{padding:5px 7px;font-size:10px}.canvas-controls .square{width:29px;min-width:29px;height:29px}.control-divider{margin:0 3px}#zoom-value{width:34px;font-size:10px}#inspector{position:absolute;inset:0 0 0 auto;width:min(330px,90%);min-width:0;z-index:5;box-shadow:-8px 0 30px #203e3720}#inspector:not(.mobile-open){display:none}.page-footer{padding:13px 18px;display:block;font-size:10px}.page-footer .text-link{margin-top:8px;font-size:10px}.notice{margin:0 14px 12px}.form-grid{gap:10px}dialog{padding:22px}.dialog-heading h2{font-size:26px}.form-actions{flex-wrap:wrap}.toolbar-options #tools-button{max-width:108px;white-space:normal;line-height:1.2}}
.relationship-person span{font-size:11px}.page-footer{font-size:12px}.brand-sub{font-size:11px}
@media(max-width:700px){.brand-sub,.canvas-caption,#zoom-value,.canvas-controls .button,.page-footer .text-link{font-size:11px}.page-footer{font-size:11px}.masthead .brand{max-width:200px}.canvas-controls .button{padding:6px}.canvas-controls .square{min-width:32px;width:32px;height:32px}}
@media(prefers-reduced-motion:no-preference){.button,.view-tabs button{transition:background-color .15s ease-out}dialog[open]{animation:dialog-in .18s ease-out}@keyframes dialog-in{from{opacity:.8;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}}

/* Compact tree workspace: portrait phones and short landscape screens. */
.menu-button{display:none}.menu-button svg{width:22px;height:22px}
:root{--compact-layout:0}
@media(max-width:700px),(max-width:1200px) and (max-height:600px){
 :root{--compact-layout:1}
 body{height:100dvh;overflow:hidden;display:flex;flex-direction:column}
 .masthead{flex:none;min-height:60px;padding:6px 14px;gap:12px}
 .masthead .brand{font-size:25px;max-width:none}.brand svg{width:28px;height:32px}.brand-sub{display:none}
 .menu-button{display:inline-flex;min-height:44px;padding:6px 10px;border-color:var(--line);font-size:14px}
 main{flex:1;min-height:0;display:flex;flex-direction:column}
 .workspace-heading,.page-footer{display:none}
 main>.toolbar,.masthead>.header-actions{display:none}
 .workspace{flex:1;height:auto;min-height:0;position:relative;border-bottom:0}
 .notice{flex:none;margin:0;padding:8px 14px;max-height:25dvh;overflow:auto}
 #inspector{position:absolute;inset:0 0 0 auto;width:min(350px,90%);min-width:0;z-index:5;box-shadow:-8px 0 30px #203e3720}
 #inspector:not(.mobile-open){display:none}
 .canvas-caption{top:9px;left:14px;right:14px;font-size:11px}.probable-legend{display:none}
 .canvas-controls{bottom:max(8px,env(safe-area-inset-bottom));padding:3px;max-width:calc(100% - 16px)}
 .canvas-controls .square{width:44px;min-width:44px;height:44px}.canvas-controls .button{min-height:44px;padding:6px 8px;font-size:12px}
 #zoom-value{width:34px;font-size:11px}.control-divider{margin:0 2px}
 #close-inspector,.dialog-heading .square{width:44px;min-width:44px;height:44px}
 #tree-menu{width:min(460px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:22px}
 #tree-menu .toolbar{display:flex;flex-direction:column;align-items:stretch;padding:0;gap:18px}
 #tree-menu .view-tabs{display:flex;flex-direction:column;border:0;gap:4px;width:100%}
 #tree-menu .view-tabs button{text-align:left;flex:none;min-height:44px;font-size:15px;padding:10px 12px;border:0;border-left:3px solid transparent}
 #tree-menu .view-tabs button[aria-pressed=true]{border-left-color:var(--gold);background:#eeeee3}
 #tree-menu .toolbar-options{display:flex;flex-direction:column;align-items:stretch;width:100%;margin:0;gap:6px}
 #tree-menu .button,#tree-menu .toggle,#tree-menu .text-link{min-height:44px;font-size:15px;justify-content:flex-start;padding:10px 12px;max-width:none}
 #tree-menu .toggle{margin:0}#tree-menu .toggle input{width:20px;height:20px}
 #tree-menu .header-actions{display:flex;flex-direction:column;align-items:stretch;gap:6px;border-top:1px solid var(--line);margin-top:18px;padding-top:18px}
 #tree-menu .header-actions .text-link{display:flex}#tree-menu .header-actions .button{border:0}
 #tree-menu .tree-status{margin:18px 12px 8px!important;text-align:left;font-size:12px!important}
 #tree-menu #sources-button{display:flex;width:100%;margin-top:6px}
}
@media(max-width:360px){.canvas-controls .button{font-size:11px;padding:6px 4px}.canvas-controls{gap:0}}
