:root {
  --paper: #f6efe2;
  --paper-2: #ede2cc;
  --ink: #2b2118;
  --muted: #6e5f4f;
  --accent: #7a4a2a;
  --accent-2: #a8743c;
  --line: #cdb995;
  --dark: #3b2f2a;
  --card: #fffaf0;
  --shadow: 0 2px 10px rgba(60, 40, 20, .12);
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1d1813; --paper-2: #26201a; --ink: #eee3d0; --muted: #b3a38c;
    --accent: #d9a36b; --accent-2: #e6bd86; --line: #4a3e31; --dark: #c9b8a6;
    --card: #2b241d; --shadow: 0 2px 10px rgba(0,0,0,.4);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 "Source Sans 3", system-ui, sans-serif; }
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; font-weight: 600; line-height: 1.2; }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 .6em; }
h3 { font-size: 1.2rem; margin: 1.2em 0 .4em; }
a { color: var(--accent); }
img { max-width: 100%; }
.wrap { max-width: 1060px; margin: 0 auto; padding: 64px 16px; }
.band { max-width: none; background: var(--paper-2); }
.band > * { max-width: 1028px; margin-left: auto; margin-right: auto; }
.intro { max-width: 720px; color: var(--muted); font-size: 1.05rem; }
.muted { color: var(--muted); }
.cols { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.sub { margin-top: 48px; }

/* Hero */
.hero { background: linear-gradient(180deg, rgba(43,33,24,.82), rgba(43,33,24,.92)), url("dokumente/155537890_002.jpg") center/cover; color: #f6efe2; }
.nav { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; padding: 16px; font-size: .95rem; }
.nav a { color: #e9d9bd; text-decoration: none; }
.nav a:hover { color: #fff; }
.hero-inner { max-width: 820px; margin: 0 auto; padding: 70px 16px 96px; text-align: center; }
.eyebrow { letter-spacing: .25em; text-transform: uppercase; font-size: .8rem; color: #d9b98c; margin: 0; }
.hero h1 { font-size: clamp(2.4rem, 8vw, 4.4rem); margin: .2em 0 .3em; }
.lede { font-size: 1.15rem; color: #eadcc4; margin: 0; }

/* Couple */
.couple { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 32px; }
.person { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; box-shadow: var(--shadow); display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: start; }
.person img { width: 120px; border-radius: 6px; filter: sepia(.25); box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.person h3 { margin: 0 0 4px; }
.person .meta { color: var(--muted); font-size: .92rem; margin: 0 0 10px; }
.person p { margin: 0; }
.person .cap { grid-column: 1 / -1; font-size: .8rem; color: var(--muted); margin-top: -6px; }
@media (max-width: 420px) { .person { grid-template-columns: 1fr; } .person img { width: 140px; } }

/* Tree */
.tree { display: flex; flex-direction: column; align-items: center; gap: 0; margin-top: 24px; }
.gen { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; align-items: stretch; }
.node { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; min-width: 170px; max-width: 230px; text-align: center; box-shadow: var(--shadow); }
.node b { display: block; font-family: "Fraunces", Georgia, serif; font-weight: 600; }
.node small { display: block; color: var(--muted); font-size: .82rem; line-height: 1.35; }
.node.main { border: 2px solid var(--accent); }
.node.present { border-style: solid; border-color: var(--accent-2); background: linear-gradient(var(--card), var(--paper-2)); }
.node.unknown { border-style: dashed; background: transparent; box-shadow: none; color: var(--muted); }
.marriage { align-self: center; color: var(--accent); font-family: "Fraunces", Georgia, serif; font-size: .9rem; text-align: center; }
.vline { width: 2px; height: 28px; background: var(--line); }
.vline.dashed { background: repeating-linear-gradient(var(--line) 0 5px, transparent 5px 10px); height: 40px; }
.relatives { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 16px; }
.branches { display: flex; gap: 20px; justify-content: center; align-items: flex-start; flex-wrap: wrap; width: 100%; }
.branch { display: flex; flex-direction: column; align-items: center; flex: 1 1 300px; max-width: 520px; padding: 14px; border: 1px dashed var(--line); border-radius: 14px; }
.branches > .marriage { align-self: center; padding-top: 40px; }
.blabel { margin: 0 0 10px; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.blabel.small { margin: 18px 0 8px; letter-spacing: .05em; }
.gen.sibs { gap: 10px; margin-bottom: 8px; }
.tree details { text-align: left; font-size: .88rem; margin-top: 6px; }
.tree summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.tree details p { margin: 6px 0 0; }
.tree .src { color: var(--muted); font-size: .78rem; font-style: italic; }
.relatives .node { max-width: none; text-align: left; }
.relatives .node.wide { grid-column: span 2; }
@media (max-width: 560px) { .relatives .node.wide { grid-column: auto; } }
.relatives details { margin-top: 8px; font-size: .92rem; }
.relatives summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.relatives details p { margin: 6px 0 0; }
.relatives .src { color: var(--muted); font-size: .8rem; font-style: italic; }

/* Timeline */
.timeline { list-style: none; margin: 24px 0 0; padding: 0 0 0 26px; border-left: 2px solid var(--line); }
.timeline li { position: relative; margin: 0 0 22px; padding-left: 14px; max-width: 760px; }
.timeline li::before { content: ""; position: absolute; left: -35px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--paper-2); border: 2px solid var(--accent-2); }
.timeline li.dark::before { background: var(--dark); border-color: var(--dark); }
.timeline li.gold::before { background: var(--accent-2); }
.timeline .y { font-family: "Fraunces", Georgia, serif; font-weight: 600; color: var(--accent); }
.timeline .pl { color: var(--muted); font-size: .9rem; margin-left: 6px; }
.timeline p { margin: 2px 0 0; }

/* Map */
.map { height: 460px; border-radius: 14px; border: 1px solid var(--line); margin-top: 16px; z-index: 0; }
.placelist { columns: 2 260px; padding-left: 18px; margin-top: 18px; }
.placelist li { break-inside: avoid; margin-bottom: 6px; }

/* Documents */
.docs { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-top: 24px; }
.doc { background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: zoom-in; padding: 0; text-align: left; color: inherit; font: inherit; box-shadow: var(--shadow); }
.doc img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; object-position: top; }
.doc span { display: block; padding: 8px 10px 2px; font-weight: 600; font-size: .92rem; }
.doc small { display: block; padding: 0 10px 10px; color: var(--muted); font-size: .78rem; }

.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; }
.lightbox::backdrop { background: rgba(10, 6, 2, .88); }
.lightbox img { max-width: 96vw; max-height: 86vh; display: block; margin: 0 auto; }
.lightbox .cap { color: #eee; text-align: center; margin: 8px 0 0; }
.lightbox .close { position: fixed; top: 10px; right: 16px; font-size: 2.2rem; background: none; border: 0; color: #fff; cursor: pointer; }

.footer { text-align: center; padding: 32px 16px; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); }
.footer p { margin: 4px 0; }
.photos .doc img { aspect-ratio: 3/4; object-position: center; filter: sepia(.15); }
.relatives .thumb { float: left; width: 64px; height: 80px; object-fit: cover; border-radius: 6px; margin: 0 12px 6px 0; }
