.family-section { --family-line: rgb(79 65 43 / 38%); padding-block: 0 90px; }
.family-heading { border-top: 1px solid var(--line); padding-top: 48px; text-align: center; margin-bottom: 40px; }
.family-heading h2 { font-size: clamp(42px, 5vw, 64px); letter-spacing: -.045em; }
.family-generation-label { font: 500 13px/1.5 var(--sans); color: var(--muted); letter-spacing: .06em; margin: 0 0 24px; }
.family-ancestors { text-align: center; }
.family-parents { --parents-gap: clamp(24px, 5vw, 72px); position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 160px)); gap: var(--parents-gap); width: min(100%, 392px); margin-inline: auto; }
.family-person { min-width: 0; }
.family-person a, .family-person picture, .family-joe a { display: block; }
.family-person img { width: 100%; height: auto; }
.family-person figcaption { font: 400 21px/1.3 var(--serif); margin-top: 13px; text-align: center; overflow-wrap: anywhere; }
.family-person figcaption span { display: block; margin-top: 6px; font: 13px/1.4 var(--sans); color: var(--muted); }
.family-parents .family-person { position: relative; }
.family-parents .family-person::after { content: ''; position: absolute; left: 50%; bottom: -25px; height: 24px; border-left: 1px solid var(--family-line); }
.family-parents::after { content: ''; position: absolute; bottom: -25px; left: calc((100% - var(--parents-gap)) / 4); right: calc((100% - var(--parents-gap)) / 4); border-bottom: 1px solid var(--family-line); }
.family-stem { width: 1px; height: 56px; background: var(--family-line); margin: 25px auto 0; }
.sibling-cluster { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 220px minmax(0, 1fr); align-items: center; gap: 38px; max-width: 1040px; margin-inline: auto; }
.sibling-cluster::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 50%; width: 1px; background: var(--family-line); }
.family-joe { position: relative; z-index: 1; grid-column: 2; grid-row: 1; padding-block: 24px; }
.family-joe img { width: 100%; height: auto; }
.family-joe figcaption { font: 400 30px/1.2 var(--serif); text-align: center; margin-top: 16px; }
.family-joe .family-generation-label { text-align: center; font-size: 12px; letter-spacing: 0; margin: 9px 0 0; }
.sibling-list { position: relative; z-index: 1; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.siblings-left { grid-column: 1; grid-row: 1; }
.siblings-right { grid-column: 3; grid-row: 1; }
.family-relative { width: fit-content; max-width: 100%; min-width: 190px; min-height: 76px; display: flex; align-items: center; gap: 15px; padding: 12px 15px; background: rgb(255 252 244 / 30%); border: 1px solid rgb(255 255 255 / 40%); border-radius: 5px; }
.family-relative a { flex: 0 0 54px; }
.family-relative a, .family-relative picture { display: block; }
.family-relative img { width: 54px; height: 54px; object-fit: cover; }
.relative-name { font: 400 19px/1.3 var(--serif); overflow-wrap: anywhere; }
.relative-name small { display: block; font: 13px/1.5 var(--sans); color: var(--muted); margin-top: 5px; }
.siblings-left .family-relative { flex-direction: row-reverse; text-align: right; }
.siblings-left { justify-items: end; }
.siblings-right { justify-items: start; }
.siblings-left .relative-name { margin-left: auto; }
.family-descendants { text-align: center; padding-top: 52px; margin-top: 48px; border-top: 1px solid var(--line); }
.family-wife { width: 160px; margin-inline: auto; }
.children-stem { height: 52px; width: 1px; background: var(--family-line); margin-inline: auto; }
.family-children { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 180px)); justify-content: center; gap: 64px; width: min(100%, 424px); margin-inline: auto; padding-top: 24px; }
.family-children::before { content: ''; position: absolute; top: 0; left: calc((100% - 64px) / 4); right: calc((100% - 64px) / 4); border-top: 1px solid var(--family-line); }
.family-children .family-person { position: relative; }
.family-children .family-person::before { content: ''; position: absolute; top: -24px; height: 24px; left: 50%; border-left: 1px solid var(--family-line); }
.family-children img { aspect-ratio: 3 / 4; object-fit: cover; object-position: center 35%; }
@media (max-width: 1000px) {
  .sibling-cluster { grid-template-columns: minmax(0, 1fr) 180px minmax(0, 1fr); gap: 20px; }
  .family-relative { gap: 10px; padding: 10px; }
  .family-relative a { flex-basis: 44px; }
  .family-relative img { width: 44px; height: 44px; }
  .relative-name { font-size: 17px; }
}
@media (max-width: 700px) {
  .family-section { padding-bottom: 55px; }
  .family-heading { padding-top: 30px; margin-bottom: 28px; }
  .family-parents { max-width: 300px; }
  .family-person figcaption { font-size: 19px; }
  .family-stem { height: 18px; }
  .sibling-cluster { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 14px; align-items: start; }
  .sibling-cluster::before { height: 24px; bottom: auto; }
  .family-joe { width: 160px; grid-column: 1 / -1; grid-row: 1; justify-self: center; padding-top: 24px; padding-bottom: 0; }
  .family-joe figcaption { font-size: 27px; }
  .family-joe .family-generation-label { margin-top: 12px; }
  .siblings-left { grid-column: 1; grid-row: 2; }
  .siblings-right { grid-column: 2; grid-row: 2; }
  .sibling-list { gap: 10px; }
  .family-relative, .siblings-left .family-relative { width: 100%; min-width: 0; flex-direction: column; justify-content: center; text-align: center; min-height: 112px; gap: 8px; padding: 12px 8px; }
  .family-relative a { flex-basis: auto; }
  .siblings-left .relative-name { margin-left: 0; }
  .relative-name { font-size: 17px; }
  .family-descendants { margin-top: 35px; padding-top: 35px; }
  .family-wife { width: 140px; }
  .family-children { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
  .family-children::before { left: calc((100% - 28px) / 4); right: calc((100% - 28px) / 4); }
}
@media (forced-colors: active) {
  .family-relative { border: 1px solid CanvasText; }
  .family-section { --family-line: CanvasText; }
}
