:root {
  color-scheme: light;
  font: 100%/1.45 system-ui, sans-serif;
  color: #252b31;
  background: #f0f5f8;
  --accent: #4b782d;
  --line: #cbd4d9;
  --muted: #536068;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--accent); }
header { display: flex; flex-wrap: wrap; align-items: center; gap: 1.3rem; min-height: 3.5rem; padding: .55rem clamp(1rem, 2.2vw, 2rem); background: #fff; box-shadow: 0 1px 5px #233b4b20; }
.brand { color: var(--accent); font-size: 1.1rem; font-weight: 700; text-decoration: none; }
main { padding: 1.55rem clamp(1rem, 2.2vw, 2rem) 3rem; }
.breadcrumb { color: var(--muted); font-size: .9rem; }
h1 { font-size: clamp(1.7rem, 4vw, 2.1rem); font-weight: 400; margin: .45rem 0 1rem; }
h2 { border-bottom: 1px solid #77a84f; color: var(--muted); font-size: 1.25rem; font-weight: 400; margin: 1.5rem 0 1.25rem; }
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); }
.tabs > * { padding: .65rem .7rem; color: var(--muted); text-decoration: none; }
.tabs [aria-current] { color: #20262b; border-bottom: 2px solid #72a945; }
.tabs a:hover { color: var(--accent); text-decoration: underline; }
#summary { min-height: 4rem; margin: 0; padding-top: 1.3rem; color: var(--muted); font-size: .875rem; }
.generation { margin-bottom: 1.8rem; }
.generation h3 { color: var(--accent); font-size: 1rem; font-weight: 600; margin: 0 0 .2rem; }
.generation-row { display: flex; gap: .75rem; }
.family-group { flex: 1; min-width: 0; display: flex; justify-content: center; gap: .65rem; }
.person { width: min(100%, 17rem); padding: .85rem .45rem .65rem; text-align: center; background: white; overflow-wrap: anywhere; }
.person-name { color: #536068; text-decoration: none; font-size: 1.05rem; font-weight: 600; }
.person-name:hover { text-decoration: underline; }
.person p, .focus-person p { font-size: .875rem; margin: .7rem 0 .3rem; }
.person-details { font-size: .875rem; }
.focus-person { text-align: center; padding: 0 0 1.5rem; }
.focus-person strong { color: var(--accent); font-size: clamp(1.5rem, 4vw, 2rem); }
.controls { display: flex; align-items: center; flex-wrap: wrap; gap: .8rem; margin-bottom: .75rem; }
select, button { font: inherit; color: inherit; background: white; border: 1px solid var(--line); border-radius: .3rem; padding: .35rem .55rem; }
button { cursor: pointer; }
#diagram { width: 100%; height: clamp(25rem, 66vh, 50rem); overflow: hidden; background: white; border: 1px solid var(--line); }
:focus-visible { outline: 2px solid #286d86; outline-offset: 3px; }
@media (max-width: 43rem) {
  .family-group { flex-wrap: wrap; align-content: start; }
}
