/* ==========================================================================
   EXHIBIT — the print held up to the lamp
   ========================================================================== */
#exhibit { position: fixed; inset: 0; z-index: 50; pointer-events: none; visibility: hidden; }
#exhibit.is-active { pointer-events: auto; visibility: visible; }
.ex-backdrop { position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(ellipse 70% 65% at 50% 46%, rgba(14, 10, 8, .6), rgba(5, 4, 3, .9));
  will-change: opacity; } /* a plain dim: a live blur of the whole board had to be redone every frame */
.ex-stage { position: absolute; inset: 0; overflow: hidden; }
.ex-set { position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  transition: translate .42s var(--ease-out), opacity .3s var(--ease-out); }
.ex-set.is-leaving-l { translate: -90px 0; opacity: 0; pointer-events: none; }
.ex-set.is-leaving-r { translate: 90px 0; opacity: 0; pointer-events: none; }
.ex-set.is-entering-r { translate: 90px 0; opacity: 0; transition: none; }
.ex-set.is-entering-l { translate: -90px 0; opacity: 0; transition: none; }

/* ---------------- the print ---------------- */
.ex-card { position: absolute; left: 0; top: 0; z-index: 3; border-radius: 2px; outline: none; touch-action: none; will-change: transform; transform-origin: 50% 50%;
  --b: 14px; --cap: 66px; --w: 260px; --lift: 1; /* fixed: the lift reads through the scale */
  background-color: #f4f0e6;
  background-image: linear-gradient(176deg, rgba(255, 255, 255, .6), rgba(255, 255, 255, 0) 30%, rgba(90, 70, 40, 0) 75%, rgba(90, 70, 40, .1)), var(--tex);
  background-size: 100% 100%, 340px; background-blend-mode: normal, multiply;
  box-shadow: 0 1px 1.5px rgba(28, 14, 4, .5), inset 0 0 0 .5px rgba(70, 50, 25, .2),
    0 calc(30px * var(--lift)) calc(60px * var(--lift)) calc(-12px * var(--lift)) rgba(0, 0, 0, .6),
    0 calc(70px * var(--lift)) calc(120px * var(--lift)) calc(-30px * var(--lift)) rgba(0, 0, 0, .55); }
.ex-card::after { /* a print held near a lamp — warm glare on the coating */
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; mix-blend-mode: soft-light; opacity: calc(var(--lift) * .8);
  background: radial-gradient(ellipse 80% 60% at 30% 0%, rgba(255, 236, 200, .55), transparent 60%); }
.ex-media { position: absolute; left: var(--b); top: var(--b); right: var(--b); bottom: var(--cap); overflow: hidden; background: #15100c; cursor: inherit; }
.ex-media::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 22px rgba(0, 0, 0, .5), inset 0 0 2px rgba(0, 0, 0, .7); }
/* the print is cut to the work's shape, so it fills edge to edge; "contain" only shows on an odd-sized plate in a carousel */
.ex-media img, .ex-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; background: #0f0c0a; transition: opacity .16s; }
.ex-media.is-swap > :not(.ex-sheen) { opacity: 0; }
/* carousel: one strip of plates slid as a whole (compositor-only); images are shown whole, never cropped */
.ex-strip { position: absolute; inset: 0; display: flex; transition: transform var(--dur-card) var(--ease-card); will-change: transform; }
.ex-slide { position: relative; flex: none; width: 100%; height: 100%; background: #0f0c0a; overflow: hidden; }
.ex-media .ex-slide img, .ex-media .ex-slide video { object-fit: contain; }
/* a very tall plate (a whole landing page) fills the width and scrolls inside the print */
.ex-slide.is-long { overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; scrollbar-width: thin; scrollbar-color: rgba(210, 58, 47, .75) rgba(0, 0, 0, .25); }
.ex-media .ex-slide.is-long img { position: static; height: auto; object-fit: initial; }
.has-cursor body .ex-slide.is-long img { cursor: grab; } .has-cursor body .is-grabbing .ex-slide.is-long img { cursor: grabbing; }
.ex-scrollhint { position: absolute; z-index: 4; right: 16px; bottom: 14px; font-size: 28px; line-height: 1; color: #f6ecd4; text-shadow: 0 2px 8px rgba(0, 0, 0, .85);
  opacity: 0; pointer-events: none; transform: rotate(-5deg); transition: opacity .35s; }
.ex-set.is-long:not(.has-scrolled) .ex-scrollhint { opacity: .95; animation: nudge 1.8s var(--ease-out) infinite; }
@keyframes nudge { 0%, 100% { translate: 0 0; } 45% { translate: 0 6px; } }
/* the scrub line along the bottom edge of the print */
.ex-bar { position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; height: 24px; touch-action: none; opacity: .8; transition: opacity .2s; }
.ex-bar::before, .ex-bar-fill { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; transition: height .15s var(--ease-out); }
.ex-bar::before { background: rgba(240, 228, 205, .22); }
.ex-bar-fill { background: #d23a2f; transform-origin: 0 50%; transform: scaleX(0); box-shadow: 0 0 6px rgba(210, 58, 47, .6); }
.ex-card:hover .ex-bar, .ex-bar.is-drag { opacity: 1; }
.ex-bar:hover::before, .ex-bar:hover .ex-bar-fill, .ex-bar.is-drag::before, .ex-bar.is-drag .ex-bar-fill { height: 8px; }
.ex-set:not(.has-vid) .ex-bar { display: none; }
.ex-zone { position: absolute; z-index: 3; top: 0; bottom: 0; width: 30%; }
.ex-zone--prev { left: 0; } .ex-zone--next { right: 0; }
.has-cursor body .ex-zone--prev { cursor: var(--cur-prev, w-resize); } .has-cursor body .ex-zone--next { cursor: var(--cur-next, e-resize); }
.ex-zone::after { content: ""; position: absolute; top: 50%; width: 34px; height: 34px; margin-top: -17px; opacity: 0; transition: opacity .2s;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cg fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 16.6C11 15.6 18 16.2 26 16M19.5 9.5C22.5 12.3 24.8 14.2 27 16 24.8 18 22.4 19.9 19.6 22.8' stroke='%23f1e4cc' stroke-opacity='.8' stroke-width='6'/%3E%3Cpath d='M4.5 16.6C11 15.6 18 16.2 26 16M19.5 9.5C22.5 12.3 24.8 14.2 27 16 24.8 18 22.4 19.9 19.6 22.8' stroke='%23b3261e' stroke-width='3.4'/%3E%3C/g%3E%3C/svg%3E"); }
.ex-zone--prev::after { left: 14px; transform: scaleX(-1); } .ex-zone--next::after { right: 14px; }
.ex-card:hover .ex-zone::after { opacity: .9; }
@media (pointer: coarse) { .ex-zone::after { opacity: .7; } }
.ex-plate-no { position: absolute; right: calc(var(--b) + 2px); top: calc(100% - var(--cap) + var(--cap) * .14); font-size: max(7px, calc(var(--w) * .0145)); letter-spacing: .12em; color: #6b5a45; opacity: .75; }
.ex-sheen { position: absolute; inset: -20%; pointer-events: none; mix-blend-mode: screen; z-index: 2;
  background: linear-gradient(112deg, transparent 40%, rgba(255, 250, 235, .14) 48%, transparent 58%);
  transform: translateX(calc(-30% + var(--lift) * 40%)); }
.ex-empty { position: absolute; inset: 0; background: radial-gradient(circle at 40% 32%, rgba(214, 186, 146, .3), transparent 60%), linear-gradient(168deg, var(--ta), var(--tb)); transition: background .3s; }
.ex-empty::before { content: ""; position: absolute; inset: -20%; background: url("../assets/textures/grain.webp"); opacity: .55; mix-blend-mode: overlay; }
.ex-empty.is-reel::before { animation: grain .5s steps(4) infinite; }
.ex-empty.is-reel::after { /* projector flicker */
  content: ""; position: absolute; inset: 0; background: rgba(255, 230, 190, .06); animation: flicker 2.4s infinite steps(1); }
.is-paused .ex-empty::before, .is-paused .ex-empty::after { animation-play-state: paused; }
.ex-empty-note { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: max(9px, calc(var(--w) * .014)); letter-spacing: .16em; color: rgba(240, 225, 200, .55); white-space: nowrap; opacity: var(--lift); }
@keyframes flicker { 0% { opacity: 1; } 7% { opacity: .2; } 9% { opacity: 1; } 51% { opacity: .5; } 53% { opacity: 1; } 80% { opacity: .7; } }
.ex-caption { position: absolute; left: var(--b); right: var(--b); bottom: 0; height: var(--cap); margin: 0; display: flex; align-items: center; justify-content: center;
  font-size: calc(var(--cap) * .44); line-height: 1; white-space: nowrap; overflow: hidden; }
.ex-no { position: absolute; right: calc(var(--b) + 2px); bottom: calc(var(--cap) * .12); font-size: max(7px, calc(var(--w) * .0145)); font-weight: 400; letter-spacing: .12em; color: #6b5a45; opacity: .75; }
.is-paused .ex-media::before { content: ""; position: absolute; z-index: 3; left: 50%; top: 50%; width: 46px; height: 54px; transform: translate(-50%, -50%);
  border-left: 14px solid rgba(240, 228, 205, .85); border-right: 14px solid rgba(240, 228, 205, .85); box-sizing: border-box; filter: url(#rough); }

/* ---------------- the report ---------------- */
.ex-sheet { position: absolute; z-index: 2; inset: auto; padding: 26px 30px 70px 74px; opacity: 0;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .4), 4px 18px 22px rgba(0, 0, 0, .45); /* rectangle: cheaper than a filter */
  transform: translateX(-46%) rotate(0deg);
  transition: transform var(--dur-card) var(--ease-card), opacity .25s var(--ease-out); }
.ex-sheet::before, .ex-sheet::after { pointer-events: none; }
.is-open .ex-sheet { opacity: 1; transform: translateX(0) rotate(1.4deg); }
.ex-k { font-size: 10.5px; line-height: 1.35; letter-spacing: .05em; margin: 0 0 6px; padding-right: 64px; } /* clear of the evidence tag */
.ex-title { font-size: 26px; line-height: 1.15; margin: 0 0 8px; padding-right: 48px; }
.ex-rows { display: grid; grid-template-columns: 78px 1fr; row-gap: 7px; margin: 14px 0 16px; }
.ex-rows dt { font-size: 11.5px; letter-spacing: .08em; color: var(--ink-soft); padding-top: 2px; }
.ex-rows dd { margin: 0; font-size: 14px; line-height: 1.3; }
.ex-label { font-size: 11.5px; letter-spacing: .08em; color: var(--ink-soft); margin: 14px 0 4px; }
.ex-brief { font-size: 14.5px; line-height: 1.5; margin: 0; }
.ex-stamp { position: absolute; right: 22px; bottom: 20px; transform: rotate(-8deg) scale(1.6); opacity: 0; transition: transform .45s var(--ease-out) .5s, opacity .2s .5s; }
.is-open .ex-stamp { transform: rotate(-8deg) scale(1); opacity: .8; }
.ex-set:not(.has-vid) .ex-deck { display: none; }
.ex-deck-row { display: flex; align-items: center; gap: 8px; }
.ex-pp, .ex-mute { flex: none; width: 32px; height: 32px; padding: 4px; margin-left: -4px; border: 0; background: none; color: var(--marker); border-radius: 50%; transition: transform var(--dur-hover) var(--ease-hover); }
.ex-pp:hover, .ex-mute:hover { transform: scale(1.12) rotate(-4deg); }
.ex-pp:active, .ex-mute:active { transform: scale(.92); }
.ex-pp svg, .ex-mute svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ex-pp svg + svg { display: none; }
.is-paused .ex-pp svg:first-child { display: none; }
.is-paused .ex-pp svg + svg { display: block; fill: currentColor; fill-opacity: .85; }
.ex-mute .spk-body { fill: currentColor; fill-opacity: .85; } .ex-mute .spk-x { display: none; }
.is-muted .ex-mute .spk-w1, .is-muted .ex-mute .spk-w2 { display: none; } .is-muted .ex-mute .spk-x { display: block; }
.ex-track, .ex-vtrack { position: relative; flex: 1; height: 30px; touch-action: none; outline: none; }
.ex-vtrack { flex: 0 1 130px; }
.has-cursor body :is(.ex-track, .ex-vtrack, .ex-bar), .has-cursor body :is(.ex-track, .ex-vtrack, .ex-bar) * { cursor: col-resize; }
.ex-tc { flex: none; min-width: 86px; text-align: right; font-size: 11px; letter-spacing: .08em; color: var(--ink-soft); }
.ex-vno { font-size: 10px; letter-spacing: .14em; color: var(--ink-soft); }
.ex-line { position: absolute; left: 0; right: 0; top: 14px; height: 1.6px; background: #3a3128; opacity: .55; }
.ex-fill, .ex-vfill { position: absolute; left: 0; right: 0; top: 12px; height: 5px; background: var(--marker); opacity: .6; transform-origin: 0 50%; transform: scaleX(var(--f, 0)); border-radius: 3px; }
.is-muted .ex-vfill { opacity: .18; }
.ex-knob { position: absolute; top: 5px; left: calc(var(--f, 0) * 100%); width: 5px; height: 20px; margin-left: -2.5px; background: var(--marker); border-radius: 2px; transform: rotate(8deg); transition: transform var(--dur-hover) var(--ease-hover); }
.ex-track:hover .ex-knob, .ex-vtrack:hover .ex-knob, .is-drag .ex-knob, :focus-visible > .ex-knob { transform: rotate(8deg) scale(1.3); }
:focus-visible > .ex-line { outline: 1px dashed var(--marker); outline-offset: 6px; }
.ex-play { display: block; text-align: right; font-size: 19px; opacity: .65; margin-top: 2px; }
.ex-plates { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.ex-plates.is-many { gap: 7px 6px; }
.ex-plates.is-many .ex-plate { width: 44px; height: 52px; padding: 4px 4px 10px; }
.ex-plate { position: relative; }
.ex-plate.is-on { box-shadow: 0 0 0 2px var(--marker), 1px 4px 6px rgba(0, 0, 0, .25); }
.ex-plate-play { position: absolute; left: 50%; top: 42%; width: 0; height: 0; margin: -7px 0 0 -5px; border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent rgba(244, 240, 230, .92); filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.ex-leaf { display: block; margin-top: 8px; font-size: 19px; opacity: .65; line-height: 1.1; }
.ex-plate { display: block; width: 62px; height: 70px; padding: 5px 5px 13px; background: #f4f0e6; box-shadow: 0 1px 1px rgba(0, 0, 0, .35), 1px 4px 6px rgba(0, 0, 0, .25);
  transform: rotate(calc((var(--i, 0) - 1) * 3deg)); transition: transform var(--dur-hover) var(--ease-hover); }
.ex-plate:nth-child(1) { --i: 0; } .ex-plate:nth-child(2) { --i: 1.6; } .ex-plate:nth-child(3) { --i: .4; } .ex-plate:nth-child(4) { --i: 2.2; }
.ex-plate:hover, .ex-plate.is-on { transform: translateY(-4px) rotate(0deg); }
.ex-plate img, .ex-plate i { display: block; width: 100%; height: 100%; object-fit: cover; background: radial-gradient(circle at 40% 30%, rgba(214, 186, 146, .3), transparent 60%), linear-gradient(168deg, var(--ta), var(--tb)); }

/* a long report on a short screen: the same sheet, set a little closer */
.ex-sheet.is-tight { padding-top: 20px; padding-bottom: 56px; }
.is-tight .ex-rows { margin: 10px 0 10px; row-gap: 4px; }
.is-tight .ex-label { margin-top: 10px; }
.is-tight .ex-brief { font-size: 13.5px; line-height: 1.42; }
.is-tight .ex-plates.is-many { gap: 5px; }
.is-tight .ex-plates.is-many .ex-plate { width: 38px; height: 45px; padding: 3px 3px 8px; }
.is-tight .ex-leaf, .is-tight .ex-play { font-size: 17px; margin-top: 4px; }

/* ---------------- tag + sticky ---------------- */
.ex-tag { position: absolute; z-index: 4; width: 0; height: 0; transform-origin: 0 0; transform: rotate(-58deg); opacity: 0;
  transition: transform var(--dur-pendulum) var(--ease-pendulum), opacity .2s; }
.is-open .ex-tag { transform: rotate(-11deg); opacity: 1; transition-delay: .18s; }
.ex-tag::before { /* the brass eyelet it hangs from */
  content: ""; position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff0b8, #c49a3a 50%, #4e360b); box-shadow: 1px 3px 4px rgba(0, 0, 0, .5); }
.ex-string { position: absolute; left: -1px; top: 0; width: 2px; height: 58px; background: linear-gradient(90deg, #cdbb94, #f1e6c8 50%, #a8956d); box-shadow: 2px 4px 4px rgba(0, 0, 0, .3); }
.ex-tag-body { position: absolute; left: -62px; top: 52px; width: 124px; height: 74px; padding: 26px 10px 0; text-align: center;
  clip-path: polygon(24px 0, calc(100% - 24px) 0, 100% 22px, 100% 100%, 0 100%, 0 22px);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .3)); box-shadow: 0 0 0 1px rgba(120, 80, 30, .12) inset; }
.ex-tag-body .tag-ring { left: 50px; top: 4px; } .ex-tag-body .tag-hole { left: 57px; top: 11px; }
.ex-tag-body span { display: block; font-size: 9px; letter-spacing: .2em; color: #7a2a22; }
.ex-tag-body b { display: block; font-weight: 400; font-size: 24px; line-height: 1.1; }
.ex-sticky { position: absolute; z-index: 5; transform: translateY(40px) rotate(calc(var(--r, 4deg) + 10deg)) scale(1.06); opacity: 0;
  transition: transform var(--dur-hover) var(--ease-hover), opacity .2s; --r: 4deg; }
.is-open .ex-sticky { transform: rotate(var(--r)); opacity: 1; transition-delay: .32s; }
.ex-sticky .sticky-text { font-size: 28px; }

/* ---------------- hints (written straight on the board, not UI) ---------------- */
.ex-hints { position: absolute; inset: 0; pointer-events: none; z-index: 6; opacity: 0; transition: opacity .4s .5s; }
#exhibit.is-active .ex-hints.is-on { opacity: 1; }
.ex-hints.is-crowded .ex-hint { display: none; }
.ex-hint { position: absolute; right: 30px; top: 12px; text-align: right; transform: rotate(1.5deg); font: 400 24px/.95 "Reenie Beanie", cursive; color: #efe2c6; opacity: .72; white-space: nowrap; text-shadow: 0 2px 6px rgba(0, 0, 0, .6); }
.ex-nav { position: absolute; top: 50%; pointer-events: auto; font: 700 30px/1 "Caveat", cursive; color: #f0e3c7; opacity: .7; text-shadow: 0 2px 6px rgba(0, 0, 0, .6); transition: opacity .2s, translate var(--dur-hover) var(--ease-hover); padding: 14px; }
.ex-nav:hover { opacity: 1; }
.ex-nav--prev { left: 14px; transform: translateY(-50%) rotate(-4deg); }
.ex-nav--next { right: 14px; transform: translateY(-50%) rotate(3deg); }
.ex-nav--prev:hover { translate: -4px 0; } .ex-nav--next:hover { translate: 4px 0; }
.ex-count { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); font: 700 11px "Courier Prime", monospace; letter-spacing: .2em; color: #e9dcbf; opacity: .55; }

/* ---------------- reduced motion: a plain cross-fade ---------------- */
#exhibit.is-reduced .ex-sheet, #exhibit.is-reduced .ex-tag, #exhibit.is-reduced .ex-sticky, #exhibit.is-reduced .ex-stamp { transition: opacity .25s !important; }
#exhibit.is-reduced .ex-card { animation: fadeIn .25s; }
@keyframes fadeIn { from { opacity: 0; } }

/* ---------------- phones ---------------- */
@media (max-width: 859px) {
  .ex-stage { overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; }
  .ex-set { height: auto; min-height: 100%; }
  .ex-sheet { padding: 26px 22px 70px; transform: translateY(-30px); }
  .is-open .ex-sheet { transform: translateY(0) rotate(.6deg); }
  .ex-nav { top: auto; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); font-size: 26px; position: fixed; padding: 6px 4px; }
  .has-badge .ex-nav { bottom: calc(60px + env(safe-area-inset-bottom, 0px)); } /* the host's badge sits bottom-right: turn the page above it */
  .ex-nav--prev { transform: rotate(-3deg); } .ex-nav--next { transform: rotate(3deg); }
  .ex-hint { display: none; }
  .ex-count { position: fixed; font-size: 9px; letter-spacing: .14em; white-space: nowrap; }
  .ex-hints::before { content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: calc(96px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(rgba(10, 5, 2, 0), rgba(10, 5, 2, .78) 45%, rgba(10, 5, 2, .94)); }
  .has-badge .ex-hints::before { height: calc(150px + env(safe-area-inset-bottom, 0px)); }
  .ex-k, .ex-title { padding-right: 0; } /* the tag hangs on the print here, not on the report */
  .ex-tag { scale: .74; }
}
@media (max-width: 379px) { .ex-sticky { scale: .8; transform-origin: 0 0; } } /* clear of the LOGGED stamp on a small phone */

/* phones: the sound control lives on the report, below the fold — so a typed slip sits on the film
   itself while it's muted. One tap: sound on, slip gone. */
.ex-unmute { display: none; position: absolute; left: 10px; top: 12px; z-index: 4; align-items: center; gap: 6px;
  padding: 7px 10px 6px 7px; border: 0; border-radius: 1px; color: #2a2119; background: #efe5cf;
  font: 700 10.5px/1 "Courier Prime", "Courier New", monospace; letter-spacing: .1em;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 4px 10px rgba(0, 0, 0, .5); transform: rotate(-2.5deg);
  animation: slip-in .5s var(--ease-card, ease-out) .9s both; }
.ex-unmute::before { content: ""; position: absolute; left: 50%; top: -5px; width: 26px; height: 10px; margin-left: -13px;
  background: rgba(214, 196, 150, .78); transform: rotate(4deg); } /* a bit of masking tape */
.ex-unmute svg { width: 17px; height: 17px; fill: none; stroke: var(--marker, #b3171b); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ex-unmute .spk-body { fill: var(--marker, #b3171b); fill-opacity: .85; } .ex-unmute .spk-w1, .ex-unmute .spk-w2 { display: none; }
.ex-unmute:active { transform: rotate(-2.5deg) scale(.94); }
@keyframes slip-in { from { opacity: 0; transform: translateY(-6px) rotate(-6deg); } }
@media (max-width: 859px), (pointer: coarse) { .has-vid.is-muted .ex-unmute { display: flex; } } /* only while a film is on the print */
@media (prefers-reduced-motion: reduce) { .ex-unmute { animation: none; } }
