/* altpunk v3, /timeline: the lanes x decades strip, the decade index above it, and one decade's works
   grouped by year with the families' milestones. Lanes and milestones carry data-skin; the --tl-* values
   are taken from the page before any skin so empty cells and rings stay the same in every lane. */

.tl { --tl-empty: color-mix(in srgb, var(--ink) 7%, transparent); --tl-head: var(--head); --tl-bg: var(--bg); --lab: 140px; }
.tl-grid { display: grid; gap: 2px; }
.tl-row { display: grid; grid-template-columns: var(--lab) repeat(var(--cols), minmax(0, 1fr)); gap: 2px; align-items: stretch; }

/* decade index: one bar per bucket (all works), year every 20 */
.tl-head { height: clamp(64px, 10vw, 110px); margin-bottom: 22px; align-items: end; }
.tl-dec { position: relative; height: 100%; display: grid; align-items: end; padding: 0; border: 0; background: none; cursor: pointer; color: var(--ink-dim); }
.tl-dec__bar { display: block; height: 100%; background: var(--line); border-radius: 2px 2px 0 0; transform: scaleY(var(--h, 0)); transform-origin: bottom; transition: background var(--dur-2), transform var(--dur-4) var(--ease-out); }
.tl-dec:hover .tl-dec__bar { background: var(--ink-dim); }
.tl-dec[aria-pressed="true"] .tl-dec__bar { background: var(--accent); }
.tl-dec[aria-pressed="true"] { color: var(--head); }
.tl-dec:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tl-dec__y { position: absolute; top: 100%; left: 50%; translate: -50% 0; padding-top: var(--space-2); font: 500 9px/1 var(--font-mono); letter-spacing: .06em; white-space: nowrap; }
.tl-dec--pre { margin-right: 4px; }
.tl-dec--pre .tl-dec__bar { background: repeating-linear-gradient(-45deg, var(--line) 0 3px, transparent 3px 6px); }
.tl-dec--pre[aria-pressed="true"] .tl-dec__bar { background: var(--accent); }

/* lanes */
.tl-lane { transition: opacity var(--dur-3); }
.tl-lane.is-dim { opacity: .22; }
.tl-lab { align-self: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding-right: var(--space-2); font: var(--h-weight) var(--step--2)/1.1 var(--font-display); letter-spacing: var(--h-track); text-transform: var(--h-case); color: var(--accent-lift, var(--accent)); text-decoration: none; }
.tl-lab:hover { text-decoration: underline; }
.tl-cell { position: relative; height: 22px; border-radius: 2px; cursor: pointer;
  background: color-mix(in srgb, var(--accent-lift, var(--accent)) calc(var(--v, 0) * 100%), var(--tl-empty)); }
.tl-cell[data-d="pre"] { margin-right: 4px; }
.tl-cell.has-m::after { content: ""; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; translate: -50% -50%; border-radius: 50%; background: var(--tl-head); box-shadow: 0 0 0 1.5px var(--tl-bg); }
.tl-cell.is-sel { box-shadow: 0 0 0 1px var(--tl-head); z-index: 1; }

.tl-legend { display: flex; flex-wrap: wrap; gap: var(--space-4); margin: var(--space-4) 0 0; font: 500 var(--step--2)/1 var(--font-mono); color: var(--ink-dim); }
.tl-key { display: inline-flex; align-items: center; gap: .5em; }
.tl-key i { width: 14px; height: 10px; border-radius: 2px; background: color-mix(in srgb, var(--accent) 25%, var(--tl-empty)); }
.tl-key--hi i { background: var(--accent); }
.tl-key--m i { width: 6px; height: 6px; border-radius: 50%; background: var(--tl-head); }
.tl-filters { margin-top: var(--space-6); }

/* one decade */
.tl-decade { padding-top: var(--space-7); }
.tl-dhead { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-5); }
.tl-dtitle { margin: 0; font-size: var(--step-4); }
.tl-dhead .count { margin: var(--space-2) 0 0; }
.tl-step { display: flex; gap: var(--space-2); }
.tl-step[hidden] { display: none; }
.tl-y { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: var(--space-4); padding-block: var(--space-5); border-top: 1px solid var(--line-soft);
  content-visibility: auto; contain-intrinsic-block-size: auto 260px; }
.tl-y__n { margin: 0; font: 600 var(--step-1)/1.2 var(--font-mono); white-space: nowrap; color: var(--head); font-variant-numeric: tabular-nums; }
.tl-ws, .tl-ms { list-style: none; margin: 0; padding: 0; }
.tl-ws { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: var(--space-2); }
.tl-ms { display: grid; gap: var(--space-2); margin-bottom: var(--space-3); }

.tlw { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: .65em; row-gap: .2em; height: 100%; padding: .65em .8em; border: 1px solid var(--line-soft); border-radius: var(--r-sm); background: var(--bg-2); color: var(--ink); text-decoration: none; transition: border-color var(--dur-2); }
.tlw:hover, .tlw:focus-visible { border-color: var(--accent); }
.tlw:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tlw.is-ess { border-color: var(--line); }
.tlw__dots { grid-row: span 2; display: flex; flex-direction: column; gap: 3px; padding-top: .3em; }
.tlw__dots i { width: 8px; height: 8px; border-radius: var(--marker-r, 50%); background: var(--accent-lift, var(--accent)); }
.tlw__t { color: var(--head); font-weight: 600; line-height: 1.25; }
.tlw.is-ess .tlw__t::after { content: " *"; color: var(--accent); }
.tlw__m { font: 500 var(--step--2)/1.35 var(--font-mono); color: var(--ink-dim); }

.tlm { padding: .75em 1em; border-left: 3px solid var(--accent); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--panel); color: var(--ink); }
.tlm.is-key { box-shadow: inset 0 0 0 1px var(--line); }
.tlm__f { font: 600 var(--step--2)/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); text-decoration: none; }
.tlm__f:hover { text-decoration: underline; }
.tlm__t { display: block; margin: .35em 0 .2em; color: var(--head); font-family: var(--font-display); font-weight: var(--h-weight); }
.tlm__b { margin: 0; font-size: var(--step--1); line-height: 1.5; }

@media (max-width: 640px) {
  .tl { --lab: 60px; } .tl-lab { font: 600 10px/1.1 var(--font-body); letter-spacing: 0; text-transform: none; padding-right: 4px; }
  .tl-grid, .tl-row { gap: 1px; }
  .tl-punk, .tl-dec__y.is-minor { display: none; }
  .tl-cell { height: 18px; }
  .tl-cell.has-m::after { width: 4px; height: 4px; }
  .tl-y { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
}
@media (prefers-reduced-motion: reduce) { .tl-dec__bar, .tl-lane, .tlw { transition: none; } }
