/* Timeline - cards hang off a vertical rail; on reveal they slide into true order with the year gaps between. */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tl { position: relative; }
.tl-end { margin: 0 0 6px 34px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tl-end:last-of-type { margin: 6px 0 0 34px; }
.tl-cards { list-style: none; margin: 0; padding: 0 0 0 34px; position: relative; }
.tl-cards::before { content: ""; position: absolute; left: 13px; top: 6px; bottom: 6px; width: 3px; border-radius: 3px;
  background: linear-gradient(var(--line), var(--accent)); }
.tl-card { position: relative; display: flex; align-items: stretch; gap: 6px; margin: 0 0 10px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); will-change: transform; }
.tl-dot { position: absolute; left: -27px; top: 50%; width: 13px; height: 13px; margin-top: -6px; border-radius: 50%;
  background: var(--card); border: 3px solid var(--accent); }
.tl-pick { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 12px 4px 12px 12px;
  min-height: 64px; background: none; border: 0; color: var(--ink); font: inherit; cursor: pointer; border-radius: var(--radius); }
.tl-pos { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem;
  background: var(--tint); color: var(--accent); font-variant-numeric: tabular-nums; }
.tl-text { font-size: .98rem; line-height: 1.35; overflow-wrap: anywhere; }
.tl-move { display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.tl-arrow { flex: 1; width: 48px; min-height: 44px; border: 0; background: none; color: var(--muted); font-size: .9rem; cursor: pointer; }
.tl-arrow:first-child { border-bottom: 1px solid var(--line); border-top-right-radius: var(--radius); }
.tl-arrow:last-child { border-bottom-right-radius: var(--radius); }
.tl-arrow:hover:not(:disabled), .tl-pick:hover { color: var(--accent); }
.tl-arrow:disabled { opacity: .25; cursor: default; }
.tl-card.is-selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), var(--shadow); transform: scale(1.01); }
.tl-card.is-selected .tl-pos { background: var(--accent); color: var(--accent-ink); }
.has-selection .tl-card:not(.is-selected) .tl-pick { cursor: copy; }
.has-selection .tl-card:not(.is-selected) { border-style: dashed; }
.tl-actions { margin: 14px 0 0 34px; }
.tl-actions .btn { width: 100%; }
.tl-credit { margin: 14px 0 0 34px; font-size: .82rem; color: var(--muted); }
.tl-credit a { color: var(--muted); }

/* revealed */
.tl-card.is-revealed { flex-wrap: wrap; }
.tl-card.is-revealed .tl-pick { cursor: default; padding-bottom: 2px; min-height: 0; }
.tl-pick:disabled { opacity: 1; }
.tl-date { display: block; margin-top: 2px; font-size: .8rem; color: var(--muted); }
.tl-meta { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; padding: 0 12px 4px 48px; font-size: .88rem; }
.tl-year { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; animation: tl-pop .35s ease-out both; }
.tl-verdict { font-weight: 600; }
.tl-wiki { margin-left: auto; display: inline-flex; align-items: center; min-height: 44px; }
.is-good { border-color: var(--good); }
.is-good .tl-dot { border-color: var(--good); background: var(--good); }
.is-good .tl-verdict, .is-good .tl-year { color: var(--good); }
.is-bad { border-color: var(--bad); }
.is-bad .tl-dot { border-color: var(--bad); }
.is-bad .tl-verdict, .is-bad .tl-year { color: var(--bad); }
.is-good .tl-pos { background: var(--good); color: #fff; }
.is-bad .tl-pos { background: var(--bad); color: #fff; }
.tl-gap { margin: -4px 0 6px; padding-left: 12px; font-size: .8rem; font-weight: 600; color: var(--muted); animation: tl-fade .4s .3s ease-out both; }
.tl-gap span { background: var(--bg); padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); }
.tl-rline { margin: 0; color: var(--muted); }
.tl-links a { margin: 0 4px; }
@keyframes tl-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes tl-fade { from { opacity: 0; } to { opacity: 1; } }

/* archive */
.tl-archive { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.tl-archive a { display: flex; flex-direction: column; justify-content: center; min-height: 52px; padding: 8px 12px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.tl-archive a:hover { border-color: var(--accent); }
.tl-archive small { color: var(--muted); }
.tl-archive .done { color: var(--good); }

@media (max-width: 360px) {
  .tl-cards { padding-left: 26px; } .tl-cards::before { left: 8px; } .tl-dot { left: -23px; }
  .tl-end, .tl-actions, .tl-credit { margin-left: 26px; } .tl-arrow { width: 44px; } .tl-text { font-size: .93rem; }
}
@media (prefers-reduced-motion: reduce) { .tl-card { transform: none !important; } }
