/* Stammbaum v0.39 — profile UI, scoped to the existing page. */
.person-screen.is-active{display:block}.profile-person-open #home{display:none}
.profile-header{display:grid;grid-template-columns:88px minmax(0,1fr) auto;align-items:center;gap:22px;margin:22px 0 20px;padding:24px;border:1px solid #cad9d1;border-radius:20px;background:#fff;box-shadow:0 6px 24px #244c4d09;min-width:0}
.profile-avatar,.profile-photo{width:88px;height:88px;border-radius:22px;flex-shrink:0}.profile-avatar{display:grid;place-items:center;background:#e5efea;color:#244c4d;font:600 42px Georgia,serif;border:1px solid #d0e0d7}.profile-photo{object-fit:cover;border:2px solid #d0e0d7}
.profile-heading{min-width:0}.profile-kicker{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#536e66;margin-bottom:7px}.profile-heading h1{font-size:clamp(26px,3.3vw,36px);line-height:1.15;margin:0 0 8px;overflow-wrap:anywhere}.profile-surnames{font-size:13px;line-height:1.5;color:#586d6b;margin:6px 0}.profile-meta{display:flex;flex-wrap:wrap;gap:5px 18px;font-size:14px;line-height:1.5;color:#526d62}.profile-meta>span{overflow-wrap:anywhere}
.profile-heading h1:focus{outline:none}
@media(min-width:621px){.logout-short{display:none!important}}
.profile-pedigree{font-size:13px;min-height:44px;white-space:nowrap}.profile-data-state{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}.data-count{display:inline-flex;align-items:center;gap:5px;border-radius:6px;background:#f0f4f1;padding:4px 7px;font-size:11px;color:#476258}.count-confirmed{background:#e8f1e9;color:#27513b}.count-needs_check{background:#f8f0dc;color:#70521d}.count-disputed{background:#eeeaf4;color:#5e4d75}.count-disproved{background:#f1ebeb;color:#704e4e}.profile-data-note{font-size:12px;line-height:1.5;color:#62766e;margin-top:10px}
.profile-tabs{display:flex;gap:4px;overflow-x:auto;max-width:100%;min-width:0;border-bottom:1px solid #c9d8cf;margin-bottom:20px;padding:0 0 2px;scrollbar-width:thin;scrollbar-color:#c0d1c6 transparent;overscroll-behavior-x:contain}.profile-tab{flex:0 0 auto;padding:12px 17px;min-height:46px;border:0;border-radius:10px 10px 0 0;background:transparent;color:#586c62;font-size:14px;font-weight:650;cursor:pointer}.profile-tab[aria-selected=true]{background:#244c4d;color:white}.profile-tab:hover:not([aria-selected=true]){background:#e6eee8}.profile-tab:focus-visible,.profile-text-button:focus-visible,.profile-pedigree:focus-visible,.family-events-toggle input:focus-visible{outline:3px solid #bb781d;outline-offset:2px}
.profile-panel{min-width:0}.profile-panel:focus-visible{outline:2px solid #bb781d;outline-offset:3px;border-radius:8px}.profile-panel .tree-flow{margin-top:5px}.profile-section{border:1px solid #d1ddd5;border-radius:15px;background:#fff;padding:20px;margin-bottom:16px;min-width:0;overflow-wrap:anywhere}.profile-section h2{text-align:left;font:600 19px/1.3 Georgia,serif;color:#244c4d;margin:0 0 16px}.profile-section h3{font-size:15px;line-height:1.45}.profile-overview-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}.profile-overview-grid .profile-section{margin:0 0 16px}
.profile-basics{margin:0;display:grid;gap:0}.profile-basics>div{border-top:1px solid #e6ede8;padding:10px 0;display:grid;grid-template-columns:38% minmax(0,1fr);gap:14px}.profile-basics>div:first-child{border-top:0;padding-top:0}.profile-basics dt,.source-meta dt{font-size:12px;color:#62736a;line-height:1.5}.profile-basics dd{font-size:14px;font-weight:550;line-height:1.5;margin:0;min-width:0}.profile-kin{display:grid;gap:0}.profile-kin-link{position:relative;display:grid;gap:3px;padding:9px 24px 9px 0;border-top:1px solid #e6ede8}.profile-kin-link:first-child{border-top:0;padding-top:0}.kin-label{font-size:11px;color:#687b6d}.profile-kin-link strong{font-size:14px;line-height:1.4;color:#244c4d}.kin-arrow{position:absolute;right:0;top:15px;font-size:17px;color:#6b8376}.profile-text-button{border:0;padding:7px 0;min-height:36px;background:transparent;font-size:13px;font-weight:650;color:#225e53;cursor:pointer;text-align:left;line-height:1.45}.profile-text-button:hover{text-decoration:underline}.profile-kin+.profile-text-button{margin-top:10px}.profile-inline-link{display:inline-block;color:#225e53;text-decoration:underline;text-underline-offset:3px;margin-right:12px;line-height:1.5}.profile-info{padding:13px 16px;background:#f6f1e2;border:1px solid #e4dabe;border-radius:12px;margin-bottom:16px;font-size:14px;line-height:1.5;color:#625222}.profile-info .profile-text-button{display:block}.profile-empty,.profile-load-state{font-size:14px;line-height:1.6;color:#65786e;padding:4px 0}.profile-load-state{padding:16px}.profile-biography{scroll-margin-top:70px}.profile-biography .notes{padding-bottom:0;font-size:14px}.profile-biography .notes:empty{display:none}
.profile-fact-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.profile-fact{border:1px solid #e0e8e2;border-radius:11px;padding:14px;min-width:0;margin-bottom:10px;background:#fdfefd}.profile-fact-grid .profile-fact{margin:0}.fact-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:9px;flex-wrap:wrap;margin-bottom:8px}.fact-heading h3{flex:1;min-width:120px}.fact-value{font-size:14px;line-height:1.6;margin-top:4px;white-space:pre-wrap;overflow-wrap:anywhere}.fact-subtext,.evidence-empty{font-size:12px;line-height:1.55;color:#667a6f;margin:6px 0 0}.fact-id{font-size:10px;line-height:1.5;color:#6e8174;letter-spacing:.04em;margin-top:10px}.fact-status,.task-status{display:inline-block;padding:3px 7px;font-size:11px;line-height:1.5;font-weight:600;border-radius:5px;background:#edf2ee;color:#526959}.status-confirmed{background:#e8f2e9;color:#31553a}.status-probable{background:#f4efdf;color:#675321}.status-family_story{background:#eaf1f6;color:#385773}.status-disputed{background:#eeeaf4;color:#604e78}.status-disproved{background:#f1ebeb;color:#744f4f}.status-needs_check{background:#f8f0db;color:#74541e}
.fact-versions{margin-top:10px;background:#f4f1f8;border-radius:8px;padding:0 10px}.fact-versions summary{font-size:12px;padding:10px 0;min-height:40px;color:#5b4a70}.variant-list{padding-left:20px;margin:10px 0}.variant-list li{padding:5px 0 10px}.fact-evidence{margin-top:10px}.citation-card{padding:0 9px;background:#f0f5f1;border:1px solid #e1e9e2;border-radius:7px;margin-top:5px}.citation-card summary{font-size:12px;font-weight:550;padding:8px 0;min-height:36px;overflow-wrap:anywhere}.citation-card .citation-id{font-size:10px;color:#748375}.citation-dot{color:#497054}.citation-body{padding:2px 0 7px}.citation-body p{font-size:12px;line-height:1.65;margin-bottom:6px;white-space:pre-wrap}.citation-body strong{font-weight:650}.citation-body .profile-text-button{font-size:12px}
.profile-info-icon{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;border:1px solid currentColor;border-radius:50%;font:italic 11px Georgia,serif;vertical-align:1px;margin-right:3px}
.source-list{display:grid;gap:12px}.source-card{background:#fbfdfa;border:1px solid #dce7dc;border-radius:12px;padding:16px;scroll-margin-top:80px;min-width:0}.source-card .fact-id{margin:0 0 8px}.source-meta{display:grid;gap:7px;margin:12px 0}.source-meta>div{display:grid;grid-template-columns:minmax(100px,25%) minmax(0,1fr);gap:10px}.source-meta dd{font-size:13px;line-height:1.5;margin:0;min-width:0}.source-note{font-size:13px;line-height:1.65;white-space:pre-wrap;margin:8px 0}.source-targets{font-size:12px;line-height:1.8;margin-top:12px;color:#516c59}.source-target{display:inline-block;margin:2px 3px;padding:1px 6px;background:#edf3ed;border-radius:4px}
.panel-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap}.family-events-toggle{font-size:12px;display:flex;align-items:center;gap:6px;min-height:32px;line-height:1.5}.family-events-toggle input{width:18px;height:18px;accent-color:#244c4d;flex-shrink:0}.profile-caption{font-size:12px;color:#67796d;line-height:1.5;margin:0 0 20px}.profile-timeline{list-style:none;margin:0;padding:0}.timeline-event{position:relative;border-left:2px solid #c6d8ca;padding:0 0 18px 22px;margin-left:7px}.timeline-event:before{content:"";position:absolute;top:6px;left:-5px;width:8px;height:8px;border-radius:50%;background:#527763;box-shadow:0 0 0 4px #fff}.timeline-event:last-child{padding-bottom:0}.timeline-date{font-size:13px;font-weight:700;color:#3b614c;margin-bottom:7px;line-height:1.5}.timeline-card{border:1px solid #dce6de;border-radius:11px;background:#fcfefb;padding:13px 15px;min-width:0}.context-event{border-left-style:dashed;border-left-color:#c8c8d9}.context-event:before{background:#7b7593}.context-event .timeline-card{background:#f8f6fc;border-color:#e0daec}.context-label{font-size:12px;color:#6b617b;margin:6px 0}.context-label .profile-inline-link{color:#625774;font-size:12px}
.profile-media-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.media-card{border:1px solid #dde7dd;border-radius:12px;padding:12px;background:#fcfefb;min-width:0}.media-open{display:block}.media-open img{width:100%;height:160px;object-fit:contain;background:#edf3ed;border-radius:8px;display:block;margin-bottom:12px}.media-document{display:grid;place-items:center;height:110px;background:#edf3ed;border-radius:8px;font-size:32px;color:#5c7967;margin-bottom:12px}.media-card p{font-size:12px;line-height:1.6;margin-top:7px}.media-card .profile-text-button{font-size:12px}
.research-task{padding:15px;background:#fafcf9;border:1px solid #dee7dc;border-radius:11px;margin-top:12px}.task-description{font-size:14px;line-height:1.65;white-space:pre-wrap}.task-priority{font-size:11px;line-height:1.5;color:#657668;margin-top:9px}.priority-high{color:#725519}.change-record{padding:14px 0;border-top:1px solid #e2e9e3;font-size:13px}.change-record:first-of-type{border-top:0}.change-record .fact-id{margin-bottom:7px}
@media(max-width:760px){.profile-header{grid-template-columns:72px minmax(0,1fr);gap:15px;padding:18px;margin:16px 0}.profile-avatar,.profile-photo{width:72px;height:72px;border-radius:18px}.profile-avatar{font-size:34px}.profile-pedigree{grid-column:1/-1;justify-self:start;margin-top:0}.profile-heading h1{font-size:29px}.profile-overview-grid{grid-template-columns:1fr;gap:0}.profile-fact-grid{grid-template-columns:1fr}.profile-media-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.profile-section{padding:17px}.profile-tab{padding:11px 14px}.profile-meta{font-size:13px}}
@media(max-width:480px){.profile-header{gap:12px;padding:15px;grid-template-columns:54px minmax(0,1fr)}.profile-avatar,.profile-photo{width:54px;height:54px;border-radius:14px;align-self:start}.profile-avatar{font-size:27px}.profile-heading h1{font-size:26px}.profile-kicker{font-size:10px;letter-spacing:.04em}.profile-meta{font-size:12px}.profile-data-note{font-size:11px}.profile-section{padding:15px}.profile-basics>div{grid-template-columns:1fr;gap:3px}.profile-basics dt{font-size:11px}.source-meta>div{grid-template-columns:1fr;gap:2px}.profile-media-grid{grid-template-columns:1fr}.panel-heading{display:block}.panel-heading h2{margin-bottom:10px}.family-events-toggle{margin-bottom:12px}.timeline-event{padding-left:17px}.timeline-card{padding:12px}.profile-tabs{margin-bottom:16px}}

.pedigree-close-icon{min-width:42px;min-height:42px;font-size:22px;line-height:1;padding:8px}

/* v0.40.3 safe UI-only override:
   softer clickable person names in Overview.
   Kept outside tree_renderer.php so PDF/router code remains untouched. */
.bio-link{
  color:#315f5d !important;
  font-weight:600 !important;
  text-decoration:underline !important;
  text-decoration-thickness:1px !important;
  text-underline-offset:3px !important;
  text-decoration-color:#91aaa4 !important;
  background:transparent !important;
  border-radius:3px !important;
  padding:0 1px !important;
}
.bio-link::after{
  font-size:.68em !important;
  font-weight:600 !important;
  color:#6f8881 !important;
}
.bio-link:hover{
  background:#edf4f1 !important;
  color:#244c4d !important;
}
.bio-link:active{
  background:#e2eeea !important;
}

