.flanders-intro{background:linear-gradient(120deg,#f8f5ee,#eadfbf);padding:42px 0 54px;border-bottom:1px solid var(--line)}
.flanders-intro .breadcrumb{margin:0 0 28px;font-size:.83rem}
.flanders-intro .breadcrumb a{color:var(--green2)}
.flanders-intro .breadcrumb span{padding:0 8px;color:var(--gold)}
.flanders-intro h1{font-size:clamp(3rem,7vw,6rem);margin:0 0 14px}
.flanders-lead{font-size:clamp(1.1rem,2.5vw,1.42rem);max-width:900px;line-height:1.5;color:#434d46}
.flanders-stats{display:flex;flex-wrap:wrap;gap:12px;margin-top:28px}
.flanders-stats span{padding:9px 17px;background:rgba(255,255,255,.65);border:1px solid #ded3bf;border-radius:40px;font:14px/1.4 Arial,sans-serif;color:#536058}
.flanders-stats strong{color:var(--green2);font-size:18px}
.overview-section{padding:46px 0 54px;background:#faf7f0}
.overview-heading,.tree-heading{display:flex;align-items:end;justify-content:space-between;gap:30px;margin-bottom:21px}
.overview-heading h2,.tree-heading h2{font-size:clamp(2.1rem,4vw,3.3rem);color:var(--green2);margin:0}
.overview-heading>p,.tree-heading>p{max-width:430px;color:var(--muted);font-size:.94rem;margin:0}
.overview-frame{margin:0;background:#fff;border:1px solid #d7c8ad;border-radius:14px;overflow:hidden;box-shadow:0 24px 50px rgba(48,51,37,.08)}
.overview-scroll{height:min(69vh,650px);min-height:400px;overflow:auto;overscroll-behavior:contain;background:#fff}
.overview-scroll img{display:block;width:100%;min-width:690px;height:auto}
.overview-frame figcaption{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:13px 18px;border-top:1px solid #ded6c7;font:13px/1.5 Arial,sans-serif;color:#5c645c}
.overview-frame figcaption a{color:#765126;font-weight:700;text-decoration:underline;text-underline-offset:3px}
.tree-section{padding:44px 0 55px;background:#f1ece1}
.tree-shell{padding:0;background:#fffdf8;border:1px solid #d7c8ad;border-radius:14px;overflow:hidden;box-shadow:0 24px 50px rgba(48,51,37,.09)}
.tree-toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:13px 15px;background:#f9f6ee;border-bottom:1px solid #ded6c7;font:13px Arial,sans-serif}
.tree-toolbar input{width:250px;max-width:100%;padding:11px 13px;border:1px solid #c9bb9f;border-radius:7px;background:#fff;color:#263a33;font:14px Arial,sans-serif}
.tree-toolbar button,.tree-toolbar .tree-link{border:1px solid #c9bb9f;background:#fff;color:#263a33;border-radius:7px;padding:10px 13px;min-height:40px;cursor:pointer;font:600 13px Arial,sans-serif;white-space:nowrap;text-decoration:none;display:inline-flex;align-items:center}
.tree-toolbar button:hover,.tree-toolbar button:focus-visible,.tree-toolbar .tree-link:hover,.tree-toolbar .tree-link:focus-visible{background:#e9dcc4;border-color:#9a7040}
.tree-toolbar #zoom-in,.tree-toolbar #zoom-out{font-size:20px;line-height:1;padding:9px 13px}
.tree-search-label{font-weight:700;color:#384941;white-space:nowrap}
.tree-content{display:grid;grid-template-columns:minmax(0,1fr) 280px;height:min(69vh,690px);min-height:485px}
.tree-viewport{position:relative;min-width:0;overflow:hidden;background-color:#f5f1e8;background-image:radial-gradient(#ddcfba 1px,transparent 1px);background-size:22px 22px;touch-action:none;cursor:grab}
.tree-viewport:active{cursor:grabbing}.tree-viewport svg{display:block;width:100%;height:100%;user-select:none}
.tree-scale{position:absolute;bottom:14px;left:15px;background:rgba(255,253,248,.92);border:1px solid #dfd4c1;padding:5px 10px;border-radius:5px;font:11px Arial,sans-serif;color:#665e51;pointer-events:none}
.person-detail{border-left:1px solid #ded6c7;padding:25px 23px;background:#fffdf8;overflow:auto}
.person-detail .detail-kicker{font:700 11px Arial,sans-serif;letter-spacing:.15em;text-transform:uppercase;color:#a47738}
.person-detail h3{font-size:1.9rem;color:#263a33;margin:12px 0 4px}.person-detail .detail-dates{font:14px Arial,sans-serif;color:#806c50;margin-top:0}
.person-detail p{line-height:1.62}.person-detail .detail-partner{padding-top:14px;border-top:1px solid #dfd6c7}.person-detail a{color:#795528;font-weight:bold}
.tree-legend{display:flex;flex-wrap:wrap;gap:10px 23px;padding:14px 17px;border-top:1px solid #ded6c7;color:#5c645c;font:12px Arial,sans-serif}
.tree-legend span{display:inline-flex;gap:7px;align-items:center}.tree-legend i{width:15px;height:11px;display:inline-block;border:2px solid #aa7c37;border-radius:3px;background:#fff5dd}
.tree-legend .legend-family{border-color:#627769;background:#f5faf3}.tree-legend .legend-carolingian{border-color:#974c41;background:#f9ece8}.tree-legend .legend-holland{border-color:#6b7f94;background:#eff5f8}.tree-legend .legend-vermandois{border-color:#82758c;background:#f1f0f5}.tree-legend .legend-uncertain{width:20px;height:0;border:0;border-top:2px dashed #aa9375;border-radius:0}
.tree-edge{fill:none;stroke:#b5aa94;stroke-width:2.2;stroke-linecap:round}.tree-edge.main{stroke:#b38b4f;stroke-width:3}.tree-edge.uncertain{stroke-dasharray:7 6}.tree-edge.holland{stroke:#7895a4}.tree-edge.carolingian{stroke:#a76558}
.tree-card{cursor:pointer}.tree-card .card-bg{fill:#f8faf6;stroke:#7b8d7c;stroke-width:1.5;filter:url(#card-shadow)}
.tree-card.count .card-bg{fill:#fff6e4;stroke:#af8542;stroke-width:2}.tree-card.holland .card-bg{fill:#eef5f8;stroke:#6c8b9d;stroke-width:2}.tree-card.carolingian .card-bg{fill:#f9ece8;stroke:#9c554a;stroke-width:2}.tree-card.vermandois .card-bg{fill:#f1f0f5;stroke:#82758c;stroke-width:2}
.tree-card .card-band{fill:#668273}.tree-card.count .card-band{fill:#a77a3e}.tree-card.holland .card-band{fill:#67899b}.tree-card.carolingian .card-band{fill:#9c554a}.tree-card.vermandois .card-band{fill:#806e8e}
.tree-card.selected .card-bg,.tree-card.match .card-bg{stroke:#c46b28;stroke-width:4}.tree-card.dim{opacity:.32}
.tree-card .card-role{font:700 10px Arial,sans-serif;letter-spacing:.11em;fill:#7e6546}.tree-card .card-name{font:600 19px Georgia,serif;fill:#253b32}.tree-card .card-dates{font:14px Georgia,serif;fill:#585e55}.tree-card .card-partner{font:11px Arial,sans-serif;fill:#666960}.tree-card:focus-visible .card-bg{stroke:#245d73;stroke-width:4}
.flanders-notes{padding:46px 0 80px}.flanders-notes h2{font-size:2.3rem;color:var(--green2)}.flanders-notes p{max-width:900px}.flanders-notes a{color:#765126;text-underline-offset:3px}
.tree-index{margin:32px 0;padding:18px 20px;background:#fcf9f2;border:1px solid var(--line);border-radius:8px}.tree-index summary{cursor:pointer;color:var(--green2);font-weight:bold}
.person-index{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 16px;margin-top:17px}.person-index button{border:1px solid #d9cbb5;background:white;text-align:left;padding:9px 12px;border-radius:5px;color:#344b42;cursor:pointer;font:14px Georgia,serif}.person-index button:hover,.person-index button:focus-visible{background:#ede3d0}
@media(max-width:850px){.tree-toolbar input{flex:1;min-width:155px}.tree-content{grid-template-columns:1fr;height:auto}.tree-viewport{height:500px}.person-detail{border-left:0;border-top:1px solid #ded6c7;min-height:180px;max-height:290px}.tree-heading,.overview-heading{display:block}.tree-heading>p,.overview-heading>p{margin-top:15px}.person-index{grid-template-columns:repeat(2,1fr)}}
@media(max-width:540px){.flanders-intro{padding:27px 0 39px}.overview-section,.tree-section{padding-top:30px}.overview-scroll{height:450px}.overview-frame figcaption{align-items:start;flex-direction:column}.tree-search-label{width:100%}.tree-toolbar input{width:100%;flex-basis:100%}.tree-toolbar button,.tree-toolbar .tree-link{flex:1;justify-content:center}.tree-viewport{height:420px}.person-index{grid-template-columns:1fr}.tree-scale{font-size:10px}}
