/* ==========================================================================
   STORY CASE PAGES (on top of site.css; tools/build_cases.py: render_story)
   Less on the page, more said: the brief and the idea in two sentences, one lab where the
   visitor tries the skill the project is about (js/case.js), then the craft: a few skills,
   each with a few pieces as proof, then the result.
   ========================================================================== */

/* ---- hero: the line, and the skills the project shows, as chips ---- */
.cs-hero__sub { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 22px 48px; margin-top: 28px; }
.cs-hero__sub .case-line { margin-top: 0; max-width: 40ch; }
.cs-skills { display: flex; flex-wrap: wrap; gap: 8px; max-width: 560px; }
.cs-skills li {
  padding: 8px 13px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--text);
  font-family: var(--f-label); font-stretch: 80%; font-weight: 600; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
}
.cs-skills li:first-child { border-color: transparent; background: var(--rec); color: #000; }
.cs-meta { grid-template-columns: 1fr 0.6fr 1.6fr; margin-top: 44px; }

/* ---- the lab: one interactive piece, on its own stage ---- */
.cs-lab {
  position: relative; isolation: isolate; padding: 0 var(--pad) clamp(56px, 9vh, 110px);
}
.cs-lab::before { /* the stage light: warm key from above the piece, cool fill on the far side */
  content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background: radial-gradient(min(46vw, 760px) 60% at 70% 52%, rgba(255, 77, 31, 0.13), transparent 70%),
    radial-gradient(min(36vw, 560px) 50% at 8% 70%, rgba(102, 238, 216, 0.07), transparent 70%);
}
.lab__title {
  font-weight: 800; font-stretch: 112%; font-size: clamp(46px, 5.4vw, 96px); line-height: 0.9; letter-spacing: -0.035em;
}
.lab__title em { font-size: 1.08em; letter-spacing: -0.01em; color: var(--rec); }
.lab__line { margin-top: 18px; max-width: 38ch; color: rgba(242, 239, 234, 0.82); font-size: clamp(17px, 1.3vw, 20px); line-height: 1.45; text-wrap: pretty; }
.lab__why {
  display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; margin-top: clamp(28px, 4vh, 44px); padding-top: 16px;
  border-top: 1px solid var(--line); color: rgba(242, 239, 234, 0.82); font-size: 17px; line-height: 1.45; max-width: 980px;
}
.lab__why b {
  flex: none; color: var(--sig); font-family: var(--f-label); font-stretch: 80%; font-weight: 700; font-size: 12px; letter-spacing: 0.09em; text-transform: uppercase;
}

/* ---- lab: Mix a Ballie (the collection's ten trait layers on one card, a layers panel beside it) ---- */
.mx {
  display: grid; grid-template-columns: minmax(340px, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 4vw, 72px);
  align-items: center; margin-top: clamp(20px, 3vh, 36px);
}
.mx__panel {
  margin-top: clamp(20px, 3vh, 32px); padding: 4px 6px 6px; border: 1px solid var(--line); border-radius: 18px;
  background: linear-gradient(180deg, rgba(242, 239, 234, 0.035), rgba(242, 239, 234, 0.01));
}
.mx__ph { display: flex; align-items: center; gap: 12px; padding: 8px 6px 8px 10px; }
.mx__pt { color: var(--text); font-family: var(--f-label); font-stretch: 80%; font-weight: 700; font-size: 12px; letter-spacing: 0.09em; text-transform: uppercase; }
.mx__pc { color: var(--muted); font-size: 13px; }
.mx__x {
  display: inline-flex; align-items: center; gap: 7px; margin-left: auto; height: 32px; padding: 0 13px 0 10px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--text);
  font-family: var(--f-label); font-stretch: 80%; font-weight: 700; font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.mx__x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.mx__x:hover { border-color: var(--text); }
.mx__x[aria-pressed="true"] { background: var(--sig); border-color: var(--sig); color: #000; }
.mx__rows { display: grid; gap: 1px; }
.mx__row { display: grid; grid-template-columns: minmax(0, 1fr) 34px; align-items: center; gap: 4px; padding-right: 4px; border-radius: 11px; transition: background-color 0.25s; }
.mx__row.is-hot { background: rgba(242, 239, 234, 0.06); }
.mx__row.is-locked { background: rgba(102, 238, 216, 0.08); }
.mx__pick {
  display: grid; grid-template-columns: 34px 74px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  min-height: 37px; padding: 2px 8px 2px 3px; border-radius: 10px; text-align: left; color: var(--text);
}
.mx__pick:focus-visible { outline: 2px solid var(--sig); outline-offset: -2px; }
.mx__th {
  display: grid; place-items: center; width: 33px; height: 33px; overflow: hidden; border-radius: 8px;
  background: #1c1c20; box-shadow: inset 0 0 0 1px rgba(242, 239, 234, 0.07);
}
.mx__th img { max-width: 82%; max-height: 82%; width: auto; height: auto; object-fit: contain; }
.mx__row[data-l="0"] .mx__th img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }
.mx__k { color: var(--muted); font-family: var(--f-label); font-stretch: 80%; font-weight: 700; font-size: 11.5px; letter-spacing: 0.09em; text-transform: uppercase; }
.mx__v { overflow: hidden; font-size: 15.5px; font-weight: 500; line-height: 1.2; white-space: nowrap; text-overflow: ellipsis; }
.mx__row.is-new .mx__v { animation: mxNew 0.9s var(--out); }
@keyframes mxNew { from { color: var(--rec); } }
.mx__n { color: var(--muted); font-family: var(--f-label); font-stretch: 80%; font-weight: 600; font-size: 12px; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.mx__lock {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid transparent; color: var(--muted);
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.mx__lock svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.mx__lock:hover { color: var(--text); border-color: var(--line-2); }
.mx__lock[aria-pressed="true"] { background: var(--sig); border-color: var(--sig); color: #000; }
.mx__lock:not([aria-pressed="true"]) svg path { d: path("M8 11V8a4 4 0 0 1 7.5-2"); } /* open shackle */

.mx__act { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: clamp(20px, 3vh, 30px); }
.mx__spin {
  display: inline-flex; align-items: center; gap: 14px; height: 58px; padding: 0 12px 0 26px; border-radius: 999px;
  background: var(--rec); color: #000; font-weight: 700; font-size: 17px; letter-spacing: 0.01em;
  box-shadow: 0 10px 40px -12px rgba(255, 77, 31, 0.7);
  transition: transform 0.35s var(--out), box-shadow 0.35s;
}
.mx__spin:hover { transform: translateY(-2px); box-shadow: 0 16px 50px -12px rgba(255, 77, 31, 0.85); }
.mx__spin:active { transform: translateY(1px) scale(0.98); }
.mx__spin kbd {
  padding: 6px 9px; border-radius: 999px; background: rgba(0, 0, 0, 0.16);
  font-family: var(--f-label); font-stretch: 80%; font-weight: 700; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
}
.mx__orig { color: var(--text); font-weight: 600; font-size: 15px; border-bottom: 1px solid var(--line-2); padding-bottom: 2px; transition: border-color 0.2s, color 0.2s; }
.mx__orig:hover { color: var(--rec); border-color: var(--rec); }
.mx__of { margin-top: 16px; color: var(--muted); font-family: var(--f-label); font-stretch: 80%; font-weight: 600; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; font-variant-numeric: tabular-nums; }

/* the card: the character on its own background, a trading-card frame, the token under it */
.mx__stage { position: relative; display: grid; justify-items: center; align-items: center; padding: 10px 0 18px; perspective: 1900px; }
.mx__stage::before { /* the halo the card stands in */
  content: ""; position: absolute; left: 50%; top: 46%; width: min(100%, 720px); aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 77, 31, 0.24), rgba(255, 77, 31, 0.05) 62%, transparent);
  pointer-events: none;
}
.mx__card {
  position: relative; z-index: 1; padding: 10px; border-radius: 26px;
  background: #151517; border: 1px solid rgba(242, 239, 234, 0.12);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.4);
  transform-style: preserve-3d; transform: rotateX(var(--ty, 0deg)) rotateY(var(--tx, 0deg));
  transition: transform 0.9s var(--out), background-color 0.6s, border-color 0.6s, box-shadow 0.6s;
  user-select: none; -webkit-user-select: none;
}
.mx__art {
  position: relative; height: min(70vh, 720px, 118vw); aspect-ratio: var(--ar); cursor: pointer;
  transform-style: preserve-3d; transition: transform 1.1s var(--out);
}
.mx__layer { position: absolute; inset: 0; transform-style: preserve-3d; transform: translateZ(calc(var(--i) * 0.6px)); transition: transform 1.1s var(--out), opacity 0.3s; pointer-events: none; } /* a hair apart in depth even when closed, so the ten planes never fight over which is in front */
.mx__layer img { position: absolute; display: block; max-width: none; height: auto; pointer-events: none; will-change: transform; } /* will-change: drawn once at full size, so the stack closing back from 0.54 shows the whole sharp picture at once, not a soft one that repaints piece by piece */
.mx__layer[data-l="0"] img { border-radius: 17px; }
.mx__art.is-pre .mx__layer { opacity: 0; }
.mx__art.is-focus .mx__layer:not(.is-hot) { opacity: 0.38; }
.mx__layer.is-hot img { filter: drop-shadow(0 0 1.5px rgba(255, 255, 255, 0.95)) drop-shadow(0 0 14px rgba(255, 255, 255, 0.35)); }
.mx__cap {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 8px 4px;
  transition: opacity 0.4s;
}
.mx__brand { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-family: var(--f-label); font-stretch: 80%; font-weight: 700; font-size: 12px; letter-spacing: 0.09em; text-transform: uppercase; }
.mx__brand i { width: 8px; height: 8px; border-radius: 50%; background: var(--rec); }
.mx__id { display: inline-flex; align-items: baseline; gap: 8px; color: var(--muted); font-size: 13px; }
.mx__id b { color: var(--text); font-weight: 800; font-stretch: 110%; font-size: 21px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.mx__id.is-orig [data-id-k] { color: var(--sig); font-weight: 600; }
.mx__floor {
  position: absolute; z-index: 0; left: 50%; bottom: 4px; width: min(64%, 520px); height: 44px; transform: translateX(-50%);
  border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, 0.7), transparent); pointer-events: none;
}
.mx__tip {
  position: absolute; left: 0; top: 0; z-index: 3; padding: 7px 12px; border-radius: 999px; pointer-events: none; white-space: pre;
  background: var(--text); color: var(--bg); opacity: 0; transition: opacity 0.2s;
  font-family: var(--f-label); font-stretch: 80%; font-weight: 700; font-size: 11.5px; letter-spacing: 0.07em; text-transform: uppercase;
}
.mx__tip.is-on { opacity: 1; }

/* Explode: the stack pulled apart along its depth, each layer on its own plane with its name */
.mx__lt {
  position: absolute; right: 100%; top: 0; display: flex; align-items: center; gap: 8px; margin-right: 26px; opacity: 0;
  padding: 6px 11px; border-radius: 999px; background: rgba(12, 12, 14, 0.82); border: 1px solid rgba(242, 239, 234, 0.16); color: var(--text);
  white-space: nowrap; font-family: var(--f-label); font-stretch: 80%; font-weight: 700; font-size: 17px; letter-spacing: 0.08em; text-transform: uppercase;
  transform-origin: 100% 0; transition: opacity 0.4s;
}
.mx__lt b { color: var(--rec); }
.mx__card.is-exploded { background: transparent; border-color: transparent; box-shadow: none; transform: none; }
.mx__card.is-exploded .mx__art { transform: translate(6%, 17%) rotateX(58deg) rotateZ(-38deg) scale(0.54); cursor: default; }
.mx__card.is-exploded .mx__layer { transform: translateZ(calc(var(--i) * 50px)); }
.mx__card.is-exploded .mx__layer:not([data-l="0"])::before { /* the plane each layer sits on */
  content: ""; position: absolute; inset: 0; border-radius: 17px; border: 1.5px solid rgba(242, 239, 234, 0.2); background: rgba(242, 239, 234, 0.025); transform: translateZ(-2px); /* under its picture: two planes at the same depth cut each other in half */
}
.mx__card.is-exploded .mx__lt { opacity: 1; transform: rotateZ(38deg) rotateX(-58deg); transition-delay: 0.35s; }
.mx__card.is-exploded .mx__cap { opacity: 0; }
.mx__card.is-intro .mx__lt { transition-delay: 0s; }

/* ---- the craft: a skill per row, its words beside its proof ---- */
.cs-craft { padding: clamp(40px, 7vh, 90px) var(--pad) clamp(40px, 6vh, 80px); }
.cr {
  display: grid; grid-template-columns: minmax(280px, 0.42fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 72px);
  padding: clamp(40px, 7vh, 84px) 0; border-bottom: 1px solid var(--line);
}
.cr:last-of-type { border-bottom: 0; }
.cr__head { align-self: start; position: sticky; top: 104px; }
.cr__skill {
  display: flex; gap: 12px; color: var(--muted);
  font-family: var(--f-label); font-stretch: 80%; font-weight: 700; font-size: 12.5px; letter-spacing: 0.09em; text-transform: uppercase;
}
.cr__skill span { color: var(--rec); }
.cr__title { margin-top: 16px; font-weight: 700; font-size: clamp(30px, 3.1vw, 54px); line-height: 1.02; letter-spacing: -0.025em; text-wrap: balance; }
.cr__title em { font-size: 1.06em; }
.cr__text { margin-top: 18px; max-width: 42ch; color: rgba(242, 239, 234, 0.78); font-size: 17px; line-height: 1.55; text-wrap: pretty; }
.cr__media { margin-top: 0; }

/* ---------- tablets and phones ---------- */
@media (max-width: 1023px) {
  .mx { grid-template-columns: minmax(0, 1fr); }
  .mx__copy { display: contents; }
  .lab__title { order: 1; }
  .lab__line { order: 2; }
  .mx__stage { order: 3; }
  .mx__act { order: 4; margin-top: 0; }
  .mx__panel { order: 5; margin-top: 0; }
  .mx__of { order: 6; margin-top: 0; }
  .mx__art { height: min(66vh, 680px, 112vw); }
  .cr { grid-template-columns: minmax(0, 1fr); }
  .cr__head { position: static; }
}
@media (max-width: 767px) {
  .cs-hero__sub { margin-top: 20px; }
  .cs-meta { grid-template-columns: 1fr 1fr; }
  .cs-meta > div:last-child { grid-column: 1 / -1; }
  .mx__pick { grid-template-columns: 38px 60px minmax(0, 1fr) auto; gap: 10px; min-height: 46px; }
  .mx__th { width: 38px; height: 38px; }
  .mx__v { font-size: 15px; }
  .mx__pc { display: none; }
  .mx__spin { flex: 1 1 auto; justify-content: center; padding: 0 26px; }
  .mx__stage { justify-items: stretch; }
  .mx__card { padding: 8px; border-radius: 22px; }
  .mx__art { width: 100%; height: auto; }
  .mx__layer[data-l="0"] img, .mx__card.is-exploded .mx__layer:not([data-l="0"])::before { border-radius: 15px; }
  .mx__card.is-exploded .mx__art { transform: translate(13%, 33%) rotateX(58deg) rotateZ(-38deg) scale(0.43); }
  .mx__card.is-exploded .mx__layer { transform: translateZ(calc(var(--i) * 40px)); }
  .mx__lt { font-size: 22px; margin-right: 18px; }
  .cr__media .g-row { flex-wrap: wrap; }
  .cr__media .g-row.is-small .g-item { flex-basis: calc(50% - var(--gap) / 2); }
  /* a set of three (one per school) stays one row, so no format is left alone at full width */
  .cr__media .g-row.is-one-row { flex-wrap: nowrap; }
  .cr__media .g-row.is-one-row .g-item { flex: var(--ar) 1 0; }
}
@media (hover: none) {
  .mx__spin kbd { display: none; } /* no keyboard to press it on */
}
@media (prefers-reduced-motion: reduce) {
  .mx__spin, .mx__card, .mx__art, .mx__layer, .mx__lt { transition: none; }
}

/* ---- lab: Drive past it (a night road in CSS 3D; the real LED board comes and goes) ----
   The world is 675 units tall and as wide as the stage allows (js sets --s and --ww); the
   eye is at the horizon, the road 170 below it, things move along z toward the camera. */
.db { margin-top: clamp(20px, 3vh, 36px); }
.db__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 48px; }
.db__head .lab__line { margin-top: 0; }
.db__stage {
  position: relative; overflow: hidden; margin-top: clamp(22px, 3.4vh, 36px); border-radius: 10px;
  aspect-ratio: 16 / 8.2; max-height: 76vh; width: 100%; background: #05070b; isolation: isolate;
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9), inset 0 0 0 1px rgba(242, 239, 234, 0.08);
}
.db__world { position: absolute; left: 50%; top: 0; width: calc(var(--ww, 1200) * 1px); height: 675px; transform-origin: 50% 0; transform: translateX(-50%) scale(var(--s, 1)); }
.db__sky {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 34% at 50% 46%, rgba(255, 120, 60, 0.22), transparent 70%),
    radial-gradient(40% 30% at 18% 40%, rgba(102, 238, 216, 0.08), transparent 70%),
    linear-gradient(#020306 0%, #07090f 38%, #1a1110 44.4%, #0b0c0e 44.5%, #08090b 100%);
}
.db__city { position: absolute; left: -10%; width: 120%; top: 246px; height: 56px; opacity: 0.95; }
.db__3d { position: absolute; left: 50%; top: 300px; width: 0; height: 0; perspective: 700px; perspective-origin: 0 0; transform-style: preserve-3d; }
.db__3d > * { position: absolute; left: 0; top: 0; transform-style: preserve-3d; }
.db__road {
  width: 760px; height: 7000px; margin-left: -380px; transform-origin: 50% 0; transform: translate3d(0, 170px, 600px) rotateX(-90deg); /* starts under the camera */
  background: linear-gradient(90deg, #0c0d10, #121317 18%, #121317 82%, #0c0d10);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 55%, transparent 96%); mask-image: linear-gradient(#000 55%, transparent 96%);
}
.db__road::before, .db__road::after { /* the edge lines */
  content: ""; position: absolute; top: 0; bottom: 0; width: 8px; background: rgba(242, 239, 234, 0.55);
}
.db__road::before { left: 30px; }
.db__road::after { right: 30px; }
.db__lines {
  position: absolute; left: 50%; top: -240px; width: 10px; height: calc(100% + 240px); margin-left: -5px;
  background: repeating-linear-gradient(rgba(242, 239, 234, 0.75) 0 110px, transparent 110px 240px);
}
.db__lamp { transform: translate3d(calc(var(--side) * 430px), 170px, calc(-1500px * var(--k) - 400px)); }
.db__lamp::before { /* the pole */
  content: ""; position: absolute; left: -2px; bottom: 0; width: 4px; height: 300px; background: linear-gradient(#2a2c33, #15161a);
}
.db__lamp i { /* the head and its light */
  position: absolute; bottom: 292px; left: calc(var(--side) * -46px - 30px); width: 60px; height: 9px; border-radius: 4px; background: #ffcf9a;
  box-shadow: 0 0 18px 6px rgba(255, 170, 90, 0.75), 0 0 80px 30px rgba(255, 140, 60, 0.25);
}
.db__bb { transform: translate3d(calc(var(--bx, 520) * 1px), 170px, -5200px); }
.db__bb > * { position: absolute; left: 0; }
.db__face {
  width: 576px; height: 270px; bottom: 190px; margin-left: -288px; overflow: hidden; background: #000;
  outline: 10px solid #15161a; box-shadow: 0 0 90px 10px rgba(255, 220, 190, 0.18), 0 0 0 11px rgba(255, 255, 255, 0.05);
}
.db__face video { width: 100%; height: 100%; object-fit: cover; }
.db__legs { width: 300px; height: 190px; bottom: 0; margin-left: -150px; background: linear-gradient(90deg, transparent 22%, #1b1c21 22% 27%, transparent 27% 73%, #1b1c21 73% 78%, transparent 78%); }
.db__dash { /* the windscreen: the world is seen from the driving seat */
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(34% 26% at 50% 100%, rgba(255, 232, 205, 0.13), transparent 100%), /* our headlights on the road */
    radial-gradient(130% 120% at 50% 40%, transparent 62%, rgba(0, 0, 0, 0.85) 100%);
}
.db__hud {
  position: absolute; z-index: 2; left: 16px; right: 16px; top: 14px; display: flex; gap: 18px; justify-content: space-between; align-items: center;
  font-family: var(--f-label); font-stretch: 80%; font-weight: 700; font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(242, 239, 234, 0.85);
}
.db__rec { display: inline-flex; align-items: center; gap: 8px; }
.db__rec i { width: 8px; height: 8px; border-radius: 50%; background: var(--rec); box-shadow: 0 0 10px var(--rec); }
.db__speedo { margin-left: auto; }
.db__speedo b, .db__clock b { color: var(--text); font-size: 15px; font-variant-numeric: tabular-nums; }
.db__clock b { color: var(--sig); }
.db__start {
  position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 14px; height: 64px; padding: 0 28px 0 12px; border-radius: 999px;
  background: var(--rec); color: #000; font-weight: 700; font-size: 18px; box-shadow: 0 16px 50px -12px rgba(255, 77, 31, 0.85);
  transition: transform 0.35s var(--out), opacity 0.3s;
}
.db__start:hover { transform: translate(-50%, -50%) scale(1.04); }
.db__play { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #000; }
.db__play::after { content: ""; margin-left: 4px; border: 9px solid transparent; border-left: 14px solid var(--rec); border-right: 0; }
.db__stage.has-driven .db__start { opacity: 0; pointer-events: none; }

.db__read {
  position: absolute; z-index: 4; inset: 0; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(250px, 1fr); align-items: center; gap: clamp(20px, 3vw, 44px);
  padding: clamp(48px, 7%, 72px) clamp(18px, 4%, 48px) clamp(18px, 4%, 40px);
  background: rgba(5, 6, 9, 0.9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: dbIn 0.5s var(--out) both;
}
.db__read[hidden] { display: none; }
@keyframes dbIn { from { opacity: 0; } }
.db__card { position: relative; aspect-ratio: 1152 / 540; border-radius: 4px; box-shadow: 0 0 0 1px rgba(242, 239, 234, 0.12), 0 30px 70px -30px #000; }
.db__card video { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.db__pins li {
  position: absolute; left: calc(var(--x) * 100%); top: calc(var(--y) * 100%); transform: translate(-50%, -50%) scale(0.4); opacity: 0;
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--sig); color: #000;
  font-weight: 800; font-size: 14px; box-shadow: 0 0 0 4px rgba(102, 238, 216, 0.25), 0 6px 18px rgba(0, 0, 0, 0.6);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
  transition-delay: calc(var(--i) * 0.28s + 0.25s);
}
.db__read.is-on .db__pins li { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.db__had { font-weight: 700; font-size: clamp(22px, 2.2vw, 34px); line-height: 1.1; letter-spacing: -0.015em; }
.db__had b { color: var(--sig); font-variant-numeric: tabular-nums; }
.db__order { margin-top: 6px; color: var(--muted); font-size: 15px; }
.db__list { margin-top: 16px; border-top: 1px solid var(--line); }
.db__list li {
  display: grid; grid-template-columns: 30px 1fr; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--line);
  opacity: 0; transform: translateY(8px); transition: opacity 0.4s, transform 0.5s var(--out); transition-delay: calc(var(--i) * 0.28s + 0.3s);
}
.db__read.is-on .db__list li { opacity: 1; transform: none; }
.db__list i { grid-row: span 2; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--sig); color: #000; font-style: normal; font-weight: 800; font-size: 13px; }
.db__list b { font-size: 16px; font-weight: 600; }
.db__list span { color: var(--muted); font-family: var(--f-label); font-stretch: 80%; font-weight: 600; font-size: 12px; letter-spacing: 0.07em; text-transform: uppercase; }

.db__ctrl { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 18px; }
.db__seg { display: inline-flex; padding: 4px; border-radius: 999px; border: 1px solid var(--line-2); }
.db__opt {
  display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 16px; border-radius: 999px; color: var(--muted);
  font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; transition: background-color 0.25s, color 0.25s;
}
.db__opt small { font-family: var(--f-label); font-stretch: 80%; font-weight: 700; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; }
.db__opt:hover { color: var(--text); }
.db__opt[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.db__go { margin-left: auto; }

@media (max-width: 1023px) {
  .db__stage { aspect-ratio: 4 / 3; max-height: none; }
  .db__read { grid-template-columns: minmax(0, 1fr); align-content: center; gap: 14px; padding: 46px 16px 16px; overflow-y: auto; }
  .db__list li { padding: 7px 0; }
}
@media (max-width: 767px) {
  .db__stage { aspect-ratio: 4 / 5; }
  .db__hud { font-size: 11px; gap: 10px; }
  .db__clock { display: none; }
  .db__ctrl { gap: 10px; }
  .db__seg { flex: 1 1 auto; justify-content: space-between; }
  .db__opt { padding: 0 12px; }
  .db__go { flex: 1 1 100%; justify-content: center; padding: 0 26px; margin-left: 0; }
  .db__had { font-size: 22px; }
  .db__order { font-size: 14px; }
}

/* ---- lab: Look closer (a loupe over an 8K master; the tiles load where it looks) ---- */
.lp { margin-top: clamp(20px, 3vh, 36px); }
.lp__frame {
  position: relative; margin-top: clamp(22px, 3.4vh, 36px); aspect-ratio: var(--ar); overflow: hidden; border-radius: 8px;
  background: var(--bg-2); cursor: none; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.lp__frame picture, .lp__img { width: 100%; height: 100%; object-fit: cover; }
.lp__frame::after { /* the room dims around the loupe */
  content: ""; position: absolute; inset: 0; background: rgba(5, 6, 8, 0.28); pointer-events: none; transition: opacity 0.4s;
}
.lp__lens {
  --d: clamp(130px, 25vw, 380px);
  position: absolute; z-index: 3; left: 0; top: 0; width: var(--d); height: var(--d); border-radius: 50%; overflow: hidden;
  transform: translate(-50%, -50%); background: #000; pointer-events: none;
  box-shadow: 0 0 0 2px rgba(242, 239, 234, 0.9), 0 0 0 7px rgba(10, 10, 11, 0.45), 0 24px 60px -10px rgba(0, 0, 0, 0.9);
}
.lp.is-glide .lp__lens { transition: left 0.75s var(--cut), top 0.75s var(--cut); }
.lp.is-glide .lp__plane { transition: transform 0.75s var(--cut); }
.lp__plane { position: absolute; left: 0; top: 0; transform-origin: 0 0; background: #000 0 0 / 100% 100% no-repeat; }
.lp__plane img { position: absolute; max-width: none; }
.lp__read {
  position: absolute; left: 50%; bottom: 12%; transform: translateX(-50%); display: inline-flex; gap: 8px; padding: 5px 10px; border-radius: 999px;
  background: rgba(10, 10, 11, 0.72); color: rgba(242, 239, 234, 0.8); white-space: nowrap;
  font-family: var(--f-label); font-stretch: 80%; font-weight: 700; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; font-variant-numeric: tabular-nums;
}
.lp__read b { color: var(--sig); }
.lp__dot {
  position: absolute; z-index: 2; left: calc(var(--x) * 100%); top: calc(var(--y) * 100%); transform: translate(-50%, -50%);
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
  background: rgba(10, 10, 11, 0.6); border: 1.5px solid rgba(242, 239, 234, 0.85); color: var(--text); font-weight: 800; font-size: 12px;
  transition: background-color 0.25s, transform 0.3s var(--out);
}
.lp__dot:hover, .lp__dot.is-on { background: var(--sig); border-color: var(--sig); color: #000; }
.lp__hint {
  position: absolute; z-index: 2; right: 14px; bottom: 12px; padding: 6px 10px; border-radius: 999px; background: rgba(10, 10, 11, 0.72);
  font-family: var(--f-label); font-stretch: 80%; font-weight: 700; font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase;
  transition: opacity 0.4s;
}
.lp.is-used .lp__hint { opacity: 0; }
.lp__foot { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px 40px; align-items: start; margin-top: 18px; }
.lp__list { display: flex; flex-wrap: wrap; gap: 8px; }
.lp__spot {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 10px; border-radius: 999px; border: 1px solid var(--line-2); white-space: nowrap;
  color: var(--muted); font-weight: 600; font-size: 15px; transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.lp__spot span { color: var(--rec); font-family: var(--f-label); font-stretch: 80%; font-weight: 700; font-size: 11.5px; letter-spacing: 0.06em; }
.lp__spot:hover { color: var(--text); border-color: var(--text); }
.lp__spot[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.lp__cap { font-family: var(--f-serif); font-style: italic; font-size: clamp(21px, 1.8vw, 28px); line-height: 1.2; text-wrap: pretty; min-height: 2.4em; }
@media (hover: none) {
  .lp__frame { cursor: auto; }
  .lp__hint::before { content: "Tap or drag · "; }
}
@media (max-width: 767px) {
  .lp__foot { grid-template-columns: minmax(0, 1fr); }
  .lp__list { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad); scrollbar-width: none; }
  .lp__spot { flex: none; }
  .lp__dot { width: 22px; height: 22px; font-size: 11px; }
}

/* ---- lab: Pour it yourself (a product film you scrub by hand, drawn frame by frame) ---- */
.sc {
  display: grid; grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.05fr); gap: clamp(28px, 4vw, 72px);
  align-items: center; margin-top: clamp(20px, 3vh, 36px);
}
.sc__meter { position: relative; margin-top: clamp(24px, 3.6vh, 40px); padding-top: 16px; border-top: 1px solid var(--line); }
.sc__tc { display: flex; justify-content: space-between; align-items: baseline; color: var(--muted); font-family: var(--f-label); font-stretch: 80%; font-weight: 700; font-size: 12px; letter-spacing: 0.09em; text-transform: uppercase; }
.sc__tc b { color: var(--text); font-family: var(--f-sans); font-stretch: 100%; font-size: 22px; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.sc__track { position: relative; height: 6px; margin-top: 14px; border-radius: 3px; background: rgba(242, 239, 234, 0.12); overflow: hidden; }
.sc__track i { position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, #f6a316, #ffcf5a); border-radius: 3px; }
.sc__range { position: absolute; left: 0; right: 0; bottom: -10px; width: 100%; height: 30px; margin: 0; opacity: 0; cursor: ew-resize; }
.sc__range:focus-visible + * , .sc__meter:focus-within .sc__track { outline: 2px solid var(--sig); outline-offset: 4px; }
.sc__stage { position: relative; display: grid; justify-items: center; }
.sc__stage::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: min(100%, 640px); aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; background: radial-gradient(closest-side, rgba(246, 163, 22, 0.24), rgba(246, 163, 22, 0.05) 62%, transparent); pointer-events: none;
}
.sc__frame {
  position: relative; z-index: 1; height: min(76vh, 768px, 150vw); aspect-ratio: var(--ar); /* 768: the frames' own height */ overflow: hidden; border-radius: 22px;
  background: #e9e7e3; cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  box-shadow: 0 0 0 1px rgba(242, 239, 234, 0.1), 0 40px 90px -40px rgba(0, 0, 0, 0.95);
}
.sc__frame img, .sc__frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sc__frame.is-dragging { cursor: grabbing; }
.sc__hint {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; background: rgba(10, 10, 11, 0.78); color: var(--text); white-space: nowrap;
  font-family: var(--f-label); font-stretch: 80%; font-weight: 700; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  transition: opacity 0.4s;
}
.sc__hint i { font-style: normal; color: #ffcf5a; font-size: 16px; }
.sc.is-used .sc__hint { opacity: 0; }
@media (max-width: 1023px) {
  .sc { grid-template-columns: minmax(0, 1fr); }
  .sc__copy { display: contents; }
  .sc .lab__title { order: 1; }
  .sc .lab__line { order: 2; }
  .sc__stage { order: 3; }
  .sc__meter { order: 4; margin-top: 0; }
  .sc .mx__act { order: 5; margin-top: 4px; }
  .sc__frame { height: min(70vh, 680px, 150vw); }
}

/* ---- lab: Flip the series (33 posts on one canvas; the system can be shown over it) ---- */
.fl__frame { border-radius: 10px; background: #0b0c10; height: auto; width: min(100%, 76vh, 720px); } /* square: as wide as the column allows */
.fl__now { margin-top: clamp(22px, 3.4vh, 36px); }
.fl__count { display: flex; align-items: baseline; gap: 8px; color: var(--muted); font-family: var(--f-label); font-stretch: 80%; font-weight: 700; font-size: 13px; letter-spacing: 0.08em; }
.fl__count b { color: var(--text); font-family: var(--f-sans); font-stretch: 110%; font-weight: 800; font-size: 44px; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.fl__name { margin-top: 8px; min-height: 2.5em; font-family: var(--f-serif); font-style: italic; font-size: clamp(22px, 1.9vw, 30px); line-height: 1.15; }
.fl .sc__meter { margin-top: 14px; }
.fl__sys { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 15px; }
.fl__sys input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fl__sw { position: relative; width: 44px; height: 26px; border-radius: 999px; background: rgba(242, 239, 234, 0.16); transition: background-color 0.25s; }
.fl__sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--text); transition: transform 0.3s var(--out); }
.fl__sys input:checked + .fl__sw { background: var(--sig); }
.fl__sys input:checked + .fl__sw::after { transform: translateX(18px); background: #000; }
.fl__sys input:focus-visible + .fl__sw { outline: 2px solid var(--sig); outline-offset: 3px; }
.fl__grid { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity 0.4s; overflow: visible; }
.fl.is-sys .fl__grid { opacity: 1; }
.fl.is-sys canvas, .fl.is-sys .sc__poster { filter: saturate(0.5) brightness(0.72); transition: filter 0.4s; }
.fl__cols line { stroke: rgba(102, 238, 216, 0.22); stroke-width: 0.15; vector-effect: non-scaling-stroke; }
.fl__margin { fill: none; stroke: rgba(102, 238, 216, 0.55); stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.fl__z rect { fill: rgba(102, 238, 216, 0.08); stroke: var(--sig); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.fl__z text { fill: var(--sig); font-family: var(--f-label); font-stretch: 80%; font-weight: 700; font-size: 2.6px; letter-spacing: 0.08em; text-transform: uppercase; }

/* ---- lab: Walk the gallery (a year of FSU shows, framed and lit on one wall) ---- */
.gw { margin-top: clamp(20px, 3vh, 36px); }
.gw__room {
  position: relative; overflow: hidden; margin-top: clamp(22px, 3.4vh, 36px); border-radius: 10px; height: min(74vh, 720px, 120vw);
  cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  background:
    radial-gradient(70% 50% at 50% 0%, rgba(255, 236, 214, 0.1), transparent 70%),
    linear-gradient(#1b1a1c 0%, #19181a 70%, #0d0d0e 70.2%, #090909 100%);
  box-shadow: inset 0 0 0 1px rgba(242, 239, 234, 0.08), inset 0 -120px 120px -60px rgba(0, 0, 0, 0.7);
}
.gw__room.is-dragging { cursor: grabbing; }
.gw__track { position: absolute; left: 0; top: 0; bottom: 34%; display: flex; align-items: flex-end; gap: clamp(64px, 6.5vw, 120px); padding: 0 50%; will-change: transform; }
.gw__piece { position: relative; flex: none; height: 78%; aspect-ratio: var(--ar); margin: 0; cursor: pointer; transition: opacity 0.5s, filter 0.5s; filter: brightness(0.6) saturate(0.85); }
.gw__piece.is-sq { height: 56%; top: -10%; } /* hung at the same eye level as the A3 posters (top: % of the wall's height) */
.gw__piece.is-lit { filter: none; }
.gw__frame {
  position: relative; display: block; width: 100%; height: 100%; padding: 4.5%; background: #f4f1ec; border-radius: 1px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 26px 50px -18px rgba(0, 0, 0, 0.85);
}
.gw__piece.is-sq .gw__frame { padding: 6%; background: #101012; }
.gw__frame picture, .gw__frame img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.gw__light { /* a track light's pool on the wall */
  position: absolute; left: 50%; bottom: 30%; width: 260%; height: 190%; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(42% 46% at 50% 38%, rgba(255, 238, 214, 0.2), rgba(255, 238, 214, 0.05) 60%, transparent 72%);
  opacity: 0.25; transition: opacity 0.6s;
}
.gw__piece.is-lit .gw__light { opacity: 1; }
.gw__label {
  position: absolute; left: 0; top: 100%; margin-top: clamp(18px, 3vh, 30px); width: max-content; max-width: max(100%, 190px); padding: 8px 10px; background: #ece8e1; color: #141414; border-radius: 1px;
  display: grid; gap: 2px; opacity: 0; transform: translateY(6px); transition: opacity 0.45s, transform 0.5s var(--out);
}
.gw__piece.is-lit .gw__label { opacity: 1; transform: none; }
.gw__label b { font-weight: 700; font-size: 13px; line-height: 1.2; }
.gw__label span { color: #555; font-family: var(--f-label); font-stretch: 80%; font-weight: 600; font-size: 10.5px; letter-spacing: 0.05em; text-transform: uppercase; }
.gw__frame::after { /* its shadow on the floor */
  content: ""; position: absolute; left: 6%; right: 6%; bottom: -16%; height: 9%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, 0.55), transparent); pointer-events: none;
}
.gw__floor { position: absolute; left: 0; right: 0; bottom: 0; height: 30%; pointer-events: none; background: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.7)); }
.gw__hint { bottom: 16px; }
.gw.is-used .gw__hint { opacity: 0; }
.gw__ctrl { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.gw__btn { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line-2); font-size: 18px; transition: background-color 0.25s, color 0.25s; }
.gw__btn:hover { background: var(--text); color: var(--bg); }
.gw__now { display: flex; align-items: baseline; gap: 8px; color: var(--muted); font-family: var(--f-label); font-stretch: 80%; font-weight: 700; font-size: 13px; letter-spacing: 0.08em; }
.gw__now b { color: var(--text); font-family: var(--f-sans); font-stretch: 110%; font-weight: 800; font-size: 26px; font-variant-numeric: tabular-nums; }
.gw__now em { margin-left: 10px; color: var(--text); font-size: 22px; letter-spacing: 0; text-transform: none; }
/* the whole wall at a glance: a thumbnail per piece under the room, the one in front of you is lit */
.gw__rail { display: flex; gap: 10px; align-items: flex-end; margin-top: 18px; padding: 8px 4px; overflow-x: auto; scrollbar-width: none; }
.gw__rail::-webkit-scrollbar { display: none; }
.gw__thumb { flex: none; height: clamp(64px, 9vh, 96px); aspect-ratio: var(--ar); overflow: hidden; border-radius: 2px; opacity: 0.45; outline: 1px solid rgba(242, 239, 234, 0.14); transition: opacity 0.3s, transform 0.4s var(--out), outline-color 0.3s; }
.gw__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gw__thumb:hover, .gw__thumb:focus-visible { opacity: 0.85; }
.gw__thumb.is-on { opacity: 1; outline: 2px solid var(--rec); outline-offset: 2px; transform: translateY(-4px); }
/* a story told in chapters: every chapter is a section of its own, so the rows need less air */
.cs-chapter { padding-block: clamp(16px, 3vh, 36px) 0; }
.cs-chapter .cr { padding: clamp(32px, 6vh, 72px) 0 clamp(40px, 7vh, 84px); border-bottom: 0; }
@media (max-width: 767px) {
  .gw__room { height: min(64vh, 560px); }
  .gw__track { gap: 56px; }
  .gw__label { margin-top: 14px; max-width: 170px; }
  .gw__now em { font-size: 18px; }
}

@media (max-width: 1023px) {
  .fl .fl__now { order: 4; margin-top: 0; }
  .fl .sc__meter { order: 5; }
  .fl .mx__act { order: 6; }
}

/* the flip's hint sits top right, off the post's title */
.fl .sc__hint { left: auto; right: 14px; bottom: auto; top: 14px; transform: none; }
@media (max-width: 767px) {
  /* a one-word title fits the phone whole: no break inside PERSONAL or STREETS */
  .page-story .case-title { font-size: clamp(40px, 12.2vw, 64px); overflow-wrap: normal; }
}

/* ---- lab: Wake the cast (Baby Boo's friends from the labels; each drawing cut into parts by clip-path,
   every part turning on its own joint: idle loops here, the moves from js on the inner span) ---- */
.zo__stage {
  position: relative; margin-top: clamp(22px, 3vh, 34px); border-radius: 26px; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 95% at 50% 0%, #fdfaf4, #f3ede3 55%, #e8dfd1);
  box-shadow: 0 0 0 1px rgba(242, 239, 234, 0.08), 0 40px 90px -40px rgba(0, 0, 0, 0.95);
}
.zo__stage::before { /* paper */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.5; mix-blend-mode: multiply; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .5 0 0 0 0 .42 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
.zo__scroll { overflow: hidden; }
.zo__cast { position: relative; width: min(100%, 1500px); aspect-ratio: 1500 / 600; margin: 0 auto; --lw: 4.4px; }
.zo__floor { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.zo__floor polyline { fill: none; stroke: #13161b; stroke-width: 4.4; stroke-linecap: round; stroke-linejoin: round; }
.zo__a {
  position: absolute; left: calc(var(--bx) * 100% / 1500); top: calc(var(--by) * 100% / 600);
  width: calc(var(--bw) * 100% / 1500); height: calc(var(--bh) * 100% / 600);
  padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transform: skewX(calc(var(--lean, 0) * 1.6deg)); transform-origin: 50% 100%; transition: transform 0.6s cubic-bezier(0.3, 0.7, 0.3, 1);
}
.zo__cast.is-pre .zo__a { opacity: 0; }
.zo__a:focus-visible { outline: 2px dashed var(--rec); outline-offset: 12px; border-radius: 14px; }
.zo__in, .zo__g, .zo__k { position: absolute; inset: 0; display: block; }
.zo__in { z-index: 1; transform-origin: 50% 100%; animation: zoBreath 3.6s ease-in-out infinite; animation-delay: var(--d, 0s); }
.zo__g, .zo__k { transform-origin: var(--ox, 50%) var(--oy, 100%); }
.zo__k img { position: absolute; max-width: none; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.zo__shadow { position: absolute; left: 10%; right: 10%; bottom: -3%; height: 7%; border-radius: 50%; background: radial-gradient(closest-side, rgba(19, 22, 27, 0.18), transparent); }
.zo__a--koala { --d: -0.8s; }
.zo__a--elephant { --d: -1.7s; }
.zo__a--bunny { --d: -2.4s; }
.zo__a--giraffe { --d: -3.1s; }
/* idle: each joint has its own small life */
.zo__a--lion .zo__g--tail { animation: zoWag 2.8s ease-in-out infinite; }
.zo__a--giraffe .zo__g--tail { animation: zoWag 3.3s ease-in-out -1s infinite; }
.zo__a--giraffe .zo__g--neck { animation: zoSway 4.6s ease-in-out infinite; }
.zo__a--elephant .zo__g--trunk { animation: zoSwing 3.4s ease-in-out infinite; }
.zo__a--bunny .zo__g--earl { animation: zoTwitch 6.2s ease-in-out infinite; }
.zo__a--bunny .zo__g--earr { animation: zoTwitch 6.2s ease-in-out -2.9s infinite reverse; }
.zo__a--koala .zo__g--head { animation: zoDoze 3.4s ease-in-out infinite; }
@keyframes zoBreath { 0%, 100% { scale: 1 1; } 50% { scale: 1.006 1.016; } }
@keyframes zoWag { 0%, 100% { transform: skewY(5deg); } 50% { transform: skewY(-8deg); } } /* a tail shears about its cut, so the joint never opens */
@keyframes zoSway { 0%, 100% { transform: skewX(-1.8deg); } 50% { transform: skewX(1.8deg); } }
@keyframes zoSwing { 0%, 100% { rotate: -3deg; } 50% { rotate: 3.5deg; } }
@keyframes zoTwitch { 0%, 80%, 100% { transform: none; } 84% { transform: skewX(-8deg); } 88% { transform: skewX(5deg); } 92% { transform: skewX(-2deg); } }
@keyframes zoDoze { 0%, 100% { rotate: 0deg; } 50% { rotate: 1.6deg; } }
/* faces: cheeks, a smile, sleep */
.zo__cheeks { opacity: 0.85; transition: opacity 0.4s, scale 0.5s cubic-bezier(0.3, 1.6, 0.4, 1); }
.zo__a.is-happy .zo__cheeks { opacity: 1; scale: 1.18; }
.zo__smile { opacity: 0; scale: 0.5; transition: opacity 0.3s, scale 0.5s cubic-bezier(0.3, 1.6, 0.4, 1); }
.zo__a.is-happy .zo__smile { opacity: 1; scale: 1; }
.zo__dot { position: absolute; width: 4.4%; aspect-ratio: 1.25; border-radius: 50%; translate: -50% -50%; background: #eaa9b8; opacity: 0; transition: opacity 0.5s; }
.zo__a.is-awake .zo__dot { opacity: 0.9; }
.zo__zzz { position: absolute; width: 1px; height: 1px; font-style: normal; transition: opacity 0.3s; }
.zo__zzz b {
  position: absolute; left: 0; bottom: 0; color: #13161b; font-family: var(--f-serif); font-style: italic; font-weight: 400;
  font-size: calc(var(--lw) * 6); line-height: 1; opacity: 0; animation: zoZ 3.6s ease-out infinite;
}
.zo__zzz b:nth-child(2) { animation-delay: 1.2s; }
.zo__zzz b:nth-child(3) { animation-delay: 2.4s; }
.zo__a.is-awake .zo__zzz { opacity: 0; }
@keyframes zoZ {
  0% { opacity: 0; translate: 0 0; scale: 0.6; }
  20% { opacity: 1; }
  100% { opacity: 0; translate: calc(var(--lw) * -9) calc(var(--lw) * -16); scale: 1.15; }
}
.zo__tip { position: absolute; width: 1px; height: 1px; }
/* bubbles: drawn in the same ink */
.zo__bubbles { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.zo__bub {
  position: absolute; left: 0; top: 0; width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2); border-radius: 50%;
  border: calc(var(--lw) * 0.55) solid rgba(19, 22, 27, 0.85);
  background: radial-gradient(circle at 32% 30%, #fff 0 13%, rgba(255, 255, 255, 0.55) 14% 30%, rgba(196, 228, 236, 0.28) 62%, rgba(255, 255, 255, 0.2));
}
.zo__hint { bottom: 16px; }
.zo.is-used .zo__hint { opacity: 0; }
.zo__read { display: grid; gap: 2px; min-width: 15ch; margin: 0; }
.zo__read b { font-weight: 800; font-size: 17px; }
.zo__read span { color: var(--muted); font-family: var(--f-label); font-stretch: 80%; font-weight: 600; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.zo .db__opt[aria-pressed="true"] { background: var(--text); color: var(--bg); }
/* the koala that sleeps through the result: no studio day to get up for */
.result__big .zo__a {
  position: relative; left: auto; top: auto; display: inline-block; width: min(0.92em, 380px); height: auto;
  aspect-ratio: calc(var(--bw) / var(--bh)); margin-left: 0.08em; vertical-align: baseline; cursor: default; transform: none;
}
.result__big .zo__shadow { display: none; }
.result__big .zo__a { --lw: min(0.0137em, 5.6px); }
.result__big .zo__zzz b { color: var(--text); }
@media (max-width: 767px) {
  .zo__scroll { overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; overscroll-behavior-x: contain; }
  .zo__scroll::-webkit-scrollbar { display: none; }
  .zo__cast { width: 920px; max-width: none; }
  .zo__stage { border-radius: 18px; }
  .zo .db__seg { flex: 1 1 100%; overflow-x: auto; scrollbar-width: none; }
  .zo .db__opt { padding: 0 11px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .zo__in, .zo__g, .zo__zzz b { animation: none !important; }
  .zo__a { transition: none; }
}

/* ---- stage: the Ballies mint (the key visual on top of work/ballies; markup: build_cases.stage_mint) ----
   A room in CSS 3D. Behind, a curved wall of 60 Ballies on four rows that slide slowly
   along the arc (the originals among new ones made from the same layers). In front, one
   original big on its card with its ten traits called out on both sides; every few
   seconds a scan line mints the next original over it, top to bottom, and each trait
   changes as the line passes it (js: mintStage). Sizes are in cqh, the stage's height, so
   the room is the same at any size; the wall's nearest card and the big character never
   come out bigger than their files (240 x 283 and 840 x 991). */
@property --tint { syntax: "<color>"; inherits: true; initial-value: #66eec8; }
html.vt-in .mint { view-transition-name: cut-pic; }
html.cues .mint img { animation: none !important; } /* the cue opens the stage; the pictures inside are never scaled past their files */
.mint {
  --hold: 6.6s; --ink: #060708;
  position: relative; overflow: hidden; isolation: isolate; border-radius: 6px; background: var(--ink);
  height: clamp(560px, min(46vw, calc(100svh - 120px)), 1120px);
  container-type: size; perspective: 1800px; perspective-origin: 50% 50%;
  /* the colour of the room turns in twenty steps, not on every frame: each step repaints the
     sky, the floor, the glows and the shadows, and on every frame that cost the scan its frames */
  transition: --tint 1.4s steps(20, end);
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}

/* the room: a glow, a floor, the curved wall */
.mint__space { position: absolute; inset: 0; overflow: hidden; perspective: 120cqh; perspective-origin: 50% 50%; }
.mint__sky {
  position: absolute; inset: 0;
  background: radial-gradient(70% 80% at 50% 48%, color-mix(in oklab, var(--tint) 20%, transparent), transparent 72%), linear-gradient(#050607, #0b0c0f 60%, #050607);
}
.mint__floor {
  position: absolute; left: -100%; width: 300%; bottom: 0; height: 320cqh; transform-origin: 50% 100%; transform: rotateX(90deg);
  background:
    linear-gradient(90deg, color-mix(in oklab, var(--tint) 30%, transparent) 1px, transparent 1px) 50% 0 / 9cqh 9cqh,
    linear-gradient(color-mix(in oklab, var(--tint) 30%, transparent) 1px, transparent 1px) 50% 0 / 9cqh 9cqh;
  -webkit-mask: linear-gradient(transparent, #000 80%); mask: linear-gradient(transparent, #000 80%);
  opacity: 0.55;
}
.mint__wall { position: absolute; left: 50%; top: 50%; transform-style: preserve-3d; transform: translateZ(55cqh) rotateY(var(--wy, 0deg)); }
.mint__row { --dur: 150s; position: absolute; transform-style: preserve-3d; transform: translateY(calc((var(--r) - 1.5) * 27cqh)); }
.mint__row:nth-child(2) { --dur: 128s; --dir: reverse; }
.mint__row:nth-child(3) { --dur: 172s; }
.mint__row:nth-child(4) { --dur: 138s; --dir: reverse; }
.mint__nft {
  position: absolute; left: 0; top: 0; width: 18.6cqh; height: 22cqh; border-radius: 1.1cqh; background-color: #121418;
  background-size: calc(var(--cols) * 100%) calc(var(--rows) * 100%);
  background-position: calc(var(--x) / (var(--cols) - 1) * 100%) calc(var(--y) / (var(--rows) - 1) * 100%);
  backface-visibility: hidden; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09);
  animation: mint-arc var(--dur) linear calc(var(--dur) * var(--i) / -15) infinite var(--dir, normal);
}
.mint__nft::after { /* its serial, small under it */
  content: attr(data-s); position: absolute; left: 0.2cqh; top: calc(100% + 0.9cqh); color: rgba(242, 239, 234, 0.62);
  font-family: var(--f-label); font-stretch: 80%; font-weight: 600; font-size: 1.15cqh; letter-spacing: 0.14em; text-transform: uppercase; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.mint__nft[data-o]::after { color: var(--tint); }
.mint__nft.is-live { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3), 0 0 0 0.25cqh var(--tint), 0 0 4cqh color-mix(in oklab, var(--tint) 70%, transparent); }
@keyframes mint-arc {
  0% { transform: translate(-50%, -50%) rotateY(-66deg) translateZ(-150cqh); opacity: 0; }
  8%, 92% { opacity: 0.58; }
  100% { transform: translate(-50%, -50%) rotateY(66deg) translateZ(-150cqh); opacity: 0; }
}

/* the dark the card stands in, its light, the pool it throws on the floor */
.mint__veil {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(78cqh 54cqh at 50% 50%, color-mix(in oklab, var(--ink) 94%, transparent) 28%, color-mix(in oklab, var(--ink) 55%, transparent) 68%, transparent),
    linear-gradient(var(--ink), transparent 20%, transparent 74%, var(--ink)),
    linear-gradient(90deg, color-mix(in oklab, var(--ink) 75%, transparent), transparent 13%, transparent 87%, color-mix(in oklab, var(--ink) 75%, transparent));
}
.mint__veil::before, .mint__veil::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); }
.mint__veil::before { top: 4cqh; width: 120cqh; height: 92cqh; background: radial-gradient(closest-side, color-mix(in oklab, var(--tint) 24%, transparent), transparent); }
.mint__veil::after { bottom: 3cqh; width: 92cqh; height: 16cqh; background: radial-gradient(closest-side, color-mix(in oklab, var(--tint) 34%, transparent), transparent); }

/* the card, its traits and the lines to them: one rig that floats and leans */
.mint__float { position: absolute; inset: 0; display: grid; place-items: center; transform-style: preserve-3d; animation: mint-sway 16s ease-in-out infinite alternate; }
@keyframes mint-sway {
  from { transform: rotateY(-2.4deg) rotateX(0.8deg) translateY(-0.5cqh); }
  to { transform: rotateY(2.4deg) rotateX(-0.8deg) translateY(0.5cqh); }
}
.mint__rig {
  position: relative; display: grid; grid-template-columns: minmax(0, 300px) auto minmax(0, 300px); column-gap: clamp(40px, 8cqh, 104px);
  transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}
.mint__card {
  position: relative; display: block; height: min(80cqh, 991px); aspect-ratio: 1000 / 1180; padding: 0; border: 0; background: none;
  color: inherit; font: inherit; cursor: pointer; transform-style: preserve-3d;
}
.mint__card:focus-visible { outline: none; }
.mint__card:focus-visible .mint__frame { outline: 2px solid var(--sig); outline-offset: 8px; }
/* depth inside the card (perspective 1800): each layer is scaled back to its own size, so
   at rest they line up exactly and only move apart as the rig turns */
.mint__frame {
  position: absolute; left: 0; right: 0; top: 10.169%; bottom: 0; overflow: hidden; border-radius: 3.4cqh; background: #101216;
  transform: translateZ(-30px) scale(1.01667);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--tint) 60%, transparent), 0 0 8cqh -1cqh color-mix(in oklab, var(--tint) 50%, transparent), 0 5cqh 10cqh -3cqh #000;
}
.mint__frame::after { /* fine scan lines over the background only; the character stays clean */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 3px); mix-blend-mode: overlay;
}
.mint__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mint__bg.is-top { clip-path: inset(0 0 calc(100% - var(--q, 0) * 100%) 0); }
.mint__holo { position: absolute; inset: 0; overflow: hidden; mix-blend-mode: soft-light; }
/* the foil's light is a band three cards wide that slides by transform, on the compositor. As a
   background whose position moved it was repainted on every frame, and those frames made the
   browser restyle all sixty cards of the wall each time */
.mint__holo::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 300%;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.55) 48%, rgba(255, 255, 255, 0.12) 54%, transparent 64%);
  transform: translateX(-66.667%);
  animation: mint-sheen 9s ease-in-out infinite alternate;
}
.mint.is-tilt .mint__holo::before { animation: none; transform: translateX(calc(var(--mx, 0.5) * -66.667%)); }
@keyframes mint-sheen { from { transform: translateX(-66.667%); } to { transform: translateX(0); } }
.mint__char { position: absolute; inset: 0; width: 100%; height: 100%; transform: translateZ(40px) scale(0.97778); pointer-events: none; }
.mint__char:not(.is-top) { clip-path: inset(calc(var(--p, 0) * 100%) -20% -20% -20%); } /* the old one goes as the line passes, its hat too */
.mint__char.is-top { transform: translateZ(41px) scale(0.97722); clip-path: inset(-20% -20% calc(100% - var(--p, 0) * 100%) -20%); }
.mint__plate {
  position: absolute; left: 0; right: 0; top: 10.169%; display: flex; justify-content: space-between; padding: 2.4cqh 2.8cqh; pointer-events: none;
  transform: translateZ(-28px) scale(1.01556);
  color: rgba(8, 9, 10, 0.74); font-family: var(--f-label); font-stretch: 80%; font-weight: 700; font-size: clamp(10.5px, 1.15cqh, 13px); letter-spacing: 0.12em; text-transform: uppercase;
}
.mint__plate b { font-weight: 800; }
.mint__beam { position: absolute; inset: 0; pointer-events: none; opacity: 0; transform: translateZ(43px) scale(0.97611) translateY(calc(var(--p, 0) * 100%)); transition: opacity 0.3s; }
.mint__card.is-minting .mint__beam { opacity: 1; }
.mint__beam::before { /* what the line has just printed still glows */
  content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 18%;
  background: linear-gradient(transparent, color-mix(in oklab, var(--tint) 30%, transparent)); mix-blend-mode: screen;
}
.mint__beam::after {
  content: ""; position: absolute; left: -7%; right: -7%; top: -1px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--tint) 18%, #fff 50%, var(--tint) 82%, transparent);
  box-shadow: 0 0 14px 2px color-mix(in oklab, var(--tint) 80%, transparent), 0 0 44px 8px color-mix(in oklab, var(--tint) 35%, transparent);
}

/* the traits */
.mint__traits { list-style: none; margin: 0; padding: 12.5cqh 0 6cqh; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.mint__traits--l { align-items: flex-end; text-align: right; }
.mint__t { text-shadow: 0 0 14px var(--ink), 0 0 4px var(--ink), 0 1px 2px var(--ink); }
.mint__t { display: grid; gap: 0.7cqh; max-width: 100%; }
.mint__k, .mint__n { display: flex; align-items: center; gap: 9px; font-family: var(--f-label); font-stretch: 80%; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.mint__traits--l .mint__k { justify-content: flex-end; }
.mint__k { color: var(--muted); font-size: 11.5px; }
.mint__k b { color: var(--tint); font-weight: 700; }
.mint__v { overflow: hidden; color: var(--text); font-weight: 600; font-size: clamp(15px, 1.8cqh, 20px); line-height: 1.15; letter-spacing: -0.005em; white-space: nowrap; text-overflow: ellipsis; }
.mint__n { color: rgba(242, 239, 234, 0.5); font-size: 11px; }
.mint__traits--l .mint__n { flex-direction: row-reverse; }
.mint__m { position: relative; overflow: hidden; width: clamp(48px, 7cqh, 80px); height: 3px; border-radius: 2px; background: rgba(242, 239, 234, 0.14); }
.mint__m::after { /* the marker slides by transform (as "left" it was a layout on each frame of the slide) */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(var(--tint), var(--tint)) 0 0 / max(3px, calc(100% / var(--n))) 100% no-repeat;
  filter: drop-shadow(0 0 8px var(--tint));
  transform: translateX(calc(var(--k) / var(--n) * 100%)); transition: transform 0.6s var(--out);
}
/* a trait lights up as the line passes it: its text flares and a patch of the room's colour
   behind it fades. Both run on the compositor (filter, opacity). As an animated text-shadow
   the flash had the whole rig laid out and painted again on every frame of the scan */
.mint__k { position: relative; }
.mint__k::before {
  content: ""; position: absolute; z-index: -1; left: -3cqh; right: -3cqh; top: -2.2cqh; height: 10.5cqh; pointer-events: none; opacity: 0;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--tint) 36%, transparent), transparent);
}
.mint__t.is-hit .mint__k::before { animation: mint-glow 0.9s var(--out); }
.mint__t.is-hit .mint__v, .mint__t.is-hit .mint__k b { animation: mint-hit 0.9s var(--out); }
@keyframes mint-hit { from { filter: brightness(2.2); } }
@keyframes mint-glow { from { opacity: 1; } }
.mint__lines { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; transform: translateZ(44px) scale(0.97556); }
.mint__lines path { fill: none; stroke: color-mix(in oklab, var(--tint) 80%, transparent); stroke-width: 1; stroke-dasharray: 1 1; }
.mint__dot { fill: var(--tint); stroke: var(--ink); stroke-width: 2; }
/* the pulse on each trait: an HTML ring in a layer under the lines (js makes it), placed by left/top
   and pulsing by scale and opacity on the compositor. As circles inside the SVG the ten of them
   were laid out again on every frame */
.mint__pulses { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; transform: translateZ(44px) scale(0.97556); }
.mint__ring {
  position: absolute; left: 0; top: 0; box-sizing: border-box; width: 8px; height: 8px; margin: -4px 0 0 -4px; border: 1px solid var(--tint); border-radius: 50%;
  animation: mint-ring 2.8s var(--out) calc(var(--d, 0) * -0.28s) infinite;
}
@keyframes mint-ring { from { transform: scale(1); opacity: 0.9; } to { transform: scale(4.4); opacity: 0; } }

/* the broadcast frame around it all */
.mint__hud {
  position: absolute; inset: clamp(14px, 2.2cqh, 26px); pointer-events: none; color: var(--text);
  font-family: var(--f-label); font-stretch: 80%; font-weight: 600; font-size: 11.5px; line-height: 1.2; letter-spacing: 0.1em; text-transform: uppercase; font-variant-numeric: tabular-nums;
}
.mint__corner { position: absolute; width: 18px; height: 18px; border: 0 solid rgba(242, 239, 234, 0.42); }
.mint__corner:nth-child(1) { left: 0; top: 0; border-width: 1px 0 0 1px; }
.mint__corner:nth-child(2) { right: 0; top: 0; border-width: 1px 1px 0 0; }
.mint__corner:nth-child(3) { left: 0; bottom: 0; border-width: 0 0 1px 1px; }
.mint__corner:nth-child(4) { right: 0; bottom: 0; border-width: 0 1px 1px 0; }
.mint__hud p { position: absolute; display: grid; gap: 6px; margin: 0; }
.mint__hud p > span:first-child { display: flex; align-items: center; gap: 9px; }
.mint__hud b { font-weight: 700; }
.mint__tl { left: 30px; top: 3px; }
.mint__tr { right: 30px; top: 3px; text-align: right; }
.mint__tr > span:first-child { justify-content: flex-end; }
.mint__bl { left: 30px; bottom: 3px; }
.mint__br { right: 30px; bottom: 3px; text-align: right; }
.mint__dim { color: var(--muted); }
.mint__bl b, .mint__tr b { color: var(--tint); }
.mint__bl b { letter-spacing: 0.16em; }
.mint__rec { width: 7px; height: 7px; border-radius: 50%; background: var(--rec); box-shadow: 0 0 10px var(--rec); animation: mint-rec 1.8s steps(1) infinite; }
@keyframes mint-rec { 50% { opacity: 0.25; } }
.mint__ticks { position: absolute; left: 50%; bottom: clamp(10px, 2cqh, 22px); z-index: 2; display: flex; transform: translateX(-50%); }
.mint__tick { display: grid; place-items: center; width: 24px; height: 26px; padding: 0; border: 0; background: none; cursor: pointer; }
.mint__tick i { position: relative; display: block; overflow: hidden; width: 17px; height: 3px; border-radius: 2px; background: rgba(242, 239, 234, 0.2); transition: background-color 0.2s; }
.mint__tick i::after { content: ""; position: absolute; inset: 0; background: var(--text); transform-origin: 0 50%; transform: scaleX(0); }
.mint__tick.is-done i::after { transform: none; opacity: 0.4; }
.mint__tick.is-on i::after { background: var(--tint); animation: mint-fill var(--hold) linear forwards; }
.mint__tick:hover i { background: rgba(242, 239, 234, 0.5); }
.mint__tick:focus-visible { outline: 2px solid var(--sig); outline-offset: -2px; border-radius: 4px; }
.mint:has(.mint__rig:hover) .mint__tick.is-on i::after { animation-play-state: paused; } /* looking at it holds it */
@keyframes mint-fill { to { transform: scaleX(1); } }
.mint.is-off *, .mint.is-off *::before, .mint.is-off *::after { animation-play-state: paused !important; } /* off screen nothing runs */

@media (max-width: 1099px) {
  .mint__traits, .mint__lines, .mint__pulses { display: none; }
  .mint__rig { display: block; }
}
@media (max-width: 767px) {
  .mint { --hold: 6s; height: min(150vw, 700px); border-radius: 4px; }
  .mint__card { height: auto; width: 66cqw; }
  .mint__wall { transform: translateZ(80cqh); }
  .mint__row { transform: translateY(calc((var(--r) - 1.5) * 30cqh)); }
  .mint__hud { font-size: 10px; letter-spacing: 0.08em; }
  .mint__tl, .mint__bl { left: 22px; }
  .mint__tr, .mint__br { right: 22px; }
  .mint__ticks { bottom: auto; top: calc(50% + 66cqw * 0.59 + 1.6cqh); }
  .mint__tick { width: 16px; height: 24px; }
  .mint__tick i { width: 11px; }
  .mint__plate { padding: 1.8cqh 2.2cqh; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .mint { transition: none; }
  .mint__nft { animation-play-state: paused; }
  .mint__float, .mint__holo::before, .mint__rec, .mint__ring { animation: none; }
  .mint__ring { opacity: 0; }
  .mint__tick.is-on i::after { animation: none; transform: none; }
}

/* ==========================================================================
   UX CASE STUDY (tools/build_cases.py: render_ux; work/apsis)
   The site's own look; the product's colours and faces only where the product is shown
   (the design-system panel).
   ========================================================================== */
@font-face { font-family: Satoshi; src: url(../media/ui/fonts/Satoshi-Variable.woff2) format("woff2"); font-weight: 300 900; font-display: swap; }
@font-face { font-family: Nippo; src: url(../media/ui/fonts/Nippo-Variable.woff2) format("woff2"); font-weight: 200 700; font-display: swap; }

.uxc-meta { grid-template-columns: 1.5fr 0.9fr 1fr 1fr; }
.uxc-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 32px; }
.uxc-disc { max-width: 52ch; color: var(--muted); font-size: 14px; line-height: 1.45; }
.uxc-disc::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 9px; border-radius: 50%; background: var(--sig); vertical-align: 1px; }

.uxc-sec { padding: clamp(56px, 10vh, 120px) var(--pad) 0; }
.uxc-k { margin-bottom: 12px; color: var(--muted); font-family: var(--f-label); font-stretch: 80%; font-weight: 600; font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; }
.uxc-lead { max-width: 62ch; margin-top: 26px; font-size: clamp(18px, 1.35vw, 23px); line-height: 1.45; text-wrap: pretty; }

/* 01 problem & goal */
.uxc-pg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 64px); margin-top: 30px; }
.uxc-pg p { font-size: clamp(18px, 1.35vw, 23px); line-height: 1.4; text-wrap: pretty; }
.uxc-goal p { color: var(--text); font-weight: 600; }
.uxc-goal .uxc-k { color: var(--rec); }
.uxc-measures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin-top: clamp(36px, 6vh, 64px); }
.uxc-measures li { display: grid; align-content: start; gap: 10px; padding: 22px 22px 24px; border: 1px solid var(--line); border-radius: 6px; }
.uxc-measures b { color: var(--rec); font-weight: 800; font-stretch: 112%; font-size: clamp(34px, 3.4vw, 60px); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.uxc-measures span { color: var(--muted); font-size: 15px; line-height: 1.4; }

/* 02 research, 03 users */
.uxc-grid { display: grid; gap: var(--gap); margin-top: 30px; }
.uxc-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.uxc-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.uxc-card { display: grid; align-content: start; gap: 14px; padding: clamp(22px, 2vw, 34px); border: 1px solid var(--line); border-radius: 6px; background: rgba(242, 239, 234, 0.02); }
.uxc-card h3 { font-weight: 700; font-size: clamp(22px, 1.8vw, 32px); line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; }
.uxc-card p { color: rgba(242, 239, 234, 0.78); font-size: 16px; line-height: 1.55; text-wrap: pretty; }
.uxc-card .uxc-tag { justify-self: start; padding: 5px 9px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--muted); font-family: var(--f-label); font-stretch: 80%; font-weight: 600; font-size: 11px; line-height: 1.2; letter-spacing: 0.08em; text-transform: uppercase; }
.uxc-card.is-assume { border-style: dashed; border-color: var(--line-2); }
.uxc-card.is-assume .uxc-tag, .uxc-persona .uxc-tag { border-color: var(--sig); color: var(--sig); }
.uxc-persona blockquote { font-family: var(--f-serif); font-style: italic; font-size: clamp(20px, 1.5vw, 26px); line-height: 1.25; }
.uxc-persona p b { display: block; margin-bottom: 4px; color: var(--muted); font-family: var(--f-label); font-stretch: 80%; font-weight: 600; font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; }

/* 04 flow & IA */
.uxc-fl { display: grid; grid-template-columns: minmax(240px, 0.32fr) minmax(0, 1fr); gap: clamp(24px, 3.5vw, 64px); align-items: start; margin-top: clamp(30px, 5vh, 56px); }
.uxc-fl__t h3 { font-weight: 700; font-size: clamp(24px, 2.2vw, 38px); line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; }
.uxc-fl__t p { margin-top: 14px; color: rgba(242, 239, 234, 0.78); font-size: 16px; line-height: 1.55; }
.uxc-svg { overflow-x: auto; border-radius: 10px; scrollbar-width: thin; }
.uxc-svg svg { display: block; width: 100%; min-width: 900px; max-width: 1600px; height: auto; }
.uxc-svg:focus-visible, .uxc-tbl:focus-visible { outline: 2px solid var(--sig); outline-offset: 3px; }

/* 05 wireframe -> final */
.uxc-why { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.uxc-why b { color: var(--rec); font-family: var(--f-label); font-stretch: 80%; font-weight: 600; font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; }
.uxc-why ul { display: grid; gap: 10px; margin-top: 10px; }
.uxc-why li { position: relative; padding-left: 18px; color: rgba(242, 239, 234, 0.82); font-size: 15.5px; line-height: 1.5; }
.uxc-why li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 8px; height: 1px; background: var(--rec); }
.uxc-pair { display: flex; gap: var(--gap); align-items: flex-start; }
.uxc-pair > div { flex: var(--ar) 1 0%; min-width: 0; }
.uxc-bd { margin-top: 0; width: 100%; }
.uxc-pair__m .bd__label { top: 10px; padding: 4px 6px; font-size: 10px; }
.uxc-pair__m .bd__label--l { left: 8px; }
.uxc-pair__m .bd__label--r { right: 8px; }
.uxc-cap { margin-top: 9px; color: var(--muted); font-family: var(--f-label); font-stretch: 80%; font-weight: 600; font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; }

/* 06 design system: the product's own colours and faces, on its own night */
.uxc-ds { display: grid; grid-template-columns: 0.9fr 1.3fr 1fr; gap: var(--gap); margin-top: 30px; }
.uxc-ds__col { padding: clamp(20px, 2vw, 32px); border-radius: 10px; background: #060827; color: #F4F5FF; }
.uxc-ds__col .uxc-k { color: #AEB3DE; }
.uxc-ds__col .uxc-k ~ .uxc-k { margin-top: 30px; }
.uxc-sws { display: grid; gap: 10px; }
.uxc-sws li { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; }
.uxc-sw { grid-row: span 2; width: 38px; height: 38px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(214, 220, 255, 0.18); }
.uxc-sws b { font-family: Satoshi, sans-serif; font-weight: 600; font-size: 15px; }
.uxc-sws code { font-family: Satoshi, sans-serif; font-size: 13px; color: #AEB3DE; font-variant-numeric: tabular-nums; }
.uxc-sws small { grid-column: 2 / -1; color: #7C82B8; font-size: 13px; }
.uxc-spec { padding-bottom: 6px; }
.uxc-spec__a { font-family: Nippo, sans-serif; font-weight: 600; font-size: clamp(30px, 2.6vw, 46px); line-height: 1; letter-spacing: -0.01em; }
.uxc-spec__b { margin-top: 18px; font-family: Satoshi, sans-serif; font-weight: 600; font-size: clamp(20px, 1.6vw, 28px); font-variant-numeric: tabular-nums; }
.uxc-spec__n { margin-top: 8px; color: #AEB3DE; font-family: Satoshi, sans-serif; font-size: 13.5px; }
.uxc-odds { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.uxc-odds p { margin-top: 7px; color: #AEB3DE; font-family: Satoshi, sans-serif; font-size: 12px; text-align: center; }
.uxc-od {
  position: relative; display: grid; align-content: center; justify-items: center; gap: 1px; height: 52px; padding: 0 6px; border-radius: 12px;
  background: #141A4E; color: #F4F5FF; font-family: Satoshi, sans-serif; font-variant-numeric: tabular-nums;
}
.uxc-od small { font-size: 11.5px; font-weight: 600; color: #AEB3DE; }
.uxc-od b { font-size: 16px; font-weight: 600; line-height: 1.15; }
.uxc-od.sel { background: #FF5CB8; color: #1A0420; }
.uxc-od.sel small { color: rgba(26, 4, 32, 0.78); }
.uxc-od::after { content: ""; position: absolute; right: 7px; top: 8px; border: 5px solid transparent; opacity: 0; }
.uxc-od.up::after { border-bottom-color: #6DF2B0; border-top-width: 0; opacity: 1; }
.uxc-od.dn::after { border-top-color: #FFD166; border-bottom-width: 0; opacity: 1; }
.uxc-od.up, .uxc-od.dn { box-shadow: inset 0 0 0 1.5px rgba(214, 220, 255, 0.26); }
.uxc-od.sus { background: transparent; box-shadow: inset 0 0 0 1px rgba(214, 220, 255, 0.12); color: #7C82B8; }
.uxc-od.sus small { color: #7C82B8; }
.uxc-note2 { margin-top: 18px; color: #AEB3DE; font-family: Satoshi, sans-serif; font-size: 14px; line-height: 1.5; }
.uxc-ctr { display: grid; gap: 10px; }
.uxc-ctr li { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; font-family: Satoshi, sans-serif; }
.uxc-aa { grid-row: span 2; display: grid; place-items: center; height: 40px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(214, 220, 255, 0.14); font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.uxc-ctr li > span:nth-child(2) { color: #AEB3DE; font-size: 13.5px; }
.uxc-ctr b { grid-column: 2; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.uxc-ctr em { grid-column: 3; grid-row: 1 / span 2; padding: 3px 8px; border-radius: 999px; background: rgba(109, 242, 176, 0.14); color: #6DF2B0; font: normal 600 12px/1.3 Satoshi, sans-serif; }

/* 07 responsible play */
.uxc-rps { grid-template-columns: repeat(6, minmax(0, 1fr)); max-width: calc(6 * 390px + 5 * var(--gap)); }
.uxc-rp figcaption { margin-top: 12px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.uxc-rp figcaption b { display: block; margin-bottom: 4px; color: var(--text); font-size: 15.5px; font-weight: 700; }
.uxc-rp .g-open { border-radius: 10px; }

/* 08 test plan */
.uxc-tbl { margin-top: 30px; overflow-x: auto; }
.uxc-tbl table { width: 100%; min-width: 560px; border-collapse: collapse; }
.uxc-tbl th { padding: 0 16px 12px 0; border-bottom: 1px solid var(--line-2); color: var(--muted); text-align: left; font-family: var(--f-label); font-stretch: 80%; font-weight: 600; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.uxc-tbl td { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line); font-size: clamp(16px, 1.15vw, 19px); line-height: 1.4; vertical-align: top; }
.uxc-tbl td:first-child { width: 3.2em; color: var(--rec); font-variant-numeric: tabular-nums; }
.uxc-tbl td:last-child { width: 40%; color: rgba(242, 239, 234, 0.78); }

/* 09 result, 10 next time */
.uxc-result { margin-top: clamp(56px, 10vh, 120px); }
.uxc-try {
  display: inline-flex; align-items: baseline; gap: 0.3em; margin-top: 26px; color: var(--rec);
  font-weight: 900; font-stretch: 112%; font-size: clamp(44px, 7.4vw, 136px); line-height: 0.92; letter-spacing: -0.04em;
  transition: color 0.25s;
}
.uxc-try span { transition: transform 0.4s var(--out); }
.uxc-try:hover { color: var(--text); }
.uxc-try:hover span { transform: translateX(0.12em); }
.uxc-try:focus-visible { outline: 2px solid var(--sig); outline-offset: 6px; border-radius: 4px; }
.uxc-mocks { margin-top: 40px; }
.uxc-diff__h { grid-column: 1 / -1; }

@media (max-width: 1279px) {
  .uxc-ds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .uxc-ds__col:nth-child(2) { grid-column: 1 / -1; grid-row: 1; }
}
@media (max-width: 1023px) {
  .uxc-meta { grid-template-columns: 1fr 1fr; }
  .uxc-pg, .uxc-grid--3 { grid-template-columns: minmax(0, 1fr); }
  .uxc-measures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .uxc-fl { grid-template-columns: minmax(0, 1fr); }
  .uxc-rps { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 900px; }
}
@media (max-width: 767px) {
  .uxc-meta > div:last-child { grid-column: auto; }
  .uxc-grid--2 { grid-template-columns: minmax(0, 1fr); }
  .uxc-measures li { padding: 16px; }
  .uxc-pair { flex-wrap: wrap; }
  .uxc-pair > .uxc-pair__d { flex: 1 1 100%; }
  .uxc-pair > .uxc-pair__m { flex: 0 0 62%; margin-inline: auto; }
  .uxc-ds { grid-template-columns: minmax(0, 1fr); }
  .uxc-ds__col:nth-child(2) { grid-row: auto; }
  .uxc-odds { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .uxc-rps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .uxc-cta .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .uxc-try, .uxc-try span { transition: none; }
}
