/* The history timelines: a line down the page that fills as you scroll, a dot per story, and story
   cards that slide in. Mobile first: the line runs down the left; on wide screens down the middle. */
.hist-hero { padding-bottom: 22px; }
.hist-hero h1 { font-size: clamp(38px, 8.4vw, 88px); }
.hist-hero .eyebrow { color: var(--accent, var(--ink)); }

/* the years, to jump straight to a story */
.tl-years { position: sticky; top: 0; z-index: 5; display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px; margin: 0 0 18px;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); scrollbar-width: none; justify-content: safe center; }
.tl-years::-webkit-scrollbar { display: none; }
.tl-years a { flex: none; font-family: var(--display); font-size: 18px; line-height: 1; padding: 8px 11px; border-radius: 999px; color: var(--ink); text-decoration: none; border: 2px solid var(--line); background: var(--white); }
.tl-years a.is-on { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* the timeline */
.timeline { list-style: none; position: relative; max-width: 1060px; margin: 0 auto 40px; padding: 0 16px 0 52px; display: flex; flex-direction: column; gap: 22px; }
.tl-line { position: absolute; top: 0; bottom: 0; left: 30px; width: 4px; border-radius: 2px; background: var(--line); }
.tl-line i { display: block; width: 100%; height: var(--fill, 0%); border-radius: 2px; background: var(--accent, var(--ink)); transition: height .2s linear; }
.tl-event { position: relative; scroll-margin-top: 70px; }
.tl-dot { position: absolute; left: -30px; top: 26px; width: 20px; height: 20px; border-radius: 50%; background: var(--white); border: 4px solid var(--accent, var(--ink)); box-shadow: 0 0 0 4px var(--white); }
.tl-card { background: var(--white); border: 2px solid var(--line); border-radius: 22px; padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 10px;
  transform: translateY(24px); opacity: 0; transition: transform .6s cubic-bezier(.2, .8, .2, 1), opacity .6s ease; }
.tl-event.is-in .tl-card { transform: none; opacity: 1; }
.no-js .tl-card, .tl-card.no-motion { transform: none; opacity: 1; }
.tl-year { margin: 0; font-family: var(--display); font-size: clamp(48px, 12vw, 72px); line-height: .9; color: var(--accent, var(--ink)); }
.tl-when { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tl-name { margin: 2px 0 0; font-family: var(--display); font-weight: 400; font-size: clamp(30px, 7vw, 40px); line-height: 1.05; letter-spacing: .01em; }
.tl-hook { margin: 0; font-size: 19px; line-height: 1.4; font-weight: 700; }
.tl-how h3 { margin: 0 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.tl-how ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tl-how li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; line-height: 1.4; opacity: .25; transform: translateX(-8px); transition: opacity .4s ease, transform .4s ease; }
.tl-event.is-in .tl-how li { opacity: 1; transform: none; }
.tl-event.is-in .tl-how li:nth-child(2) { transition-delay: .35s; }
.tl-event.is-in .tl-how li:nth-child(3) { transition-delay: .7s; }
.step-n { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--white); display: inline-flex; align-items: center; justify-content: center; font: 800 14px/1 var(--body); }
.tl-haul { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--paper); border: 2px dashed var(--line); }
.tl-haul span { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.tl-haul b { font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.1; }
.tl-after { margin: 0; font-size: 16px; line-height: 1.45; color: #3A3F47; }
.tl-after b { color: var(--ink); }
.tl-lesson { margin: 0; font-size: 17px; line-height: 1.45; font-weight: 700; background: linear-gradient(transparent 55%, var(--mark) 55%); align-self: flex-start; }
.tl-lesson span { display: block; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); background: var(--white); }
.tl-foot { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin-top: 4px; }
.tl-foot .btn { min-height: 50px; padding: 0 22px; font-size: 16px; }
.tl-src { font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.hist-next .btn { align-self: flex-start; min-height: 56px; padding: 0 28px; font-size: 18px; }
.hist-card .card-art b { font-family: var(--display); font-weight: 400; font-size: 48px; color: var(--white); letter-spacing: .02em; }
.hist-hub { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 900px; padding-top: 6px; }
@media (prefers-reduced-motion: reduce) {
  .tl-card, .tl-how li { transition: none; transform: none; opacity: 1; }
}

/* wide screens: the line down the middle, cards either side */
@media (min-width: 900px) {
  .timeline { padding: 0 16px; }
  .tl-line { left: 50%; margin-left: -2px; }
  .tl-event { width: 50%; }
  .tl-event.is-left { align-self: flex-start; padding-right: 40px; }
  .tl-event.is-right { align-self: flex-end; padding-left: 40px; }
  .tl-event.is-left .tl-dot { left: auto; right: -10px; }
  .tl-event.is-right .tl-dot { left: -10px; }
  .timeline { gap: 0; }
  .tl-event + .tl-event { margin-top: -80px; }
}
@media (max-width: 640px) {
  .hist-hub { grid-template-columns: minmax(0, 1fr); }
  .tl-foot .btn, .hist-next .btn { width: 100%; }
}

/* a real photo of the place or thing in each story, flush with the top of the card */
.tl-photo { margin: -20px -20px 6px; }
.tl-photo img { display: block; width: 100%; height: 230px; object-fit: cover; border-radius: 20px 20px 0 0; background: var(--paper); }
.tl-photo figcaption { padding: 9px 20px 0; font-size: 13px; line-height: 1.4; color: var(--muted); }
.tl-photo figcaption a { color: inherit; font-size: 12px; overflow-wrap: anywhere; text-decoration-color: rgba(90, 96, 107, .4); text-underline-offset: 2px; }
.tl-photo figcaption a:hover { color: var(--ink); }
@media (min-width: 900px) { .tl-photo img { height: 270px; } }
