/* Brygada 1918 (SIL OFL) and Azeret Mono (SIL OFL), via Fontsource 5.1.1 */
@font-face { font-family: "Brygada"; font-style: italic; font-weight: 400 700; font-display: swap; src: url(/assets/fonts/brygada-italic.woff2) format("woff2"); }
@font-face { font-family: "Brygada"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/assets/fonts/brygada.woff2) format("woff2"); }
@font-face { font-family: "Azeret Mono"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/assets/fonts/azeret-mono.woff2) format("woff2"); }

:root {
  color-scheme: dark;
  --bg: #0C120F;
  --bg-2: #121A16;
  /* KamiLimu brand: ivory for text, teal for anything you act on, gamboge for Dr. Chao and honours */
  --ink: #F8F9F0;
  --ink-2: rgb(248 249 240 / .82);
  --ink-3: rgb(248 249 240 / .68);
  --hair: rgb(248 249 240 / .14);
  --gold: #EAA000;
  --teal: #00B4C2;
  /* The warm light the background has always had, kept apart from the brand gold so the ground stays as it is */
  --glow: #E9C25C;
  /* The tree's night cohort colours: bright enough to read as type and marks on the night ground */
  --c1: #F88D92; --c2: #F5956A; --c3: #99C163; --c4: #6BC987; --c5: #35CCAE;
  --c6: #00B4C2; --c7: #3FC0F2; --c8: #7CB2FF; --c9: #B99FFA; --c10: #E490D0;
  --hue: var(--glow);
  --display: "Brygada", Georgia, serif;
  --data: "Azeret Mono", ui-monospace, monospace;
  --beat: .5s;
  --col: min(40rem, 44vw);
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); }
/* Scrollbars: a thin, faint thumb on no track, on the page and in every card and panel */
* { scrollbar-width: thin; scrollbar-color: rgb(248 249 240 / .16) transparent; }
*:hover { scrollbar-color: rgb(248 249 240 / .28) transparent; }
::-webkit-scrollbar { inline-size: 8px; block-size: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 99px; background: rgb(248 249 240 / .16) padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgb(248 249 240 / .28); }
::-webkit-scrollbar-corner { background: transparent; }
body { margin: 0; font: 400 1.125rem/1.6 var(--display); -webkit-font-smoothing: antialiased; }
/* Words that fly off the opening would otherwise widen the page, and a phone zooms out to fit it. Clip, not
   hidden, so the pinned scenes keep sticking */
html, body { overflow-x: clip; }
.sprite { position: absolute; inline-size: 0; block-size: 0; }
.visually-hidden { position: absolute; inline-size: 1px; block-size: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* One warm light from above, and a second tinted by the cohort in view */
.light {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 45% at 70% 0%, rgb(233 194 92 / .1), transparent 70%),
    radial-gradient(55% 55% at 72% 55%, color-mix(in srgb, var(--hue) 16%, transparent), transparent 72%);
  transition: background calc(var(--beat) * 2);
}

/* The rings hold the right of the screen on desktop; on phones they sit behind the text */
.stage {
  position: fixed;
  inset: 0 0 0 calc(var(--col) + 6vw);
  display: grid;
  place-items: center;
  pointer-events: none;
}

.rings { inline-size: min(calc(100vw - var(--col) - 6vw - 4vw), 88svh); block-size: auto; overflow: visible; }
/* An open card takes a lane beside the rings: the card sits at the lane's left edge, and the rings glide aside and
   shrink to clear it (makeRoom sets how far), then glide back when it closes */
@media (min-width: 64em) {
  .story ~ .pcard { inset: 50% auto auto calc(var(--col) + 6vw); translate: 0 -50%; }
  .stage, .tree-stage { transition: scale calc(var(--beat) * 1.8) cubic-bezier(.4, 0, .2, 1), translate calc(var(--beat) * 1.8) cubic-bezier(.4, 0, .2, 1); }
  html.room .stage, html.room .tree-stage { scale: var(--room-k); translate: var(--room-x) 0; }
}

@media (max-width: 63.99em) {
  :root { --col: 100vw; }
  /* As in the Wrapped, the shape is the hero on a phone: oversized, bleeding off both sides, holding the top of the screen.
     The words rise into the lower half, over a fade rather than boxes */
  .stage { inset: 0; display: block; }
  .rings { position: absolute; left: 50%; top: 27svh; inline-size: 132vw; translate: -50% -50%; }
  .stage::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 42svh, rgb(12 18 15 / .8) 55svh, var(--bg) 66svh); transition: opacity calc(var(--beat) * 2); }
  /* The ending's rings fill the whole screen, and its one line carries its own backdrop */
  html.finale-on .stage::after { opacity: 0; }
}

/* The stage never reflows while the page scrolls, so it gets its own layer */
.stage { contain: layout paint; }
html:not(.motion-off) .rings { will-change: transform; }

/* Rings, dots and links. Transparency lives in the colour (fill- and stroke-opacity), never in opacity: an element
   with opacity is painted as its own layer and blended back, and 778 of those made every repaint slow */
.rings {
  .ring { fill: none; stroke: var(--cc); stroke-width: 1.4; stroke-opacity: .38; }
  .ring.hot { stroke-opacity: .95; stroke-width: 2.4; }
  .dot { fill: var(--cc); fill-opacity: .92; }
  .link { fill: none; stroke: var(--cc); stroke-width: .9; stroke-opacity: .1; }
  .link.ict { stroke-dasharray: 5 4; }
  .heart { fill: #141C33; stroke: var(--gold); stroke-width: 2; }
  .heart-glow { fill: none; stroke: var(--gold); stroke-width: 1; opacity: .35; }
  .heart-icon { fill: var(--gold); }
  .off { visibility: hidden; }
  &.focusing .dot { fill-opacity: .12; }
  &.focusing .dot.lit { fill-opacity: 1; }
  &.focusing .link { stroke-opacity: .03; }
  &.focusing .link.lit { stroke-opacity: .9; stroke-width: 1.8; }
}
.motion-off .rings :is(.ring, .dot, .link), .motion-off .light { transition: none; }
/* The rings change state in one step: fading 778 dots and lines one by one repaints the whole drawing every frame,
   which halves the frame rate on a laptop and a phone alike. One fade of the whole layer stands in for it */

.to-tree {
  position: fixed;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-block-size: 40px;
  padding: 0 14px;
  border: 1px solid var(--hair);
  border-radius: 99px;
  background: rgb(12 18 15 / .9);
  color: var(--ink-2);
  font: 500 .875rem/1 var(--data);
  text-decoration: none;
  cursor: pointer;

  svg { inline-size: 16px; block-size: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  &:hover { color: var(--ink); border-color: var(--ink-3); }
  &:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
}
.to-tree { inset: max(14px, env(safe-area-inset-top)) auto auto 16px; }
/* While the story plays itself to a room, the screen shows only the story: no pointer, no controls */
.to-tree { transition: opacity .6s; }
html.playing { cursor: none; }
html.playing .to-tree { opacity: 0; pointer-events: none; }
/* The bottom of a phone screen is where the words are; the top corners only ever hold the rings' outer edge */

/* The story column */
.story {
  position: relative;
  z-index: 2;
  inline-size: calc(var(--col) + 6vw);
  padding: 0 0 20svh 6vw;
}
@media (max-width: 63.99em) { .story { inline-size: 100%; padding: 0 20px 20svh; } }

.opening {
  min-block-size: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  max-inline-size: 34rem;
}
h1 { margin: 0; font: italic 600 clamp(3rem, 6.4vw, 5.6rem)/.98 var(--display); letter-spacing: -.02em; text-wrap: balance; }
.opening p { margin: 0; font-size: 1.25rem; color: var(--ink-2); max-inline-size: 26rem; }
.cue { inline-size: 1px; block-size: 56px; margin-top: 24px; background: linear-gradient(var(--ink-3), transparent); }

.step {
  min-block-size: 92svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 12svh;
}
.step.tall { min-block-size: 120svh; }
.block { display: grid; gap: 18px; max-inline-size: 34rem; }

/* On phones the text needs its own dark band to stay readable over the rings; a band, not a boxed card */
@media (max-width: 63.99em) {
  .opening { justify-content: flex-end; padding-bottom: 12svh; }
  h1 { font-size: clamp(3rem, 14vw, 4.4rem); }
  .step { justify-content: flex-start; min-block-size: 100svh; padding-block: 58svh 14svh; }
  /* Every chapter scrolls up past the rings on its way out; it does so as a card sliding over them, so no line of
     text ever sits on the busy middle of the rings */
  .step .block { margin: -56px -20px 0; padding: 56px 20px 28px;
    background: linear-gradient(rgb(12 18 15 / 0), rgb(12 18 15 / .94) 56px, rgb(12 18 15 / .94) calc(100% - 28px), rgb(12 18 15 / 0)); }
  /* Bigger on a phone, so the rings read as the hero rather than texture */
  .rings .dot { r: 6.5; }
  .rings .ring { stroke-opacity: .55; stroke-width: 2; }
  .rings.focusing .dot { fill-opacity: .22; }
  .rings .link { stroke-opacity: .16; }
}

h2 { margin: 0; font: italic 600 clamp(1.85rem, 3vw, 2.75rem)/1.08 var(--display); letter-spacing: -.012em; text-wrap: balance; }
h3 { margin: 0; font: italic 600 clamp(1.45rem, 2.2vw, 1.85rem)/1.15 var(--display); text-wrap: balance; }
.n { color: var(--hi, var(--gold)); font-style: italic; font-weight: 600; font-variant-numeric: tabular-nums; }
.block p { margin: 0; color: var(--ink-2); text-wrap: pretty; }
.block p b { color: var(--ink); font-weight: 600; }
.caption { margin: 0; color: var(--ink-3) !important; font: 400 .875rem/1.5 var(--data); }

/* Charts, labelled directly; names sit above their bars on phones */
.bars { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.bars li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) 6.5rem; gap: 12px; align-items: center; font: 400 .875rem/1.3 var(--data); color: var(--ink-2); }
.bars .track { block-size: 10px; border-radius: 0 5px 5px 0; background: var(--hair); overflow: hidden; }
.bars .fill { display: block; block-size: 100%; inline-size: calc(var(--w) * 1%); background: var(--cc, var(--ink-3)); border-radius: inherit; transform-origin: left; }
.bars .v { text-align: end; color: var(--ink); font-variant-numeric: tabular-nums; }
/* Coming back: a column of people per cohort, the returners filled from the bottom */
.backs { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 0 clamp(6px, 1.6vw, 12px); align-items: end; margin: 8px 0; }
.bcol { display: grid; gap: 8px; justify-items: center; transition: opacity .2s; }
.backs:hover .bcol:not(:hover), .backs:has(.bc[aria-pressed="true"]) .bcol:not(:has(.bc[aria-pressed="true"])) { opacity: .4; }
.bv { font: italic 600 clamp(1.05rem, 2vw, 1.4rem)/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.bcol.lead .bv { color: var(--hi); }
.bdots { --g: clamp(2px, .5vw, 4px); display: flex; flex-wrap: wrap-reverse; align-content: flex-start; gap: var(--g); inline-size: 100%; cursor: pointer; touch-action: manipulation; }
.bdots i { flex: 0 0 calc((100% - 2 * var(--g)) / 3); aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--cc) 35%, transparent); transition: scale .15s; }
.bdots i.on { background: var(--cc); box-shadow: none; }
.bdots i:hover { scale: 1.5; }
.bc { padding: 4px 0; inline-size: 100%; border: 0; border-top: 2px solid color-mix(in srgb, var(--cc) 50%, transparent); background: none; color: var(--ink-3); font: 500 .8125rem var(--data); cursor: pointer; }
.bc[aria-pressed="true"], .bc:hover { color: var(--ink); border-top-color: var(--cc); }
.bc:focus-visible { outline: 2px solid var(--cc); outline-offset: 2px; border-radius: 2px; }
.bars li.lead .fill { background: var(--hi); }
.bars li.lead { color: var(--ink); }
@media (max-width: 34em) {
  .bars li { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "l v" "t t"; gap: 4px 12px; }
  .bars .l { grid-area: l; } .bars .v { grid-area: v; } .bars .track { grid-area: t; }
}

.names { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 6px 18px; margin: 0; padding: 0; list-style: none; font-size: 1.0625rem; }
.list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.list li { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--hair); color: var(--ink-2); }
.list li b { font-weight: 600; color: var(--ink); }
.list .v { font: 400 .875rem/1.6 var(--data); color: var(--ink-3); text-align: end; }
@media (max-width: 34em) {
  .list li { flex-direction: column; gap: 2px; }
  .list .v { text-align: start; }
}

.chain { position: relative; display: grid; gap: 9px; margin: 0; padding: 0 0 0 26px; list-style: none; }
.chain::before { content: ""; position: absolute; inset: 10px auto 10px 6px; inline-size: 2px; background: linear-gradient(var(--hi), var(--hi2, var(--hi))); border-radius: 1px; transform-origin: top; }
.chain li { position: relative; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.chain li::before { content: ""; position: absolute; inset: .5em auto auto -25px; inline-size: 12px; block-size: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--cc, var(--hi)); }
.chain .c { font: 400 .875rem var(--data); color: var(--ink-3); }
.chain svg { inline-size: 1.05em; block-size: 1.05em; fill: var(--gold); align-self: center; }
.chain .hon { color: var(--gold); }

.table-wrap { overflow-x: auto; margin-inline: -4px; padding-inline: 4px; }
table { border-collapse: collapse; font: 400 .875rem/1.3 var(--data); font-variant-numeric: tabular-nums; inline-size: 100%; }
th, td { padding: 6px 6px; text-align: end; white-space: nowrap; }
th:first-child, td:first-child { text-align: start; }
thead th { color: var(--ink-3); font-weight: 400; border-bottom: 1px solid var(--hair); }
tbody td:first-child { font-family: var(--display); font-size: 1rem; color: var(--ink); }
tbody tr + tr td { border-top: 1px solid rgb(248 249 240 / .06); }
td.cell { color: var(--ink); background: color-mix(in srgb, var(--cc) calc(var(--s) * 70%), transparent); border-radius: 3px; }
td.cell.zero { color: var(--ink-3); background: transparent; }
td.full { outline: 1.5px solid var(--cc); outline-offset: -2px; }

.switch { display: inline-flex; border: 1px solid var(--hair); border-radius: 99px; padding: 3px; gap: 2px; justify-self: start; }
.switch button { min-block-size: 36px; padding: 0 14px; border: 0; border-radius: 99px; background: transparent; color: var(--ink-3); font: 500 .875rem var(--data); cursor: pointer; }
.switch button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.switch button:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }


/* Pinned scenes: the section is long, the panel holds still, scroll is time */
.scene { position: relative; }
.scene .pin { position: sticky; top: 0; min-block-size: 100svh; display: flex; flex-direction: column; justify-content: center; }
.scene.rewind { block-size: 240svh; }
.scene.forward { block-size: 370svh; }
.scene.reach { block-size: 260svh; }
.opening.scene { block-size: 720svh; display: block; max-inline-size: none; padding: 0; }
.opening .block { inline-size: min(100%, 34rem); }
.opening .cue { position: absolute; inset: auto auto 6svh 0; margin: 0; }
/* With motion the title is what the sentence becomes; without it, the title stands above the sentence */
html:not(.motion-off) .opening h1 { position: absolute; inline-size: 1px; block-size: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.motion-off .opening h1 { margin-bottom: 18px; }
.distill .block { position: relative; }
.distill p { margin: 0; font: italic 400 clamp(1.5rem, 2.6vw, 2.25rem)/1.3 var(--display); color: var(--ink-2); perspective: 900px; }
.distill strong { font-weight: 700; font-style: normal; color: var(--ink); white-space: nowrap; }
.distill .slogan { position: absolute; inset: 0; display: flex; flex-wrap: wrap; align-content: center; gap: 0 .26em; pointer-events: none;
  font: normal 700 clamp(1.5rem, 2.6vw, 2.25rem)/1.3 var(--display); color: var(--ink); transform-origin: 0 50%; margin: 0; }
.distill .slogan span { display: inline-block; white-space: nowrap; }
.distill .slogan .br { flex-basis: 100%; block-size: 0; }
/* The word that becomes the logo: the traced wordmark sits over it, right edges together, its mark hanging to the left */
@media (max-width: 63.99em) { .scene .pin { justify-content: flex-end; padding-bottom: 7svh; } }
.motion-off .scene { block-size: auto !important; }
.motion-off .scene .pin { position: static; min-block-size: 0; padding-block: 12svh; }

.rewind .pin :is(.line1, .line2) { opacity: 0; }
.reach .big { font: italic 600 clamp(4rem, 9vw, 7rem)/.9 var(--display); margin: 0; }
/* The set-up, the count and all eight cohort rows have to fit under the rings on a phone */
@media (max-width: 63.99em) {
  .reach .setup { font-size: 1.15rem; margin-bottom: 10px; }
  .reach .big { font-size: 3.2rem; }
  .reach .count-row { display: flex; align-items: center; gap: 14px; }
  .reach .count-row [data-r="basis"] { margin: 0; font-size: .875rem; line-height: 1.3; }
  .reach .meters { gap: 4px; margin-top: 10px; }
  .reach .meters li { font-size: .75rem; }
  .reach .meters .m { block-size: 7px; }
}
.reach .setup { font: italic 500 clamp(1.3rem, 2.2vw, 1.75rem)/1.3 var(--display); color: var(--ink); margin: 0 0 20px; text-wrap: balance; }
.rewind .big { font: italic 600 clamp(4.5rem, 11vw, 9rem)/.9 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin: 0; }
.motion-off .rewind .pin :is(.line1, .line2) { opacity: 1; }

.counters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 28px; margin: 0; }
.counters div { display: grid; gap: 2px; }
.counters dd { order: -1; margin: 0; font: italic 600 clamp(2rem, 3.4vw, 3rem)/1 var(--display); font-variant-numeric: tabular-nums; }
.counters dt { font: 400 .875rem/1.35 var(--data); color: var(--ink-3); }
.forward .year { font: italic 600 clamp(3.6rem, 7vw, 6rem)/.9 var(--display); color: var(--hi); margin: 0; font-variant-numeric: tabular-nums; }
.forward .events { min-block-size: 7.5em; display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; color: var(--ink-2); }
/* On a phone the whole year has to fit under the rings, so the counters share one row and the year's events get a
   fixed floor tall enough for the busiest year; the panel then never grows up into the rings as the years change */
@media (max-width: 63.99em) {
  .forward .year { font-size: 3rem; }
  .forward .counters { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; margin-block: 12px 14px; }
  .forward .counters dd { font-size: 1.75rem; }
  .forward .counters dt { font-size: .75rem; }
  .forward .events { font-size: .875rem; line-height: 1.4; gap: 4px; min-block-size: 11.5em; align-content: start; }
}

/* The years stand in one row, one column wide each, so only the year being read is ever in view. With motion, the
   scroll slides the row; with it off, the row is swiped and settles on a year */
.forward .years { position: relative; container-type: inline-size; overflow: clip; margin-top: 6px; }
.forward .track { display: flex; gap: 56px; align-items: start; margin: 0; padding: 0; list-style: none; }
.forward .yr { flex: 0 0 100cqi; display: grid; gap: 12px; align-content: start; }
/* The row's window reaches a little past the column on both sides and fades there, so a year passing out of view
   dissolves instead of being cut by a hard edge. The gap is wider than the fade, so at rest no neighbour shows */
html:not(.motion-off) .forward .years { margin-inline: -20px; padding-inline: 20px;
  mask-image: linear-gradient(to right, transparent, #000 20px, #000 calc(100% - 20px), transparent); }
html:not(.motion-off) .forward .track { will-change: transform; }
.years-nav { display: none; }
.motion-off .forward .years { overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: thin; }
.motion-off .forward .yr { scroll-snap-align: start; }
.motion-off .years-nav { display: flex; gap: 8px; }
.years-nav button { display: grid; place-items: center; inline-size: 44px; block-size: 44px; padding: 0; border: 1px solid var(--ink-3); border-radius: 50%;
  background: transparent; color: var(--ink); cursor: pointer; touch-action: manipulation;
  svg { inline-size: 18px; block-size: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  &:hover:not(:disabled) { border-color: var(--ink); }
  &:disabled { opacity: .35; cursor: default; }
  &:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; } }
.forward .years:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; }

.meters { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.meters li { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: 10px; align-items: center; font: 400 .875rem var(--data); color: var(--ink-3); }
.meters .m { position: relative; block-size: 10px; border-radius: 0 5px 5px 0; background: var(--hair); overflow: hidden; }
.meters .m i { position: absolute; inset: 0 auto 0 0; inline-size: calc(var(--w) * 1%); background: color-mix(in srgb, var(--hi) 50%, transparent); border-radius: inherit; transition: inline-size calc(var(--beat) * 1.2) cubic-bezier(.2, .7, .2, 1); }
.motion-off .meters .m i { transition: none; }
/* A cohort that is wholly in the family is the one lit at full strength, label and all */
.meters li.full { color: var(--hi); }
.meters li.full .m i { background: var(--hi); }



/* The ending: the rings take the whole screen and the line sits low over them, centred on the screen rather than the
   text column, on a soft pool of shade so it reads over the busiest part of the drawing */
.scene.finale { block-size: 340svh; }
html.finale-on .stage { contain: layout; }
.finale .pin { justify-content: flex-end; padding-bottom: 9svh; }
.finale .block { position: relative; justify-items: center; gap: 26px; inline-size: min(44rem, 100vw - 40px); max-inline-size: none; text-align: center; }
.finale .block::before { content: ""; position: absolute; inset: -45% -25%; z-index: -1; background: radial-gradient(closest-side, rgb(12 18 15 / .88), rgb(12 18 15 / .6) 55%, transparent); pointer-events: none; }
.fin-mark { inline-size: clamp(200px, 24vw, 320px); block-size: auto; overflow: visible; fill-rule: evenodd; }
.fin-mark :is(.kl, .word) { fill: var(--ink); }
.fin-mark .ltd { fill: #00AEBB; }
.fin-mark .wedge { fill: #FFAD01; }
.finale h2 { font-size: clamp(2rem, 4.6vw, 4.2rem); line-height: 1; text-wrap: pretty; }
.finale .actions { justify-content: center; }
.finale .actions .primary { min-block-size: 54px; padding: 0 30px; font-size: 1rem; background: var(--teal); color: #141C33; }
@media (min-width: 64em) { .finale .block { margin-inline-start: 44vw; translate: -50% 0; } }
.motion-off .finale .pin { justify-content: center; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.actions a, .actions button { display: inline-flex; align-items: center; min-block-size: 48px; padding: 0 22px; border-radius: 99px; font: 500 .9375rem var(--data); text-decoration: none; cursor: pointer; }
.actions .primary { background: var(--ink); color: var(--bg); border: 0; }
.actions :focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }

@media (forced-colors: active) {
  .light { display: none; }
  .rings .dot.lit, .rings .link.lit { stroke: Highlight; fill: Highlight; }
}

/* University grid: the eight biggest by name, the rest together, then everyone */
tr.other td:first-child { color: var(--ink-2); font-style: italic; }
.uni { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: start; cursor: pointer; }
.uni:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--hair); }
.uni[aria-pressed="true"] { color: var(--teal); }
.more { display: inline-flex; align-items: center; gap: 4px; min-block-size: 32px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.more svg { inline-size: 16px; block-size: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: rotate .2s; }
.more[aria-expanded="true"] svg { rotate: 180deg; }
.more:hover { color: var(--ink); }
tr.one-of td { font-size: .875rem; color: var(--ink-2); }
tr.one-of td:first-child { padding-left: 14px; max-inline-size: 13rem; white-space: normal; line-height: 1.25; }
tr.all td { border-top: 1px solid var(--hair); color: var(--ink); font-weight: 600; }
tbody td:last-child { color: var(--ink); font-weight: 600; }
table[data-view] th, table[data-view] td { padding: 6px 4px; }
table[data-view] abbr { text-decoration: none; }
/* Names stay in view while the years scroll sideways on narrow screens */
table[data-view] :is(th, td):first-child { position: sticky; left: 0; z-index: 1; background: var(--bg); padding-right: 12px; }

/* Lines under a headline rise in once, after it, when their chapter first comes up the screen */
@keyframes rise { from { opacity: 0; translate: 0 14px; } }
html.rise .step .block > :not(h2, .gallery, .poster, .lineage, .emerge) { opacity: 0; }
html.rise .step .block.seen > :not(h2, .gallery, .poster, .lineage, .emerge) { opacity: 1; animation: rise calc(var(--beat) * 1.1) cubic-bezier(.2, .7, .2, 1) calc(240ms + var(--i, 0) * 90ms) both; }

/* The rings take taps through the story's empty space; the words and controls keep theirs */
.stage .rings { pointer-events: auto; -webkit-tap-highlight-color: transparent; }
.story { pointer-events: none; }
.story :is(.block, a, button, input, .table-wrap) { pointer-events: auto; }
.rings .dot { transform-box: fill-box; transform-origin: center; transition: transform calc(var(--beat) * .8) cubic-bezier(.2, .9, .25, 1.3); }
.rings .dot.picked { transform: scale(2.1); fill-opacity: 1 !important; stroke: var(--bg); stroke-width: 1.5px; }
/* Fellows, valedictorians and committee members wear a mark in place of their dot */
.rings .dot.marked { fill-opacity: 0 !important; stroke: none !important; }
.mark { stroke: var(--bg); stroke-width: 22px; stroke-linejoin: round; paint-order: stroke; }
.mark.f, .mark.v { fill: var(--gold); }
.mark.c, .mark.cp { fill: var(--ink); }
.rings .mark { transform-box: fill-box; transform-origin: center; transition: transform calc(var(--beat) * .8) cubic-bezier(.2, .9, .25, 1.3); }
.rings .mark.off { visibility: hidden; }
.rings.focusing .mark:not(.lit) { fill-opacity: .15; stroke-opacity: .15; }
.rings .mark.picked { transform: scale(1.5); }
@media (forced-colors: active) { .mark { fill: CanvasText; stroke: Canvas; } }
.rings .ripple { fill: none; stroke: var(--cc); stroke-width: 2; vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: center; opacity: 0; }

.pcard, .ptag { position: fixed; z-index: 8; }
.pcard { inline-size: min(21.5rem, calc(100vw - 24px)); max-block-size: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; padding: 16px 18px; border-radius: 16px; background: rgb(16 22 19 / .96);
  box-shadow: 0 0 0 1px var(--hair), 0 18px 40px -12px rgb(0 0 0 / .7); color: var(--ink); }
.pcard p { margin: 0; }
.pc-name { font: italic 600 1.45rem/1.15 var(--display); text-wrap: balance; }
.pc-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px !important; font: 400 .8125rem/1.4 var(--data); color: var(--ink-2); }
.pc-meta i { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--cc); flex: none; }
/* One rail up the generations: each step is the generation's name, small, over the people in it */
.pc-gens { position: relative; display: grid; gap: 12px; margin: 14px 0 0; padding: 0 0 0 14px; list-style: none; }
.pc-gens::before { content: ""; position: absolute; inset: 6px auto 6px 3px; border-left: 1px solid color-mix(in srgb, var(--cc) 45%, var(--hair)); }
.pc-gens li { position: relative; display: grid; gap: 3px; }
.pc-gens li::before { content: ""; position: absolute; left: -14px; top: .3em; inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--cc); box-shadow: 0 0 0 2px rgb(16 22 19); }
.pc-gens .who { font: 400 .75rem/1.3 var(--data); color: var(--ink-3); }
/* Plain running text, not the story's grid of names; a name never breaks across two lines */
.pc-gens .names { display: block; font-size: .875rem; line-height: 1.4; color: var(--ink-2); }
.pc-gens .names span { white-space: nowrap; }
.pc-sides { display: flex; inline-size: fit-content; margin-top: 14px; }
.pc-sides button { min-block-size: 32px; font-size: .8125rem; }
.pc-total { margin: 14px 0 0; font-size: .9375rem; line-height: 1.35; color: var(--ink-2); }
.pc-total b { font: italic 600 1.6rem/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; margin-inline-end: 4px; }
.pc-down { margin-top: 10px; }
.pc-down details { display: grid; gap: 3px; }
.pc-down summary { list-style: none; cursor: pointer; font: 400 .75rem/1.3 var(--data); color: var(--ink-3); }
.pc-down summary::-webkit-details-marker { display: none; }
.pc-down summary::after { content: " +"; }
.pc-down details[open] summary::after { content: " −"; }
.pc-down summary:hover { color: var(--ink-2); }
.pc-down summary:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
.pc-down summary b { font: 600 .8125rem/1 var(--data); color: var(--ink); font-variant-numeric: tabular-nums; }
.pc-honours { margin-top: 12px !important; font: 400 .8125rem/1.4 var(--data); color: var(--gold); }
.ptag { padding: 5px 10px; border-radius: 999px; background: rgb(16 22 19 / .94); box-shadow: 0 0 0 1px color-mix(in srgb, var(--cc) 60%, transparent);
  font: 400 .8125rem/1.2 var(--data); color: var(--ink); white-space: nowrap; pointer-events: none; }

/* The Fellows as their photos were taken: whole, each at its own shape */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; align-items: start; margin: 24px 0 0; padding: 0; list-style: none; }
.gallery li { display: grid; gap: 2px; }
.gallery img { inline-size: 100%; block-size: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 22%; border-radius: 12px; margin-bottom: 8px; background: var(--hair); box-shadow: 0 0 0 1px var(--hair); }
.gallery b { font: 500 .9375rem/1.25 var(--display); }
.gallery span { display: flex; align-items: center; gap: 6px; font: 400 .75rem/1.3 var(--data); color: var(--ink-3); }
.gallery span::before { content: ""; inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--cc); }
@media (max-width: 63.99em) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; } }

.pc-head.has-photo { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: start; }
.pc-head img { inline-size: 96px; block-size: auto; border-radius: 10px; box-shadow: 0 0 0 1px var(--hair); }

/* Each photo grows in proportion to its shape (scaled up, since a grow factor under 1 leaves space unused), so a row
   shares one height and nothing is cropped */
.portraits { --h: 560px; --gap: 14px; display: flex; gap: var(--gap); inline-size: min(100%, calc(var(--h) * var(--sum) + (var(--n) - 1) * var(--gap))); margin: 0 0 26px; }
.portraits figure { flex: calc(var(--r) * 1000) 1 0; min-inline-size: 0; margin: 0; position: relative; }
.portraits img { display: block; inline-size: 100%; block-size: auto; border-radius: 14px; box-shadow: 0 0 0 1px var(--hair); background: var(--hair); }
.portraits figcaption { margin-top: 8px; font: 400 .8125rem/1.3 var(--data); color: var(--ink-2); }
.portraits.lineage { --gap: 36px; }
.portraits.emerge { inline-size: 100%; }
/* The arrow into each face of a lineage, centred in the gap before it: across in a row, down in the mosaic's stack */
.portraits .arrow { position: absolute; inline-size: 22px; block-size: 22px; fill: none; stroke: var(--ink-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  inset-inline-start: calc(var(--gap) * -.5 - 11px); inset-block-start: calc(50% - 24px); }
.portraits .arrow.down { rotate: 90deg; inset-inline-start: calc(50% - 11px); inset-block-start: calc(var(--gy) * -.5 - 11px); }
.portraits.mosaic figure:nth-child(2) .arrow { inset-inline-start: calc(var(--gx) * -.5 - 11px); }
/* With motion each arrow draws itself as one dash the length of the line; without, the dash covers it whole */
html:not(.motion-off) .portraits .arrow path { stroke-dasharray: 1; }
.portraits.mosaic { display: grid; grid-template-columns: var(--left) minmax(0, 1fr); column-gap: var(--gx); row-gap: var(--gy); inline-size: 100%; align-items: start; }
@media (max-width: 63.99em) { .portraits { --h: 440px; } .portraits.lineage { --gap: 30px; } }

/* The chain, while it draws: generations wait dim until the scroll reaches them, and the line grows down to them */
.chain.draws::before { transform: scaleY(var(--p, 0)); transition: transform calc(var(--beat) * .8) cubic-bezier(.2, .7, .2, 1); }
.chain.draws li { opacity: .22; transition: opacity calc(var(--beat) * .7); }
.chain.draws li.on { opacity: 1; }


/* Interludes: one line at poster size, between the acts */
.step.interlude { min-block-size: 130svh; }
.poster { margin: 0; font: italic 500 clamp(2.4rem, 5.2vw, 4.6rem)/1.06 var(--display); letter-spacing: -.02em; text-wrap: balance; color: var(--ink); }
@media (max-width: 63.99em) { .step.interlude { padding-block: 40svh 30svh; } .poster { font-size: clamp(2.2rem, 10vw, 3rem); } }


/* Group photos across the column: Cohort 1 in 2016, Cohort 10 now */
.group { margin: 0 0 24px; }
/* Group photos run past the text column, as wide as the screen allows once the rings step aside */
@media (min-width: 64em) {
  .group { inline-size: min(62vw, 64rem); }
  .block:has(> .group) > :not(.group) { max-inline-size: 34rem; }
  /* On the stage, not the rings: the scroll-tied spin writes the rings' own transform, which would undo this */
  .stage { transition: scale calc(var(--beat) * 1.6) cubic-bezier(.4, 0, .2, 1), translate calc(var(--beat) * 1.6) cubic-bezier(.4, 0, .2, 1); }
  html.photo-wide .stage { scale: .5; translate: 25% 0; }
}
@media (max-width: 63.99em) { .group { margin-inline: -20px; } .group img { border-radius: 0; } .group figcaption { padding-inline: 20px; } }
.group img { display: block; inline-size: 100%; block-size: auto; border-radius: 14px; box-shadow: 0 0 0 1px var(--hair); background: var(--hair); }
.group figcaption { margin-top: 8px; font: 400 .8125rem/1.45 var(--data); color: var(--ink-3); }


/* The opening's two paragraphs share one spot while motion is on: the first types out and clears, the second types in */
html:not(.motion-off) .opening .block { display: grid; position: relative; }
html:not(.motion-off) .opening .block > p:is(.origin, .main) { grid-area: 1 / 1; align-self: start; }
/* Stacked paragraphs stay unseen from the first paint until the typing has hidden their letters, so the moment between
   the page being built and the motion starting never shows them on top of each other */
html:not(.motion-off):not(.typing-ready) :is(.opening, .typed-end) .block > p { visibility: hidden; }
.opening p.origin { margin: 0 0 1em; font: italic 400 clamp(1.25rem, 2.1vw, 1.85rem)/1.4 var(--display); color: var(--ink-2); }
:is(.opening, .typed-end) .caret { position: absolute; inset: 0 auto auto 0; inline-size: 2px; margin-inline-start: 2px; background: var(--gold); opacity: 0; pointer-events: none;
  animation: caret-blink 1s steps(1) infinite; }
@keyframes caret-blink { 50% { visibility: hidden; } }


/* The ending types like the opening: paragraphs share one spot, at the opening's reading size */
.scene.typed-end { block-size: 420svh; }
html:not(.motion-off) .typed-end .block { display: grid; position: relative; }
html:not(.motion-off) .typed-end .block > p { grid-area: 1 / 1; align-self: start; }
.typed-end p { margin: 0 0 1em; font: italic 400 clamp(1.25rem, 2.1vw, 1.85rem)/1.4 var(--display); color: var(--ink); }

.tap {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-decoration: underline dotted color-mix(in srgb, var(--hi, var(--gold)) 70%, transparent);
  text-decoration-thickness: max(1.5px, .07em);
  text-underline-offset: .18em;
  cursor: pointer;
}
.tap:hover { text-decoration-style: solid; }
.tap[aria-pressed="true"] { text-decoration-style: solid; text-decoration-color: var(--hi, var(--gold)); }
.tap:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
.name-tag { position: fixed; z-index: 7; }
@media (forced-colors: active) { .tap { text-decoration-color: LinkText; } }

/* The card docks beside the rings rather than over them: over the text column on a wide screen, along the bottom on a phone */
.pcard { inset: auto; max-block-size: calc(100dvh - 120px); }
@media (max-width: 63.99em) {
  .pcard { inset: auto 12px max(12px, env(safe-area-inset-bottom)) 12px; translate: none; inline-size: auto; max-block-size: 50svh; }
}
.pcard .pc-head { padding-inline-end: 36px; }
.pc-close {
  position: absolute;
  inset: 10px 10px auto auto;
  display: grid;
  place-items: center;
  inline-size: 36px;
  block-size: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink-3);
  cursor: pointer;
}
.pc-close:hover { color: var(--ink); background: rgb(255 255 255 / .06); }
.pc-close:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.pc-close svg { inline-size: 18px; block-size: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.line-key { position: fixed; z-index: 5; inset: auto 20px max(16px, env(safe-area-inset-bottom)) auto; display: grid; gap: 6px; margin: 0; padding: 0; list-style: none;
  font: 400 .8125rem/1.2 var(--data); color: var(--ink-2); pointer-events: none; transition: opacity .4s; }
.line-key li { display: none; align-items: center; gap: 10px; }
.line-key svg { inline-size: 28px; block-size: 8px; fill: none; stroke: var(--ink-2); stroke-width: 2; }
.line-key .ict path { stroke-dasharray: 5 4; }
html:has(.rings.shows-one) .line-key .one, html:has(.rings.shows-ict) .line-key .ict { display: flex; }
html.playing .line-key { opacity: 0; }
.line-key.covered { opacity: 0; }
/* With no lines on the rings the key is empty; its backing would show as a blank box */
html:not(:has(.rings.shows-one, .rings.shows-ict)) .line-key { visibility: hidden; }
@media (max-width: 63.99em) { .line-key { inset: max(16px, env(safe-area-inset-top)) 16px auto auto; font-size: .75rem; } }

.about-open {
  position: fixed;
  z-index: 5;
  inset: max(14px, env(safe-area-inset-top)) 16px auto auto;
  min-block-size: 40px;
  padding: 0 16px;
  border: 1px solid var(--hair);
  border-radius: 99px;
  background: rgb(12 18 15 / .9);
  color: var(--ink-2);
  font: 500 .875rem/1 var(--data);
  cursor: pointer;
  transition: opacity .6s;
}
.about-open:hover { color: var(--ink); border-color: var(--ink-3); }
.about-open:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
html.playing .about-open { opacity: 0; pointer-events: none; }
@media (max-width: 63.99em) {
  /* On a phone the rings hold the top of the screen and bleed off both sides, so the key sits just below their
     bottom edge (centre 27svh, radius 66vw), the one band they never reach */
  .line-key { inset: calc(27svh + 66vw + 12px) auto auto 20px; padding: 8px 12px; border: 1px solid var(--hair); border-radius: 12px; background: rgb(12 18 15 / .9); }
}

.about {
  position: fixed;
  inline-size: min(30rem, calc(100vw - 32px));
  max-block-size: calc(100dvh - 32px);
  padding: 28px 28px 24px;
  border: 0;
  border-radius: 18px;
  background: rgb(16 22 19 / .98);
  box-shadow: 0 0 0 1px var(--hair), 0 24px 60px -16px rgb(0 0 0 / .8);
  color: var(--ink-2);
}
.about::backdrop { background: rgb(6 9 8 / .6); backdrop-filter: blur(2px); }
.about-head { display: flex; align-items: center; gap: 18px; margin: 0 40px 20px 0; }
.about-head img { flex: none; inline-size: 88px; block-size: 88px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--hair); }
.about h2 { margin: 0; font: italic 600 2rem/1.15 var(--display); color: var(--ink); }
.about .about-role { margin: 6px 0 0; font: 400 .8125rem/1.4 var(--data); color: var(--ink-3); }
.about p { margin: 0 0 12px; font: 400 1.125rem/1.6 var(--display); color: var(--ink-2); text-wrap: pretty; }
.about-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 22px 0 0 !important; }
.about-links a { color: var(--ink); font: italic 600 1.125rem/1.4 var(--display); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--teal) 70%, transparent); text-decoration-thickness: 1.5px; text-underline-offset: .2em; }
.about-links a:hover { text-decoration-color: var(--teal); }
.about-links a:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }

.card-preview {
  position: fixed;
  inline-size: min(28rem, calc(100vw - 24px));
  max-block-size: calc(100dvh - 24px);
  padding: 52px 16px 16px;
  border: 0;
  border-radius: 18px;
  background: rgb(16 22 19 / .98);
  box-shadow: 0 0 0 1px var(--hair), 0 24px 60px -16px rgb(0 0 0 / .8);
  overflow: auto;
}
.card-preview::backdrop { background: rgb(6 9 8 / .7); backdrop-filter: blur(2px); }
.card-preview img { display: block; inline-size: auto; max-inline-size: 100%; block-size: auto; max-block-size: calc(100dvh - 220px); margin-inline: auto; border-radius: 10px; }
.cp-sizes { display: flex; gap: 6px; justify-content: center; margin-top: 14px; }
.cp-sizes button { display: inline-flex; align-items: center; gap: 8px; min-block-size: 40px; padding: 0 14px; border-radius: 99px; border: 1px solid transparent; background: none; color: var(--ink-3); font: 500 .8125rem/1 var(--data); cursor: pointer; }
.cp-sizes button i { display: block; block-size: 16px; border: 1.5px solid currentColor; border-radius: 2px; }
.cp-sizes button[aria-checked="true"] { color: var(--ink); border-color: var(--hair); }
.cp-sizes button:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.cp-actions { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
.cp-actions :is(a, button) { display: inline-flex; align-items: center; min-block-size: 44px; padding: 0 20px; border-radius: 99px; border: 1px solid var(--hair); background: none; color: var(--ink); font: 500 .9375rem/1 var(--data); text-decoration: none; cursor: pointer; }
.cp-actions .cp-download { background: var(--teal); border-color: var(--teal); color: #0C120F; }
.cp-actions :is(a, button):focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.about p a { color: var(--ink); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--teal) 70%, transparent); text-decoration-thickness: 1.5px; text-underline-offset: .2em; }
.about p a:hover { text-decoration-color: var(--teal); }
