/* Heritage timeline (heritage page): chapters from src/data/timeline.json, decade links and a filter by kind. */
.timeline { list-style: none; margin: 0; padding: 0; }
.tl { scroll-margin-top: calc(var(--header-h) + 70px); }
.tl[hidden], .tl-era[hidden], .decades li[hidden] { display: none; }
.tl-kind { display: block; margin-bottom: 6px; font: 700 0.64rem/1.4 var(--body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

/* Marker shape by kind: square for company milestones, diamond for awards, navy for investments, open for community */
.tl::before { transition: transform 0.3s var(--ease); }
.tl[data-kind="award"]::before { transform: rotate(45deg); }
.tl[data-kind="investment"]::before { background: var(--title-navy); }
.tl[data-kind="community"]::before { background: #fff; border: 2px solid var(--gold); }
.tl.now::before { transform: scale(1.5); }
.tl[data-kind="award"].now::before { transform: rotate(45deg) scale(1.5); }

/* Chapter headings sit on the line with a larger diamond */
.tl-era { position: relative; padding: 4px 0 34px 158px; }
.tl-era::before { content: ""; position: absolute; left: 103px; top: 8px; width: 15px; height: 15px; background: var(--navy); transform: rotate(45deg); }
.tl-era h3 { margin: 0 0 6px; font-size: 1.15rem; }
.tl-era p { margin: 0; max-width: 52ch; color: var(--muted); font-size: 0.92rem; }

/* Decade links stay in reach while reading */
.decades { position: sticky; top: var(--header-h); z-index: 5; margin: 0 0 34px; background: #fff; border-bottom: 1px solid var(--line); }
.decades ol { list-style: none; margin: 0; padding: 0; display: flex; overflow-x: auto; scrollbar-width: none; }
.decades ol::-webkit-scrollbar { display: none; }
.decades a { display: block; padding: 14px 12px 12px; border-bottom: 2px solid transparent; color: var(--muted); font: 700 0.74rem/1 var(--body); letter-spacing: 0.12em; white-space: nowrap; transition: color 0.2s, border-color 0.2s; }
.decades a:hover { color: var(--gold-ink); }
.decades a[aria-current] { color: var(--ink); border-color: var(--gold); }
.decades a:focus-visible { outline: 2px solid var(--title-navy); outline-offset: -2px; }

.tl-filter { border: 0; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tl-filter legend { float: left; width: 100%; margin-bottom: 10px; padding: 0; font: 700 0.72rem/1.4 var(--body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); }
.tl-count { margin: 0 0 10px; min-height: 1.4em; font-size: 0.84rem; color: var(--muted); }

/* The gold line fills as the reader scrolls through the years */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .timeline::after { content: ""; position: absolute; left: 110px; top: 8px; bottom: 8px; width: 2px; margin-left: -0.5px; background: var(--gold); transform-origin: top; animation: tl-fill linear both; animation-timeline: view(); animation-range: cover 50vh cover calc(100% - 50vh); }
  }
}
@keyframes tl-fill { from { transform: scaleY(0); } }

@media (max-width: 640px) {
  .tl-era { padding-left: 32px; }
  .tl-era::before { left: -3px; }
  .timeline::after { left: 4px; }
}
@media (prefers-reduced-motion: reduce) { .tl::before { transition: none; } }
