/* dgovea.studio
   Desktop pages are a 1024x672 canvas scaled to fit the window, like the
   original Readymag build. Objects are placed from manifest.json values:
   --x/--y = centre offset from the canvas centre, --w/--h = box size,
   all in canvas px; --u converts canvas px to real px. */

:root {
  --highlight: #ffe311;
  --highlight-swipe: rgb(255 227 17 / 0.5);
  --nav-red: #c8102e;
  --card-paper: #ddbbc7;
  --card-heading: #6d5a9e;
  --card-ink: #5c0a43;
  --shadow-lifted: drop-shadow(6px 10px 10px rgb(0 0 0 / 0.35));
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

/* Behind the pages, which normally cover it: the current page's colour
   (data-page, kept up to date by js/pages.js), so the iOS bounce above Home
   and below AI Experiments matches the backdrop instead of showing black. */
body {
  background: var(--page-edge, #000);
  color: #111;
  font-family: Arial, Helvetica, sans-serif;
}

img { display: block; max-width: none; }

/* The page's scrollbar on desktop: mint neon on pale mint (Deanna's pick,
   option C of five greens, 2026-10-19). scrollbar-color for Chrome, Edge
   and Firefox; the ::-webkit-scrollbar rules for Safari, which ignores it. */
@media (pointer: fine) {
  html { scrollbar-color: #00ff9c #e3fff3; }
  ::-webkit-scrollbar { width: 12px; background: #e3fff3; }
  ::-webkit-scrollbar-thumb { background: #00ff9c; border: 3px solid #e3fff3; border-radius: 6px; }
  ::-webkit-scrollbar-thumb:hover { background: #00e08a; }
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Each page is a full-screen section; they're stacked in one scroll
   (see js/pages.js). */
.page {
  position: relative;
  height: 100svh;
  overflow: clip;
  display: grid;
  place-items: center;
}

/* Each page's colour, from its backdrop: shows only while a backdrop is
   still loading (fast scrolling) or where it doesn't reach. --page-edge is
   the body's colour while the page is current (see body). */
#home { background-color: #2060a0; }
#videos { background-color: #e4b3b5; }
#aiexperiments { background-color: #4584b6; }
html[data-page="home"] { --page-edge: #2e67a2; }       /* the top of Home's backdrop */
html[data-page="videos"] { --page-edge: #e4b3b5; }
html[data-page="aiexperiments"] { --page-edge: #4b7e1c; }  /* the grass at the bottom */

/* Full-bleed patterned background behind the board */
.backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stage {
  position: relative;
  width: min(100%, calc(100svh * 1024 / 672));   /* 100%, not 100vw: a scrollbar isn't page */
  aspect-ratio: 1024 / 672;
  container-type: size;
}

.obj {
  --u: calc(100cqw / 1024);
  position: absolute;
  left: calc(50cqw + (var(--x) - var(--w) / 2) * var(--u));
  top: calc(50cqh + (var(--y) - var(--h) / 2) * var(--u));
  width: calc(var(--w) * var(--u));
  height: calc(var(--h) * var(--u));
  rotate: var(--r, 0deg);
  z-index: calc(var(--z) - 300);
}

.obj > img, .obj > picture, .obj > picture > img { display: block; width: 100%; height: 100%; }

/* Drop shadow in canvas px, per element: --sx/--sy offset, --sb blur, --sc colour */
.shadow {
  filter: drop-shadow(calc(var(--sx) * var(--u)) calc(var(--sy) * var(--u)) calc(var(--sb) * var(--u)) var(--sc));
}

/* Handwritten notes and arrows overlap clickable things; let clicks through. */
.deco { pointer-events: none; }

/* Hover animations: a first-frame <img>, swapped for a sprite strip
   once it has loaded (see js/animations.js). */
.anim.is-ready {
  background-repeat: no-repeat;
  background-size: calc(var(--frames) * 100%) 100%;
  background-position-x: calc(var(--frame, 0) / (var(--frames) - 1) * 100%);
}
.anim.is-ready > img { opacity: 0; }

/* Hotspots: real links laid over lettering that is part of the artwork.
   --l/--t/--lw/--lh are canvas px relative to the parent object. The text
   is set like the live site's (Arial Bold 37/43) so the inline <span> box,
   and with it the highlighter stripe, sits where it does there. */
.hot {
  --u: calc(100cqw / 1024);
  position: absolute;
  left: calc(var(--l) * var(--u));
  top: calc(var(--t) * var(--u));
  width: calc(var(--lw) * var(--u));
  height: calc(var(--lh) * var(--u));
  color: transparent;
  font: bold calc(var(--fs, 37) * var(--u)) / calc(var(--lh) * var(--u)) Arial, Helvetica, sans-serif;
  white-space: nowrap;
  text-decoration: none;
}
/* Highlighter swipe: a 6px stripe of 50% yellow along the bottom of the text */
.hot:hover span, .hot:focus-visible span {
  background: linear-gradient(var(--highlight-swipe), var(--highlight-swipe)) 0 100% / 100% calc(6 * var(--u)) no-repeat;
}
.hot:focus-visible { outline: calc(2 * var(--u)) solid var(--card-heading); outline-offset: calc(2 * var(--u)); }

a.obj:focus-visible {
  outline: 2px solid var(--highlight);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Draggable stickers */
.sticker {
  translate: calc(var(--dx, 0) * var(--u)) calc(var(--dy, 0) * var(--u));
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition: scale 0.15s ease, filter 0.15s ease;
}
/* A shadow that fades in on hover (Readymag's "fade on hover"): the still
   stickers, the AI page's tape label. Same --sx/--sy/--sb/--sc as .shadow. */
.hover-shadow {
  --sx: 0; --sy: 1; --sb: 1; --sc: rgb(0 0 0 / 0.72);
  filter: drop-shadow(calc(var(--sx) * var(--u)) calc(var(--sy) * var(--u)) calc(var(--sb) * var(--u)) transparent);
  transition: filter 0.5s;
}
.hover-shadow:hover {
  filter: drop-shadow(calc(var(--sx) * var(--u)) calc(var(--sy) * var(--u)) calc(var(--sb) * var(--u)) var(--sc));
}
.sticker.hover-shadow { transition: scale 0.15s ease, filter 0.5s; }
.sticker.is-dragging, .sticker.is-dragging:hover {
  cursor: grabbing;
  scale: 1.08;
  filter: var(--shadow-lifted);
}

/* Contact card: real text laid over the printed text of the card artwork.
   The patch matches the card paper and feathers out at the edges. */
.contact-card {
  padding: calc(8 * var(--u)) 0 0 calc(8 * var(--u));
  background-color: var(--card-paper);
  /* Paper grain so the patch doesn't read as a flat box */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .35 0 0 0 0 .45 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: calc(40 * var(--u));
  --fade: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent),
          linear-gradient(transparent, #000 10%, #000 90%, transparent);
  mask-image: var(--fade);
  mask-composite: intersect;
  -webkit-mask-image: var(--fade);
  -webkit-mask-composite: source-in;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: bold;
  color: var(--card-ink);
  /* letterpress: text pressed into the paper */
  text-shadow: 0 calc(0.35 * var(--u)) 0 rgb(255 255 255 / 0.35);
}
.contact-card h2 {
  margin: 0 0 calc(7 * var(--u));
  font-size: calc(11 * var(--u));
  line-height: 1;
  font-weight: bold;
  letter-spacing: 0.12em;
  font-variant: small-caps;
  text-transform: lowercase;
  color: var(--card-heading);
}
.contact-card p {
  margin: 0;
  font-size: calc(6 * var(--u));
  line-height: 1.4;
}
.contact-card a { color: inherit; text-decoration: none; }
.contact-card a:hover, .contact-card a:focus-visible { background: var(--highlight); }
/* "copied!" after the email is copied (js/copy-email.js): pops in, then
   fades out */
.copied { opacity: 0; pointer-events: none; transition: opacity 0.6s ease 0.9s, scale 0.6s ease 0.9s; }
.copied.is-shown { opacity: 1; scale: 1.1; transition: opacity 0.1s ease, scale 0.25s cubic-bezier(0.3, 1.6, 0.5, 1); }
/* The poster's "email copied!": holds a little longer, then fades out gently */
.copied-slow { transition: opacity 1.5s ease 1.2s, scale 1.5s ease 1.2s; }

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

.contents { display: contents; }

/* ---- Videos page ---------------------------------------------------- */

/* Tablet slideshows (js/slideshow.js). Slides sit on top of each other and
   slide sideways; the GIF videos are fitted inside the screen ("contain"),
   so the tablet's own screen art shows around narrow ones, as on the live
   site. Arrows match the live Readymag ones. */
.slideshow .slides {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: calc(var(--radius) * var(--u));
}
.slideshow .slide {
  position: absolute;
  inset: 0;
  visibility: hidden;
}
.slideshow .slide.is-current,
.slideshow .slide.is-moving { visibility: visible; }
.slideshow .slide.is-moving {
  transition: translate 0.45s cubic-bezier(0.4, 0.24, 0.4, 1);
}
.slideshow video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.slideshow .arrow {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  width: calc(40 * var(--u));
  height: calc(40 * var(--u));
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(40 40 40 / 0.4);
  cursor: pointer;
}
.slideshow .arrow svg { display: block; width: 100%; height: 100%; }
.slideshow .arrow path {
  fill: none;
  stroke: #fff;
  stroke-width: 3px;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.slideshow .prev { left: calc(8 * var(--u)); }
.slideshow .next { right: calc(8 * var(--u)); }
.slideshow.no-arrow-bg .arrow { background: none; }
/* YouTube: both arrows in one pill, centred along the bottom */
.slideshow.arrows-bottom .arrows {
  position: absolute;
  left: 50%;
  bottom: calc(10 * var(--u));
  translate: -50% 0;
  display: flex;
  justify-content: space-between;
  width: calc(104 * var(--u));
  height: calc(40 * var(--u));
  border-radius: calc(20 * var(--u));
  background: rgb(40 40 40 / 0.4);
}
.slideshow.arrows-bottom .arrow {
  position: static;
  translate: none;
  background: none;
}
.slideshow .arrow:focus-visible,
.slideshow .slide:focus-visible {
  outline: calc(2 * var(--u)) solid var(--highlight);
  outline-offset: calc(-2 * var(--u));
}

/* Freelance thumbnails: a thin green outline on hover, as on the live site */
.thumb { border-radius: calc(5 * var(--u)); }
.thumb:hover, .thumb:focus-visible { outline: var(--u) solid #00ff6e; }

@media (prefers-reduced-motion: reduce) {
  .slideshow .slide.is-moving { transition: none; }
}

/* ---- AI Experiments page -------------------------------------------- */

.obj > video { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Muted loops (js/autoplay.js) sit over a still of their first frame and
   only show once they're really playing, so a loop that can't play (iPhone
   Low Power Mode, reduced motion, a slow connection) shows the still, never
   bare cork. iOS's play button over a blocked video is hidden. */
.obj > .loop-still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
video.autoplay { position: relative; opacity: 0; transition: opacity 0.3s; }
video.autoplay.is-playing { opacity: 1; }
video.autoplay::-webkit-media-controls-start-playback-button { display: none !important; -webkit-appearance: none; }
video.autoplay::-webkit-media-controls { display: none !important; }
.phone-screen { border-radius: calc(var(--radius) * var(--u)); overflow: hidden; }
.phone-screen:focus-visible { outline: calc(2 * var(--u)) solid var(--highlight); }
/* "Watch full clip" over the phone video, as on the live site: the video
   dims (black at 53%) and the words appear. With a mouse, on hover; on
   touch screens, for a moment when the phone first comes into view
   (.is-shown, js/touch-cues.js), fading out. */
.watch-cue {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgb(0 0 0 / 0.53);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
.watch-cue img { width: calc(144.57 * var(--u)); height: calc(23.71 * var(--u)); }
.phone-screen:focus-visible .watch-cue, .watch-cue.is-shown { opacity: 1; transition-duration: 0.2s; }
@media (hover: hover) {
  .phone-screen:hover .watch-cue { opacity: 1; transition-duration: 0.2s; }
}

/* The Instagram printout (AI Experiments): with a mouse it lifts a little
   off the board once the cursor settles on it (with its rustle, js/sound.js), peeling up from its top-left pin (a 1 degree
   tilt, a bigger, softer shadow), and the "soft.dream.ai" handle gets the
   poster nav's highlighter swipe. Touch screens get the swipe only. */
.handle-swipe {
  position: absolute;
  left: calc(var(--l) * var(--u));
  top: calc(var(--t) * var(--u));
  width: calc(var(--lw) * var(--u));
  height: calc(6 * var(--u));
  background: var(--highlight-swipe);
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.18s cubic-bezier(0.45, 0, 0.7, 0.6);
}
.printout:focus-visible .handle-swipe { transform: scaleX(1); }
/* Touch screens: drawn in once the printout is in view (js/touch-cues.js),
   a little slower so it's seen, after a beat */
.handle-swipe.is-shown {
  transform: scaleX(1);
  transition: transform 0.4s cubic-bezier(0.3, 0.6, 0.35, 1) 0.3s;
}
@media (hover: hover) and (min-width: 760px) {
  .printout {
    transform-origin: 10.79% 3.38%;   /* the top-left pin */
    transition: transform 0.35s cubic-bezier(0.3, 0.6, 0.35, 1), filter 0.35s ease;
  }
  /* Lifted once the cursor settles on it, with its rustle (js/sound.js) */
  .printout.is-lifted {
    transform: rotate(1deg);
    filter: drop-shadow(calc(5 * var(--u)) calc(8 * var(--u)) calc(12 * var(--u)) rgb(0 0 0 / 0.6));
  }
  .printout.is-lifted .handle-swipe {
    transform: scaleX(1);
    transition: transform 0.2s cubic-bezier(0.3, 0.6, 0.35, 1) 0.1s;
  }
}

/* ---- Folded bio notes (Videos role cards, Freelance banner) ----------

   Each strip and its note form a .group. At rest the note is folded in
   quarters (blank outside showing) and taped beside its strip. Hover,
   focus or a tap (js/reveal.js) unfolds it twice: the side flap opens,
   then the bottom half drops to reveal the text. An open group rises
   above its neighbours; the strip always stays above its own note, and
   sticky notes (z 450) stay above everything.

   js/reveal.js builds the paper: a quadrant that stays put (.q), a side
   flap (.flap-h, holding the other top quadrant and a bottom flap), and a
   bottom flap (.flap-v). Built for unfolding right and down, then mirrored
   for left/up (--sx/--sy); the text is mirrored back. */

:root {
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .35 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
  /* Opening: slide 0.2s, then each unfold 0.35s, back to back (~0.9s).
     Closing is quicker. Easing starts brisk and settles softly, like paper. */
  --slide: 0.2s cubic-bezier(0.25, 0.7, 0.35, 1);
  --fold-open: 0.35s cubic-bezier(0.3, 0.75, 0.25, 1);
  --fold-close: 0.24s cubic-bezier(0.45, 0, 0.7, 0.6);
}

.group { position: absolute; inset: 0; pointer-events: none; z-index: 15; }
.group > * { pointer-events: auto; }
.group.is-open { z-index: 100; }

/* The note's box is its full unfolded size, anchored at the corner that
   stays put (--ax/--ay); --ph (height) is measured by js/reveal.js. */
.bio {
  --u: calc(100cqw / 1024);
  --ph: 120;
  left: calc(50cqw + (var(--ax) - var(--ox, 0)) * var(--u));
  top: calc(50cqh + (var(--ay) - var(--oy, 0)) * var(--u));
  width: calc(var(--pw) * var(--u));
  height: calc(var(--ph) * var(--u));
  pointer-events: none;
}
.bio[data-h="left"] { --ox: var(--pw); --sx: -1; }
.bio[data-v="up"] { --oy: var(--ph); --sy: -1; }
.bio-text {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  overflow: hidden; clip-path: inset(50%); /* screen readers read this copy */
}

.paper {
  position: absolute;
  inset: 0;
  transform: scale(var(--sx, 1), var(--sy, 1));
}
.paper > *, .flap-h > .face > * { position: absolute; }
.q, .flap-v { left: 0; width: 50%; height: 50%; }
.q { top: 0; overflow: hidden; pointer-events: auto; }
.flap-v { top: 50%; transform-origin: 50% 0; transform-style: preserve-3d; }
.flap-h {
  left: 50%; top: 0; width: 50%; height: 100%;
  transform-origin: 0 50%;
  transform-style: preserve-3d;
}
.flap-h > .face.front > .flap-v { left: 0; width: 100%; }
.flap-h > .face.front > .q { width: 100%; }
.face { position: absolute; inset: 0; overflow: hidden; backface-visibility: hidden; pointer-events: auto; }
.flap-v > .face.back { transform: rotateX(180deg); }
.flap-h > .face.back { height: 50%; transform: rotateY(180deg); }

/* Folded: the bottom flaps up over the fixed quadrant, the side flap over both. */
.flap-h {
  transform: perspective(calc(400 * var(--u))) rotateY(-180deg);
  transition: transform var(--fold-close) 0.2s;           /* closing: second, then slide back */
}
.flap-v {
  transform: perspective(calc(400 * var(--u))) rotateX(180deg);
  transition: transform var(--fold-close);                 /* closing: first */
}
.group.is-open .flap-h {
  transform: perspective(calc(400 * var(--u))) rotateY(0deg);
  transition: transform var(--fold-open) 0.2s;             /* opening: after sliding out */
}
.group.is-open .flap-v {
  transform: perspective(calc(400 * var(--u))) rotateX(0deg);
  transition: transform var(--fold-open) 0.55s;            /* opening: last */
}

/* One sheet of paper, sliced into the faces: each face shows its part of
   a full-size block, so gradients and text line up across the folds. */
.sheet {
  position: absolute;
  width: calc(var(--pw) * var(--u));
  height: calc(var(--ph) * var(--u));
  transform: scale(var(--sx, 1), var(--sy, 1));   /* undo the paper's mirroring */
  /* --pl/--pr/--pt/--pb: wider on the side still tucked under the strip */
  padding: calc(var(--pt, 11) * var(--u)) calc(var(--pr, 12) * var(--u)) calc(var(--pb, 11) * var(--u)) calc(var(--pl, 12) * var(--u));
  font: calc(8.8 * var(--u)) / 1.42 "Helvetica Neue", Arial, sans-serif;
  color: #fff;
  background-color: var(--paper);
  background-image: var(--grain), var(--tint, none);
  background-size: calc(40 * var(--u)), 100% 100%;
  background-blend-mode: overlay, normal;
}
.sheet p { margin: 0; }
.sheet a { color: inherit; }
.sheet a:hover, .sheet a:focus-visible { background: var(--highlight-swipe); }
/* Outside of the folded paper: blank, a touch darker, with soft fold edges */
.face.back .sheet, .sheet.blank { color: transparent; }
.face.back::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgb(0 0 0 / 0.18), transparent 12%, transparent 88%, rgb(0 0 0 / 0.1)),
              linear-gradient(rgb(0 0 0 / 0.12), transparent 14%, transparent 86%, rgb(0 0 0 / 0.16));
}
/* Creases left on the open sheet */
.paper::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgb(0 0 0 / 0.16) calc(50% - 1px), rgb(255 255 255 / 0.22) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(transparent calc(50% - 1px), rgb(0 0 0 / 0.16) calc(50% - 1px), rgb(255 255 255 / 0.22) calc(50% + 1px), transparent calc(50% + 1px));
  opacity: 0;
  transition: opacity 0.2s;
}
.group.is-open .paper::after {
  opacity: 1;
  transition: opacity 0.25s 0.8s;
}
.bio { filter: drop-shadow(calc(1 * var(--u)) calc(2 * var(--u)) calc(2 * var(--u)) rgb(0 0 0 / 0.35)); }

/* Paper for each note, mirroring its strip (sampled along the strip) */
.bio-youtube { --paper: #ae110f; --tint: linear-gradient(170deg, #c1221e, #af1412 55%, #a70a09); }
.bio-hearst {
  --paper: #6d4e8e;
  --tint: linear-gradient(100deg, #ca538b 0%, #ae5389 18%, #844c86 34%, #473b82 52%, #31397f 68%, #2f3c85 84%, #344f99 100%);
}
.bio-hearst .sheet { letter-spacing: 0.02em; }
.bio-google { --paper: #f2f2f4; }
.bio-google .sheet { color: #111; font-family: "Times New Roman", Times, serif; font-size: calc(9.6 * var(--u)); }
.bio-google .face.back .sheet { color: transparent; }
.bio-buzzfeed { --paper: #0a1f47; --tint: linear-gradient(100deg, #13274d, #0f2247 20%, #06193d 45%, #051a41 65%, #082250 82%, #0e3273); }
.bio-freelance { --paper: #2b4519; --tint: linear-gradient(160deg, #2b4519 0%, #2b4519 30%, #5d6b33 65%, #d6cd91 100%); }
.bio-freelance .sheet { text-shadow: 0 0 calc(3 * var(--u)) rgb(0 0 0 / 0.45); }

/* Open notes keep their paper hoverable, so they stay open while read */
.bio .face, .bio .q { pointer-events: none; }
.group.is-open .bio :is(.face, .q) { pointer-events: auto; }

@media (prefers-reduced-motion: reduce) {
  .flap-h, .flap-v, .group.is-open :is(.flap-h, .flap-v) { transition: none; }
}

/* At rest the folded note is tucked behind its strip with a sliver showing,
   offset by --rx/--ry from where it opens. Hovering "more" slides it out
   that little way (like tugging it partway out), then it unfolds in place,
   pivoting on its fixed corner and keeping its strip's tilt (--r); the
   part still under the strip anchors it. Closing reverses it. */
.bio {
  transform-origin: calc(var(--ox, 0) * var(--u)) calc(var(--oy, 0) * var(--u));
  translate: calc(var(--rx, 0) * var(--u)) calc(var(--ry, 0) * var(--u));
  transition: translate 0.16s cubic-bezier(0.45, 0, 0.7, 0.6) 0.42s;   /* closing: last */
}
.group.is-open .bio {
  translate: 0 0;
  transition: translate var(--slide);   /* opening: first */
}

/* The part of an open note still under its strip stays inside the strip's
   outline (it would otherwise poke out above the strip, behind its sticky
   note); only paper past the strip's end shows. The note shares its strip's
   tilt, so in the note's own box the strip is a horizontal band: rows from
   --ph - --sh + 4 (the note sits 4 px above the strip's bottom edge) down.
   --xb is where the strip ends in the note's box; it moves with the slide. */
.bio[data-tuck] {
  --o: calc(60 * var(--u));
  --xb: calc((var(--T) + 30) * var(--u));
  --band-top: calc((var(--ph) - var(--sh) + 4) * var(--u));
  --band-bottom: calc((var(--ph) + 4) * var(--u));
  clip-path: polygon(
    calc(-1 * var(--o)) var(--band-top), var(--xb) var(--band-top), var(--xb) calc(-1 * var(--o)),
    calc(100% + var(--o)) calc(-1 * var(--o)), calc(100% + var(--o)) calc(100% + var(--o)),
    var(--xb) calc(100% + var(--o)), var(--xb) var(--band-bottom), calc(-1 * var(--o)) var(--band-bottom));
  transition: translate 0.16s cubic-bezier(0.45, 0, 0.7, 0.6) 0.42s, clip-path 0.16s cubic-bezier(0.45, 0, 0.7, 0.6) 0.42s;
}
.bio[data-tuck][data-h="left"] {
  --xb: calc(100% - (var(--T) + 30) * var(--u));
  clip-path: polygon(
    calc(100% + var(--o)) var(--band-top), var(--xb) var(--band-top), var(--xb) calc(-1 * var(--o)),
    calc(-1 * var(--o)) calc(-1 * var(--o)), calc(-1 * var(--o)) calc(100% + var(--o)),
    var(--xb) calc(100% + var(--o)), var(--xb) var(--band-bottom), calc(100% + var(--o)) var(--band-bottom));
}
.group.is-open .bio[data-tuck] { --xb: calc(var(--T) * var(--u)); transition: translate var(--slide), clip-path var(--slide); }
.group.is-open .bio[data-tuck][data-h="left"] { --xb: calc(100% - var(--T) * var(--u)); }

/* The corner that shows: lifted a little, with a soft fold shadow */
.curl {
  pointer-events: none;
  transition: opacity 0.12s 0.42s;
}
.curl-br { background: linear-gradient(135deg, transparent 48%, rgb(255 255 255 / 0.35) 52%, rgb(255 255 255 / 0.1) 70%, rgb(0 0 0 / 0.25)); clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.curl-bl { background: linear-gradient(225deg, transparent 48%, rgb(255 255 255 / 0.35) 52%, rgb(255 255 255 / 0.1) 70%, rgb(0 0 0 / 0.25)); clip-path: polygon(0 0, 100% 100%, 0 100%); }
.curl-tl { background: linear-gradient(315deg, transparent 48%, rgb(255 255 255 / 0.35) 52%, rgb(255 255 255 / 0.1) 70%, rgb(0 0 0 / 0.25)); clip-path: polygon(0 0, 100% 0, 0 100%); }
.curl-tr { background: linear-gradient(45deg, transparent 48%, rgb(255 255 255 / 0.35) 52%, rgb(255 255 255 / 0.1) 70%, rgb(0 0 0 / 0.25)); clip-path: polygon(0 0, 100% 0, 100% 100%); }

/* "more", in Deanna's own lettering: the control that opens a note
   (hover, tap or keyboard focus; see js/reveal.js) */
.cue {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  overflow: visible;
}
.cue > img { position: relative; z-index: 1; }
.cue:focus-visible { outline: calc(1.5 * var(--u)) solid var(--card-heading); outline-offset: calc(2 * var(--u)); border-radius: calc(3 * var(--u)); }

/* The cue: one effect per state, both with the same slight scale-up.
   - Hovering a strip (or the banner): a hand-drawn circle around its "more".
     Leaving the strip clears it.
   - Hovering or focusing "more" (which opens the note), and for as long as
     the note is open: the poster nav's highlighter swipe, drawn in quickly.
     Never together: the circle clears as the swipe draws in. */
.cue { transition: scale 0.2s cubic-bezier(0.3, 0.6, 0.3, 1); }
.cue::after {
  content: "";
  position: absolute;
  left: calc(-2 * var(--u));
  right: calc(-2 * var(--u));
  bottom: calc(1 * var(--u));
  height: calc(6 * var(--u));
  background: var(--highlight-swipe);
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.18s cubic-bezier(0.45, 0, 0.7, 0.6);
}
.cue .ring {
  position: absolute;
  left: -30%;
  top: -45%;
  width: 160%;
  height: 190%;
  overflow: visible;
  pointer-events: none;
}
.cue .ring path {
  fill: none;
  stroke: #1d1d1d;
  stroke-width: calc(1.3 * var(--u));
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 0.1s ease-in;   /* clears before the swipe starts */
}
.group:has(.role:hover, section:hover) .cue,
.cue:hover, .cue:focus-visible, .group.is-open .cue { scale: 1.08; }
/* strip hovered (and the note not open, "more" not hovered): the circle */
.group:has(.role:hover, section:hover):not(.is-open) .cue:not(:hover, :focus-visible) .ring path {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.5s cubic-bezier(0.4, 0.2, 0.3, 1);
}
/* "more" hovered or focused, or its note open: the swipe */
:is(.cue:hover, .cue:focus-visible, .group.is-open .cue)::after {
  transform: scaleX(1);
  transition: transform 0.2s cubic-bezier(0.3, 0.6, 0.35, 1) 0.1s;   /* after the circle has cleared */
}

.flap-h > .face.back {
  box-shadow:
    calc(0.7 * var(--u)) calc(0.7 * var(--u)) 0 color-mix(in srgb, var(--paper) 80%, #000),
    calc(1.4 * var(--u)) calc(1.4 * var(--u)) 0 color-mix(in srgb, var(--paper) 88%, #fff),
    calc(2.1 * var(--u)) calc(2.1 * var(--u)) 0 color-mix(in srgb, var(--paper) 75%, #000);
}

/* Bubbles (js/bubbles.js): a layer over the whole window that never takes
   the pointer, with the goldfish sticker in the lower-left corner. Above
   everything on the boards (phone clusters stack up to ~100000, dragged
   stickers above that), under the loading screen (999999). */
.bubbles { position: fixed; inset: 0; z-index: 900000; pointer-events: none; overflow: hidden; }
/* The goldfish floats: a slow, slight bob and tilt. Its mouth (.fish-mouth,
   at the opening in the art) is where the bubbles come from, so they leave
   it wherever it is in the bob. */
.bubble-fish {
  position: absolute;
  left: 12px;
  bottom: 10px;
  width: 132px;
  filter: drop-shadow(1px 3px 3px rgb(0 0 0 / 0.3));
  animation: fish-float 5.5s ease-in-out infinite;
}
.bubble-fish img { display: block; width: 100%; height: auto; pointer-events: none; -webkit-user-drag: none; }
/* The fish is the one thing in the layer that takes the pointer: press it to
   blow a bubble, hold to grow one (js/bubbles.js). No long-press menu, image
   saving or text selection; a finger that moves still scrolls the page. */
.bubble-fish {
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.bubble-fish img { transition: scale 0.12s ease, rotate 0.3s ease; }
.bubble-fish.is-pressed img { scale: 0.95; }
.fish-mouth { position: absolute; left: 95%; top: 35%; }
@keyframes fish-float {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50% { transform: translateY(-5px) rotate(1.5deg); }
}
/* On the visit with the loading screen, the fish waits out of sight, then
   pops up from below the screen into its spot with a little bounce (about
   0.5 s, js/loader.js) and starts bobbing. If the loader's script never runs,
   it shows after 10 s, as the loading screen goes. */
.dg-loading .bubble-fish { visibility: hidden; animation: fish-failsafe 0s 10s forwards; }
@keyframes fish-failsafe { to { visibility: visible; } }
.fish-enter .bubble-fish {
  animation: fish-enter 0.5s both, fish-float 5.5s ease-in-out 0.5s infinite;
}
@keyframes fish-enter {
  0% { transform: translateY(calc(100% + 16px + env(safe-area-inset-bottom))) rotate(4deg); animation-timing-function: cubic-bezier(0.2, 0.7, 0.4, 1); }
  58% { transform: translateY(-9px) rotate(-3deg); animation-timing-function: ease-in-out; }
  80% { transform: translateY(2px) rotate(-1deg); animation-timing-function: ease-in-out; }
  100% { transform: translateY(0) rotate(-1.5deg); }
}
@media (prefers-reduced-motion: reduce) {
  .bubble-fish, .fish-enter .bubble-fish { animation: none; pointer-events: none; }
}
.bubble {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0.95;
  will-change: transform;
}
/* The pop (js/bubbles.js), all within ~0.3 s and where the bubble is: it
   swells a touch and vanishes, while a thin sparkle ring and eight droplets
   burst from its rim and fade. */
.bubble.is-popping { animation: bubble-pop 0.24s ease-out forwards; }
@keyframes bubble-pop {
  0% { scale: 1; opacity: 1; }
  40% { scale: 1.16; opacity: 1; }
  100% { scale: 1.28; opacity: 0; }
}
.bubble-burst { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.bubble-burst .ring {
  position: absolute;
  width: var(--d);
  height: var(--d);
  margin: calc(var(--d) / -2);
  border-radius: 50%;
  border: 1.5px dotted rgb(255 255 255 / 0.9);
  animation: bubble-ring 0.26s ease-out 0.05s both;
}
@keyframes bubble-ring {
  from { scale: 0.9; opacity: 0.95; }
  to { scale: 1.35; opacity: 0; }
}
.bubble-burst .drop {
  position: absolute;
  width: var(--s);
  height: var(--s);
  margin: calc(var(--s) / -2);
  border-radius: 50%;
  background: rgb(255 255 255 / 0.95);
  box-shadow: 0 0 2px rgb(255 255 255 / 0.8);
  animation: bubble-drop 0.24s cubic-bezier(0.2, 0.7, 0.4, 1) 0.06s both;
}
@keyframes bubble-drop {
  from { transform: rotate(var(--a)) translateX(var(--r0)) scale(1); opacity: 1; }
  to { transform: rotate(var(--a)) translateX(var(--r1)) scale(0.4); opacity: 0; }
}
/* The credit line, "designed & built by Deanna Govea · © year" (the year
   kept current by js/credit.js): handwritten on the bottom-right of the
   frame's bottom bar, on Home and AI Experiments. Real text, so screen
   readers get it; the handwriting is Gaegu, cut down to a tiny web font
   (build_media.py). */
@font-face {
  font-family: "Gaegu Credit";
  src: url("/media/fonts/gaegu-credit.woff2") format("woff2");
  font-display: swap;
}
.credit { display: flex; margin: 0; white-space: nowrap; pointer-events: none; }
/* Dark ink on the frame's light wood, sized to sit within the bottom bar */
.credit-hand {
  align-items: center;
  justify-content: center;
  font: calc(8.4 * var(--u)) / 1 "Gaegu Credit", cursive;
  color: rgb(30 26 22 / 0.88);
}
/* The sticker sheet's box, for the bubbles to steer around (js/bubbles.js) */
.sheet-area { visibility: hidden; pointer-events: none; }

/* Sound (js/sound.js): a speaker sticker just above the goldfish's tail,
   tilted like the stickers on the board. Waves when on, a red cross when off
   (the default) or turned all the way down.
   With a mouse, hovering it (or keyboard focus) brings out two more stickers
   in the same style: the volume slider, a thin yellow pill directly above it
   (a dark track, solid up to the level, and a dark handle), and to its right
   the floating-bubbles switch (js/bubbles.js), which has no tooltip: it says
   what it is. (The speaker has the browser's own, its title.) On touch screens there's no slider and the switch always sits
   beside the speaker. It all arrives just after the fish on the
   loading-screen visit, and isn't shown with reduced motion (no bubbles). */
.sound-control {
  position: fixed;
  z-index: 899990;   /* just under the bubbles layer, so the goldfish is drawn over the tucked-away tab */
  left: 24px;
  bottom: 114px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sound-toggle, .bubbles-toggle {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  background: none;
  filter: drop-shadow(1px 2px 2px rgb(0 0 0 / 0.3));
  transition: scale 0.15s ease, rotate 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.sound-toggle { width: 44px; height: 44px; rotate: -8deg; }
.sound-toggle svg { display: block; width: 100%; height: 100%; }
.sound-toggle[aria-pressed="true"]:not(.is-silent) .mute,
.sound-toggle[aria-pressed="false"] .waves,
.sound-toggle.is-silent .waves { display: none; }
@media (hover: hover) {
  .sound-toggle:hover { scale: 1.08; rotate: -2deg; }
  .bubbles-toggle:hover { scale: 1.08; }
}
.sound-toggle:active, .bubbles-toggle:active { scale: 0.94; }
.sound-toggle:focus-visible, .bubbles-toggle:focus-visible { outline: 2px solid #00ff9c; outline-offset: 2px; border-radius: 24px; }

/* The volume slider: a thin pill sticker above the speaker. The range input
   inside is turned on its side, so the bottom is silent and the top loudest. */
.sound-volume {
  display: none;
  position: absolute;
  left: 12px;
  bottom: calc(100% + 12px);
  width: 20px;
  height: 96px;
  border-radius: 10px;
  background: #ffe45c;
  box-shadow: 0 0 0 3px #fff;
  filter: drop-shadow(1px 2px 2px rgb(0 0 0 / 0.3));
  rotate: -4deg;
}
.sound-volume input {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78px;
  height: 16px;
  margin: 0;
  translate: -50% -50%;
  rotate: -90deg;
  background: none;
  cursor: inherit;
}
.sound-volume input::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, #1d1d1d var(--fill, 50%), rgb(29 29 29 / 0.28) var(--fill, 50%));
}
.sound-volume input::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, #1d1d1d var(--fill, 50%), rgb(29 29 29 / 0.28) var(--fill, 50%));
}
.sound-volume input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  margin-top: -4.5px;
  border-radius: 50%;
  background: #1d1d1d;
}
.sound-volume input::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 0;
  border-radius: 50%;
  background: #1d1d1d;
}
.sound-volume input:focus-visible { outline: 2px solid #00ff9c; outline-offset: 4px; border-radius: 6px; }

/* The floating-bubbles switch (js/bubbles.js). */
/* A little paper tab, notched like a tag, "bubbles on/off" in her
   handwriting. Two leaves on a fold down the middle: each shows its half of
   the same face (clip-path); the right leaf's back is blank paper. On
   desktop it's folded in half while hidden and unfolds as it appears, like
   the bio notes but quicker (js/sound.js opens and closes the controls). */
.bt-3 { display: block; position: relative; width: 100px; height: 26px; rotate: 3deg; perspective: 320px; }
.bt-3 .leaf { position: absolute; top: 0; height: 100%; width: 50%; }
.bt-3 .leaf-l { left: 0; }
.bt-3 .leaf-r { left: 50%; transform-origin: 0 50%; transform-style: preserve-3d; }
.bt-3 .face {
  position: absolute;
  top: 0;
  width: 100px;
  height: 100%;
  display: flex;
  align-items: center;
  padding-left: 14px;
  box-sizing: border-box;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .45 0 0 0 0 .35 0 0 0 .25 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E"), linear-gradient(160deg, #fffaf0, #efe4c8);
  background-size: auto, 100px 100%;
  backface-visibility: hidden;
}
.bt-3 .leaf-l .face { left: 0; clip-path: polygon(10px 0, 50px 0, 50px 100%, 10px 100%, 0 50%); }
.bt-3 .leaf-r .face { left: -50px; clip-path: inset(0 0 0 50px); }
/* The blank back only exists for the fold (desktop); WebKit (Safari, every
   iPhone) doesn't hide a leaf's back face reliably, so the back and front are
   also switched by visibility as the leaf turns edge-on (below) */
.bt-3 .back {
  display: none;
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .45 0 0 0 0 .35 0 0 0 .25 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E"), linear-gradient(200deg, #f1e7cf, #e3d6b6);
  transform: rotateY(180deg);
  backface-visibility: hidden;
}
.bt-3 img { height: 12px; width: auto; }
.bubbles-toggle[aria-pressed="true"] .bt-3 .off,
.bubbles-toggle[aria-pressed="false"] .bt-3 .on { display: none; }
/* With a mouse: the slider and the switch come out while the pointer is on
   the speaker or on them (.is-open, js/sound.js, which waits 0.15 s after the
   pointer leaves before closing), or on keyboard focus. Each has a bridge
   over the gap so the pointer can travel to it. The slider fades in and out
   (0.12 s); the paper tab slides out from behind the goldfish and unfolds,
   and folds and slides back. */
@media (hover: hover) and (pointer: fine) {
  .sound-volume { display: block; opacity: 0; visibility: hidden; transition: opacity 0.12s ease, visibility 0s 0.12s; }
  .sound-control.is-open .sound-volume { opacity: 1; visibility: visible; transition: opacity 0.1s ease, visibility 0s; }
  /* The bubbles tab rests folded in half, tucked behind the goldfish (the
     fish is drawn over it): it slides out to its place beside the speaker,
     then unfolds; hiding, it folds, then slides back behind the fish. */
  .bubbles-toggle {
    translate: -17px 72px;   /* the folded tab's middle on the fish's body */
    scale: 0.9;
    visibility: hidden;
    transition: translate 0.32s cubic-bezier(0.45, 0, 0.55, 1) 0.32s, scale 0.32s ease 0.32s, visibility 0s 0.64s;
  }
  .sound-control.is-open .bubbles-toggle {
    translate: 0 0;
    scale: 1;
    visibility: visible;
    transition: translate 0.32s cubic-bezier(0.3, 0.6, 0.35, 1), scale 0.32s ease, visibility 0s;
  }
  .sound-control.is-open .bubbles-toggle:hover { scale: 1.08; transition: scale 0.15s ease; }
  .bt-3 .leaf-r { transform: rotateY(-180deg); transition: transform 0.32s cubic-bezier(0.45, 0, 0.7, 0.6); }
  .sound-control.is-open .bt-3 .leaf-r { transform: none; transition: transform 0.4s cubic-bezier(0.3, 0.75, 0.25, 1) 0.32s; }
  /* Folded: the back shows, the right half of the words doesn't; they swap as
     the leaf passes edge-on (~0.42 s into opening, ~0.2 s into folding) */
  .bt-3 .back { display: block; visibility: visible; transition: visibility 0s 0.2s; }
  .bt-3 .leaf-r .face { visibility: hidden; transition: visibility 0s 0.2s; }
  .sound-control.is-open .bt-3 .back { visibility: hidden; transition: visibility 0s 0.42s; }
  .sound-control.is-open .bt-3 .leaf-r .face { visibility: visible; transition: visibility 0s 0.42s; }
  .sound-volume::before { content: ""; position: absolute; top: 100%; left: -14px; right: -14px; height: 16px; }
  .bubbles-toggle::before { content: ""; position: absolute; right: 100%; top: -6px; bottom: -6px; width: 12px; }
}
.dg-loading .sound-control { visibility: hidden; animation: fish-failsafe 0s 10s forwards; }
.fish-enter .sound-control { animation: sticker-in 0.3s 0.4s cubic-bezier(0.3, 1.5, 0.6, 1) both; }
@keyframes sticker-in {
  from { scale: 0.3; opacity: 0; }
  to { scale: 1; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .sound-control { display: none; }
}
@media (max-width: 759px) {
  /* Small and out of the way on phones */
  .bubble-fish { left: 6px; bottom: max(6px, env(safe-area-inset-bottom)); width: 62px; }
  .sound-control { left: 8px; bottom: calc(max(6px, env(safe-area-inset-bottom)) + 50px); gap: 8px; }
  .sound-toggle { width: 40px; height: 40px; }
}

/* ---- Phone layout ----------------------------------------------------

   Below 760px each page is a tall board you scroll down: a canvas 400
   canvas px wide and --board-h tall (set on the .stage), with the same
   objects reflowed into a vertical composition. The desktop canvas above
   is untouched.

   Objects keep their desktop --x/--y/--w/--h. Related objects are grouped
   in a .cluster carrying phone-only placement: the cluster's desktop
   anchor --ax0/--ay0 lands at --mx/--my (canvas px from the top left), and
   everything in it is scaled by --ms (text and hotspots included) and
   turned by --mr about the anchor; --mz stacks whole clusters (as the
   layers are ordered in the Photoshop file). An
   object can carry its own --ax0/--ay0/--mx/--my to leave its cluster.
   Phone-only objects outside a cluster use --x/--y as phone coordinates.
   Only sections marked .phone-board get this layout; the others still
   show the scaled desktop board on phones. */

.cluster { display: contents; }
.phone-only, .fold-curl { display: none; }

@media (max-width: 759px) {
  .phone-board .desktop-only { display: none; }
  .phone-board .phone-only { display: block; }

  .page.phone-board { height: auto; display: block; }
  /* The pattern stays put behind the board as it scrolls past */
  /* lvh: as tall as the screen with Safari's toolbars hidden (they hide as
     you scroll), or a strip below it would show between two boards */
  .phone-board .backdrop {
    position: sticky;
    inset: auto;
    top: 0;
    height: 100lvh;
    margin-bottom: -100lvh;
  }

  .phone-board .stage {
    --mx: 0; --my: 0; --ax0: 0; --ay0: 0; --ms: 1; --mr: 0deg; --mz: 0;
    width: 100%;
    aspect-ratio: 400 / var(--board-h);
  }
  .phone-board :is(.obj:not(.bio), .hot) { --u: calc(100cqw / 400 * var(--ms)); }
  /* --zi: an explicit stacking for a cluster that sits beside a note's group
     (a sticky note above or below it) */
  .phone-board .obj:not(.bio) {
    --dx0: calc(var(--x) - var(--ax0));
    --dy0: calc(var(--y) - var(--ay0));
    left: calc(var(--mx) * 100cqw / 400 + (var(--dx0) * cos(var(--mr)) - var(--dy0) * sin(var(--mr)) - var(--w) / 2) * var(--u));
    top: calc(var(--my) * 100cqw / 400 + (var(--dx0) * sin(var(--mr)) + var(--dy0) * cos(var(--mr)) - var(--h) / 2) * var(--u));
    rotate: calc(var(--r, 0deg) + var(--mr));
    z-index: var(--zi, calc(var(--mz) * 1000 + var(--z) - 300));
  }

  /* Folded notes on phones: a sheet nearly as wide as the board (--p-pw)
     with ~13px text, folded in quarters. At rest it sits --p-rx/--p-ry
     (canvas px, in the note's frame) from where it opens; "more" slides it
     there, then it unfolds sideways and down. Its cluster's anchor is the
     sheet's top corner (data-ph says which: "right" opens to the right of
     it, "left" to the left), and the cluster's --mr is its tilt. The strip
     doesn't clip it here: whatever is placed over it covers it. */
  .phone-board .bio {
    --u: calc(100cqw / 400 * var(--ms));
    --pw: var(--p-pw, 330) !important;
    --pl: 14 !important; --pr: 14 !important; --pt: 12 !important; --pb: 12 !important;
    --ox: 0; --oy: 0; --sx: 1; --sy: 1;
    --dxa: calc(var(--ax) - var(--ax0));
    --dya: calc(var(--ay) - var(--ay0));
    left: calc(var(--mx) * 100cqw / 400 + (var(--dxa) * cos(var(--mr)) - var(--dya) * sin(var(--mr)) - var(--ox)) * var(--u));
    top: calc(var(--my) * 100cqw / 400 + (var(--dxa) * sin(var(--mr)) + var(--dya) * cos(var(--mr)) - var(--oy)) * var(--u));
    rotate: var(--mr);
    translate: calc((var(--p-rx, 0) * cos(var(--mr)) - var(--p-ry, 0) * sin(var(--mr))) * var(--u))
               calc((var(--p-rx, 0) * sin(var(--mr)) + var(--p-ry, 0) * cos(var(--mr))) * var(--u));
    clip-path: none;
  }
  .phone-board .bio[data-ph="left"] { --ox: var(--pw); --sx: -1; }
  /* (outranks the desktop's tuck clip, left- or right-opening) */
  .phone-board .bio[data-tuck][data-h] { clip-path: none; }
  .phone-board .sheet { font-size: calc(13.9 * var(--u)); }
  .phone-board .bio-google .sheet { font-size: calc(15.2 * var(--u)); }
  /* The curl is on the folded paper itself (the desktop's curls are placed
     beside the strips) */
  .phone-board .curl { display: none; }
  .phone-board .fold-curl {
    display: block;
    left: calc(50% - 12 * var(--u)); top: calc(50% - 12 * var(--u));
    width: calc(12 * var(--u)); height: calc(12 * var(--u));
    background: linear-gradient(135deg, transparent 48%, rgb(255 255 255 / 0.35) 52%, rgb(255 255 255 / 0.1) 70%, rgb(0 0 0 / 0.25));
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
    pointer-events: none;
    transition: opacity 0.12s 0.42s;
  }
  .phone-board .group.is-open .fold-curl { opacity: 0; transition: opacity 0.1s; }
  .phone-board .group { z-index: calc(var(--mz) * 1000 + 15); }
  .phone-board .group.is-open { z-index: 50000; }

  /* The tall board: the desktop board's own frame around repeating cork.
     Per page (tools/build_media.py prints them): --frame-w (canvas px),
     --frame-slice (px in the frame image), --tile-w/--tile-h (canvas px). */
  .board-phone {
    border: calc(var(--frame-w) * var(--u)) solid transparent;
    border-image: var(--frame) var(--frame-slice) stretch;
    background: var(--cork) 0 0 / calc(var(--tile-w) * var(--u)) calc(var(--tile-h) * var(--u));
    filter: drop-shadow(0 calc(3 * var(--u)) calc(6 * var(--u)) rgb(0 0 0 / 0.4));
  }
  /* Items cut out of the desktop board lose its baked-in shadow */
  .cutout { filter: drop-shadow(calc(1 * var(--u)) calc(2 * var(--u)) calc(2 * var(--u)) rgb(0 0 0 / 0.35)); }

  .phone-board .swing[data-swing="phone"] {
    cursor: pointer;
    /* Taps on the transparent margin around the picture reach what's under
       it (the poster's links): --hit outlines the artwork, just outside it */
    clip-path: var(--hit, none);
  }

  /* Videos on phones shows the sticky notes and job-title strips only, not
     the folded bios or their "more" (Deanna's call). The bio text stays for
     screen readers. */
  #videos.phone-board .bio .paper, #videos.phone-board .cue { display: none; }
  /* The workflow + tools label overlaps the Instagram printout on phones:
     only its tape (and pin and shadow) takes taps, so the printout's link
     works right up to it. The tape fills 25-65% of the image's height. */
  #aiexperiments.phone-board .swing { clip-path: inset(20% -3% 30% -3%); }
  /* A strip with a trimmed phone image: its phone box, same top edge */
  .phone-board .trim-phone { --y: var(--p-y) !important; --h: var(--p-h) !important; }

  /* Small links get a finger-sized tap area without moving the text */
  .contact-card a { position: relative; }
  .contact-card a::after { content: ""; position: absolute; inset: -14px -6px; }
}

/* A pinned picture sways from its pushpin and settles (js/swing.js), at most
   --swing. The swing turns about the pin within the picture's own (tilted) box. */
.swing {
  --to-pin: translate(calc(var(--pin-x) - 50%), calc(var(--pin-y) - 50%));
  --from-pin: translate(calc(50% - var(--pin-x)), calc(50% - var(--pin-y)));
}
.swing.is-swinging { animation: swing 1.9s; }
@keyframes swing {
  0%   { transform: var(--to-pin) rotate(0deg) var(--from-pin); animation-timing-function: cubic-bezier(0.2, 0.6, 0.4, 1); }
  13%  { transform: var(--to-pin) rotate(var(--swing, 4.5deg)) var(--from-pin); animation-timing-function: ease-in-out; }
  33%  { transform: var(--to-pin) rotate(calc(var(--swing, 4.5deg) * -0.71)) var(--from-pin); animation-timing-function: ease-in-out; }
  52%  { transform: var(--to-pin) rotate(calc(var(--swing, 4.5deg) * 0.44)) var(--from-pin); animation-timing-function: ease-in-out; }
  70%  { transform: var(--to-pin) rotate(calc(var(--swing, 4.5deg) * -0.24)) var(--from-pin); animation-timing-function: ease-in-out; }
  86%  { transform: var(--to-pin) rotate(calc(var(--swing, 4.5deg) * 0.1)) var(--from-pin); animation-timing-function: ease-in-out; }
  100% { transform: var(--to-pin) rotate(0deg) var(--from-pin); }
}

/* The workflow + tools label: a slight sway from its brass pin */
#aiexperiments .swing { --pin-x: 50.4%; --pin-y: 30.4%; --swing: 1.6deg; }

/* The photo of Deanna: where the red pushpin goes in, and an outline a few
   px outside the artwork (all hover frames), traced from its sprite */
#home .swing {
  --pin-x: 51.9%; --pin-y: 12.2%;
  --hit: polygon(51.2% 4.2%, 51.2% 6.3%, 49.2% 6.2%, 49.2% 8.4%, 42.7% 8.3%, 42.7% 10.4%, 39.1% 10.4%, 39.1% 12.5%, 35.5% 12.5%, 35.5% 14.6%, 31.7% 14.5%, 31.7% 16.7%, 28.1% 16.6%, 28.1% 18.7%, 23.9% 18.7%, 23.9% 20.9%, 19.1% 20.8%, 19.1% 22.9%, 14.3% 22.8%, 14.3% 25.0%, 13.0% 25.0%, 13.0% 27.1%, 12.4% 27.1%, 12.4% 29.2%, 11.8% 29.1%, 11.8% 31.3%, 11.3% 31.2%, 11.3% 33.3%, 10.8% 33.3%, 10.8% 35.4%, 10.8% 35.4%, 10.8% 37.5%, 11.1% 37.4%, 11.1% 39.6%, 11.9% 39.5%, 11.9% 41.7%, 12.7% 41.6%, 12.7% 43.8%, 13.4% 43.7%, 13.4% 45.8%, 14.2% 45.7%, 14.2% 47.9%, 14.5% 47.9%, 14.5% 50.0%, 14.1% 50.0%, 14.1% 52.1%, 13.5% 52.0%, 13.5% 54.2%, 13.1% 54.1%, 13.1% 56.2%, 12.7% 56.2%, 12.7% 58.3%, 12.7% 58.3%, 12.7% 60.4%, 13.1% 60.3%, 13.1% 62.5%, 13.9% 62.4%, 13.9% 64.6%, 14.6% 64.5%, 14.6% 66.7%, 15.3% 66.6%, 15.3% 68.7%, 16.6% 68.7%, 16.6% 70.8%, 23.2% 70.8%, 23.2% 72.9%, 35.6% 72.8%, 35.6% 75.0%, 36.4% 74.9%, 36.4% 77.1%, 37.2% 77.0%, 37.2% 79.1%, 37.9% 79.1%, 37.9% 81.3%, 38.5% 81.2%, 38.5% 83.3%, 38.9% 83.2%, 38.9% 85.4%, 39.3% 85.3%, 39.3% 87.5%, 39.8% 87.4%, 39.8% 89.6%, 40.3% 89.5%, 40.3% 91.6%, 43.5% 91.6%, 43.5% 93.7%, 61.9% 93.7%, 61.9% 91.6%, 66.9% 91.6%, 66.9% 89.5%, 67.7% 89.6%, 67.7% 87.4%, 68.4% 87.5%, 68.4% 85.3%, 69.0% 85.4%, 69.0% 83.2%, 69.8% 83.3%, 69.8% 81.2%, 70.5% 81.3%, 70.5% 79.1%, 71.1% 79.1%, 71.1% 77.0%, 71.9% 77.1%, 71.9% 74.9%, 72.5% 75.0%, 72.5% 72.8%, 73.3% 72.9%, 73.3% 70.8%, 74.6% 70.8%, 74.6% 68.7%, 76.5% 68.7%, 76.5% 66.6%, 78.3% 66.7%, 78.3% 64.5%, 80.0% 64.6%, 80.0% 62.4%, 81.5% 62.5%, 81.5% 60.3%, 82.7% 60.4%, 82.7% 58.3%, 83.9% 58.3%, 83.9% 56.2%, 85.2% 56.2%, 85.2% 54.1%, 86.4% 54.2%, 86.4% 52.0%, 87.6% 52.1%, 87.6% 50.0%, 88.9% 50.0%, 88.9% 47.9%, 90.1% 47.9%, 90.1% 45.7%, 91.2% 45.8%, 91.2% 43.7%, 91.2% 43.8%, 91.2% 41.6%, 90.7% 41.7%, 90.7% 39.5%, 89.5% 39.6%, 89.5% 37.4%, 88.4% 37.5%, 88.4% 35.4%, 87.4% 35.4%, 87.4% 33.3%, 86.4% 33.3%, 86.4% 31.2%, 85.4% 31.3%, 85.4% 29.1%, 84.2% 29.2%, 84.2% 27.1%, 83.0% 27.1%, 83.0% 25.0%, 81.8% 25.0%, 81.8% 22.8%, 80.2% 22.9%, 80.2% 20.8%, 78.8% 20.9%, 78.8% 18.7%, 77.2% 18.7%, 77.2% 16.6%, 75.7% 16.7%, 75.7% 14.5%, 71.6% 14.6%, 71.6% 12.5%, 67.1% 12.5%, 67.1% 10.4%, 56.4% 10.4%, 56.4% 8.3%, 56.2% 8.4%, 56.2% 6.2%, 54.2% 6.3%, 54.2% 4.2%);
}
#home .board-phone {
  --frame: url("/media/phone/home-frame.webp"); --cork: url("/media/phone/home-cork-tile.webp");
  --frame-w: 24.62; --frame-slice: 48; --tile-w: 615.6; --tile-h: 446.3;
}
#videos .board-phone {
  --frame: url("/media/phone/videos-frame.webp"); --cork: url("/media/phone/videos-cork-tile.webp");
  --frame-w: 24.58; --frame-slice: 64; --tile-w: 353.3; --tile-h: 460.9;
}
#aiexperiments .board-phone {
  --frame: url("/media/phone/ai-frame.webp"); --cork: url("/media/phone/ai-cork-tile.webp");
  --frame-w: 26.93; --frame-slice: 70; --tile-w: 461.7; --tile-h: 461.7;
}

/* The projector screen (js/reel.js, src/sections/reel.html): scroll room after
   Videos, whose board stays pinned behind it. The rig and the lights are fixed
   to the window; the rig comes in with the board and leaves after the room.
   Bubbles sit between them (z 900000): the lights dim the fish and bubbles, the
   screen covers them. js/reel.js sets --len (how far the screen has unrolled,
   px), --rig-y (px: it hangs from the board's top edge until that reaches the
   window's), --case-y (the case leaving, 0 to -1) and --level (lights, 0 on to
   1 off). */
/* Special Elite, as on the "watch my ai spec reel" film strip: the projector's words and clock */
@font-face {
  font-family: "Reel Type";
  src: url("/media/fonts/special-elite-reel.woff2") format("woff2");
  font-display: swap;
}
/* See-through and click-through, so the board behind stays usable */
/* A whole number of screens, so the page after it stays on whole pixels */
.reel-zone { position: relative; height: 200lvh; pointer-events: none; }
/* After the scroll has unrolled it once in a visit, the screen only comes down
   by its cord: AI Experiments, the board it hangs over, is the last page, so
   the room goes altogether (js/reel.js adds the class once it's below the window) */
.dg-reel-unrolled .reel-zone { height: 0; }
/* The board stays once all of it is on screen; --board-px is its height (js/reel.js) */
.page.reel-pinned { position: sticky; top: min(0px, 100lvh - var(--board-px, 100lvh)); }

.lights {
  position: fixed;
  inset: 0;
  z-index: 900050;
  pointer-events: none;
  opacity: 0;
  background: var(--lights-bg);
}

.reel-rig {
  /* The picture: as wide as fits under the case, above the fish's corner */
  --case-h: 34px;
  --pad: 22px;
  --leader: 26px;
  --pad-bottom: 18px;
  --bar-h: 22px;
  --pw: min(100vw - 2 * var(--pad) - 120px, (100svh - 190px) * 16 / 9, 1240px);
  --ph: calc(var(--pw) * 9 / 16);
  --fw: calc(var(--pw) + 2 * var(--pad));
  --accent: #00ff9c;
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 900100;
  height: 0;
  visibility: hidden;
  pointer-events: none;
  translate: 0 calc(var(--rig-y, 0px) + var(--case-y, 0) * (var(--case-h) + 8px));
}
.reel-rig.is-active { visibility: visible; }

/* The roller case */
.reel-case {
  position: absolute;
  top: 0;
  left: 50%;
  width: calc(var(--fw) + 44px);
  height: var(--case-h);
  margin-left: calc((var(--fw) + 44px) / -2);
  border-radius: var(--case-radius);
  background: var(--case-face);
  box-shadow: inset 0 -2px 2px rgb(0 0 0 / 0.28), inset 0 1px 1px rgb(255 255 255 / 0.55), 0 7px 12px rgb(0 0 0 / 0.38), 0 2px 3px rgb(0 0 0 / 0.3);
}
.reel-case::before, .reel-case::after {
  content: "";
  position: absolute;
  top: -1px;
  bottom: -1px;
  width: 16px;
  background: var(--cap-face);
  box-shadow: inset 0 0 2px rgb(0 0 0 / 0.5), 0 1px 3px rgb(0 0 0 / 0.35);
}
.reel-case::before { left: -3px; border-radius: var(--cap-radius) 3px 3px var(--cap-radius); }
.reel-case::after { right: -3px; border-radius: 3px var(--cap-radius) var(--cap-radius) 3px; }

/* A soft shadow on the wall and the picture's light spilling onto it */
.reel-spill {
  position: absolute;
  top: calc(var(--case-h) - 4px);
  left: 50%;
  width: var(--fw);
  margin-left: calc(var(--fw) / -2);
  height: var(--len, 0);
  box-shadow: 0 12px 26px rgb(0 0 0 / 0.42), 0 3px 6px rgb(0 0 0 / 0.25), var(--spill);
}

/* The screen: a fixed sheet, shown as far as it has unrolled. The picture is
   projected, so it doesn't travel with the cloth. */
.reel-fabric {
  position: absolute;
  top: calc(var(--case-h) - 4px);
  left: 50%;
  width: var(--fw);
  margin-left: calc(var(--fw) / -2);
  padding: var(--leader) var(--pad) var(--pad-bottom);
  clip-path: inset(0 0 calc(100% - var(--len, 0px)) 0);
  background: var(--roller-shadow), var(--edge-falloff), var(--hem), var(--sheen), var(--folds), var(--cloth), var(--cloth-colour);
  background-size: auto, auto, auto, auto, 100% 100%, 240px 240px, auto;
  /* Thin cloth: the board shows through a little, softened by the weave */
  -webkit-backdrop-filter: blur(1.5px);
  backdrop-filter: blur(1.5px);
  pointer-events: auto;
}
.reel-rig.is-down .reel-fabric {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transition: -webkit-backdrop-filter 0s 0.5s, backdrop-filter 0s 0.5s;
}
/* Once it's all the way down the cloth goes solid black, so the picture blends into it */
.reel-fabric::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.reel-rig.is-down .reel-fabric::before { opacity: 1; transition-duration: 0.5s; }
.reel-player {
  position: relative;
  width: var(--pw);
  height: var(--ph);
  container-type: inline-size;
  -webkit-user-select: none;
  user-select: none;
}
.reel-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  opacity: 0;
  transition: opacity 0.5s ease;
  outline: none;
}
.is-on .reel-video { opacity: 1; }
.is-idle { cursor: none; }

/* The bottom bar: weighted, and it snaps the screen up */
.reel-bottom {
  position: absolute;
  top: calc(var(--case-h) - 4px);
  left: 50%;
  width: var(--fw);
  margin-left: calc(var(--fw) / -2);
  transform: translateY(var(--len, 0));
  pointer-events: auto;
}
.reel-bar {
  position: relative;
  display: block;
  width: calc(100% + 10px);
  margin: 0 -5px;
  height: var(--bar-h);
  padding: 0;
  border: 0;
  border-radius: var(--bar-radius);
  background: var(--bar-face);
  box-shadow: inset 0 1px 1px rgb(255 255 255 / 0.4), inset 0 -2px 2px rgb(0 0 0 / 0.4), 0 6px 9px rgb(0 0 0 / 0.42);
  transition: translate 0.15s ease, filter 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.reel-bar-label {
  font: 13px/1 "Reel Type", "Courier New", monospace;
  color: var(--bar-ink);
  letter-spacing: 0.02em;
}
.reel-bar-label::after { content: " \25B4"; }
.is-rolled .reel-bar-label, .is-pulling .reel-bar-label { visibility: hidden; }
.reel-bar:focus-visible, .reel-cord:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) {
  .reel-bar:hover { translate: 0 -2px; filter: brightness(1.12); }
}
/* The weight swings a touch when the screen comes to rest */
.is-down .reel-bar { animation: reel-settle 1.3s ease-out both; }
@keyframes reel-settle {
  0% { rotate: 0.5deg; }
  30% { rotate: -0.32deg; }
  60% { rotate: 0.14deg; }
  100% { rotate: 0deg; }
}

/* The pull cord: only with the screen up. It's dragged (js/reel.js), so a press
   on it can't scroll the page. */
.reel-cord {
  position: absolute;
  top: calc(var(--bar-h) - 2px);
  left: 50%;
  width: 150px;
  height: 104px;
  margin-left: -75px;
  padding: 0;
  border: 0;
  background: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, translate 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.is-rolled .reel-cord, .is-pulling .reel-cord { opacity: 1; visibility: visible; transition-delay: 0.2s, 0s; }
.is-pulling .reel-cord { transition: none; }
.is-rolled .reel-cord > *, .is-rolled .reel-bar, .is-pulling .reel-cord > *, .is-pulling .reel-bar { touch-action: none; }
/* A click gives it a tug, to show it pulls */
.is-tugged .reel-cord { animation: reel-tug 0.42s ease-out; }
@keyframes reel-tug {
  0% { translate: 0 0; }
  35% { translate: 0 13px; }
  70% { translate: 0 -3px; }
  100% { translate: 0 0; }
}
/* Only the cord, its handle and its tag take the pointer: it hangs over the board */
.reel-cord { pointer-events: none; }
.reel-cord > * { pointer-events: auto; }
.reel-cord .handle::after { content: ""; position: absolute; inset: -11px; }
@media (hover: hover) { .is-rolled:not(.is-pulling) .reel-cord:hover { translate: 0 4px; } }
.reel-cord .string {
  position: absolute;
  left: calc(50% - 1px);
  top: 0;
  width: 2px;
  height: 58px;
  background: var(--cord-colour);
  box-shadow: 1px 2px 2px rgb(0 0 0 / 0.3);
}
.reel-cord .handle {
  position: absolute;
  left: calc(50% - 9px);
  top: 56px;
  width: 18px;
  height: 18px;
  border-radius: var(--handle-radius);
  background: var(--handle-face);
  box-shadow: inset -2px -2px 3px rgb(0 0 0 / 0.3), 2px 3px 4px rgb(0 0 0 / 0.35);
}
.reel-cord .tag {
  position: absolute;
  left: calc(50% + 14px);
  top: 34px;
  padding: 3px 9px 4px;
  rotate: 5deg;
  white-space: nowrap;
  background: #f6efdc;
  font: 13px/1.1 "Reel Type", "Courier New", monospace;
  color: #1d1d1d;
  box-shadow: 1px 3px 5px rgb(0 0 0 / 0.35);
}

/* The sound icon, small but always there while it plays muted: a little dark
   disc like the player's own, with the speaker sticker's red cross and white
   edge. It pulses twice as it appears, to be noticed. */
.reel-sound {
  position: absolute;
  top: 10px;
  right: 10px;
  display: none;
  width: 34px;
  height: 34px;
  padding: 6px;
  border: 1.5px solid rgb(255 255 255 / 0.9);
  border-radius: 50%;
  background: rgb(12 10 8 / 0.72);
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.5);
  transition: scale 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.reel-sound::after { content: ""; position: absolute; inset: -7px; }
.reel-sound svg { display: block; width: 100%; height: 100%; fill: #fff; }
.reel-sound svg .x { fill: none; stroke: #ff5a5a; stroke-width: 2.4; stroke-linecap: round; }
.is-on.is-muted.is-playing .reel-sound { display: block; animation: reel-sound-in 0.9s ease-out 0.4s 2; }
@keyframes reel-sound-in {
  0%, 100% { box-shadow: 0 1px 4px rgb(0 0 0 / 0.5), 0 0 0 0 rgb(255 255 255 / 0.55); }
  70% { box-shadow: 0 1px 4px rgb(0 0 0 / 0.5), 0 0 0 11px rgb(255 255 255 / 0); }
}
@media (hover: hover) { .reel-sound:hover { scale: 1.1; background: rgb(12 10 8 / 0.9); } }
.reel-sound:active { scale: 0.94; }
.reel-sound:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .is-on.is-muted.is-playing .reel-sound { animation: none; } }

/* The play/replay button, to match the sound icon */
.reel-big:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.reel-big {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: clamp(68px, 9cqw, 92px);
  aspect-ratio: 1;
  padding: 0;
  border: 1.5px solid rgb(255 255 255 / 0.9);
  border-radius: 50%;
  background: rgb(12 10 8 / 0.72);
  color: #fff;
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.5);
  transition: scale 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.reel-big svg { width: 40%; fill: #fff; }
.reel-big-label { display: none; font: 12px/1 "Reel Type", "Courier New", monospace; }
.needs-play.is-on .reel-big, .is-ended.is-on .reel-big { display: flex; }
.reel-big .i-replay, .is-ended .reel-big .i-play { display: none; }
.is-ended .reel-big .i-replay { display: block; }
.is-ended .reel-big-label { display: block; }
@media (hover: hover) { .reel-big:hover { scale: 1.06; background: rgb(12 10 8 / 0.9); } }
.reel-big:active { scale: 0.96; }

/* Classic controls, styled for the board: a dark strip over the picture, the
   neon of the cursor and the scrollbar */
.reel-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 12px 8px;
  background: linear-gradient(transparent, rgb(12 10 8 / 0.82) 55%);
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0s 0.25s;
}
.is-on .reel-controls { opacity: 1; visibility: visible; transition: opacity 0.25s ease; }
.is-on.is-idle .reel-controls { opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0s 0.4s; }
.reel-controls button {
  flex: none;
  width: 34px;
  height: 34px;
  padding: 6px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}
.reel-controls button:focus-visible, .reel-controls input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) { .reel-controls button:hover { color: var(--accent); } }
.reel-controls svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.reel-toggle .i-pause, .is-playing .reel-toggle .i-play { display: none; }
.is-playing .reel-toggle .i-pause { display: block; }
.reel-mute svg .w, .reel-mute svg .x, .reel-full svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.reel-mute svg .x, .is-muted .reel-mute svg .w { display: none; }
.is-muted .reel-mute svg .x { display: inline; }
.reel-time {
  flex: none;
  font: 14px/1 "Reel Type", "Courier New", monospace;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.reel-scrub { flex: 1; min-width: 40px; display: flex; }
.reel-volume { flex: none; width: 72px; display: flex; }
.reel-controls input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 24px;
  margin: 0;
  background: none;
  touch-action: pan-y;
}
.reel-controls input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--accent) var(--fill, 0%), rgb(255 255 255 / 0.5) var(--fill, 0%) var(--buffered, 0%), rgb(255 255 255 / 0.24) var(--buffered, 0%));
}
.reel-controls input[type="range"]::-moz-range-track {
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--accent) var(--fill, 0%), rgb(255 255 255 / 0.5) var(--fill, 0%) var(--buffered, 0%), rgb(255 255 255 / 0.24) var(--buffered, 0%));
}
.reel-controls input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  margin-top: -4px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.6);
}
.reel-controls input[type="range"]::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
}
/* Fullscreen: the player fills the screen */
.reel-player:fullscreen { width: 100%; height: 100%; background: #000; }

@media (max-width: 759px) {
  /* Nearly the window's width, hanging clear of the fish's corner, with a
     longer leader so the picture sits comfortably high in reach of a thumb */
  .reel-rig {
    --case-h: 16px;
    --pad: 7px;
    --leader: max(46px, 24svh);
    --pad-bottom: 10px;
    --bar-h: 34px;
    --pw: calc(100vw - 2 * var(--pad) - 18px);
  }
  .reel-case { width: calc(100vw - 4px); margin-left: calc(50vw * -1 + 2px); }
  .reel-controls { gap: 4px; padding: 16px 4px 2px; }
  .reel-controls button { width: 40px; height: 40px; padding: 9px; }
  .reel-time { font-size: 12.5px; }
  /* Rolled up it stays out of the way while the board scrolls under it: the
     bar folds to a sliver, clear of the tabs at the board's top, and the cord
     hangs in the free cork to their right */
  .reel-bar { transition: height 0.2s ease; }
  .is-rolled .reel-bar { height: 5px; }
  .reel-cord { top: 3px; left: auto; right: 12px; margin: 0; width: 132px; height: 50px; }
  .reel-cord .string { left: auto; right: 7px; height: 22px; }
  .reel-cord .handle { left: auto; right: 0; top: 20px; width: 16px; height: 16px; }
  .reel-cord .tag { left: auto; right: 22px; top: 15px; width: 84px; padding: 3px 4px 4px; rotate: -2deg; white-space: normal; text-align: center; font-size: 11.5px; }
}
/* No slider on touch screens (iPhones don't let a page set the volume) */
@media (hover: none) { .reel-volume { display: none; } }

/* No projector on phones, upright or on their side: the scraps go to Vimeo (js/reel.js) */
@media (max-width: 759px), (hover: none) and (max-height: 500px) { .reel-zone { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .lights { transition: opacity 0.4s ease; }
  .reel-video { transition: none; }
  .is-down .reel-bar, .is-tugged .reel-cord { animation: none; }
}

/* The "ai spec reel" tab: the whole paper takes the click, not just the words, as it's small on phones */
.reel-tab::after { content: ""; position: absolute; inset: calc(-14 * var(--u)) calc(-8 * var(--u)) calc(-10 * var(--u)) calc(-26 * var(--u)); }

/* "watch my ai spec reel" on Home: a torn scrap of paper
   that goes to the screen and pulls it down (js/reel.js). Lifts under the
   cursor, like the Instagram printout. */
.reel-scrap {
  display: block;
  text-decoration: none;
  filter: drop-shadow(calc(2 * var(--u)) calc(3 * var(--u)) calc(3 * var(--u)) rgb(0 0 0 / 0.38));
  transition: scale 0.18s ease, rotate 0.18s ease, filter 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.reel-scrap img { width: 100%; height: 100%; }
/* The lettering is etched into the film, so it's an image; the real words stay for screen readers */
.reel-scrap-text {
  position: absolute;
  inset: 18% 6% 6%;
  overflow: hidden;
  color: transparent;
  font-size: 1px;
  background: url("/media/reel/scrap-text.webp") center / contain no-repeat;
}
@media (hover: hover) {
  .reel-scrap:hover {
    scale: 1.07;
    rotate: calc(var(--r) + var(--mr, 0deg) - 1.5deg);
    filter: drop-shadow(calc(4 * var(--u)) calc(7 * var(--u)) calc(6 * var(--u)) rgb(0 0 0 / 0.42));
  }
}
.reel-scrap:active { scale: 0.97; }
.reel-scrap:focus-visible { outline: calc(2 * var(--u)) solid var(--card-heading); outline-offset: calc(1 * var(--u)); }
@media (prefers-reduced-motion: reduce) { .reel-scrap { transition: none; } }

/* The popcorn bucket (js/popcorn.js): a sticker that pops up in the corner
   opposite the goldfish once the screen is down, and drops away when it goes
   up. Above the rig; its pieces fly over the screen, from behind the bucket. */
.popcorn {
  position: fixed;
  right: 22px;
  bottom: -8px;       /* its art stops at the bucket's middle, so that edge stays below the window */
  z-index: 900200;
  width: 130px;
  height: 90px;
  padding: 0;
  border: 0;
  background: none;
  visibility: hidden;
  translate: 0 140%;
  transition: translate 0.22s ease-in, visibility 0s 0.22s;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;
}
.popcorn.is-up { visibility: visible; translate: 0 0; transition: translate 0.5s cubic-bezier(0.3, 1.2, 0.5, 1) 0.45s, visibility 0s; }
.popcorn .bucket {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: 50% 100%;
  filter: drop-shadow(1px 3px 3px rgb(0 0 0 / 0.5));
  transition: rotate 0.15s ease, scale 0.15s ease;
}
@media (hover: hover) { .popcorn:hover .bucket { rotate: -4deg; scale: 1.05; } }
.popcorn.is-popping .bucket { animation: popcorn-jolt 0.32s ease-out; }
@keyframes popcorn-jolt {
  0% { transform: scale(1.04, 0.93); }
  40% { transform: scale(0.98, 1.05); }
  100% { transform: none; }
}
/* "click to pop" in white handwriting, with her curved arrow (dark art, turned
   white by the filter; Deanna's request, 2026-11-02). Part of the button, so it
   arrives with the bucket and takes the click too; gone after the first pop,
   for the visit. */
.popcorn-cue {
  position: absolute;
  right: calc(100% + 12px);   /* clear of the bucket, even as it tilts on hover */
  top: -6px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  white-space: nowrap;
  rotate: -3deg;
  transition: opacity 0.3s ease;
}
.popcorn-cue img { display: block; height: auto; filter: brightness(0) invert(1) drop-shadow(0 1px 2px rgb(0 0 0 / 0.7)); }
.popcorn-cue img:first-child { width: 84px; margin-right: 8px; }   /* the arrow starts under the middle of the words */
.popcorn-cue .cue-arrow { width: 62px; }
.popcorn.is-popped .popcorn-cue { opacity: 0; pointer-events: none; }
.popcorn:focus-visible { outline: 2px solid #00ff9c; outline-offset: 2px; border-radius: 8px; }
.popcorn-pieces { position: fixed; inset: 0; z-index: 900190; overflow: hidden; pointer-events: none; }
.popcorn-piece { position: absolute; left: 0; top: 0; height: auto; will-change: transform; filter: drop-shadow(1px 2px 2px rgb(0 0 0 / 0.4)); }
@media (max-width: 759px) { .popcorn { right: 10px; bottom: -6px; width: 100px; height: 69px; } }
@media (prefers-reduced-motion: reduce) { .popcorn, .popcorn-pieces { display: none; } }

/* The look (Deanna's pick of three, 2026-10-30; the others are in git history):
   brushed aluminium, black cloth (Deanna's request, 2026-10-30), black steel bar.
   The room goes neutral dark, with the screen's white light on the wall. */
:root {
  --case-face: linear-gradient(#f2f3f4 0%, #c6c9cc 26%, #e0e2e4 42%, #9fa3a7 78%, #797d81 100%);
  --cap-face: linear-gradient(#55585b, #2a2c2e);
  --case-radius: 5px;
  --cap-radius: 5px;
  /* Matte black cloth: a fine pale grain, long soft waves from hanging, darker
     under the roller, a stitched hem above the bar, and only a trace of sheen */
  --cloth-colour: rgb(12 12 13 / 0.84);
  --cloth: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .75 0 0 0 0 .75 0 0 0 0 .72 0 0 0 .12 -.03'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  --folds: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='800' preserveAspectRatio='none'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.0035 .0004' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 .8 0 0 0 0 .8 0 0 0 0 .78 .12 0 0 0 -.04'/%3E%3C/filter%3E%3Crect width='1200' height='800' filter='url(%23f)'/%3E%3C/svg%3E");
  --sheen: linear-gradient(104deg, rgb(255 255 255 / 0) 20%, rgb(255 255 255 / 0.05) 38%, rgb(255 255 255 / 0) 56%);
  --roller-shadow: linear-gradient(rgb(20 18 15 / 0.36), rgb(20 18 15 / 0.09) 8px, rgb(20 18 15 / 0) 24px);
  --edge-falloff: linear-gradient(to right, rgb(40 36 30 / 0.13), rgb(40 36 30 / 0) 3.5%, rgb(40 36 30 / 0) 96.5%, rgb(40 36 30 / 0.13));
  --hem: linear-gradient(to top, rgb(235 233 226 / 0.06), rgb(235 233 226 / 0) 7px, rgb(235 233 226 / 0) 9px, rgb(235 233 226 / 0.1) 9px, rgb(235 233 226 / 0.1) 10px, rgb(235 233 226 / 0) 10px);
  --bar-face: linear-gradient(#4b4d50, #1f2022 55%, #101112);
  --bar-ink: #dcdcdc;
  --bar-radius: 4px;
  --cord-colour: #e8e6df;
  --handle-face: radial-gradient(circle at 35% 30%, #5a5c5f, #18191a);
  --handle-radius: 50%;
  --lights-bg: radial-gradient(ellipse 72% 76% at 50% 44%, rgb(15 15 18 / 0.76), rgb(8 8 10 / 0.9) 100%);
  --spill: 0 0 110px 22px rgb(255 255 250 / calc(var(--level, 0) * 0.17));
}
/* The firefly (js/firefly.js), a teaser for Deanna's short "Flicker": over
   everything but the popcorn, the loader and the cursor. The script moves it
   with transform alone; its transform is where its centre is. */
.firefly-layer { position: fixed; inset: 0; z-index: 900120; pointer-events: none; overflow: hidden; }
.firefly-layer[hidden] { display: none; }
.firefly {
  --s: 22px;      /* the art */
  --hit: 44px;    /* the tap target: round, so its corners take nothing */
  position: absolute; left: calc(var(--hit) / -2); top: calc(var(--hit) / -2);
  width: var(--hit); height: var(--hit);
  margin: 0; padding: 0; border: 0; border-radius: 50%; background: none; outline: none;
  pointer-events: auto;
  touch-action: manipulation;  /* a swipe that starts on it still scrolls */
  -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none;
  will-change: transform;
}
/* Only its round button takes the pointer: the glows reach well beyond it */
.firefly * { pointer-events: none; }
.ff-face { position: absolute; left: calc(50% - var(--s) / 2); top: calc(50% - var(--s) / 2); width: var(--s); height: var(--s); transition: transform 0.3s ease; }
.firefly.is-left .ff-face { transform: scaleX(-1); }
.ff-bob { position: absolute; inset: 0; animation: ff-bob 1.3s ease-in-out infinite alternate; }
.ff-bug { position: absolute; inset: 0; will-change: transform; }
.ff-art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
@keyframes ff-bob { from { transform: translateY(-1.5px); } to { transform: translateY(1.5px); } }
/* Wings: two little ellipses on its back, a blur of fluttering */
.ff-wing { position: absolute; left: 40%; top: 30%; width: 26%; height: 20%; background: rgb(255 255 255 / 0.4); border-radius: 50%; transform-origin: 55% 100%; animation: ff-flutter 0.11s linear infinite alternate; }
.ff-wing-b { --wr: -34deg; animation-delay: -0.055s; }
.ff-wing-f { --wr: -12deg; left: 40%; }
@keyframes ff-flutter { from { transform: rotate(var(--wr)) scaleY(1); } to { transform: rotate(calc(var(--wr) - 14deg)) scaleY(0.45); } }
/* The light at its tail, blinking: softly on, a moment lit, softly off, dark a while */
.ff-glow { position: absolute; left: 30%; top: 57.5%; width: 0; height: 0; animation: ff-blink var(--blink, 3s) ease-in-out infinite; }
.ff-halo, .ff-halo-dark, .ff-core { position: absolute; left: 0; top: 0; border-radius: 50%; transform: translate(-50%, -50%); }
.ff-halo { width: 76px; height: 76px; background: radial-gradient(circle, rgb(255 228 110 / 0.75), rgb(255 206 80 / 0.3) 35%, rgb(255 200 80 / 0) 70%); }
/* In the dark room (the reel's lights down) a wider, brighter glow joins it */
.ff-halo-dark { width: 120px; height: 120px; opacity: var(--dark, 0); background: radial-gradient(circle, rgb(255 230 120 / 0.7), rgb(255 205 85 / 0.25) 35%, rgb(255 200 80 / 0) 70%); }
.ff-core { width: 16px; height: 16px; background: radial-gradient(circle, #fffef2, #fff4a6 35%, rgb(255 226 92 / 0.8) 55%, rgb(255 220 90 / 0) 75%); }
@keyframes ff-blink { 0%, 100% { opacity: 0.12; } 18% { opacity: 1; } 42% { opacity: 0.95; } 62% { opacity: 0.12; } }


/* The "Flicker" sign it holds up: a scrap of the notes' paper on a little stick */
.ff-sign {
  position: absolute; left: 50%; bottom: calc(50% + 16px);
  display: flex; align-items: center; gap: 5px;
  padding: 4px 8px 5px;
  background: #fbf5e1 linear-gradient(170deg, rgb(255 255 255 / 0.5), rgb(230 220 190 / 0.35));
  border-radius: 1.5px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.25), 0 3px 8px rgb(0 0 0 / 0.18);
  transform: translateX(calc(-50% + var(--sign-dx, 0px))) rotate(-4deg) scale(0.6);
  transform-origin: 50% 100%;
  opacity: 0;
  transition: opacity 0.18s, transform 0.25s cubic-bezier(0.3, 1.5, 0.5, 1);
  pointer-events: none;
}
.ff-sign img { display: block; height: 17px; width: auto; }
.ff-play { display: block; width: 15px; height: 15px; flex: none; }
.ff-sign::after { content: ""; position: absolute; left: calc(50% - 0.75px - var(--sign-dx, 0px)); top: 100%; width: 1.5px; height: 13px; border-radius: 1px; background: #7a5634; }
.firefly.is-held .ff-sign { opacity: 1; transform: translateX(calc(-50% + var(--sign-dx, 0px))) rotate(-4deg) scale(1); }
.firefly.sign-below .ff-sign { bottom: auto; top: calc(50% + 16px); transform-origin: 50% 0; }
.firefly.sign-below .ff-sign::after { top: auto; bottom: 100%; }
/* With a mouse, "near it" counts: a wider circle, with a pointing hand (below) */
@media (pointer: fine) { .firefly { --hit: 72px; } }

/* Cursor on desktop: a mint neon notched arrow with a dark outline (Deanna's
   pick, option C, 2026-10-19), matching the scrollbar. Last in the file so
   it wins over the elements' own cursor: pointer. Over links and other
   clickable things, the same arrow a little larger with a soft glow. The
   click point is the tip (2, 2). Text fields keep the text cursor; stickers
   keep their grab hand; phones are unchanged. */
@media (pointer: fine) {
  html { cursor: url("/media/cursor/arrow.svg") 2 2, auto; }
  :is(a[href], button, label, select, summary, [role="button"], .cue, .slideshow .arrow, .swing[data-swing="hover"], .bubble-fish) {
    cursor: url("/media/cursor/arrow-link.svg") 2 2, pointer;
  }
  :is(input:not([type="button"], [type="submit"], [type="checkbox"], [type="radio"], [type="range"]), textarea, [contenteditable="true"]) { cursor: text; }
  /* The volume slider (and its handle, also while dragging) keeps the green arrow */
  input[type="range"] { cursor: url("/media/cursor/arrow-link.svg") 2 2, pointer; }
  /* The firefly: a pointing hand anywhere near it, so it reads as clickable (Deanna's request) */
  .firefly-layer .firefly { cursor: pointer; }
  .is-rolled .reel-cord > *, .is-rolled .reel-bar { cursor: grab; }
  .is-pulling .reel-cord > *, .is-pulling .reel-bar { cursor: grabbing; }
}
