/* Timeline — About v4.
 *
 * Six moments along one hairline. An <ol>, because the order is the content —
 * and a list a screen reader walks in order, rather than a row of boxes it has
 * to infer a sequence from.
 */
.pl-timeline__title {
  font-size: var(--step-2);
  letter-spacing: var(--track-tight);
  max-width: 20ch;
  margin: 0 0 var(--sp-2);
}

.pl-timeline__intro {
  margin-bottom: var(--sp-6);
}

/* The rail, and the marker that travels it.
 *
 * The marker is positioned by `--pl-progress`, which assets/js/scroll-progress.js
 * sets on the rail as the section passes up the viewport. The stylesheet owns
 * what the number means; the script only supplies it.
 *
 * `is-scroll-linked` is added by that script, so with no JavaScript — or under
 * reduced motion, where the script opts out — the marker never appears and the
 * timeline is simply a timeline. It is never the thing holding the rail up. */
/* Narrow, the moments stack, so the rail runs *down* the side and the marker
 * travels with the reader rather than across the top of a vertical list. Wide,
 * both turn ninety degrees. The rail is the same element either way; only its
 * border and the axis the marker reads change. */
.pl-timeline__rail {
  position: relative;
  border-left: 2px solid var(--c-origin);
  padding-left: var(--sp-3);
}

.pl-timeline__marker {
  display: none;
  position: absolute;
  left: 0;
  top: calc(var(--pl-progress, 0) * 100%);
  width: 1rem;
  height: 1rem;
  margin-left: -0.5625rem;
  margin-top: -0.5rem;
  background: var(--c-origin);
}

@media (min-width: 48rem) {
  .pl-timeline__rail {
    border-left: 0;
    border-top: 2px solid var(--c-origin);
    padding-left: 0;
  }

  .pl-timeline__marker {
    top: -0.5625rem;
    left: calc(var(--pl-progress, 0) * 100%);
    margin-top: 0;
    margin-left: -0.5rem;
  }
}

.pl-timeline__rail.is-scroll-linked .pl-timeline__marker {
  display: block;
}

.pl-timeline__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

@media (min-width: 48rem) {
  .pl-timeline__list {
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
  }
}

.pl-timeline__moment {
  padding: var(--sp-3) var(--sp-3) var(--sp-4) 0;
  border-bottom: var(--rule) solid var(--c-rule);
}

@media (min-width: 48rem) {
  .pl-timeline__moment {
    padding-inline: var(--sp-3);
    border-bottom: 0;
    border-right: var(--rule) solid var(--c-rule);
  }

  .pl-timeline__moment:first-child {
    padding-left: 0;
  }

  .pl-timeline__moment:last-child {
    border-right: 0;
    padding-right: 0;
  }
}

.pl-timeline__when {
  font-size: 0.75rem;
  margin: 0 0 var(--sp-1);
}

.pl-timeline__what {
  font-weight: 600;
  font-size: var(--step-1);
  line-height: 1.25;
  margin: 0 0 var(--sp-1);
}

.pl-timeline__text {
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0;
  text-wrap: pretty;
}
