body {
  background: white;
}

li {
  position: relative;
  margin-top: 40px;
}
li::before {
  position: absolute;
  top: -40px;
  left: 0;
  right: 0;
  background-color: black;
  width: 100%;
  height: 1px;
  content: "";
}
li::after {
  position: absolute;
  top: -40px;
  left: 50%;
  background-color: black;
  width: 1px;
  height: 40px;
  content: "";
}
li:only-child {
  margin-top: 0;
}
li:only-child::before, li:only-child::after {
  content: initial;
}
li:first-child::before {
  left: 50%;
  width: 50%;
}
li:last-child::before {
  right: 50%;
  width: 50%;
}

li > span,
li > strong {
  position: relative;
  display: block;
  margin-bottom: 40px;
  padding: 3px 5px;
  text-align: center;
  color: black;
}
li > span img,
li > strong img {
  display: block;
  background: white;
  margin: -3px auto 5px auto;
  max-height: 120px;
}
li > span + span,
li > strong + span {
  margin-left: 19px;
  align-self: center;
}
li > span + span::before,
li > strong + span::before {
  position: absolute;
  top: 50%;
  left: -20px;
  background-color: black;
  width: 20px;
  height: 1px;
  content: "";
}

ul, li {
  display: flex;
  justify-content: center;
  align-items: baseline;
}

ul {
  padding-left: 0;
  width: 100%;
}

li {
  flex-flow: row wrap;
  white-space: nowrap;
}

li > ul {
  position: relative;
}
li > ul::after {
  position: absolute;
  top: -40px;
  left: 50%;
  background-color: black;
  width: 1px;
  height: 40px;
  content: "";
}

a {
  color: black;
}

.tree {
  display: none;
}

.shown {
  display: block;
}

.deceased, .deceasedName {
  text-decoration: line-through;
}
.deceased img {
  opacity: 0.5;
  filter: saturate(0);
}

.spouse-on-right::after {
  left: 25%;
}
.spouse-on-right:only-child {
  margin-top: 0;
  margin-left: 25%;
}
.spouse-on-right:first-child::before {
  left: 25%;
  width: 75%;
}
.spouse-on-right:last-child::before {
  width: 25%;
}