/* tline — timeline. */
.tline { background: var(--color-navy); color: var(--color-white); padding: var(--space-section-y) 0; }
.tline__inner { max-width: var(--content-max-width); margin: 0 auto; padding: 0 var(--margin); }
.tline__eyebrow  { color: var(--accent-decor); margin: 0 0 12px; }
.tline__headline {
  font-family: var(--font-display-condensed);
  font-weight: var(--weight-poster-heavy);
  text-transform: uppercase;
  font-size: var(--fs-section-headline);
  line-height: 1;
  margin: 0 0 28px;
  text-wrap: balance;
  letter-spacing: .01em;
}
.tline__divider { height: 1px; background: #ffffff33; margin: 0 0 40px; }

.tline__track {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  padding-left: var(--margin);
}
.tline__track::-webkit-scrollbar { display: none; }

.tline__entry { flex: 0 0 auto; width: 280px; padding-right: 24px; display: flex; flex-direction: column; align-items: flex-start; }
.tline__flag  { position: relative; display: inline-block; }
.tline__year {
  display: inline-flex;
  align-items: center;
  padding: 9px 30px 9px 13px;
  background: var(--color-white);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  color: var(--color-navy);
  font-family: var(--font-body);
  font-weight: var(--weight-bold);
  font-size: 13px;
  letter-spacing: .06em;
}
.tline__pole { position: absolute; left: 0; top: 0; width: 2px; height: calc(100% + 18px); background: var(--color-white); }
.tline__connector { display: flex; align-items: center; width: 100%; padding: 16px 0; }
.tline__line {
  flex: 1;
  height: 1px;
  background: repeating-linear-gradient(90deg, #ffffff80 0, #ffffff80 4px, transparent 4px, transparent 8px);
}
/* ---- photo entries ----------------------------------------------------
   Requested on the board (#170): a landscape image in place of the pennant,
   with the year moved above it and to the left. Opt-in per entry, keyed off
   whether a photo is set, so a timeline converts a row at a time and any
   property still running pennants is untouched. */
.tline__entry--photo { width: 320px; }
.tline__date {
  font-family: var(--font-display-condensed);
  font-weight: var(--weight-poster-heavy);
  font-size: 20px;
  line-height: 1;
  letter-spacing: .02em;
  color: var(--color-white);
  margin: 0 0 12px;
}
.tline__photo {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  /* A tinted ground, so a row whose photo has not been supplied yet is a
     quiet empty frame rather than a collapsed gap in the sequence. */
  background: #ffffff1f center / cover no-repeat;
  border-radius: var(--radius-card);
  margin: 0 0 16px;
}
/* The copy lines up with the image rather than sitting inside the gutter the
   pennant layout uses to separate entries. */
.tline__entry--photo .tline__label,
.tline__entry--photo .tline__detail { padding-right: 0; }

.tline__label  { font-family: var(--font-body); font-weight: var(--weight-semibold); font-size: 14px; color: var(--color-white); margin: 0 0 6px; line-height: 1.35; padding-right: 24px; }
.tline__detail { font-family: var(--font-body); font-size: var(--fs-body-sm); color: #ffffffb8; margin: 0; line-height: 1.45; padding-right: 24px; }

/* ---- motion and controls ---------------------------------------------
   The track was built as a bare overflow scroller on the reasoning that a
   scroller needs no JS and works with touch and trackpad. True, and it leaves
   a mouse with nothing: the scrollbar is hidden above, so eight entries in a
   2280px track inside a 1440px viewport showed four and gave no sign the other
   four existed. Reported as the timeline "not moving".

   Arrows first, because that is the part that makes it operable. The drift is
   the part that makes it look alive, and it is deliberately not the reference's
   infinite marquee: this is a dated history from 2005 to 2026, and a loop would
   run 2026 straight back into 2005. It advances to the end and stops. */
.tline__inner { position: relative; }
.tline__controls {
  position: absolute;
  right: var(--margin);
  bottom: 28px;
  display: flex;
  gap: 8px;
}
.tline__arrow {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: inset 0 0 0 1px #ffffff59;
  color: var(--color-white);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), opacity var(--transition-fast);
}
.tline__arrow:hover:not(:disabled) { background: var(--color-white); color: var(--color-navy); }
.tline__arrow:disabled { opacity: .3; cursor: default; }
/* AUTO, not smooth, and deliberately so. The drift writes scrollLeft once a
   frame; under scroll-behavior:smooth each of those writes starts its own
   animated scroll, so the engine is always catching up to a target that moved
   again before it arrived. On a desktop the steps are sub-pixel and the lag
   never shows. On a phone the frames are longer, the steps are several pixels,
   and the lag grows past the tolerance the script uses to tell its own writes
   from the reader's - at which point the row decides it is being scrolled by
   hand and pauses itself. Reported as the timeline not animating on mobile.

   The arrows lose nothing: page() passes behavior:'smooth' in the scrollBy
   options, which applies whatever this property says. */
.tline__track { scroll-behavior: auto; }
/* A hint that the row continues past the right edge, which the hidden
   scrollbar otherwise removes entirely. */
.tline { position: relative; }
.tline__track::after { content: ""; flex: 0 0 var(--margin); }

@media (max-width: 767px) {
  /* Touch has its own affordance and the heading needs the width back.
     The bottom margin is the point: the controls are the last thing inside
     __inner and the divider is the next element after it, full-bleed, so
     without it the arrows sat on the rule. */
  .tline__controls { position: static; margin: 20px 0 26px; }
}
