.timeline-section { padding-block: clamp(32px, 4vw, 64px); }
.timeline-explorer {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(240px, 1fr);
  margin-top: 22px;
  overflow: clip;
  border: 1px solid #233d40;
  border-radius: 14px;
  background: #142b2e;
  box-shadow: 0 9px 26px #28231715;
}
.timeline-chart {
  --label-width: clamp(92px, 12vw, 165px);
  --grid-gap: 12px;
  padding: 20px clamp(12px, 2vw, 30px) 15px;
  background: radial-gradient(ellipse at 80% 0, #254948 0%, transparent 66%), #152b2e;
  color: #fcf6e9;
}
.timeline-axis {
  position: relative;
  height: 34px;
  margin-inline: calc(var(--label-width) + var(--grid-gap) + 8px) 8px;
  color: #e5d7b7;
  font-size: .85rem;
}
.timeline-axis span { position: absolute; inset-inline-start: var(--position); transform: translateX(50%); white-space: nowrap; }
.timeline-axis span:first-child { transform: none; }
.timeline-axis span:last-child { transform: translateX(100%); }
.timeline-row {
  display: grid;
  grid-template-columns: var(--label-width) minmax(0, 1fr);
  gap: var(--grid-gap);
  width: 100%;
  min-height: 42px;
  align-items: center;
  padding: 5px 8px;
  border: 0;
  border-bottom: 1px solid #e4ddc014;
  color: #ecefe9;
  background: transparent;
  text-align: start;
  font-size: .94rem;
}
.timeline-row-label { font-weight: 600; line-height: 1.45; }
.timeline-row[aria-checked="true"] { color: #ffdc98; background: #f5cc8213; border-radius: 5px; }
.timeline-row:hover { background: #f5e5bf14; }
.timeline-row:focus-visible { outline-color: #f6cb7e; outline-offset: -2px; border-radius: 5px; }
.timeline-track { position: relative; height: 12px; border-radius: 10px; background: #e8e5ce15; }
.timeline-track::before { content: ""; position: absolute; inset: -14px 0; background: var(--timeline-guides); pointer-events: none; }
.timeline-span, .timeline-shared { position: absolute; inset-block: 0; border-radius: inherit; }
.timeline-span { background: color-mix(in srgb, var(--tone) 50%, #ffe9bf); }
.timeline-row[aria-checked="true"] .timeline-span { background: #f3cc82; box-shadow: 0 0 0 2px #f2da9e31; }
.timeline-shared, .timeline-key-overlap {
  background: repeating-linear-gradient(135deg, #196661 0 3px, #93d7bb 3px 5px);
}
.timeline-legend { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 16px; color: #e3e7dc; font-size: .875rem; }
.timeline-legend span { display: inline-flex; align-items: center; gap: 6px; }
.timeline-legend i { width: 20px; height: 8px; border-radius: 8px; }
.timeline-key-selected { background: #f3cc82; }
.timeline-feature {
  position: relative;
  isolation: isolate;
  min-width: 0;
  display: grid;
  align-content: end;
  color: #fffaf0;
  background: #172b2b;
}
.timeline-art, .timeline-art::after { position: absolute; inset: 0; }
.timeline-art { z-index: -1; overflow: hidden; }
.timeline-art img { width: 100%; height: 100%; object-fit: cover; }
.timeline-art::after { content: ""; background: linear-gradient(0deg, #102123 0%, #102123f5 21%, #102123df 46%, #15282a40 78%, transparent); }
.timeline-story { padding: 24px clamp(18px, 2.2vw, 32px); }
#timeline-period { color: #ffda94; font-size: 1rem; font-weight: 700; }
#timeline-feature-title { margin-block: 3px 6px; font-size: clamp(1.35rem, 2.15vw, 2rem); line-height: 1.55; }
#timeline-intro { color: #f0eee6; line-height: 1.6; }
#timeline-overlap { margin-top: 7px; color: #bde2cf; font-size: .94rem; }
#timeline-details {
  margin-top: 15px;
  padding: 7px 16px;
  min-height: 44px;
  background: #edc486;
  color: #241d16;
  border: 1px solid #f0c98f;
  border-radius: 6px;
  font-weight: 700;
}
#timeline-details:hover { background: #f7d8a9; }
.timeline-figures { border-top: 1px solid #f5e5bf45; margin-top: 16px; padding-top: 11px; }
.timeline-figures h4 { margin: 0; font-size: .94rem; }
.timeline-figures ul { display: flex; flex-wrap: wrap; gap: 4px 7px; list-style: none; padding: 0; margin: 6px 0; }
.timeline-figures li a { display: block; padding: 2px 8px; border: 1px solid #f5e5bf50; border-radius: 5px; background: #15282ad9; font-size: .9rem; }
.timeline-figures li a:hover { border-color: var(--gold); }
.timeline-figures .figure-directory-link { color: #ffda94; font-size: .9rem; }
.timeline-table { width: 100%; border-collapse: collapse; text-align: start; }
.timeline-table caption { text-align: start; padding: 8px; font-family: var(--heading); font-weight: 700; }
.timeline-table th, .timeline-table td { padding: 7px 8px; text-align: start; }
.timeline-table thead { background: var(--paper-deep); }
.timeline-table tbody tr + tr { border-top: 1px solid var(--line); }
.timeline-table button { background: transparent; border: 0; padding: 3px 0; color: var(--bronze); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 900px) {
  .timeline-explorer { grid-template-columns: minmax(0, 1.4fr) minmax(220px, 1fr); }
  .timeline-chart { --label-width: 94px; --grid-gap: 8px; }
  .timeline-axis span:nth-child(2), .timeline-axis span:nth-child(4) { display: none; }
}
@media (max-width: 700px) {
  .timeline-explorer { grid-template-columns: minmax(0, 1fr); }
  .timeline-chart { --label-width: clamp(80px, 24vw, 124px); padding: 14px 8px; }
  .timeline-row { min-height: 44px; font-size: .9rem; }
  .timeline-legend { margin-inline: 8px; }
  .timeline-art { inset-inline-start: 40%; }
  .timeline-art::after { background: linear-gradient(to left, #172b2b 0%, #172b2be8 36%, #172b2ba6 84%, #172b2b7d); }
  .timeline-story { padding: 18px; }
  .timeline-table { font-size: .9rem; }
  .timeline-table th, .timeline-table td { padding: 6px 4px; }
}
