/* ==========================================================================
   Timeline — a sticky year panel that swaps as you scroll, a progress rail,
   and a long column of dated entries. Dark throughout so the year reads as
   the brightest thing on the page.
   ========================================================================== */

/* ---------------- Page head ---------------- */
.tl-head {
  padding-block: clamp(2.5rem, 5vw, 4rem) clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid var(--rule-night);
}
.tl-head__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
}
.tl-head__title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: clamp(.6rem, 2vw, 1.6rem);
  /* Sized so "1913 — 1995" holds one line inside the half-width column. */
  font-size: clamp(2.6rem, 6.2vw, 5.4rem);
  line-height: .95;
  color: var(--paper);
  letter-spacing: -.03em;
}
.tl-head__dash { color: var(--brass); }
.tl-head__lede { max-width: 54ch; }

.tl-key {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  margin-top: 1.8rem;
  list-style: none;
  padding: 0;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--night-mute);
}
.tl-key li { display: flex; align-items: center; gap: .55rem; }
.tl-key__dot { width: .55rem; height: .55rem; border-radius: 50%; display: block; }
.tl-key__dot--her { background: var(--oxblood-br); }
.tl-key__dot--ctx { background: var(--brass); }

@media (max-width: 900px) {
  .tl-head__grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
}

/* ---------------- Track ---------------- */
.tl { padding-block: clamp(2.5rem, 5vw, 4.5rem) clamp(3rem, 6vw, 6rem); }
.tl__grid {
  display: grid;
  grid-template-columns: clamp(13rem, 26vw, 21rem) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

/* Sticky panel */
.tl__panel {
  position: sticky;
  top: 7rem;
  padding-bottom: 2rem;
}
.tl__year {
  font-size: clamp(3.4rem, 7vw, 6rem);
  line-height: .9;
  color: var(--brass-lt);
  letter-spacing: -.03em;
}
.tl__year.is-swap { animation: tlSwap .55s var(--ease); }
@keyframes tlSwap {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
.tl__caption {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--night-mute);
  margin-top: .9rem;
  min-height: 2.4em;
  line-height: 1.6;
}

.tl__bar {
  position: relative;
  height: 3px;
  background: var(--rule-night);
  margin-block: 1.6rem;
  overflow: hidden;
}
.tl__bar-fill {
  position: absolute;
  inset: 0;
  background: var(--oxblood-br);
  transform-origin: left;
  transform: scaleX(0);
}

.tl__rail { display: flex; flex-wrap: wrap; gap: .3rem; }
.tl__rail a {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .06em;
  color: var(--night-mute);
  text-decoration: none;
  padding: .32rem .5rem;
  border: 1px solid transparent;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.tl__rail a:hover { color: var(--brass-lt); border-color: var(--rule-night); }
.tl__rail a.is-active { color: var(--night); background: var(--brass-lt); border-color: var(--brass-lt); }

@media (max-width: 900px) {
  .tl__grid { grid-template-columns: minmax(0, 1fr); }
  .tl__panel { display: none; }
}

/* ---------------- Entries ---------------- */
.tl__list { list-style: none; margin: 0; padding: 0; display: grid; }

.tlx {
  display: grid;
  grid-template-columns: clamp(5.5rem, 10vw, 8.5rem) minmax(0, 1fr);
  gap: clamp(1.2rem, 3vw, 2.8rem);
  padding-block: clamp(2rem, 4vw, 3.2rem);
  border-top: 1px solid var(--rule-night);
  transition: opacity .5s var(--ease);
}
.tlx:last-child { border-bottom: 1px solid var(--rule-night); }

.tlx__meta { position: relative; padding-left: 1.1rem; }
.tlx__meta::before {
  content: "";
  position: absolute;
  left: 0; top: .5rem;
  width: .5rem; height: .5rem;
  border-radius: 50%;
  background: var(--oxblood-br);
}
.tlx--ctx .tlx__meta::before { background: var(--brass); }
.tlx__year { font-size: clamp(1.3rem, 2.2vw, 1.75rem); color: var(--paper); line-height: 1; }
.tlx__tag {
  margin-top: .6rem;
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.tlx__tag--her { color: var(--oxblood-br); }
.tlx__tag--ctx { color: var(--brass); }

.tlx__h {
  font-size: clamp(1.3rem, 2.4vw, 1.95rem);
  color: var(--paper);
  line-height: 1.14;
  margin-bottom: .7rem;
}
.tlx__h em { font-style: italic; }
.tlx__date {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brass-lt);
  margin-bottom: 1rem;
}
.tlx__t { font-size: 1rem; line-height: 1.78; color: var(--night-text); max-width: 62ch; }
.tlx__note {
  margin-top: 1.1rem;
  border-left: 2px solid var(--rule-night);
  padding-left: 1rem;
  font-family: var(--mono);
  font-size: .72rem;
  line-height: 1.75;
  color: var(--night-mute);
  max-width: 58ch;
}
.tlx__fig { margin-top: 1.8rem; max-width: 19rem; }
.tlx__fig .plate { background: var(--night-3); border-color: var(--rule-night); }

/* active entry is subtly lifted */
.tlx.is-active .tlx__year { color: var(--brass-lt); }

@media (max-width: 620px) {
  .tlx { grid-template-columns: minmax(0, 1fr); gap: .8rem; }
  .tlx__meta { display: flex; align-items: baseline; gap: .9rem; }
  .tlx__tag { margin-top: 0; }
}

/* ---------------- Sources note ---------------- */
.tl-note__grid {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(1.8rem, 4vw, 4rem);
  align-items: start;
}
@media (max-width: 820px) {
  .tl-note__grid { grid-template-columns: minmax(0, 1fr); }
}
