:root {
  color-scheme: light;
  --paper: #f6f4ed;
  --surface: #fffef9;
  --text: #263e32;
  --muted: #596458;
  --accent: #496f59;
  --on-accent: #fffef9;
  --gold: #997237;
  --border: #dcded1;
  --panel: #e8ecdf;
  --panel-border: #cbd2bd;
  --shadow: 0 12px 35px #283e310a;
  --serif: Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --paper: #1c221f;
  --surface: #252d28;
  --text: #f1eee3;
  --muted: #bec9bc;
  --accent: #b5d2b9;
  --on-accent: #223127;
  --gold: #d4b178;
  --border: #455347;
  --panel: #2e3a31;
  --panel-border: #4d6152;
  --shadow: 0 12px 35px #0002;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 6rem; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--text);
  font: 1rem/1.55 var(--sans);
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.shell { width: min(1280px, calc(100% - 4rem)); margin-inline: auto; }
.skip-link {
  position: fixed;
  z-index: 10;
  inset: .5rem auto auto .5rem;
  padding: .65rem 1rem;
  background: var(--surface);
  transform: translateY(-180%);
}
.skip-link:focus { transform: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--paper);
  border-bottom: 1px solid var(--border);
}
.site-header-inner {
  min-height: 5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-right: auto;
  font: bold 1.32rem/1.1 var(--serif);
  text-decoration: none;
}
.brand svg { color: var(--accent); flex: none; }
.brand small {
  display: block;
  margin-top: .28rem;
  color: var(--muted);
  font: 600 .61rem/1.4 var(--sans);
  letter-spacing: .15em;
  text-transform: uppercase;
}
.site-header nav { display: flex; gap: 1.35rem; }
.site-header nav a { font-size: .88rem; text-decoration: none; }
.site-header nav a:hover { text-decoration: underline; text-underline-offset: .35em; }
.theme-toggle {
  padding: .42rem .8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: .83rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  padding-block: clamp(2.5rem, 6vw, 5.5rem) 2.65rem;
}
.kicker, .card-label {
  margin: 0 0 .9rem;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 650;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.kicker { display: flex; align-items: center; gap: .6rem; }
.kicker::before { content: ""; width: 1.6rem; height: 1px; background: var(--gold); }
.hero h1 {
  margin: 0;
  font: 400 clamp(3.2rem, 6.25vw, 5.25rem)/1.04 var(--serif);
  letter-spacing: -.06em;
}
.hero h1 em { color: var(--accent); }
.hero-description {
  max-width: 29rem;
  margin-block: 1.25rem 1.65rem;
  color: var(--muted);
  font-size: 1.06rem;
}
.button-link {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: .75rem 1.15rem;
  border-radius: .5rem;
  background: var(--accent);
  color: var(--on-accent);
  font-size: .88rem;
  font-weight: 650;
  text-decoration: none;
}
.summary-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 1.1rem;
  border-block: 1px solid var(--border);
}
.stats { display: flex; flex-wrap: wrap; gap: .75rem 2.1rem; }
.stats > div { display: flex; flex-direction: column; }
.stats strong { font: 1.55rem/1.15 var(--serif); }
.stats span { color: var(--muted); font-size: .78rem; }
.preview-badge {
  padding: .35rem .75rem;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font-size: .76rem;
}
.data-status { color: var(--muted); font-size: .84rem; }
.data-status:empty { display: none; }

.chapter {
  margin-block: 2.45rem;
  padding: clamp(1.15rem, 3.5vw, 2.55rem);
  border: 1px solid var(--border);
  border-radius: .9rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.chapter-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
h2, h3, h4 { font-family: var(--serif); }
.chapter h2 { margin: 0; font-size: clamp(1.95rem, 4vw, 3.3rem); font-weight: 400; line-height: 1.12; letter-spacing: -.04em; }
.chapter h3 { margin: 0 0 .45rem; font-size: 1.52rem; font-weight: 400; }
.field {
  display: grid;
  width: min(100%, 21rem);
  gap: .4rem;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 650;
}
.field :is(input, select, textarea) {
  width: 100%;
  min-height: 2.75rem;
  padding: .55rem .75rem;
  border: 1px solid var(--border);
  border-radius: .48rem;
  background: var(--paper);
  color: var(--text);
  font-size: .95rem;
  font-weight: 400;
}
.directory {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 1rem;
}
.people, .person, .pedigree {
  margin: 0;
  padding: .9rem;
  border: 1px solid var(--border);
  border-radius: .65rem;
  background: var(--paper);
}
.people {
  max-height: 26rem;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: .4rem;
  list-style: none;
}
.person { padding: 1.2rem; overflow-wrap: anywhere; }
.person > :first-child { margin-top: 0; }
.person dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
  gap: .8rem;
  margin-block: 1rem;
}
.person dt { color: var(--muted); font-size: .8rem; }
.person dd { margin: 0; }
.person ul { list-style: none; margin: 0 0 .75rem; padding: 0; }
.person li + li { margin-top: .35rem; }
.pedigree {
  overflow-x: auto;
  padding: 1rem;
}
.person-link {
  display: inline-block;
  text-decoration: none;
  padding: .45rem .7rem;
  border: 1px solid var(--border);
  border-radius: .42rem;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  overflow-wrap: anywhere;
}
.people .person-link { width: 100%; }
.person-link:hover {
  border-color: var(--accent);
  background: var(--panel);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1rem;
  align-items: baseline;
  padding-block: 1.25rem 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .85rem;
}
.footer strong { color: var(--text); font: bold 1.1rem var(--serif); }


[hidden] { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.shell { width: min(1280px, calc(100% - 3rem)); }
.site-header { background: color-mix(in srgb, var(--paper) 95%, transparent); backdrop-filter: blur(16px); }
.site-header-inner { min-height: 82px; }
.site-header .nav-links { gap: clamp(.8rem, 2vw, 1.65rem); }
.nav-links a { color: var(--muted); padding-block: .7rem; }
.nav-links a[aria-current] { color: var(--text); box-shadow: inset 0 -2px var(--accent); }
.nav-utilities { display: flex; align-items: center; gap: .45rem; }
.nav-action, .nav-options > summary {
  display: grid;
  grid-auto-flow: column;
  place-items: center;
  gap: .35rem;
  min-height: 42px;
  padding: .45rem .75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  font-size: .83rem;
}
.nav-action:hover, .nav-options > summary:hover { background: var(--panel); }
.nav-options { position: relative; }
.nav-options > summary { min-width: 42px; list-style: none; cursor: pointer; font-size: 1.2rem; }
.nav-options > summary::-webkit-details-marker { display: none; }
.nav-options > div {
  position: absolute;
  right: 0;
  top: calc(100% + .5rem);
  display: grid;
  gap: .55rem;
  min-width: 11rem;
  padding: .75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: .65rem;
  box-shadow: var(--shadow);
}
.nav-options > div a { padding: .35rem .55rem; font-size: .85rem; text-underline-offset: .2rem; }
.mobile-nav { display: none; }
.hero { padding-block: clamp(2.5rem, 5.6vw, 5rem) 2.6rem; gap: clamp(2rem, 6vw, 4.7rem); }
.hero h1 { font-size: clamp(2.8rem, 5.5vw, 4.75rem); letter-spacing: -.045em; }
.hero-description { font-size: 1rem; line-height: 1.8; max-width: 28rem; }
.home-map-art { display: block; width: 100%; height: auto; }
.hero-search {
  display: flex;
  align-items: center;
  gap: .5rem;
  max-width: 35.625rem;
  padding: .44rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: .75rem;
  box-shadow: var(--shadow);
}
.hero-search input { min-width: 0; width: 100%; border: 0; background: transparent; padding: .6rem .7rem; }
.hero-search button, .message-form .button-link {
  flex: none;
  min-height: 46px;
  padding: .55rem 1rem;
  border: 0;
  border-radius: 7px;
  background: #315b49;
  color: white;
  font-size: .82rem;
  font-weight: 650;
}
[data-theme="dark"] .hero-search button, [data-theme="dark"] .message-form .button-link {
  background: var(--accent);
  color: var(--on-accent);
}
.home-hint, .chapter-intro { color: var(--muted); }
.home-hint { margin: .7rem 0 1.2rem; font-size: .78rem; }
.hero-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.hero-links a, .section-link { font-size: .88rem; text-underline-offset: .25rem; }
.hero-links a:not(:hover):last-child { text-decoration: none; }
.summary-band { border-top: 0; padding-block: 0 1.8rem; }
.stats > div { flex-direction: row; align-items: baseline; gap: .5rem; }
.preview-badge { border: 0; background: transparent; color: var(--muted); padding-inline: 0; }
.workspace-bar { display: flex; align-items: baseline; gap: .65rem; font-size: .84rem; color: var(--muted); margin-block: 1.5rem; }
.workspace-bar strong { color: var(--text); }
.chapter-intro { margin: .65rem 0 0; max-width: 65ch; }
.workspace-view.chapter { margin-top: 0; }
.anniversary-strip {
  display: grid;
  grid-template-columns: minmax(9rem, .75fr) 3fr;
  align-items: start;
  gap: 1.2rem;
  margin-block: 2.25rem;
}
.anniversary-strip h2 { margin: 0; font-size: 1.5rem; font-weight: 400; }
.anniversary-strip .kicker { margin-bottom: .4rem; }
.anniversary-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: .6rem; list-style: none; padding: 0; margin: 0; }
.anniversary-list li { display: grid; align-content: start; gap: .2rem; background: var(--surface); border: 1px solid var(--border); border-radius: .5rem; padding: .65rem .8rem; }
.anniversary-list strong { font: 1rem var(--serif); }
.anniversary-list span { color: var(--muted); font-size: .75rem; }
.anniversary-list .person-link { padding: 0; border: 0; background: none; font-size: .82rem; text-decoration: underline; text-underline-offset: .18rem; }
.discoveries { background: color-mix(in srgb, var(--panel) 42%, var(--paper)); }
.editorial-grid, .branch-grid, .place-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr));
  align-items: start;
  gap: 1rem;
  margin-top: 1.25rem;
}
.editorial-card, .branch-card { min-width: 0; border: 1px solid var(--border); border-radius: .75rem; background: var(--surface); overflow: clip; }
.editorial-card:has(details[open]) { grid-column: 1 / -1; }
.editorial-copy, .branch-card { padding: 1.25rem; }
.editorial-card:has(details[open]) .editorial-copy { max-width: 78ch; margin-inline: auto; }
.editorial-copy > p:not(.card-label), .branch-card p:not(.card-label) { color: var(--muted); margin-block: .5rem 1rem; }
.editorial-copy summary, .message-entry summary { cursor: pointer; color: var(--accent); font-weight: 650; }
.editorial-body { padding-top: .45rem; }
.section-link { color: var(--accent); }
.section-link { display: inline-block; margin-top: 1.1rem; }
.filter-bar, .archive-nav, .message-tabs { display: flex; flex-wrap: wrap; gap: .55rem; }
.filter-bar button, .archive-nav a, .message-tabs button {
  padding: .5rem .9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: .85rem;
  text-decoration: none;
}
.filter-bar button[aria-pressed="true"], .message-tabs button[aria-pressed="true"], .archive-nav a:hover {
  border-color: var(--accent);
  background: var(--panel);
}
.chronicle-link {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.3rem;
  margin-bottom: 2rem;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: .85rem;
  background: var(--surface);
}
.chronicle-link:hover { border-color: var(--accent); }
.chronicle-link > span:nth-child(2) { display: grid; flex: 1; gap: .18rem; }
.chronicle-link .kicker { margin: 0; }
.chronicle-link strong { font: clamp(1.2rem, 3vw, 1.8rem) var(--serif); }
.chronicle-link > span:nth-child(2) > span { font-size: .85rem; color: var(--muted); }
.book-symbol { display: grid; place-items: center; width: 3.25rem; height: 3.6rem; border-radius: .45rem; background: var(--panel); color: var(--accent); font-size: 1.55rem; }
.archive-nav { margin-top: 1.25rem; }
.archive-section { border-top: 1px solid var(--border); margin-top: 2rem; padding-top: 1.5rem; }
.archive-section > h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
.branch-card h4 { font-size: 1.25rem; margin: 0; }
.branch-card { border-top: 3px solid var(--accent); }
.branch-card:nth-child(3n + 2) { border-top-color: var(--gold); }
.timeline-list { list-style: none; padding: 0; }
.timeline-list li { display: grid; grid-template-columns: 8rem 1fr; gap: 1rem; padding: .7rem .9rem; border-left: 2px solid var(--panel-border); }
.timeline-list strong { color: var(--accent); }
.message-tabs { margin-block: 1.4rem; }
.message-form { display: grid; gap: .8rem; max-width: 40rem; border: 1px solid var(--border); border-radius: .7rem; padding: 1rem; background: var(--paper); }
.message-form .field { width: 100%; }
.message-form textarea { resize: vertical; }
.message-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.message-list { list-style: none; padding: 0; max-width: 40rem; }
.message-entry { border: 1px solid var(--border); border-radius: .5rem; padding: .75rem; margin-block: .45rem; }
.message-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.message-status:empty { display: none; }
.large-text body { font-size: 1.125rem; }
.large-text :is(.hero-description, .chapter-intro, .editorial-copy p, .message-panel p) { font-size: 1.12rem; }
.footer a { text-underline-offset: .2rem; }
.footer strong { margin-right: auto; }

@media (max-width: 940px) {
  .site-header .nav-links { display: none; }
  .mobile-nav {
    position: fixed;
    z-index: 6;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    background: var(--paper);
    border-top: 1px solid var(--border);
    padding: .3rem .25rem calc(.3rem + env(safe-area-inset-bottom));
  }
  .mobile-nav a { display: grid; justify-items: center; min-height: 44px; padding: .15rem; font-size: .73rem; text-decoration: none; color: var(--muted); }
  .mobile-nav span { font-size: 1.15rem; line-height: 1.25; }
  .mobile-nav a[aria-current] { color: var(--text); background: var(--panel); border-radius: .4rem; }
  body { padding-bottom: calc(3.7rem + env(safe-area-inset-bottom)); }
}
@media (max-width: 700px) {
  .shell { width: calc(100% - 2rem); }
  .site-header-inner { min-height: 65px; gap: .55rem; }
  .hero, .directory, .anniversary-strip { grid-template-columns: 1fr; }
  .hero { gap: 1.1rem; padding-block: 2.4rem 1.2rem; }
  .home-map-art { max-width: 24rem; margin-inline: auto; }
  .people { max-height: 14rem; }
  .timeline-list li { grid-template-columns: 5rem 1fr; gap: .55rem; }
}
@media (max-width: 470px) {
  .nav-utilities > a { display: none; }
  .hero-search { flex-wrap: wrap; }
  .hero-search button { width: 100%; }
  .stats { column-gap: .9rem; }
}

.account-dialog {
  width: min(36rem, calc(100% - 2rem));
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: .8rem;
  padding: 1.3rem;
}
.account-dialog::backdrop { background: #162b24a8; }
.account-heading { display: flex; align-items: start; justify-content: space-between; gap: .75rem; }
.account-heading h2 { font: 1.55rem var(--serif); margin: 0; }
.account-dialog :is(#admin-login, #admin-invite, #admin-tools) { display: grid; gap: .75rem; }
.account-dialog .field { width: 100%; }
.account-dialog .button-link { border: 0; justify-self: start; }
.account-dialog #admin-lock { justify-self: start; }
.account-dialog #admin-status:empty, #account-status:empty { display: none; }

.brand-mark { flex: none; width: 35px; height: 42px; object-fit: contain; }
.nav-utilities svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.home-map-art { min-height: 360px; object-fit: contain; }
.summary-band { border-block: 1px solid var(--border); padding-block: 18px; }
#prehled .discoveries {
  position: relative;
  isolation: isolate;
  margin-block: 45px 36px;
  padding: 60px 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
#prehled .discoveries::before {
  position: absolute;
  z-index: -1;
  inset: 0 calc(-1 * (100vw - 100%) / 2);
  content: "";
  background: color-mix(in srgb, var(--panel) 45%, var(--paper));
  border-block: 1px solid var(--border);
}
.discoveries h2 { font-size: clamp(2.45rem, 4vw, 3.45rem); }
.discoveries h2 em { color: var(--accent); }
.editorial-grid { align-items: stretch; gap: 1.4rem; }
.editorial-card { display: flex; flex-direction: column; }
.editorial-card .editorial-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 125px;
  padding: 1rem 1.4rem;
  background: #eee5d7;
  color: #735430;
}
.editorial-banner span { font: italic clamp(1.35rem, 2.3vw, 2.1rem)/1.18 var(--serif); }
.editorial-banner svg { flex: 0 0 76px; width: 76px; height: 69px; fill: none; stroke: currentColor; stroke-width: 1.2; }
.editorial-card .editorial-banner[data-motif="wedding"] { background: #315b49; color: #f2efdc; }
.editorial-card .editorial-banner[data-motif="document"] { background: #e1ebee; color: #365d69; }
.editorial-card .editorial-banner[data-motif="map"] { background: #e4ebdb; color: #466044; }
[data-theme="dark"] .editorial-card .editorial-banner { background: var(--panel); color: var(--accent); }
.editorial-copy { display: flex; flex-direction: column; flex: 1; width: 100%; }
.editorial-copy h3 { font-size: clamp(1.45rem, 2.3vw, 1.78rem); line-height: 1.15; }
.editorial-copy details { margin-top: auto; border-block: 1px solid var(--border); }
.editorial-copy summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .85rem; list-style: none; font-size: .86rem; }
.editorial-copy summary::-webkit-details-marker { display: none; }
.editorial-copy summary::after { content: "+"; font-size: 1.1rem; }
.editorial-copy details[open] summary::after { content: "−"; }
.editorial-copy details + .card-label { margin: .8rem 0 0; }

.series-cover {
  position: relative;
  overflow: hidden;
  display: grid;
  justify-items: start;
  gap: .9rem;
  padding: clamp(1.65rem, 6vw, 5rem);
  border: 1px solid #694749;
  border-radius: 1rem;
  background:
    radial-gradient(ellipse at 88% 5%, #773644 0%, transparent 56%),
    repeating-linear-gradient(113deg, transparent 0 11px, #ffffff07 12px 13px),
    linear-gradient(145deg, #19141f, #331921 70%, #160f17);
  color: #f7e6da;
}

.series-cover h2 {
  margin: 0;
  color: inherit;
  font-size: clamp(2.7rem, 8vw, 6.3rem);
  line-height: .95;
}

.series-cover p { max-width: 50ch; margin: 0; color: #f3d3cc; }
.series-kicker { font-size: .78rem; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
.series-links { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: .4rem; }
.series-links a {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem .85rem;
  border: 1px solid #e9aabb;
  border-radius: .5rem;
  color: #fff1e8;
  font-weight: 650;
  text-decoration: none;
}
.series-links a:first-child { color: #311723; background: #f1bac5; }
.series-links a:hover { text-decoration: underline; }
.series-links a:focus-visible { outline: 2px solid #fff1e8; }

.story-search-field { max-width: 25rem; margin-bottom: .75rem; }

#pribehy .episode-card { scroll-margin-top: 5.5rem; }
#pribehy .episode-card .editorial-banner {
  min-height: 7.5rem;
  background: linear-gradient(135deg, #231824, #552b3a);
  color: #f7dadc;
}
#pribehy .episode-card .editorial-banner[data-motif="wedding"] { background: linear-gradient(135deg, #301821, #714052); }
#pribehy .episode-card .editorial-banner[data-motif="map"] { background: linear-gradient(135deg, #182728, #37514c); }
#pribehy .episode-card .editorial-banner[data-motif="workshop"] { background: linear-gradient(135deg, #2c201c, #684633); }
.episode-card .editorial-banner small { display: block; margin-bottom: .3rem; font-size: .72rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.episode-evidence {
  margin-block: 1rem;
  padding: .75rem 1rem;
  border-inline-start: 3px solid var(--accent);
  background: var(--panel);
}
.episode-evidence p { margin: .3rem 0 0; }
@media (min-width: 760px) {
  .editorial-card:has(.editorial-banner):has(details[open]) { display: grid; grid-template-columns: minmax(12rem, 24%) minmax(0, 1fr); }
}
.tree-controls { display: flex; flex-wrap: wrap; gap: .6rem; }
.tree-controls .field { width: auto; }
.pedigree {
  --tree-wood-shadow: #684530;
  --tree-wood-light: #b38458;
  --tree-wood-mid: #8a5c3c;
  padding: 0;
  overflow: auto;
  touch-action: pan-x pan-y;
  background:
    radial-gradient(ellipse at 50% 0, color-mix(in srgb, var(--accent) 19%, transparent), transparent 74%),
    color-mix(in srgb, var(--surface) 88%, #d3bd89);
}
[data-theme="dark"] .pedigree {
  --tree-wood-shadow: #583b2d;
  --tree-wood-light: #b78355;
  --tree-wood-mid: #986747;
}
.pedigree-chart { position: relative; margin-inline: auto; zoom: var(--tree-scale, 1); }
.pedigree-chart > svg { position: absolute; inset: 0; pointer-events: none; }
.tree-bark-shade { stop-color: var(--tree-wood-shadow); }
.tree-bark-light { stop-color: var(--tree-wood-light); }
.tree-bark-bark { stop-color: var(--tree-wood-mid); }
.tree-ground { fill: color-mix(in srgb, var(--tree-wood-mid) 18%, transparent); }
.tree-wood { stroke: var(--tree-wood-shadow); stroke-width: 1.2; stroke-linejoin: round; }
.tree-grain, .tree-leaf-vein, .pedigree-chart path.partner { fill: none; stroke-linecap: round; }
.tree-grain { stroke: #4d2d1c; stroke-width: 1.15; opacity: .32; }
.tree-leaf-wash { fill: color-mix(in srgb, var(--leaf-ink) 17%, transparent); }
.tree-leaf {
  fill: color-mix(in srgb, var(--leaf-ink) 58%, #a7bd66);
  stroke: color-mix(in srgb, var(--leaf-ink) 75%, #5c7441);
  stroke-width: .8;
}
.tree-leaf-vein { stroke: #e5e6ad; stroke-width: 1.05; opacity: .55; }
.pedigree-chart path.partner { stroke: var(--muted); stroke-width: 2; stroke-dasharray: 4 5; }
.pedigree-chart .pedigree-node {
  position: absolute;
  display: grid;
  align-content: center;
  padding: .45rem .65rem;
  border-color: color-mix(in srgb, var(--border) 62%, var(--branch-ink));
  border-inline-start: 4px solid var(--branch-ink);
  border-radius: 1rem .7rem .85rem .7rem;
  background: color-mix(in srgb, var(--surface) 94%, #e9c882);
  box-shadow: 0 3px 11px #3a241b24;
  font-size: .85rem;
  line-height: 1.2;
}
.pedigree-node strong {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.pedigree-node small { font-size: .7rem; color: var(--muted); }
.pedigree-node-copy > small:first-child { font-weight: 650; }
.pedigree-chart .pedigree-node:focus-visible { z-index: 1; }
.pedigree-chart .pedigree-focus {
  border-color: var(--tree-wood-mid);
  background: color-mix(in srgb, var(--surface) 88%, #d7b171);
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--tree-wood-mid), 0 5px 15px #3a241b42;
}
@media (max-width: 700px) {
  .pedigree { --tree-scale: .74; }
}
.person > h3 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); color: var(--text); }
@media (max-width: 700px) {
  .home-map-art { min-height: 0; }
  #prehled .discoveries { padding-block: 35px; }
  .editorial-card .editorial-banner { min-height: 100px; }
}
