.timeline-html,
.timeline-page {
  background-color: var(--black);
}

.timeline-page {
  color: var(--text-light);
}

.timeline-section {
  position: relative;
  width: calc(100% - (var(--page-side-border-width) * 2));
  max-width: var(--page-max-width);
  margin: 0 auto;
  background-color: var(--navy);
  min-height: calc(100vh - var(--header-height) - var(--header-gold-bar-height));
  padding: 0 20px 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.timeline-section::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--timeline-left);
  width: 0;
  border-left: 4px dotted var(--line-dot);
  opacity: 0.95;
  z-index: 0;
}

.timeline-wrapper {
  position: relative;
  z-index: 1;
  max-width: var(--max-content-width);
  margin: 0;
  padding-top: 54px;
  padding-left: 0;
  padding-bottom: 40px;
}

.timeline-event {
  position: relative;
  display: grid;
  grid-template-columns: var(--content-left) 1fr;
  column-gap: 0;
  min-height: var(--circle-size);
  margin-bottom: var(--event-gap);
  z-index: 1;
}

.timeline-date {
  position: relative;
  z-index: 2;
  width: var(--circle-size);
  height: var(--circle-size);
  margin-left: calc(var(--timeline-left) - (var(--circle-size) / 2));
  border-radius: 50%;
  background-color: var(--gold);
  color: var(--date-text);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 900;
  font-size: 12px;
  line-height: 1.05;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 0 var(--date-text-shadow);
  box-shadow: 0 0 0 2px var(--circle-outline);
  overflow: hidden;
  padding: 4px;
}

.timeline-content {
  padding-top: 1px;
  max-width: 1080px;
}

.timeline-title {
  margin: 0 0 2px 0;
  font-size: 20px;
  line-height: 1.15;
  font-weight: 700;
  color: var(--text-light);
}

.timeline-description {
  margin: 0;
  font-size: 13px;
  line-height: 1.25;
  color: var(--text-light);
}

.timeline-note {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.25;
  color: var(--text-muted);
  font-style: italic;
}

.timeline-sources {
  margin-top: 9px;
  font-size: 13px;
  line-height: 1.35;
}

.timeline-sources a {
  color: var(--gold);
  text-decoration: none;
  margin-right: 12px;
  white-space: nowrap;
  font-weight: 700;
}

.timeline-sources a:hover,
.timeline-sources a:focus {
  text-decoration: underline;
}

.timeline-error {
  padding: 40px 70px;
  color: var(--white);
  font-size: 16px;
  line-height: 1.4;
}

.timeline-section .site-disclaimer {
  position: relative;
  z-index: 2;
}

@media (max-width: 900px) {
  :root {
    --timeline-left: 58px;
    --content-left: 102px;
  }
}

@media (max-width: 800px) {
  .timeline-html,
  .timeline-page {
    background-color: var(--navy);
  }

  .timeline-section {
    width: 100%;
    max-width: none;
    min-height: calc(100vh - var(--header-height) - var(--header-gold-bar-height));
  }
}

@media (max-width: 700px) {
  :root {
    --timeline-left: 38px;
    --circle-size: 54px;
    --content-left: 84px;
    --event-gap: 32px;
  }

  .timeline-section {
    padding: 0 14px 0 0;
  }

  .timeline-section::before {
    border-left-width: 3px;
  }

  .timeline-wrapper {
    padding-top: 34px;
    padding-bottom: 38px;
  }

  .timeline-date {
    font-size: 11px;
    line-height: 1.05;
    padding: 4px;
  }

  .timeline-title {
    font-size: 18px;
    line-height: 1.22;
    margin-bottom: 6px;
  }

  .timeline-description {
    font-size: 15px;
    line-height: 1.45;
  }

  .timeline-note {
    font-size: 13px;
    line-height: 1.4;
  }

  .timeline-sources {
    font-size: 14px;
    line-height: 1.45;
  }

  .timeline-sources a {
    display: block;
    margin: 6px 0;
    white-space: normal;
  }

  .timeline-error {
    padding: 28px 24px;
    font-size: 15px;
  }
}

@media (max-width: 420px) {
  :root {
    --timeline-left: 34px;
    --circle-size: 50px;
    --content-left: 76px;
    --event-gap: 30px;
  }

  .timeline-section {
    padding-right: 12px;
  }

  .timeline-wrapper {
    padding-top: 30px;
    padding-bottom: 36px;
  }

  .timeline-date {
    font-size: 10px;
    letter-spacing: 0;
  }

  .timeline-title {
    font-size: 17px;
    line-height: 1.24;
  }

  .timeline-description {
    font-size: 14px;
    line-height: 1.45;
  }

  .timeline-note {
    font-size: 12px;
    line-height: 1.4;
  }

  .timeline-sources {
    font-size: 13px;
    line-height: 1.45;
  }
}
