.family-tree-shell {
  --album-linen: #edf0e8;
  --album-paper: #fffdf8;
  --album-paper-deep: #f5f1e7;
  --album-ink: #26332d;
  --album-muted: #6d776f;
  --album-rule: rgba(38, 51, 45, .16);
  background: var(--album-linen);
  color: var(--album-ink);
}

.family-tree-loading {
  background: var(--album-linen);
}

.family-tree-loading::after {
  color: var(--album-ink);
}

.family-atlas {
  padding: clamp(52px, 6vw, 88px) 0 clamp(64px, 8vw, 112px);
  background:
    linear-gradient(100deg, rgba(255, 255, 255, .38), transparent 30% 70%, rgba(255, 255, 255, .3)),
    var(--album-linen);
  color: var(--album-ink);
}

.family-atlas::before {
  display: none;
}

.family-atlas-heading {
  width: min(100%, 1540px);
  grid-template-columns: minmax(0, 1.2fr) auto;
  align-items: end;
  margin-bottom: 34px;
  padding: 0 clamp(22px, 4vw, 64px);
}

.family-atlas-heading .family-eyebrow {
  margin-bottom: 10px;
  color: #67756c;
}

.family-atlas-heading h1 {
  color: var(--album-ink);
  font-size: clamp(54px, 6vw, 92px);
  font-weight: 520;
  letter-spacing: -.055em;
  line-height: .9;
}

.family-atlas-intro {
  max-width: 680px;
  margin: 22px 0 0;
  color: #59665e;
  font-family: var(--font-geist-sans), sans-serif;
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.65;
}

.family-atlas-counts {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: clamp(18px, 3vw, 38px);
  padding-bottom: 5px;
}

.family-atlas-counts span {
  display: grid;
  gap: 2px;
  color: #758077;
  font-family: var(--utility);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.family-atlas-counts strong {
  color: #31463a;
  font-family: var(--title);
  font-size: 27px;
  font-weight: 620;
  letter-spacing: -.03em;
}

.family-atlas-frame {
  width: min(calc(100% - clamp(22px, 4vw, 64px)), 1540px);
  overflow: visible;
  border-color: rgba(49, 70, 58, .22);
  border-radius: 9px;
  background: var(--album-paper);
  box-shadow: 0 24px 64px rgba(58, 68, 57, .12);
}

.family-atlas-toolbar {
  min-height: 61px;
  justify-content: flex-start;
  padding: 10px 14px;
  border-color: var(--album-rule);
  background: #f7f5ee;
  backdrop-filter: none;
}

.family-atlas-toolbar > span {
  flex: none;
  padding-left: 4px;
  color: #7b857d;
  font-family: var(--utility);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.atlas-scope-controls button {
  min-height: 36px;
  padding: 0 12px;
  border-color: rgba(38, 51, 45, .15);
  border-radius: 999px;
  background: transparent;
  color: #5b685f;
  font-size: 11px;
}

.atlas-scope-controls button.active {
  border-color: #314b3b;
  background: #314b3b;
  color: #fffdf8;
}

.atlas-scope-controls button i {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--branch-color) 20%, transparent);
}

.pedigree-register {
  padding: clamp(34px, 4vw, 58px);
  background:
    radial-gradient(circle at 12% 4%, rgba(103, 127, 109, .07), transparent 22%),
    linear-gradient(#fffdf8, #faf8f1);
}

.pedigree-start {
  width: min(100%, 710px);
  margin: 0 auto;
  text-align: center;
}

.pedigree-start > p {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  color: #55645b;
  font-family: var(--font-geist-sans), sans-serif;
  font-size: 12px;
  font-weight: 700;
}

.pedigree-start > p span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #314b3b;
  color: #fff;
  font-family: var(--utility);
  font-size: 7px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.pedigree-start-people {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pedigree-start-people button {
  min-height: 132px;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 17px;
  padding: 10px 17px 10px 10px;
  border: 1px solid rgba(49, 75, 59, .25);
  border-radius: 7px;
  background: #fff;
  color: var(--album-ink);
  text-align: left;
  box-shadow: 0 10px 24px rgba(57, 67, 57, .09);
  cursor: pointer;
}

.pedigree-start-people .family-portrait {
  width: 88px;
  height: 110px;
  border-radius: 4px;
}

.pedigree-start-people button > span {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.pedigree-start-people strong {
  font-family: var(--title);
  font-size: clamp(23px, 2vw, 30px);
  font-weight: 620;
  letter-spacing: -.035em;
  line-height: 1;
}

.pedigree-start-people small {
  color: #778178;
  font-family: var(--utility);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pedigree-start-people button[aria-pressed="true"],
.pedigree-person-main[aria-pressed="true"] {
  border-color: #314b3b;
  box-shadow: 0 0 0 3px rgba(49, 75, 59, .13), 0 12px 28px rgba(57, 67, 57, .12);
}

.pedigree-upcue {
  min-height: 78px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  color: #78827a;
}

.pedigree-upcue::before,
.pedigree-upcue::after {
  content: "";
  width: 1px;
  height: 12px;
  background: #aeb7af;
}

.pedigree-upcue span {
  font-family: var(--utility);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.pedigree-upcue--branches {
  min-height: 92px;
}

.pedigree-parents {
  width: min(100%, 920px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 0 auto;
}

.pedigree-branches {
  display: grid;
  grid-template-columns: repeat(4, minmax(300px, 1fr));
  gap: 12px;
  align-items: start;
}

.pedigree-branches--2 {
  width: min(100%, 790px);
  grid-template-columns: repeat(2, minmax(300px, 1fr));
  margin-inline: auto;
}

.pedigree-branches--1 {
  width: min(100%, 410px);
  grid-template-columns: minmax(0, 1fr);
  margin-inline: auto;
}

.pedigree-branch {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--branch-color) 28%, #c8cec7);
  border-top: 5px solid var(--branch-color);
  border-radius: 6px;
  background: #f8f6ef;
}

.pedigree-branch > header {
  min-height: 126px;
  padding: 20px 19px 17px;
  border-bottom: 1px solid rgba(38, 51, 45, .13);
  background: color-mix(in srgb, var(--branch-color) 8%, #fffdf8);
}

.pedigree-branch > header > span {
  color: color-mix(in srgb, var(--branch-color) 62%, #26332d);
  font-family: var(--utility);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.pedigree-branch > header h2 {
  margin: 7px 0 8px;
  color: var(--album-ink);
  font-family: var(--title);
  font-size: 31px;
  font-weight: 620;
  letter-spacing: -.04em;
  line-height: .94;
}

.pedigree-branch > header p {
  margin: 0;
  color: #778179;
  font-family: var(--font-geist-sans), sans-serif;
  font-size: 9px;
  line-height: 1.4;
}

.pedigree-branch-line {
  position: relative;
  display: grid;
  gap: 0;
  padding: 0 14px 20px 26px;
}

.pedigree-branch-line::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 22px;
  left: 14px;
  width: 1px;
  background: color-mix(in srgb, var(--branch-color) 55%, #cfd4cd);
}

.pedigree-generation {
  position: relative;
  padding-top: 22px;
}

.pedigree-generation::before {
  content: "";
  position: absolute;
  top: 27px;
  left: -15px;
  width: 8px;
  height: 8px;
  border: 2px solid #f8f6ef;
  border-radius: 50%;
  background: var(--branch-color);
  box-shadow: 0 0 0 1px var(--branch-color);
}

.pedigree-generation > h3 {
  margin: 0 0 9px;
  color: #78837a;
  font-family: var(--utility);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.pedigree-generation > div {
  display: grid;
  gap: 8px;
}

.pedigree-person {
  overflow: hidden;
  border: 1px solid rgba(38, 51, 45, .14);
  border-radius: 6px;
  background: #fff;
}

.pedigree-person-main {
  width: 100%;
  min-height: 78px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 7px 10px 7px 7px;
  border: 0;
  background: transparent;
  color: var(--album-ink);
  text-align: left;
  cursor: pointer;
}

.pedigree-person-main .family-portrait {
  width: 56px;
  height: 64px;
  border-radius: 4px;
}

.pedigree-person-main > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.pedigree-person-main strong {
  font-family: var(--title);
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -.015em;
  line-height: 1.08;
}

.pedigree-person-main small,
.pedigree-person-main em {
  color: #79837b;
  font-family: var(--font-geist-sans), sans-serif;
  font-size: 8px;
  font-style: normal;
  line-height: 1.35;
}

.pedigree-person-main em {
  color: #606d64;
}

.pedigree-person-main > svg {
  color: #929c94;
}

.pedigree-person--prominent {
  border-color: rgba(49, 75, 59, .24);
  box-shadow: 0 9px 22px rgba(57, 67, 57, .08);
}

.pedigree-person--prominent .pedigree-person-main {
  min-height: 114px;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  padding: 9px 13px 9px 9px;
}

.pedigree-person--prominent .family-portrait {
  width: 76px;
  height: 94px;
}

.pedigree-person--prominent .pedigree-person-main strong {
  font-size: 24px;
}

.pedigree-siblings {
  padding: 9px;
  border-top: 1px solid rgba(38, 51, 45, .1);
  background: #f4f2ea;
}

.pedigree-siblings > p {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 7px;
  color: #68736b;
  font-family: var(--utility);
  font-size: 6px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.pedigree-siblings > div {
  display: grid;
  gap: 5px;
}

.pedigree-siblings button {
  min-height: 44px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 4px 7px 4px 4px;
  border: 1px solid rgba(38, 51, 45, .11);
  border-radius: 4px;
  background: rgba(255, 255, 255, .82);
  color: var(--album-ink);
  text-align: left;
  cursor: pointer;
}

.pedigree-siblings .family-portrait {
  width: 30px;
  height: 34px;
  border-radius: 3px;
  font-size: 11px;
}

.pedigree-siblings button > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.pedigree-siblings strong {
  overflow: hidden;
  font-family: var(--font-geist-sans), sans-serif;
  font-size: 9px;
  font-weight: 680;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pedigree-siblings small {
  color: #7d877f;
  font-family: var(--utility);
  font-size: 6px;
}

.pedigree-note {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 12px 18px;
  border-top: 1px solid var(--album-rule);
  background: #f3f1e9;
  color: #657168;
  font-family: var(--font-geist-sans), sans-serif;
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

.person-story {
  position: fixed;
  top: calc(var(--masthead) + 18px);
  right: 18px;
  width: min(410px, calc(100% - 36px));
  max-height: calc(100dvh - var(--masthead) - 36px);
  border-color: rgba(38, 51, 45, .22);
  background: rgba(255, 253, 248, .98);
  box-shadow: 0 28px 80px rgba(38, 51, 45, .24);
}

.family-story-intro {
  gap: clamp(34px, 6vw, 90px);
  padding-top: clamp(72px, 8vw, 112px);
  padding-bottom: clamp(72px, 8vw, 112px);
}

.family-story-intro h2,
.family-section-heading h2,
.people-index-heading h2 {
  font-size: clamp(48px, 5.5vw, 82px);
}

.origin-map-card {
  box-shadow: 0 18px 48px rgba(54, 66, 55, .14);
}

.family-history {
  background: #e2e8e1;
  color: var(--album-ink);
}

.family-section-heading--dark .family-eyebrow {
  color: #66756b;
}

.family-section-heading--dark > p,
.branch-history-intro > p:last-child,
.branch-history-moments p {
  color: #5f6d64;
}

.history-branch-tabs button {
  border-color: rgba(38, 51, 45, .16);
  background: rgba(255, 255, 255, .42);
  color: #59675e;
}

.history-branch-tabs button.active {
  border-color: color-mix(in srgb, var(--branch-color) 55%, #738078);
  background: color-mix(in srgb, var(--branch-color) 15%, #fff);
  color: var(--album-ink);
}

.branch-history-panel {
  border-top-color: color-mix(in srgb, var(--branch-color) 52%, #aab3ab);
}

.branch-history-route span {
  color: #68766d;
}

.branch-history-moments li > div {
  border-left-color: rgba(38, 51, 45, .18);
}

.branch-history-moments li > div::before {
  background: #e2e8e1;
}

.history-source-note {
  border-color: rgba(38, 51, 45, .14);
  background: rgba(255, 255, 255, .36);
  color: #65736a;
}

.history-source-note strong {
  color: var(--album-ink);
}

.route-map {
  border-color: rgba(38, 51, 45, .16);
  background: #d4dfdc;
}

.route-map-shore {
  color: rgba(38, 51, 45, .28);
}

.route-map-ocean {
  color: rgba(38, 51, 45, .34);
}

.route-map-stop b {
  border-color: #d4dfdc;
  box-shadow: 0 0 0 1px var(--branch-color);
}

.route-map-stop em {
  color: #33433a;
}

.people-index {
  background: #f5f3ec;
}

.people-index-grid > button {
  background: #fffdf8;
}

@media (hover: hover) and (pointer: fine) {
  .pedigree-start-people button,
  .pedigree-person-main,
  .pedigree-siblings button {
    transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
  }

  .pedigree-start-people button:hover,
  .pedigree-person-main:hover,
  .pedigree-siblings button:hover {
    border-color: rgba(49, 75, 59, .38);
    background: #fff;
    transform: translateY(-2px);
  }

  .atlas-scope-controls button:hover {
    border-color: rgba(49, 75, 59, .38);
    color: #314b3b;
  }

  .atlas-scope-controls button.active:hover {
    color: #fff;
  }
}

@media (max-width: 1120px) {
  .family-atlas-heading {
    grid-template-columns: 1fr;
  }

  .family-atlas-counts {
    justify-content: start;
  }

  .pedigree-branches {
    overflow-x: auto;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(310px, 360px);
    padding-bottom: 12px;
    scroll-snap-type: x proximity;
  }

  .pedigree-branch {
    scroll-snap-align: start;
  }
}

@media (max-width: 760px) {
  .family-atlas {
    padding-top: 40px;
  }

  .family-atlas-heading {
    gap: 24px;
    margin-bottom: 27px;
  }

  .family-atlas-heading h1 {
    font-size: clamp(50px, 15vw, 70px);
  }

  .family-atlas-counts {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .family-atlas-counts strong {
    font-size: 23px;
  }

  .family-atlas-frame {
    width: calc(100% - 18px);
  }

  .family-atlas-toolbar {
    min-height: 58px;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 8px;
  }

  .family-atlas-toolbar > span {
    display: none;
  }

  .pedigree-register {
    padding: 28px 14px 32px;
  }

  .pedigree-start-people,
  .pedigree-parents {
    grid-template-columns: 1fr;
  }

  .pedigree-start-people button {
    min-height: 104px;
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .pedigree-start-people .family-portrait {
    width: 68px;
    height: 84px;
  }

  .pedigree-upcue {
    min-height: 66px;
  }

  .pedigree-branches,
  .pedigree-branches--2,
  .pedigree-branches--1 {
    width: auto;
    grid-auto-columns: min(84vw, 350px);
    margin: 0 -14px;
    padding: 0 14px 12px;
  }

  .pedigree-note {
    align-items: flex-start;
    text-align: left;
  }

  .person-story {
    inset: var(--masthead) 0 0;
    width: 100%;
    max-height: none;
    border-width: 1px 0 0;
    border-radius: 0;
  }

  .family-story-intro h2,
  .family-section-heading h2,
  .people-index-heading h2 {
    font-size: clamp(46px, 14vw, 66px);
  }
}

@media (max-width: 430px) {
  .family-atlas-counts span {
    font-size: 6px;
  }

  .family-atlas-counts strong {
    font-size: 20px;
  }

  .pedigree-person--prominent .pedigree-person-main strong {
    font-size: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pedigree-start-people button,
  .pedigree-person-main,
  .pedigree-siblings button {
    transition: none;
  }
}
