:root{--bg:#f5f1e8;--paper:#fbf8f1;--panel:#fffdf8;--card:#f3eee4;--ink:#0f2741;--text:#1e2d3e;--muted:#77736c;--line:#e5ded1;--soft:#f0ebe1;--accent:#102f4b;--accent2:#9a7652;--sage:#c8d0c2;--sand:#e7d8c6;--blue:#c8d4dc;--shadow:0 14px 34px rgba(45,38,28,.06)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.archive-app{display:grid;grid-template-columns:220px 1fr;min-height:100vh}.sidebar{position:sticky;top:0;height:100vh;background:rgba(250,247,240,.96);border-right:1px solid var(--line);padding:30px 14px 24px;display:flex;flex-direction:column;z-index:50}.brand{border:0;background:none;text-align:left;color:var(--ink);padding:0 26px 28px;cursor:pointer}.brand-name{display:block;font-family:Georgia,serif;font-size:27px;letter-spacing:.12em}.brand-sub{display:block;font-size:8px;letter-spacing:.34em;margin-top:5px}.side-nav{display:grid;gap:8px}.nav-item{appearance:none;border:0;background:transparent;color:var(--ink);display:grid;grid-template-columns:28px 1fr;align-items:center;gap:10px;text-align:left;padding:15px 20px;border-radius:14px;cursor:pointer;font-size:15px}.nav-item span{font-size:22px;line-height:1}.nav-item b{font-family:Georgia,serif;font-weight:400}.nav-item.is-active{background:#efe9de}.sidebar-foot{margin-top:auto;padding:0 24px;display:grid;gap:16px}.private-mark{font-size:9px;letter-spacing:.3em;line-height:1.8;color:var(--muted)}.status-pill{width:max-content;border:1px solid var(--line);border-radius:999px;padding:7px 10px;font-size:11px;color:var(--muted);background:var(--panel)}.app-main{min-width:0}.preview-banner{margin:18px 28px 0;background:#fff7df;border:1px solid #ead7a6;border-radius:12px;padding:10px 14px;font-size:13px}.hidden{display:none!important}main{padding:0 28px 34px}.view{display:none}.view.is-active{display:block}.eyebrow{text-transform:uppercase;letter-spacing:.34em;font-size:9px;color:var(--muted);font-weight:700}.hero{min-height:330px;margin:0 -28px;display:grid;grid-template-columns:minmax(660px,1.15fr) minmax(420px,.85fr);background:linear-gradient(90deg,#fbf7ef 0%,#fbf7ef 42%,rgba(251,247,239,.86) 50%,rgba(251,247,239,.08) 66%);overflow:hidden}.hero-copy{padding:46px 0 28px 48px;z-index:2}.hero h1,.page-head h1{font-family:Georgia,serif;color:var(--ink);font-weight:400;letter-spacing:-.03em}.hero h1{font-size:40px;line-height:1.05;margin:12px 0 14px;max-width:none}.hero-heading-line{white-space:nowrap}.hero-route{font-family:Georgia,serif;color:var(--ink);font-size:23px;margin:0}.hero-route span{padding:0 7px;color:var(--muted)}.hero-actions{display:flex;gap:14px;margin-top:28px}.primary-action,.secondary-action,.soft-button,.filter,.pin-btn{font:inherit;cursor:pointer}.primary-action{border:0;background:var(--ink);color:#fff;border-radius:12px;padding:14px 24px;font-family:Georgia,serif;font-size:16px}.primary-action span{margin-left:20px}.secondary-action{border:1px solid var(--line);background:#f1ece3;color:var(--ink);border-radius:12px;padding:14px 24px;font-family:Georgia,serif;font-size:16px}.hero-image{background-image:linear-gradient(90deg,rgba(251,247,239,.92) 0,rgba(251,247,239,.18) 24%,rgba(251,247,239,0) 54%),url('hero-archive.webp');background-size:cover;background-position:center;position:relative}.hero-caption{position:absolute;right:30px;bottom:28px;color:#fff;font-family:Georgia,serif;font-style:italic;font-size:28px;text-shadow:0 2px 14px rgba(0,0,0,.35)}.hero-caption small{display:block;font-size:13px;text-align:right}.story-strip{display:grid;grid-template-columns:1.05fr 3fr;gap:10px;margin-top:12px}.story-chip,.origin-card{min-height:108px;border:1px solid var(--line);background:rgba(255,253,248,.88);border-radius:14px;padding:18px 20px;box-shadow:0 8px 26px rgba(55,45,30,.03)}.latest-card{display:flex;flex-direction:column;justify-content:center}.latest-card strong{font-family:Georgia,serif;color:var(--ink);font-size:21px;font-weight:400;margin-top:8px;max-width:240px}.latest-card span{font-size:12px;color:var(--muted);margin-top:10px}.origin-inline{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.origin-card span{display:block;text-transform:uppercase;letter-spacing:.25em;font-size:9px;color:var(--muted)}.origin-card strong{display:block;font-family:Georgia,serif;font-size:22px;font-weight:400;color:var(--ink);margin-top:11px}.origin-card small{display:block;color:var(--muted);margin-top:6px}.surname-section{margin-top:10px;padding:13px 16px}.surname-flow{display:grid;grid-template-columns:1fr auto 1fr auto 1fr;gap:10px;align-items:center}.surname-stage{font:inherit;color:inherit;text-align:left;border:1px solid var(--line);border-radius:12px;background:#fcfaf4;padding:10px 13px;min-height:78px;display:flex;flex-direction:column;justify-content:center;cursor:pointer;transition:border-color .18s ease,background .18s ease,transform .18s ease}.surname-stage label{display:block;text-transform:uppercase;letter-spacing:.22em;font-size:9px;color:var(--muted);margin-bottom:7px;pointer-events:none}.surname-tags{display:flex;flex-wrap:wrap;gap:8px}.surname-tags span{display:inline-flex;align-items:center;border:1px solid var(--line);border-radius:999px;background:#ffffff;padding:5px 10px;font-family:Georgia,serif;color:var(--ink);font-size:15px}.surname-arrow{font-family:Georgia,serif;color:var(--muted);font-size:23px;line-height:1}.surname-note{margin:9px 2px 0;color:var(--muted);line-height:1.45;font-size:12px}.surname-stage small{display:block;margin-top:6px;color:var(--muted);font-size:10px;opacity:.8}.surname-stage:focus-visible,.interactive-card:focus-visible,.news-link:focus-visible,.journey-line button:focus-visible{outline:2px solid var(--ink);outline-offset:3px}.home-grid{display:grid;grid-template-columns:1.08fr 1.05fr;gap:12px;margin-top:12px}.featured-home-card,.journey-card{min-height:190px;border:1px solid var(--line);border-radius:16px;background:var(--panel);overflow:hidden}.featured-home-card{display:grid;grid-template-columns:1.05fr .85fr}.featured-image{background:url('treasure-preview.jpg') center/cover no-repeat;filter:sepia(.12) contrast(.95)}.featured-copy{padding:20px}.featured-copy h2,.journey-card h2{font-family:Georgia,serif;font-weight:400;color:var(--ink);font-size:27px;line-height:1.08;margin:7px 0}.featured-copy p,.journey-card p{color:var(--muted);line-height:1.55}.journey-card{padding:20px;background:linear-gradient(135deg,rgba(246,241,229,.94),rgba(231,223,206,.86));display:flex;flex-direction:column;justify-content:space-between;text-align:left;border:1px solid var(--line);cursor:pointer}.journey-line{display:flex;align-items:center;gap:8px;font-family:Georgia,serif;color:var(--ink)}.journey-line button{appearance:none;border:0;background:transparent;padding:6px 4px;color:var(--ink);font:inherit;cursor:pointer;border-radius:8px}.journey-line button:hover{background:rgba(255,255,255,.58)}.journey-line i{height:1px;background:var(--ink);opacity:.35;flex:1;position:relative}.journey-line i:after{content:"";position:absolute;right:-2px;top:-3px;width:7px;height:7px;border-radius:50%;background:var(--ink)}.home-links{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:12px}.visual-link{min-height:94px;border:1px solid var(--line);border-radius:14px;padding:17px 20px;text-align:left;display:flex;align-items:flex-end;justify-content:space-between;cursor:pointer;color:var(--ink);background:linear-gradient(135deg,#efe7d8,#f8f4eb)}.visual-link.history-link{background:linear-gradient(135deg,#e8e2d9,#d9d2c8)}.visual-link.treasure-link{background:linear-gradient(135deg,#3a352f,#796e61);color:#fff}.visual-link h3{font-family:Georgia,serif;font-size:22px;font-weight:400;margin:0 0 4px}.visual-link p{margin:0;color:inherit;opacity:.78}.visual-link>span{width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.8);display:grid;place-items:center;color:var(--ink);font-size:20px}.latest-section{padding:17px 0 0}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:12px 0}.section-heading h3{font-family:Georgia,serif;font-weight:400;font-size:22px;margin:0}.section-heading span{font-size:11px;color:var(--muted)}.news-list{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.news{border:0;border-top:1px solid var(--line);padding:11px 4px;background:transparent;text-align:left;width:100%;cursor:pointer;color:inherit}.news strong{display:block;font-family:Georgia,serif;color:var(--ink);font-weight:400;font-size:16px}.news>span{display:block;color:var(--muted);font-size:11px;margin-top:5px}.news p{font-size:12px;color:var(--muted);margin:5px 0 0}.news em{display:block;margin-top:7px;font-style:normal;font-size:10px;color:var(--muted);opacity:.8}.interactive-card{cursor:pointer;transition:transform .18s ease,border-color .18s ease}.interactive-card:hover,.surname-stage:hover,.news-link:hover{border-color:#c7bcac}.interactive-card:hover{transform:translateY(-1px)}.page-head{display:flex;justify-content:space-between;align-items:end;padding:52px 0 24px}.page-head h1{font-size:52px;margin:7px 0 6px}.page-head p{color:var(--muted);margin:0}.panel{background:rgba(255,253,248,.9);border:1px solid var(--line);border-radius:16px;padding:20px;box-shadow:var(--shadow)}.modern-panel{box-shadow:0 12px 32px rgba(59,48,34,.045)}.panel.flush{padding:0;overflow:hidden}.panel-head{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;padding:22px 24px;border-bottom:1px solid var(--line)}.panel-head h2,.panel h2,.panel h3{font-family:Georgia,serif;color:var(--ink);font-weight:400}.panel-head h2{margin:0;font-size:27px}.panel-head p{margin:5px 0 0;color:var(--muted);font-size:14px}.legend{display:flex;gap:14px;color:var(--muted);font-size:11px}.tree-wrap{overflow:auto;background:#fbf8f1}.tree-wrap svg{display:block;width:100%;min-width:800px}.era-title{fill:var(--ink);font-size:14px;font-weight:700}.era-sub{fill:var(--muted);font-size:11px}.tree-node{fill:#fffdfa;stroke:#ddd5c8;stroke-width:1.5}.tree-name{fill:var(--ink);font:700 16px Georgia,serif}.tree-meta{fill:var(--muted);font-size:12px}.tree-line{stroke:#9b9489;stroke-width:2;fill:none}.tree-line.probable{stroke-dasharray:7 6}.selected-strip{padding:18px 24px;border-top:1px solid var(--line);background:#f7f2e8}.selected-strip strong{font-family:Georgia,serif;color:var(--ink);font-size:20px}.selected-strip p{margin:4px 0 0;color:var(--muted)}.map{height:600px}.leaflet-container{font-family:inherit;background:#e9e3d8}.place-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;padding:14px 18px 18px}.place-card{border:1px solid var(--line);border-radius:12px;padding:12px 14px;background:var(--panel)}.place-card strong{font-family:Georgia,serif;color:var(--ink);font-weight:400}.place-card span{display:block;color:var(--muted);font-size:12px;margin-top:3px}.sticky-history{position:sticky;top:10px;z-index:20;margin-bottom:12px}.pin-head{display:flex;justify-content:space-between;align-items:center;gap:18px}.pin-head h3{font-family:Georgia,serif;color:var(--ink);font-size:20px;margin:0}.pin-head p{color:var(--muted);margin:3px 0 0;font-size:13px}.pin-controls,.filter-row{display:flex;flex-wrap:wrap;gap:8px}.pin-btn,.filter,.soft-button{border:1px solid var(--line);background:var(--panel);border-radius:999px;padding:8px 13px;color:var(--ink)}.pin-btn.is-active,.filter.is-active{background:var(--ink);color:#fff;border-color:var(--ink)}.time-labels{display:grid;grid-template-columns:repeat(7,1fr);font-size:10px;color:var(--muted);padding:10px 0 5px 125px}.time-labels span:last-child{text-align:right}.year-grid{background-image:linear-gradient(to right,var(--line) 1px,transparent 1px);background-size:14.2857% 100%}.pinned-tape{height:78px;border:1px solid var(--line);border-radius:10px;position:relative;background:#fcfaf5}.life-row{position:absolute;left:0;right:0;height:20px}.life-row label{position:absolute;left:8px;font-size:10px;color:var(--ink)}.life-bar{position:absolute;top:13px;height:6px;border-radius:10px;background:var(--ink)}.life-bar.c1{background:#9b7454}.life-bar.c2{background:#73816e}.history-tracks{overflow-x:auto}.history-track{display:grid;grid-template-columns:165px minmax(760px,1fr);border-bottom:1px solid var(--line)}.history-label{padding:18px}.history-label span{display:block;text-transform:uppercase;letter-spacing:.2em;color:var(--muted);font-size:9px}.history-label strong{display:block;font-family:Georgia,serif;color:var(--ink);font-weight:400;margin-top:5px}.history-lane{position:relative;height:118px;background:#fbf8f1}.history-block{position:absolute;top:18px;min-height:76px;border:1px solid var(--line);background:rgba(255,253,248,.94);border-radius:10px;padding:10px;text-align:left;color:var(--ink);overflow:hidden;cursor:pointer}.history-block strong{display:block;font-family:Georgia,serif;font-weight:400}.history-block span{display:block;font-size:10px;color:var(--muted);margin-top:5px}.history-detail{padding:24px;background:#f5efe4}.history-detail h3{font-family:Georgia,serif;color:var(--ink);font-size:26px;font-weight:400;margin:6px 0}.history-detail p{color:var(--muted)}.detail-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:18px}.detail-grid>div{border:1px solid var(--line);border-radius:12px;padding:14px;background:var(--panel)}.detail-grid span{display:block;color:var(--muted);font-size:10px}.detail-grid strong{display:block;margin-top:4px;font-size:13px}.people-grid{display:grid;grid-template-columns:.78fr 1.22fr;gap:12px}.search{width:100%;padding:13px 14px;border:1px solid var(--line);border-radius:12px;background:#fbf8f1;font:inherit;outline:none}.search:focus{border-color:#b5a58f}.people-list{display:grid;gap:8px;margin-top:12px}.person-row{border:1px solid transparent;border-bottom-color:var(--line);background:transparent;padding:14px 8px;text-align:left;cursor:pointer}.person-row strong{display:block;font-family:Georgia,serif;font-size:17px;color:var(--ink);font-weight:400}.person-row span{display:block;font-size:12px;color:var(--muted);margin-top:3px}.person-detail{min-height:520px}.person-detail>h2{font-size:38px;margin:8px 0}.lead{font-family:Georgia,serif;line-height:1.65;color:#4f5357}.lead.small{font-size:17px}.chips{display:flex;flex-wrap:wrap;gap:7px}.chips span{border:1px solid var(--line);border-radius:999px;padding:7px 10px;font-size:11px;background:#fbf8f1}.treasure-page-head{align-items:flex-end}.treasure-feature-grid{display:grid;grid-template-columns:1.25fr .75fr;gap:12px}.featured-treasure{min-height:360px}.featured-object{min-height:210px;margin:16px 0;border-radius:14px;background:linear-gradient(rgba(20,28,33,.08),rgba(20,28,33,.08)),url('treasure-preview.jpg') center/cover no-repeat;display:flex;align-items:flex-end;padding:18px;color:#fff}.featured-object>div{max-width:540px}.featured-object strong{font-family:Georgia,serif;font-size:24px}.featured-object p{color:rgba(255,255,255,.86)}.icon{font-size:28px}.treasure-stack{display:grid;gap:12px}.stack-card,.treasure-card{border:1px solid var(--line);border-radius:14px;padding:18px;background:var(--panel)}.stack-card h3,.treasure-card h3{font-family:Georgia,serif;color:var(--ink);font-weight:400;margin:6px 0}.stack-card p,.treasure-card p{color:var(--muted);font-size:13px}.treasure-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:12px}.treasure-bottom{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}.question-list,.discovery-log{display:grid;gap:8px}.question,.discovery{border-top:1px solid var(--line);padding:12px 0}.question strong,.discovery strong{display:block;font-family:Georgia,serif;color:var(--ink);font-weight:400}.question span,.discovery span,.discovery p{display:block;color:var(--muted);font-size:12px;margin:4px 0 0}.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.stat{border:1px solid var(--line);border-radius:12px;padding:12px}.stat strong{display:block;font-family:Georgia,serif;font-size:26px}.stat span{font-size:11px;color:var(--muted)}
@media(max-width:1100px){.hero-heading-line{white-space:normal}.archive-app{grid-template-columns:minmax(0,1fr)}.sidebar{position:relative;min-width:0;height:auto;display:block;padding:18px;border-right:0;border-bottom:1px solid var(--line)}.brand{display:inline-block;padding:0 12px 16px}.side-nav{display:flex;overflow:auto}.nav-item{min-width:max-content}.sidebar-foot{display:none}.hero{grid-template-columns:1fr;min-height:auto}.hero-copy{padding:46px 28px 28px}.hero-image{height:260px}.story-strip{grid-template-columns:1fr}.home-grid{grid-template-columns:1fr}.app-main main{padding-left:18px;padding-right:18px}.hero{margin-left:-18px;margin-right:-18px}.preview-banner{margin-left:18px;margin-right:18px}}
@media(max-width:760px){.hero h1{font-size:36px}.hero-route{font-size:18px}.hero-actions{flex-direction:column;align-items:flex-start}.origin-inline{grid-template-columns:1fr}.surname-flow{grid-template-columns:1fr;gap:10px}.surname-arrow{justify-self:center;transform:rotate(90deg)}.featured-home-card{grid-template-columns:1fr}.featured-image{min-height:220px}.home-links,.news-list,.place-cards,.treasure-grid,.treasure-bottom,.detail-grid,.people-grid,.treasure-feature-grid{grid-template-columns:1fr}.page-head h1{font-size:40px}.history-track{grid-template-columns:130px minmax(690px,1fr)}.map{height:480px}}

.leaflet-container img,.leaflet-container svg{max-width:none!important}

/* v0.3.3 map polish */
.leaflet-control-attribution{font-size:9px!important;line-height:1.2!important;padding:2px 5px!important;background:rgba(255,253,248,.78)!important;color:#7a7369!important;box-shadow:none!important;border-radius:6px 0 0 0!important}
.leaflet-control-attribution a{color:inherit!important;text-decoration:none!important;opacity:.78}
.leaflet-control-attribution a:hover{text-decoration:underline!important;opacity:1}
.leaflet-control-zoom{border:1px solid rgba(30,48,62,.14)!important;box-shadow:0 6px 20px rgba(30,48,62,.08)!important;border-radius:10px!important;overflow:hidden}
.leaflet-control-zoom a{width:34px!important;height:34px!important;line-height:32px!important;background:rgba(255,253,248,.94)!important;color:#102f49!important;border-color:rgba(30,48,62,.10)!important}
.leaflet-control-zoom a:hover{background:#f2ece1!important}

/* v0.3.4 — People place filters */
.people-place-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:16px 0 8px}.people-place-head>span{font-size:10px;text-transform:uppercase;letter-spacing:.2em;color:var(--muted);font-weight:700}.place-clear{border:0;background:transparent;color:var(--ink);font-size:11px;cursor:pointer;padding:4px 0}.people-place-filters{display:flex;gap:7px;overflow-x:auto;padding:0 0 8px;scrollbar-width:thin}.people-place-filter{flex:0 0 auto;border:1px solid var(--line);background:#fbf8f1;color:var(--ink);border-radius:999px;padding:8px 11px;font:inherit;font-size:11px;cursor:pointer;white-space:nowrap}.people-place-filter:hover{border-color:#b9ac99}.people-place-filter.is-active{background:var(--ink);border-color:var(--ink);color:#fff}.people-place-filter .count{opacity:.62;margin-left:4px}.people-filter-summary{min-height:18px;color:var(--muted);font-size:11px;margin:2px 0 4px}.person-row .person-places{display:flex;flex-wrap:wrap;gap:5px;margin-top:7px}.person-row .person-place-tag{display:inline-block;border:1px solid var(--line);border-radius:999px;padding:3px 7px;font-size:9px;color:var(--muted);background:#fbf8f1}


/* v0.3.5 — place-to-people navigation */
.place-card{appearance:none;text-align:left;cursor:pointer;color:var(--text);font:inherit}.place-card:hover{border-color:#b9ac99;background:#fbf7ef}.place-card small{display:block;margin-top:7px;font-size:10px;color:var(--muted)}
.map-place-people{border-top:1px solid var(--line);padding:22px 24px 24px;background:#f7f2e8}.map-place-people-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.map-place-people-head h3{font-family:Georgia,serif;color:var(--ink);font-size:28px;font-weight:400;margin:5px 0 2px}.map-place-people-head p{margin:0;color:var(--muted);font-size:12px}.map-place-people-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:16px}.map-person-row{appearance:none;border:1px solid var(--line);border-radius:11px;background:var(--panel);padding:13px 14px;text-align:left;cursor:pointer;color:var(--text)}.map-person-row:hover{border-color:#b9ac99;background:#fffaf1}.map-person-row strong{display:block;font-family:Georgia,serif;color:var(--ink);font-weight:400;font-size:16px}.map-person-row span{display:block;color:var(--muted);font-size:10px;margin-top:4px}.map-place-empty{grid-column:1/-1;color:var(--muted);font-size:13px;padding:12px 0}.map-place-people-actions{display:flex;justify-content:flex-end;margin-top:16px}.leaflet-tooltip{background:rgba(255,253,248,.96)!important;border:1px solid var(--line)!important;color:var(--ink)!important;box-shadow:0 7px 18px rgba(30,48,62,.08)!important;border-radius:7px!important;font:11px Inter,ui-sans-serif,system-ui,sans-serif!important}.leaflet-tooltip-top:before{border-top-color:var(--line)!important}
@media(max-width:760px){.map-place-people-list{grid-template-columns:1fr}.map-place-people-actions{justify-content:stretch}.map-place-people-actions .primary-action{width:100%}}

.surname-section .section-heading{margin:4px 0 9px}.surname-section .section-heading h3{font-size:20px}.surname-section .section-heading span{font-size:10px}

.person-media-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.person-media-card{display:block;text-decoration:none;color:var(--ink);border:1px solid var(--line);border-radius:10px;overflow:hidden;background:#fbf8f1}.person-media-card img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover}.person-media-card>span{display:block;padding:8px}.person-media-card strong{display:block;font:400 13px Georgia,serif}.person-media-card small{display:block;color:var(--muted);font-size:9px;margin-top:3px}.person-media-card.document{padding:14px}.muted-inline{color:var(--muted);font-size:11px}
@media(max-width:760px){.person-media-grid{grid-template-columns:1fr 1fr}}

.person-place-connections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.person-place-connection{border:1px solid var(--line);border-radius:10px;background:#fbf8f1;text-align:left;padding:10px 11px;cursor:pointer;color:var(--ink)}.person-place-connection>span{display:block;text-transform:uppercase;letter-spacing:.14em;font-size:8px;color:var(--muted)}.person-place-connection strong{display:block;font:400 14px Georgia,serif;margin-top:4px}.person-place-connection small{display:block;color:var(--muted);font-size:9px;margin-top:3px}@media(max-width:760px){.person-place-connections{grid-template-columns:1fr}}

.person-modules-public{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.person-public-module{border:1px solid var(--line);border-radius:10px;background:#fbf8f1;padding:10px}.person-public-module>span{display:block;text-transform:uppercase;letter-spacing:.14em;font-size:8px;color:var(--muted)}.person-public-module strong{display:block;font:400 14px Georgia,serif;margin-top:4px}.person-public-module small{display:block;color:var(--muted);font-size:9px;margin-top:3px}.person-public-module p{font-size:11px;color:var(--muted);margin:6px 0 0}@media(max-width:760px){.person-modules-public{grid-template-columns:1fr}}

.archive-search-bar{position:sticky;top:0;z-index:60;display:flex;justify-content:flex-end;padding:9px 24px;background:rgba(247,243,234,.94);border-bottom:1px solid var(--line);backdrop-filter:blur(12px)}.archive-global-search{position:relative;width:min(390px,100%)}.archive-global-search input{width:100%;border:1px solid var(--line);border-radius:999px;background:#fffdf8;padding:9px 13px;color:var(--ink);font-size:11px}.archive-search-results{display:none;position:absolute;z-index:1000;top:43px;left:0;right:0;max-height:480px;overflow:auto;border:1px solid var(--line);border-radius:14px;background:#fffdf8;box-shadow:0 18px 45px rgba(10,25,35,.16);padding:8px}.archive-search-results.open{display:block}.archive-search-results section>span{display:block;padding:7px 8px 4px;text-transform:uppercase;letter-spacing:.16em;font-size:8px;color:var(--muted)}.archive-search-results button{display:block;width:100%;border:0;border-top:1px solid var(--line);background:transparent;text-align:left;padding:8px;cursor:pointer;color:var(--ink)}.archive-search-results strong{display:block;font:400 12px Georgia,serif}.archive-search-results small{display:block;color:var(--muted);font-size:9px;margin-top:2px}.archive-search-empty{padding:12px;color:var(--muted);font-size:11px}.tree-branch-controls{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;padding:12px 16px;border-top:1px solid var(--line);background:#fffdf8}.tree-control-label{display:block;text-transform:uppercase;letter-spacing:.16em;font-size:8px;color:var(--muted);margin-bottom:6px}.tree-branch-chips{display:flex;gap:6px;flex-wrap:wrap}.tree-branch-chip{border:1px solid var(--line);border-radius:999px;background:#f7f3ea;color:var(--ink);padding:6px 9px;font-size:9px;cursor:pointer}.tree-branch-chip.active{background:var(--ink);color:#fff;border-color:var(--ink)}.tree-branch-controls>button{border:0;background:transparent;text-decoration:underline;color:var(--muted);font-size:9px;cursor:pointer}.branch-parallel-lanes{display:grid;grid-template-columns:repeat(auto-fit,minmax(165px,1fr));gap:7px;padding:12px 16px;border-bottom:1px solid var(--line);background:#f8f4eb}.branch-lane-card{border:1px solid var(--line);border-radius:10px;background:#fffdf9;padding:9px 10px;cursor:pointer}.branch-lane-card.dimmed{opacity:.35}.branch-lane-card>span{display:block;text-transform:uppercase;letter-spacing:.14em;font-size:7px;color:var(--muted)}.branch-lane-card strong{display:block;font:400 12px Georgia,serif;margin-top:3px}.branch-lane-card small{display:block;font-size:8px;color:var(--muted);margin-top:3px}@media(max-width:760px){.archive-search-bar{padding:8px 12px}.tree-branch-controls{align-items:flex-start;flex-direction:column}.branch-parallel-lanes{grid-template-columns:1fr}}

/* v0.6.3 — collective family identity, explicit card types, non-linear navigation */

.hero-family-identity{display:grid;gap:4px;margin:15px 0 2px}.hero-family-identity strong{font:400 16px/1.35 Georgia,serif;color:var(--ink)}.hero-family-identity span{font-size:10px;color:var(--muted)}
.surname-collective{width:100%;border:1px solid var(--line);border-radius:12px;background:#fbf8f1;padding:16px 18px;display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;color:var(--ink);cursor:pointer}.surname-collective>span{font:400 40px Georgia,serif}.surname-collective>b{font-weight:400;color:var(--muted)}.surname-collective>small{flex-basis:100%;font-size:9px;color:var(--muted);margin-top:2px}
.home-branches-section{margin-top:14px}.home-branches-intro{font-size:10px;color:var(--muted);margin:-4px 0 12px}.home-branch-links{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:8px}.home-branch-link{border:1px solid var(--line);border-radius:11px;background:#fffdf8;padding:11px 12px;text-align:left;color:var(--ink);cursor:pointer}.home-branch-link:hover{transform:translateY(-1px);box-shadow:0 7px 18px rgba(20,30,38,.06)}.home-branch-link>span{display:block;text-transform:uppercase;letter-spacing:.15em;font-size:7px;color:var(--muted)}.home-branch-link>strong{display:block;font:400 14px Georgia,serif;margin-top:4px}.home-branch-link>small{display:block;font-size:8px;color:var(--muted);margin-top:4px;line-height:1.4}
.card-type{display:block;text-transform:uppercase;letter-spacing:.16em;font-size:7px;color:var(--muted);margin-bottom:5px}.typed-nav-card .card-type{margin-bottom:4px}.place-button-cloud{display:flex;flex-wrap:wrap;gap:7px;margin-top:14px}.place-button-cloud button{border:1px solid var(--line);border-radius:999px;background:#fffdf8;padding:7px 10px;color:var(--ink);cursor:pointer;font-size:9px}.place-button-cloud button:hover{background:#f2ede3}
.hero-route,.surname-arrow,.journey-line i{display:none!important}
@media(max-width:760px){.home-branch-links{grid-template-columns:1fr}.surname-collective{gap:8px}.surname-collective>span{font-size:34px}}

/* Collective identity: indivisible words and separators on two rows. */
.collective-brand-name{display:grid;grid-template-columns:1fr;gap:1px;width:max-content;max-width:none;font-size:10px;line-height:1.45;letter-spacing:.09em}
.collective-brand-name>span,.hero-family-name>span{display:block;white-space:nowrap;font:inherit;line-height:inherit;letter-spacing:inherit}
.hero-family-name{display:grid;grid-template-columns:1fr;gap:1px}
@media(max-width:460px){.hero-family-name{font-size:clamp(17px,4.5vw,24px)}}

/* v0.6.9 family tree geometry */
.tree-partner-line{stroke:#8e877d;stroke-width:2;stroke-linecap:round}
.tree-line{stroke:#8e877d;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round}
.tree-line.probable,.tree-partner-line.probable{stroke-dasharray:6 5}
.tree-generation-label{font-size:10px;letter-spacing:.12em;text-transform:uppercase;opacity:.62}

/* v0.7.1 scalable History person pinning */
.pin-controls{position:relative;align-items:center;justify-content:flex-end;min-width:0}
.pin-selected{display:flex;flex-wrap:wrap;gap:7px;justify-content:flex-end}
.pin-chip{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--ink);background:var(--ink);color:#fff;border-radius:999px;padding:7px 8px 7px 12px;font-size:12px;max-width:220px}
.pin-chip>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pin-remove{width:22px;height:22px;border:0;border-radius:50%;background:rgba(255,255,255,.14);color:#fff;cursor:pointer;font:inherit;line-height:1;display:grid;place-items:center;padding:0}
.pin-remove:hover{background:rgba(255,255,255,.24)}
.pin-picker{position:relative}
.pin-add{border:1px solid var(--line);background:var(--panel);color:var(--ink);border-radius:999px;padding:8px 13px;font:inherit;cursor:pointer;white-space:nowrap}
.pin-add:hover:not(:disabled){border-color:#b9ac99;background:#faf6ee}
.pin-add:disabled{cursor:default;color:var(--muted);opacity:.68}
.pin-search-popover{position:absolute;right:0;top:calc(100% + 8px);z-index:70;width:min(340px,80vw);padding:10px;border:1px solid var(--line);border-radius:12px;background:#ffffff;box-shadow:0 18px 42px rgba(45,38,29,.14)}
.pin-search-input{width:100%;padding:10px 11px;border:1px solid var(--line);border-radius:9px;background:#fbf8f1;font:inherit;outline:none}
.pin-search-input:focus{border-color:#aa9b87}
.pin-search-results{max-height:280px;overflow:auto;margin-top:7px;border-top:1px solid var(--line)}
.pin-search-result{display:grid;grid-template-columns:1fr auto;gap:10px;width:100%;border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--ink);padding:10px 4px;text-align:left;cursor:pointer}
.pin-search-result:hover{background:#f7f2e8}
.pin-search-result strong{font:400 13px Georgia,serif}
.pin-search-result small{color:var(--muted);font-size:10px}
.pin-search-empty,.pin-empty{color:var(--muted);font-size:11px}
.pin-search-empty{padding:12px 4px}
.pin-empty{padding:24px 14px}
@media(max-width:760px){
  .pin-head{align-items:flex-start;flex-direction:column}
  .pin-controls{width:100%;justify-content:flex-start}
  .pin-selected{justify-content:flex-start}
  .pin-search-popover{left:0;right:auto;width:min(340px,calc(100vw - 70px))}
}

/* Archive browser controls, using the existing museum palette. */
.people-place-filters{display:block}.people-place-filters label{display:grid;gap:5px;margin:10px 0;font-size:12px}.people-place-filters input[type=search],.people-place-filters select{width:100%;padding:9px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--ink);font:inherit}.public-filter-options{display:grid;grid-template-columns:1fr 1fr;gap:10px}.public-dual-range{position:relative;height:32px}.public-dual-range input{position:absolute;width:100%;left:0;top:5px;pointer-events:none;appearance:none;background:transparent}.public-dual-range:before{content:"";position:absolute;left:0;right:0;top:15px;height:3px;background:var(--line)}.public-dual-range input::-webkit-slider-thumb{appearance:none;width:18px;height:18px;border-radius:50%;background:var(--ink);pointer-events:auto;cursor:ew-resize}.public-dual-range input::-moz-range-thumb{width:18px;height:18px;border:0;border-radius:50%;background:var(--ink);pointer-events:auto;cursor:ew-resize}.people-place-filters small{font-size:11px;color:var(--muted)}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--accent);outline-offset:3px}

.surname-collective{display:grid;gap:4px}.surname-collective>span{white-space:nowrap;font-size:clamp(15px,3.5vw,32px)}


/* 0.8.0 consolidated Family Tree enhancements (stabilized 0.8.0) */
/* v0.8.0 Family Tree visual refinement */
#view-tree .tree-card,
.tree-card{
  border-radius:18px;
  overflow:hidden;
  background:#fbf8f1;
  box-shadow:0 18px 42px rgba(39,33,26,.055);
}

.tree-wrap{
  position:relative;
  background:
    linear-gradient(to bottom, rgba(255,255,255,.26), rgba(255,255,255,0)),
    #faf7f0;
  padding:18px 0 10px;
  border-top:1px solid rgba(130,116,96,.12);
  border-bottom:1px solid rgba(130,116,96,.12);
}

.tree-wrap svg{
  display:block;
  width:100%;
  overflow:visible;
}

.tree-generation-band{
  fill:#f8f4ec;
  opacity:.46;
}
.tree-generation-band:nth-of-type(even){
  fill:#fcfaf5;
}

.tree-generation-guide{
  stroke:#ded6c9;
  stroke-width:1;
  opacity:.6;
}
.tree-generation-label{
  fill:#877e72;
  font-size:9px;
  font-weight:500;
  letter-spacing:.16em;
  text-transform:uppercase;
}

.tree-node{
  fill:#fffdfa;
  stroke:#d9d0c2;
  stroke-width:1.25;
  filter:drop-shadow(0 7px 14px rgba(49,41,32,.055));
  transition:stroke .16s ease, filter .16s ease, fill .16s ease;
}
.tree-person-group{
  outline:none;
}
.tree-person-group:hover .tree-node{
  stroke:#a89a87;
  fill:#fffefb;
  filter:drop-shadow(0 10px 18px rgba(49,41,32,.08));
}
.tree-person-group.is-selected .tree-node{
  stroke:#0f2a43;
  stroke-width:2;
  fill:#fffefb;
  filter:drop-shadow(0 10px 20px rgba(15,42,67,.10));
}
.tree-person-group:focus-visible .tree-node{
  stroke:#0f2a43;
  stroke-width:2;
}

.tree-name{
  fill:#102a43;
  font-family:Georgia,serif;
  font-size:15px;
  font-weight:600;
}
.tree-meta{
  fill:#7e7569;
  font-size:10.5px;
}

.tree-partner-line,
.tree-line{
  stroke:#8e867a;
  stroke-width:1.65;
  fill:none;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.tree-partner-line{
  stroke-width:1.8;
}
.tree-line.probable,
.tree-partner-line.probable{
  stroke-dasharray:6 5;
  opacity:.78;
}
.tree-sibling-line{
  stroke:#b0a79b;
  stroke-width:1.25;
  fill:none;
  stroke-dasharray:3 4;
  opacity:.72;
}

/* Give the selected-person footer a stronger archive-panel identity */
.tree-selected{
  border-top:1px solid #ddd4c7;
  background:#f6f0e6;
  padding:20px 28px 22px;
}
.tree-selected .eyebrow,
.tree-selected .admin-kicker{
  color:#7c7164;
  letter-spacing:.16em;
}
#treeSelectedName{
  margin-top:2px;
  color:#102a43;
}
#treeSelectedSummary{
  color:#7d7469;
  max-width:760px;
}

/* Reduce the feeling of a vast empty canvas for small trees */
@media(min-width:900px){
  .tree-wrap svg{
    min-height:520px;
  }
}
@media(max-width:760px){
  .tree-wrap{
    padding-top:10px;
  }
  .tree-generation-label{
    font-size:8px;
  }
  .tree-selected{
    padding:16px 18px 18px;
  }
}

/* v0.9.0 — Family Tree direction pass */
.tree-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 18px;
  border-top:1px solid #e0d8cc;
  border-bottom:1px solid #e0d8cc;
  background:#fcfaf5;
}
.tree-search{position:relative;width:min(420px,48%)}
.tree-search input{
  width:100%;min-height:42px;padding:0 14px;
  border:1px solid #d8cfc1;border-radius:10px;
  background:#ffffff;color:#102a43;font:inherit;outline:none;
}
.tree-search input:focus{border-color:#a79a88;box-shadow:0 0 0 3px rgba(16,42,67,.05)}
.tree-search-results{
  position:absolute;top:calc(100% + 7px);left:0;right:0;z-index:80;
  max-height:310px;overflow:auto;padding:6px;
  border:1px solid #d8cfc1;border-radius:11px;background:#ffffff;
  box-shadow:0 18px 40px rgba(38,31,24,.12);
}
.tree-search-results button{
  display:grid;grid-template-columns:1fr auto;gap:10px;width:100%;
  padding:9px 10px;border:0;border-bottom:1px solid #eee7dd;
  background:transparent;text-align:left;color:#102a43;cursor:pointer;
}
.tree-search-results button:last-child{border-bottom:0}
.tree-search-results button strong{font:400 13px Georgia,serif}
.tree-search-results button small,.tree-search-empty{font-size:10px;color:#7e7569}
.tree-search-empty{padding:10px}
.tree-view-controls{
  display:flex;align-items:center;gap:0;border:1px solid #d8cfc1;
  border-radius:10px;overflow:hidden;background:#ffffff;
}
.tree-view-controls button,.tree-view-controls output{
  min-height:40px;padding:0 12px;border:0;border-right:1px solid #e1d9ce;
  background:transparent;color:#102a43;font:inherit;font-size:11px;
}
.tree-view-controls button{cursor:pointer}
.tree-view-controls button:hover{background:#f6f1e8}
.tree-view-controls button:last-child{border-right:0}
.tree-view-controls output{display:grid;place-items:center;min-width:58px}
#treeViewport{
  overflow:auto;position:relative;
  background:linear-gradient(to bottom,rgba(255,255,255,.52),rgba(255,255,255,0) 160px),#faf7f0;
}
#treeStage{transform-origin:top left;width:max-content;min-width:100%;transition:transform .16s ease}
.tree-generation-band{fill:#f4efe6;opacity:.40}
.tree-generation-guide{stroke:#ddd4c7;stroke-width:1;opacity:.78}
.tree-node{fill:#fffefb;stroke:#d6cbbb;stroke-width:1.15;filter:drop-shadow(0 8px 16px rgba(43,36,29,.06))}
.tree-person-group:hover .tree-node{stroke:#9e907c;filter:drop-shadow(0 12px 22px rgba(43,36,29,.09))}
.tree-person-group.is-selected .tree-node{stroke:#0e3558;stroke-width:2.15;fill:#fffefb;filter:drop-shadow(0 14px 26px rgba(14,53,88,.12))}
.tree-name{font-size:15px;font-weight:600;fill:#102a43}
.tree-meta{fill:#786f64;font-size:10.5px}
.tree-partner-line,.tree-line{stroke:#8a8175;stroke-width:1.55}
.tree-partner-line{stroke-width:1.8}
.tree-selected{background:#fcfaf5;padding:22px 28px}
.tree-selected-head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}
.tree-profile-link{
  flex:0 0 auto;border:1px solid #d6cbbb;border-radius:9px;
  padding:9px 12px;color:#102a43;text-decoration:none;font-size:11px;
}
.tree-profile-link:hover{background:#f3ede3}
.tree-selected-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:16px}
.tree-selected-stat{padding:11px 12px;border:1px solid #e0d8cc;border-radius:10px;background:#fffdfa}
.tree-selected-stat span{display:block;color:#857b6f;font-size:9px;text-transform:uppercase;letter-spacing:.1em}
.tree-selected-stat strong{display:block;margin-top:4px;color:#102a43;font:400 13px Georgia,serif}
.sr-only{
  position:absolute!important;width:1px!important;height:1px!important;padding:0!important;
  margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;border:0!important;
}
@media(max-width:760px){
  .tree-toolbar{align-items:stretch;flex-direction:column}
  .tree-search{width:100%}
  .tree-view-controls{align-self:flex-start}
  .tree-selected-head{flex-direction:column}
  .tree-selected-grid{grid-template-columns:1fr}
}

/* v0.9.1 — History context layer */
.tree-history-toggle{
  border-right:1px solid #e1d9ce!important;
}
.tree-history-toggle.is-active{
  background:#102a43!important;
  color:#fff!important;
}

.tree-context-strip{
  padding:14px 18px 16px;
  border-bottom:1px solid #e0d8cc;
  background:#f7f2e9;
}
.tree-context-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:10px;
}
.tree-context-head strong{
  display:block;
  margin-top:3px;
  color:#102a43;
  font:400 15px Georgia,serif;
}
.tree-context-head small{
  color:#82776a;
  font-size:9px;
}
.tree-context-items{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}
.tree-context-chip{
  display:grid;
  gap:2px;
  min-width:145px;
  max-width:240px;
  padding:8px 10px;
  border:1px solid #d9cfc1;
  border-radius:9px;
  background:#ffffff;
  text-align:left;
  color:#102a43;
  cursor:pointer;
}
.tree-context-chip span{
  color:#8a7f72;
  font-size:8px;
  letter-spacing:.08em;
}
.tree-context-chip strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font:400 11px Georgia,serif;
}
.tree-context-chip:hover,
.tree-context-chip.is-active{
  border-color:#a99a86;
  background:#f2ebdf;
}
.tree-context-detail{
  display:grid;
  grid-template-columns:minmax(180px,.7fr) minmax(260px,1.4fr);
  gap:12px 18px;
  margin-top:10px;
  padding:11px 12px;
  border:1px solid #ddd3c5;
  border-radius:10px;
  background:#ffffff;
}
.tree-context-detail>div span{
  display:block;
  color:#897e71;
  font-size:8px;
  letter-spacing:.08em;
}
.tree-context-detail>div strong{
  display:block;
  margin-top:3px;
  color:#102a43;
  font:400 14px Georgia,serif;
}
.tree-context-detail p{
  margin:0;
  color:#655e56;
  font-size:10px;
  line-height:1.5;
}
.tree-context-detail>small{
  grid-column:1/-1;
  padding-top:8px;
  border-top:1px solid #eee6da;
  color:#7d7367;
  font-size:9px;
  line-height:1.45;
}
.tree-context-empty{
  color:#84796c;
  font-size:10px;
}

.tree-selected-history{
  margin-top:16px;
  padding-top:14px;
  border-top:1px solid #e1d8cb;
}
.tree-selected-history-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  margin-bottom:9px;
}
.tree-selected-history-head small{
  color:#82776a;
  font-size:9px;
}
.tree-selected-history-items{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
  gap:8px;
}
.tree-person-history-item{
  display:grid;
  gap:3px;
  padding:9px 10px;
  border:1px solid #e0d7ca;
  border-radius:9px;
  background:#ffffff;
  text-align:left;
  color:#102a43;
}
.tree-person-history-item span{
  color:#8b8073;
  font-size:8px;
  letter-spacing:.08em;
}
.tree-person-history-item strong{
  font:400 11px Georgia,serif;
}
.tree-person-history-item small{
  color:#756c62;
  font-size:8.5px;
  line-height:1.4;
}

@media(max-width:760px){
  .tree-context-head,
  .tree-selected-history-head{
    align-items:flex-start;
    flex-direction:column;
  }
  .tree-context-detail{
    grid-template-columns:1fr;
  }
  .tree-context-detail>small{
    grid-column:auto;
  }
  .tree-context-chip{
    min-width:0;
    width:100%;
    max-width:none;
  }
}

/* v0.9.2 — Person/evidence layer */
.tree-evidence-meta{fill:#8a7f72;font-size:8.5px;letter-spacing:.02em}
.tree-record-tabs{
  display:flex;gap:2px;margin-top:18px;border-bottom:1px solid #ddd4c7;overflow-x:auto;
}
.tree-record-tabs button{
  flex:0 0 auto;padding:9px 11px;border:0;border-bottom:2px solid transparent;
  background:transparent;color:#756d63;font:inherit;font-size:10px;cursor:pointer;
}
.tree-record-tabs button.active{border-bottom-color:#102a43;color:#102a43}
.tree-record-tabs button span{color:#968a7b;font-size:9px}
.tree-record-body{padding-top:12px}
.tree-record-pane{display:none}
.tree-record-pane.active{display:block}
.tree-facts-list{
  display:grid;border:1px solid #e2d9cd;border-radius:10px;overflow:hidden;background:#ffffff;
}
.tree-fact-row{
  display:grid;grid-template-columns:110px minmax(100px,.7fr) minmax(150px,1.3fr);
  gap:12px;align-items:center;padding:9px 11px;border-bottom:1px solid #eee7dc;
}
.tree-fact-row:last-child{border-bottom:0}
.tree-fact-row span{color:#7e756a;font-size:9px}
.tree-fact-row strong{color:#102a43;font:400 11px Georgia,serif}
.tree-fact-row small{color:#7f766b;font-size:9px}
.tree-record-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:8px}
.tree-record-list article{
  display:grid;gap:3px;padding:10px 11px;border:1px solid #e0d7ca;border-radius:9px;background:#ffffff;
}
.tree-record-list article span{color:#8c8174;font-size:8px;text-transform:uppercase;letter-spacing:.08em}
.tree-record-list article strong{color:#102a43;font:400 12px Georgia,serif}
.tree-record-list article small{color:#776f65;font-size:8.5px;line-height:1.4}
.tree-record-empty,.tree-record-loading{
  padding:12px;color:#82786c;font-size:10px;border:1px dashed #ddd3c5;border-radius:9px;
}
@media(max-width:760px){
  .tree-fact-row{grid-template-columns:1fr;gap:3px}
}

/* v1.0.0 — Navigation & scale */
.tree-navigation-controls{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-left:auto;
}
.tree-navigation-controls button{
  min-height:40px;
  padding:0 11px;
  border:1px solid #d8cfc1;
  border-radius:9px;
  background:#ffffff;
  color:#102a43;
  font:inherit;
  font-size:10px;
  cursor:pointer;
}
.tree-navigation-controls button:hover:not(:disabled){background:#f6f1e8}
.tree-navigation-controls button.is-active{
  background:#102a43;
  border-color:#102a43;
  color:#fff;
}
.tree-navigation-controls button:disabled{
  opacity:.45;
  cursor:not-allowed;
}

.tree-pathbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:10px 18px;
  border-bottom:1px solid #e0d8cc;
  background:#f9f5ed;
}
.tree-path-fields{
  display:flex;
  align-items:flex-end;
  gap:7px;
  flex-wrap:wrap;
}
.tree-path-fields label{
  display:grid;
  gap:4px;
}
.tree-path-fields label>span{
  color:#81776b;
  font-size:8px;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.tree-path-fields select{
  min-width:180px;
  min-height:36px;
  border:1px solid #d8cfc1;
  border-radius:8px;
  background:#ffffff;
  color:#102a43;
  padding:0 9px;
  font:inherit;
  font-size:10px;
}
.tree-path-fields button{
  min-height:36px;
  padding:0 11px;
  border:1px solid #d8cfc1;
  border-radius:8px;
  background:#102a43;
  color:#fff;
  font:inherit;
  font-size:10px;
  cursor:pointer;
}
.tree-path-fields button.ghost{
  background:#ffffff;
  color:#102a43;
}
.tree-path-arrow{
  align-self:center;
  color:#8b8175;
  margin-top:13px;
}
.tree-path-result{
  min-width:0;
  color:#5f584f;
  font-size:10px;
  line-height:1.55;
  text-align:right;
}
.tree-path-result em{
  color:#8a7f72;
  font-style:normal;
  font-size:9px;
}
.tree-path-sep{
  color:#a29789;
  padding:0 3px;
}

.tree-person-group.is-path .tree-node{
  stroke:#8b6d3f;
  stroke-width:2.2;
  fill:#fffaf1;
  filter:drop-shadow(0 12px 24px rgba(139,109,63,.12));
}
.tree-person-group.is-path .tree-name{
  fill:#6f552f;
}

@media(max-width:980px){
  .tree-toolbar{
    flex-wrap:wrap;
  }
  .tree-navigation-controls{
    order:3;
    width:100%;
    margin-left:0;
  }
}
@media(max-width:760px){
  .tree-pathbar{
    align-items:stretch;
    flex-direction:column;
  }
  .tree-path-fields{
    align-items:stretch;
    flex-direction:column;
  }
  .tree-path-fields select,
  .tree-path-fields button{
    width:100%;
  }
  .tree-path-arrow{display:none}
  .tree-path-result{text-align:left}
}

/* v1.1.0 — Media & rich records */
.tree-selected-identity{
  display:flex;
  align-items:flex-start;
  gap:14px;
  min-width:0;
}
.tree-selected-avatar{
  position:relative;
  flex:0 0 58px;
  width:58px;
  height:58px;
  border:1px solid #d8cfc1;
  border-radius:50%;
  overflow:hidden;
  display:grid;
  place-items:center;
  background:#f1eadf;
  color:#102a43;
  font:400 17px Georgia,serif;
}
.tree-selected-avatar img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  background:#f1eadf;
}
.tree-selected-avatar span{
  position:relative;
  z-index:0;
}

.tree-media-badge circle{
  fill:#f4eee4;
  stroke:#cbbda9;
  stroke-width:1;
}
.tree-media-badge text{
  fill:#6f5f49;
  font-size:7px;
}

.tree-media-gallery{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:10px;
}
.tree-media-card{
  min-width:0;
  display:grid;
  grid-template-columns:92px minmax(0,1fr);
  gap:12px;
  padding:10px;
  border:1px solid #ded5c8;
  border-radius:11px;
  background:#ffffff;
  color:#102a43;
  text-decoration:none;
  transition:border-color .15s ease,background .15s ease,transform .15s ease;
}
.tree-media-card:hover{
  border-color:#aa9a85;
  background:#faf5ec;
}
.tree-media-thumb{
  width:92px;
  aspect-ratio:4/3;
  overflow:hidden;
  border-radius:8px;
  background:#eee7dc;
  border:1px solid #e0d7ca;
}
.tree-media-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.tree-media-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.tree-media-copy strong{
  color:#102a43;
  font:400 12px Georgia,serif;
  overflow-wrap:anywhere;
}
.tree-media-copy span{
  color:#857a6d;
  font-size:8px;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.tree-media-copy p{
  margin:2px 0 0;
  color:#6f675e;
  font-size:9px;
  line-height:1.45;
}
.tree-media-copy small{
  margin-top:auto;
  color:#918577;
  font-size:8px;
}
.tree-media-document{
  grid-template-columns:68px minmax(0,1fr);
}
.tree-media-filemark{
  width:68px;
  min-height:74px;
  display:grid;
  place-items:center;
  border:1px solid #d8cfc1;
  border-radius:8px;
  background:#f3ede3;
  color:#887b6c;
  font-size:9px;
  letter-spacing:.12em;
}

@media(max-width:760px){
  .tree-selected-identity{
    align-items:center;
  }
  .tree-media-gallery{
    grid-template-columns:1fr;
  }
}

/* v1.2.0 — Branch & research intelligence */
.tree-research-summary{
  display:grid;
  grid-template-columns:minmax(180px,.8fr) minmax(360px,1.8fr) auto;
  align-items:center;
  gap:18px;
  padding:12px 18px;
  border-bottom:1px solid #e0d8cc;
  background:#f4efe6;
}
.tree-research-summary>div:first-child strong{
  display:block;
  margin-top:2px;
  color:#102a43;
  font:400 13px Georgia,serif;
}
.tree-research-summary-stats{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}
.tree-research-summary-stats span{
  padding:6px 8px;
  border:1px solid #ded3c4;
  border-radius:8px;
  background:#ffffff;
  color:#71685e;
  font-size:9px;
}
.tree-research-summary-stats b{
  color:#102a43;
  font-weight:600;
}
.tree-research-summary>small{
  color:#807568;
  font-size:8.5px;
  max-width:210px;
}

.tree-branch-meta{
  fill:#8b7e6d;
  font-size:7.5px;
  letter-spacing:.07em;
  text-transform:uppercase;
}
.tree-person-group.has-research-gaps .tree-node{
  stroke-dasharray:4 3;
}
.tree-research-badge rect{
  fill:#f2e8d8;
  stroke:#cdbb9f;
  stroke-width:1;
}
.tree-research-badge text{
  fill:#715d40;
  font-size:7.5px;
  font-weight:600;
}

.tree-selected-branches{
  margin-top:12px;
  padding:10px 12px;
  border:1px solid #e1d8cb;
  border-radius:10px;
  background:#ffffff;
}
.tree-selected-branches>span{
  display:block;
  margin-bottom:6px;
  color:#83786b;
  font-size:8px;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.tree-selected-branches>div{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.tree-selected-branches>div span,
.tree-research-branches>div span{
  display:inline-flex;
  padding:5px 7px;
  border:1px solid #d8cdbd;
  border-radius:999px;
  background:#f6f0e7;
  color:#102a43;
  font-size:8.5px;
}
.tree-selected-branches>small{
  display:block;
  margin-top:7px;
  color:#887d70;
  font-size:8px;
}

.tree-research-record{
  display:grid;
  gap:12px;
}
.tree-research-overview{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:14px;
  padding:12px;
  border:1px solid #ded5c8;
  border-radius:10px;
  background:#ffffff;
}
.tree-research-overview strong{
  display:block;
  margin-top:3px;
  color:#102a43;
  font:400 14px Georgia,serif;
}
.tree-research-overview>small{
  color:#817669;
  font-size:8px;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.tree-research-checklist{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
  gap:8px;
}
.tree-research-gap{
  display:grid;
  gap:3px;
  padding:10px 11px;
  border:1px dashed #cdbba1;
  border-radius:9px;
  background:#fbf5eb;
}
.tree-research-gap span{
  color:#927a58;
  font-size:8px;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.tree-research-gap strong{
  color:#5d4a32;
  font:400 11px Georgia,serif;
}
.tree-research-gap small{
  color:#837568;
  font-size:8px;
}
.tree-research-ok{
  padding:11px 12px;
  border:1px solid #d9d3c8;
  border-radius:9px;
  background:#f8f5ef;
  color:#59685a;
  font-size:9px;
}
.tree-research-branches{
  padding:11px 12px;
  border-top:1px solid #e3dbcf;
}
.tree-research-branches>div{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:7px;
}
.tree-research-branches p{
  margin:8px 0 0;
  color:#80766a;
  font-size:8.5px;
  line-height:1.45;
}

@media(max-width:900px){
  .tree-research-summary{
    grid-template-columns:1fr;
    align-items:start;
  }
  .tree-research-summary>small{
    max-width:none;
  }
}

/* v1.3.0 — Timeline & provenance */
.tree-timeline-intro{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:16px;
  padding:2px 0 14px;
}
.tree-timeline-intro strong{
  display:block;
  margin-top:3px;
  color:#102a43;
  font:400 14px Georgia,serif;
}
.tree-timeline-intro small{
  max-width:300px;
  color:#82786c;
  font-size:8.5px;
  text-align:right;
}

.tree-life-timeline{
  position:relative;
  display:grid;
  gap:0;
}
.tree-life-timeline::before{
  content:"";
  position:absolute;
  left:92px;
  top:8px;
  bottom:8px;
  width:1px;
  background:#d8cfc1;
}
.tree-timeline-item{
  position:relative;
  display:grid;
  grid-template-columns:72px 20px minmax(0,1fr);
  gap:10px;
  min-height:64px;
  padding:0 0 12px;
}
.tree-timeline-date{
  padding-top:10px;
  color:#7e7468;
  font-size:9px;
  text-align:right;
  font-variant-numeric:tabular-nums;
}
.tree-timeline-marker{
  position:relative;
}
.tree-timeline-marker::before{
  content:"";
  position:absolute;
  top:13px;
  left:4px;
  width:9px;
  height:9px;
  border:2px solid #a99b88;
  border-radius:50%;
  background:#ffffff;
  z-index:1;
}
.tree-timeline-card{
  display:grid;
  gap:3px;
  padding:9px 11px;
  border:1px solid #e0d7ca;
  border-radius:9px;
  background:#ffffff;
}
.tree-timeline-card>span{
  color:#897d70;
  font-size:8px;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.tree-timeline-card>strong{
  color:#102a43;
  font:400 12px Georgia,serif;
}
.tree-timeline-card>p{
  margin:0;
  color:#746b61;
  font-size:9px;
}
.tree-timeline-meta{
  display:flex;
  flex-wrap:wrap;
  gap:5px 10px;
  margin-top:2px;
}
.tree-timeline-meta small{
  color:#8a7f72;
  font-size:8px;
}
.tree-timeline-item.life .tree-timeline-marker::before{
  border-color:#102a43;
  background:#102a43;
}
.tree-timeline-item.place .tree-timeline-card{
  background:#fbf7f0;
}
.tree-timeline-item.context .tree-timeline-marker::before{
  border-style:dashed;
  background:#f5efe5;
}
.tree-timeline-item.context .tree-timeline-card{
  border-style:dashed;
  background:#f7f2ea;
  opacity:.9;
}
.tree-timeline-item.context .tree-timeline-card>span::after{
  content:" · CONTEXT ONLY";
  color:#9a8d7f;
}

.tree-provenance-summary{
  grid-column:1/-1;
  display:grid;
  grid-template-columns:repeat(3,minmax(90px,.5fr)) minmax(190px,1.5fr);
  gap:8px;
  margin-bottom:4px;
}
.tree-provenance-summary>div{
  padding:9px 10px;
  border:1px solid #e0d7ca;
  border-radius:9px;
  background:#f8f4ed;
}
.tree-provenance-summary span{
  display:block;
  color:#887d70;
  font-size:8px;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.tree-provenance-summary strong{
  display:block;
  margin-top:3px;
  color:#102a43;
  font:400 12px Georgia,serif;
}
.tree-source-cards{
  grid-column:1/-1;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
  gap:8px;
}
.tree-source-cards article{
  display:grid;
  gap:3px;
  padding:10px 11px;
  border:1px solid #e0d7ca;
  border-radius:9px;
  background:#ffffff;
}
.tree-source-cards article span{
  color:#8c8174;
  font-size:8px;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.tree-source-cards article strong{
  color:#102a43;
  font:400 12px Georgia,serif;
}

@media(max-width:760px){
  .tree-timeline-intro{
    align-items:flex-start;
    flex-direction:column;
  }
  .tree-timeline-intro small{
    max-width:none;
    text-align:left;
  }
  .tree-life-timeline::before{
    left:8px;
  }
  .tree-timeline-item{
    grid-template-columns:18px minmax(0,1fr);
    gap:8px;
  }
  .tree-timeline-date{
    grid-column:2;
    grid-row:1;
    padding-top:0;
    text-align:left;
  }
  .tree-timeline-marker{
    grid-column:1;
    grid-row:1/3;
  }
  .tree-timeline-marker::before{
    left:4px;
    top:3px;
  }
  .tree-timeline-card{
    grid-column:2;
    grid-row:2;
  }
  .tree-provenance-summary{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .tree-provenance-summary .wide{
    grid-column:1/-1;
  }
}

/* v1.4.0 — Family Tree designer pass */

/* Overall module */
#view-tree .page-head{
  padding-bottom:18px;
}
#view-tree .page-head h1{
  letter-spacing:-.025em;
}
#view-tree .modern-panel{
  border-color:#ddd4c7;
  box-shadow:0 18px 48px rgba(49,42,33,.045);
}
.tree-panel-head{
  align-items:flex-end;
  padding:24px 28px 20px;
}
.tree-panel-head h2{
  margin-top:3px;
  margin-bottom:5px;
}
.tree-panel-head p{
  max-width:720px;
}
.tree-legend{
  display:flex;
  align-items:center;
  gap:16px;
  white-space:nowrap;
}
.tree-legend span{
  display:inline-flex;
  align-items:center;
  gap:7px;
  font-size:9px;
  color:#7b7267;
}
.legend-line{
  display:inline-block;
  width:28px;
  height:0;
  border-top:1.5px solid #8c8377;
}
.legend-line.dashed{
  border-top-style:dashed;
}

/* Branch row becomes a quiet filter strip */
.tree-branch-controls{
  padding:10px 18px!important;
  background:#faf7f1;
  border-top:1px solid #ebe3d8;
  border-bottom:1px solid #e2d9cc;
}
.tree-control-label{
  font-size:8px!important;
  letter-spacing:.13em!important;
  color:#8a7f72!important;
}
.tree-branch-chips button{
  min-height:31px;
  padding:0 10px;
  border-radius:999px;
}

/* Primary toolbar */
.tree-toolbar{
  position:relative;
  display:grid;
  grid-template-columns:minmax(260px,1fr) auto auto;
  gap:10px;
  align-items:center;
  padding:12px 16px;
  background:#ffffff;
  border-top:0;
  border-bottom:1px solid #ddd5c9;
}
.tree-search{
  width:100%;
  max-width:520px;
}
.tree-search input{
  min-height:40px;
  border-radius:9px;
  background:#fdfbf7;
}
.tree-primary-actions{
  margin-left:0;
  flex-wrap:nowrap;
}
.tree-primary-actions button{
  min-height:40px;
  border-radius:9px;
}
.tree-view-controls{
  border-radius:9px;
}
.tree-view-controls button,
.tree-view-controls output{
  min-height:40px;
}
.tree-tools-toggle.is-active{
  background:#102a43!important;
  color:#fff!important;
}

/* Advanced tools drawer */
.tree-tools-panel{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(420px,1.15fr);
  gap:18px;
  padding:12px 16px 14px;
  border-bottom:1px solid #ddd5c9;
  background:#f6f1e8;
}
.tree-tools-group{
  min-width:0;
}
.tree-tools-label{
  display:block;
  margin-bottom:7px;
  color:#85796d;
  font-size:8px;
  text-transform:uppercase;
  letter-spacing:.12em;
}
.tree-tools-actions{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.tree-tools-actions button{
  min-height:34px;
  padding:0 10px;
  border:1px solid #d6cbbb;
  border-radius:8px;
  background:#ffffff;
  color:#102a43;
  font:inherit;
  font-size:9px;
  cursor:pointer;
}
.tree-tools-actions button:hover{
  background:#eee7dc;
}
.tree-tools-actions button.is-active{
  background:#102a43;
  border-color:#102a43;
  color:#fff;
}
.tree-path-tool{
  padding-left:18px;
  border-left:1px solid #ded4c6;
}
.tree-path-fields{
  align-items:center;
}
.tree-path-fields select{
  min-width:150px;
  min-height:34px;
  background:#ffffff;
}
.tree-path-fields button{
  min-height:34px;
}
.tree-path-result{
  margin-top:8px;
  padding:8px 10px;
  border:1px solid #ddd2c3;
  border-radius:8px;
  background:#ffffff;
  text-align:left;
}

/* Context layers should read as secondary information */
.tree-research-summary,
.tree-context-strip{
  border-bottom:1px solid #e1d8cc;
}
.tree-research-summary{
  background:#f5efe5;
}
.tree-context-strip{
  background:#faf6ef;
}
.tree-context-chip{
  min-width:132px;
  padding:7px 9px;
  box-shadow:none;
}
.tree-context-detail{
  box-shadow:none;
}

/* Canvas */
#treeViewport{
  min-height:510px;
  max-height:720px;
  overflow:auto;
  outline:none;
  cursor:grab;
  overscroll-behavior:contain;
  scrollbar-color:#b2aa9e transparent;
  background:
    linear-gradient(to bottom,rgba(255,255,255,.74),rgba(255,255,255,0) 130px),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 204px,
      rgba(151,139,123,.08) 205px
    ),
    #faf7f0;
}
#treeViewport.is-panning{
  cursor:grabbing;
  user-select:none;
}
#treeViewport:focus-visible{
  box-shadow:inset 0 0 0 2px rgba(16,42,67,.28);
}
#treeStage{
  padding:2px 0 8px;
}
.tree-generation-band{
  opacity:.2;
}
.tree-generation-guide{
  opacity:.45;
}
.tree-generation-label{
  font-size:8px;
  letter-spacing:.14em;
}
.tree-node{
  stroke:#d6cdc0;
  filter:drop-shadow(0 7px 13px rgba(43,36,29,.045));
}
.tree-person-group:hover .tree-node{
  filter:drop-shadow(0 10px 18px rgba(43,36,29,.075));
}
.tree-person-group.is-selected .tree-node{
  stroke-width:1.9;
  filter:drop-shadow(0 11px 20px rgba(14,53,88,.10));
}
.tree-name{
  font-size:14px;
}
.tree-meta{
  font-size:9.8px;
}
.tree-evidence-meta{
  font-size:8px;
}
.tree-line,
.tree-partner-line{
  stroke:#91887c;
}

/* Selected person becomes a proper dossier */
.tree-selected{
  padding:0;
  background:#ffffff;
}
.tree-selected-head{
  padding:22px 26px 18px;
  border-bottom:1px solid #e4dbcf;
}
.tree-selected-identity{
  align-items:center;
}
.tree-selected-avatar{
  flex-basis:64px;
  width:64px;
  height:64px;
}
#treeSelectedName{
  display:block;
  margin-top:3px;
  font-size:20px;
  line-height:1.1;
}
#treeSelectedSummary{
  margin-top:6px;
  max-width:720px;
}
.tree-profile-link{
  align-self:center;
  border-radius:8px;
}
.tree-selected-grid{
  margin:0;
  padding:12px 26px;
  grid-template-columns:repeat(3,minmax(0,1fr));
  background:#faf7f1;
  border-bottom:1px solid #e4dbcf;
}
.tree-selected-stat{
  padding:0 12px 0 0;
  border:0;
  border-right:1px solid #dfd6ca;
  border-radius:0;
  background:transparent;
}
.tree-selected-stat:last-child{
  border-right:0;
}
.tree-selected-branches{
  margin:0;
  padding:10px 26px;
  border:0;
  border-bottom:1px solid #e4dbcf;
  border-radius:0;
  background:#fdfbf7;
}
.tree-record-tabs{
  margin:0;
  padding:0 18px;
  background:#ffffff;
  scrollbar-width:thin;
}
.tree-record-tabs button{
  padding:12px 10px 10px;
}
.tree-record-body{
  padding:18px 26px 24px;
  background:#ffffff;
}
.tree-selected-history{
  margin:0;
  padding:16px 26px 22px;
  border-top:1px solid #e4dbcf;
  background:#faf6ef;
}

/* Consistent internal cards */
.tree-fact-row,
.tree-record-list article,
.tree-media-card,
.tree-timeline-card,
.tree-research-overview,
.tree-research-gap,
.tree-person-history-item{
  box-shadow:none!important;
}
.tree-facts-list,
.tree-media-card,
.tree-timeline-card,
.tree-research-overview{
  border-color:#ded5c8;
}

/* Responsive */
@media(max-width:1050px){
  .tree-toolbar{
    grid-template-columns:1fr auto;
  }
  .tree-search{
    grid-column:1/-1;
    max-width:none;
  }
  .tree-tools-panel{
    grid-template-columns:1fr;
  }
  .tree-path-tool{
    padding-left:0;
    padding-top:12px;
    border-left:0;
    border-top:1px solid #ded4c6;
  }
}
@media(max-width:760px){
  .tree-panel-head{
    align-items:flex-start;
    padding:20px 18px 16px;
  }
  .tree-legend{
    margin-top:8px;
  }
  .tree-toolbar{
    display:flex;
    flex-direction:column;
    align-items:stretch;
  }
  .tree-primary-actions,
  .tree-view-controls{
    width:100%;
  }
  .tree-primary-actions button{
    flex:1 1 0;
  }
  .tree-view-controls{
    display:grid;
    grid-template-columns:auto 44px 58px 44px auto;
  }
  .tree-tools-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
  }
  .tree-path-fields{
    display:grid;
    grid-template-columns:1fr;
  }
  .tree-path-arrow{
    display:none;
  }
  .tree-path-fields select,
  .tree-path-fields button{
    width:100%;
    min-width:0;
  }
  #treeViewport{
    min-height:440px;
    max-height:620px;
  }
  .tree-selected-head{
    padding:18px;
  }
  .tree-selected-grid{
    padding:12px 18px;
    grid-template-columns:1fr;
    gap:9px;
  }
  .tree-selected-stat{
    padding:0 0 9px;
    border-right:0;
    border-bottom:1px solid #e3dbcf;
  }
  .tree-selected-stat:last-child{
    padding-bottom:0;
    border-bottom:0;
  }
  .tree-selected-branches{
    padding:10px 18px;
  }
  .tree-record-tabs{
    padding:0 10px;
  }
  .tree-record-body,
  .tree-selected-history{
    padding-left:18px;
    padding-right:18px;
  }
}

/* v1.4.1 — Gap consistency */
.tree-research-gap span{
  font-weight:600;
}
.tree-research-badge{
  pointer-events:none;
}

/* v1.4.2 — Family Tree interaction stability */
.tree-person-group{
  cursor:pointer!important;
}
.tree-person-group *{
  cursor:pointer;
}
#treeViewport .tree-person-group{
  pointer-events:auto;
}
#treeViewport.is-panning .tree-person-group,
#treeViewport.is-panning .tree-person-group *{
  cursor:grabbing!important;
}

/* v1.4.3 — canonical person-detail synchronization */
.tree-selected-stat strong{
  transition:color .12s ease;
}

/* v1.4.4 — Timeline spacing polish */

/* Keep the year immediately beside the chronology spine. */
.tree-life-timeline::before{
  left:86px;
}

.tree-timeline-item{
  grid-template-columns:68px 18px minmax(0,1fr);
  gap:8px;
}

.tree-timeline-date{
  padding-top:8px;
  padding-right:1px;
  text-align:right;
  font-size:9px;
  line-height:1;
}

/* Event point is approximately 60% of the previous visual diameter. */
.tree-timeline-marker::before{
  top:9px;
  left:5.5px;
  width:5.5px;
  height:5.5px;
  border-width:1.25px;
}

/* Life markers stay solid navy but no longer dominate the chronology. */
.tree-timeline-item.life .tree-timeline-marker::before{
  border-width:1.25px;
}

/* Slightly tighten chronology cards against the date/spine column. */
.tree-timeline-card{
  margin-left:1px;
}

@media(max-width:760px){
  .tree-life-timeline::before{
    left:7px;
  }
  .tree-timeline-item{
    grid-template-columns:16px minmax(0,1fr);
    gap:7px;
  }
  .tree-timeline-date{
    grid-column:2;
    padding:0 0 2px;
    text-align:left;
  }
  .tree-timeline-marker::before{
    left:4px;
    top:2px;
    width:5.5px;
    height:5.5px;
  }
}

/* v1.4.5 — Timeline year/marker alignment */

/*
  Desktop chronology:
  [year]  [vertical line + point]  [record card]
*/
.tree-life-timeline::before{
  left:124px;
}

.tree-timeline-item{
  grid-template-columns:105px 38px minmax(0,1fr);
  gap:0;
}

.tree-timeline-date{
  padding-top:7px;
  padding-right:12px;
  text-align:right;
  color:#74695d;
  font-size:11.25px; /* ~25% larger than 9px */
  line-height:1;
  font-variant-numeric:tabular-nums;
}

.tree-timeline-marker{
  position:relative;
}

/* Centre the dot exactly over the 1px timeline spine at x=124px. */
.tree-timeline-marker::before{
  top:7px;
  left:14px;
  width:5.5px;
  height:5.5px;
  border-width:1.25px;
  transform:translateX(-50%);
  box-sizing:border-box;
}

.tree-timeline-card{
  margin-left:0;
}

/* Mobile returns to the compact stacked chronology. */
@media(max-width:760px){
  .tree-life-timeline::before{
    left:7px;
  }
  .tree-timeline-item{
    grid-template-columns:16px minmax(0,1fr);
    gap:7px;
  }
  .tree-timeline-date{
    grid-column:2;
    grid-row:1;
    padding:0 0 2px;
    text-align:left;
    font-size:11px;
  }
  .tree-timeline-marker{
    grid-column:1;
    grid-row:1/3;
  }
  .tree-timeline-marker::before{
    left:4px;
    top:2px;
    transform:none;
  }
  .tree-timeline-card{
    grid-column:2;
    grid-row:2;
  }
}

/* v1.4.6 — Correct timeline grid placement
   DOM order is marker, date, card.
   Explicit placement prevents CSS grid auto-flow from putting marker in col 1.
*/

.tree-life-timeline::before{
  left:124px;
}

.tree-timeline-item{
  grid-template-columns:105px 38px minmax(0,1fr);
  column-gap:0;
}

/* Year: clearly left of spine */
.tree-timeline-date{
  grid-column:1;
  grid-row:1;
  padding-top:7px;
  padding-right:12px;
  text-align:right;
  font-size:11.25px;
  line-height:1;
}

/* Marker column contains the spine */
.tree-timeline-marker{
  grid-column:2;
  grid-row:1;
  position:relative;
}

/* Col 2 begins at x=105px. Spine is x=124px, so marker centre = 19px into col 2. */
.tree-timeline-marker::before{
  top:7px;
  left:19px;
  width:5.5px;
  height:5.5px;
  border-width:1.25px;
  transform:translateX(-50%);
  box-sizing:border-box;
}

/* Record card sits to the right of the spine */
.tree-timeline-card{
  grid-column:3;
  grid-row:1;
  margin-left:0;
}

/* Mobile stays stacked and resets explicit desktop placement. */
@media(max-width:760px){
  .tree-life-timeline::before{
    left:7px;
  }

  .tree-timeline-item{
    grid-template-columns:16px minmax(0,1fr);
    gap:7px;
  }

  .tree-timeline-date{
    grid-column:2;
    grid-row:1;
    padding:0 0 2px;
    text-align:left;
    font-size:11px;
  }

  .tree-timeline-marker{
    grid-column:1;
    grid-row:1/3;
  }

  .tree-timeline-marker::before{
    left:4px;
    top:2px;
    transform:none;
  }

  .tree-timeline-card{
    grid-column:2;
    grid-row:2;
  }
}


/* 0.8.5 — Finished Family Tree cards
   Richer presentation using archive facts only; genealogy semantics unchanged. */

.tree-node{
  fill:#fffefb;
  stroke:#d6cbbb;
  stroke-width:1.15;
  filter:drop-shadow(0 8px 16px rgba(43,36,29,.055));
}
.tree-person-group:hover .tree-node{
  stroke:#a89a87;
  filter:drop-shadow(0 12px 22px rgba(43,36,29,.085));
}
.tree-person-group.is-selected .tree-node{
  stroke:#0e3558;
  stroke-width:2;
  fill:#fffefb;
  filter:drop-shadow(0 14px 25px rgba(14,53,88,.12));
}
.tree-card-avatar-bg{
  fill:#f0e9dd;
  stroke:#ddd1c0;
  stroke-width:.8;
}
.tree-card-avatar-image{
  pointer-events:none;
}
.tree-card-initials{
  fill:#153653;
  font:500 13px Georgia,serif;
  pointer-events:none;
}
.tree-branch-meta{
  fill:#8b7d6c;
  font-size:7.4px;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.tree-person-group.show-branch-emphasis .tree-branch-meta{
  fill:#153653;
  font-weight:700;
}
.tree-name{
  fill:#102a43;
  font:600 14.5px Georgia,serif;
}
.tree-meta{
  fill:#786f64;
  font-size:9.4px;
}
.tree-card-summary{
  fill:#4f5960;
  font:10.2px Georgia,serif;
}
.tree-evidence-meta{
  fill:#877b6d;
  font-size:8.2px;
  letter-spacing:.01em;
}
.tree-research-badge rect{
  fill:#f4ead7;
  stroke:#cfb991;
}
.tree-research-badge text{
  fill:#745f3d;
}


/* 0.8.6 — Family Tree refinement
   Safe wrapped names + stable card hierarchy + clearer evidence footer. */

.tree-node{
  rx:14px;
}
.tree-name{
  fill:#102a43;
  font:600 13.8px Georgia,serif;
}
.tree-meta{
  fill:#786f64;
  font-size:9.1px;
}
.tree-card-summary{
  fill:#4f5960;
  font:9.6px Georgia,serif;
}
.tree-card-footer-line{
  stroke:#ece3d7;
  stroke-width:.8;
}
.tree-evidence-meta{
  fill:#877b6d;
  font-size:7.8px;
  letter-spacing:.01em;
}
.tree-research-badge text{
  font-size:7.5px;
}
.tree-person-group:focus{
  outline:none;
}
.tree-person-group:focus .tree-node{
  stroke:#0e3558;
  stroke-width:1.8;
}


/* 0.8.7 — Final Family Tree polish / freeze pass */

.tree-card-footer-line{
  shape-rendering:crispEdges;
}
.tree-branch-meta,
.tree-meta,
.tree-evidence-meta{
  pointer-events:none;
}
.tree-person-group[role="button"]{
  -webkit-tap-highlight-color:transparent;
}
.tree-person-group:focus-visible .tree-node{
  stroke:#0e3558;
  stroke-width:2;
  filter:drop-shadow(0 12px 22px rgba(14,53,88,.12));
}
.tree-generation-guide{
  opacity:.38;
}
#treeViewport{
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
#treeStage{
  transition:transform .14s ease;
}
@media(prefers-reduced-motion:reduce){
  #treeStage{
    transition:none;
  }
  .tree-node{
    transition:none;
  }
}
@media(max-width:760px){
  #treeViewport{
    min-height:420px;
  }
}


/* 0.8.8 — World Map first finish pass
   Map remains the hero; selected place lives inside the map stage.
   Compact archive cards sit directly beneath it. */

.map-archive-panel{
  overflow:hidden;
}
.map-panel-head{
  align-items:center;
}
.map-stage{
  position:relative;
  min-width:0;
  background:#e9e3d8;
}
.map-stage .map{
  height:620px;
}
.map-place-people{
  position:absolute;
  top:14px;
  right:14px;
  bottom:14px;
  z-index:500;
  width:min(330px,calc(100% - 28px));
  padding:18px;
  border:1px solid rgba(213,202,186,.96);
  border-radius:15px;
  background:rgba(255,253,248,.97);
  box-shadow:0 18px 44px rgba(32,46,57,.16);
  overflow:auto;
  backdrop-filter:blur(8px);
}
.map-place-people-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}
.map-place-people-head h3{
  font-family:Georgia,serif;
  color:var(--ink);
  font-size:28px;
  font-weight:400;
  line-height:1.05;
  margin:5px 0 4px;
}
.map-place-people-head p{
  margin:0;
  color:var(--muted);
  font-size:11px;
  line-height:1.4;
}
.map-place-people .place-clear{
  flex:0 0 auto;
  width:32px;
  height:32px;
  border:1px solid var(--line);
  border-radius:9px;
  background:var(--panel);
  color:var(--ink);
  font-size:18px;
  cursor:pointer;
}
.map-place-notes{
  margin:13px 0 0;
  color:#5f5a53;
  font-family:Georgia,serif;
  font-size:13px;
  line-height:1.5;
}
.map-place-route-summary{
  display:flex;
  gap:8px;
  margin-top:14px;
  padding:10px 0;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}
.map-place-route-summary span{
  flex:1;
  color:var(--muted);
  font-size:10px;
}
.map-place-route-summary b{
  color:var(--ink);
  font-size:13px;
}
.map-place-people-section{
  margin-top:14px;
}
.map-place-section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.16em;
  font-size:8px;
}
.map-place-section-head b{
  display:grid;
  min-width:22px;
  height:22px;
  place-items:center;
  border-radius:999px;
  background:#f0e9de;
  color:var(--ink);
  font-size:10px;
  letter-spacing:0;
}
.map-place-people-list{
  display:grid;
  grid-template-columns:1fr;
  gap:6px;
  margin-top:8px;
}
.map-person-row{
  display:grid;
  grid-template-columns:1fr auto;
  align-items:center;
  gap:10px;
  padding:9px 10px;
  border:1px solid var(--line);
  border-radius:9px;
  background:var(--panel);
  text-align:left;
  cursor:pointer;
  color:var(--text);
}
.map-person-row strong{
  min-width:0;
  font-family:Georgia,serif;
  color:var(--ink);
  font-weight:400;
  font-size:14px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.map-person-row span{
  color:var(--muted);
  font-size:9px;
  white-space:nowrap;
}
.map-place-people-actions{
  margin-top:14px;
}
.map-place-people-actions .primary-action{
  width:100%;
  padding:11px 14px;
  font-size:13px;
}
.place-cards{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  padding:12px 14px 14px;
  background:#fbf8f1;
}
.place-card{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto 18px;
  align-items:end;
  gap:8px;
  min-height:88px;
  padding:11px 12px;
  border:1px solid var(--line);
  border-radius:11px;
  background:var(--panel);
  color:inherit;
  text-align:left;
  cursor:pointer;
  transition:border-color .15s ease,background .15s ease,transform .15s ease;
}
.place-card:hover{
  border-color:#b9ac99;
  background:#fffaf1;
}
.place-card.is-active{
  border-color:#173e62;
  box-shadow:inset 0 0 0 1px #173e62;
}
.place-card-main{
  min-width:0;
  align-self:start;
}
.place-card strong{
  display:block;
  overflow:hidden;
  color:var(--ink);
  font-family:Georgia,serif;
  font-size:15px;
  font-weight:400;
  line-height:1.15;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.place-card-main>span{
  display:block;
  margin-top:3px;
  overflow:hidden;
  color:var(--muted);
  font-size:10px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.place-card-coordinates{
  display:block;
  margin-top:4px;
  color:#988d7e;
  font-size:8.5px;
  white-space:nowrap;
}
.place-card-stats{
  display:flex;
  align-items:flex-end;
  gap:7px;
  white-space:nowrap;
}
.place-card-stats small{
  color:var(--muted);
  font-size:8.5px;
}
.place-card-arrow{
  align-self:end;
  color:var(--ink);
  font-size:13px;
}
.place-card-empty{
  display:block;
  cursor:default;
}
@media(max-width:1100px){
  .place-cards{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}
@media(max-width:760px){
  .map-panel-head{
    align-items:flex-start;
  }
  .map-stage .map{
    height:500px;
  }
  .map-place-people{
    top:auto;
    left:10px;
    right:10px;
    bottom:10px;
    width:auto;
    max-height:72%;
  }
  .place-cards{
    grid-template-columns:1fr 1fr;
  }
  .place-card{
    min-height:82px;
  }
}
@media(max-width:480px){
  .place-cards{
    grid-template-columns:1fr;
  }
}


/* 0.8.9 — World Map refinement */

.map-place-people{
  scrollbar-width:thin;
  scrollbar-color:#c9beae transparent;
}
.map-place-people-head h3,
.map-place-people-head p,
.map-place-notes{
  overflow-wrap:anywhere;
}
.map-place-route-summary{
  align-items:center;
}
.place-card{
  min-width:0;
}
.place-card:focus-visible{
  outline:2px solid #173e62;
  outline-offset:2px;
}
.place-card.is-active{
  background:#fffaf0;
}
.place-card-stats{
  min-width:max-content;
}
.place-card-stats small{
  display:flex;
  align-items:baseline;
  gap:3px;
}
.place-card-stats b{
  color:var(--ink);
  font-weight:600;
}
.place-card-main,
.place-card-main strong,
.place-card-main span,
.place-card-coordinates{
  min-width:0;
}
.map-person-row:focus-visible,
.map-place-people .place-clear:focus-visible{
  outline:2px solid #173e62;
  outline-offset:2px;
}
@media(max-width:760px){
  .map-place-people{
    max-height:64%;
    padding:15px;
  }
  .map-place-people-head h3{
    font-size:24px;
  }
}


/* 0.8.10 — Final World Map freeze */

.map-stage .leaflet-interactive{
  transition:stroke-width .12s ease,fill-opacity .12s ease,opacity .12s ease;
}
@media(prefers-reduced-motion:reduce){
  .map-stage .leaflet-interactive{
    transition:none;
  }
}
.map-place-people{
  overscroll-behavior:contain;
}
.map-place-people-actions{
  position:sticky;
  bottom:-18px;
  padding-top:10px;
  padding-bottom:2px;
  background:linear-gradient(to bottom,rgba(255,253,248,0),rgba(255,253,248,.98) 28%);
}
.place-card.is-active .place-card-arrow{
  color:#173e62;
  font-weight:700;
}
.place-card.is-active strong{
  color:#0e3558;
}
@media(max-width:760px){
  .map-stage .map{
    min-height:460px;
  }
  .map-place-people-actions{
    bottom:-15px;
  }
}


/* 0.8.12 — History Inspector */
.history-panel-head{align-items:center}
.history-legend{display:flex;gap:14px;color:var(--muted);font-size:9px;white-space:nowrap}
.history-legend span{display:flex;gap:5px;align-items:center}
.history-legend span:before{content:"";width:14px;height:7px;border-radius:3px;background:#ded5c8;border:1px solid #c9bcaa}
.history-legend span+span:before{background:#fff9ef;border-color:#9f8769}
.history-stage{position:relative;min-height:250px}
.history-tracks{padding-bottom:12px}
.history-track{display:grid;grid-template-columns:150px minmax(0,1fr);border-top:1px solid var(--line);min-height:116px}
.history-label{padding:18px 16px;background:#fbf8f1}
.history-label span{display:block;color:var(--muted);font-size:8px;letter-spacing:.16em}
.history-label strong{display:block;margin-top:6px;font:400 15px Georgia,serif;color:var(--ink)}
.history-lane{position:relative;min-height:116px;background:#ffffff;overflow:hidden}
.history-period-block{position:absolute;top:18px;height:54px;padding:8px 10px;border-radius:8px;border:1px solid #d7cbb9;background:#eee7dc;overflow:hidden}
.history-period-block strong,.history-period-block span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.history-period-block strong{font:400 12px Georgia,serif;color:var(--ink)}
.history-period-block span{margin-top:4px;font-size:8px;color:var(--muted)}
.history-block{top:24px;height:68px;padding:9px 10px;border-radius:9px;border:1px solid #ccbda7;background:#fff9ef;color:inherit;text-align:left;overflow:hidden;cursor:pointer}
.history-block strong,.history-block span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.history-block strong{font:400 12px Georgia,serif;color:var(--ink)}
.history-block span{margin-top:5px;font-size:8px;color:var(--muted)}
.history-block:hover,.history-block.is-active{border-color:#173e62;background:#f8f3e9;box-shadow:inset 0 0 0 1px #173e62}
.history-block:focus-visible{outline:2px solid #173e62;outline-offset:2px}
.history-no-records{padding:22px;color:var(--muted);font-size:11px}
.history-inspector{position:absolute;top:12px;right:12px;z-index:20;width:min(380px,calc(100% - 24px));max-height:calc(100% - 24px);overflow:auto;padding:18px;border:1px solid #d6cabb;border-radius:15px;background:rgba(255,253,248,.985);box-shadow:0 18px 44px rgba(32,46,57,.14);backdrop-filter:blur(8px);overscroll-behavior:contain}
.history-inspector-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}
.history-inspector-head h3{margin:5px 0 4px;font:400 27px/1.08 Georgia,serif;color:var(--ink);overflow-wrap:anywhere}
.history-inspector-head p{margin:0;color:var(--muted);font-size:10px}
.history-inspector-summary{margin:14px 0 0;font:13px/1.5 Georgia,serif;color:#56514b}
.history-inspector-counts{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:14px 0;padding:10px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.history-inspector-counts span{font-size:9px;color:var(--muted)}
.history-inspector-counts b{color:var(--ink);font-size:13px}
.history-inspector-sections{display:grid;gap:16px}
.history-inspector-sections section{display:grid;gap:8px}
.history-inspector-section-head{display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:8px;letter-spacing:.13em;text-transform:uppercase}
.history-inspector-section-head b{display:grid;place-items:center;min-width:21px;height:21px;border-radius:999px;background:#efe8dd;color:var(--ink);font-size:9px;letter-spacing:0}
.history-link-list,.history-source-list{display:grid;gap:6px}
.history-link-list button,.history-source-list>div{display:grid;gap:2px;padding:9px 10px;border:1px solid var(--line);border-radius:9px;background:#ffffff;text-align:left;color:inherit}
.history-link-list button{cursor:pointer}
.history-link-list strong,.history-source-list strong{font:400 13px Georgia,serif;color:var(--ink)}
.history-link-list small,.history-source-list small{font-size:8.5px;color:var(--muted)}
.history-derived-section{padding:10px;border:1px dashed #d5c5ad;border-radius:10px;background:#fbf5ea}
.history-derived-note{margin:0;color:#766c60;font-size:9px;line-height:1.45}
.history-overlap-chips{display:flex;flex-wrap:wrap;gap:5px}
.history-overlap-chips span,.history-overlap-chips button{border:1px solid var(--line);border-radius:999px;background:#ffffff;padding:6px 8px;color:var(--ink);font-size:9px}
.history-overlap-chips button{cursor:pointer}
.history-overlap-chips .derived{border-style:dashed}
.history-relevance p{margin:0;color:#57524b;font:12px/1.5 Georgia,serif}
.history-genealogy-note{display:grid;gap:3px;padding:9px 10px;border-left:2px solid #9b8263;background:#fbf7ef}
.history-genealogy-note span{font-size:8px;color:var(--muted);text-transform:uppercase;letter-spacing:.12em}
.history-genealogy-note strong{font:400 12px/1.4 Georgia,serif;color:var(--ink)}
.history-media-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.history-media-card{overflow:hidden;border:1px solid var(--line);border-radius:9px;background:#fffdfa}
.history-media-card img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover}
.history-media-card span,.history-media-card strong{display:block;padding:7px;font-size:9px;color:var(--ink)}
.history-media-card.file{padding:10px}
.history-inspector-empty{padding:12px;border:1px dashed var(--line);border-radius:9px;color:var(--muted);font-size:10px}
@media(max-width:820px){
  .history-track{grid-template-columns:110px minmax(0,1fr)}
  .history-inspector{position:relative;top:auto;right:auto;width:auto;max-height:none;margin:10px 12px 14px}
}
@media(max-width:560px){
  .history-panel-head{align-items:flex-start}
  .history-legend{white-space:normal;flex-wrap:wrap}
  .history-track{display:block}
  .history-label{padding:10px 12px}
  .history-lane{min-height:108px;overflow-x:auto}
  .history-inspector-counts{grid-template-columns:1fr}
}


/* 0.8.13 — Historical Context Engine */
.history-context-engine-section{padding:10px;border:1px solid #d8ccba;border-radius:11px;background:#fbf8f1}
.history-context-people{display:grid;gap:6px}
.history-context-person{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 10px;align-items:center;padding:9px 10px;border:1px solid var(--line);border-radius:9px;background:#ffffff;color:inherit;text-align:left;cursor:pointer}
.history-context-person:hover{border-color:#ab9b85}
.history-context-person:focus-visible{outline:2px solid #173e62;outline-offset:2px}
.history-context-person-main{min-width:0}
.history-context-person-main strong,.history-context-person-main small{display:block}
.history-context-person-main strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:400 13px Georgia,serif;color:var(--ink)}
.history-context-person-main small{margin-top:2px;color:var(--muted);font-size:8px}
.history-context-levels{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:3px}
.context-level{display:inline-block;padding:3px 5px;border-radius:999px;border:1px solid #cfc4b5;background:#f5efe5;color:#655d54;font-size:7px;text-transform:uppercase;letter-spacing:.05em;white-space:nowrap}
.context-level.geographic{border-style:dashed;background:#f1eee7}
.context-level.documented{border-color:#173e62;background:#173e62;color:#fff}
.context-level.interpretation{border-color:#9a7a55;background:#fbf2e2;color:#765d40}
.history-context-person em{grid-column:1/-1;color:#867b6e;font-size:8px;font-style:normal}
@media(max-width:560px){
  .history-context-person{grid-template-columns:1fr}
  .history-context-levels{justify-content:flex-start}
}


/* 0.8.14 — Tree + People historical context integration */

/* The Tree remains genealogy-first. Context appears only after an event is selected. */
.tree-person-group.history-temporal .tree-node{
  stroke:#9e9488;
  stroke-width:1.8;
}
.tree-person-group.history-geographic .tree-node{
  stroke:#6f7f87;
  stroke-width:2;
  stroke-dasharray:4 2;
}
.tree-person-group.history-interpretation .tree-node{
  stroke:#98744f;
  stroke-width:2.2;
}
.tree-person-group.history-documented .tree-node{
  stroke:#173e62;
  stroke-width:3;
  filter:drop-shadow(0 12px 22px rgba(23,62,98,.14));
}
.tree-person-group.is-selected .tree-node{
  filter:drop-shadow(0 14px 25px rgba(14,53,88,.14));
}
.tree-context-detail-main{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.tree-context-open-history{
  flex:0 0 auto;
  border:1px solid var(--line);
  border-radius:999px;
  background:#ffffff;
  color:var(--ink);
  padding:7px 10px;
  font-size:9px;
  cursor:pointer;
}
.tree-context-impact{
  display:flex;
  flex-wrap:wrap;
  gap:6px 12px;
  margin-top:8px;
  padding:8px 0;
  border-top:1px solid var(--line);
}
.tree-context-impact span{
  color:var(--muted);
  font-size:9px;
}
.tree-context-impact b{color:var(--ink)}
.tree-context-impact small{
  flex-basis:100%;
  color:var(--muted);
  font-size:8px;
}
.tree-person-history-item.classified{
  align-items:center;
}
.tree-history-levels,
.person-history-context-levels{
  display:flex;
  flex-wrap:wrap;
  gap:4px;
}
.history-context-badge{
  display:inline-block;
  padding:3px 6px;
  border:1px solid #cfc4b5;
  border-radius:999px;
  background:#f5efe5;
  color:#655d54;
  font-size:7px;
  line-height:1;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.history-context-badge.geographic{
  border-style:dashed;
  background:#f1eee7;
}
.history-context-badge.documented{
  border-color:#173e62;
  background:#173e62;
  color:#fff;
}
.history-context-badge.interpretation{
  border-color:#9a7a55;
  background:#fbf2e2;
  color:#765d40;
}

/* People profile historical context */
#personHistory{
  display:grid;
  gap:7px;
}
.person-history-context{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:6px 10px;
  align-items:center;
  width:100%;
  padding:10px 11px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#ffffff;
  color:inherit;
  text-align:left;
  cursor:pointer;
}
.person-history-context:hover{
  border-color:#ad9d87;
  background:#fffaf1;
}
.person-history-context:focus-visible{
  outline:2px solid #173e62;
  outline-offset:2px;
}
.person-history-context-main{
  min-width:0;
}
.person-history-context-main strong,
.person-history-context-main small{
  display:block;
}
.person-history-context-main strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font:400 14px Georgia,serif;
  color:var(--ink);
}
.person-history-context-main small{
  margin-top:3px;
  color:var(--muted);
  font-size:9px;
}
.person-history-context em{
  grid-column:1/-1;
  color:#827768;
  font-size:8.5px;
  font-style:normal;
}
@media(max-width:640px){
  .tree-context-detail-main{display:block}
  .tree-context-open-history{margin-top:8px}
  .person-history-context{grid-template-columns:1fr}
  .person-history-context-levels{justify-content:flex-start}
}


/* 0.8.15 — History freeze + cross-surface polish */

.history-inspector:focus{
  outline:none;
}
.history-inspector:focus-visible{
  outline:2px solid #173e62;
  outline-offset:3px;
}
.history-inspector-sections section + section{
  padding-top:2px;
}
.history-source-list>div,
.history-link-list button,
.history-context-person{
  min-width:0;
}
.history-source-list strong,
.history-link-list strong,
.history-context-person-main strong{
  overflow-wrap:anywhere;
}
.history-block[aria-pressed="true"]{
  box-shadow:inset 0 0 0 1px #173e62,0 0 0 1px rgba(23,62,98,.06);
}
.history-inspector-counts span{
  min-width:0;
}
.history-inspector-counts b{
  margin-right:2px;
}
.history-context-badge{
  white-space:nowrap;
}
.tree-context-impact:empty{
  display:none;
}
.tree-context-open-history:focus-visible,
.person-history-context:focus-visible,
.tree-person-history-item:focus-visible{
  outline:2px solid #173e62;
  outline-offset:2px;
}
@media(max-width:820px){
  .history-inspector{
    scroll-margin-top:12px;
  }
  .history-inspector-counts{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:520px){
  .history-inspector-counts{
    grid-template-columns:1fr 1fr;
  }
  .history-context-levels,
  .person-history-context-levels,
  .tree-history-levels{
    gap:3px;
  }
}
@media(prefers-reduced-motion:reduce){
  .history-block,
  .history-inspector,
  .person-history-context,
  .tree-person-history-item{
    scroll-behavior:auto;
    transition:none;
  }
}


/* 0.9.2 — Navigable History canvas */
.history-navigator{
  margin-top:14px;
  padding-top:13px;
  border-top:1px solid var(--line);
}
.history-navigator-head{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:center;
}
.history-navigator-head>div:first-child{
  display:grid;
  gap:2px;
}
.history-navigator-head span{
  color:var(--muted);
  font-size:8px;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.history-navigator-head strong{
  font:400 14px Georgia,serif;
  color:var(--ink);
}
.history-zoom-controls{
  display:flex;
  gap:5px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.history-zoom-controls button{
  min-width:36px;
  min-height:34px;
  padding:6px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#ffffff;
  color:var(--ink);
  cursor:pointer;
  font-size:10px;
}
.history-zoom-controls button:hover{
  border-color:#9e8e78;
}
.history-range-shell{
  position:relative;
  height:34px;
  margin-top:8px;
}
.history-range-base,
.history-range-selection{
  position:absolute;
  top:15px;
  height:5px;
  border-radius:999px;
}
.history-range-base{
  left:0;right:0;
  background:#e8e0d4;
}
.history-range-selection{
  background:#173e62;
  pointer-events:none;
}
.history-range-input{
  position:absolute;
  inset:0;
  width:100%;
  margin:0;
  appearance:none;
  -webkit-appearance:none;
  background:transparent;
  pointer-events:none;
}
.history-range-input::-webkit-slider-thumb{
  appearance:none;
  -webkit-appearance:none;
  width:18px;height:18px;
  border:3px solid #fffdfa;
  border-radius:50%;
  background:#173e62;
  box-shadow:0 0 0 1px #173e62;
  pointer-events:auto;
  cursor:ew-resize;
}
.history-range-input::-moz-range-thumb{
  width:13px;height:13px;
  border:3px solid #fffdfa;
  border-radius:50%;
  background:#173e62;
  box-shadow:0 0 0 1px #173e62;
  pointer-events:auto;
  cursor:ew-resize;
}
.history-range-input::-moz-range-track{background:transparent}
.history-range-extents{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:10px;
  align-items:center;
  color:var(--muted);
  font-size:8px;
}
.history-range-extents small{
  text-align:center;
  font-size:8px;
}
.history-pan-surface{
  cursor:grab;
  touch-action:pan-y;
  user-select:none;
}
.history-pan-surface.is-panning{
  cursor:grabbing;
}
.pinned-tape.history-pan-surface{
  position:relative;
}
.life-row.is-outside label{
  opacity:.48;
}
.life-row label em{
  font-size:7px;
  font-style:normal;
  color:var(--muted);
}
.history-track{
  min-height:116px;
}
.history-label small{
  display:block;
  margin-top:10px;
  color:var(--muted);
  font-size:8px;
}
.history-track.lane-family .history-label{
  background:#f7f1e7;
}
.history-track.lane-family .history-lane{
  background:#fffaf1;
}
.history-block.lane-family{
  border-color:#9b7f5c;
  background:#f8eddb;
}
.history-block.lane-family strong{
  font-weight:600;
}
.history-track.lane-world .history-label{
  background:#f6f6f2;
}
.history-track.lane-world .history-lane{
  background:#fdfdfa;
}
.history-block.lane-world{
  background:#f7f6f1;
  border-color:#c8c4ba;
}
.history-block.lane-regional{
  background:#fff9ef;
}
.history-period-block{
  min-width:62px;
}
.history-block{
  min-width:58px;
}
@media(max-width:760px){
  .history-navigator-head{
    align-items:flex-start;
    flex-direction:column;
  }
  .history-zoom-controls{
    justify-content:flex-start;
  }
  .history-range-extents{
    grid-template-columns:auto auto;
  }
  .history-range-extents small{
    grid-column:1/-1;
    grid-row:2;
    text-align:left;
  }
}
@media(prefers-reduced-motion:reduce){
  .history-range-selection{transition:none}
}


/* 0.9.3 — Historical Timeline Refinement */
.history-range-ticks{
  position:absolute;
  inset:8px 0 8px;
  pointer-events:none;
}
.history-range-tick{
  position:absolute;
  top:6px;
  width:2px;
  height:13px;
  transform:translateX(-1px);
  background:#9b7f5c;
  opacity:.82;
  border-radius:2px;
}
.history-grid-line{
  position:absolute;
  top:0;
  bottom:0;
  width:1px;
  background:rgba(36,53,67,.07);
  pointer-events:none;
  z-index:0;
}
.history-grid-line i{
  position:absolute;
  top:3px;
  left:4px;
  color:rgba(74,82,88,.42);
  font-size:7px;
  font-style:normal;
  white-space:nowrap;
}
.history-lane{
  min-height:62px;
  transition:height .12s ease;
}
.history-track{
  min-height:0;
  align-items:stretch;
}
.history-label{
  min-height:62px;
}
.history-block,
.history-point,
.history-period-block{
  position:absolute;
  z-index:2;
  margin:0;
  box-sizing:border-box;
}
.history-block{
  height:34px;
  min-width:0;
  padding:5px 7px;
  border-radius:7px;
}
.history-block strong{
  font-size:10px;
  line-height:1.05;
}
.history-block span{
  margin-top:2px;
  font-size:7px;
}
.history-block.is-compact strong{
  font-size:8.5px;
}
.history-block.is-compact span{
  font-size:6.5px;
}
.history-period-block{
  height:34px;
  min-width:0;
  padding:5px 7px;
  border-radius:7px;
}
.history-period-block strong{
  font-size:10px;
  line-height:1.05;
}
.history-period-block span{
  margin-top:2px;
  font-size:7px;
}
.history-period-block.is-compact strong{
  font-size:8.5px;
}
.history-period-block.world-period{
  background:#f3f1eb;
  border-style:dashed;
}
.history-point{
  height:34px;
  min-width:0;
  padding:4px 5px 4px 12px;
  border:1px solid #ccbda7;
  border-radius:7px;
  background:#ffffff;
  color:inherit;
  text-align:left;
  cursor:pointer;
  overflow:hidden;
}
.history-point-pin{
  position:absolute;
  left:5px;
  top:4px;
  bottom:4px;
  width:2px;
  border-radius:2px;
  background:#9b7f5c;
}
.history-point strong,
.history-point small{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.history-point strong{
  color:var(--ink);
  font:400 9px/1.05 Georgia,serif;
}
.history-point small{
  margin-top:2px;
  color:var(--muted);
  font-size:6.5px;
}
.history-point.lane-family{
  border-color:#9b7f5c;
  background:#f8eddb;
}
.history-point.lane-family .history-point-pin{
  background:#173e62;
}
.history-point.is-active{
  border-color:#173e62;
  box-shadow:inset 0 0 0 1px #173e62;
}
.history-point:focus-visible{
  outline:2px solid #173e62;
  outline-offset:2px;
}
.documentary-marker{
  position:absolute;
  top:18px;
  width:9px;
  height:9px;
  margin-left:-4px;
  border:2px solid #fffdfa;
  border-radius:50%;
  background:#9b7f5c;
  box-shadow:0 0 0 1px #9b7f5c;
}
.life-row.documentary label em{
  color:#8a6d4c;
}
.history-range-extents small:after{
  content:" · double-click an event for a 50-year focus";
}
@media(max-width:760px){
  .history-block,
  .history-period-block,
  .history-point{
    height:32px;
  }
}
@media(prefers-reduced-motion:reduce){
  .history-lane{transition:none}
}


/* 0.9.4 — Final History visual polish */

.history-ruler-row{
  display:grid;
  grid-template-columns:138px minmax(0,1fr);
  min-height:38px;
  border-bottom:1px solid var(--line);
  background:#faf7f0;
}
.history-ruler-label{
  padding:8px 10px 7px 14px;
  border-right:1px solid var(--line);
}
.history-ruler-label span{
  display:block;
  color:var(--muted);
  font-size:7px;
  letter-spacing:.15em;
}
.history-ruler-label strong{
  display:block;
  margin-top:2px;
  color:var(--ink);
  font:400 10px Georgia,serif;
}
.history-ruler-wrap{
  position:relative;
  cursor:grab;
}
.history-ruler-wrap.is-panning{cursor:grabbing}
.history-ruler{
  position:absolute;
  inset:0;
}
.history-ruler span{
  position:absolute;
  top:11px;
  transform:translateX(-50%);
  color:#8c8276;
  font-size:8px;
  white-space:nowrap;
}
.history-ruler span:after{
  content:"";
  position:absolute;
  left:50%;
  top:13px;
  width:1px;
  height:10px;
  background:rgba(36,53,67,.12);
}

.history-track{
  grid-template-columns:138px minmax(0,1fr);
}
.history-label{
  padding:13px 11px 11px 14px;
}
.history-label strong{
  font-size:13px;
  line-height:1.12;
}
.history-label small{
  margin-top:7px;
  font-size:7px;
}

.history-grid-line{
  background:rgba(36,53,67,.055);
}

.history-focus-guide{
  position:absolute;
  top:0;
  bottom:0;
  z-index:1;
  pointer-events:none;
}
.history-focus-guide.point{
  width:1px;
  background:rgba(23,62,98,.32);
}
.history-focus-guide.range{
  background:rgba(23,62,98,.055);
  border-left:1px solid rgba(23,62,98,.24);
  border-right:1px solid rgba(23,62,98,.24);
}
.history-focus-guide.hidden{display:none}

.history-block,
.history-point,
.history-period-block{
  height:32px;
}
.history-block,
.history-period-block{
  padding:4px 6px;
}
.history-point{
  padding-top:3px;
  padding-bottom:3px;
}
.history-point strong,
.history-block strong,
.history-period-block strong{
  letter-spacing:-.01em;
}
.history-point small,
.history-block span,
.history-period-block span{
  opacity:.82;
}

.history-track.lane-family .history-lane{
  background:#fffaf2;
}
.history-track.lane-family .history-label{
  background:#f7f0e5;
}
.history-block.lane-family,
.history-point.lane-family{
  border-color:#9a7a55;
}
.history-block.lane-family.is-active,
.history-point.lane-family.is-active{
  border-color:#173e62;
}

.documentary-marker{
  top:16px;
  width:10px;
  height:10px;
}

.history-range-tick{
  height:11px;
  top:7px;
}
.history-range-selection{
  box-shadow:0 0 0 1px rgba(23,62,98,.04);
}

@media(max-width:820px){
  .history-ruler-row,
  .history-track{
    grid-template-columns:112px minmax(0,1fr);
  }
  .history-ruler-label,
  .history-label{
    padding-left:10px;
  }
}
@media(max-width:560px){
  .history-ruler-row{
    grid-template-columns:82px minmax(0,1fr);
  }
  .history-track{
    display:grid;
    grid-template-columns:82px minmax(0,1fr);
  }
  .history-label{
    padding:9px 7px;
  }
  .history-label strong{
    font-size:11px;
  }
}


/* 0.9.5 — Place dossier sources & documents */
.map-place-documents-section,.map-place-media-section{padding-top:13px;margin-top:13px;border-top:1px solid var(--line)}
.map-place-documents-list{display:grid;gap:7px;margin-top:8px}
.map-place-document{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;align-items:center;padding:9px 10px;border:1px solid var(--line);border-radius:10px;background:#fffdfa}
.map-place-document>div{min-width:0}.map-place-document span,.map-place-document strong,.map-place-document small{display:block}
.map-place-document span{color:var(--muted);font-size:7px;letter-spacing:.09em;text-transform:uppercase}
.map-place-document strong{margin-top:2px;color:var(--ink);font:400 12px/1.2 Georgia,serif;overflow-wrap:anywhere}
.map-place-document small{margin-top:3px;color:var(--muted);font-size:8px;line-height:1.35}
.map-place-document>a{border:1px solid var(--line);border-radius:999px;padding:6px 8px;color:var(--ink);text-decoration:none;font-size:8px;white-space:nowrap}
.map-place-document>a:hover{border-color:#8f7b61}
.map-place-media-list{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:8px}
.map-place-media-card{min-width:0;overflow:hidden;border:1px solid var(--line);border-radius:10px;background:#ffffff;color:inherit;text-decoration:none}
.map-place-media-card.image img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover}
.map-place-media-card>span:not(.map-place-file-icon){display:block;padding:7px 8px}
.map-place-media-card strong,.map-place-media-card small{display:block;overflow-wrap:anywhere}
.map-place-media-card strong{color:var(--ink);font:400 10px/1.2 Georgia,serif}
.map-place-media-card small{margin-top:2px;color:var(--muted);font-size:7px}
.map-place-media-card.file{display:flex;align-items:center;gap:8px;padding:9px}
.map-place-file-icon{display:grid;place-items:center;flex:0 0 34px;height:38px;border-radius:7px;background:#efe8dd;color:#6d6255;font-size:7px;letter-spacing:.08em}
.map-place-route-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:560px){.map-place-media-list{grid-template-columns:1fr}.map-place-route-summary{grid-template-columns:1fr 1fr}}


/* 0.9.8 — Brighter Map Pin Chroma */
:root{
  --map-people:#0e63d8;
  --map-people-glow:rgba(14,99,216,.22);
  --map-documents:#d78210;
  --map-documents-glow:rgba(215,130,16,.18);
  --map-history:#1f9b62;
  --map-history-glow:rgba(31,155,98,.18);
  --map-media:#cf4f78;
  --map-media-glow:rgba(207,79,120,.18);
  --map-research:#7a49dc;
  --map-research-glow:rgba(122,73,220,.18);
  --map-repository:#5d748a;
  --map-repository-glow:rgba(93,116,138,.18);
}
.map-evidence-legend{
  display:flex;
  flex-wrap:wrap;
  gap:7px 14px;
}
.map-evidence-legend span{font-size:8px;white-space:nowrap}
.map-evidence-legend .legend-people{color:var(--map-people)}
.map-evidence-legend .legend-documents{color:var(--map-documents)}
.map-evidence-legend .legend-history{color:var(--map-history)}
.map-evidence-legend .legend-media{color:var(--map-media)}
.map-evidence-legend .legend-research{color:var(--map-research)}
.map-evidence-legend .legend-repository{color:var(--map-repository)}

.map-evidence-toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  padding:10px 14px;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  background:#fbf8f1;
}
.map-evidence-filter{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:31px;
  padding:5px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#ffffff;
  color:var(--muted);
  font-size:8px;
  cursor:pointer;
}
.map-evidence-filter.is-active{
  color:var(--ink);
  border-color:#9f907e;
  box-shadow:inset 0 0 0 1px rgba(16,47,78,.05);
}
.map-filter-dot,.map-filter-ring{
  display:inline-block;
  width:9px;height:9px;
  border-radius:50%;
}
.map-filter-dot.people{background:var(--map-people)}
.map-filter-ring{border:1.5px solid currentColor;background:transparent}
.map-filter-ring.documents{color:var(--map-documents)}
.map-filter-ring.history{color:var(--map-history)}
.map-filter-ring.media{color:var(--map-media)}
.map-filter-ring.research{color:var(--map-research);border-style:dashed}
.map-filter-ring.repository{color:var(--map-repository);border-radius:2px}

.archive-place-marker-wrap{
  background:transparent!important;
  border:0!important;
}
.archive-place-marker{
  position:relative;
  width:var(--marker-size);
  height:var(--marker-size);
  filter:drop-shadow(0 4px 10px rgba(16,47,78,.12));
}
.place-evidence-core,
.place-evidence-ring{
  position:absolute;
  left:50%;top:50%;
  transform:translate(-50%,-50%);
  box-sizing:border-box;
}
.place-evidence-core{
  width:12px;height:12px;
  border-radius:50%;
  background:rgba(255,255,255,.96);
  border:1px solid rgba(14,99,216,.32);
  box-shadow:0 0 0 1px rgba(255,255,255,.92);
  z-index:10;
}
.archive-place-marker.has-people .place-evidence-core{
  background:var(--map-people);
  border-color:#fff;
  box-shadow:0 0 0 2px var(--map-people-glow), 0 0 14px rgba(14,99,216,.18);
}
.place-evidence-core.people-scale-2{width:14px;height:14px}
.place-evidence-core.people-scale-3{width:16px;height:16px}
.place-evidence-core.people-scale-4{width:18px;height:18px}
.place-evidence-ring{
  width:calc(20px + (var(--ring-index) * 6px));
  height:calc(20px + (var(--ring-index) * 6px));
  border-radius:50%;
  border:2px solid;
  background:transparent;
  z-index:calc(8 - var(--ring-index));
}
.ring-documents{border-color:var(--map-documents);box-shadow:0 0 0 1px var(--map-documents-glow)}
.ring-history{border-color:var(--map-history);box-shadow:0 0 0 1px var(--map-history-glow)}
.ring-media{border-color:var(--map-media);box-shadow:0 0 0 1px var(--map-media-glow)}
.ring-research{border-color:var(--map-research);border-style:dashed;box-shadow:0 0 0 1px var(--map-research-glow)}
.ring-repository{
  border-color:var(--map-repository);
  border-radius:30%;
  box-shadow:0 0 0 1px var(--map-repository-glow);
}
.archive-place-marker.is-selected:after{
  content:"";
  position:absolute;
  inset:-4px;
  border:2px solid rgba(14,99,216,.72);
  border-radius:50%;
  box-shadow:0 0 0 3px rgba(255,255,255,.86), 0 6px 16px rgba(14,99,216,.24);
}
.archive-place-marker.no-people .place-evidence-core{
  width:5px;height:5px;
  border:0;
  background:#ffffff;
}

.place-card{
  grid-template-columns:minmax(0,1fr) minmax(160px,.85fr) auto;
}
.place-card-evidence{
  display:flex;
  flex-wrap:wrap;
  gap:4px;
  align-content:center;
  justify-content:flex-end;
}
.place-evidence-mini{
  padding:3px 5px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#ffffff;
  color:var(--muted);
  font-size:7px;
  white-space:nowrap;
}
.place-evidence-mini.people{border-color:var(--map-people);color:var(--map-people)}
.place-evidence-mini.documents{border-color:var(--map-documents);color:#b16700}
.place-evidence-mini.history{border-color:var(--map-history);color:#19794d}
.place-evidence-mini.media{border-color:var(--map-media);color:#a53b5e}
.place-evidence-mini.research{border-color:var(--map-research);border-style:dashed;color:#6130c1}
.place-evidence-mini.repository{border-color:var(--map-repository);border-radius:4px;color:#4f6276}

.map-place-route-summary{
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px;
}
.map-place-route-summary span{
  border-left:2px solid var(--line);
  padding-left:6px;
}
.map-place-route-summary .summary-people{border-color:var(--map-people)}
.map-place-route-summary .summary-documents{border-color:var(--map-documents)}
.map-place-route-summary .summary-history{border-color:var(--map-history)}
.map-place-route-summary .summary-media{border-color:var(--map-media)}
.map-place-route-summary .summary-research{border-color:var(--map-research)}
.map-place-route-summary .summary-repository{border-color:var(--map-repository)}

.map-place-history-section,.map-place-context-section{
  padding-top:13px;
  margin-top:13px;
  border-top:1px solid var(--line);
}
.map-place-history-list,.map-place-context-list{
  display:grid;
  gap:7px;
  margin-top:8px;
}
.map-place-history-item,.map-place-context-item{
  display:block;
  width:100%;
  padding:9px 10px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#ffffff;
  color:inherit;
  text-align:left;
}
button.map-place-history-item{cursor:pointer}
button.map-place-history-item:hover{border-color:var(--map-history)}
.map-place-history-item span,.map-place-history-item strong,.map-place-history-item small,
.map-place-context-item span,.map-place-context-item strong,.map-place-context-item small,.map-place-context-item em{
  display:block;
}
.map-place-history-item span,.map-place-context-item span{
  color:var(--muted);
  font-size:7px;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.map-place-history-item strong,.map-place-context-item strong{
  margin-top:3px;
  color:var(--ink);
  font:400 11px/1.2 Georgia,serif;
}
.map-place-history-item small,.map-place-context-item small,.map-place-context-item em{
  margin-top:3px;
  color:var(--muted);
  font-size:8px;
  line-height:1.35;
  font-style:normal;
}
.map-place-context-item.research{border-left:2px dashed var(--map-research)}
.map-place-context-item.repository{border-left:2px solid var(--map-repository)}

@media(max-width:720px){
  .place-card{grid-template-columns:minmax(0,1fr) auto}
  .place-card-evidence{grid-column:1/-1;justify-content:flex-start}
}
@media(max-width:560px){
  .map-evidence-toolbar{overflow-x:auto;flex-wrap:nowrap}
  .map-evidence-filter{flex:0 0 auto}
  .map-place-route-summary{grid-template-columns:1fr 1fr}
}
@media(prefers-reduced-motion:reduce){
  .archive-place-marker,.map-evidence-filter{transition:none}
}

/* 0.9.9 — Documentary temporal placement */
.tree-time-guide{
  stroke:rgba(89,82,73,.11);
  stroke-width:1;
  stroke-dasharray:3 6;
  pointer-events:none;
}
.tree-time-guide.century{
  stroke:rgba(44,55,65,.2);
  stroke-dasharray:none;
}
.tree-time-label{
  fill:#9b8f80;
  font-size:9px;
  letter-spacing:.06em;
  pointer-events:none;
}
.tree-time-label.century{
  fill:#5f6870;
  font-weight:700;
}
.tree-documentary-heading{
  fill:var(--ink);
  font-size:10px;
  font-weight:700;
  letter-spacing:.12em;
}
.tree-documentary-subheading{
  fill:var(--muted);
  font-size:9px;
}
.tree-documentary-cluster-bg{
  fill:rgba(255,253,248,.96);
  stroke:#cdbb9f;
  stroke-width:1.2;
  stroke-dasharray:4 3;
}
.tree-documentary-year{
  fill:#8a6531;
  font:700 13px Georgia,serif;
}
.tree-documentary-meta{
  fill:var(--muted);
  font-size:8px;
  text-transform:uppercase;
  letter-spacing:.07em;
}
.tree-documentary-person{cursor:pointer}
.tree-documentary-person-bg{
  fill:#f6efe3;
  stroke:#dfd2be;
  stroke-width:1;
}
.tree-documentary-person-name{
  fill:var(--ink);
  font:400 10px Georgia,serif;
}
.tree-documentary-person:hover .tree-documentary-person-bg,
.tree-documentary-person:focus-visible .tree-documentary-person-bg{
  fill:#fffdf8;
  stroke:#9b7440;
  stroke-width:1.4;
}
.tree-documentary-person.is-selected .tree-documentary-person-bg{
  fill:#fffaf0;
  stroke:#173e62;
  stroke-width:2;
}
.tree-documentary-person.history-temporal .tree-documentary-person-bg{stroke:#9a7a55}
.tree-documentary-person.history-geographic .tree-documentary-person-bg{stroke:#648071;stroke-width:1.6}
.tree-documentary-person.history-interpretation .tree-documentary-person-bg{stroke:#8c6b9b;stroke-width:1.6}
.tree-documentary-person.history-documented .tree-documentary-person-bg{stroke:#173e62;stroke-width:2}
.tree-documentary-person.is-path .tree-documentary-person-bg{stroke:#b15c3f;stroke-width:2}

.documentary-span{
  position:absolute;
  top:15px;
  height:3px;
  border-top:2px dotted #9a7a55;
}
.documentary-span i{
  position:absolute;
  top:-5px;
  width:8px;
  height:8px;
  border-radius:50%;
  background:#9a7a55;
  box-shadow:0 0 0 2px rgba(255,253,248,.9);
}
.documentary-span i.start{left:-3px}
.documentary-span i.end{right:-3px}
.tree-timeline-item.documentary .tree-timeline-marker{background:#9a7a55}
.tree-timeline-item.documentary .tree-timeline-card{border-left:2px dotted #9a7a55}

/* 0.10.0 — Tree card text containment */
.tree-card-summary{
  font-size:8.9px;
  line-height:1.15;
  letter-spacing:-.005em;
}

/* 1.0.0 — Global chronology / local genealogy */
.tree-chronology-guide{
  stroke:rgba(120,105,86,.09);
  stroke-width:1;
  stroke-dasharray:2 7;
  pointer-events:none;
}
.tree-chronology-guide.half-century{stroke:rgba(91,79,65,.14)}
.tree-chronology-guide.century{
  stroke:rgba(35,52,67,.22);
  stroke-dasharray:none;
}
.tree-chronology-label{
  fill:#aa9d8d;
  font-size:8px;
  letter-spacing:.08em;
  pointer-events:none;
}
.tree-chronology-label.century{
  fill:#53616d;
  font-size:9px;
  font-weight:700;
}

/* Pass 24 — one global time axis, documentary evidence lane */
.tree-documentary-divider{stroke:rgba(91,72,47,.18);stroke-width:1;stroke-dasharray:4 6;}


/* Pass 26 — compact single chronology */
.tree-chronology-break{stroke:rgba(111,91,67,.22);stroke-width:1;stroke-dasharray:8 7;pointer-events:none}
.tree-chronology-break-label{fill:#9a8b79;font-size:7.5px;font-style:italic;letter-spacing:.035em;pointer-events:none}

/* Pass 27 — relationship-first pedigree + separate chronology rail */
.tree-date-rail{stroke:rgba(91,72,47,.28);stroke-width:1;pointer-events:none}
.tree-date-rail-dot{fill:#f8f2e8;stroke:#8e7353;stroke-width:1.2;pointer-events:none}
.tree-date-rail-label{fill:#7d6d5b;font-size:7px;font-weight:700;text-anchor:start;pointer-events:none}
.tree-date-rail-link{stroke:rgba(91,72,47,.22);stroke-width:1;stroke-dasharray:3 4;pointer-events:none}
.tree-local-generation-label{fill:#a29484;font-size:7px;font-weight:700;letter-spacing:.12em;pointer-events:none}

/* Pass 28 — Family Tree UI refinement only
   Presentation polish. No genealogy, evidence, chronology, or relationship logic changed. */
#view-tree .tree-node{
  fill:#fffdfa;
  stroke:#d8cdbf;
  stroke-width:1;
  rx:12px;
  filter:drop-shadow(0 5px 11px rgba(43,36,29,.045));
}
#view-tree .tree-person-group:hover .tree-node{
  stroke:#aa9a87;
  filter:drop-shadow(0 7px 14px rgba(43,36,29,.065));
}
#view-tree .tree-person-group.is-selected .tree-node{
  stroke:#173e62;
  stroke-width:1.7;
  filter:drop-shadow(0 8px 16px rgba(23,62,98,.09));
}
#view-tree .tree-card-avatar-bg{fill:#f3ede3;stroke:#ded3c4;stroke-width:.7}
#view-tree .tree-card-initials{font-size:12px}
#view-tree .tree-branch-meta{font-size:6.8px;letter-spacing:.11em;fill:#968777}
#view-tree .tree-name{font-size:13.2px;font-weight:600}
#view-tree .tree-meta{font-size:8.6px;fill:#81776c}
#view-tree .tree-card-summary{font-size:8.8px;line-height:1.12;fill:#596168}
#view-tree .tree-card-footer-line{stroke:#eee7dd;stroke-width:.7}
#view-tree .tree-evidence-meta{font-size:7.2px;fill:#918577}
#view-tree .tree-line{stroke:rgba(91,77,61,.62);stroke-width:1.15}
#view-tree .tree-line.probable{stroke:rgba(112,96,77,.58);stroke-dasharray:5 4}
#view-tree .tree-partner-line{stroke:rgba(91,77,61,.62);stroke-width:1.15}
#view-tree .tree-partner-line.probable{stroke-dasharray:5 4}

/* Documentary rail: quieter, denser visual hierarchy. */
#view-tree .tree-documentary-heading{fill:#173e62;font-size:8.5px;letter-spacing:.12em;font-weight:700}
#view-tree .tree-documentary-subheading{fill:#918577;font-size:7.2px}
#view-tree .tree-documentary-cluster-bg{
  fill:rgba(255,253,248,.58);
  stroke:rgba(155,116,64,.48);
  stroke-width:.9;
  stroke-dasharray:4 3;
}
#view-tree .tree-documentary-year{fill:#8b6638;font-size:13px;font-weight:600}
#view-tree .tree-documentary-meta{fill:#9a8d7e;font-size:6.5px;letter-spacing:.08em}
#view-tree .tree-documentary-person-bg{fill:#faf6ee;stroke:#ded2c1;stroke-width:.75}
#view-tree .tree-documentary-person-name{fill:#263d50;font-size:7.7px}
#view-tree .tree-documentary-person:hover .tree-documentary-person-bg{fill:#fffdf8;stroke:#9b7440;stroke-width:1}
#view-tree .tree-date-rail{stroke:rgba(91,72,47,.20);stroke-width:.85}
#view-tree .tree-date-rail-dot{fill:#fffaf2;stroke:#967b5a;stroke-width:1}
#view-tree .tree-date-rail-label{fill:#897866;font-size:6.5px}
#view-tree .tree-date-rail-link{stroke:rgba(91,72,47,.16);stroke-width:.8;stroke-dasharray:2 4}
#view-tree .tree-documentary-divider{stroke:rgba(91,72,47,.12);stroke-width:.8;stroke-dasharray:3 6}
#view-tree .tree-local-generation-label{fill:#a09282;font-size:6.5px;letter-spacing:.11em}

/* Tree viewport chrome: reduce visual weight around the canvas. */
#treeViewport{background:linear-gradient(180deg,rgba(255,255,255,.50),rgba(251,248,242,.34));}


/* Pass 29 — documentary mini-card containment only. */
#view-tree .tree-documentary-person-bg{fill:#faf6ee;fill-opacity:1;}
#view-tree .tree-documentary-person-name{dominant-baseline:auto;}

/* Pass 31 — independent multi-branch family territories.
   Connected pedigrees own horizontal space; unrelated branches never share a generation grid. */
#view-tree .tree-component-heading{
  fill:#6f665c;
  font-size:7.2px;
  font-weight:700;
  letter-spacing:.14em;
  pointer-events:none;
}
#view-tree .tree-component-rule{
  stroke:rgba(91,72,47,.10);
  stroke-width:.8;
  pointer-events:none;
}

/* Pass 34 — loose elastic chronology. Major interval marks orient the archive without
   turning every person/date into a timeline event. */
#view-tree .tree-elastic-rail{stroke:rgba(91,72,47,.24);stroke-width:1}
#view-tree .tree-elastic-tick{stroke:rgba(91,72,47,.34);stroke-width:1;pointer-events:none}
#view-tree .tree-elastic-year{font-size:7px;font-weight:700;fill:#796a59}

/* Pass 35 — governed historical branch transitions.
   Quiet branch-gap marks only; they never create or alter genealogy. */
#view-tree .tree-branch-transition{pointer-events:auto}
#view-tree .tree-branch-transition-line{
  stroke:rgba(126,100,67,.48);
  stroke-width:1;
  stroke-dasharray:3 5;
  pointer-events:none;
}
#view-tree .tree-branch-transition-node{
  fill:#f8f2e8;
  stroke:rgba(126,100,67,.62);
  stroke-width:1;
  pointer-events:none;
}
#view-tree .tree-branch-transition-label{
  fill:#8a7358;
  font-size:6.2px;
  font-weight:700;
  letter-spacing:.10em;
  paint-order:stroke;
  stroke:#fbf8f2;
  stroke-width:3px;
  stroke-linejoin:round;
  pointer-events:none;
}
#view-tree .tree-branch-transition.transition-hypothesis .tree-branch-transition-line{opacity:.55;stroke-dasharray:2 6}
#view-tree .tree-branch-transition.transition-partially_resolved .tree-branch-transition-line,
#view-tree .tree-branch-transition.transition-resolved .tree-branch-transition-line{stroke-dasharray:5 4}

/* Pass 36 — permanent documentary appearances + canonical identity links. */
#view-tree .tree-documentary-person.has-identity-link .tree-documentary-person-bg{
  stroke:#9b7440;
  stroke-width:1;
}
#view-tree .tree-documentary-identity-mark{
  fill:#9b7440;
  font-size:9px;
  font-weight:700;
  pointer-events:none;
}
#view-tree .tree-documentary-person.has-identity-link:hover .tree-documentary-person-bg{
  stroke:#173e62;
  stroke-width:1.4;
}
#view-tree .tree-documentary-identity-link{
  fill:none;
  stroke:#9b7440;
  stroke-width:.8;
  stroke-dasharray:2 5;
  opacity:.16;
  pointer-events:none;
}
