/* Homepage v5: theme lens + scroll story. Ported from the tagged-homepage prototype v5. Loaded on the front page only. */
/* ================================================================
   2. NEW: THE THEME LENS
   ----------------------------------------------------------------
   Every item carries data-tags. A theme is switched on either by
   the URL fragment (#theme-ai, pure CSS, no JavaScript) or by the
   script (data-lens on <html>, which adds the gathering motion).
   With neither, the page is the ordinary format-ordered homepage.
   ================================================================ */
:root { --tag:var(--ink-3); --tag-on:var(--ink); --nav-h:56px; --lens-h:45px; }
.lecture { --tag:var(--dark-ink-3); --tag-on:var(--dark-ink); }

.sr-only { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }

/* Content column: spacing by gap, so hidden groups leave no hole */
.stack { display:flex; flex-direction:column; gap:var(--s7); min-width:0; }
.stack > * { min-width:0; }
.sec-lead { max-width:54ch; margin-top:calc(var(--s5) - var(--s7)); }
.sec-lead + .t-micro { margin-top:calc(var(--s5) - var(--s7)); }
.group-label { margin-bottom:var(--s5); }
.rows--flush { border-top:0; }
@media (min-width: 721px) { .row:has(.row-end--meta):not(.row--dated) { grid-template-columns:128px minmax(0, 1fr) auto; } }
.rows--after { margin-top:var(--s6); }
.group > .lecture { margin-bottom:var(--s6); }

/* Theme labels on each item: quiet, text only, never colour-coded */
.tags { list-style:none; margin:var(--s3) 0 0; padding:0; display:flex; flex-wrap:wrap; gap:2px var(--s4); font-size:var(--t-micro); line-height:1.5; letter-spacing:0.09em; text-transform:uppercase; font-weight:500; color:var(--tag); }
.tags li { transition:color .3s var(--ease); }
.lecture .tags { margin:0 0 var(--s5); }
.link-card .tags { margin-top:calc(-1 * var(--s2)); }
.featured .tags { margin-top:var(--s4); }
.book-grid .tags { margin-top:var(--s4); }
.case .tags { margin-top:var(--s5); }

/* Hero: the fields of work are the way in */
.hero-theme { text-decoration:underline; text-decoration-color:var(--rule-2); text-decoration-thickness:max(1px, 0.045em); text-underline-offset:0.14em; transition:color .2s var(--ease), text-decoration-color .2s var(--ease); }
.hero-theme:hover { color:var(--accent); text-decoration-color:var(--accent); }
.hero-also .hero-theme { text-decoration-thickness:1px; text-underline-offset:0.22em; }

/* The theme bar */
.lens-bar { display:none; position:sticky; top:var(--nav-h); z-index:40; background:var(--paper); border-top:1px solid var(--rule); border-bottom:1px solid var(--rule); }
.lens-inner { display:flex; align-items:center; gap:var(--s5); }
.lens-label { flex:none; color:var(--ink); }
.lens-chips { position:relative; min-width:0; list-style:none; margin:0; padding:0; display:flex; gap:clamp(16px, 2vw, 28px); overflow-x:auto; scrollbar-width:none; }
.lens-chips::-webkit-scrollbar { display:none; }
.lens-bar .chip { display:block; padding:13px 0 11px; margin-bottom:-1px; border-bottom:2px solid transparent; }
.lens-bar .chip:focus-visible { outline-offset:-2px; }
.lens-bar .chip[aria-current="true"] { color:var(--ink); font-weight:500; border-bottom-color:var(--ink); }

/* The theme head: one per theme, all in the HTML, one shown at a time */
.lens-head { display:none; padding-block:clamp(32px, 4vw, 56px) clamp(12px, 2vw, 24px); scroll-margin-top:calc(var(--nav-h) + var(--lens-h)); }
.lens-head:focus { outline:none; }
.lens-head .t-h2 { margin-top:var(--s3); }
.lens-top { display:flex; justify-content:space-between; align-items:baseline; gap:var(--s4); flex-wrap:wrap; }
.lens-head .t-lead { margin-top:var(--s5); max-width:54ch; }
.tally { list-style:none; margin:var(--s6) 0 0; padding:var(--s4) 0; border-block:1px solid var(--rule); display:flex; flex-wrap:wrap; gap:var(--s2) var(--s6); font-size:var(--t-micro); letter-spacing:0.09em; text-transform:uppercase; font-weight:500; color:var(--ink-3); font-variant-numeric:tabular-nums; }
.tally b { color:var(--ink); font-weight:600; margin-right:3px; }

#body [id] { scroll-margin-top:calc(var(--nav-h) + var(--lens-h) + 40px); }
#body { scroll-margin-top:var(--nav-h); }
#body .rail { top:calc(var(--nav-h) + var(--lens-h) + 40px); }


@supports selector(:has(*)) {
  .lens-bar { display:block; }

  /* --- any theme on: the page tightens into a single dossier --- */
  :root:is([data-lens]:not([data-lens="all"]), :not([data-lens]):has(.lens-head:target)) #body {
    --section:clamp(28px, 3.5vw, 44px);
  }
  :root:is([data-lens]:not([data-lens="all"]), :not([data-lens]):has(.lens-head:target)) #body [data-lens-hide] { display:none; }
  :root:is([data-lens]:not([data-lens="all"]), :not([data-lens]):has(.lens-head:target)) #body :is(.sec-h, .head-row) {
    position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap;
  }
  :root:is([data-lens]:not([data-lens="all"]), :not([data-lens]):has(.lens-head:target)) #body .stack { gap:var(--s6); }
  :root:is([data-lens]:not([data-lens="all"]), :not([data-lens]):has(.lens-head:target)) #body .section:last-of-type { padding-bottom:var(--s9); }
  :root:is([data-lens]:not([data-lens="all"]), :not([data-lens]):has(.lens-head:target)) #body .group-label { margin-bottom:var(--s4); }

  /* No script, no theme in the URL: "All work" is the current view */
  :root:not([data-lens]):not(:has(.lens-head:target)) .chip[href="#body"] { color:var(--ink); font-weight:500; border-bottom-color:var(--ink); }

  /* --- one block per theme; in WordPress a PHP loop prints these --- */
  /* per-theme rules: printed inline by inc/lens.php */
}

@media (max-width: 900px) {
  /* The theme bar takes the sticky slot on small screens; the nav scrolls away */
  :root { --nav-h:0px; }
  .nav { position:static; }
  .lens-bar { z-index:60; }
  .lens-label { display:none; }
  .lens-chips { margin-inline:calc(-1 * var(--gutter)); padding-inline:var(--gutter); flex:1; }
  #body .rail { position:static; }
  .lens-head { padding-top:var(--s7); }
}

/* ================================================================
   3. NEW IN V4: THE SCROLL STORY, WITH REAL TILES
   ----------------------------------------------------------------
   Without script: a static timeline (every theme already sorted)
   followed by the four themes as text. With script: the timeline
   pins and each caption that scrolls past deals one theme's tiles
   out of the pile into a cluster.
   ================================================================ */
:root {
  /* One muted colour per theme: edges and bars only, never text, never the only cue */
  --c-td:#c2603a; --c-system:#4f8a63; --c-ai:#2f7ea3; --c-advocacy:#c44d6a; --c-wait:#b5b2a9;
}
.sw { display:inline-block; width:9px; height:9px; background:var(--c, var(--ink)); flex:none; }
.tags li { display:inline-flex; align-items:center; gap:6px; }
.tags li::before { content:""; width:7px; height:7px; background:var(--c); flex:none; }
.lens-bar .chip { display:flex; align-items:center; }
.lens-bar .chip:not([data-lens-link="all"])::before { content:""; width:7px; height:7px; margin-right:7px; background:var(--c); flex:none; }
#body [data-item]:target { outline:2px solid var(--ink); outline-offset:6px; }

/* Hero, tightened on wider screens; phones keep the theme's own stacked hero so the story starts on or near the first screen */
@media (min-width: 901px) {
  .hero { padding-top:clamp(24px, 3vw, 44px); padding-bottom:clamp(28px, 3.5vw, 48px); }
  .hero .shell { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 230px); column-gap:clamp(24px, 4vw, 64px); align-items:start; }
  .hero .shell > * { grid-column:1; }
  .hero-name { font-size:var(--t-h1); line-height:0.98; }
  .hero-band { grid-column:2 !important; grid-row:1 / span 4; width:100%; margin:0; }
  .hero-domains { font-size:var(--t-h2); margin-top:var(--s5); max-width:22ch; }
  .hero-also { margin-top:var(--s3); font-size:var(--t-body); }
  .hero-foot { margin-top:var(--s5); }
  .hero-intro { font-size:var(--t-body); }
}


/* ---------- v5 scroll story ("saga") ---------- */
.saga { padding-block: var(--s8) var(--s9); border-top: 1px solid var(--rule); }
.saga .sw { display:inline-block; width:9px; height:9px; border-radius:2px; background:var(--c, var(--ink-3)); margin-right:8px; vertical-align:baseline; }
.saga-grid { display:grid; grid-template-columns:minmax(0, 5fr) minmax(0, 8fr); column-gap:clamp(32px, 5vw, 80px); }
.saga-steps { grid-column:1; grid-row:1; list-style:none; margin:0; padding:0; }
.saga-stage-col { grid-column:2; grid-row:1; }
.saga-step { padding-block: 0 var(--s8); }
.saga-kicker { color:var(--ink-3); margin:0 0 var(--s4); text-transform:uppercase; letter-spacing:var(--tr-label); font-size:var(--t-micro); }
.saga-h { font-size:var(--t-h2); letter-spacing:var(--tr-h2); line-height:1.02; font-weight:500; margin:0 0 var(--s5); }
.saga-lede { font-size:var(--t-lead); letter-spacing:var(--tr-lead); color:var(--ink-2); margin:0 0 var(--s6); max-width:34ch; }
.saga-title { font-size:var(--t-h2); letter-spacing:var(--tr-h2); line-height:1.02; font-weight:500; margin:0 0 var(--s4); }
.saga-sum { color:var(--ink-2); font-size:var(--t-lead); letter-spacing:var(--tr-lead); line-height:1.45; margin:0 0 var(--s6); }
.saga-toc { list-style:none; margin:0; padding:0; border-top:1px solid var(--rule); }
.saga-toc a { display:flex; align-items:center; padding:12px 0; border-bottom:1px solid var(--rule); color:var(--ink); text-decoration:none; font-weight:500; }
.saga-toc a:hover { color:var(--accent); }
.saga-toc .n { margin-left:auto; color:var(--ink-3); font-weight:400; font-variant-numeric:tabular-nums; }
.saga-list { list-style:none; margin:0 0 var(--s5); padding:0; border-top:1px solid var(--rule); }
.saga-list li > * { display:block; padding:10px 0; border-bottom:1px solid var(--rule); color:var(--ink); text-decoration:none; }
.saga-list a:hover .x { text-decoration:underline; text-underline-offset:3px; }
.saga-list .m { display:block; font-size:var(--t-micro); letter-spacing:var(--tr-label); text-transform:uppercase; color:var(--ink-3); margin-bottom:2px; }
.saga-list .x { font-size:var(--t-small); line-height:1.4; }
.saga-list li.is-on .m::before { content:''; display:inline-block; width:6px; height:6px; border-radius:50%; background:var(--c); margin-right:6px; vertical-align:1px; }

/* Static fallback grid (no JS): the tiles sit in each caption */
.saga-static { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px; margin-top:var(--s5); }
.saga-static .t5 { position:relative; aspect-ratio:16 / 10; }
.saga-stage-col { display:none; }

/* ---------- tiles ---------- */
.t5 { display:block; overflow:hidden; border-radius:6px; background:var(--paper-2); color:var(--ink); text-decoration:none; box-shadow:0 0 0 1px rgba(20,20,19,.06); }
.t5-media, .t5-media img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.t5-media img { opacity:1; }
.t5--live .t5-media img + img { opacity:0; }
.t5-cap { position:absolute; left:0; right:0; bottom:0; padding:28px 12px 10px; background:linear-gradient(to top, rgba(10,10,9,.82), rgba(10,10,9,0)); color:#fff; display:flex; flex-direction:column; gap:1px; }
.t5-cap em, .t5-type em { font-style:normal; font-size:10px; letter-spacing:.09em; text-transform:uppercase; opacity:.85; font-weight:600; }
.t5-cap b { font-weight:500; font-size:13px; line-height:1.25; }
.t5-cap i, .t5-type i { font-style:normal; font-size:10.5px; opacity:.7; font-variant-numeric:tabular-nums; }
.t5-type { position:absolute; inset:0; padding:12px 14px; display:flex; flex-direction:column; gap:4px; }
.t5-type b { font-weight:500; font-size:15px; line-height:1.2; letter-spacing:-.01em; }
.t5-type i { margin-top:auto; color:var(--ink-3); opacity:1; }
.t5--cover, .t5--role { background:var(--paper-2); }
.t5--cover .t5-type, .t5--role .t5-type { border-top:3px solid var(--c, var(--rule-2)); }
.t5--cover .t5-type em, .t5--role .t5-type em { color:var(--ink-3); }
.t5--role { background:var(--paper); box-shadow:inset 0 0 0 1px var(--rule-2); }
.t5--dark { background:#191918; color:#f6f5f1; }
.t5--dark .t5-type i { color:#a9a7a0; }
.t5-theme { display:none; }
.t5-also { display:none; }

/* ---------- live stage (JS) ---------- */
.saga.is-live .saga-static { display:none; }
.saga.is-live .saga-stage-col { display:block; }
.saga-stage { position:sticky; top:calc(var(--nav-h, 58px) + 28px); }
.saga-index { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:10px; margin-bottom:18px; }
.saga-index a { display:block; padding-top:9px; border-top:3px solid var(--rule); color:var(--ink-3); font-size:var(--t-small); text-decoration:none; line-height:1.25; transition:border-color .5s var(--ease), color .5s var(--ease); }
.saga-index a:hover { color:var(--ink); }
.saga-index a.is-done { border-top-color:var(--rule-2); }
.saga-index a.is-on { border-top-color:var(--c); color:var(--ink); font-weight:600; }
.saga-stage[data-state="overview"] .saga-index a, .saga-stage[data-state="end"] .saga-index a { border-top-color:var(--c); color:var(--ink); }

.saga-mosaic { position:relative; }
.saga-mosaic .t5 { position:absolute; left:0; top:0; will-change:transform, opacity;
  transition: left .95s var(--ease), top .95s var(--ease), width .95s var(--ease), height .95s var(--ease),
              opacity .5s var(--ease), transform .7s var(--ease), box-shadow .6s var(--ease); }
.saga-mosaic .t5.is-out { opacity:0; transform:translateY(-14px) scale(.965); pointer-events:none; transition-duration:.95s, .95s, .95s, .95s, .32s, .42s, .3s; }
.saga-mosaic .t5.is-hidden { visibility:hidden; }
.saga-mosaic .t5.is-moving { z-index:3; box-shadow:0 18px 40px -12px rgba(20,20,19,.35), 0 0 0 1px rgba(20,20,19,.06); }
.saga-mosaic .t5:hover { box-shadow:0 10px 28px -10px rgba(20,20,19,.35), 0 0 0 1px rgba(20,20,19,.08); }
.saga-mosaic .t5:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.saga-mosaic .t5-cap b { font-size:clamp(13px, 1.05vw, 15px); }
.saga-mosaic .t5.is-big .t5-cap { padding:48px 18px 16px; }
.saga-mosaic .t5.is-big .t5-cap b { font-size:clamp(17px, 1.6vw, 22px); letter-spacing:-.015em; }
.saga-mosaic .t5.is-big .t5-cap em { font-size:11px; }
.saga-mosaic .t5.is-wide .t5-type b { font-size:clamp(15px, 1.25vw, 18px); max-width:30ch; }
.saga-mosaic .t5.is-small .t5-type b { font-size:13.5px; }
.saga-mosaic .t5.is-small .t5-type { padding:10px 11px; }
/* colour each tile's rule with the theme on stage */
.saga-stage[data-state="td"] { --c:var(--c-td); }
.saga-stage[data-state="system"] { --c:var(--c-system); }
.saga-stage[data-state="ai"] { --c:var(--c-ai); }
.saga-stage[data-state="advocacy"] { --c:var(--c-advocacy); }

/* overlap pill: "Also in ..." */
.saga-mosaic .t5-also { display:block; position:absolute; top:10px; right:10px; z-index:2; max-width:calc(100% - 20px);
  font-size:11px; font-weight:600; letter-spacing:0; line-height:1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  padding:6px 8px; border-radius:99px; background:rgba(252,251,249,.94); color:var(--ink); box-shadow:0 1px 2px rgba(0,0,0,.12);
  opacity:0; transform:translateY(-4px); transition:opacity .4s var(--ease) .6s, transform .4s var(--ease) .6s; }
.saga-mosaic .t5-also .sw { width:7px; height:7px; margin-right:5px; }
.saga-mosaic .t5.has-also .t5-also { opacity:1; transform:none; }
.saga-mosaic .t5:not(.t5--img) .t5-also { top:auto; bottom:10px; }
.saga-mosaic .t5.is-out .t5-also { transition-delay:0s; opacity:0; }

/* overview: the four lead tiles carry their theme's name */
.saga-mosaic .t5-theme { display:flex; align-items:center; position:absolute; top:14px; left:14px; z-index:2; padding:7px 11px 7px 10px; border-radius:99px;
  background:rgba(252,251,249,.95); color:var(--ink); font-size:13px; font-weight:600; letter-spacing:-.005em; line-height:1;
  opacity:0; transform:translateY(-6px); transition:opacity .45s var(--ease), transform .45s var(--ease); pointer-events:none; }
.saga-mosaic .t5-theme[data-t="td"] { --c:var(--c-td); } .saga-mosaic .t5-theme[data-t="system"] { --c:var(--c-system); }
.saga-mosaic .t5-theme[data-t="ai"] { --c:var(--c-ai); } .saga-mosaic .t5-theme[data-t="advocacy"] { --c:var(--c-advocacy); }
.saga-stage:is([data-state="overview"], [data-state="end"]) .t5-theme { opacity:1; transform:none; transition-delay:.55s; }
.saga-stage:is([data-state="overview"], [data-state="end"]) .t5 .t5-cap { padding-top:40px; }

/* living thumbnails: slow crossfade between YouTube's own frames */
@keyframes t5f2 { 0%, 42% { opacity:0 } 50%, 92% { opacity:1 } 100% { opacity:0 } }
@keyframes t5f3 { 0%, 28% { opacity:0 } 34%, 61% { opacity:1 } 67%, 100% { opacity:0 } }
@keyframes t5f3b { 0%, 61% { opacity:0 } 67%, 94% { opacity:1 } 100% { opacity:0 } }
.saga-mosaic .t5--live.f2 .t5-media img:nth-child(2) { animation:t5f2 9s ease-in-out infinite; }
.saga-mosaic .t5--live.f3 .t5-media img:nth-child(2) { animation:t5f3 12s ease-in-out infinite; }
.saga-mosaic .t5--live.f3 .t5-media img:nth-child(3) { animation:t5f3b 12s ease-in-out infinite; }
.saga-mosaic .t5.is-out .t5-media img, .saga-mosaic .t5.is-hidden .t5-media img { animation-play-state:paused; }

/* career strip: only the current theme's roles */
.saga-strip { position:relative; margin-top:22px; padding-top:22px; height:96px; }
.saga-axis { position:absolute; left:0; right:0; top:0; height:16px; border-bottom:1px solid var(--rule-2); }
.saga-axis span { position:absolute; left:calc(var(--p) * 100%); top:0; transform:translateX(-50%); font-size:10.5px; color:var(--ink-3); font-variant-numeric:tabular-nums; }
.saga-axis span::after { content:''; position:absolute; left:50%; top:16px; height:4px; border-left:1px solid var(--rule-2); }
.saga-roles { position:relative; height:100%; }
.saga-role { position:absolute; left:calc(var(--a) * 100%); width:calc((var(--b) - var(--a)) * 100%); top:calc(var(--r) * 24px); height:24px;
  opacity:0; transition:opacity .45s var(--ease); }
.saga-role.is-on { opacity:1; transition-delay:calc(.35s + var(--i) * .08s); }
.saga-role .bar { display:block; height:5px; border-radius:3px; background:var(--c); transform-origin:left; transform:scaleX(.02); transition:transform .9s var(--ease); }
.saga-role.is-on .bar { transform:none; transition-delay:calc(.4s + var(--i) * .08s); }
.saga-role.is-open .bar { border-top-right-radius:0; border-bottom-right-radius:0; -webkit-mask:linear-gradient(to right, #000 70%, transparent); mask:linear-gradient(to right, #000 70%, transparent); }
.saga-role.is-before .bar { -webkit-mask:linear-gradient(to right, transparent, #000 12%, #000 80%, transparent); mask:linear-gradient(to right, transparent, #000 12%, #000 80%, transparent); }
.saga-role .lab { display:block; margin-top:3px; font-size:11px; line-height:1.2; color:var(--ink-2); white-space:nowrap; }
.saga-role.is-right .lab { text-align:right; }

/* ---------- phones ---------- */
@media (max-width: 900px) {
  .saga { padding-top:var(--s6); }
  .saga-grid { display:block; }
  .saga.is-live .saga-stage-col { position:sticky; top:0; z-index:20; background:var(--paper); padding:10px 0 12px; margin-inline:calc(var(--gutter) * -1); padding-inline:var(--gutter); box-shadow:0 1px 0 var(--rule), 0 10px 18px -16px rgba(0,0,0,.35); }
  .saga-stage { position:static; }
  .saga-index { gap:6px; margin-bottom:10px; }
  .saga-index a { font-size:11px; padding-top:6px; border-top-width:3px; }
  .saga-strip { display:none; }
  .saga-step { padding-block:var(--s6) var(--s7); }
  .saga.is-live .saga-step:not(.saga-intro) { min-height:70vh; }
  .saga-h, .saga-title { font-size:clamp(1.75rem, 8vw, 2.25rem); }
  .saga-sum, .saga-lede { font-size:1rem; }
  .saga-static { grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .saga-mosaic .t5-cap { padding:22px 9px 7px; }
  .saga-mosaic .t5-cap b { font-size:12px; }
  .saga-mosaic .t5-cap em, .saga-mosaic .t5-type em { font-size:9px; }
  .saga-mosaic .t5.is-big .t5-cap { padding:34px 12px 10px; }
  .saga-mosaic .t5.is-big .t5-cap b { font-size:16px; }
  .saga-mosaic .t5.is-small .t5-type { padding:8px 9px; }
  .saga-mosaic .t5.is-small .t5-type b { font-size:12px; }
  .saga-mosaic .t5-theme { top:8px; left:8px; font-size:11px; padding:5px 8px 5px 7px; }
  .saga-mosaic .t5-also { top:6px; right:6px; font-size:10px; padding:5px 6px 5px 7px; }
  .saga-mosaic .t5-also .nm { display:none; }
  .saga-mosaic .t5-also .sw { margin-right:0; margin-left:3px; }
  .saga-mosaic .t5-also::before { content:'Also'; margin-right:3px; }
  .saga-stage:is([data-state="overview"], [data-state="end"]) .t5 .t5-cap b { font-size:11.5px; }
}
@media (min-width: 901px) {
  .saga.is-live .saga-step { min-height:78vh; }
  .saga.is-live .saga-intro { min-height:72vh; }
  .saga.is-live .saga-end { min-height:60vh; }
}

/* ---------- reduced motion: states swap, nothing travels ---------- */
@media (prefers-reduced-motion: reduce) {
  .saga-mosaic .t5, .saga-mosaic .t5.is-out { transition:opacity .2s linear !important; transform:none !important; }
  .saga-mosaic .t5-media img { animation:none !important; }
  .saga-mosaic .t5--live .t5-media img + img { opacity:0 !important; }
  .saga-role, .saga-role .bar, .saga-index a, .t5-also, .t5-theme { transition:none !important; }
  .saga-role .bar { transform:none !important; }
}
.saga:not(.is-live) .saga-steps { grid-column:1 / -1; max-width:820px; }

/* overlap marker: small theme dots only (title gives the names) */
.saga-mosaic .t5-also { padding:0; background:none; box-shadow:none; font-size:0; top:10px; right:10px; bottom:auto !important; }
.saga-mosaic .t5-also::before { content:none !important; }
.saga-mosaic .t5-also .sw { width:8px; height:8px; border-radius:50%; margin:0 0 0 4px; box-shadow:0 0 0 1.5px rgba(252,251,249,.9); }

/* full timeline */
.saga-strip { height:auto; padding-top:0; }
.saga-axis { top:0; }
.saga-roles { position:absolute; left:0; right:0; height:auto; }
.saga-dots { position:absolute; left:0; right:0; top:0; }
.saga-dot { position:absolute; left:calc(var(--a) * 100%); bottom:calc(var(--s) * 9px + 3px); width:7px; height:7px; margin-left:-3.5px; border-radius:50%;
  background:var(--c); opacity:0; transform:scale(.4); transition:opacity .4s var(--ease), transform .5s var(--ease); }
.saga-dot.is-on { opacity:.55; transform:none; transition-delay:calc(.3s + var(--i) * .025s); }
.saga-dot:hover, .saga-dot:focus-visible { opacity:1; transform:scale(1.35); }
.saga-role { text-decoration:none; height:23px; top:calc(var(--r) * 23px); }
a.saga-role:hover .lab { color:var(--ink); text-decoration:underline; text-underline-offset:2px; }
.saga-role.is-dot { width:7px; }
.saga-role.is-dot .bar { width:7px; height:7px; border-radius:50%; margin-top:-1px; transform:scale(.3); }
.saga-role.is-dot.is-on .bar { transform:none; }
.saga-role.is-right .lab { position:absolute; right:0; white-space:nowrap; }
.saga-role.is-dot.is-right .lab { right:0; }

.saga-note { color:var(--ink-3); font-size:var(--t-small); line-height:1.55; margin:calc(var(--s6) * -0.5) 0 var(--s6); max-width:52ch; }

/* report tile: the cover beside the title */
.t5--report { background:#13202b; color:#f4f6f8; }
.t5-report { position:absolute; inset:0; display:flex; gap:16px; padding:14px; }
.t5-report .cv { height:100%; width:auto; aspect-ratio:1241 / 1754; object-fit:cover; border-radius:3px; box-shadow:0 8px 22px -8px rgba(0,0,0,.6); flex:none; }
.t5-report .t5-type { position:static; padding:4px 0 2px; border:0; }
.t5-report .t5-type em { color:#b9d43a; opacity:1; }
.t5-report .t5-type b { font-size:clamp(16px, 1.5vw, 21px); letter-spacing:-.015em; }
.t5-report .t5-sub { font-size:12.5px; line-height:1.4; color:#c5ccd3; }
.t5-report .t5-type i { color:#93a0ab; }
.saga-mosaic .t5--report.is-big .t5-report { padding:18px; gap:20px; }
.saga-mosaic .t5--report:not(.is-big) .t5-sub { display:none; }
.saga-mosaic .t5--report:not(.is-big) .t5-type b { font-size:13px; }
.saga-mosaic .t5--report:not(.is-big) .t5-report { padding:9px; gap:10px; }
@media (max-width: 900px) { .t5-report .t5-type b { font-size:15px; } .t5-report .t5-sub { font-size:11px; } }

/* ================================================================
   Fixes from the December 2026 review (accessibility and layout)
   ================================================================ */
/* Only real links lift on hover */
.saga-mosaic .t5:hover { box-shadow:0 0 0 1px rgba(20,20,19,.06); }
.saga-mosaic a.t5:hover { box-shadow:0 10px 28px -10px rgba(20,20,19,.35), 0 0 0 1px rgba(20,20,19,.08); }
/* Long titles never clip mid-line: clamp them cleanly */
.t5-cap b, .t5-type b { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; }
.saga-mosaic .t5.is-small .t5-type b { -webkit-line-clamp:4; }
.saga-mosaic .t5.is-small .t5-type em { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:1; overflow:hidden; }
/* No-JS grid: the report tile is compact there too */
.saga-static .t5--report .t5-sub { display:none; }
.saga-static .t5--report .t5-report { padding:9px; gap:10px; }
.saga-static .t5--report .t5-type b { font-size:13px; }
/* Maths Horizons: the cover has its own text, so the caption needs a solid base */
.t5[data-key="mh"] .t5-cap { background:linear-gradient(to top, rgba(10,10,9,.94) 0%, rgba(10,10,9,.88) 60%, rgba(10,10,9,0) 100%); }
/* Overlap dots: the theme names are also given as text to assistive technology */
.t5-also .sr-only { font-size:13px; }
/* Timeline labels that would overflow are nudged back inside */
.saga-role .lab { transform:translateX(var(--sh, 0px)); }
/* Captions land below the sticky stage, not under it */
.saga.is-live .saga-step { scroll-margin-top:calc(var(--nav-h, 58px) + 24px); }
@media (max-width: 900px) {
  .saga.is-live .saga-step { scroll-margin-top:calc(var(--stage-h, 340px) + 12px); }
}
/* Short landscape screens: no sticky stage at all */
@media (max-width: 900px) and (max-height: 500px) {
  .saga.is-live .saga-stage-col { position:static; box-shadow:none; }
  .saga.is-live .saga-step { scroll-margin-top:12px; min-height:0 !important; }
}
/* Reduced motion: the timeline dots appear without moving */
@media (prefers-reduced-motion: reduce) {
  .saga-dot { transition:none !important; transform:none !important; }
}
/* Titles keep their space; labels give way first */
.t5-type b, .t5-cap b { flex-shrink:0; }
.t5-type em { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; flex-shrink:1; min-height:0; }
.saga-mosaic .t5.is-wide .t5-type b { -webkit-line-clamp:2; }
.t5-report .t5-type { min-height:0; overflow:hidden; }
.t5-report .t5-sub { min-height:0; overflow:hidden; flex-shrink:1; }
.t5[data-key="ugt"] .t5-cap { background:linear-gradient(to top, rgba(10,10,9,.92) 0%, rgba(10,10,9,.8) 65%, rgba(10,10,9,0) 100%); }
@media (max-width: 900px) {
  .saga-mosaic .t5.is-small .t5-type em { display:none; }
  .saga-mosaic .t5.is-small .t5-type b { -webkit-line-clamp:3; }
}
/* Labels never shrink mid-line: one line on the stage, ellipsis if long */
.saga-mosaic .t5 .t5-type em, .saga-mosaic .t5 .t5-cap em { -webkit-line-clamp:1; flex-shrink:0; }
.saga-mosaic .t5.is-big .t5-type em { -webkit-line-clamp:2; }
/* Report tile: the cover never takes more than two fifths of the tile */
.t5-report .cv { max-width:40%; height:auto; max-height:100%; align-self:flex-start; }
.t5-report .t5-type { flex:1; min-width:0; }
.t5-report .t5-type b { overflow-wrap:break-word; hyphens:auto; }
.t5-report .t5-sub { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; }
@media (max-width: 1280px) and (min-width: 901px) { .saga-mosaic .t5--report.is-big .t5-sub { -webkit-line-clamp:2; } }
/* Overlap dots: laid out as a row, so they sit inside the tile's corner */
.saga-mosaic .t5-also { display:flex; align-items:center; gap:4px; line-height:0; top:10px !important; right:10px; height:10px; }
.saga-mosaic .t5-also .sw { display:block; margin:0 !important; }
.saga-mosaic .t5:not(.t5--img):not(.t5--report) .t5-also { top:12px !important; }
/* Labels on the stage: always one line, with an ellipsis if long */
.saga-mosaic .t5 .t5-cap em, .saga-mosaic .t5 .t5-type em { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; -webkit-line-clamp:unset; max-width:calc(100% - 22px); }
.saga-mosaic .t5.is-big .t5-type em, .saga-mosaic .t5--report .t5-type em { white-space:normal; display:-webkit-box; -webkit-line-clamp:2; max-width:none; }
/* Phones and tablets: a smaller portrait, so the themes start sooner */
@media (max-width: 900px) {
  .hero-band { width:min(46%, 240px); }
}
@media (max-width: 900px) {
  .saga-mosaic .t5.is-small .t5-type { padding:7px 9px 6px; gap:2px; }
  .saga-mosaic .t5.is-small .t5-type b { font-size:11.5px; line-height:1.15; }
}
@media (max-width: 900px) {
  .saga-mosaic .t5.is-small .t5-cap em, .saga-mosaic .t5.is-small .t5-type i { display:none; }
  .saga-mosaic .t5.is-small .t5-cap { padding-top:16px; }
}
/* The homepage nav has eleven links: between 901px and 1180px it moves to its own
   scrolling row, as on phones, so it never pushes the page wider than the screen.
   (On iPhones in landscape, ~930px, a too-wide page made Safari flip between layouts.) */
@media (min-width: 901px) and (max-width: 1180px) {
  .nav-inner { flex-wrap:wrap; row-gap:var(--s3); padding-block:var(--s3); }
  .nav-links { order:3; flex-basis:100%; min-width:0; padding-top:var(--s3); border-top:1px solid var(--rule); overflow-x:auto; scrollbar-width:none; }
  .nav-links::-webkit-scrollbar { display:none; }
}
/* Belt and braces: nothing on the homepage may widen the page sideways */
html, body { overflow-x:clip; }
