html,
body {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
}

.main {
  display: flex;
  padding: 0;
}

.parent {
  border-bottom: 1px solid transparent;
  box-sizing: border-box;
  font-size: 10px;
  line-height: 1.4;
  display: table-cell;
  height: 100%;
  position: relative;
  vertical-align: bottom;
}

.parent--hover {
  border-bottom-color: #000;
}

.children {
  display: table;
  padding: 0;
  height: 100%;
  min-height: 2em;
  width: 100%;
}

.time-scale {
  display: table;
  height: 700px;
  line-height: 1.17;
  position: relative;
  min-width: 90%;
}

.time-scale a:link {
  color: #00f;
}

.time-scale > * {
  box-sizing: border-box;
}

.time-scale__content {
  display: table-row;
}

.time-scale__inner {
  display: table;
  height: 100%;
  /*min-width: 100%;*/
  overflow: hidden;
  position: relative;
  width: 100%;
}

.time-scale__inner > .parent {
  border-bottom: none;
}

.time-scale__dates {
  font-size: 0.75em;
  margin-top: 0.5em;
  position: relative;
}

.time-scale__dates-inner {
  display: flex;
  justify-content: space-between;
  margin: 0 0 0 0.3em;
}

.time-scale__dates-units {
  font-style: italic;
  left: 100%;
  margin-left: 0.3em;
  top: 0;
  position: absolute;
  width: 10%;
}

.time-scale__legend {
  bottom: 1px;
  font-size: 0.75em;
  font-style: italic;
  left: 100%;
  margin-left: 0.3em;
  position: absolute;
  white-space: nowrap;
  width: 10%;
}

.time-scale__legend div {
  border-bottom: 1px solid transparent;
  box-sizing: content-box;
  height: 2em;
  line-height: 1.9;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.divergence {
  left: 0;
  pointer-events: none;
  position: absolute;
  top: 40%;
  width: 100%;
  white-space: nowrap;
}

.divergence img {
  object-fit: contain;
  height: 100%;
  left: 100%;
  margin-left: 0.6em;
  position: absolute;
  width: auto;
}

.divergence .image--vertical {
  height: 130px;
  width: auto;
}

.divergence .image--horizontal {
  height: auto;
  width: 130px;
}

.divergence__young img {
  bottom: 0;
}

.divergence__inner--compact-right img {
  bottom: 100%;
}

.divergence__ancestor {
  left: 100%;
  margin-left: 0.7em;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.divergence__ancestor img {
  display: block;
  left: 0;
  margin-left: 0;
  transform: none;
  top: auto;
  /*position: static;*/
}

.divergence .age {
  margin-bottom: 0.2em;
  margin-left: 0.3em;
}

.divergence__ancestor .age {
  margin-left: 0;
}

.divergence .name {
  font-size: 1.13em;
  font-weight: normal;
  margin: 0;
  min-width: 11em;
  white-space: normal;
}

.divergence__inner--compact-right .name,
.divergence__ancestor .name {
  white-space: nowrap;
}

.divergence .rank {
  font-size: 0.75em;
  margin-bottom: 0.15em;
}

.divergence__line {
  background: #000;
  height: 2px;
  left: 0;
  position: absolute;
}

.divergence__line:before {
  background: #000;
  content: '';
  height: 120px;
  left: 100%;
  position: absolute;
  transform: translate(0, -50%);
  width: 2px;
}

.divergence--relatives .divergence__line:before {
  display: none;
}

.divergence__young,
.divergence__old {
  background: #000;
  height: 2px;
  left: 100%;
  position: absolute;
}

.divergence__young .content,
.divergence__old .content {
  position: absolute;
  right: 100%;
  text-align: right;
}

.divergence__young .content {
  bottom: 2em;
}

.divergence__old .content {
  top: 1.5em;
}

.divergence__old img {
  top: 0;
}

.divergence .content em {
  font-size: 0.88em;
}

.divergence .source-link {
  font-size: 0.75em;
  font-style: italic;
  pointer-events: visible;
}

.divergence__old {
  top: 60px;
}

.divergence__young {
  top: -60px;
}

.divergence--relatives .divergence__old,
.divergence--relatives .divergence__young {
  top: 0;
}

.divergence--relatives .divergence__inner--equal {
  background: none;
}

.divergence--relatives .divergence__inner--equal:before {
  display: none;
}

.divergence__young:before,
.divergence__old:before {
  background: #000;
  border-radius: 100%;
  content: '';
  display: inline-block;
  height: 8px;
  left: 100%;
  position: relative;
  top: 50%;
  transform: translate(-50%, -50%);
  vertical-align: top;
  width: 8px;
}

.divergence__young-inner,
.divergence__old-inner {
  display: inline-block;
  left: 100%;
  margin-left: -0.5em;
  position: relative;
  top: -0.5em;
  vertical-align: top;
}

.divergence__young-inner.divergence__inner--no-age,
.divergence--relatives .divergence__inner--compact-left .divergence__old-inner {
  top: 1em;
}

.divergence--relatives .divergence__inner--compact-left .divergence__old-inner {
  margin-left: -1.2em;
}

.divergence--relatives.divergence--revert .divergence__inner--compact-left .divergence__young-inner {
  margin-left: -1.2em;
  top: 1em;
}

.divergence--relatives.divergence--revert .divergence__inner--compact-left .divergence__old-inner {
  /*margin-left: 0;*/
  margin-left: 0;
  top: -0.5em;
}

.divergence--relatives.divergence--revert .divergence__inner--compact-left .divergence__old-inner img {
  left: 100%;
  margin-left: 1em;
  top: 0;
}

.divergence--revert .divergence__young .content {
  bottom: auto;
  top: 100%;
}

.divergence--relatives:not(.divergence--revert) .divergence__old .content {
  top: 0.5em;
}

.divergence--relatives:not(.divergence--revert) .divergence__old.divergence__inner--compact-left .content {
  top: 1.5em;
}

.divergence--revert .divergence__old .content {
  bottom: 100%;
  margin-bottom: 0.5em;
  top: auto;
}

.divergence--revert .divergence__young:not(.divergence__inner--compact-left) .age {
  margin: 1.5em 0 0 -0.7em;
  /*
  margin: 1.5em 0 0 -100%;
  position: relative;
  left: -0.6em;
  */
  /*
  position: absolute;
  right: 0.5em;
  top: 1.5em;
  */
}

.divergence--relatives:not(.divergence--revert) .divergence__old:not(.divergence__inner--compact-left) .divergence__old-inner {
  top: 0.5em;
}

.divergence--revert .divergence__old img {
  bottom: 0;
  top: auto;
}

.divergence__inner--compact-left .content {
  left: -8px;
  right: auto;
  text-align: left;
}

.divergence__inner--compact-left img {
  left: 0;
  margin: 0 0 1em;
  transform: none;
}

.divergence__inner--compact-right img {
  left: auto;
  margin-left: 0;
  margin-bottom: 1em;
  right: 0;
  top: auto;
}

.divergence__young.divergence__inner--compact-left img {
  bottom: 100%;
}

.divergence__old.divergence__inner--compact-left img,
.divergence__old.divergence__inner--compact-right img {
  margin-top: 1em;
  top: 100%;
}

.divergence--relatives.divergence--revert .divergence__young.divergence__inner--compact-left img {
  bottom: auto;
  margin-top: 1em;
  top: 100%;
}

.divergence--relatives.divergence--revert .divergence__old.divergence__inner--compact-right img {
  bottom: 100%;
  margin-top: 0;
  top: auto;
}

.divergence--relatives.divergence--revert .divergence__young.divergence__inner--compact-left .divergence__young-inner.divergence__inner--equal img {
  left: 0;
  margin-left: 0;
  margin-top: 1em;
  top: 100%;
}

.divergence__young-inner.divergence__inner--equal {
  /*bottom: 100%;*/
  /*top: auto !important;*/
  top: 1em;
}

.divergence__young-inner.divergence__inner--equal .age {
  display: none;
}

.divergence__old-inner.divergence__inner--equal img {
  bottom: 0;
  top: auto;
}

.divergence__young-inner.divergence__inner--equal img {
  bottom: auto;
  top: 0;
}

.divergence__young.divergence__inner--compact-left .divergence__young-inner.divergence__inner--equal {
  margin-left: -1.2em;
}

.divergence__old.divergence__inner--compact-left .divergence__old-inner.divergence__inner--equal {
  bottom: 0.5em;
  top: auto;
}

.divergence__old.divergence__inner--compact-left .divergence__old-inner.divergence__inner--equal .age {
  margin-left: 1em;
}

.divergence__inner--compact-left .divergence__inner--equal img {
  left: 100%;
  margin-left: 1em;
}


.label {
  display: flex;
  flex-wrap: wrap;
  font-size: 1.2em;
  height: 2em;
  overflow: hidden;
  position: relative;
  word-break: break-all;
  width: 100%;
}

.label__inner {
  flex: 1;
  position: relative;
  width: 100%;
}

.label__inner:before {
  content: ' ';
  width: 1em;
}

.label__text {
  line-height: 1.6;
  overflow: hidden;
  padding: 0.2em;
  position: absolute;
}

.label__text:before {
  content: '';
  display: inline-block;
  margin-right: -0.7em;
  visibility: hidden;
  width: 1em;
}

div {
  box-sizing: border-box;
}

canvas {
  margin-top: 2em;
  max-width: 4600px;
  height: auto;
}

.tooltip {
  background: #fff;
  border-radius: 1em;
  box-shadow: 0 0 1px 0 rgba(0,0,0,0.3);
  left: 50%;
  margin-top: -2.4em;
  opacity: 0;
  padding: 1em 1.5em;
  /*pointer-events: none;*/
  position: fixed;
  text-align: center;
  transform: translate(-50%, -100%);
  transition: opacity 0.3s, visibility 0s 0.3s, z-index 0s 0.3s;
  visibility: hidden;
  white-space: nowrap;
  z-index: -1;
}

.tooltip:after,
.tooltip:before {
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 16px solid #fff;
  content: '';
  left: 50%;
  height: 0;
  margin: -1px 0 0 -12px;
  position: absolute;
  top: 100%;
  width: 0;
}

.tooltip:before {
  border-top-color: rgba(0,0,0,0.05);
  margin-top: 1px;
}

.tooltip--active {
  opacity: 1;
  transition: opacity 0.3s, visibility 0s, z-index 0s;
  visibility: visible;
  z-index: 10;
}

.tooltip--left {
  transform: translate(0, -100%);
}

.tooltip--left:after,
.tooltip--left:before {
  left: 30px;
}

.tooltip--right {
  transform: translate(-100%, -100%);
}

.tooltip--right:after,
.tooltip--right:before {
  left: 100%;
  margin-left: -41px;
}

.tooltip p {
  margin: 0 0 0.3em;
}

.tooltip h4 {
  font-size: 1.12em;
  font-weight: normal;
  line-height: 1;
  margin: 0 0 0.3em;
}

.tooltip p,
.tooltip .link {
  font-size: 0.75em;
}

.tooltip .link {
  font-style: italic;
}

.tooltip a {
  text-decoration: none;
}

.visually-hidden {
  visibility: hidden;
}

.life-forms-list {
  display: none;
}

.selectors-container {
  display: flex;
  gap: 10px;
  margin: 0 10% 0.5em 0;
  position: relative;
  text-align: center;
}

.select-caption {
  background: #f4f4f4;
  border-radius: 10px;
  cursor: pointer;
  display: inline-block;
  font-size: 24px;
  font-family: ALSArtemiusSans, Helvetica Neue, Helvetica, Arial, sans-serif;
  margin: 0 0 10px;
  overflow: hidden;
  padding: 8px 45px 7px 14px;
  position: relative;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
  width: 50%;
}

@media screen and (max-width: 640px) {
  .select-caption {
    max-width: 280px;
  }
}

.select-caption:after {
  background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCAxOSAxMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTcuNSAxTDkuNSA5TDEuNSAwLjk5OTk5OSIgc3Ryb2tlPSIjMzMzMzMzIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=') no-repeat;
  content: '';
  position: absolute;
  right: 10px;
  top: 50%;
  margin-left: 14px;
  margin-top: -5px;
  width: 24px;
  height: 13px;
}

.life-form-list-container {
  background: #f4f4f4;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  left: 0;
  max-height: 400px;
  opacity: 1;
  padding: 15px 20px;
  position: absolute;
  text-align: left;
  top: 100%;
  transition: opacity 0.2s;
  width: 320px;
  z-index: 2;
}

.life-form-list-container.hidden {
  left: -200%;
  opacity: 0;
  transition: opacity 0.2s, left 0s 0.3s;
  z-index: -1;
}

.life-form-list-container .search-wrapper {
  margin-bottom: 15px;
  position: relative;
}

.life-form-list-container .select-input {
  background: #fff;
  border: none;
  box-sizing: border-box;
  border-radius: 10px;
  font-size: 24px;
  font-family: ALSArtemiusSans, Helvetica Neue, Helvetica, Arial, sans-serif;
  padding: 8px 45px 7px 14px;
  outline: none;
  width: 100%;
}

.life-form-list-container .select-input::placeholder {
  color: transparent;
}

.life-form-list-container .select-input:placeholder-shown + .clear-button {
  display: none;
}

.life-form-list-container .clear-button {
  background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTcgMTdMMSAwLjk5OTk5OSIgc3Ryb2tlPSIjMzMzMzMzIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48cGF0aCBkPSJNMSAxN0wxNyAwLjk5OTk5OSIgc3Ryb2tlPSIjMzMzMzMzIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48L3N2Zz4=') no-repeat;
  content: '';
  cursor: pointer;
  height: 27px;
  position: absolute;
  right: 12px;
  top: 11px;
  width: 27px;
}

.life-form-query-list {
  overflow-y: auto;
  overflow-x: hidden;
}

.life-form-query-list::-webkit-scrollbar {
  width: 8px;
}

.life-form-query-list::-webkit-scrollbar-thumb {
  background-color: rgba(0,0,0,0.8);
  border-radius: 4px;
  outline: none;
}

.list-item {
  cursor: pointer;
  font-size: 16px;
  font-family: ALSArtemiusSans, Helvetica Neue, Helvetica, Arial, sans-serif;
  overflow: hidden;
  padding: 9px 10px;
  position: relative;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-item.hidden {
  display: none;
}

.list-item.disabled {
  opacity: 0.6;
  pointer-events: none;
}

.list-item:hover:after {
  background: rgba(0,0,0,0.2);
  content: '';
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
}
