/* Ralphy library v2 — new IA on top of globals.css tokens + library.css.
   Adds: schematic media placeholders, unit tiles, the block-chip language,
   the pivot rail + add-filter popover, the ingredient panel + slot picker,
   block pages, the notes layer, the .browse-grid.nine rule, and the
   [data-block-accent="mono"] variant.

   Surfaces / ink / accent / per-format hues all already live in globals.css
   (@theme + :root) and library.css (:root) — this file does NOT redefine them.
   The new tokens (--f-podcast-cuts, --block-ink, --block-tint, --block-tint-2)
   are added next to the existing --f-* hues in library.css.

   Same rules as the rest of the app: pure-black, bg-tint separation, single
   orange accent, NO visible borders (separation via bg-tint + shadow + spacing;
   rings via inset box-shadow only). */

/* ══ Schematic media placeholder ════════════════════════════════════════
   No real media in this study — every tile is a schematic that conveys the
   FORMAT's shape (aspect + item count) and the unit's identity. --hue is the
   format hue, passed inline. */
.ph { position: relative; width: 100%; overflow: hidden; border-radius: inherit;
  background:
    linear-gradient(150deg, color-mix(in oklch, var(--hue) 16%, var(--bg-2)), var(--bg) 92%);
  display: grid; place-items: center; }
.ph::before { /* fine diagonal hatch in the hue */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(135deg,
    color-mix(in oklch, var(--hue) 22%, transparent) 0 1px,
    transparent 1px 9px); }
.ph .ph-glyph { position: absolute; right: -8px; bottom: -22px; font-family: var(--font-display);
  font-size: 132px; line-height: 1; color: color-mix(in oklch, var(--hue) 30%, transparent);
  pointer-events: none; user-select: none; }
.ph .ph-mid { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 9px;
  align-items: flex-start; padding: 18px; }
.ph .ph-fmt { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: color-mix(in oklch, var(--hue) 60%, var(--ink)); display: inline-flex; align-items: center; gap: 7px; }
.ph .ph-fmt .g { font-family: var(--font-display); font-size: 12px; }
.ph .ph-title { font-family: var(--font-display); font-weight: 700; font-size: 19px; line-height: 1.08;
  text-transform: uppercase; letter-spacing: -0.01em; color: var(--ink); max-width: 15ch; }
.ph .ph-sub { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.02em; }
/* play affordance for clip formats */
.ph .ph-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 3;
  width: 48px; height: 48px; border-radius: 999px; display: grid; place-items: center;
  background: color-mix(in oklch, var(--hue) 38%, var(--bg)); color: var(--ink);
  box-shadow: 0 6px 20px rgb(0 0 0 / .4); }
/* video "motion" shimmer band */
.ph.is-motion::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(100deg, transparent 35%, color-mix(in oklch, var(--hue) 26%, transparent) 50%, transparent 65%);
  background-size: 240% 100%; animation: phsheen 5.5s linear infinite; opacity: .5; }
@keyframes phsheen { from { background-position: 130% 0; } to { background-position: -130% 0; } }

/* multi-item structural peeks (drawn empty — shape, not content) */
.ph-cells { position: absolute; inset: 0; z-index: 1; display: grid; gap: 5px; padding: 12px; }
/* Each cell is a definite-size positioned box so a next/image `fill` (which is
   position:absolute; inset:0) has a sizing context. Empty cells keep the
   hue-tinted shape; populated cells drop the tint + ring so the real media
   fills edge-to-edge instead of sitting inside a tinted box. */
.ph-cells .c { position: relative; overflow: hidden; min-height: 0; min-width: 0;
  border-radius: 8px; background: color-mix(in oklch, var(--hue) 12%, var(--bg-1));
  box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--hue) 16%, transparent); }
.ph-cells .c.has-media { background: #050506; box-shadow: none; }
.ph-cells .c.has-media > * { position: absolute; inset: 0; }
.ph-cells .c.has-media img,
.ph-cells .c.has-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-deck { position: absolute; inset: 0; z-index: 1; }
.ph-deck .l { position: absolute; left: 50%; transform: translateX(-50%); border-radius: 14px;
  background: var(--bg-3); }
.ph-deck .l.l2 { top: 10px; width: 78%; height: calc(100% - 30px); background: var(--bg-2); }
.ph-deck .l.l1 { top: 18px; width: 88%; height: calc(100% - 30px); background: var(--bg-3); }
.ph-stack { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; gap: 6px; padding: 14px; }
.ph-stack .s { flex: 1; border-radius: 10px; background: color-mix(in oklch, var(--hue) 10%, var(--bg-1));
  box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--hue) 16%, transparent);
  display: flex; align-items: center; gap: 8px; padding: 0 12px; }
.ph-stack .s .bar { height: 5px; border-radius: 999px; background: color-mix(in oklch, var(--hue) 30%, transparent); }
.ph-stack .s .tri { width: 0; height: 0; border-left: 9px solid color-mix(in oklch, var(--hue) 55%, var(--ink)); border-top: 6px solid transparent; border-bottom: 6px solid transparent; flex-shrink: 0; }
.ph-count { position: absolute; bottom: 10px; right: 10px; z-index: 4; font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: 0.04em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px;
  background: rgb(10 10 11 / 0.66); backdrop-filter: blur(6px); color: #fff; }

/* ══ Block chips (Template / Style / Recipe / Asset) ════════════════════
   Monochrome + per-kind glyph, on a faint cool tint. Reads distinctly from the
   colored format chips. */
.bchip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 9px; border-radius: 999px;
  background: var(--block-tint); color: var(--ink-2); font-size: 12.5px; font-weight: 500; border: 0;
  cursor: pointer; max-width: 100%; transition: background .16s, color .16s, transform .16s; text-align: left; }
.bchip:hover { background: var(--block-tint-2); color: var(--ink); transform: translateY(-1px); }
.bchip .bg { font-family: var(--font-display); font-size: 12px; color: var(--block-ink); flex-shrink: 0; }
.bchip .bk { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--mute); flex-shrink: 0; }
.bchip .bn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bchip.sm { padding: 3px 9px 3px 8px; font-size: 11.5px; }
.bchip.solid { background: var(--bg-2); }

/* ══ Unit tile ══════════════════════════════════════════════════════════ */
.utile { position: relative; display: block; break-inside: avoid; margin-bottom: 18px; width: 100%;
  background: var(--bg-1); border-radius: 20px; cursor: pointer; text-align: left; border: 0; color: inherit;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.25); transition: background .22s, transform .22s, box-shadow .22s; }
.utile:hover { background: var(--bg-2); transform: translateY(-3px); box-shadow: 0 14px 34px rgb(0 0 0 / 0.36); }
.utile .um { border-radius: 20px; overflow: hidden; }
.utile-actions { position: absolute; top: 10px; right: 10px; z-index: 5; display: flex; gap: 7px;
  opacity: 0; transform: translateY(-4px); transition: opacity .18s, transform .18s; }
.utile:hover .utile-actions, .utile:focus-within .utile-actions { opacity: 1; transform: none; }
.ua { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.06em; text-transform: uppercase; padding: 7px 12px; border-radius: 999px; border: 0; cursor: pointer;
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.35); }
.ua.open { background: rgb(245 245 244 / 0.94); color: #0a0a0b; }
.ua.remix { background: var(--vio); color: #1a1205; }
.ua.remix:hover { background: var(--vio-2); }
.ua.open:hover { background: #fff; }
.ubody { display: flex; flex-direction: column; gap: 9px; padding: 13px 15px 15px; }
.ubody .ufmt { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 7px; }
.ubody .ufmt .dot { width: 7px; height: 7px; border-radius: 2px; }
.ubody .utitle { font-family: var(--font-display); font-weight: 700; font-size: 17px; line-height: 1.12;
  letter-spacing: -0.01em; text-transform: uppercase; margin: 0; color: var(--ink); }
.uingredients { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.umore { font-family: var(--font-mono); font-size: 10.5px; color: var(--mute); align-self: center; }

/* ══ Pivot rail (active block filters above the grid) ═══════════════════ */
.pivot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 18px 0 4px; }
.pivot-lead { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--mute); margin-right: 2px; }
.fpill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border-radius: 999px;
  background: var(--block-tint-2); color: var(--ink); font-size: 12.5px; border: 0; }
.fpill .fp-kind { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--mute); }
.fpill .fp-x { width: 18px; height: 18px; border-radius: 999px; background: rgb(245 245 244 / 0.08);
  display: grid; place-items: center; color: var(--ink-3); cursor: pointer; border: 0; flex-shrink: 0; }
.fpill .fp-x:hover { background: var(--vio); color: #1a1205; }
.addfilter { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px;
  background: var(--bg-1); color: var(--ink-3); font-size: 12.5px; border: 0; cursor: pointer; position: relative;
  transition: background .16s, color .16s; }
.addfilter:hover { background: var(--bg-2); color: var(--ink); }

/* add-filter popover */
.afmenu { position: absolute; z-index: 80; top: calc(100% + 8px); left: 0; width: min(420px, 88vw);
  background: var(--bg-2); border-radius: 16px; box-shadow: 0 22px 60px rgb(0 0 0 / 0.55); padding: 12px;
  animation: dpfade .16s ease; }
.afmenu .af-kinds { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.afmenu .af-kind { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px;
  background: var(--bg-1); color: var(--ink-3); font-size: 12.5px; border: 0; cursor: pointer; }
.afmenu .af-kind.on { background: var(--ink); color: var(--bg); }
.afmenu .af-kind .g { font-family: var(--font-display); font-size: 12px; }
/* live-filter search at the top of the popover */
.afmenu .af-search { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 11px;
  background: #050506; color: var(--mute); margin-bottom: 8px; }
.afmenu .af-search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--ink);
  font-family: var(--font-sans); font-size: 13.5px; }
.afmenu .af-search input::placeholder { color: var(--mute-2); }
.afmenu .af-search svg { flex-shrink: 0; }
.afmenu .af-list { max-height: 280px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px;
  scrollbar-width: thin; scrollbar-color: var(--bg-3) transparent; }
/* thin dark-theme scrollbar (not the default chunky bar) */
.afmenu .af-list::-webkit-scrollbar { width: 8px; }
.afmenu .af-list::-webkit-scrollbar-track { background: transparent; }
.afmenu .af-list::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 999px;
  border: 2px solid transparent; background-clip: padding-box; }
.afmenu .af-list::-webkit-scrollbar-thumb:hover { background: color-mix(in oklch, var(--ink) 26%, var(--bg-3)); background-clip: padding-box; }
.afmenu .af-opt { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px;
  background: none; border: 0; cursor: pointer; color: var(--ink-2); text-align: left; width: 100%; }
.afmenu .af-opt:hover { background: var(--bg-3); color: var(--ink); }
.afmenu .af-opt .ao-name { flex: 1; font-size: 13.5px; }
.afmenu .af-opt .ao-kind { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--mute-2); background: var(--block-tint); padding: 3px 7px;
  border-radius: 999px; flex-shrink: 0; }
.afmenu .af-opt .ao-n { font-family: var(--font-mono); font-size: 11px; color: var(--mute); flex-shrink: 0; }

/* ══ Detail: ingredient panel ══════════════════════════════════════════ */
.udetail { display: grid; gap: 40px; align-items: start; grid-template-columns: minmax(0, 1.3fr) minmax(360px, 0.78fr); }
@media (max-width: 980px){ .udetail { grid-template-columns: 1fr; gap: 26px; } }
.uviewer { position: sticky; top: 92px; }
@media (max-width: 980px){ .uviewer { position: static; } }
.uviewer .stage { display: block; width: 100%; padding: 0; border: 0; border-radius: 20px; overflow: hidden;
  background: #050506; box-shadow: 0 1px 2px rgb(0 0 0 / .3); }
/* media box capped at 70vh, aspect preserved (width derived inline from the
   ratio so a portrait clip shows full-frame), centered when narrower than column */
.uviewer .stage .stage-media { position: relative; max-width: 100%; max-height: 70vh; margin-inline: auto; }
.uviewer .vctl { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-top: 12px; }
/* Wrap grid with a capped height + vertical scroll so a 32-up pack is fully
   reachable without the strip dominating the page. */
.uviewer .vctl .seg { display: flex; gap: 6px; flex-wrap: wrap; max-height: 188px; overflow-y: auto; flex: 1 1 auto; }
.vthumb { width: 54px; height: 54px; border-radius: 12px; padding: 0; border: 0; cursor: pointer; overflow: hidden;
  background: var(--bg-2); position: relative; flex-shrink: 0; }
.vthumb.on { box-shadow: 0 0 0 2px var(--vio); }
.vthumb .ph { border-radius: 12px; }
/* The thumb's inner <Media> (#088) fills the 54×54 button (cover crop). */
.vthumb .vthumb-media { width: 100%; height: 100%; border-radius: 12px; }
.vidx { font-family: var(--font-mono); font-size: 11px; color: var(--mute); }

/* ingredients column */
.ipanel { background: var(--bg-1); border-radius: 22px; padding: 8px; box-shadow: 0 1px 2px rgb(0 0 0 / .25); }
.ipanel-head { padding: 16px 16px 12px; }
.ipanel-head .ih-eye { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--mute); margin: 0 0 4px; }
.ipanel-head h2 { font-family: var(--font-display); font-weight: 700; font-size: 18px; text-transform: uppercase;
  letter-spacing: -0.01em; margin: 0; }
.ipanel-head p { font-size: 12.5px; color: var(--ink-3); margin: 6px 0 0; line-height: 1.5; }

/* ── read-only provenance panel ───────────────────────────────────────────
   Three visually-distinct zones: the head, the grouped "core recipe" block
   (Template/Style/Format), and the per-axis chip sections. Separation via
   bg-tint steps + spacing only — no visible borders. */
.ip-section-label { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--mute); margin: 0 0 8px; display: flex; align-items: center; gap: 7px; }
.ip-section-label .ip-section-glyph { font-family: var(--font-display); font-size: 12px; color: var(--block-ink); }

/* Core recipe — the 3 single-value axes grouped as one tinted block. */
.ip-core { margin: 4px 8px 6px; padding: 12px 12px 8px; border-radius: 16px; background: var(--bg-2); }
.ip-core-row { display: flex; align-items: center; gap: 13px; padding: 11px 10px; border-radius: 12px;
  color: inherit; text-decoration: none; transition: background .16s; }
.ip-core-row + .ip-core-row { margin-top: 2px; }
.ip-core-row:hover { background: var(--bg-3); }
.ip-core-row .slot-axis { width: 78px; flex-shrink: 0; }
.ip-core-row .ip-open { color: var(--mute-2); flex-shrink: 0; display: inline-flex; transition: color .16s; }
.ip-core-row:hover .ip-open { color: var(--vio); }
.ip-core-row:hover .sn { color: var(--vio); }

/* Per-axis chip sections (rendered only when populated). */
.ip-msection { padding: 12px 16px 4px; }
.ip-msection .ip-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.ip-chips .bchip { text-decoration: none; }
.ip-chips .bchip .ip-chip-open { display: inline-flex; color: var(--mute-2); margin-left: 1px; transition: color .16s; }
.ip-chips .bchip:hover .ip-chip-open { color: var(--block-ink); }

.slot { display: flex; align-items: center; gap: 13px; padding: 12px 14px; border-radius: 14px;
  transition: background .16s; position: relative; }
.slot + .slot { margin-top: 2px; }
.slot:hover { background: var(--bg-2); }
.slot.swapped { background: color-mix(in oklch, var(--vio) 9%, var(--bg-1)); }
.slot-axis { width: 86px; flex-shrink: 0; }
.slot-axis .ax { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--mute); display: flex; align-items: center; gap: 6px; }
.slot-axis .ax .g { font-family: var(--font-display); font-size: 12px; color: var(--block-ink); }
.slot-thumb { width: 42px; height: 42px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: var(--bg-3); }
.slot-thumb .ph { border-radius: 10px; }
.slot-thumb.glyphy { display: grid; place-items: center; color: var(--block-ink); font-family: var(--font-display); font-size: 17px;
  background: var(--block-tint-2); }
.slot-main { flex: 1; min-width: 0; }
.slot-main .sn { font-family: var(--font-sans); font-weight: 600; font-size: 14.5px; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-main .sm { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-main .sn a:hover { color: var(--vio); }
.slot-state { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.pinpill { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--mute-2); display: inline-flex; align-items: center; gap: 5px; }
.swappill { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--vio-2); display: inline-flex; align-items: center; gap: 5px; }
.slot-change { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 6px 11px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); border: 0; cursor: pointer;
  transition: background .16s, color .16s; }
.slot:hover .slot-change { background: var(--bg-3); }
.slot-change:hover { background: var(--vio); color: #1a1205; }
.slot-revert { font-family: var(--font-mono); font-size: 10.5px; color: var(--mute); background: none; border: 0;
  cursor: pointer; padding: 6px 4px; }
.slot-revert:hover { color: var(--ink); }
.slot-multi { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 14px 12px 100px; }
.slot-divider { height: 1px; background: var(--bg-3); margin: 8px 14px; opacity: .5; }
.slot-grouphead { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--mute-2); padding: 12px 14px 4px; }

/* commit bar */
.commit { position: sticky; bottom: 0; margin-top: 8px; padding: 14px 16px;
  background: linear-gradient(to top, var(--bg-1) 70%, transparent); border-radius: 0 0 22px 22px; }
.commit .commit-row { display: flex; gap: 10px; align-items: center; }
.commit .summary { font-family: var(--font-mono); font-size: 11px; color: var(--mute); margin: 10px 2px 0; line-height: 1.5; }
.commit .summary b { color: var(--vio-2); font-weight: 400; }
.btn-remix-full { flex: 1; justify-content: center; }

/* ── Blueprint accent + reproduce CTAs (#079) ─────────────────────────
   The Blueprint reads in a cool blue — deliberately OFF the format/orange
   wheel so it never competes with a format hue or the --vio accent. No
   visible borders: solid blue fill on the primary, bg-tint on the secondary. */
:root {
  --bp-blue:    oklch(0.66 0.16 250);
  --bp-blue-2:  oklch(0.74 0.15 250);
  --bp-ink:     oklch(0.86 0.05 250);
  --bp-tint:    oklch(0.66 0.16 250 / 0.14);
  --bp-tint-2:  oklch(0.66 0.16 250 / 0.22);

  /* Recipe-kind accents (#082) — one hue per recipeKind so a recipe chip / page
     reads its treatment class at a glance. Same chroma/lightness family as the
     format wheel but a step muted (chroma 0.11), spread around the wheel and
     deliberately OFF the orange accent (~35-70) and the blue --bp tokens (250).
     `*-2` = the readable ink tint, `*-tint` = the faint chip fill. */
  --rk-ffmpeg:           oklch(0.74 0.11 22);
  --rk-ffmpeg-2:         oklch(0.82 0.10 22);
  --rk-ffmpeg-tint:      oklch(0.74 0.11 22 / 0.15);
  --rk-encode:           oklch(0.74 0.11 95);
  --rk-encode-2:         oklch(0.82 0.10 95);
  --rk-encode-tint:      oklch(0.74 0.11 95 / 0.15);
  --rk-overlay:          oklch(0.74 0.11 175);
  --rk-overlay-2:        oklch(0.82 0.10 175);
  --rk-overlay-tint:     oklch(0.74 0.11 175 / 0.15);
  --rk-bake:             oklch(0.74 0.11 320);
  --rk-bake-2:           oklch(0.82 0.10 320);
  --rk-bake-tint:        oklch(0.74 0.11 320 / 0.15);
  --rk-hyperframes:      oklch(0.74 0.11 285);
  --rk-hyperframes-2:    oklch(0.82 0.10 285);
  --rk-hyperframes-tint: oklch(0.74 0.11 285 / 0.15);
  --rk-prompt:           oklch(0.74 0.11 145);
  --rk-prompt-2:         oklch(0.82 0.10 145);
  --rk-prompt-tint:      oklch(0.74 0.11 145 / 0.15);
}

/* Recipe chip — a .bchip carrying its recipeKind accent. The icon + a faint
   hue-tinted fill make the kind legible before you read the name. --rk + --rk-t
   are passed inline from the kind meta. No visible border — tint + hover only. */
.bchip.rk { background: var(--rk-t); color: var(--ink-2); }
.bchip.rk:hover { background: color-mix(in oklch, var(--rk) 24%, var(--bg-1)); color: var(--ink); }
.bchip.rk .bg { color: var(--rk); display: inline-flex; align-items: center; }
.bchip.rk:hover .bg, .bchip.rk:hover .ip-chip-open { color: var(--rk); }

/* Recipe-kind badge — the colored type tag on the recipe block-page header,
   sits under the H1 so the treatment class is obvious before reading. */
.rk-badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 10px;
  border-radius: 999px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; background: var(--rk-t); color: var(--rk-2); margin: 0 0 16px; }
.rk-badge .rk-ic { display: inline-flex; align-items: center; color: var(--rk); }

/* Left-column reproduce CTAs — the blue Blueprint button + Use-in-ralphy. */
.bp-cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 22px; }

.btn-blueprint { display: inline-flex; align-items: center; gap: 9px; padding: 13px 22px;
  border-radius: 999px; background: var(--bp-blue); color: #05060a; font-weight: 600;
  font-size: 15px; border: 0; cursor: pointer; transition: transform .16s, background .16s; }
.btn-blueprint:hover { background: var(--bp-blue-2); transform: translateY(-1px); }
.btn-blueprint .btn-blueprint-glyph { font-family: var(--font-display); font-size: 17px;
  line-height: 1; margin-top: -1px; }

/* Blue copy-on-click CTA (#096): copies the reproduce command, flashes a
   "Copied — paste in your terminal" confirmation. On-brand blue, no border. */
.btn-use-ralphy { display: inline-flex; align-items: center; gap: 8px; padding: 13px 20px;
  border-radius: 999px; background: var(--bp-blue); color: #05060a; font-weight: 600;
  font-size: 15px; border: 0; cursor: pointer; transition: background .16s, transform .16s; }
.btn-use-ralphy:hover { background: var(--bp-blue-2); transform: translateY(-1px); }
.btn-use-ralphy.copied { background: var(--bp-blue-2); }

/* Command reveal under the in-modal Use-in-Ralphy button (#096). */
.bp-rail-cmd { display: block; margin-top: 9px; font-family: var(--font-mono); font-size: 11.5px;
  color: var(--mute); word-break: break-all; line-height: 1.5; }

/* Blue eyebrow inside the Blueprint / Use modals (overrides the orange .m-eyebrow). */
.modal-card .m-eyebrow.bp-eyebrow { color: var(--bp-blue-2); }

/* Wide, two-pane modal for the full Blueprint detail (#080) — mirrors the skills
   detail modal: a fixed LEFT rail of section names + Use-in-ralphy CTA, beside a
   RIGHT pane that scrolls only the selected section. No giant single scroll. */
.modal-card-wide { max-width: 960px; }
.bp-modal-card { display: flex; flex-direction: column; max-height: calc(100vh - 48px);
  height: min(86vh, 880px); }
.bp-modal-card .m-head { margin-bottom: 14px; }

.bp-two-pane { flex: 1; min-height: 0; display: flex; gap: 14px; }

/* LEFT rail — section nav (top) + Use-in-ralphy CTA (bottom). Stays fixed. */
.bp-rail { flex: none; width: 230px; display: flex; flex-direction: column;
  background: var(--bg-2); border-radius: 16px; padding: 12px; }
.bp-rail-nav { display: flex; flex-direction: column; gap: 3px; overflow-y: auto;
  overscroll-behavior: contain; }
.bp-rail-item { display: block; width: 100%; text-align: left; padding: 9px 12px;
  border-radius: 10px; background: transparent; color: var(--ink-2); border: 0;
  cursor: pointer; font-size: 13.5px; line-height: 1.3; transition: background .14s, color .14s; }
.bp-rail-item:hover { background: var(--bg-1); color: var(--ink); }
.bp-rail-item.is-active { background: var(--bp-blue); color: #05060a; font-weight: 600; }
.bp-rail-foot { margin-top: auto; padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.bp-rail-foot .m-label { margin: 0; }
.bp-rail-hint { font-size: 11px; line-height: 1.5; color: var(--mute); margin: 0; }

/* RIGHT pane — only the selected section scrolls. */
.bp-pane { flex: 1; min-width: 0; min-height: 0; overflow-y: auto;
  overscroll-behavior: contain; padding-right: 4px; }
.bp-pane > .bp-axis { margin-top: 0; }

@media (max-width: 720px) {
  .modal-card-wide { max-width: 100%; }
  .bp-modal-card { height: min(90vh, 880px); }
  .bp-two-pane { flex-direction: column; }
  .bp-rail { width: auto; flex: none; }
  .bp-rail-nav { flex-direction: row; flex-wrap: wrap; }
  .bp-rail-item { width: auto; }
}

/* try-hints (make the two required swap flows explicit) */
.tryrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 14px 6px; }
.tryhint { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.02em; padding: 7px 12px; border-radius: 999px; background: var(--bg-2); color: var(--ink-3);
  border: 0; cursor: pointer; transition: background .16s, color .16s; }
.tryhint:hover { background: var(--block-tint-2); color: var(--ink); }
.tryhint .tn { font-family: var(--font-display); font-size: 11px; color: var(--block-ink); }

/* ══ Blueprint panel — full reproduction recipe (#078) ══════════════════
   Full-width section below the udetail grid. Same rules as the rest of the
   app: bg-tint separation, NO visible borders. Each axis is its own tinted
   sub-card; verbatim prompts / recipes / timing arrays sit in mono <pre> blocks
   that stay selectable + copy-pasteable. */
.bp-section { padding: 8px 0 12px; }
.bp-panel { background: var(--bg-1); border-radius: 22px; padding: 26px 26px 22px;
  box-shadow: 0 1px 2px rgb(0 0 0 / .25); }
.bp-head { margin-bottom: 6px; }
.bp-head .bp-eye { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--mute); margin: 0 0 5px; }
.bp-head h2 { font-family: var(--font-display); font-weight: 700; font-size: 22px;
  text-transform: uppercase; letter-spacing: -0.01em; margin: 0; }
.bp-head .bp-sub { font-size: 13px; color: var(--ink-3); margin: 8px 0 0; line-height: 1.55; max-width: 80ch; }
.bp-head .bp-cost { font-family: var(--font-mono); color: var(--vio-2); }

/* One axis = one tinted sub-card. */
.bp-axis { margin-top: 16px; padding: 16px 18px 18px; border-radius: 16px; background: var(--bg-2); }
.bp-axis-label { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--mute); margin: 0 0 12px; }

/* Mono pre — verbatim prompts / commands / timing arrays. Selectable, wraps. */
.bp-pre { font-family: var(--font-mono); font-size: 12px; line-height: 1.55; color: var(--ink-2);
  background: var(--bg); border-radius: 12px; padding: 13px 15px; margin: 0;
  white-space: pre-wrap; word-break: break-word; overflow-x: auto; }
.bp-pre-inline { display: inline-block; padding: 8px 12px; }
.bp-storyboard { margin-top: 10px; }
.bp-mono { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-2); }

/* Tables — scene table + model stack. Zebra via bg-tint, no borders. */
.bp-table-wrap { overflow-x: auto; border-radius: 12px; }
.bp-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.bp-table th { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--mute); text-align: left; font-weight: 500;
  padding: 8px 12px; background: var(--bg-3); }
.bp-table th:first-child { border-radius: 8px 0 0 0; }
.bp-table th:last-child { border-radius: 0 8px 0 0; }
.bp-table td { padding: 9px 12px; color: var(--ink-2); vertical-align: top; }
.bp-table tbody tr:nth-child(odd) td { background: var(--bg); }
.bp-table .bp-vo { color: var(--ink); max-width: 32ch; }
.bp-table .bp-params { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); max-width: 34ch; }

/* Prompts + recipes — stacked cards each with a meta tag row + a pre. */
.bp-prompts { display: flex; flex-direction: column; gap: 12px; }
.bp-prompt { background: var(--bg); border-radius: 12px; padding: 12px 14px; }
.bp-prompt-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
.bp-prompt .bp-pre { background: var(--bg-2); }
.bp-tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.04em; padding: 3px 9px;
  border-radius: 999px; background: var(--block-tint); color: var(--ink-3); }
.bp-tag-stage { background: var(--block-tint-2); color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.1em; }
.bp-tag-model { color: var(--vio-2); }
.bp-slots { font-family: var(--font-mono); font-size: 10.5px; color: var(--mute); margin: 8px 0 0; }

/* Composition — keyed blocks of pills + arrays. */
.bp-comp { display: flex; flex-direction: column; gap: 14px; }
.bp-comp-key { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--mute); margin: 0 0 8px; }
.bp-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.bp-pill { font-family: var(--font-mono); font-size: 11.5px; padding: 5px 11px; border-radius: 999px;
  background: var(--block-tint); color: var(--ink-2); }
.bp-comp-note { font-size: 12px; color: var(--ink-3); margin: 0; }

/* Hard assets — grouped by kind, each row a download link or a source-note. */
.bp-asset-group { margin-top: 12px; }
.bp-asset-group:first-of-type { margin-top: 0; }
.bp-asset-group-label { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--mute-2); margin: 0 0 7px; }
.bp-assets { display: flex; flex-direction: column; gap: 6px; }
.bp-asset { display: flex; align-items: center; gap: 12px; padding: 10px 13px; border-radius: 12px;
  background: var(--bg); text-decoration: none; color: inherit; transition: background .16s; }
.bp-asset-dl:hover { background: var(--bg-3); }
.bp-asset-glyph { font-family: var(--font-display); font-size: 15px; color: var(--block-ink); flex-shrink: 0; }
.bp-asset-dl .bp-asset-glyph { color: var(--vio); }
.bp-asset-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bp-asset-name { font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-asset-meta { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-asset-action { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--vio-2); flex-shrink: 0; }
.bp-asset-note { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--mute-2); flex-shrink: 0; }

/* Oversize-skipped — surfaced clearly, never hidden. */
.bp-oversize-note { font-size: 12.5px; color: var(--ink-3); margin: 0 0 8px; }
.bp-oversize-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.bp-oversize-list li { font-size: 11.5px; padding: 8px 12px; border-radius: 10px; background: var(--bg); color: var(--ink-3); }

/* ══ Slot picker overlay ════════════════════════════════════════════════ */
.picker { position: fixed; inset: 0; z-index: 220; background: rgb(0 0 0 / 0.72); backdrop-filter: blur(8px);
  display: grid; place-items: center; padding: 24px; animation: lbfade .18s ease; }
.picker-card { width: 100%; max-width: 560px; max-height: 88vh; display: flex; flex-direction: column;
  background: var(--bg-1); border-radius: 22px; box-shadow: 0 24px 70px rgb(0 0 0 / 0.6); overflow: hidden; }
.picker-head { padding: 20px 22px 14px; }
.picker-head .pk-eye { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--block-ink); margin: 0 0 5px; display: inline-flex; align-items: center; gap: 7px; }
.picker-head h3 { font-family: var(--font-display); font-weight: 700; font-size: 22px; text-transform: uppercase;
  letter-spacing: -0.01em; margin: 0; }
.picker-head p { font-size: 13px; color: var(--ink-3); margin: 7px 0 0; line-height: 1.5; }
.picker-head .pk-close { position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 999px;
  background: var(--bg-2); color: var(--ink-3); border: 0; display: grid; place-items: center; cursor: pointer; }
.picker-head .pk-close:hover { background: var(--bg-3); color: var(--ink); }
.picker-body { overflow: auto; padding: 6px 14px 14px; }
.pk-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--mute); margin: 14px 8px 8px; }
.pk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 520px){ .pk-grid { grid-template-columns: 1fr; } }
.pk-opt { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: var(--bg-2);
  border: 0; cursor: pointer; text-align: left; color: inherit; transition: background .16s, transform .16s; }
.pk-opt:hover { background: var(--bg-3); transform: translateY(-2px); }
.pk-opt.current { box-shadow: inset 0 0 0 2px var(--vio); }
.pk-opt .pk-thumb { width: 46px; height: 46px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: var(--bg-3); }
.pk-opt .pk-thumb.glyphy { display: grid; place-items: center; color: var(--block-ink); font-family: var(--font-display);
  font-size: 18px; background: var(--block-tint-2); }
.pk-opt .pk-meta { min-width: 0; }
.pk-opt .pk-meta .pn { font-weight: 600; font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-opt .pk-meta .pm { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-opt .pk-cur { margin-left: auto; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--vio-2); flex-shrink: 0; }
.pk-new { display: flex; gap: 8px; margin: 4px 0; }
.pk-new input { flex: 1; min-width: 0; background: #050506; border: 0; outline: none; color: var(--ink);
  font-family: var(--font-sans); font-size: 14px; border-radius: 12px; padding: 13px 15px; }
.pk-new input::placeholder { color: var(--mute-2); }
.pk-new .pk-go { padding: 0 16px; border-radius: 12px; background: var(--vio); color: #1a1205; border: 0; cursor: pointer;
  font-weight: 600; font-size: 13px; }
.pk-upload { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px; border-radius: 14px;
  background: var(--bg-2); border: 0; cursor: pointer; color: var(--ink-2); font-size: 13.5px; text-align: left; }
.pk-upload:hover { background: var(--bg-3); color: var(--ink); }
.pk-upload .pu-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--bg-3); display: grid; place-items: center;
  color: var(--block-ink); flex-shrink: 0; }

/* ══ Block page ═════════════════════════════════════════════════════════ */
.bhero { padding-top: 92px; }
@media (max-width: 900px){ .bhero { padding-top: 64px; } }
.bhead { display: grid; gap: 36px; grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr); align-items: start; }
/* No proof media → drop the empty right column; the header text spans full width. */
.bhead.no-proof { grid-template-columns: 1fr; }
@media (max-width: 900px){ .bhead { grid-template-columns: 1fr; gap: 22px; } }
.bhead .bh-eye { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--block-ink); display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; }
.bhead .bh-eye .g { font-family: var(--font-display); font-size: 14px; }
.bhead h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 4.4vw, 56px); line-height: 1.02;
  letter-spacing: -0.015em; text-transform: uppercase; margin: 0 0 16px; }
.bhead .bh-blurb { font-size: clamp(15px, 1.3vw, 18px); line-height: 1.55; color: var(--ink-3); margin: 0 0 22px; max-width: 54ch; }
.bhead .bh-cta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.bh-refs { background: var(--bg-1); border-radius: 20px; padding: 14px; }
.bh-refs .rh { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--mute); margin: 4px 6px 10px; }
.bh-refgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bh-refgrid .rf { border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; }
.bh-refgrid .rf .ph { aspect-ratio: auto !important; width: 100%; height: 100%; }
.ba-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ba-pair .bap { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; }
.ba-pair .bap .ph { aspect-ratio: auto !important; width: 100%; height: 100%; }
.ba-pair .bap .tag { position: absolute; top: 8px; left: 8px; z-index: 4; font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 0.1em; text-transform: uppercase; background: rgb(10 10 11 / 0.66); color: #fff; padding: 3px 8px; border-radius: 999px; }

/* ══ Notes layer (annotation toggle) ════════════════════════════════════ */
.notes-toggle { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.04em; padding: 8px 13px; border-radius: 999px; background: var(--bg-2); color: var(--ink-3);
  border: 0; cursor: pointer; transition: background .16s, color .16s; }
.notes-toggle:hover { background: var(--bg-3); color: var(--ink); }
.notes-toggle.on { background: var(--vio); color: #1a1205; }
.note-pin { position: absolute; z-index: 60; width: 22px; height: 22px; border-radius: 999px; background: var(--vio);
  color: #1a1205; font-family: var(--font-mono); font-size: 11px; font-weight: 700; display: grid; place-items: center;
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.45); cursor: default; transform: translate(-50%, -50%); }
.note-pin::after { content: ""; position: absolute; inset: -6px; border-radius: 999px;
  background: color-mix(in oklch, var(--vio) 40%, transparent); z-index: -1; animation: notepulse 2.4s ease-out infinite; }
@keyframes notepulse { 0% { transform: scale(.7); opacity: .7; } 100% { transform: scale(1.5); opacity: 0; } }
.notes-rail { position: fixed; right: 18px; top: 84px; z-index: 55; width: 300px; max-height: calc(100dvh - 110px);
  overflow: auto; background: var(--bg-2); border-radius: 18px; box-shadow: 0 22px 60px rgb(0 0 0 / 0.55);
  padding: 16px; animation: dpfade .2s ease; }
@media (max-width: 1280px){ .notes-rail { position: fixed; right: 12px; left: 12px; width: auto; top: auto; bottom: 12px;
  max-height: 46vh; } }
.notes-rail h4 { font-family: var(--font-display); font-weight: 700; font-size: 13px; text-transform: uppercase;
  letter-spacing: 0.02em; margin: 0 0 4px; color: var(--vio); }
.notes-rail .nr-sub { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--mute); margin: 0 0 12px; }
.notes-rail .nr { display: flex; gap: 10px; padding: 9px 0; }
.notes-rail .nr + .nr { box-shadow: inset 0 1px 0 var(--bg-3); }
.notes-rail .nr .n { width: 20px; height: 20px; border-radius: 999px; background: var(--vio); color: #1a1205;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }
.notes-rail .nr p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.notes-rail .nr p b { color: var(--ink); font-weight: 600; }

/* ══ misc: more-from strip, breadcrumb reuse, model chips removed ═══════ */
.morefrom { margin-top: 8px; }
/* typed rail title — make the block KIND (Template vs Style) explicit with its glyph */
.mf-title .mf-kind { display: inline-flex; align-items: center; gap: 7px; vertical-align: middle;
  font-family: var(--font-mono); font-size: 0.5em; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--block-ink); background: var(--block-tint); padding: 4px 10px; border-radius: 999px; }
.mf-title .mf-kind .mf-glyph { font-family: var(--font-display); font-size: 1.15em; }
.mf-title .mf-sep { color: var(--mute); }
/* ── Carousel (#090) — recommendation-rail scroll mechanism ─────────────────
   No visible borders: controls are bg-tint discs + shadow, accent on hover
   (style-matched to .lb-nav). The track is the snap-scroll strip; .crsl-item
   re-supplies the fixed rail-item width the old `.relrail .utile` rule gave. */
.crsl { position: relative; }
.crsl-track { display: flex; gap: 16px; overflow-x: auto; padding: 4px 2px 14px;
  scroll-snap-type: x mandatory; scroll-behavior: smooth; outline: none; touch-action: pan-x; }
.crsl-track:focus-visible { box-shadow: 0 0 0 2px color-mix(in srgb, var(--vio) 55%, transparent); border-radius: 14px; }
.crsl-track.crsl-dragging { scroll-snap-type: none; scroll-behavior: auto; cursor: grabbing; user-select: none; }
.crsl-item { flex: 0 0 clamp(220px, 24vw, 280px); scroll-snap-align: start; }
.crsl-item .utile { margin-bottom: 0; }
/* prev/next discs — bg-tint + shadow, accent on hover; sit half over the rail
   edges, vertically centered on the card media row. */
.crsl-nav { position: absolute; top: 38%; transform: translateY(-50%); z-index: 4;
  width: 40px; height: 40px; border-radius: 999px; border: 0; cursor: pointer;
  display: grid; place-items: center; background: var(--bg-2); color: var(--ink);
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.34); transition: background .15s ease, color .15s ease, opacity .15s ease; }
.crsl-nav.prev { left: -6px; } .crsl-nav.next { right: -6px; }
.crsl-nav:hover { background: var(--bg-3); color: var(--vio); }
.crsl-nav:disabled { opacity: 0; pointer-events: none; }
@media (max-width: 700px) { .crsl-nav { display: none; } }

/* format-cards row: 9 columns (All + 8 formats), responsive */
.browse-grid.nine { grid-template-columns: repeat(9, 1fr); }
@media (max-width: 1500px){ .browse-grid.nine { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 900px){ .browse-grid.nine { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px){ .browse-grid.nine { grid-template-columns: repeat(2, 1fr); } }

/* tweak surfaces — mono block-accent variant (optional toggle) */
[data-block-accent="mono"] { --block-ink: var(--ink-3); --block-tint: rgb(245 245 244 / 0.06); --block-tint-2: rgb(245 245 244 / 0.11); }

/* Thin themed scrollbar for the horizontal More-from rails + the viewer
   thumbnail strip (carousel feel, no chunky default bar). */
.crsl-track, .uviewer .vctl .seg { scrollbar-width: thin; scrollbar-color: var(--bg-4) transparent; }
.crsl-track::-webkit-scrollbar, .uviewer .vctl .seg::-webkit-scrollbar { height: 8px; width: 8px; }
.crsl-track::-webkit-scrollbar-track, .uviewer .vctl .seg::-webkit-scrollbar-track { background: transparent; }
.crsl-track::-webkit-scrollbar-thumb, .uviewer .vctl .seg::-webkit-scrollbar-thumb {
  background: var(--bg-4); border-radius: 999px; }
.crsl-track::-webkit-scrollbar-thumb:hover, .uviewer .vctl .seg::-webkit-scrollbar-thumb:hover {
  background: var(--mute-2); }
/* Letterbox backing so a contained sticker/still reads intentionally on the stage. */
.uviewer .stage .stage-media { background: color-mix(in oklch, var(--hue) 8%, var(--bg)); border-radius: 16px; }

/* ── Recipe detail (#084) — described body + copyable artifact + live demo ──── */
/* Mirrors the Blueprint panel system: a tinted .rx-panel wrapping tinted .rx-axis
   blocks, separated by bg-tint + shadow + spacing (no borders). */
.rx-section { padding: 4px 0 12px; }
.rx-panel { background: var(--bg-1); border-radius: 22px; padding: 24px 26px 22px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.02), 0 18px 44px rgba(0,0,0,0.32); }
.rx-axis { margin-top: 16px; padding: 16px 18px 18px; border-radius: 16px; background: var(--bg-2); }
.rx-axis:first-child { margin-top: 0; }
.rx-axis-label { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--mute-2); margin: 0 0 12px; }
/* MDX body inside the recipe panel — inherit the shared blog/lib body styling. */
.rx-body { font-size: 14px; line-height: 1.6; color: var(--ink-2); white-space: pre-wrap; }
.rx-body > :first-child { margin-top: 0; }
.rx-body > :last-child { margin-bottom: 0; }

/* Copyable artifact block (CopyArtifact island). */
.rx-artifact { background: var(--bg); border-radius: 12px; overflow: hidden; }
.rx-artifact-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px 8px 14px; background: color-mix(in oklch, var(--block-ink) 6%, var(--bg-2)); }
.rx-artifact-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--mute); }
.rx-artifact-bar .copy { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono);
  font-size: 11px; padding: 5px 11px; border-radius: 8px; background: var(--bg-3); color: var(--ink-2);
  cursor: pointer; transition: background .16s, color .16s; }
.rx-artifact-bar .copy:hover { background: var(--vio); color: #1a1205; }
.rx-artifact-bar .copy.copied { background: color-mix(in srgb, var(--vio) 24%, transparent); color: var(--vio-2); }
.rx-pre { margin: 0; background: var(--bg); border-radius: 0; }
.rx-params { margin-top: 12px; }

/* Live demo — sandboxed HF iframe (9:16 constrained) + before/after media. */
.rx-demo-frame { width: 100%; max-width: 320px; border-radius: 14px; overflow: hidden;
  background: #050506; box-shadow: 0 14px 36px rgba(0,0,0,0.4); }
.rx-iframe { display: block; width: 100%; height: 100%; border: 0; background: #050506; }
.rx-ba { max-width: 640px; }
.rx-demo-single { max-width: 360px; }
.rx-bap { position: relative; border-radius: 12px; overflow: hidden; background: #050506; }
.rx-bap .tag { position: absolute; top: 8px; left: 8px; z-index: 4; font-family: var(--font-mono);
  font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2);
  background: color-mix(in srgb, var(--bg) 70%, transparent); padding: 3px 8px; border-radius: 999px;
  backdrop-filter: blur(4px); }
/* The recipe demo media now renders through <Media> (#088) — it owns the box
   sizing + contain + cinema bars. The old native `.rx-media` rule is retired. */

/* ── Asset detail (#085) — real player by sub (audio / image / video) ───────── */
.am-audio-stack { display: flex; flex-direction: column; gap: 12px; }

/* ── Designed audio player (#091) — replaces the native <audio controls>.
   Pure-black surface (bg-tint, no borders), single --vio accent. The hidden
   <audio> element is the engine; this is just designed chrome. ─────────────── */
.ap-root { display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border-radius: 14px; background: var(--bg-2);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.4), inset 0 1px 0 rgb(255 255 255 / 0.02); }
.ap-root:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--vio); }

.ap-toggle { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 999px;
  display: grid; place-items: center; cursor: pointer; color: var(--bg);
  background: var(--vio); transition: background .15s ease, transform .08s ease; }
.ap-toggle:hover { background: var(--vio-2); }
.ap-toggle:active { transform: scale(0.94); }
.ap-toggle:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg-2), 0 0 0 4px var(--vio); }

.ap-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ap-topline { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ap-name { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-time { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3);
  flex: 0 0 auto; font-variant-numeric: tabular-nums; }

.ap-bar { position: relative; height: 16px; cursor: pointer; touch-action: none;
  display: flex; align-items: center; }
.ap-bar::before { content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 8px; transform: translateY(-50%); border-radius: 999px; background: var(--bg-4); }
/* Decorative static "waveform-ish" texture inside the track — CSS gradient
   only, no audio analysis. Faint vertical ticks suggesting a waveform. */
.ap-wave { position: absolute; left: 0; right: 0; top: 50%; height: 8px;
  transform: translateY(-50%); border-radius: 999px; overflow: hidden;
  background-image: repeating-linear-gradient(90deg,
    rgb(255 255 255 / 0.07) 0 2px, transparent 2px 6px); opacity: 0.8; }
.ap-fill { position: absolute; left: 0; top: 50%; height: 8px; transform: translateY(-50%);
  border-radius: 999px; background: var(--vio); pointer-events: none; }
.ap-thumb { position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 999px;
  background: var(--vio); transform: translate(-50%, -50%); pointer-events: none;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.5); opacity: 0; transition: opacity .12s ease; }
.ap-bar:hover .ap-thumb, .ap-bar:focus-visible .ap-thumb, .ap-bar.is-scrubbing .ap-thumb { opacity: 1; }
.ap-bar:focus-visible { outline: none; }
.ap-bar:focus-visible::before { box-shadow: 0 0 0 2px var(--vio); }

.ap-audio-hidden { display: none; }
.am-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
/* Each cell just rounds + clips; the inner <Media> (#088) owns aspect, fit, the
   cinema-bar fill, and the click-to-lightbox. The old per-cell sizing (4/3 cell,
   cover media, single-ref contain max-height:360px) folded INTO <Media> via its
   displayAspect / fit / maxHeight props. */
.am-item { border-radius: 12px; overflow: hidden; }
/* Single ref: a left-aligned max-content column so the capped contain preview
   doesn't stretch to a full grid track. */
.am-grid-single { grid-template-columns: minmax(0, max-content); justify-content: start; }

/* ── Tag chips (#084) — feed-filter links, distinct from block chips ────────── */
/* Square-cornered, low-chroma, no glyph/open-arrow — reads as "filter the feed",
   not "open a block page" (the .bchip pills above are pill-shaped + glyphed). */
.tagchip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 7px;
  background: var(--bg-2); color: var(--ink-3); font-family: var(--font-mono); font-size: 11.5px;
  text-decoration: none; transition: background .16s, color .16s, transform .16s; }
.tagchip:hover { background: var(--bg-3); color: var(--ink); transform: translateY(-1px); }
.tagchip .tagchip-hash { color: var(--mute-2); }
.tagchip:hover .tagchip-hash { color: var(--vio-2); }
/* Small variant — the tile ingredient ribbon (matches .bchip.sm sizing). */
.tagchip.sm { padding: 3px 9px 3px 8px; font-size: 11.5px; }

/* ── Main-feed tag cloud (#093) ──────────────────────────────────────────────
   Counted, count-sorted tag chips under the format cards. Chips are <button>s
   (client-side ?tag= toggle), so reset native button chrome. No borders — the
   active chip carries the accent fill; the count rides a deeper bg-tint pill. */
.tagcloud { display: flex; flex-wrap: wrap; gap: 7px; align-items: center;
  margin: 14px 0 20px; }
.tagcloud .tagchip { border: 0; cursor: pointer; appearance: none; }
.tagchip .tagchip-count { color: var(--mute-2); font-variant-numeric: tabular-nums;
  margin-left: 1px; }
.tagchip:hover .tagchip-count { color: var(--ink-3); }
.tagchip.active { background: var(--vio); color: var(--vio-ink); }
.tagchip.active .tagchip-hash,
.tagchip.active .tagchip-count { color: var(--vio-ink); opacity: .82; }
.tagcloud-more { border: 0; cursor: pointer; appearance: none; background: transparent;
  color: var(--vio); font-family: var(--font-mono); font-size: 11px; letter-spacing: .05em;
  text-transform: uppercase; padding: 4px 6px; transition: color .16s; }
.tagcloud-more:hover { color: var(--vio-2); }

/* ── Shared <Media> (#088) — single image/video renderer ─────────────────────
   ONE aspect-locked box used everywhere a picture/video appears. The box's own
   background is the CINEMA-BAR fill (a deep media-void tint, NOT a border):
   with object-fit:contain the media shows whole and the box background shows
   through wherever contain leaves a gap — pillarbox (L/R) when the media is
   taller than the slot, letterbox (T/B) when it is wider. fit:cover crops to
   fill (the masonry tile cells / contact sheets). No native-dimension rendering
   — the inner media is absolutely positioned and sized 100% of this box.
   Supersedes the per-page caps (.am-grid single-ref max-height, .rx-media
   native width, .stage-media 70vh) — those now flow through the maxHeight /
   displayAspect props. */
.media-box { position: relative; overflow: hidden; border-radius: inherit;
  background: #050506; display: block; }
/* The inner element (next/image renders its own positioned <img>; the plain
   <img>/<video> get pinned here). object-fit is set inline per call. */
.media-box .media-el { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.media-box > img { object-fit: inherit; }
/* Tile cell variant: the host box (.ph wrapper / .ph-cells .c / .ph-stack .s /
   carousel inset) already controls the slot shape, so the cell FILLS it exactly
   and drops its own aspect-lock — cover crops within the host (the masonry /
   Pinterest look). */
.media-cell { width: 100% !important; height: 100% !important; aspect-ratio: auto !important;
  margin-inline: 0 !important; max-height: none !important; }
/* Trigger variant — the whole box is a zoom-in button (no border, no padding). */
.media-trigger { padding: 0; border: 0; cursor: zoom-in; width: 100%; text-align: left;
  appearance: none; color: inherit; font: inherit; transition: transform .18s; }
.media-trigger:hover { transform: translateY(-1px); }

/* Lightbox stage — shadcn Dialog content, stripped to a viewport-capped media
   void. No card chrome: separation is the dark stage + the dialog's own shadow
   (no border). */
.media-lb-content { max-width: min(94vw, 1200px) !important; width: auto !important;
  padding: 0 !important; background: transparent !important; box-shadow: none !important;
  gap: 0 !important; }
.media-lb-stage { position: relative; display: grid; place-items: center;
  width: min(94vw, 1200px); max-height: 88vh; border-radius: 14px; overflow: hidden;
  background: #050506; }
.media-lb-stage.is-checker { background: var(--bg-2); padding: 30px; border-radius: 18px; }
.media-lb-stage.is-checker .media-lb-el { max-height: 70vh; }
/* The large media: whole, contained, capped to viewport — never native size. */
.media-lb-stage .media-lb-el { display: block; max-width: min(94vw, 1200px);
  max-height: 88vh; width: auto; height: auto; object-fit: contain; }

/* ══ Media-first "Visual Feed" card (#100) ══════════════════════════════
   The /library masonry card. Resting state = real media (via UnitMediaShape
   feed) + an icon-only format badge + a one-line caption. Hover/focus-within
   reveals the recipe overlay (eyebrow + genome + Template/look chips + Open /
   Remix actions) over a bottom scrim. Ported pixel-accurately from the design
   handoff's visual-feed.css + cards.css, scoped to live inside the existing JS
   masonry column (.mcol): the column gap comes from each card's margin-bottom
   (matching .utile), NOT from a CSS `columns` rule. --hue is the format hue,
   passed inline by FeedCard. No visible borders (the badge inset ring is an
   inset highlight, not a 1px solid border). */

.gcard { position: relative; break-inside: avoid; margin-bottom: 18px; width: 100%;
  cursor: pointer; color: inherit; }

.gmedia { position: relative; border-radius: 18px; overflow: hidden; isolation: isolate;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.3); transition: box-shadow .22s, transform .22s; }
.gcard:hover .gmedia, .gcard:focus-within .gmedia {
  box-shadow: 0 18px 46px rgb(0 0 0 / 0.5); transform: translateY(-3px); }
/* The real media (.ph) is the zoom target — scale it on hover. */
.gmedia .ph { border-radius: 0; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.gcard:hover .gmedia .ph { transform: scale(1.045); }

/* icon-only type badge — the format glyph carries the type, no words */
.gbadge { position: absolute; top: 10px; left: 10px; z-index: 4; width: 30px; height: 30px;
  border-radius: 9px; display: grid; place-items: center; font-family: var(--font-display);
  font-size: 15px; line-height: 1; color: var(--hue); background: rgb(8 8 9 / 0.46);
  backdrop-filter: blur(7px); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.09);
  transition: opacity .2s; pointer-events: none; }
.gcard:hover .gbadge, .gcard:focus-within .gbadge { opacity: 0; }

/* centered play affordance for video + motion-design */
.gplay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 4;
  width: 48px; height: 48px; border-radius: 999px; display: grid; place-items: center;
  background: color-mix(in oklch, var(--hue) 38%, var(--bg)); color: var(--ink);
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.4); pointer-events: none; transition: opacity .2s; }
.gcard:hover .gplay, .gcard:focus-within .gplay { opacity: 0; }

/* hover detail overlay (the recipe panel) */
.gover { position: absolute; inset: 0; z-index: 3; opacity: 0; pointer-events: none;
  transition: opacity .2s;
  background: linear-gradient(to top, rgb(8 8 9 / 0.95) 0%, rgb(8 8 9 / 0.62) 28%,
    rgb(8 8 9 / 0.12) 52%, transparent 66%); }
.gcard:hover .gover, .gcard:focus-within .gover { opacity: 1; pointer-events: auto; }

.gover-actions { position: absolute; top: 10px; right: 10px; z-index: 5; display: flex; gap: 7px;
  transform: translateY(-5px); transition: transform .22s; }
.gcard:hover .gover-actions, .gcard:focus-within .gover-actions { transform: none; }

.gover-info { position: absolute; left: 14px; right: 14px; bottom: 13px; display: flex;
  flex-direction: column; gap: 9px; transform: translateY(7px); transition: transform .22s; }
.gcard:hover .gover-info, .gcard:focus-within .gover-info { transform: none; }
.gover-eye { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em;
  text-transform: uppercase; display: inline-flex; align-items: center; gap: 7px; color: var(--hue); }
.gover-eye .dot { width: 7px; height: 7px; border-radius: 2px; background: currentColor; flex-shrink: 0; }
.gover-eye .ct { color: var(--ink-3); }
.gover-info .vc-genome { background: rgb(245 245 244 / 0.09); align-self: flex-start; }
.gnames { display: flex; flex-wrap: wrap; gap: 6px; }

/* action pill buttons (top-right of the overlay) */
.va { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; padding: 7px 11px;
  border-radius: 999px; border: 0; cursor: pointer; line-height: 1; white-space: nowrap;
  text-decoration: none; }
.va.open { background: rgb(245 245 244 / 0.92); color: var(--bg); backdrop-filter: blur(6px); }
.va.open:hover { background: #fff; }
.va.remix { background: var(--vio); color: #1a1205; }
.va.remix:hover { background: var(--vio-2); }

/* one-line caption */
.gcap { display: flex; align-items: center; gap: 8px; padding: 9px 5px 2px; min-width: 0; }
.gcap .cdot { width: 7px; height: 7px; border-radius: 2px; background: var(--hue); flex-shrink: 0; }
.gcap .t { font-family: var(--font-display); font-weight: 700; font-size: 14px;
  letter-spacing: -0.005em; color: var(--ink-3); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; transition: color .18s; text-decoration: none; min-width: 0; }
.gcard:hover .gcap .t, .gcard:focus-within .gcap .t { color: var(--ink); }
/* stretched-link: the title link's ::after covers the whole card so the card
   surface is clickable while staying a single valid <a> (the overlay's Open
   link + Remix button sit above it via their own z-index). */
.gcard-link::after { content: ""; position: absolute; inset: 0; z-index: 2; }

/* genome (ingredient fingerprint) — glyph segments on a faint pill */
.vc-genome { display: flex; align-items: center; gap: 0; flex-wrap: wrap; row-gap: 6px;
  padding: 7px 4px; border-radius: 11px; background: rgb(245 245 244 / 0.035); }
.vc-gseg { display: inline-flex; align-items: center; gap: 5px; padding: 0 9px; }
.vc-gseg + .vc-gseg { box-shadow: inset 1px 0 0 rgb(245 245 244 / 0.09); }
.vc-gly { font-family: var(--font-display); font-size: 14px; line-height: 1; }
.vc-gly.fmt { color: var(--hue); }
.vc-gly.blk { color: var(--block-ink); }
.vc-gcount { font-family: var(--font-mono); font-size: 10.5px; color: var(--mute); margin-left: 1px; }

/* honor reduced motion — neutralize the zoom / lift / slide / fades */
@media (prefers-reduced-motion: reduce) {
  .gmedia, .gmedia .ph, .gbadge, .gplay, .gover, .gover-actions, .gover-info, .gcap .t {
    transition: none !important; }
  .gcard:hover .gmedia, .gcard:focus-within .gmedia { transform: none; }
  .gcard:hover .gmedia .ph { transform: none; }
}
