/* Case-study overlay (approved 22 Nov 2026, "V2 · Evidence").
   A homepage card opens its case study over the page: a sticky text rail on the
   left (close, title and live links fixed; the rest scrolls on its own) and the
   media on the right. Each key decision links to the image that proves it, and
   the rail marks the decision whose image is on screen. Captions sit on the
   media and show on hover or focus (always on touch, below the media on phones).
   Source: _build/cases/<slug>.html, built into the pages by _build/build-cases.py.
   Motion: case-overlay.js (Mayank Kinger's 650ms quintic card-to-page morph). */

@font-face { font-family: "Season Mix Regular"; src: url(/assets/fonts/SeasonMix-Regular.woff2) format("woff2"); font-weight: 420; font-display: swap; }
@font-face { font-family: "Season Mix SemiBold"; src: url(/assets/fonts/SeasonMix-SemiBold.woff2) format("woff2"); font-weight: 670; font-display: swap; }
@font-face { font-family: "Season Sans Regular"; src: url(/assets/fonts/SeasonSans-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Season Sans Medium"; src: url(/assets/fonts/SeasonSans-Medium.woff2) format("woff2"); font-weight: 550; font-display: swap; }

html.co-lock { overflow: hidden; }

.co {
  --co-bg: rgb(16, 16, 16);
  --co-rail-bg: rgb(21, 21, 21);
  --co-rail: clamp(380px, 31vw, 460px);
  --co-pad: 24px;
  --co-gap: 12px;
  --co-r: 8px;
  --co-ink: rgb(247, 247, 247);
  --co-muted: rgb(175, 175, 175);
  --co-faint: rgb(130, 130, 130);
  --co-line: rgb(42, 42, 42);
  --cs-radius: var(--co-r); /* the live sheets read this */
  position: fixed; inset: 0; z-index: 10000;
  display: grid; grid-template-columns: var(--co-rail) minmax(0, 1fr); align-items: start;
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--co-bg); color: var(--co-muted);
  font: 400 15px/1.55 "Season Sans Regular", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.co[hidden] { display: none; }
.co.is-measuring { visibility: hidden; }
.co :where(h1, h2, p, figure) { margin: 0; }
.co :where(ul) { margin: 0; padding: 0; list-style: none; }

/* ---- Rail ---- */
.co-rail {
  position: sticky; top: 0; height: 100vh; height: 100dvh; box-sizing: border-box; min-height: 0;
  display: flex; flex-direction: column;
  background: var(--co-rail-bg); border-right: 1px solid var(--co-line);
}
.co-rail-top { flex: none; display: flex; flex-direction: column; gap: 24px; padding: var(--co-pad) var(--co-pad) 20px; border-bottom: 1px solid var(--co-line); }
.co-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 16px;
  padding: 20px var(--co-pad) var(--co-pad);
  scrollbar-width: thin; scrollbar-color: rgb(58, 58, 58) transparent;
}
/* site.css forces overflow: visible !important on anything within three levels
   of a glass button (so its glow is never clipped); the deck button lives in
   here, so the rail needs a more specific !important to keep scrolling. */
.co .co-body { overflow-x: hidden !important; overflow-y: auto !important; }
.co-body.has-more { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 56px), transparent); }

.co-close {
  appearance: none; border: 0; margin: 0; padding: 0; cursor: pointer; flex: none;
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgb(44, 44, 44); color: var(--co-ink);
  transition: background-color .2s, transform .5s var(--site-card-spring, cubic-bezier(.22, 1.2, .36, 1));
}
.co-close:hover { background: rgb(58, 58, 58); }
.co-close:active { transform: scale(.92); }
.co-close:focus-visible { outline: 2px solid var(--site-accent, rgb(232, 163, 61)); outline-offset: 3px; }
.co-close svg { width: 14px; height: 14px; }

.co-head { display: flex; flex-direction: column; gap: 12px; }
.co-title { font: 420 24px/1.25 "Season Mix Regular", serif; letter-spacing: -0.01em; color: var(--co-ink); text-wrap: balance; }
.co-title em { font-family: "Season Mix Medium Italic", serif; font-weight: 580; font-style: italic; }
.co-links { display: flex; flex-wrap: wrap; gap: 4px 16px; font: 550 14px/1.4 "Season Sans Medium", sans-serif; }
.co-links a { color: var(--co-ink); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; border-radius: 4px; }
.co-links a svg { width: 11px; height: 11px; color: var(--co-muted); transition: transform .3s var(--site-ease-spring, ease); }
.co-links a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: var(--co-muted); }
.co-links a:hover svg { transform: translate(1px, -1px); color: var(--co-ink); }
.co-links a:focus-visible, .co-see:focus-visible { outline: 2px solid var(--site-accent, rgb(232, 163, 61)); outline-offset: 3px; }

.co-block { display: flex; flex-direction: column; gap: 6px; }
.co-block + .co-block { padding-top: 16px; border-top: 1px solid var(--co-line); }
.co-label { font: 550 12px/1.4 "Season Sans Medium", sans-serif; letter-spacing: 0.02em; color: var(--co-faint); }
.co-block p { text-wrap: pretty; }
.co-block strong { font-family: "Season Sans Medium", sans-serif; font-weight: 550; color: var(--co-ink); }

.co-decisions ul { display: flex; flex-direction: column; gap: 14px; }
.co-decisions li { display: flex; flex-direction: column; gap: 2px; transition: opacity .3s; }
.co.has-spy .co-decisions li:not(.is-on) { opacity: .45; }
.co-see { display: inline-flex; align-self: flex-start; margin-top: 2px; font: 550 13px/1.4 "Season Sans Medium", sans-serif; color: var(--co-muted); text-decoration: none; border-radius: 4px; }
.co-see:hover { color: var(--co-ink); }

.co-stat { display: flex; flex-direction: column; gap: 2px; }
.co-stat b { font: 670 28px/1.15 "Season Mix SemiBold", serif; color: var(--co-ink); letter-spacing: -0.01em; }
.co-outcome p + p { margin-top: 6px; }
/* Several outcomes: a grid of stats, two per row. */
.co-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.co-stats > .co-stat { margin-top: 0; }
.co-stats + p { margin-top: 12px; }

.co-cta { margin-top: auto; padding-top: 12px; }
.co .lg-btn { font-size: 16px; }

/* ---- Media ---- */
.co-media { display: flex; flex-direction: column; gap: var(--co-gap); padding: var(--co-pad); min-width: 0; }
.co-fig { position: relative; min-width: 0; scroll-margin-top: var(--co-pad); }
.co-fig > img, .co-fig > video, .co-fig .sas-slot > img { display: block; width: 100%; height: auto; border-radius: var(--co-r); background: rgb(27, 27, 27); }
.co-fig > video { object-fit: cover; }
/* Live components sit on a panel (light for components shown on white). */
.co-panel { padding: 22px; border-radius: var(--co-r); background: rgb(22, 22, 22); box-shadow: inset 0 0 0 1px var(--co-line); }
.co-panel.is-light { background: rgb(248, 249, 251); box-shadow: none; }
.co-panel .fds-slot > img { display: block; width: 100%; height: auto; }
/* The live components size by viewport; here they size by the panel, which is
   narrower than the full-width page they were built for. */
.co-panel { container-type: inline-size; }
@container (max-width: 1040px) {
  .co .fds-bcard-h { font-size: 24px; }
  .co .fds-ramp i { width: 40px; }
  .co .fds .p-datatable { overflow-x: auto; }
  .co .fds .p-datatable td, .co .fds .p-datatable th { padding-inline: 8px; }
  .co .fds .p-datatable td:first-child { white-space: normal; }
}
@container (max-width: 760px) {
  .co .fds-bento-grid { grid-template-columns: minmax(0, 1fr); }
}
.co-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--co-gap); }
.co-fig figcaption {
  position: absolute; left: 16px; bottom: 16px; max-width: min(560px, calc(100% - 32px)); padding: 8px 12px; border-radius: 8px;
  font: 550 14px/1.4 "Season Sans Medium", sans-serif; color: var(--co-ink);
  background: rgba(14, 14, 14, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px rgba(247, 247, 247, .14), 0 8px 24px rgba(0, 0, 0, .35);
  opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .35s cubic-bezier(.25, 1, .4, 1); pointer-events: none;
}
.co-fig:hover figcaption, .co-fig:focus-within figcaption { opacity: 1; transform: none; }
@media (hover: none) { .co-fig figcaption { opacity: 1; transform: none; } }

/* Entrance after the morph lands: rail lines rise, the rest of the media fades
   up. The first slot is already in place (the morph handed it over). */
@keyframes co-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.co.is-in .co-rail-top > *, .co.is-in .co-body > * { animation: co-rise .6s cubic-bezier(.25, 1, .4, 1) both; animation-delay: calc(var(--i, 0) * 45ms + 40ms); }
.co.is-in .co-media > :not(.co-first) { animation: co-rise .7s cubic-bezier(.25, 1, .4, 1) both; animation-delay: 140ms; }
.co.is-out { opacity: 0; transition: opacity .14s linear; }

/* Transition layer (Kinger's structure): a backing that grows from the card to
   the viewport and a media frame that grows from the card's media to slot one. */
.co-layer { position: fixed; inset: 0; z-index: 10001; pointer-events: auto; touch-action: none; }
.co-back { position: absolute; inset: 0; background: rgb(16, 16, 16); will-change: clip-path; }
.co-frame { position: absolute; inset: 0; overflow: hidden; will-change: clip-path; }
.co-frame > * { position: absolute; top: 0; left: 0; transform-origin: 0 0; will-change: transform, opacity; max-width: none; }

/* ---- Phone and narrow tablet: one column. The first slot leads (the morph
   lands on screen), then the rail, then the rest of the media. ---- */
@media (max-width: 899px) {
  .co { display: flex; flex-direction: column; --co-pad: 16px; }
  .co > *, .co-media > * { flex-shrink: 0; }
  .co-rail { position: static; height: auto; order: 1; border-right: 0; }
  .co-rail-top { padding: 24px 20px 20px; }
  .co .co-body { overflow: visible !important; }
  .co-body { padding: 20px 20px 32px; -webkit-mask-image: none !important; mask-image: none !important; }
  .co-media { display: contents; }
  .co-media > * { margin: 0 12px 16px; align-self: stretch; }
  .co-first { order: 0; margin-top: 68px !important; }
  .co-media > :not(.co-first) { order: 2; }
  .co-close { position: fixed; top: 14px; left: 14px; z-index: 2; width: 44px; height: 44px; background: rgba(40, 40, 40, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .co-pair { grid-template-columns: minmax(0, 1fr); }
  .co-panel { padding: 12px; }
  .co-fig figcaption { position: static; max-width: none; opacity: 1; transform: none; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; padding: 8px 2px 0; font: 400 13px/1.45 "Season Sans Regular", sans-serif; color: var(--co-muted); }
}

@media (prefers-reduced-motion: reduce) {
  .co.is-in .co-rail-top > *, .co.is-in .co-body > *, .co.is-in .co-media > * { animation: none; }
}
