/* ==========================================================================
   Madison Marino — page layouts (home, work, play, about, 404)
   ========================================================================== */

/* --- Generic page hero (interior pages) --------------------------------- */
.page-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(56px, 12vh, 120px) clamp(32px, 6vh, 64px);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(80% 130% at 78% -20%, color-mix(in srgb, var(--band) 20%, transparent), transparent 60%),
    radial-gradient(60% 110% at 4% 100%, color-mix(in srgb, var(--range-pink) 7%, transparent), transparent 72%),
    var(--void);
}
.page-hero h1 { font-size: var(--fs-h1); margin-top: 14px; }
.page-hero .lede { max-width: 52ch; margin-top: 18px; color: var(--text-dim); font-size: var(--fs-lead); }

/* ==========================================================================
   HOMEPAGE — "the stage"
   ========================================================================== */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding-block: clamp(24px, 6vh, 72px);
  background: var(--void);
}

/* Full-bleed animated aura (Canvas 2D). The site's own colourful signal,
   painted over the paper stage — not any single project's visual. */
.hero-field {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  opacity: 1;
}
/* Static spectrum aura: a soft colour wash of the MM range over the paper.
   Explicit rgba stops render predictably across engines (color-mix toward
   transparent renders far too faint). This is the no-JS / reduced-motion
   fallback and also a gentle base beneath the live canvas lobes. */
.hero-spectrum {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(46% 52% at 20% 28%, rgba(230, 47, 134, 0.55), rgba(230, 47, 134, 0) 66%),
    radial-gradient(52% 56% at 82% 24%, rgba(112, 72, 232, 0.5), rgba(112, 72, 232, 0) 68%),
    radial-gradient(58% 60% at 68% 80%, rgba(0, 163, 148, 0.5), rgba(0, 163, 148, 0) 68%),
    radial-gradient(50% 54% at 26% 84%, rgba(198, 138, 10, 0.48), rgba(198, 138, 10, 0) 68%);
  opacity: 0.85;
}
/* When the live canvas aura is painting, keep a faint static base underneath. */
.js .hero-has-field .hero-spectrum { opacity: 0.32; }
/* A gentle legibility wash behind the text column only — the aura stays vivid. */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--void) 46%, transparent), transparent 46%),
    linear-gradient(180deg, transparent 60%, color-mix(in srgb, var(--void) 30%, transparent));
}
.hero-inner { position: relative; z-index: 2; width: min(94%, 1240px); min-width: 0; padding-left: var(--gutter); }

/* Kinetic wordmark */
.wordmark {
  margin: clamp(10px, 2vh, 22px) 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 0.84;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.wm-line { display: block; white-space: nowrap; }
.wm-line + .wm-line { color: transparent; -webkit-text-stroke: 2px var(--text); }
.wm-ch {
  display: inline-block;
  font-size: clamp(66px, 11.6vw, 194px);
  font-weight: var(--w, 700);
  transform: scale(var(--s, 1));
  transform-origin: 50% 60%;
  will-change: font-weight, transform;
}
/* Second line rendered as outline for the pattern-break; keep the fill line bold. */
.wm-line.is-fill .wm-ch { color: var(--text); }
@media (prefers-reduced-motion: reduce) {
  .wm-ch { transform: none; font-weight: 760; }
}

.hero-lede {
  max-width: 48ch;
  margin-top: clamp(20px, 3vh, 34px);
  font-size: var(--fs-lead);
  color: var(--text-dim);
}

@media (max-width: 900px) {
  .hero-inner { width: 84%; }
}
@media (max-width: 700px) {
  .hero {
    min-height: calc(100svh - var(--header-h));
    padding-block: 54px 44px;
  }
  .hero-inner { width: 100%; padding-inline: var(--gutter); }
  .wordmark { margin-top: 14px; }
  .wm-ch { font-size: clamp(46px, 15.5vw, 92px); }
}

/* Spectrum navigator — real links styled as doorways in the range. */
.navigator {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: clamp(28px, 4vh, 44px);
}
.navigator a {
  --band: var(--accent);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--panel);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(15px, 1.4vw, 18px);
  letter-spacing: -0.01em;
  text-decoration: none;
  overflow: hidden;
  transition: border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.navigator a .bar {
  width: 10px; height: 10px; border-radius: 50%; background: var(--band);
  box-shadow: 0 0 12px color-mix(in srgb, var(--band) 70%, transparent);
  transition: transform var(--dur) var(--ease-out);
}
.navigator a::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(120% 160% at 12% 50%, color-mix(in srgb, var(--band) 30%, transparent), transparent 60%);
  opacity: 0; transition: opacity var(--dur) var(--ease-out);
}
.navigator a:hover, .navigator a:focus-visible {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--band) 60%, var(--line));
}
.navigator a:hover::after, .navigator a:focus-visible::after { opacity: 1; }
.navigator a:hover .bar, .navigator a:focus-visible .bar { transform: scale(1.4); }
.navigator .feat { color: var(--text); }
.navigator .feat .feat-label { color: var(--muted); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }

.hero-utility {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 16px 24px; flex-wrap: wrap;
  margin-top: clamp(24px, 3.5vh, 40px);
}
.scroll-cue {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--muted); text-decoration: none;
  font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: 0.12em; text-transform: uppercase;
}
.scroll-cue .line { width: 40px; height: 1px; background: currentColor; position: relative; overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .scroll-cue .line::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--accent); animation: cue 2.4s var(--ease-io) infinite; }
}
@keyframes cue { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(260%); } }

/* Perform pad launcher */
.perform {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--pill);
  background: var(--panel);
  color: var(--text);
  font-weight: 600; font-size: 14px; cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.perform:hover { border-color: var(--accent); transform: translateY(-2px); }
.perform .tri { color: var(--accent); }
.perform[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--panel)); }
.perform[aria-expanded="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--panel)); }
.perform-drawer {
  position: absolute;
  z-index: 5;
  right: var(--gutter);
  bottom: var(--gutter);
  width: min(370px, calc(100% - var(--gutter) * 2));
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
}
.perform-drawer[hidden] { display: none; }
.perform-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.perform-drawer-head h2 { margin-top: 3px; font-size: 22px; }
.perform-drawer > p { margin-top: 10px; color: var(--muted); font-size: 14px; }
.perform-drawer-stage { height: 164px; margin-block: 14px; }
.icon-control {
  display: grid; place-items: center; flex: 0 0 auto;
  width: 36px; height: 36px;
  border: 1px solid var(--line-strong); border-radius: 50%;
  background: var(--panel-2); color: var(--text); font-size: 22px; cursor: pointer;
}

/* ==========================================================================
   HOMEPAGE — "Live demos" showcase
   Real, playable demos of the work. Each has a poster fallback for no-JS,
   reduced-motion, touch, and failed live scenes.
   ========================================================================== */
.demos { border-top: 1px solid var(--line); background: var(--void); }
.demos-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 24px; margin-bottom: clamp(28px, 4vw, 44px); }
.demos-head h2 { font-size: var(--fs-h2); }
.js .demos .reveal {
  transform: translate3d(0, 52px, 0) scale(0.985);
  transition: opacity 760ms var(--ease-out), transform 820ms var(--ease-out);
}
.js .demos .reveal.is-in { transform: none; }

.demos-grid {
  display: grid;
  gap: clamp(18px, 2.4vw, 30px);
  grid-template-columns: repeat(12, 1fr);
}
.demo {
  --band: var(--accent);
  grid-column: span 12;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  overflow: hidden;
}
.demo-lightbridge { grid-column: span 12; }
.demo-orbricks { grid-column: span 12; }
.demo-handiwork { grid-column: span 12; }

.demo-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 22% 8%, color-mix(in srgb, var(--band) 22%, transparent), transparent 58%),
    #0a0c11;
}
.demo-handiwork .demo-stage { aspect-ratio: 21 / 9; }
.demo-stage .scene-fallback img { width: 100%; height: 100%; object-fit: cover; }
.demo-chrome {
  position: absolute; z-index: 3; top: 12px; left: 14px; right: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  color: rgba(245, 241, 234, 0.72);
  font: 10px/1.2 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase;
  pointer-events: none;
}
.demo-chrome span { display: inline-flex; gap: 5px; }
.demo-chrome i { width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--band) 70%, #fff); opacity: 0.75; }
.demo-body { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 24px; }
.demo-body h3 { font-size: var(--fs-h3); }
.demo-body p { color: var(--muted); font-size: 0.95em; }
.demo-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

/* --- Demo sound toggle (muted by default) ------------------------------ */
.demo-sound {
  position: absolute; z-index: 6; right: 12px; bottom: 12px;
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, white 26%, transparent);
  background: rgba(8, 9, 11, 0.6);
  color: #f5f1ea;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.demo-sound:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--band) 70%, white); }
.demo-sound[aria-pressed="true"] { border-color: var(--band); background: color-mix(in srgb, var(--band) 32%, #08090b); }
.demo-sound svg { display: block; }
.demo-sound .ds-spk { fill: currentColor; }
.demo-sound .ds-wave path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.demo-sound .ds-mute { stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.demo-sound .ds-wave { opacity: 0; transition: opacity var(--dur-fast) var(--ease-out); }
.demo-sound .ds-mute { opacity: 1; transition: opacity var(--dur-fast) var(--ease-out); }
.demo-sound[aria-pressed="true"] .ds-wave { opacity: 1; }
.demo-sound[aria-pressed="true"] .ds-mute { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .demo-sound[aria-pressed="true"] { animation: sound-pulse 2s var(--ease-io) infinite; }
}
@keyframes sound-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--band) 42%, transparent); }
  60%      { box-shadow: 0 0 0 7px color-mix(in srgb, var(--band) 0%, transparent); }
}

/* --- Instrument shell (interactive demos) ------------------------------
   A framed live demo: a top bar, a body split into the live canvas + a control
   board of sliders that drive the real scene, then the usual copy. The board is
   data-enhance (hidden without JS) and stays inert/dimmed until the scene's
   first frame paints. */
.instrument .instrument-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted);
}
.instrument .inst-label { display: inline-flex; align-items: center; gap: 9px; color: color-mix(in srgb, var(--band) 68%, var(--text)); }
.instrument .live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--band);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--band) 22%, transparent);
}
@media (prefers-reduced-motion: no-preference) {
  .instrument.is-live .live-dot { animation: dot-pulse 2.4s var(--ease-io) infinite; }
}
.instrument .inst-reset {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 6px;
  padding: 5px 11px; cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.instrument .inst-reset:hover { color: var(--text); border-color: var(--line-strong); }

.instrument-body { display: grid; grid-template-columns: 1.35fr 0.85fr; align-items: stretch; }
.instrument-body .demo-stage { aspect-ratio: auto; min-height: 320px; height: 100%; }

.inst-board {
  display: flex; flex-direction: column; gap: 15px;
  padding: 18px 20px 20px;
  background: var(--panel-2);
  border-left: 1px solid var(--line);
  transition: opacity var(--dur) var(--ease-out);
}
.inst-board-title { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); margin: 0; }
.inst-param { display: grid; grid-template-columns: 70px 1fr 42px; gap: 12px; align-items: center; }
.inst-param label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.inst-param output { font-family: var(--font-mono); font-size: 11px; text-align: right; color: var(--text); }
.inst-param input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 3px;
  background: var(--panel-3); cursor: pointer;
}
.inst-param input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 15px; height: 15px; border-radius: 50%;
  background: var(--band); box-shadow: 0 0 0 3px color-mix(in srgb, var(--band) 24%, transparent); cursor: pointer;
}
.inst-param input[type="range"]::-moz-range-thumb {
  width: 15px; height: 15px; border: none; border-radius: 50%; background: var(--band); cursor: pointer;
}
.inst-hint { font-size: 12px; color: var(--muted); margin: 2px 0 0; }
.inst-top-note { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }

/* Lightbridge audio channel router: six frequency bands, each routed to a
   visual parameter. The meters are filled live from the music (home.js). */
.audio-router .lb-bands { display: grid; gap: 9px; }
.lb-band {
  display: grid; grid-template-columns: 40px 1fr 62px; gap: 11px; align-items: center;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em;
}
.lb-band-name { color: var(--bc); text-transform: uppercase; font-weight: 600; }
.lb-band-param { color: var(--faint); text-transform: uppercase; text-align: right; font-size: 10px; }
.lb-band-meter { position: relative; height: 8px; border-radius: 4px; background: var(--panel-3); overflow: hidden; }
.lb-band-meter i {
  position: absolute; inset: 0 auto 0 0; width: 0%;
  border-radius: 4px; background: var(--bc);
  box-shadow: 0 0 8px color-mix(in srgb, var(--bc) 60%, transparent);
  transition: width 0.09s linear;
}

/* Orbricks controls hosted in the instrument board (discrete buttons, not sliders). */
.inst-board .orbricks-world-label {
  display: grid; gap: 3px; margin-top: -2px;
  padding: 0; border: 0; border-radius: 0;
  background: none; backdrop-filter: none; text-shadow: none;
}
.inst-board .orbricks-world-label b { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-h3); letter-spacing: -0.01em; color: var(--text); }
.inst-board .orbricks-world-label .mono { color: var(--faint); }
.inst-board .orbricks-buttons { justify-content: flex-start; margin-top: 2px; }

/* Orbricks game panel + worlds gallery ---------------------------------- */
.orbricks-panel .orbricks-play-cta { align-self: flex-start; margin-top: 2px; }

/* Orbricks worlds carousel: the live Coral Depths scene is slide 1, the other
   worlds follow as image slides. Prev/next slide the track (home.js). */
.oc { position: relative; }
.oc-viewport { overflow: hidden; height: clamp(320px, 30vw, 440px); }
.oc-track { display: flex; height: 100%; transition: transform 0.55s var(--ease-io); will-change: transform; }
/* Peek/coverflow: the active world is centred and full; its neighbours are
   visible on either side (dimmed + smaller) as previews. */
.oc-slide {
  position: relative; flex: 0 0 78%; min-width: 0;
  border-radius: var(--radius); overflow: hidden;
  opacity: 0.4; transform: scale(0.9); cursor: pointer;
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.oc-slide.is-active { opacity: 1; transform: scale(1); cursor: default; }
.oc-slide .demo-stage { height: 100%; }
/* Ken-burns on the world previews (GPU transform on a bleed layer, so it's cheap
   even for several at once). */
.oc-world::before {
  content: ""; position: absolute; inset: -5%;
  background-image: var(--img); background-size: cover; background-position: center;
  animation: oc-kenburns 22s ease-in-out infinite alternate;
  will-change: transform;
}
.oc-world::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 52%, rgba(8, 9, 11, 0.72)); }
@keyframes oc-kenburns {
  from { transform: scale(1.04) translate(-1.5%, -1%); }
  to   { transform: scale(1.14) translate(2%, 1.5%); }
}
@media (prefers-reduced-motion: reduce) { .oc-world::before { animation: none; } }
.oc-world-name {
  position: absolute; z-index: 1; left: 18px; bottom: 16px;
  font-family: var(--font-display); font-weight: 800; font-size: clamp(20px, 2.4vw, 30px);
  letter-spacing: -0.02em; color: #f5f1ea; text-shadow: 0 1px 12px #08090b;
}
.oc-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid color-mix(in srgb, white 26%, transparent);
  background: rgba(8, 9, 11, 0.55); color: #f5f1ea; cursor: pointer;
  font-size: 22px; line-height: 1; backdrop-filter: blur(8px);
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.oc-nav:hover { background: rgba(8, 9, 11, 0.8); border-color: color-mix(in srgb, var(--band) 70%, white); }
.oc-prev { left: 12px; }
.oc-next { right: 12px; }

/* Board waits for the live scene: dim + inert until the first frame paints.
   HandiWork has no first-frame scene (it launches on click), so its info board
   stays active. */
.instrument:not(.is-live):not(.demo-handiwork) .inst-board { opacity: 0.5; pointer-events: none; }

@media (max-width: 720px) {
  .instrument-body { grid-template-columns: 1fr; }
  .inst-board { border-left: 0; border-top: 1px solid var(--line); }
  .instrument-body .demo-stage { min-height: 240px; }
}

/* HandiWork — webcam demo launched inline */
.handiwork-stage { display: grid; place-items: center; }
.handiwork-poster { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px 24px 64px; color: rgba(245, 241, 234, 0.86); }
/* A slow living wash so the resting poster reads as an active instrument. */
.handiwork-poster::before {
  content: ""; position: absolute; inset: -20%; z-index: -1;
  background:
    radial-gradient(38% 44% at 28% 32%, color-mix(in srgb, var(--band) 42%, transparent), transparent 68%),
    radial-gradient(42% 48% at 74% 66%, color-mix(in srgb, var(--range-violet) 34%, transparent), transparent 70%);
  filter: blur(6px);
  animation: handiwork-drift 14s ease-in-out infinite alternate;
}
.handiwork-poster .mono { color: color-mix(in srgb, var(--band) 55%, #fff); margin-bottom: 6px; letter-spacing: 0.14em; }
.handiwork-poster-note { font-size: 0.9em; opacity: 0.72; }
@keyframes handiwork-drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(3%, 2%, 0) scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
  .handiwork-poster::before { animation: none; }
}
.handiwork-clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.handiwork-intro {
  position: absolute; z-index: 4; inset: auto 0 18px 0;
  display: grid; place-items: center;
}
.handiwork-intro[hidden] { display: none; }
.handiwork-frame { position: absolute; inset: 0; z-index: 5; width: 100%; height: 100%; border: 0; }
.is-handiwork-live .demo-chrome { z-index: 6; }
.demo-stage .scene-status {
  position: absolute; z-index: 4; left: 14px; bottom: 12px;
  margin: 0; padding: 4px 9px; border-radius: var(--pill);
  background: color-mix(in srgb, #0a0c11 68%, transparent);
  color: rgba(245, 241, 234, 0.86);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em;
}

@media (max-width: 900px) {
  .demo-lightbridge, .demo-orbricks, .demo-handiwork { grid-column: span 12; }
  .demo-handiwork .demo-stage { aspect-ratio: 16 / 9; }
}

/* ==========================================================================
   WORK INDEX
   ========================================================================== */
.work-grid {
  display: grid;
  gap: clamp(16px, 2vw, 26px);
  grid-template-columns: repeat(6, 1fr);
  align-items: stretch;
}
/* Editorial "tunable canvas": asymmetric spans, DOM order preserved. */
.work-grid .card { grid-column: span 3; }
.work-grid .card.w2 { grid-column: span 2; }
.work-grid .card.w3 { grid-column: span 3; }
.work-grid .card.w4 { grid-column: span 4; }
.work-grid .card[hidden] { display: none; }
/* Flagship cards (link to case studies) get a taller image + larger title. */
.work-grid .card.is-flagship .card-title { font-size: clamp(24px, 2.6vw, 34px); }
.work-grid .card.w2 .card-media { aspect-ratio: 4 / 3; }
.filters-bar { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; margin-bottom: clamp(24px, 3vw, 36px); }
.filter-note { color: var(--faint); font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: 0.06em; }

/* ==========================================================================
   PLAY / LAB
   ========================================================================== */
.lab-grid {
  display: grid;
  gap: clamp(18px, 2.5vw, 30px);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.lab {
  --band: var(--accent);
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  overflow: hidden;
}
.lab-stage {
  position: relative;
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(120% 120% at 20% 10%, color-mix(in srgb, var(--band) 20%, transparent), transparent 55%),
    var(--panel-2);
  display: grid; place-items: center;
  overflow: hidden;
}
.lab-stage canvas, .lab-stage .lab-mount { position: absolute; inset: 0; width: 100%; height: 100%; }
.lab-body { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 22px; }
.lab-body h3 { font-size: var(--fs-h3); }
.lab-body p { color: var(--muted); font-size: 0.95em; }
.lab-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.lab-poster { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--muted); }
.lab-poster div { max-width: 34ch; }
.lab-poster .mono { margin-bottom: 8px; }
.lab.is-live .lab-poster { display: none; }
a.lab-stage { display: block; }

/* Orbricks native world gallery */
.orbricks-exhibit {
  min-height: 0;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  outline: none;
}
.orbricks-exhibit:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--a-orbricks) 58%, transparent); }
.orbricks-fallback img { width: 100%; height: 100%; object-fit: cover; }
.orbricks-intro {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  text-align: center;
  background: radial-gradient(circle at 50% 54%, color-mix(in srgb, var(--void) 46%, transparent), transparent 60%);
  transition: background var(--dur) var(--ease-out);
}
.orbricks-intro .eyebrow { color: var(--text); text-shadow: 0 1px 12px var(--void); }
.orbricks-exhibit.is-scene-live .orbricks-intro { display: none; }

/* Live "Play the world" affordance — reads as an interactive demo, not a poster. */
.orbricks-play {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 13px 22px 13px 18px;
  border: 1px solid color-mix(in srgb, white 26%, transparent);
  border-radius: var(--pill);
  background: rgba(8, 9, 11, 0.62);
  color: #f5f1ea;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(15px, 1.5vw, 18px);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: transform var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
}
.orbricks-play-tri {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--a-orbricks, #4ea8ff); color: #04121f; font-size: 12px;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--a-orbricks, #4ea8ff) 60%, transparent);
  animation: orbricks-pulse 2.6s var(--ease-out) infinite;
}
.orbricks-play-cue {
  color: #d7d1c6; font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase; text-shadow: 0 1px 8px var(--void);
}
.orbricks-exhibit:hover .orbricks-intro,
.orbricks-exhibit:focus-visible .orbricks-intro {
  background: radial-gradient(circle at 50% 54%, color-mix(in srgb, var(--void) 30%, transparent), transparent 64%);
}
.orbricks-exhibit:hover .orbricks-play,
.orbricks-exhibit:focus-visible .orbricks-play {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--a-orbricks, #4ea8ff) 70%, white);
  background: rgba(8, 9, 11, 0.74);
}
@keyframes orbricks-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--a-orbricks, #4ea8ff) 55%, transparent); }
  70%  { box-shadow: 0 0 0 12px color-mix(in srgb, var(--a-orbricks, #4ea8ff) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--a-orbricks, #4ea8ff) 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
  .orbricks-play-tri { animation: none; }
}
.orbricks-hud {
  position: absolute;
  z-index: 3;
  inset: 16px 16px auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  pointer-events: none;
}
.orbricks-hud[hidden] { display: none; }
.orbricks-world-label {
  display: grid;
  gap: 2px;
  padding: 9px 12px;
  border: 1px solid color-mix(in srgb, white 22%, transparent);
  border-radius: var(--radius-sm);
  background: rgba(8, 9, 11, 0.74);
  color: #f5f1ea;
  backdrop-filter: blur(10px);
  text-shadow: 0 1px 8px #08090b;
}
.orbricks-world-label b { font-family: var(--font-display); font-size: 14px; }
.orbricks-world-label span { color: #d7d1c6; font-size: 10px; }
.orbricks-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; pointer-events: auto; }
.orbricks-buttons button {
  min-width: 38px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, white 24%, transparent);
  border-radius: var(--pill);
  background: rgba(8, 9, 11, 0.74);
  color: #f5f1ea;
  font: 700 12px var(--font-mono);
  cursor: pointer;
  backdrop-filter: blur(10px);
}
.orbricks-buttons button:hover,
.orbricks-buttons button:focus-visible,
.orbricks-buttons button.is-active { border-color: #4ea8ff; background: color-mix(in srgb, #4ea8ff 24%, #08090b); }
.orbricks-exhibit canvas { touch-action: none; cursor: grab; }
.orbricks-exhibit canvas:active { cursor: grabbing; }
.orbricks-caption { margin: 11px 2px 0; color: var(--muted); font-size: 13px; }
.orbricks-caption a { color: color-mix(in srgb, var(--a-orbricks) 62%, var(--text)); }
.orbricks-worlds { margin-top: clamp(52px, 8vw, 96px); }
.orbricks-worlds-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.orbricks-worlds-head h2 { margin-top: 7px; font-size: var(--fs-h2); }
.orbricks-carousel-controls { display: flex; align-items: center; gap: 10px; }
.orbricks-carousel-controls button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}
.orbricks-carousel-controls button:hover,
.orbricks-carousel-controls button:focus-visible { border-color: var(--a-orbricks); color: var(--a-orbricks); }
.orbricks-carousel-controls span { min-width: 62px; color: var(--muted); text-align: center; }
.orbricks-carousel-window {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--a-orbricks) var(--panel);
  scroll-snap-type: x mandatory;
  overscroll-behavior-inline: contain;
}
.orbricks-carousel-track {
  display: flex;
  gap: clamp(12px, 2vw, 22px);
  width: max-content;
  padding: 0 12% 14px 0;
  list-style: none;
}
.orbricks-carousel-track li {
  width: min(78vw, 920px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  scroll-snap-align: start;
}
.orbricks-carousel-track figure { margin: 0; }
.orbricks-carousel-track img { width: 100%; aspect-ratio: 1200 / 610; object-fit: cover; }
.orbricks-carousel-track figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 17px 16px;
}
.orbricks-carousel-track figcaption span { color: color-mix(in srgb, var(--a-orbricks) 62%, var(--text)); font: 10px var(--font-mono); }
.orbricks-carousel-track figcaption b { font-family: var(--font-display); font-size: clamp(17px, 2vw, 24px); }
.orbricks-exhibit-compact { border: 0; border-radius: 0; }
.orbricks-exhibit-compact .orbricks-intro { padding-top: 28px; }
.orbricks-exhibit-compact .orbricks-hud { inset: 10px 10px auto; flex-direction: column; }
.orbricks-exhibit-compact .orbricks-buttons { justify-content: flex-start; }
.orbricks-exhibit-compact .orbricks-buttons button { min-width: 34px; min-height: 34px; padding-inline: 8px; }
.orbricks-exhibit-compact .scene-status { display: none; }

@media (max-width: 620px) {
  .orbricks-exhibit { aspect-ratio: 4 / 3; }
  .orbricks-hud { inset: 10px 10px auto; }
  .orbricks-buttons button { min-width: 42px; min-height: 42px; }
  .orbricks-buttons button[data-orbricks-action="auto"] { display: none; }
  .orbricks-exhibit .scene-status { display: none; }
  .orbricks-worlds-head { align-items: flex-start; flex-direction: column; }
  .orbricks-carousel-track li { width: calc(100vw - var(--gutter) * 2 - 12px); }
}

@media (prefers-reduced-motion: reduce) {
  .orbricks-intro { display: none; }
}

/* Lightbridge case-study instrument */
.lb-instrument > .cs-prose { margin-bottom: clamp(28px, 5vw, 50px); }
.lb-routing { position: relative; display: grid; gap: 14px; margin-bottom: clamp(28px, 5vw, 56px); }
.lb-cables { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.3; pointer-events: none; }
.lb-cable { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.lb-cable-a { stroke: var(--range-pink); }
.lb-cable-b { stroke: var(--range-teal); }
.lb-cable-c { stroke: var(--range-gold); }
.lb-route {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 90px 1fr 90px;
  align-items: center;
  gap: clamp(18px, 4vw, 54px);
  min-height: 130px;
  padding: 20px clamp(16px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  transition: border-color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}
.lb-route.is-current { border-color: color-mix(in srgb, var(--a-lightbridge) 64%, var(--line)); background: color-mix(in srgb, var(--a-lightbridge) 7%, var(--panel)); }
.lb-route h3 { font-size: var(--fs-h3); }
.lb-route p { margin-top: 4px; color: var(--muted); font-size: 14px; }
.lb-route-node, .lb-route-target {
  display: grid;
  place-items: center;
  min-height: 54px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--pill);
  background: var(--panel-2);
  color: var(--text-dim);
  font: 11px var(--font-mono);
  text-transform: uppercase;
}
.lb-console { min-height: 0; aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.lb-console .scene-status { right: 16px; bottom: 18px; left: auto; }
.lb-console-fallback img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.75) brightness(0.58); }
.lb-console-chrome {
  position: absolute;
  z-index: 2;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 8px 14px;
  border-bottom: 1px solid color-mix(in srgb, white 14%, transparent);
  background: rgba(8, 9, 11, 0.78);
  color: #b0a99e;
  font: 9px var(--font-mono);
  letter-spacing: 0.12em;
}
.lb-console-chrome span:first-child { display: flex; gap: 5px; }
.lb-console-chrome i { width: 7px; height: 7px; border-radius: 50%; background: rgba(245, 241, 234, 0.24); }
.lb-console-params {
  position: absolute;
  z-index: 2;
  inset: 58px 16px auto auto;
  display: grid;
  gap: 9px;
  width: min(185px, 30%);
  padding: 14px;
  border: 1px solid color-mix(in srgb, white 18%, transparent);
  border-radius: var(--radius-sm);
  background: rgba(8, 9, 11, 0.76);
  backdrop-filter: blur(10px);
}
.lb-console-params span { color: #8b857b; font: 9px var(--font-mono); text-transform: uppercase; }
.lb-console-params b { color: #f5f1ea; font-family: var(--font-display); font-size: 13px; }
.lb-console-params i { height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--a-lightbridge) var(--v), var(--line-strong) var(--v)); }
.lb-activate { position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.lb-activate[hidden] { display: none; }
.lb-source-switcher {
  position: absolute;
  z-index: 3;
  inset: auto 16px 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  width: fit-content;
  max-width: calc(100% - 32px);
  padding: 7px;
  border: 1px solid color-mix(in srgb, white 18%, transparent);
  border-radius: var(--pill);
  background: rgba(8, 9, 11, 0.78);
  backdrop-filter: blur(10px);
}
.lb-source-switcher[hidden] { display: none; }
.lb-source-switcher > span { padding-inline: 8px; color: #8b857b; font-size: 9px; text-transform: uppercase; }
.lb-source-switcher button {
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: var(--pill);
  background: transparent;
  color: #d7d1c6;
  font: 11px var(--font-mono);
  cursor: pointer;
}
.lb-source-switcher button:hover, .lb-source-switcher button:focus-visible, .lb-source-switcher button.is-active { border-color: #8a6cf0; color: #f5f1ea; background: color-mix(in srgb, #8a6cf0 15%, transparent); }
.lb-perform-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 20px;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.lb-perform-callout h3 { margin-top: 5px; font-size: var(--fs-h3); }
.lb-perform-callout p:last-child { max-width: 58ch; margin-top: 5px; color: var(--muted); }
.lb-perform-panel { padding: 16px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); background: var(--panel-2); }
.lb-perform-panel[hidden] { display: none; }
.lb-perform-panel .perform-drawer-stage { max-width: 620px; }

@media (max-width: 700px) {
  .lb-route { grid-template-columns: 58px 1fr; gap: 14px; min-height: 0; }
  .lb-route-target { display: none; }
  .lb-cables { display: none; }
  .lb-console { aspect-ratio: 4 / 3; }
  .lb-console-params { display: none; }
  .lb-source-switcher { right: 10px; bottom: 10px; left: 10px; max-width: none; border-radius: var(--radius-sm); }
  .lb-source-switcher > span { display: none; }
  .lb-source-switcher button { flex: 1 1 auto; padding-inline: 8px; }
  .lb-console .scene-status { display: none; }
  .lb-perform-callout { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .lb-route { transition: none; }
}

/* IUNU weekly truss-height exhibit */
.iunu-weekly {
  margin-top: 24px;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
}
.iunu-exhibit-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.iunu-exhibit-head h3 { margin-top: 5px; font-size: var(--fs-h3); }
.iunu-week-buttons, .iunu-bay-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.iunu-week-buttons button, .iunu-bay-filters button, .iunu-coverage-controls button {
  min-width: 40px;
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--panel-2);
  color: var(--text-dim);
  font: 11px var(--font-mono);
  cursor: pointer;
}
.iunu-week-buttons button:hover, .iunu-week-buttons button:focus-visible, .iunu-week-buttons button.is-active,
.iunu-bay-filters button:hover, .iunu-bay-filters button:focus-visible, .iunu-bay-filters button.is-active,
.iunu-coverage-controls button:hover, .iunu-coverage-controls button:focus-visible, .iunu-coverage-controls button.is-active {
  border-color: var(--a-iunu);
  background: color-mix(in srgb, var(--a-iunu) 18%, var(--panel-2));
  color: var(--text);
}
.iunu-chart-wrap { margin-top: 20px; padding: 10px; border-radius: var(--radius); background: #f6f3ec; color: #20231f; }
.iunu-week-chart { display: block; width: 100%; height: auto; }
.iunu-grid line { stroke: #d5d9d0; stroke-width: 1; }
.iunu-grid text { fill: #687066; font: 11px var(--font-mono); text-anchor: end; }
.iunu-target-band { fill: #dce9d8; }
.iunu-target-label { fill: #557052; font: 700 11px var(--font-mono); text-transform: uppercase; }
.iunu-truss-line { fill: none; stroke: #647c38; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.iunu-truss-dots circle { fill: #647c38; stroke: #f6f3ec; stroke-width: 3; transition: r var(--dur) var(--ease-out), fill var(--dur) var(--ease-out); }
.iunu-truss-dots circle.is-active { r: 10px; fill: #de9f30; }
.iunu-values text { fill: #20231f; font: 800 12px var(--font-display); text-anchor: middle; }
.iunu-week-labels text { fill: #687066; font: 11px var(--font-mono); text-anchor: middle; }
.iunu-chart-focus { transition: transform 440ms var(--ease-out); }
.iunu-chart-focus rect { fill: #de9f30; opacity: 0.08; }
.iunu-chart-focus line { stroke: #9c6a16; stroke-width: 1; stroke-dasharray: 4 5; opacity: 0.55; }
.iunu-scrub { display: grid; gap: 7px; padding: 0 18px 12px; color: #687066; font: 10px var(--font-mono); text-transform: uppercase; }
.iunu-scrub input { width: 100%; accent-color: #647c38; }
.iunu-readout { display: grid; grid-template-columns: 0.6fr 1fr 1fr 1.7fr; gap: 1px; margin-top: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--line); }
.iunu-readout span { display: grid; gap: 4px; padding: 13px; background: var(--panel-2); }
.iunu-readout small { color: var(--faint); font: 9px var(--font-mono); text-transform: uppercase; }
.iunu-readout b { font-size: 13px; }
.iunu-week-sequence { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; list-style: none; }
.iunu-week-sequence li { display: grid; gap: 5px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--muted); font-size: 11px; }
.iunu-week-sequence li.is-active { border-color: color-mix(in srgb, var(--a-iunu) 60%, var(--line)); background: color-mix(in srgb, var(--a-iunu) 8%, transparent); }
.iunu-week-sequence b { color: var(--text); font-size: 12px; }

@media (max-width: 760px) {
  .iunu-exhibit-head { align-items: flex-start; flex-direction: column; }
  .iunu-week-buttons { width: 100%; }
  .iunu-week-buttons button { flex: 1; min-height: 44px; }
  .iunu-readout { grid-template-columns: 1fr 1fr; }
  .iunu-week-sequence { grid-template-columns: 1fr 1fr; }
  .iunu-chart-wrap { overflow-x: auto; }
  .iunu-week-chart { min-width: 600px; }
}

@media (prefers-reduced-motion: reduce) {
  .iunu-chart-focus, .iunu-truss-dots circle { transition: none; }
}

/* IUNU sampled-to-full coverage comparison */
.iunu-coverage { position: relative; }
.iunu-coverage-controls { display: flex; justify-content: flex-end; gap: 6px; margin-bottom: 8px; }
.iunu-coverage-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.iunu-coverage-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition: opacity var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.iunu-coverage[data-mode="before"] .is-after,
.iunu-coverage[data-mode="after"] .is-before { opacity: 0.42; }
.iunu-coverage[data-mode="before"] .is-before,
.iunu-coverage[data-mode="after"] .is-after { border-color: color-mix(in srgb, var(--a-iunu) 60%, var(--line)); }
.no-js .iunu-coverage-panel { opacity: 1; }
.iunu-coverage-panel > b { display: block; margin-top: 6px; font-family: var(--font-display); font-size: clamp(22px, 3vw, 32px); }
.iunu-coverage-panel > p:last-child { margin-top: 10px; color: var(--muted); font-size: 12px; }
.iunu-coverage-map {
  position: relative;
  aspect-ratio: 8 / 5;
  margin-top: 14px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background-color: #202b25;
  background-image: linear-gradient(90deg, transparent 88%, color-mix(in srgb, white 8%, transparent) 88%), linear-gradient(transparent 80%, color-mix(in srgb, white 8%, transparent) 80%);
  background-size: 12.5% 100%, 100% 20%;
}
.iunu-coverage-panel.is-before .iunu-coverage-map::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 31% 17%, #e3a737 0 5px, transparent 6px), radial-gradient(circle at 69% 38%, #e3a737 0 5px, transparent 6px), radial-gradient(circle at 44% 65%, #e3a737 0 5px, transparent 6px), radial-gradient(circle at 18% 84%, #e3a737 0 5px, transparent 6px);
}
.iunu-coverage-panel.is-after .iunu-coverage-map { background-color: #526f50; }
.iunu-coverage-panel.is-after .iunu-coverage-map::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 44% 16%, #c8614d 0 10px, transparent 11px), radial-gradient(circle at 29% 48%, #c8614d 0 10px, transparent 11px), radial-gradient(circle at 68% 86%, #c8614d 0 10px, transparent 11px);
}

@media (max-width: 620px) {
  .iunu-coverage-panels { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .iunu-coverage-panel { transition: none; opacity: 1 !important; }
}

/* IUNU bay-balance comparison */
.iunu-bays { margin-top: clamp(28px, 5vw, 52px); padding-top: clamp(24px, 4vw, 40px); border-top: 1px solid var(--line); }
.iunu-bay-weeks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.iunu-bay-weeks > section { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.iunu-bay-weeks h4 { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 16px; }
.iunu-bay-weeks h4 span { color: var(--muted); font: 10px var(--font-mono); }
.iunu-bars {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 4px;
  height: 230px;
  margin-top: 14px;
  padding: 10px 4px 26px;
  border-bottom: 1px solid var(--line-strong);
  list-style: none;
  background: linear-gradient(180deg, transparent 25%, color-mix(in srgb, var(--a-iunu) 8%, transparent) 25% 50%, transparent 50%);
}
.iunu-bars li { position: relative; display: grid; align-items: end; height: 100%; min-width: 0; transition: opacity var(--dur) var(--ease-out); }
.iunu-bars li i { display: block; width: 100%; height: calc(var(--v) * 5%); min-height: 2px; border-radius: 3px 3px 0 0; background: var(--bar); }
.iunu-bars li span { position: absolute; top: calc(100% + 6px); left: 50%; color: var(--faint); font: 8px var(--font-mono); transform: translateX(-50%) rotate(-45deg); transform-origin: top center; }
.iunu-bars li[data-bay-state="veg"] { --bar: #bd6754; }
.iunu-bars li[data-bay-state="target"] { --bar: #738c43; }
.iunu-bars li[data-bay-state="gen"] { --bar: #d39a43; }
.iunu-bars li.is-dimmed { opacity: 0.12; }
.iunu-thresholds { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 14px; color: var(--muted); font: 10px var(--font-mono); }
.iunu-thresholds span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 2px; background: currentColor; }
.iunu-thresholds .is-veg { color: #d9826e; }
.iunu-thresholds .is-target { color: #91aa5f; }
.iunu-thresholds .is-gen { color: #e4ae59; }

@media (max-width: 820px) {
  .iunu-bay-weeks { grid-template-columns: 1fr; }
  .iunu-bay-filters button { min-height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .iunu-bars li { transition: none; }
}

/* Kinetic toy */
.kinetic-toy { display: flex; gap: clamp(2px, 1vw, 12px); align-items: center; justify-content: center; width: 100%; height: 100%; }
.kch {
  font-family: var(--font-display);
  font-weight: var(--w, 700);
  font-size: clamp(48px, 13vw, 104px);
  line-height: 1;
  color: var(--text);
  transform: scale(var(--s, 1));
  transform-origin: 50% 60%;
  will-change: font-weight, transform;
}
@media (prefers-reduced-motion: reduce) { .kch { transform: none; font-weight: 760; } }

/* Pick deck */
.deck { width: 100%; height: 100%; display: grid; place-items: center; padding: 18px; }
.deck-card, .deck-result {
  display: grid; place-items: center; gap: 8px; text-align: center; padding: 24px 22px;
  width: min(260px, 100%);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--band) 14%, var(--panel-2));
}
.deck-emoji { font-size: 52px; line-height: 1; }
.deck-label, .deck-result p:last-child { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.deck-count { color: var(--muted); }
.deck-result .mono { color: color-mix(in srgb, var(--band) 62%, var(--text)); }

/* Perform pad grid */
.pad-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; width: 100%; height: 100%; padding: 16px; }
.pad {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--band) 12%, var(--panel-2));
  color: var(--text);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em;
  cursor: pointer;
  transition: background-color 80ms linear, transform 80ms linear;
}
.pad:active, .pad.is-hit { background: var(--band); color: var(--accent-ink); transform: scale(0.97); }

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about-lede {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(24px, 3.4vw, 46px);
  line-height: 1.16;
  letter-spacing: -0.01em;
  max-width: 20ch;
}
.about-lede em { font-style: italic; color: var(--accent); }
.about-body { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.about-prose { max-width: 62ch; color: var(--text-dim); }
.about-prose p + p { margin-top: 1em; }
.about-prose .hi { color: var(--text); }
.about-aside { display: grid; gap: 40px; }
.about-aside h3 { font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }

.timeline { list-style: none; display: grid; border-left: 2px solid var(--line); padding-left: 22px; }
.timeline > li { position: relative; padding: 0 0 26px; }
.timeline > li:last-child { padding-bottom: 0; }
.timeline > li::before { content: ""; position: absolute; left: -29px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--panel); border: 2px solid var(--accent); }
.timeline > li:first-child::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow); }
.tl-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.tl-head b { font-family: var(--font-display); font-weight: 800; font-size: 17px; letter-spacing: -0.01em; }
.tl-when { color: var(--faint); font-family: var(--font-mono); font-size: var(--fs-mono); white-space: nowrap; }
.tl-where { display: block; margin-top: 2px; color: color-mix(in srgb, var(--accent) 62%, var(--text)); font-weight: 600; font-size: 14px; }
.tl-points { list-style: none; display: grid; gap: 6px; margin-top: 10px; }
.tl-points li { position: relative; padding-left: 16px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.tl-points li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 6px; height: 6px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 60%, transparent); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.chips li { padding: 8px 13px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--panel); color: var(--text-dim); font-size: 14px; }
.edu { list-style: none; display: grid; gap: 10px; }
.edu li { color: var(--text-dim); }
.edu li b { font-family: var(--font-display); font-weight: 700; }

/* ==========================================================================
   404
   ========================================================================== */
.nf { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.nf-code { font-family: var(--font-display); font-weight: 800; font-size: clamp(80px, 22vw, 260px); line-height: 1; background: var(--spectrum); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ==========================================================================
   Responsive page rules
   ========================================================================== */
@media (max-width: 900px) {
  .about-body { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: repeat(4, 1fr); }
  .work-grid .card, .work-grid .card.w2, .work-grid .card.w3 { grid-column: span 2; }
  .work-grid .card.w4 { grid-column: span 4; }
}
@media (max-width: 620px) {
  .work-grid { grid-template-columns: 1fr; }
  .work-grid .card, .work-grid .card.w2, .work-grid .card.w3, .work-grid .card.w4 { grid-column: span 1; }
  .navigator a { font-size: 15px; padding: 12px 16px; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .perform-drawer { position: fixed; inset: auto var(--gutter) var(--gutter); }
}
