/* Home: spine atlas. Owned by the atlas section agent (homepage 100x work, 2026-09-23, rounds 1 and 2).
   The page's one scroll-pinned story: a dark film hung on the mist lightbox, read like live
   fluoroscopy, beside the chapter it is showing. Round 2: on a desk the stage pins as one scene and
   the five chapters take turns in one place, so scrolling, pointing at the spine, focus and a click
   all change the same view, with Apple's kind of transition: the old chapter lifts away, the new one
   rises in and settles from a blur to sharp, its parts in turn. Colours are site tokens only; the
   film's greys are lightbox blue at lower strength over ink. */

.atlas {
  --atlas-r: 18px;                                   /* the one agreed large radius, for Apple-style tiles */
  --atlas-ease: cubic-bezier(0.28, 0.11, 0.32, 1);   /* Apple's entrance curve */
  --atlas-io: cubic-bezier(0.4, 0, 0.6, 1);          /* Apple's nav curve: exits and colour */
  --atlas-tile: cubic-bezier(0, 0, 0.5, 1);          /* Apple's tile lift */
}

.atlas__head { max-width: 44rem; }
.atlas__head h2 { font-size: clamp(2.2rem, 3.7vw, 3.35rem); line-height: 1.05; letter-spacing: -0.02em; }
.atlas__head .lede { margin-top: 1.1rem; }
/* the older markup's phone tabs: the film's own region links replace them */
.atlas__tabs { display: none; }

.atlas__stage { position: relative; display: grid; grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.18fr); gap: clamp(1.5rem, 5vw, 5rem); margin-top: clamp(2.5rem, 5vw, 4rem); }
.atlas__sticky { position: sticky; top: calc(var(--nav-h) + 1.5vh); height: calc(100dvh - var(--nav-h) - 3vh); min-height: 460px; display: flex; justify-content: center; }

/* ---------- the film ---------- */
.atlas__spine {
  position: relative; height: 100%; width: min(100%, 384px);
  display: flex; flex-direction: column; gap: 1rem;
  padding: 1.4rem 1.2rem 1.15rem;
  background: var(--ink); color: var(--lightbox);
  border-radius: var(--atlas-r); box-shadow: var(--shadow-2);
  overflow: hidden;
}
.atlas__spine :focus-visible { outline-color: var(--lightbox); }
.atlas-film__view { position: relative; flex: 1 1 auto; min-height: 0; }
.atlas-film__plate {
  position: absolute; top: 0; bottom: 0; left: 50%;
  aspect-ratio: 210 / 950; height: 100%;
  transform: translateX(calc(-50% - 1.7rem));
  cursor: pointer;
}
.atlas__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

/* the scout: the whole spine, dim, with the region being shown lifted */
.vert__body { fill: color-mix(in srgb, var(--lightbox) 7%, transparent); stroke: color-mix(in srgb, var(--lightbox) 34%, transparent); stroke-width: 1; transition: fill 0.45s var(--atlas-ease), stroke 0.45s var(--atlas-ease); }
.vert__arch { fill: color-mix(in srgb, var(--lightbox) 4%, transparent); stroke: color-mix(in srgb, var(--lightbox) 24%, transparent); stroke-width: 0.8; transition: fill 0.45s var(--atlas-ease), stroke 0.45s var(--atlas-ease); }
.atlas__bones .vert.is-on .vert__body { fill: color-mix(in srgb, var(--lightbox) 24%, transparent); stroke: color-mix(in srgb, var(--lightbox) 78%, transparent); }
.atlas__bones .vert.is-on .vert__arch { fill: color-mix(in srgb, var(--lightbox) 12%, transparent); stroke: color-mix(in srgb, var(--lightbox) 55%, transparent); }

/* the live field: brighter bone, a faint lift, grain, a ring with four reticle marks */
.atlas-film__g0 { stop-color: var(--lightbox); stop-opacity: 0.2; }
.atlas-film__g1 { stop-color: var(--lightbox); stop-opacity: 0.07; }
.atlas-film__g2 { stop-color: var(--lightbox); stop-opacity: 0; }
/* opaque, so the scout under the loupe never shows through as a double image */
.atlas-film__bg { fill: color-mix(in srgb, var(--ink) 93%, var(--lightbox)); }
.atlas-film__lit .vert__body { fill: color-mix(in srgb, var(--lightbox) 34%, transparent); stroke: var(--lightbox); stroke-width: 0.8; }
.atlas-film__lit .vert__arch { fill: color-mix(in srgb, var(--lightbox) 16%, transparent); stroke: color-mix(in srgb, var(--lightbox) 80%, transparent); stroke-width: 0.6; }
.atlas-film__lit .vert.is-on .vert__body { fill: color-mix(in srgb, var(--lightbox) 52%, transparent); }
.atlas__bones .vert.is-level .vert__body { fill: color-mix(in srgb, var(--lightbox) 60%, transparent); stroke: var(--paper); }
.atlas-film__lit .vert.is-level .vert__body { fill: color-mix(in srgb, var(--lightbox) 78%, transparent); stroke: var(--paper); stroke-width: 1; }
.atlas-film__lit .vert.is-level .vert__arch { fill: color-mix(in srgb, var(--lightbox) 34%, transparent); stroke: var(--paper); }
/* skull base and pelvis: soft outlines, brighter inside the live field */
.atlas-film__anat path, .atlas-film__anat circle { fill: none; stroke: color-mix(in srgb, var(--lightbox) 22%, transparent); stroke-width: 1.1; stroke-linecap: round; }
.atlas-film__lit .atlas-film__anat path, .atlas-film__lit .atlas-film__anat circle { stroke: color-mix(in srgb, var(--lightbox) 62%, transparent); stroke-width: 0.8; }
.atlas-film__grain { opacity: 0.32; pointer-events: none; }
.atlas-film__ring { fill: none; stroke: var(--lightbox); stroke-opacity: 0.55; stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.3s var(--atlas-ease) 0.15s; }
/* the field switches on once, the first time the film scrolls into view */
.atlas.is-on .atlas-film__ring { stroke-dashoffset: 0; }
.atlas-film__sweep { fill: var(--lightbox); opacity: 0; pointer-events: none; }
.atlas-film__reticle { fill: none; stroke: var(--lightbox); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.atlas__slice-line { stroke: color-mix(in srgb, var(--lightbox) 55%, transparent); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; transition: stroke 0.3s var(--atlas-io); }
.atlas.is-peek .atlas__slice-line { stroke: var(--paper); }
.atlas-film__field, .atlas__slice { opacity: 0; transition: opacity 0.5s var(--atlas-ease); }
.atlas.is-live .atlas-film__field, .atlas.is-live .atlas__slice { opacity: 1; }

/* the level ruler, left of the plate: a tick per level, the region starts named */
.atlas-film__ruler { position: absolute; top: 0; bottom: 0; right: 100%; width: 2.9rem; pointer-events: none; }
.atlas-film__tick { position: absolute; right: 0.35rem; top: var(--p); width: 5px; height: 1px; background: color-mix(in srgb, var(--lightbox) 38%, transparent); transition: background 0.2s, width 0.2s var(--atlas-ease); }
.atlas-film__tick.is-major { width: 10px; background: color-mix(in srgb, var(--lightbox) 62%, transparent); }
.atlas-film__tick.is-on { width: 14px; background: var(--paper); }
.atlas-film__tick-l { position: absolute; right: 14px; top: -0.55em; font-family: var(--label); font-weight: 600; font-size: 0.72rem; line-height: 1; color: color-mix(in srgb, var(--lightbox) 70%, transparent); transition: opacity 0.2s; }
.atlas-film__tick.is-under .atlas-film__tick-l { opacity: 0; }
.atlas-film__tag {
  position: absolute; right: 0.35rem; top: 0; margin-top: -0.7rem;
  min-width: 2.1rem; height: 1.4rem; padding: 0 0.35rem;
  display: grid; place-items: center;
  font-family: var(--label); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.02em; line-height: 1;
  color: var(--ink); background: var(--lightbox); border-radius: 3px;
  transition: background 0.3s var(--atlas-io);
  will-change: transform;
}
.atlas.is-peek .atlas-film__tag { background: var(--paper); }

/* The regions, right of the plate: a bracket per region, each a link that shows it. The region on
   show is white; the region the scroll is in, while the reader looks elsewhere, stays lit blue. */
.atlas-film__regions { position: absolute; top: 0; bottom: 0; left: 100%; width: 6.6rem; }
.atlas-film__region {
  position: absolute; left: 0.55rem; right: 0; top: var(--a); height: var(--b);
  display: flex; align-items: center; padding-left: 0.95rem;
  font-family: var(--label); font-weight: 600; font-size: 0.8rem; line-height: 1.1;
  color: color-mix(in srgb, var(--lightbox) 70%, transparent); text-decoration: none;
  transition: color 0.3s var(--atlas-io);
}
.atlas-film__region::before {
  content: ''; position: absolute; left: 0; top: 2px; bottom: 2px; width: 6px;
  border: 1px solid color-mix(in srgb, var(--lightbox) 38%, transparent); border-left: 0;
  transition: border-color 0.3s var(--atlas-io);
}
.atlas-film__region[aria-current] { color: var(--lightbox); }
.atlas-film__region[aria-current]::before { border-color: color-mix(in srgb, var(--lightbox) 62%, transparent); }
.atlas-film__region.is-look { color: var(--paper); }
.atlas-film__region.is-look::before { border-color: var(--paper); }
.atlas-film__region:focus-visible { outline-offset: 1px; border-radius: 2px; }
.atlas-film__region-s { display: none; }

/* the readout, under the plate: the level, the region, what he has published on it, and when */
.atlas-read { flex: none; display: grid; gap: 0.65rem; padding-top: 0.85rem; border-top: 1px solid color-mix(in srgb, var(--lightbox) 16%, transparent); }
.atlas-read__top { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; }
.atlas-read__id { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.atlas-read__lv { min-width: 2.9rem; font-family: var(--label); font-weight: 600; font-size: 2.05rem; line-height: 1; color: var(--paper); font-variant-numeric: tabular-nums; }
.atlas-read__rg { display: grid; line-height: 1.25; min-width: 0; }
.atlas-read__rg b { font-family: var(--sans); font-weight: 500; font-size: 0.92rem; color: var(--paper); }
.atlas-read__rg span { font-family: var(--label); font-weight: 600; font-size: 0.78rem; color: color-mix(in srgb, var(--lightbox) 72%, transparent); }
.atlas-read__stats { display: grid; justify-items: end; gap: 0.2rem; font-family: var(--label); font-weight: 600; font-size: 0.74rem; line-height: 1.1; color: color-mix(in srgb, var(--lightbox) 72%, transparent); white-space: nowrap; }
.atlas-read__stat { display: inline-flex; align-items: baseline; gap: 0.35rem; }
.atlas-read__num { font-size: 1.12rem; font-weight: 600; line-height: 1; color: var(--lightbox); font-variant-numeric: tabular-nums; }
.atlas-read__hist { position: relative; height: 38px; display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid color-mix(in srgb, var(--lightbox) 28%, transparent); }
.atlas-read__bar { flex: 1 1 0; height: 100%; background: var(--lightbox); transform-origin: 50% 100%; transform: scaleY(0); transition: transform 0.55s var(--atlas-ease) var(--d, 0s), background 0.2s; }
.atlas-read__bar.is-hot { background: var(--paper); }
.atlas-read__axis { display: flex; justify-content: space-between; gap: 0.5rem; margin-top: -0.25rem; font-family: var(--label); font-weight: 600; font-size: 0.72rem; line-height: 1; color: color-mix(in srgb, var(--lightbox) 70%, transparent); }
.atlas-read__note.is-hot { color: var(--paper); }
.atlas-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- the chapters, as a column (phone, a short window, no script) ---------- */
.atlas__steps { list-style: none; margin: 0; padding: 0 0 14vh; }
.atlas__step { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; padding-block: 2rem; scroll-margin-top: calc(var(--nav-h) + 1rem); }
/* A chapter develops as the reader reaches it, like film: until then its text sits in the muted
   grey (still 5.4:1 on mist, so it stays readable) and its lecture still is grey and dim; as it
   becomes the chapter, the ink comes up, the still takes its colour and the parts rise in turn. */
.atlas.is-live:not(.is-scene) .atlas__step > * { transition: translate 0.8s var(--atlas-ease); }
.atlas.is-live:not(.is-scene) .atlas__step:not(.is-active) > :not(h3) { translate: 0 14px; }
.atlas.is-live:not(.is-scene) .atlas__step h3, .atlas.is-live:not(.is-scene) .atlas__lead, .atlas.is-live:not(.is-scene) .atlas-cite__t, .atlas.is-live:not(.is-scene) .ref--video .ref__title { transition: color 0.6s var(--atlas-ease); }
.atlas.is-live:not(.is-scene) .atlas__step:not(.is-active) h3,
.atlas.is-live:not(.is-scene) .atlas__step:not(.is-active) .atlas__lead,
.atlas.is-live:not(.is-scene) .atlas__step:not(.is-active) .atlas-cite__t,
.atlas.is-live:not(.is-scene) .atlas__step:not(.is-active) .ref--video .ref__title { color: var(--muted); }
.atlas.is-live:not(.is-scene) .ref--video .ref__thumb img { transition: transform 0.8s var(--atlas-ease), filter 0.7s var(--atlas-ease), opacity 0.7s var(--atlas-ease); }
.atlas.is-live:not(.is-scene) .atlas__step:not(.is-active) .ref--video .ref__thumb img { filter: grayscale(1); opacity: 0.5; }
.atlas.is-live:not(.is-scene) .atlas__step.is-active > :nth-child(2) { transition-delay: 0.06s; }
.atlas.is-live:not(.is-scene) .atlas__step.is-active > :nth-child(3) { transition-delay: 0.12s; }
.atlas.is-live:not(.is-scene) .atlas__step.is-active > :nth-child(4) { transition-delay: 0.18s; }
.atlas.is-live:not(.is-scene) .atlas__step.is-active > :nth-child(5) { transition-delay: 0.24s; }
.atlas__step h3 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); }
.atlas__step h3:focus { outline: none; }
.atlas__step h3:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.atlas__lead { margin-top: 0.9rem; max-width: 42ch; font-size: 1.1rem; color: var(--ink-2); }

/* the proof: a citation set as type beside the lecture, instead of two equal boxes */
.atlas__refs { margin-top: 1.9rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 1.4rem 2rem; align-items: center; max-width: 42rem; }
.ref {
  display: flex; flex-direction: column; gap: 0.55rem;
  padding: 1.1rem 1.15rem 1.2rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-card);
  text-decoration: none; color: var(--ink);
  transition: border-color 0.3s, box-shadow 0.4s, transform 0.5s var(--ease-spring);
}
.ref__meta { font-family: var(--label); font-weight: 600; font-size: 0.86rem; color: var(--accent); letter-spacing: 0.01em; }
.ref__title { font-family: var(--display); font-weight: 600; font-size: 1.08rem; line-height: 1.3; }
.ref__go { font-family: var(--label); font-weight: 600; font-size: 0.86rem; color: var(--muted); transition: color 0.3s var(--atlas-io); }
.ref__go span { display: inline-block; transition: transform 0.4s var(--atlas-ease); }
.ref.atlas-cite { padding: 0; gap: 0.8rem; background: none; border: 0; border-radius: 0; box-shadow: none; transform: none; }
/* in the column, every other chapter puts the lecture first, so each chapter screen is composed on
   its own; in the scene the boxes stay put and only what is in them changes */
@media (min-width: 981px) {
  .atlas:not(.is-scene) .atlas__step:nth-child(even) .atlas__refs { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }
  .atlas:not(.is-scene) .atlas__step:nth-child(even) .atlas-cite { order: 2; }
}
.atlas-cite .ref__title { font-size: clamp(1.22rem, 1.5vw, 1.38rem); line-height: 1.28; text-wrap: balance; }
.atlas-cite__t { background-image: linear-gradient(currentColor, currentColor); background-size: 0% 1px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size 0.5s var(--atlas-ease), color 0.3s var(--atlas-io); padding-bottom: 1px; }
.atlas-cite:focus-visible .atlas-cite__t { background-size: 100% 1px; color: var(--accent-deep); }
.atlas-cite__line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 1.1rem; }
/* the lecture as an Apple tile: white on the mist, no border, the large radius, a gentle lift */
.ref--video { padding: 0; overflow: hidden; }
.atlas .ref--video {
  border-color: transparent; border-radius: var(--atlas-r);
  box-shadow: 0 1px 3px color-mix(in srgb, var(--ink) 7%, transparent);
  transition: transform 0.45s var(--atlas-tile), box-shadow 0.45s var(--atlas-tile), border-color 0.3s;
}
.atlas .ref--video:focus-visible { outline-offset: 4px; border-radius: var(--atlas-r); }
.ref--video .ref__thumb { position: relative; aspect-ratio: 16 / 9; background: var(--mist-2); overflow: hidden; }
.ref--video .ref__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--atlas-ease); }
.ref--video .ref__body { padding: 0.85rem 1.15rem 1.1rem; display: flex; flex-direction: column; gap: 0.4rem; }

/* the region's numbers inside the chapter: shown on a phone, where the film has no readout */
.atlas-chdata { display: none; }

/* more on the region, on demand: papers he led, more videos, and the way to all of them */
.atlas-more { margin-top: 1.5rem; max-width: 42rem; }
.atlas-more__btn {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0.2rem 0.75rem;
  min-height: 44px; padding: 0.3rem 0; background: none; border: 0; cursor: pointer; text-align: left; color: var(--ink);
}
/* Apple's "+": a soft round button that inverts on hover and turns a quarter of the way into a cross */
.atlas-more__sign {
  position: relative; flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  transition: background 0.35s var(--atlas-io), rotate 0.45s cubic-bezier(0.35, 0, 0.2, 1), scale 0.3s var(--atlas-tile);
}
.atlas-more__sign::before, .atlas-more__sign::after { content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.6px; margin: -0.8px 0 0 -6px; border-radius: 1px; background: var(--ink); transition: background 0.35s var(--atlas-io); }
.atlas-more__sign::after { transform: rotate(90deg); }
.atlas-more.is-open .atlas-more__sign { rotate: 45deg; }
.atlas-more__btn:active .atlas-more__sign { scale: 0.92; }
.atlas-more__label { font-family: var(--sans); font-weight: 500; font-size: 1rem; }
.atlas-more__sum { font-family: var(--label); font-weight: 600; font-size: 0.86rem; color: var(--muted); }
.atlas-more__panel { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows 0.55s var(--atlas-ease), visibility 0s linear 0.55s; }
.atlas-more.is-open .atlas-more__panel { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows 0.55s var(--atlas-ease), visibility 0s; }
.atlas-more__inner { min-height: 0; overflow: hidden; }
.atlas-more__cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.2rem 1.8rem; padding-top: 0.9rem; }
.atlas-more__h { margin: 0 0 0.35rem; font-family: var(--label); font-weight: 600; font-size: 0.9rem; color: var(--ink-2); }
.atlas-more__list { list-style: none; margin: 0; padding: 0; }
.atlas-more__list li { opacity: 0; translate: 0 8px; transition: opacity 0.3s var(--atlas-io), translate 0.4s var(--atlas-io), filter 0.3s var(--atlas-io); }
.atlas-more.is-open .atlas-more__list li { opacity: 1; translate: 0 0; transition: opacity 0.45s var(--atlas-ease) var(--rd, 0s), translate 0.55s var(--atlas-ease) var(--rd, 0s), filter 0.45s var(--atlas-ease) var(--rd, 0s); }
.atlas-more__list li:nth-child(2) { --rd: 0.05s; }
.atlas-more__list li:nth-child(3) { --rd: 0.1s; }
.atlas-more__list li:nth-child(4) { --rd: 0.15s; }
.atlas-more__row {
  display: grid; grid-template-columns: 3.1rem minmax(0, 1fr); gap: 0.2rem 0.6rem; align-items: baseline;
  min-height: 44px; padding: 0.6rem 0.55rem; margin-inline: -0.55rem;
  border-top: 1px solid var(--line); border-radius: 4px;
  text-decoration: none; color: var(--ink);
  transition: background 0.3s var(--atlas-io);
}
.atlas-more__list li:first-child .atlas-more__row { border-top-color: transparent; }
.atlas-more__y { font-family: var(--label); font-weight: 600; font-size: 0.86rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.atlas-more__tx { display: grid; gap: 0.15rem; }
.atlas-more__t { font-family: var(--display); font-weight: 600; font-size: 0.98rem; line-height: 1.3; transition: color 0.3s var(--atlas-io); }
.atlas-more__j { font-family: var(--label); font-weight: 600; font-size: 0.8rem; color: var(--muted); }
.atlas-more__row--video { grid-template-columns: 3.9rem minmax(0, 1fr); }
.atlas-more__all { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; margin: 1rem 0 0.4rem; font-size: 0.98rem; }

/* ---------- the scene: on a desk the stage pins and the chapters take turns in one place ----------
   The stage is the track: one pinned view plus one segment of scroll per chapter. The film and the
   chapter column pin together; the chapters share one grid cell and only the one on show is seen. */
.atlas.is-scene { --atlas-view: max(460px, calc(100dvh - var(--nav-h) - 3vh)); --atlas-seg: 62vh; }
.atlas.is-scene .atlas__stage { height: calc(var(--atlas-view) + var(--atlas-n, 5) * var(--atlas-seg)); align-items: start; }
.atlas.is-scene .atlas__sticky { height: var(--atlas-view); min-height: 0; }
.atlas.is-scene .atlas__steps { position: sticky; top: calc(var(--nav-h) + 1.5vh); height: var(--atlas-view); display: grid; padding: 0; }
.atlas.is-scene .atlas__step { grid-area: 1 / 1; position: relative; min-height: 0; justify-content: flex-start; padding: var(--atlas-top, 1rem) 0 0; pointer-events: none; user-select: none; }
.atlas.is-scene .atlas__step.is-shown { z-index: 1; pointer-events: auto; user-select: auto; }
/* one idea per view: a larger, surer heading and lead; the lead keeps four lines of room so the
   proof below it stays in the same place from chapter to chapter */
.atlas.is-scene .atlas__step h3 { font-size: clamp(1.95rem, 2.85vw, 2.6rem); line-height: 1.08; letter-spacing: -0.016em; }
.atlas.is-scene .atlas__lead { margin-top: 1rem; max-width: 40ch; min-height: calc(4 * 1.6em); font-size: 1.16rem; line-height: 1.6; }
.atlas.is-scene .atlas__refs { margin-top: 2.1rem; }

/* The cross-fade. Parked: invisible, soft, waiting below (or above) its place. Leaving: fades and
   lifts away fast, on Apple's nav curve. Shown: rises into place and settles from a blur to sharp
   on Apple's entrance curve, each part a beat after the one before it. */
.atlas.is-scene .atlas__step :is(h3, .atlas__lead, .atlas__refs > *, .atlas-more) {
  opacity: 0; translate: 0 var(--atlas-from, 18px); filter: blur(6px);
  transition: opacity 0.18s var(--atlas-io), filter 0.2s var(--atlas-io);
}
.atlas.is-scene .atlas__step.is-leaving :is(h3, .atlas__lead, .atlas__refs > *, .atlas-more) {
  translate: 0 var(--atlas-to, -12px); filter: blur(5px);
  transition: opacity 0.18s var(--atlas-io), translate 0.3s var(--atlas-io), filter 0.2s var(--atlas-io);
}
.atlas.is-scene .atlas__step.is-shown :is(h3, .atlas__lead, .atlas__refs > *, .atlas-more) {
  opacity: 1; translate: 0 0; filter: none;
  transition: opacity 0.42s var(--atlas-ease) var(--d, 0s), translate 0.52s var(--atlas-ease) var(--d, 0s), filter 0.42s var(--atlas-ease) var(--d, 0s),
    transform 0.45s var(--atlas-tile), box-shadow 0.45s var(--atlas-tile);
}
.atlas.is-scene .atlas__step > h3 { --d: 0.05s; }
.atlas.is-scene .atlas__step > .atlas__lead { --d: 0.085s; }
.atlas.is-scene .atlas__refs > :first-child { --d: 0.12s; }
.atlas.is-scene .atlas__refs > :last-child { --d: 0.155s; }
.atlas.is-scene .atlas__step > .atlas-more { --d: 0.19s; }
/* the first chapter, and a reader who asks for less motion, get their state at once */
.atlas.is-still .atlas__step, .atlas.is-still .atlas__step * { transition: none !important; }

/* The "+" card: it grows up out of the button's row over the chapter, which goes soft and dim
   behind it, the way Apple's flyouts blur and dim the page; its rows then arrive in turn. */
.atlas.is-scene .atlas-more { position: relative; }
.atlas.is-scene .atlas__step.is-shown.is-more > :is(h3, .atlas__lead, .atlas__refs) {
  opacity: 0.2; filter: blur(8px); pointer-events: none;
  transition: opacity 0.45s var(--atlas-io), filter 0.45s var(--atlas-io);
}
.atlas.is-scene .atlas-more__panel {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 0.8rem); z-index: 2;
  display: block; max-height: var(--atlas-card-max, 62vh);
  background: var(--paper); border-radius: var(--atlas-r);
  box-shadow: 0 30px 80px -30px color-mix(in srgb, var(--ink) 42%, transparent), 0 2px 10px color-mix(in srgb, var(--ink) 6%, transparent);
  opacity: 0; clip-path: inset(100% 0 0 0 round var(--atlas-r));
  transition: clip-path 0.4s var(--atlas-io), opacity 0.28s var(--atlas-io) 0.1s, visibility 0s linear 0.4s;
}
.atlas.is-scene .atlas-more.is-open .atlas-more__panel {
  opacity: 1; clip-path: inset(0 0 0 0 round var(--atlas-r));
  transition: clip-path 0.6s var(--atlas-ease), opacity 0.3s var(--atlas-io), visibility 0s;
}
.atlas.is-scene .atlas-more__inner { max-height: inherit; overflow: auto; overscroll-behavior: contain; padding: 1.3rem 1.6rem 1.1rem; }
.atlas.is-scene .atlas-more__cols { padding-top: 0; }
.atlas.is-scene .atlas-more__list li { filter: blur(4px); translate: 0 10px; }
.atlas.is-scene .atlas-more.is-open .atlas-more__list li { filter: none; translate: 0 0; }
.atlas.is-scene .atlas-more.is-open .atlas-more__list li:nth-child(1) { --rd: 0.16s; }
.atlas.is-scene .atlas-more.is-open .atlas-more__list li:nth-child(2) { --rd: 0.21s; }
.atlas.is-scene .atlas-more.is-open .atlas-more__list li:nth-child(3) { --rd: 0.26s; }
.atlas.is-scene .atlas-more.is-open .atlas-more__list li:nth-child(4) { --rd: 0.31s; }

/* ---------- phone: the film lies on its side as a band under the nav ---------- */
@media (max-width: 860px) {
  .atlas__stage { display: block; margin-top: 1.8rem; }
  .atlas__sticky { position: sticky; top: var(--nav-h); z-index: 6; height: auto; min-height: 0; display: block; margin-inline: calc(-1 * var(--gutter)); }
  .atlas__spine { width: 100%; height: auto; gap: 0; padding: 0.5rem var(--gutter) 0.5rem; border-radius: 0; box-shadow: 0 12px 28px -14px rgba(10, 13, 18, 0.45); }
  .atlas-film__view { flex: none; padding-bottom: calc(1.3rem + 44px); }
  .atlas-film__plate { position: relative; top: auto; bottom: auto; left: auto; width: 100%; height: auto; aspect-ratio: 950 / 210; transform: none; }
  .atlas-film__ruler { top: 100%; bottom: auto; left: 0; right: 0; width: auto; height: 1.3rem; }
  .atlas-film__tick { top: 0; left: var(--p); right: auto; width: 1px; height: 4px; }
  .atlas-film__tick.is-major { width: 1px; height: 7px; }
  .atlas-film__tick.is-on { width: 1px; height: 9px; }
  .atlas-film__tick-l { display: none; }
  .atlas-film__tag { top: 0.1rem; right: auto; left: 0; margin: 0 0 0 -1.05rem; height: 1.15rem; min-width: 2.1rem; font-size: 0.72rem; }
  .atlas-film__regions { top: calc(100% + 1.3rem); bottom: auto; left: 0; right: 0; width: auto; height: 44px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .atlas-film__region { position: relative; left: auto; top: auto; height: 44px; justify-content: center; padding: 0 0.2rem; text-align: center; font-size: 0.78rem; border-radius: var(--r-btn); background: color-mix(in srgb, var(--lightbox) 8%, transparent); transition: background 0.35s var(--atlas-io), color 0.35s var(--atlas-io); }
  .atlas-film__region::before { display: none; }
  .atlas-film__region-t { display: none; }
  .atlas-film__region-s { display: inline; }
  /* a tap fills its button at once, before the page has glided to the chapter */
  .atlas-film__region.is-look { background: var(--lightbox); color: var(--ink); }
  .atlas-read { display: none; }
  .atlas__step { min-height: 0; padding-block: 2.6rem; scroll-margin-top: calc(var(--nav-h) + 10.5rem); }
  .atlas__step:first-child { padding-top: 1.8rem; }
  .atlas__refs { grid-template-columns: 1fr; gap: 1.2rem; margin-top: 1.5rem; max-width: 30rem; }
  .atlas-more__cols { grid-template-columns: 1fr; }
  .atlas-chdata { display: grid; gap: 0.35rem; margin-top: 1.1rem; max-width: 26rem; }
  .atlas-chdata__nums { display: flex; flex-wrap: wrap; gap: 0.2rem 1.2rem; font-family: var(--label); font-weight: 600; font-size: 0.86rem; color: var(--muted); }
  .atlas-chdata__nums b { font-size: 1.25rem; font-weight: 600; color: var(--ink); margin-right: 0.3rem; font-variant-numeric: tabular-nums; }
  .atlas-chdata__strip { height: 32px; display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid var(--line-2); }
  .atlas-chdata__bar { flex: 1 1 0; height: 100%; background: var(--accent); transform-origin: 50% 100%; }
  .atlas-chdata__axis { display: flex; justify-content: space-between; font-family: var(--label); font-weight: 600; font-size: 0.74rem; color: var(--muted); }
}

/* a narrow desktop column: the citation sits above the lecture instead of squeezing beside it */
@media (min-width: 861px) and (max-width: 980px) {
  .atlas:not(.is-scene) .atlas__refs { grid-template-columns: 1fr; max-width: 24rem; }
}

@media (max-width: 860px) and (max-height: 520px) {
  .atlas__sticky { position: relative; top: auto; }
}

/* ---------- pointer effects: fine pointers only, so a tap never leaves a hover stuck on ---------- */
@media (hover: hover) and (pointer: fine) {
  .atlas-film__region:hover { color: var(--paper); }
  .atlas-film__region:hover::before { border-color: var(--paper); }
  .ref:hover { border-color: var(--accent); box-shadow: var(--shadow-1); transform: translateY(-3px); }
  .ref.atlas-cite:hover { box-shadow: none; transform: none; }
  .atlas .ref--video:hover {
    transform: scale(1.025); border-color: transparent;
    box-shadow: 0 28px 50px -26px color-mix(in srgb, var(--ink) 42%, transparent), 0 2px 8px color-mix(in srgb, var(--ink) 6%, transparent);
  }
  .ref:hover .ref__go { color: var(--accent); }
  .ref:hover .ref__go span { transform: translateX(4px); }
  .atlas-cite:hover .atlas-cite__t { background-size: 100% 1px; color: var(--accent-deep); }
  .ref--video:hover .ref__thumb img { transform: scale(1.035); }
  .atlas-more__btn:hover .atlas-more__sign { background: var(--ink); }
  .atlas-more__btn:hover .atlas-more__sign::before, .atlas-more__btn:hover .atlas-more__sign::after { background: var(--paper); }
  .atlas-more__row:hover { background: var(--paper); }
  .atlas.is-scene .atlas-more__row:hover { background: var(--mist); }
  .atlas-more__row:hover .atlas-more__t { color: var(--accent-deep); }
}
/* shared.css scales the play button on hover for every pointer; on touch it would stick */
@media (hover: none) {
  .atlas .ref--video:hover .play { transform: none; }
}

/* reduced motion: every state still arrives, at once, with no delays left over */
@media (prefers-reduced-motion: reduce) {
  .atlas-read__bar { --d: 0s !important; }
  .atlas.is-live .atlas__step > *, .atlas-more.is-open .atlas-more__list li { transition-delay: 0s !important; }
  .atlas.is-live:not(.is-scene) .atlas__step:not(.is-active) > :not(h3) { translate: none; }
  .atlas-more__list li { translate: none; }
  .atlas.is-scene .atlas__step :is(h3, .atlas__lead, .atlas__refs > *, .atlas-more) { translate: none !important; filter: none !important; transition-delay: 0s !important; }
  .atlas.is-scene .atlas__step.is-shown.is-more > :is(h3, .atlas__lead, .atlas__refs) { filter: none; }
  .atlas.is-scene .atlas-more__panel, .atlas.is-scene .atlas-more.is-open .atlas-more__panel { transition-delay: 0s !important; }
  .atlas.is-scene .atlas-more__list li { filter: none !important; translate: none !important; }
  .atlas .ref--video:hover { transform: none; }
}
