/* craft.css — "see how the chrome is made": the blob-zoom craft reveal.
 *
 * Imported from v1's inspect lab (liquid-chrome-v2 → inspect.js + styles.css) and re-set in
 * v2's language: the DARK computational world (dark glass + blur + bone ink + the one signal
 * accent), mono Edition grammar, the site's own cadence (--ease, 0.09s staggers). The blob is
 * the liquid thing; everything here is a readout hovering over it — never paper.
 *
 * Layers: the shell is a native fullscreen <dialog> (top layer), fully transparent so the
 * blob — a fixed page layer at z -4 — reads through it. The hero recedes underneath via
 * body.craft-active. Motion is transform/opacity only. No new tokens, no new type. */

/* ---- trigger: the quiet tertiary control under the hero CTA (was .colophon-open) -------- */
.craft-open {
  position: relative;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
  padding: 8px 4px; /* generous hit area without a visible box */
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-on-dark-dim);
  transition: color 0.4s var(--ease);
}
.craft-open__dot {
  /* a tiny chrome sphere — the object in miniature */
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff 0%, #e7ddcf 18%, #9a9489 46%, #3a3733 72%, #0a0a0a 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6);
}
.craft-open__label {
  position: relative;
}
.craft-open__label::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  height: 1px;
  width: 0;
  background: var(--signal);
  transition: width 0.4s var(--ease);
}
.craft-open:hover,
.craft-open:focus-visible {
  color: var(--ink-on-dark);
}
.craft-open:hover .craft-open__label::after,
.craft-open:focus-visible .craft-open__label::after {
  width: 100%;
}

/* ---- THE CURTAIN: the machine's frame parts to reveal the light it makes ----------------
   The site's one elaborate beat (docs/DESIGN.md → the authored moments). Architecture:

   OPEN  — keyframe animations on the headline's seam segments (.crt), so the halves can
           *inhale toward the seam* before drawing to the wings; plain delayed transitions
           carry every other element. All movement is transform/opacity (+ the independent
           `scale` property on the two inline-transformed atmosphere divs, which composes
           with their inline translateX without touching it). Delays sit on the 0.09s
           cadence grid.
   CLOSE — the return specs live on the BASE rules below. Removing .craft-active drops the
           open animations, and the base transitions catch the live computed value — so the
           curtains draw closed from wherever the open had reached (Esc mid-flight included),
           and the resting hero recomposes exactly, no drift. The halves return on a slight
           overshoot bézier: they meet, kiss past the seam, settle. The signal word lands
           last, re-lit.

   Cast, in order of appearance in the hero section (markup is LOCKED — selectors only):
   nav thirds · #b-progress thread · span kicker · h1 seam (.crt--l / --em / --r) · p lede ·
   div1 aurora · div2 rim arc · div3 ground fade · div4 pills · a CTA · button trigger. */
body.craft-active {
  overflow: hidden; /* contained overlay mode: the page cannot scroll under the study */
}

/* — base = the resting state + the CLOSE choreography — */
#dark nav > div,
#dark #b-progress,
#dark section > p,
#dark section > a,
#dark section > button,
#dark section > div:nth-of-type(4) > div {
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
#dark #b-progress { transform-origin: 50% 50%; }
#dark section > span {
  transition: opacity 0.55s var(--ease) 0.18s, transform 0.55s var(--ease) 0.18s;
}
#dark section > div:nth-of-type(1),
#dark section > div:nth-of-type(2) {
  transition: opacity 0.6s var(--ease), scale 0.7s var(--ease);
}
#dark section > div:nth-of-type(3) { transition: opacity 0.6s var(--ease); }
.crt {
  display: inline-block; /* word-boundary segments; spaces stay outside as text nodes */
  transition: opacity 0.72s var(--ease) 0.09s,
              transform 0.72s cubic-bezier(0.3, 1.26, 0.32, 1) 0.09s; /* the seam kiss */
}
.crt--em {
  transition: opacity 0.72s var(--ease) 0.27s, transform 0.72s var(--ease) 0.27s;
}

/* — open: wave 1, the frame lets go (0 → ~0.6s) — */
body.craft-active #dark nav { pointer-events: none; }
body.craft-active #dark section > *:not(dialog) { pointer-events: none; }
body.craft-active #dark nav > div:nth-child(1) {
  opacity: 0;
  transform: translateX(-64px);
  transition: opacity 0.54s var(--ease), transform 0.54s var(--ease);
}
body.craft-active #dark nav > div:nth-child(2) {
  opacity: 0;
  transform: translateY(-26px);
  transition: opacity 0.54s var(--ease) 0.045s, transform 0.54s var(--ease) 0.045s;
}
body.craft-active #dark nav > div:nth-child(3) {
  opacity: 0;
  transform: translateX(64px);
  transition: opacity 0.54s var(--ease) 0.09s, transform 0.54s var(--ease) 0.09s;
}
body.craft-active #dark #b-progress {
  opacity: 0;
  transform: scaleX(0); /* the thread pinches to a point */
  transition: opacity 0.36s var(--ease), transform 0.36s var(--ease);
}

/* — open: wave 2, the curtain parts (0.09 → ~1.1s) — */
body.craft-active #dark section > span { /* the kicker leads the left curtain */
  opacity: 0;
  transform: translateX(-88px);
  transition: opacity 0.63s var(--ease) 0.09s, transform 0.63s var(--ease) 0.09s;
}
body.craft-active #dark section > div:nth-of-type(1) {
  /* the aurora exhales: swells a breath while dimming. `scale` composes with the
     inline translateX(-50%); !important because the div carries an inline opacity. */
  opacity: 0 !important;
  scale: 1.05;
  transition: opacity 0.9s var(--ease) 0.09s, scale 0.9s var(--ease) 0.09s;
}
body.craft-active #dark section > div:nth-of-type(2) { /* the chrome rim arc dilates */
  opacity: 0;
  scale: 1.08;
  transition: opacity 0.72s var(--ease) 0.18s, scale 0.72s var(--ease) 0.18s;
}
body.craft-active #dark section > div:nth-of-type(3) { /* the ground fade lifts */
  opacity: 0;
  transition: opacity 0.72s var(--ease) 0.09s;
}
body.craft-active #dark section > p {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.54s var(--ease) 0.36s, transform 0.54s var(--ease) 0.36s;
}
body.craft-active #dark section > div:nth-of-type(4) > div:nth-child(1) {
  opacity: 0;
  transform: translate(-46px, 10px);
  transition: opacity 0.54s var(--ease) 0.36s, transform 0.54s var(--ease) 0.36s;
}
body.craft-active #dark section > div:nth-of-type(4) > div:nth-child(2) {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.54s var(--ease) 0.405s, transform 0.54s var(--ease) 0.405s;
}
body.craft-active #dark section > div:nth-of-type(4) > div:nth-child(3) {
  opacity: 0;
  transform: translate(46px, 10px);
  transition: opacity 0.54s var(--ease) 0.45s, transform 0.54s var(--ease) 0.45s;
}
body.craft-active #dark section > a {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.54s var(--ease) 0.45s, transform 0.54s var(--ease) 0.45s;
}
body.craft-active #dark section > button { /* the pressed control dissolves in place */
  opacity: 0;
  transition: opacity 0.45s var(--ease) 0.54s;
}

/* — the seam itself: inhale toward centre, then draw to the wings with a breath of
     fabric rotation. `both` holds rest during the delay and the wings after. — */
body.craft-active .crt--l { animation: crtOutL 0.95s 0.18s both; }
body.craft-active .crt--r { animation: crtOutR 0.95s 0.27s both; }
@keyframes crtOutL {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.5, 0, 0.72, 0.4);
  }
  12% {
    transform: translate(9px, 0) rotate(0.2deg);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.12, 0.75, 0.12, 1);
  }
  100% {
    transform: translate(-24vw, -14px) rotate(-1.5deg);
    opacity: 0;
  }
}
@keyframes crtOutR {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.5, 0, 0.72, 0.4);
  }
  12% {
    transform: translate(-9px, 0) rotate(-0.2deg);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.12, 0.75, 0.12, 1);
  }
  100% {
    transform: translate(24vw, -14px) rotate(1.5deg);
    opacity: 0;
  }
}
/* the authored beat — the signal word, alone on the emptied stage: it sags under the
   expectation of weight, then rises into the chrome and dissolves. the word performs
   its own meaning, handed back to the machine that makes the light. */
body.craft-active .crt--em { animation: crtOutEm 1.1s 0.45s both; }
@keyframes crtOutEm {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1);
  }
  26% {
    transform: translate(0, 7px) scale(0.99);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.3, 0.1, 0.18, 1);
  }
  100% {
    transform: translate(9vw, -9vh) scale(0.93);
    opacity: 0;
  }
}

/* no-seam fallback (unexpected headline shape): the whole h1 parts as one sheet */
#dark section > h1 { transition: opacity 0.6s var(--ease) 0.09s, transform 0.6s var(--ease) 0.09s; }
body.craft-nosplit.craft-active #dark section > h1 {
  opacity: 0;
  transform: translateY(-24px);
  transition-delay: 0.18s;
}

/* ---- the shell: a transparent fullscreen dialog over the emptied room ------------------- */
dialog.craft {
  position: fixed;
  inset: 0;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  border: 0;
  background: transparent;
  overflow: hidden;
  color: var(--ink-on-dark);
  opacity: 0;
  transition: opacity 0.45s var(--ease);
}
dialog.craft::backdrop {
  background: transparent; /* the blob layer IS the scene — nothing may dim it */
}
dialog.craft.is-open {
  /* arrives once the curtains have mostly parted */
  opacity: 1;
  transition: opacity 0.54s var(--ease) 0.45s;
}

/* the stage is measured — the inset frame is four hairlines that scribe themselves
   clockwise (the broadsheet's drawn-rule grammar) once the shell has arrived; they
   retract quickly on close (base transition). */
.craft-frame {
  position: absolute;
  inset: 22px;
}
.craft-frame__ln {
  position: absolute;
  background: var(--rule-on-dark);
  transition: transform 0.27s var(--ease);
}
.craft-frame__ln--t { top: 0; left: 0; right: 0; height: 1px; transform: scaleX(0); transform-origin: 0 50%; }
.craft-frame__ln--r { top: 0; right: 0; bottom: 0; width: 1px; transform: scaleY(0); transform-origin: 50% 0; }
.craft-frame__ln--b { bottom: 0; left: 0; right: 0; height: 1px; transform: scaleX(0); transform-origin: 100% 50%; }
.craft-frame__ln--l { top: 0; left: 0; bottom: 0; width: 1px; transform: scaleY(0); transform-origin: 50% 100%; }
dialog.craft.is-open .craft-frame__ln { transform: none; }
dialog.craft.is-open .craft-frame__ln--t { transition: transform 0.63s var(--ease) 0.54s; }
dialog.craft.is-open .craft-frame__ln--r { transition: transform 0.63s var(--ease) 0.72s; }
dialog.craft.is-open .craft-frame__ln--b { transition: transform 0.63s var(--ease) 0.9s; }
dialog.craft.is-open .craft-frame__ln--l { transition: transform 0.63s var(--ease) 1.08s; }

/* corner meta — mono coordinates, Edition grammar */
.craft-meta {
  position: absolute;
  font-family: var(--font-label);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  pointer-events: none;
  user-select: none;
}
.craft-meta--tl { top: 38px; left: 40px; color: var(--signal); }
.craft-meta--br {
  bottom: 38px;
  right: 40px;
  display: flex;
  gap: 20px;
  align-items: baseline;
}
.craft-meta .craft-counter { color: var(--ink-dim); letter-spacing: 0.18em; }
.craft-meta .craft-counter [data-craft-counter] {
  display: inline-block;
  min-width: 18px;
  color: var(--signal);
}
.craft-meta .esc-hint { display: inline-flex; align-items: center; gap: 8px; }
.craft-meta .esc-hint::before {
  content: "esc";
  display: inline-block;
  padding: 3px 7px 2px;
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
}

/* close — mono pill, top-right (the colophon close, kept in voice) */
.craft-close {
  position: absolute;
  top: 30px;
  right: 36px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  font-family: var(--font-label);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
  background: rgba(8, 8, 9, 0.4);
  backdrop-filter: blur(10px) saturate(130%);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.craft-close:hover,
.craft-close:focus-visible {
  color: var(--ink-on-dark);
  border-color: rgba(244, 241, 236, 0.4);
  background: rgba(244, 241, 236, 0.06);
}
.craft-close .x { color: var(--signal); font-size: 12px; line-height: 1; }

/* ---- the explain-dots: figures set into the chrome --------------------------------------
   44px hit areas (touch/keyboard), positioned per frame by craft.js along the live camera.
   Only opacity transitions on the button itself — its transform belongs to the projector. */
.craft-dots { position: absolute; inset: 0; pointer-events: none; }
.craft-dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  will-change: transform;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s var(--ease);
}
dialog.craft.is-composed .craft-dot {
  opacity: 1;
  pointer-events: auto;
  transition-delay: calc(var(--di, 0) * 0.09s); /* the site cadence */
}
dialog.craft.is-composed .craft-dot.off {
  opacity: 0;
  pointer-events: none;
  transition-delay: 0s;
}
.craft-dot .dot-core {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-on-dark);
  box-shadow: 0 0 0 1px rgba(5, 5, 5, 0.5), 0 0 14px rgba(244, 241, 236, 0.5);
  transition: width 0.3s var(--ease), height 0.3s var(--ease),
              background 0.3s, box-shadow 0.3s;
}
.craft-dot .dot-ring {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(255, 77, 31, 0);
  transform: scale(0.6);
  transition: transform 0.45s var(--ease), border-color 0.45s;
}
.craft-dot .dot-fig {
  position: absolute;
  top: calc(100% - 4px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  font-family: var(--font-label);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--ink-on-dark);
  background: rgba(8, 8, 9, 0.72);
  border: 1px solid var(--rule-on-dark);
  padding: 3px 7px 2px;
  border-radius: 3px;
  opacity: 0;
  white-space: nowrap;
  transition: opacity 0.3s, transform 0.3s var(--ease);
}
.craft-dot:hover .dot-core,
.craft-dot:focus-visible .dot-core {
  width: 10px;
  height: 10px;
  background: var(--signal);
  box-shadow: 0 0 0 1px rgba(255, 77, 31, 0.6), 0 0 18px rgba(255, 77, 31, 0.5);
}
.craft-dot:hover .dot-ring,
.craft-dot:focus-visible .dot-ring {
  transform: scale(1);
  border-color: rgba(255, 77, 31, 0.45);
}
.craft-dot:hover .dot-fig,
.craft-dot:focus-visible .dot-fig,
.craft-dot.selected .dot-fig {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.craft-dot.selected .dot-core {
  width: 9px;
  height: 9px;
  background: var(--signal);
  box-shadow: 0 0 0 1px var(--signal), 0 0 0 5px rgba(255, 77, 31, 0.18),
              0 0 24px rgba(255, 77, 31, 0.55);
  animation: craftPulse 2.8s ease-in-out infinite;
}
.craft-dot.selected .dot-ring {
  transform: scale(1.45);
  border-color: rgba(255, 77, 31, 0.32);
}
@keyframes craftPulse {
  0%, 100% {
    box-shadow: 0 0 0 1px var(--signal), 0 0 0 5px rgba(255, 77, 31, 0.18),
                0 0 24px rgba(255, 77, 31, 0.55);
  }
  50% {
    box-shadow: 0 0 0 1px var(--signal), 0 0 0 9px rgba(255, 77, 31, 0.08),
                0 0 30px rgba(255, 77, 31, 0.7);
  }
}

/* ---- the technique tab: the old colophon copy, hovering in the study -------------------- */
.craft-tab {
  position: absolute;
  left: 40px;
  bottom: 84px;
  width: min(330px, calc(100vw - 80px));
  border-radius: 14px;
  border: 1px solid rgba(244, 241, 236, 0.14);
  background: linear-gradient(180deg, rgba(18, 18, 20, 0.88) 0%, rgba(8, 8, 9, 0.92) 100%);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  opacity: 0;
  transform: translateY(14px);
  visibility: hidden;
  transition: opacity 0.5s var(--ease), transform 0.55s var(--ease), visibility 0s linear 0.5s;
}
dialog.craft.is-composed .craft-tab {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  transition: opacity 0.5s var(--ease) 0.42s, transform 0.55s var(--ease) 0.42s,
              visibility 0s linear 0.42s;
}
/* while a figure is open the tab steps back — the panel takes the floor */
dialog.craft.is-composed .craft-tab.is-yielding {
  opacity: 0;
  transform: translateY(8px);
  visibility: hidden;
  transition: opacity 0.35s var(--ease), transform 0.4s var(--ease), visibility 0s linear 0.35s;
}
.craft-tab__head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font-label);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--signal);
}
.craft-tab__head::after {
  content: "+";
  color: var(--ink-dim);
  font-size: 12px;
  transition: transform 0.3s var(--ease);
}
.craft-tab__head[aria-expanded="true"]::after {
  transform: rotate(45deg);
}
.craft-tab__body {
  padding: 2px 16px 16px;
  max-height: min(58vh, 540px); /* the full copy fits at desktop heights; shorter screens scroll */
  overflow: auto;
  overscroll-behavior: contain;
}
.craft-tab__body p {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-dim);
}
.craft-tab__body b {
  font-weight: 600;
  color: var(--ink-on-dark);
}
.craft-tab__spec {
  list-style: none;
  margin: 14px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--rule-on-dark);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 18px;
}
.craft-tab__spec li {
  position: relative;
  padding-left: 14px;
  font-family: var(--font-label);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.craft-tab__spec li::before {
  content: "+";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--signal);
}
.craft-tab__foot {
  margin: 14px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid var(--rule-on-dark);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-label);
  font-size: 8.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---- the figure panels: dark-glass readouts, one per dot --------------------------------
   Docked by craft.js opposite the active dot (transform), so only opacity/visibility live
   here. The inner sequence staggers off one .reveal class, v1's proven pattern. */
.craft-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: min(620px, calc(100vw - 48px));
  padding: 20px 22px;
  border-radius: 14px;
  border: 1px solid rgba(244, 241, 236, 0.14);
  background: linear-gradient(180deg, rgba(18, 18, 20, 0.9) 0%, rgba(8, 8, 9, 0.93) 100%);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: grid;
  grid-template-columns: 236px 1fr;
  gap: 20px;
  opacity: 0;
  transition: opacity 0.32s var(--ease);
  will-change: transform;
  outline: none;
}
.craft-panel.reveal { opacity: 1; }
.craft-panel[hidden] { display: none; }

.craft-panel .p-x {
  position: absolute;
  z-index: 2; /* above the code column's title bar */
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-faint);
  cursor: pointer;
  font-family: var(--font-label);
  font-size: 12px;
  line-height: 1;
  transition: color 0.3s, border-color 0.3s;
}
.craft-panel .p-x:hover,
.craft-panel .p-x:focus-visible {
  color: var(--ink-on-dark);
  border-color: var(--rule-strong);
}

.craft-panel .p-text { min-width: 0; }
.craft-panel .p-line {
  height: 1px;
  width: 0;
  background: var(--rule-strong);
  margin-bottom: 12px;
  transition: width 0.34s var(--ease);
}
.craft-panel.reveal .p-line { width: 56px; }
.craft-panel .p-fig {
  font-family: var(--font-label);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--signal);
  margin: 0 0 8px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.26s ease 0.08s, transform 0.3s var(--ease) 0.08s;
}
.craft-panel.reveal .p-fig { opacity: 1; transform: translateY(0); }
.craft-panel .p-title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: lowercase;
  letter-spacing: -0.03em;
  line-height: 1;
  font-size: 22px;
  color: var(--ink-on-dark);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease 0.14s, transform 0.38s var(--ease) 0.14s;
}
.craft-panel.reveal .p-title { opacity: 1; transform: translateY(0); }
.craft-panel .p-title em {
  font-family: var(--font-break);
  font-style: italic;
  font-weight: 400;
  color: var(--signal);
}
.craft-panel .p-body {
  margin: 0;
  font-family: var(--font-display);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-dim);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.36s ease 0.24s, transform 0.44s var(--ease) 0.24s;
}
.craft-panel.reveal .p-body { opacity: 1; transform: translateY(0); }

/* the code window — a broadsheet instrument, not a mac window: mono title row
   with a signal tick, hairline rules, near-black well. */
.craft-panel .p-code {
  min-width: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 0.4s ease 0.34s, transform 0.5s var(--ease) 0.34s;
}
.craft-panel.reveal .p-code { opacity: 1; transform: translateX(0); }
.craft-panel .p-code__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--rule-on-dark);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: rgba(244, 241, 236, 0.04);
  font-family: var(--font-label);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-right: 40px; /* clear the panel's ✕ */
}
.craft-panel .p-code__bar::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal);
  flex: none;
}
.craft-panel .p-code__body {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--rule-on-dark);
  border-radius: 0 0 8px 8px;
  background: rgba(3, 3, 3, 0.62);
  font-family: var(--font-label);
  font-size: 11px;
  line-height: 1.65;
  color: var(--ink-on-dark);
  overflow-x: auto;
  white-space: pre;
}
.craft-panel .p-code__body code { font-family: inherit; display: block; }
/* GLSL tones from the brand family only: builtins amber, names bone, numbers dim,
   comments faint italic. The hot signal stays reserved for the fig labels. */
.craft-panel .cm-kw { color: var(--signal-2); }
.craft-panel .cm-fn { color: var(--ink-on-dark); }
.craft-panel .cm-num { color: var(--ink-dim); }
.craft-panel .cm-co { color: var(--ink-faint); font-style: italic; }

.craft-panel .p-cap {
  margin: 10px 2px 0;
  font-family: var(--font-break);
  font-style: italic;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-dim);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.36s ease 0.5s, transform 0.4s var(--ease) 0.5s;
}
.craft-panel.reveal .p-cap { opacity: 1; transform: translateY(0); }

/* ---- small viewports --------------------------------------------------------------------
   The panel becomes a bottom sheet (the projector stops writing transforms <881px); the
   tab hugs the lower edge and starts collapsed (craft.js). */
@media (max-width: 880px) {
  .craft-frame { inset: 10px; }
  .craft-meta--tl { top: 20px; left: 22px; font-size: 9px; }
  .craft-meta--br { bottom: 20px; right: 22px; font-size: 9px; }
  .craft-close { top: 14px; right: 16px; padding: 8px 11px; font-size: 9px; }
  .craft-tab {
    left: 16px;
    right: 16px;
    bottom: 58px;
    width: auto;
  }
  .craft-panel {
    top: auto !important;
    left: 16px !important;
    right: 16px;
    bottom: 108px;
    width: auto;
    transform: none !important;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px 16px 14px;
    max-height: min(60vh, 480px);
    overflow-y: auto;
  }
  .craft-panel .p-title { font-size: 20px; }
  .craft-panel .p-code__body { font-size: 10px; }
}

/* ---- reduced motion: the instant composed state -----------------------------------------
   NO curtain: no seam animations, no waves, no scribing frame, no pulse — open/close is an
   instant cut between two composed states; the camera snap lives in craft.js
   (current = target). All content remains fully reachable. */
@media (prefers-reduced-motion: reduce) {
  .craft-open,
  .craft-open__label::after,
  #dark nav > div,
  #dark #b-progress,
  #dark section > div,
  #dark section > div:nth-of-type(4) > div,
  #dark section > span,
  #dark section > h1,
  #dark section > p,
  #dark section > a,
  #dark section > button,
  .crt,
  dialog.craft,
  .craft-frame__ln,
  .craft-dot,
  .craft-dot .dot-core,
  .craft-dot .dot-ring,
  .craft-dot .dot-fig,
  .craft-tab,
  .craft-tab__head::after,
  .craft-panel,
  .craft-panel .p-line,
  .craft-panel .p-fig,
  .craft-panel .p-title,
  .craft-panel .p-body,
  .craft-panel .p-code,
  .craft-panel .p-cap {
    transition: none !important;
  }
  body.craft-active .crt {
    animation: none !important;
    opacity: 0; /* the hero text is simply absent while the study is open */
  }
  .craft-dot.selected .dot-core { animation: none; }
  .craft-panel .p-line { width: 56px; }
}
