/* Timeline (storyline and case pages), the column beside it, the strip on a story, the index of other timelines.
   Colours and fonts come from the design system tokens; --ad-tl-top (the sticky nav band plus a gap) is set by ad-timeline.js. */

/* the column beside the timeline: the story so far and the facts, held in view while the timeline scrolls (a tall one holds at its foot) */
@media (min-width: 769px) {
  .fl-col-group:has(> .ad-rail) { display: flex; align-items: stretch; }
  .fl-col-group:has(> .ad-rail)::before, .fl-col-group:has(> .ad-rail)::after { display: none; }
  .ad-rail.is-sticky > .fl-col-content { position: sticky; top: var(--ad-rail-top, var(--ad-tl-top, 72px)); }
}
.ad-rail .ad-lede { font-size: 1rem; line-height: 1.6; }
.ad-rail .ad-sl-summary, .ad-rail .ad-case-about { margin-bottom: 24px; }

/* the timeline */
.ad-tl { margin-bottom: 56px; }
.ad-tl__top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; padding-bottom: 14px; border-bottom: 2px solid var(--ad-fg); }
.ad-tl__top .ad-sideh { margin: 0; }
.ad-tl__ctls { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.ad-tl__ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ad-tl__ctl > span { margin-right: 4px; font-family: var(--ds-font-readout); font-size: 0.75rem; color: var(--ad-soft); }
.ad-sec a.ad-tl__opt { padding: 5px 11px; border: 1px solid var(--ad-rule); border-radius: 2px; font-size: 0.875rem; font-weight: 600; line-height: 1.2; color: var(--ad-fg); text-decoration: none; }
.ad-sec a.ad-tl__opt:is(:hover, :focus-visible) { border-color: var(--ad-fg); }
.ad-sec a.ad-tl__opt[aria-current] { background: var(--ad-fg); border-color: var(--ad-fg); color: var(--ds-color-paper); }

.ad-tl__month { margin-top: 32px; }
.ad-tl__mh { margin: 0 0 4px; padding-bottom: 8px; border-bottom: 1px solid var(--ad-rule); font-family: var(--ds-font-display); font-size: 1.25rem; font-weight: 780; line-height: 1.2; letter-spacing: -0.015em; color: var(--ad-fg); }
.ad-tl__days { list-style: none; margin: 0; padding: 0; }
.ad-tl__day { --g: 3rem; position: relative; display: grid; grid-template-columns: var(--g) minmax(0, 1fr); column-gap: 32px; padding: 6px 0; }
/* one line down the days, a ring on each day; a filled ring marks a day with a key moment */
.ad-tl__day::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--g) + 15px); width: 1px; background: var(--ad-rule); }
.ad-tl__day:first-child::before { top: 18px; }
.ad-tl__day:last-child::before { bottom: auto; height: 18px; }
.ad-tl__day:only-child::before { display: none; }
.ad-tl__day::after { content: ""; position: absolute; top: 14px; left: calc(var(--g) + 11px); box-sizing: border-box; width: 9px; height: 9px; border: 1.5px solid var(--ad-fg); border-radius: 50%; background: var(--ds-color-paper); }
.ad-tl__day.is-key::after { background: var(--ds-color-signal); border-color: var(--ds-color-signal); }
/* Upcoming: scheduled steps, not developments yet; dashed line, hollow dot */
.ad-tl__day.is-next::before { background: none; border-left: 1px dashed var(--ad-rule); }
.ad-tl__day.is-next::after { border-style: dashed; }
.ad-tl__date { display: grid; justify-items: end; align-content: start; padding-top: 5px; font-variant-numeric: tabular-nums; color: var(--ad-fg); }
.ad-tl__date span { font-family: var(--ds-font-readout); font-size: 0.6875rem; line-height: 1.2; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ad-soft); }
.ad-tl__date b { font-family: var(--ds-font-display); font-size: 1.5rem; font-weight: 800; line-height: 1.05; }
.ad-tl__evs { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
/* several developments on one day: a rule and air between them */
.ad-tl__ev + .ad-tl__ev { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--ad-rule); }
.ad-tl__ev { scroll-margin-top: calc(var(--ad-tl-top, 72px) + 8px); }
.ad-tl__ev summary, .ad-tl__ev > .ad-tl__t { display: flex; align-items: baseline; gap: 16px; margin-left: -10px; padding: 9px 10px; border-radius: 2px; }
.ad-tl__ev summary { cursor: pointer; list-style: none; }
.ad-tl__ev summary::-webkit-details-marker { display: none; }
.ad-tl__ev summary::after { content: "+"; flex: none; margin-left: auto; font-family: var(--ds-font-readout); font-size: 1rem; line-height: 1; color: var(--ad-soft); transition: transform 180ms ease; }
.ad-tl__ev details[open] > summary::after { transform: rotate(45deg); }
.ad-tl__ev summary:is(:hover, :focus-visible) { background: var(--ad-hover); }
.ad-tl__ev:target summary, .ad-tl__ev:target > .ad-tl__t { background: color-mix(in srgb, var(--ds-color-signal) 16%, transparent); }
.ad-tl__t { font-family: var(--ds-font-display); font-size: 1.0625rem; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; color: var(--ad-fg); text-wrap: pretty; }
.ad-tl__more { padding: 4px 0 16px; }
.ad-sec .fl-rich-text p.ad-tl__detail, .ad-tl__detail { max-width: 42em; margin: 0 0 12px; font-size: 1rem; line-height: 1.5; color: var(--ad-fg); }
/* a rolled-up group (data-closed): its stories in two aligned columns, who and what */
@media (min-width: 701px) {
  .ad-tl .ad-tl__ev details[data-closed] .ad-case-docs a { display: grid; grid-template-columns: 12.5em minmax(0, 1fr); gap: 10px; align-items: baseline; }
  .ad-tl .ad-tl__ev details[data-closed] .ad-case-doc__kind { justify-self: start; }
}
@media (prefers-reduced-motion: reduce) { .ad-tl__ev summary::after { transition: none; } }
@media (max-width: 600px) {
  .ad-tl__day { --g: 2.5rem; column-gap: 26px; }
  .ad-tl__t { font-size: 1rem; }
}

/* the strip on a story: the storyline's developments in a row, oldest on the left */
.ad-strip { margin: 0 0 36px; padding: 14px 0 6px; border-top: 2px solid var(--ad-fg); border-bottom: 1px solid var(--ad-rule); }
.ad-strip__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 4px; }
.ad-strip__name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; min-width: 0; }
.ad-sec .ad-strip__name a { font-family: var(--ds-font-display); font-size: 1.0625rem; font-weight: 780; line-height: 1.2; letter-spacing: -0.015em; color: var(--ad-fg); text-decoration: none; }
.ad-sec .ad-strip__name a:is(:hover, :focus-visible) { text-decoration: underline; text-decoration-color: var(--ds-color-signal); text-decoration-thickness: 2px; }
.ad-strip__name > span { font-family: var(--ds-font-readout); font-size: 0.75rem; color: var(--ad-soft); }
.ad-strip__nav { display: none; flex: none; gap: 6px; }
.ad-strip.is-scroll .ad-strip__nav { display: flex; }
.ad-strip .ad-strip__btn { display: grid; place-items: center; width: 32px; height: 32px; margin: 0; padding: 0; border: 1px solid var(--ad-rule); border-radius: 50%; background: transparent; color: var(--ad-fg); cursor: pointer; box-shadow: none; }
.ad-strip .ad-strip__btn:is(:hover, :focus-visible):not(:disabled) { border-color: var(--ad-fg); background: transparent; color: var(--ad-fg); }
.ad-strip .ad-strip__btn:disabled { opacity: 0.35; cursor: default; }
.ad-strip__list { position: relative; display: flex; list-style: none; margin: 0; padding: 0 0 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; overscroll-behavior-x: contain; }
.ad-strip__ev { position: relative; flex: 0 0 200px; scroll-snap-align: start; }
/* the line runs through the dots, from the first dot to the last */
.ad-strip__ev::before { content: ""; position: absolute; top: 21px; left: 0; right: 0; height: 1px; background: var(--ad-rule); }
.ad-strip__ev:first-child::before { left: 50%; }
.ad-strip__ev:last-child::before { right: 50%; }
.ad-strip__ev:only-child::before { display: none; }
.ad-sec .ad-strip__ev a { position: relative; display: grid; justify-items: center; gap: 4px; padding: 14px 10px 4px; text-align: center; color: var(--ad-fg); text-decoration: none; }
.ad-strip__dot { box-sizing: border-box; width: 13px; height: 13px; margin-bottom: 4px; border: 1.5px solid var(--ad-fg); border-radius: 50%; background: var(--ds-color-paper); }
.ad-strip__ev.is-here .ad-strip__dot { border: 3px solid var(--ad-fg); background: var(--ds-color-signal); }
.ad-strip__ev time { font-family: var(--ds-font-readout); font-size: 0.75rem; line-height: 1.3; color: var(--ad-soft); font-variant-numeric: tabular-nums; }
.ad-strip__t { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 0.875rem; font-weight: 500; line-height: 1.3; }
.ad-strip__ev.is-here .ad-strip__t { font-weight: 750; }
.ad-sec .ad-strip__ev a:is(:hover, :focus-visible) .ad-strip__t { text-decoration: underline; text-decoration-color: var(--ds-color-signal); text-decoration-thickness: 2px; }

/* the index of other timelines */
.ad-more-tl { padding-top: 40px; border-top: 2px solid var(--ad-fg); }
.ad-more-tl__list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); column-gap: 40px; }
.ad-more-tl__list li { border-bottom: 1px solid var(--ad-rule); }
.ad-sec .ad-more-tl__list a { display: grid; gap: 3px; padding: 12px 0; color: var(--ad-fg); text-decoration: none; }
.ad-more-tl__name { font-family: var(--ds-font-display); font-size: 1.0625rem; font-weight: 760; line-height: 1.25; letter-spacing: -0.01em; }
.ad-sec .ad-more-tl__list a:is(:hover, :focus-visible) .ad-more-tl__name { text-decoration: underline; text-decoration-color: var(--ds-color-signal); text-decoration-thickness: 2px; }
.ad-more-tl__meta { font-family: var(--ds-font-readout); font-size: 0.75rem; color: var(--ad-soft); font-variant-numeric: tabular-nums; }
