.institutional .history-heading {
  position: relative;
  isolation: isolate;
}

.history-photos {
  position: absolute;
  inset: 0;
  z-index: -1;
  isolation: isolate;
  pointer-events: none;
  opacity: .34;
  mask-image: linear-gradient(to right, transparent 42%, #000 69%, #000 96%, transparent),
    linear-gradient(to bottom, #000 55%, transparent);
  mask-composite: intersect;
}

.history-photos .history-photo {
  position: absolute;
  inset: 0 0 auto auto;
  width: auto;
  height: auto;
  max-width: 64%;
  max-height: 100%;
  mask-image: linear-gradient(to right, transparent, #000 24%);
  opacity: 0;
  mix-blend-mode: plus-lighter;
}

.history-photos .is-current {
  opacity: 1;
}

.institutional .history-heading .editorial-date {
  font-variant-numeric: tabular-nums;
}

.history-date-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.history-year-slot {
  display: inline-grid;
}

.history-year-slot::before,
[data-history-year] {
  grid-area: 1 / 1;
}

.history-year-slot::before {
  content: attr(data-history-start);
  visibility: hidden;
}

[data-history-year] {
  contain: inline-size;
  text-align: center;
}

[data-history-destination][hidden] {
  display: inline;
  visibility: hidden;
}

@media (max-width: 900px) {
  .institutional .history-heading .editorial-date {
    justify-self: end;
  }

  .history-photos {
    opacity: .24;
    mask-image: linear-gradient(to right, transparent 9%, #000 68%, #000 94%, transparent),
      linear-gradient(to bottom, #000 24%, transparent 80%);
  }

  .history-photos .history-photo {
    max-width: 100%;
    mask-image: linear-gradient(to right, transparent, #000 24%),
      linear-gradient(to bottom, #000 72%, transparent);
    mask-composite: intersect;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .history-motion .history-scroll::after {
    content: "";
    display: block;
    height: 125vh;
    height: 125svh;
  }

  .history-motion .institutional .history-heading {
    position: sticky;
    top: var(--history-global-header, 142px);
    top: min(var(--history-global-header, 142px), calc(100svh - var(--history-heading-height, 0px)));
  }

  @media (max-width: 900px), (max-height: 600px), (pointer: coarse) {
    .history-motion .history-scroll::after {
      height: clamp(390px, 72vh, 650px);
      height: clamp(390px, 72svh, 650px);
    }
  }
}
