/* The storyline page ([ad_storyline_page], includes/storyline-page.php). 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.
   One rule for clicks: a link goes somewhere, a button changes what is shown, nothing else reacts to the pointer. */

.adsp { --adsp-bar: calc(var(--ad-tl-top, 72px) - 24px); color: var(--ad-fg); container-type: inline-size; }
.adsp ul, .adsp ol, .adsp dl, .adsp dd, .adsp h2, .adsp h3 { margin: 0; padding: 0; list-style: none; }
.ad-sec .adsp a { color: var(--ad-fg); text-decoration: none; }
.ad-sec .adsp :is(.adsp-src__t, .adsp-story__t, .adsp-people span):is(a, a *), .ad-sec .adsp .adsp-src__t > a { text-decoration: none; }
.ad-sec .adsp a.adsp-src__t:is(:hover, :focus-visible), .ad-sec .adsp .adsp-src__t > a:is(:hover, :focus-visible),
.ad-sec .adsp a:is(:hover, :focus-visible) :is(.adsp-story__t, .adsp-people__n),
.ad-sec .adsp .adsp-people a:is(:hover, :focus-visible) span:last-child { text-decoration: underline; text-decoration-color: var(--ds-color-signal); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.adsp-n { font-family: var(--ds-font-readout); font-size: 0.75rem; line-height: 1.3; font-weight: 400; color: var(--ad-soft); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.adsp-ext { display: inline-block; width: 0.7em; height: 0.7em; margin-left: 0.3em; }

/* buttons: one shape, and the pressed one is filled */
.ad-sec .adsp button.adsp-btn { appearance: none; margin: 0; padding: 8px 14px; border: 1px solid var(--ad-rule); border-radius: 999px; background: transparent; box-shadow: none; font-family: var(--ds-font-body); font-size: 0.875rem; font-weight: 600; line-height: 1.2; letter-spacing: 0; text-transform: none; color: var(--ad-fg); cursor: pointer; }
.ad-sec .adsp button.adsp-btn:is(:hover, :focus, :active) { border-color: var(--ad-fg); background: transparent; color: var(--ad-fg); }
.ad-sec .adsp button.adsp-btn[aria-pressed="true"] { border-color: var(--ad-fg); background: var(--ad-fg); color: var(--ds-color-paper); }
.adsp [hidden] { display: none !important; }

/* the story so far, and the facts */
.adsp-head { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(28px, 5vw, 72px); align-items: start; margin-bottom: clamp(24px, 3vw, 36px); }
.adsp-head--facts { grid-template-columns: minmax(0, 420px); }
.adsp-sofar__h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 10px; }
.adsp-sofar__h b { font-size: 0.875rem; font-weight: 750; }
.adsp-sofar__p { max-width: 68ch; font-size: 1.125rem; line-height: 1.55; text-wrap: pretty; }
.adsp-sofar__p + .adsp-sofar__p { margin-top: 0.9em; }
.adsp-facts { border-top: 2px solid var(--ad-fg); }
/* in the column beside the views: the story so far over the facts */
.adsp--rail .adsp-head { grid-template-columns: minmax(0, 1fr); gap: 32px; margin-bottom: 0; }
.adsp--rail .adsp-sofar__p { font-size: 1.0625rem; }
.adsp-facts > div { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--ad-rule); }
.adsp-facts dt { font-family: var(--ds-font-readout); font-size: 0.75rem; font-weight: 400; line-height: 1.6; color: var(--ad-soft); }
.adsp-facts dd { font-size: 0.9375rem; font-weight: 600; line-height: 1.35; }
.adsp-facts .ad-case-stage { display: block; margin-top: 2px; font-weight: 400; } /* a case's stage under its status, no dot between */
.adsp-facts .ad-case-stage::before { content: none; }

/* tabs: three views of one storyline, one on screen at a time */
.adsp-tabs { position: sticky; top: var(--adsp-bar); scroll-margin-top: var(--adsp-bar); z-index: 4; display: flex; gap: clamp(20px, 4vw, 36px); overflow-x: auto; scrollbar-width: none; background: var(--ds-color-paper); border-bottom: 1px solid var(--ad-rule); }
.ad-sec .adsp a.adsp-tab { display: flex; align-items: baseline; gap: 8px; margin-bottom: -1px; padding: 16px 0 13px; border-bottom: 3px solid transparent; font-family: var(--ds-font-display); font-size: 1.0625rem; font-weight: 700; line-height: 1.2; white-space: nowrap; color: var(--ad-soft); }
.ad-sec .adsp a.adsp-tab:is(:hover, :focus-visible) { color: var(--ad-fg); }
.ad-sec .adsp a.adsp-tab[aria-selected="true"] { color: var(--ad-fg); border-bottom-color: var(--ds-color-signal); }
.adsp-panel { padding-top: clamp(24px, 3vw, 36px); scroll-margin-top: calc(var(--adsp-bar) + 52px); }
.adsp-panel + .adsp-panel { margin-top: 56px; }
.adsp.is-tabs .adsp-panel + .adsp-panel { margin-top: 0; }
.adsp-panel__h { margin-bottom: 14px; font-family: var(--ds-font-display); font-size: 1.75rem; font-weight: 800; font-stretch: 118%; line-height: 1.05; letter-spacing: -0.025em; color: var(--ad-fg); }
.adsp.is-tabs .adsp-panel__h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.adsp-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.adsp-top__p { max-width: 60ch; font-size: 0.9375rem; color: var(--ad-soft); }
.adsp-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.adsp-seg { display: inline-flex; padding: 2px; border: 1px solid var(--ad-rule); border-radius: 999px; }
.ad-sec .adsp .adsp-seg button.adsp-btn { border-color: transparent; padding: 7px 13px; }
.ad-sec .adsp .adsp-seg button.adsp-btn[aria-pressed="true"] { border-color: var(--ad-fg); }
.adsp-check { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 8px 4px; font-size: 0.875rem; font-weight: 600; cursor: pointer; }
.adsp-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--ds-color-ink); cursor: pointer; }

/* timeline: the day in the margin, one line through every development, each development whole beside it */
.adsp-tl { margin-top: 20px; padding-top: 8px; border-top: 2px solid var(--ad-fg); }
.adsp-day { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 0 24px; }
.adsp-day__h { position: sticky; top: calc(var(--adsp-bar) + 52px); align-self: start; padding: 28px 0 20px; text-align: right; }
.adsp-day__h time { display: block; font-family: var(--ds-font-display); font-size: 1.375rem; font-weight: 780; font-stretch: 106%; line-height: 1.1; letter-spacing: -0.015em; }
.adsp-day__h .adsp-n { display: block; margin-top: 4px; }
.adsp-ev { position: relative; padding: 26px 0 26px 40px; scroll-margin-top: calc(var(--adsp-bar) + 60px); }
/* the line, first dot to last; a ring on each development, filled for a day's first, pink for a key moment */
.adsp-ev::before { content: ""; position: absolute; left: 6px; top: 0; bottom: 0; width: 2px; background: var(--ad-fg); opacity: 0.22; }
.adsp-ev.is-first::before { top: 38px; }
.adsp-ev.is-last::before { bottom: auto; height: 38px; }
.adsp-ev.is-first.is-last::before { display: none; }
.adsp-ev::after { content: ""; position: absolute; left: 0; top: 31px; box-sizing: border-box; width: 14px; height: 14px; border: 2px solid var(--ad-fg); border-radius: 50%; background: var(--ds-color-paper); }
.adsp-ev.is-daystart::after { background: var(--ad-fg); }
.adsp-ev.is-key::after { border-color: var(--ds-color-signal); background: var(--ds-color-signal); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ds-color-signal) 18%, transparent); }
.adsp-ev.is-here > .adsp-ev__t { background: color-mix(in srgb, var(--ds-color-signal) 16%, transparent); box-shadow: -8px 0 0 color-mix(in srgb, var(--ds-color-signal) 16%, transparent), 8px 0 0 color-mix(in srgb, var(--ds-color-signal) 16%, transparent); }
.adsp-ev__key { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; font-size: 0.8125rem; font-weight: 700; line-height: 1.2; color: var(--ds-color-signal-ink, var(--ds-color-signal)); }
.adsp .adsp-ev__t { max-width: 34em; font-family: var(--ds-font-display); font-size: 1.3125rem; font-weight: 780; font-stretch: 106%; line-height: 1.22; letter-spacing: -0.012em; text-transform: none; text-wrap: balance; color: var(--ad-fg); }
.adsp-ev__detail { max-width: 66ch; margin-top: 6px; font-size: 1rem; line-height: 1.5; text-wrap: pretty; }
.adsp-src { max-width: 780px; margin-top: 14px !important; }
.adsp-src li { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 14px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--ad-rule); }
.adsp-src__who { font-family: var(--ds-font-readout); font-size: 0.75rem; line-height: 1.45; color: var(--ad-soft); overflow-wrap: anywhere; }
.adsp-src__who.is-ours { font-weight: 700; color: var(--ad-fg); }
.adsp-src__t { font-size: 0.9375rem; font-weight: 600; line-height: 1.35; }
.adsp-src__times { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; font-size: 0.8125rem; font-weight: 400; color: var(--ad-soft); }
.ad-sec .adsp .adsp-src__times a { padding: 2px 7px; border: 1px solid var(--ad-rule); border-radius: 3px; font-family: var(--ds-font-readout); font-size: 0.75rem; font-weight: 400; }
.ad-sec .adsp .adsp-src__times a:is(:hover, :focus-visible) { border-color: var(--ad-fg); }
.ad-sec .adsp button.adsp-more { margin-top: 10px; }
.adsp-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(218px, 1fr)); gap: 0 24px; max-width: 780px; margin-top: 14px !important; }
.ad-sec .adsp .adsp-people a { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: center; padding: 7px 0; border-top: 1px solid var(--ad-rule); font-size: 0.9375rem; font-weight: 650; }
.adsp-people li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; border-top: 1px solid var(--ad-rule); }
.ad-sec .adsp .adsp-people li > a:first-child { border-top: 0; }
.ad-sec .adsp .adsp-people a.adsp-people__t { display: block; padding: 2px 7px; border: 1px solid var(--ad-rule); border-radius: 3px; font-family: var(--ds-font-readout); font-size: 0.75rem; font-weight: 400; text-decoration: none; }
.ad-sec .adsp a.adsp-people__t::before { content: "\25B6"; margin-right: 5px; font-size: 0.5625rem; vertical-align: 1px; }
.ad-sec .adsp a.adsp-people__t:is(:hover, :focus-visible) { border-color: var(--ad-fg); }
.adsp-face { display: block; width: 36px; height: 36px; border-radius: 4px; object-fit: cover; object-position: center 15%; background: var(--ad-hover); }
/* a storyline's coverage, one item per story or outside source */
.adsp-ev.adsp-it { padding-block: 13px; }
.adsp-ev.adsp-it::after { top: 19px; width: 10px; height: 10px; left: 2px; }
.adsp-ev.adsp-it.is-first::before { top: 24px; }
.adsp-ev.adsp-it.is-last::before { height: 24px; }
.adsp-it__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.adsp-it__meta time { font-family: var(--ds-font-readout); font-size: 0.75rem; line-height: 1.45; color: var(--ad-soft); }
.ad-sec .adsp a.adsp-it__t { display: block; max-width: 40em; margin-top: 2px; font-size: 1rem; font-weight: 650; line-height: 1.35; text-decoration: none; }
/* ours: a signal dot, the headline in the display face, its dek and picture; theirs: a small hollow dot, a plain link */
.adsp-ev.adsp-it.is-ours { display: grid; grid-template-columns: minmax(0, 1fr) 132px; gap: 0 18px; align-items: start; padding-block: 18px; }
.adsp-ev.adsp-it.is-ours::after { top: 23px; left: 0; width: 14px; height: 14px; border-color: var(--ds-color-signal); background: var(--ds-color-signal); }
.adsp-ev.adsp-it.is-ours.is-first::before { top: 30px; }
.adsp-ev.adsp-it.is-ours.is-last::before { height: 30px; }
.adsp-it.is-ours a.adsp-it__t { font-family: var(--ds-font-display); font-size: 1.1875rem; font-weight: 780; font-stretch: 106%; line-height: 1.25; letter-spacing: -0.012em; text-wrap: balance; }
.adsp-it__dek { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; max-width: 66ch; margin-top: 4px; font-size: 0.9375rem; line-height: 1.45; color: var(--ad-soft); }
.ad-sec .adsp a.adsp-it__pic { display: block; }
.adsp-it__img { display: block; width: 132px; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 2px; background: var(--ad-hover); }
.adsp-it__cited { grid-column: 1 / -1; }
.adsp-ev.adsp-it:not(.is-ours)::after { border-width: 1.5px; border-color: var(--ad-soft); background: var(--ds-color-paper); }
.adsp-ev.adsp-it.is-daystart:not(.is-ours)::after { background: var(--ds-color-paper); }
.adsp-it:not(.is-ours) .adsp-src__who { text-transform: uppercase; letter-spacing: 0.04em; }
.ad-sec .adsp .adsp-it:not(.is-ours) a.adsp-it__t { font-size: 0.9375rem; font-weight: 500; color: var(--ad-fg); }
.ad-sec .adsp a.adsp-it__t:is(:hover, :focus-visible) { text-decoration: underline; text-decoration-color: var(--ds-color-signal); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.adsp-it .adsp-src { margin-top: 8px !important; }
/* a social reaction in the timeline: a small grey card with no dot of its own, set apart from the coverage */
.adsp-ev.adsp-rx { padding-block: 6px; }
.adsp-ev.adsp-rx::after { display: none; }
.adsp-rx .adpf-voice { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; max-width: 560px; margin: 0; padding: 9px 12px !important; border: 0; border-radius: 8px; background: var(--ad-hover); font-size: 0.8125rem; line-height: 1.4; color: var(--ad-soft); }
.adsp-rx .adpf-face { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.adsp .adsp-rx .adpf-voice__who { display: flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline; margin: 0; font-size: 0.75rem; line-height: 1.4; color: var(--ad-soft); }
.adsp .adsp-rx .adpf-voice__who a { font-weight: 650; color: var(--ad-fg); text-decoration: none; }
.adsp-rx .adpf-voice__who time { font-family: var(--ds-font-readout); font-size: 0.6875rem; }
.adsp .adsp-rx .adpf-q { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; margin: 3px 0 0; padding: 0; border: 0; font-family: inherit; font-size: 0.8125rem; font-style: normal; font-weight: 400; line-height: 1.4; white-space: normal; color: var(--ad-fg); }
.adsp-rx .adpf-q::before, .adsp-rx .adpf-q::after { content: none; }
.adsp .adsp-rx .adpf-q__foot { margin: 3px 0 0; font-size: 0.6875rem; }
.adsp .adsp-rx .adpf-q__foot a { color: var(--ad-soft); }
.adsp-rx .adpf-q__on { display: none; }

/* upcoming: a case's scheduled steps, above its timeline */
.adsp-up { margin-top: 20px; padding: 12px 18px 6px; border: 1px solid var(--ad-rule); border-left: 3px solid var(--ds-color-signal); }
.adsp .adsp-up__h { margin-bottom: 4px; font-family: var(--ds-font-display); font-size: 1rem; font-weight: 780; font-stretch: 106%; line-height: 1.2; text-transform: none; color: var(--ad-fg); }
.adsp-up li { display: grid; grid-template-columns: 12em minmax(0, 1fr); gap: 2px 14px; align-items: baseline; padding: 8px 0; }
.adsp-up li + li { border-top: 1px solid var(--ad-rule); }
.adsp-up time { font-family: var(--ds-font-readout); font-size: 0.75rem; line-height: 1.45; color: var(--ad-soft); }
.adsp-up__t { font-size: 0.9375rem; font-weight: 650; line-height: 1.35; }
.adsp-up__d { grid-column: 2; font-size: 0.875rem; line-height: 1.45; color: var(--ad-soft); }

/* video: a case's hearing and testimony recordings */
.adsp-vids { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 28px 24px; margin-top: 22px; }
.ad-sec .adsp .adsp-vids a { display: block; }
.adsp-vids img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 2px; background: var(--ad-hover); }
.adsp-vids .adsp-story__t { margin-top: 10px; }
.adsp-vids .adsp-n { display: block; margin-top: 4px; }

/* stories: every story in the storyline, newest first */
.adsp-sday { margin-top: 24px; border-top: 2px solid var(--ad-fg); }
.adsp .adsp-sday__h { display: flex; align-items: baseline; gap: 12px; padding: 14px 0 6px; font-family: var(--ds-font-display); font-size: 1.125rem; font-weight: 780; font-stretch: 106%; line-height: 1.2; letter-spacing: -0.01em; text-transform: none; color: var(--ad-fg); }
.ad-sec .adsp a.adsp-story { display: grid; grid-template-columns: 4.2em 132px minmax(0, 1fr); gap: 18px; align-items: start; padding: 14px 0; border-top: 1px solid var(--ad-rule); }
.ad-sec .adsp a.adsp-story--plain { grid-template-columns: 4.2em minmax(0, 1fr); }
.adsp-story img { display: block; width: 132px; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 2px; background: var(--ad-hover); }
.adsp-story > .adsp-n { padding-top: 3px; }
.adsp-story__w { display: block; min-width: 0; }
.adsp-story__t { display: block; font-family: var(--ds-font-display); font-size: 1.0625rem; font-weight: 760; font-stretch: 106%; line-height: 1.25; letter-spacing: -0.01em; text-wrap: balance; }
.adsp-story__dek { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; max-width: 70ch; margin-top: 4px; font-size: 0.9375rem; line-height: 1.45; color: var(--ad-soft); }

/* reactions: what people posted about it (the post itself is plugin ailerondaily-profiles' .adpf-voice) */
.adsp-posts { columns: 2; column-gap: 40px; margin-top: 22px; }
.adsp-post { break-inside: avoid; margin-bottom: 8px; border-top: 2px solid var(--ad-fg); }
.adsp-post .adpf-voice { padding-block: 16px 20px; border-bottom: 0; }

@media (max-width: 820px) {
  .adsp-head { grid-template-columns: minmax(0, 1fr); }
  .adsp-sofar__p { font-size: 1.0625rem; }
}
/* a narrow column (a phone, or the views column on a tablet): the day over its developments, one column of everything */
@container (max-width: 680px) {
  .adsp-tabs { gap: 16px; }
  .ad-sec .adsp a.adsp-tab { gap: 5px; font-size: 1rem; }
  .adsp-day { grid-template-columns: minmax(0, 1fr); }
  .adsp-people { grid-template-columns: minmax(0, 1fr); }
  .adsp-day__h { position: relative; top: auto; display: flex; align-items: baseline; gap: 12px; padding: 24px 0 0 40px; text-align: left; }
  .adsp-day__h .adsp-n { margin: 0; }
  .adsp-day__h::before { content: ""; position: absolute; left: 6px; top: 0; bottom: 0; width: 2px; background: var(--ad-fg); opacity: 0.22; }
  .adsp-day.is-first .adsp-day__h::before { display: none; }
  .adsp-ev { padding-top: 16px; }
  .adsp-ev::after { top: 21px; }
  .adsp-ev.is-first::before { top: 28px; }
  .adsp-ev.is-last::before { height: 28px; }
  .adsp-ev.adsp-it { padding-top: 12px; }
  .adsp-ev.adsp-it::after { top: 18px; }
  .adsp-ev.adsp-it.is-first::before { top: 23px; }
  .adsp-ev.adsp-it.is-last::before { height: 23px; }
  .adsp-ev.adsp-it.is-ours { grid-template-columns: minmax(0, 1fr) 88px; gap: 0 12px; padding-top: 14px; }
  .adsp-ev.adsp-it.is-ours::after { top: 19px; }
  .adsp-it__img { width: 88px; }
  .adsp-src li { grid-template-columns: 1fr; gap: 2px; }
  .adsp-up li { grid-template-columns: minmax(0, 1fr); }
  .adsp-up__d { grid-column: 1; }
  .adsp-posts { columns: 1; }
  .ad-sec .adsp a.adsp-story { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; }
  .ad-sec .adsp a.adsp-story--plain { grid-template-columns: 1fr; }
  .adsp-story img { width: 96px; }
  .adsp-story > .adsp-n { display: none; }
}
