/* ─────────────────────────────────────────────────────────────
   THE EGGPLANT FILES — noir dossier theme
   A dark "desk" background with paper case files on top.
   ───────────────────────────────────────────────────────────── */
:root {
  --desk: #16111c;
  --desk-2: #221831;
  --paper: #f1e8d4;
  --paper-2: #e7dcc2;
  --paper-edge: #d6c7a6;
  --ink: #221c17;
  --ink-soft: #544a3f;
  --ink-faint: #8a7d6c;
  --eggplant: #5b2a86;
  --eggplant-2: #7c3fb3;
  --eggplant-glow: #b681ef;
  --stamp: #b3261e;
  --leaf: #3f7a3a;
  --highlight: #ffe86b;
  --sticky: #fff1a1;
  --terminal: #0f1410;
  --terminal-ink: #8df58a;
  --on-desk: #e9e1f3;
  --on-desk-soft: #b9adc9;
  --radius: 6px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 18px 40px rgba(0, 0, 0, .45), 0 2px 6px rgba(0, 0, 0, .3);
  --font-type: "Special Elite", "Courier New", monospace;
  --font-body: "Courier Prime", "Courier New", ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(124, 63, 179, .35), transparent 60%),
    radial-gradient(900px 500px at 100% 100%, rgba(179, 38, 30, .12), transparent 60%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .012) 0 2px, transparent 2px 7px),
    var(--desk);
  background-attachment: fixed;
  color: var(--on-desk);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}

[hidden] { display: none !important; }

a { color: var(--eggplant-glow); }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--highlight); outline-offset: 2px; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--highlight); color: #000; padding: 8px 12px; border-radius: 4px;
}
.skip:focus { left: 8px; }

/* ───────────── HUD ───────────── */
#hud {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px;
  padding: 10px 16px;
  background: rgba(22, 17, 28, .88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(182, 129, 239, .25);
}
.brand {
  background: none; border: 0; padding: 4px 0;
  font-family: var(--font-type); font-size: 1.05rem; letter-spacing: .04em; text-transform: uppercase;
  color: var(--on-desk); white-space: nowrap;
}
.brand-egg { width: 1.7em; height: 1.7em; vertical-align: -0.5em; filter: drop-shadow(0 0 3px rgba(182, 129, 239, .45)); }
.stats { display: flex; gap: 16px; align-items: center; }
.stat { display: inline-flex; align-items: center; gap: 6px; font-size: .95rem; }
.stat b { font-family: var(--font-type); font-size: 1.15rem; min-width: 1ch; }
.stat small { color: var(--on-desk-soft); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.meter { display: inline-flex; gap: 2px; }
.meter i { width: 6px; height: 14px; border-radius: 1px; background: rgba(255, 255, 255, .14); }
.meter i.on { background: #6fd66a; }
.meter.low i.on { background: #ff6a5a; animation: pulse 1s ease-in-out infinite; }
.tools { display: flex; gap: 6px; margin-left: auto; } /* when the bar wraps on a narrower screen, the tools stay on the right */
.tools button {
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px; padding: 5px 11px; font-size: .9rem; white-space: nowrap;
}
.tools button:hover { background: rgba(182, 129, 239, .2); border-color: var(--eggplant-glow); }

/* ───────────── Layout ───────────── */
main { max-width: 860px; margin: 0 auto; padding: 32px 16px 24px; outline: none; }

.dossier, .cover-folder {
  position: relative;
  background:
    radial-gradient(140px 140px at 92% 8%, rgba(120, 80, 30, .10) 38%, rgba(120, 80, 30, .16) 40%, transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, .35), transparent 120px),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .018) 0 1px, transparent 1px 3px),
    var(--paper);
  color: var(--ink);
  border-radius: 2px var(--radius) var(--radius) var(--radius);
  box-shadow: var(--shadow);
  padding: 44px clamp(18px, 5vw, 56px) 40px;
  margin-top: 28px;
  animation: slide-in .45s ease-out both;
}
.folder-tab {
  position: absolute; top: -28px; left: 0;
  background: var(--paper-2); color: var(--ink-soft);
  font-family: var(--font-type); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
  padding: 6px 16px 4px; border-radius: 8px 8px 0 0;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, .2);
  max-width: calc(100% - 20px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stamp {
  position: absolute; top: 22px; right: clamp(14px, 4vw, 40px);
  font-family: var(--font-type); text-transform: uppercase; letter-spacing: .12em;
  color: var(--stamp); border: 3px solid var(--stamp); border-radius: 4px;
  padding: 2px 10px; font-size: .85rem;
  transform: rotate(8deg); opacity: .7;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.scene-head { margin-bottom: 22px; padding-right: 110px; }
.chapter {
  margin: 0 0 6px; font-family: var(--font-type); text-transform: uppercase; letter-spacing: .1em;
  color: var(--eggplant); font-size: .85rem;
}
.scene-head h1, .cover h1 {
  margin: 0; font-family: var(--font-type); font-weight: 400;
  font-size: clamp(1.7rem, 4.6vw, 2.6rem); line-height: 1.12; outline: none;
}
.timestamp { margin: 10px 0 0; color: var(--ink-soft); font-size: .9rem; letter-spacing: .04em; }

/* ───────────── Outcome sticky note ───────────── */
.outcome {
  position: relative;
  background: var(--sticky); color: #2c2610;
  padding: 18px 20px 14px; margin: 6px 0 28px;
  transform: rotate(-.6deg);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
  animation: drop-in .5s cubic-bezier(.2, 1.4, .4, 1) both;
}
.outcome .tape {
  position: absolute; top: -10px; left: 50%; width: 90px; height: 22px; margin-left: -45px;
  background: rgba(255, 255, 255, .55); transform: rotate(-3deg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .1);
}
.outcome p { margin: 0 0 8px; }
.you-chose { font-size: .88rem; color: #6b5d1c; }
.you-chose span { font-family: var(--font-type); text-transform: uppercase; letter-spacing: .08em; margin-right: 4px; }
.outcome .result { font-size: 1.02rem; }
.gains { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.gains li {
  font-size: .8rem; padding: 3px 9px; border-radius: 999px;
  background: rgba(0, 0, 0, .07); border: 1px solid rgba(0, 0, 0, .12);
}
.gains .up { background: #d7f5d0; border-color: #8fcf84; }
.gains .down { background: #ffd9d3; border-color: #f0998c; }
.gains .debt { background: #eadcf7; border-color: #b890de; }
.gains .exhibit { background: #fff; border-color: #cbb88c; }
.gains .bingo { background: #dfe9ff; border-color: #95b0ec; }

/* ───────────── Media ───────────── */
.media { margin: 0 0 30px; display: grid; gap: 18px; }
.media-row { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; align-items: start; }
.tapes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 18px; align-items: start; }
.m { margin: 0; }
.m figcaption { font-size: .82rem; color: var(--ink-soft); margin-top: 8px; text-align: center; }

.polaroid {
  position: relative; background: #fff; padding: 12px 12px 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .22); transform: rotate(.4deg);
}
.polaroid img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #222; }
.clip {
  position: absolute; top: -14px; left: 28px; width: 18px; height: 46px; z-index: 2;
  border: 3px solid #8d8d95; border-radius: 10px; border-bottom-color: transparent;
}

.ph { display: none; }
.m[data-state="missing"] .ph { display: flex; }
.m-image[data-state="missing"] img { display: none; }
.m-video[data-state="missing"] video { display: none; }
.m-audio[data-state="missing"] .deck, .m-audio[data-state="missing"] .reels { opacity: .35; }

.ph-image {
  aspect-ratio: 16 / 9; width: 100%;
  flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
  background:
    radial-gradient(circle at 50% 40%, rgba(124, 63, 179, .55), transparent 60%),
    linear-gradient(135deg, #1c1426, #2b1d3b);
  color: #efe6ff; padding: 16px;
}
.ph-icon { font-size: clamp(3rem, 12vw, 5.5rem); line-height: 1; filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .5)); }
.ph-label { font-family: var(--font-type); text-transform: uppercase; letter-spacing: .14em; font-size: .85rem; }
.ph-sub { font-size: .78rem; opacity: .75; }

.crt {
  position: relative; background: #0b0b0d; border-radius: 14px; padding: 10px;
  box-shadow: inset 0 0 0 2px #2a2a31, 0 10px 24px rgba(0, 0, 0, .3);
}
.crt video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 6px; background: #000; }
.ph-video {
  aspect-ratio: 16 / 9; width: 100%; border-radius: 6px;
  flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  color: #c9c9d1; padding: 12px; position: relative; overflow: hidden;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 3px),
    radial-gradient(circle at 50% 50%, #26262e, #0c0c10);
}
.ph-video::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, .06) 50%, transparent 100%);
  animation: scan 3.5s linear infinite;
}
.rec { position: absolute; top: 10px; left: 12px; font-size: .75rem; letter-spacing: .1em; color: #ff5a4e; display: flex; align-items: center; gap: 6px; }
.rec i { width: 9px; height: 9px; border-radius: 50%; background: #ff3b30; animation: blink 1.2s steps(2, start) infinite; }

.m-audio { display: flex; flex-direction: column; } /* a 3D cassette over its deck; the caption stays inside the figure */
.ph-audio { flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.ph-audio .ph-label { color: #ff9b8f; }

.dev-info { margin-top: 8px; font-size: .72rem; line-height: 1.4; text-align: left; max-width: 100%; }
.dev-info code { display: inline-block; background: rgba(255, 232, 107, .9); color: #000; padding: 1px 6px; border-radius: 3px; word-break: break-all; }
.dev-info p { margin: 6px 0 0; opacity: .85; }

/* ───────────── Body copy ───────────── */
.body p { margin: 0 0 1em; }
.body strong { color: var(--eggplant); }

.transcript {
  margin: 1.2em 0; padding: 14px 18px;
  background: rgba(91, 42, 134, .07);
  border-left: 5px solid var(--eggplant);
}
.transcript .who {
  display: block; font-family: var(--font-type); font-size: .75rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--eggplant); margin-bottom: 4px;
}
.transcript p { margin: 0; font-size: 1.12rem; font-weight: 700; }

.analyst {
  margin: 1.4em 0; padding: 14px 18px 12px; position: relative;
  border: 2px dashed rgba(179, 38, 30, .55); border-radius: 4px;
  background: rgba(179, 38, 30, .04);
}
.analyst .tag {
  position: absolute; top: -12px; left: 12px; background: var(--paper);
  padding: 0 8px; font-family: var(--font-type); font-size: .75rem; letter-spacing: .12em;
  color: var(--stamp); text-transform: uppercase;
}
.analyst p { margin: 0; font-size: .95rem; }

.document {
  margin: 1.4em 0; padding: 22px 22px 16px; background: #fbf8f0;
  border: 1px solid var(--paper-edge);
  box-shadow: 0 0 0 6px rgba(182, 129, 239, .12), 0 8px 18px rgba(0, 0, 0, .12);
  border-radius: 3px;
}
.document h3 {
  margin: 0 0 12px; text-align: center; font-family: var(--font-type); font-weight: 400;
  text-transform: uppercase; letter-spacing: .08em; font-size: 1.05rem;
  border-bottom: 2px double var(--ink-faint); padding-bottom: 8px;
}
.document p { margin: 0 0 .7em; font-size: .95rem; }
.document.fold > summary { list-style: none; cursor: pointer; }
.document.fold > summary::-webkit-details-marker { display: none; }
.document.fold:not([open]) { padding-bottom: 14px; }
.document.fold:not([open]) h3 { margin-bottom: 8px; }
.fold-hint {
  display: block; text-align: center; font-family: var(--font-type); font-size: .8rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--stamp);
}
.fold-hint::before { content: "🔒 "; }
.document.fold[open] .fold-hint { display: none; }
.document.fold > summary:focus-visible { outline: 2px solid var(--eggplant-glow); outline-offset: 4px; }
.signatures { display: flex; justify-content: space-between; gap: 8px; margin-top: 16px; font-size: .85rem; color: var(--ink-faint); flex-wrap: wrap; }

.phone {
  margin: 1.2em auto; max-width: 360px; padding: 16px 14px;
  background: #101014; border-radius: 26px; box-shadow: inset 0 0 0 3px #2a2a30, 0 10px 24px rgba(0, 0, 0, .25);
  display: flex; flex-direction: column; gap: 8px;
}
.bubble {
  max-width: 82%; padding: 8px 12px; border-radius: 18px; font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: .95rem; line-height: 1.35;
}
.bubble.them { background: #3a3a40; color: #fff; align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble.me { background: #6b37a3; color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.bubble.system { background: none; color: #a8a8b3; align-self: center; text-align: center; font-size: .85rem; }
.bubble .meta { display: block; font-size: .7rem; opacity: .65; margin-top: 3px; }

.terminal {
  margin: 1.2em 0; padding: 16px 18px; background: var(--terminal); color: var(--terminal-ink);
  border-radius: 6px; overflow-x: auto; font-size: .92rem; line-height: 1.5;
  box-shadow: inset 0 0 0 1px #1f3a1f;
}

.redact {
  border: 0; padding: 0 2px; margin: 0; background: #111; color: transparent; border-radius: 2px;
  font: inherit; line-height: inherit; cursor: pointer; position: relative; text-align: left;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.redact span { color: transparent; }
.redact:hover, .redact:focus-visible { background: #2c2233; }
.redact:hover::after {
  content: "declassify?"; position: absolute; left: 50%; top: -22px; transform: translateX(-50%);
  font-size: .7rem; color: #fff; background: var(--stamp); padding: 1px 6px; border-radius: 3px; white-space: nowrap;
}
mark.declassified {
  background: linear-gradient(transparent 35%, var(--highlight) 35%, var(--highlight) 88%, transparent 88%);
  color: inherit; padding: 0 2px; animation: reveal .5s ease-out;
}

/* ───────────── Choices ───────────── */
.choices { margin-top: 34px; border-top: 2px dashed var(--ink-faint); padding-top: 22px; }
.choices h2 {
  margin: 0 0 14px; font-family: var(--font-type); font-weight: 400; font-size: 1.2rem;
  text-transform: uppercase; letter-spacing: .08em; color: var(--eggplant);
}
.choices ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.choice {
  width: 100%; display: flex; gap: 14px; align-items: flex-start; text-align: left;
  padding: 14px 16px; background: #fffdf6; color: var(--ink);
  border: 2px solid var(--ink); border-radius: 4px;
  box-shadow: 4px 4px 0 var(--eggplant);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  font-size: 1rem; line-height: 1.45;
}
.choice:hover, .choice:focus-visible { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--eggplant-2); background: #fff; }
.choice:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--eggplant); }
.choice .letter {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: var(--eggplant); color: #fff;
  font-family: var(--font-type); font-size: .95rem;
}
.choice .label { padding-top: 3px; }
.choice small { display: block; font-size: .8rem; color: var(--ink-faint); margin-top: 4px; }
.choice.locked { background: transparent; border-style: dashed; border-color: var(--ink-faint); box-shadow: none; color: var(--ink-faint); cursor: not-allowed; }
.choice.locked .letter { background: none; }
.choice.locked:hover { transform: none; }
.kbd-hint { margin: 14px 0 0; font-size: .78rem; color: var(--ink-faint); }
kbd { font-family: var(--font-body); border: 1px solid var(--ink-faint); border-bottom-width: 2px; border-radius: 3px; padding: 0 5px; background: #fff; }

/* ───────────── Endings ───────────── */
.ending-panel { margin-top: 34px; border-top: 2px dashed var(--ink-faint); padding-top: 26px; position: relative; overflow-x: clip; }
.stamp-big {
  display: inline-block; font-family: var(--font-type); text-transform: uppercase; letter-spacing: .15em;
  font-size: clamp(1.6rem, 6vw, 2.4rem); color: var(--stamp); border: 5px double var(--stamp);
  padding: 4px 18px; transform: rotate(-6deg); opacity: .85; margin: 0 0 18px;
  animation: stamp .45s cubic-bezier(.2, 1.6, .4, 1) both .15s;
}
.grade-best .stamp-big, .grade-good .stamp-big { color: var(--leaf); border-color: var(--leaf); }
.rank { font-family: var(--font-type); font-size: 1.25rem; margin: 0 0 16px; }
.rank span { display: block; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
.ledger { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 8px 24px; }
.ledger div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dotted var(--ink-faint); padding: 4px 0; }
.ledger dt { color: var(--ink-soft); }
.ledger dd { margin: 0; font-weight: 700; }
.ledger .owed dd { color: var(--leaf); }
.fine-print { font-size: .8rem; color: var(--ink-faint); margin: 8px 0 18px; font-style: italic; }
.badges { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.badges li { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; background: #fffdf6; border: 1px solid var(--paper-edge); border-radius: 6px; padding: 8px 10px; }
.badges li span { font-size: 1.6rem; grid-row: span 2; }
.badges small { color: var(--ink-faint); font-size: .75rem; line-height: 1.3; }
.tip { background: rgba(91, 42, 134, .08); padding: 10px 14px; border-radius: 4px; font-size: .92rem; }
.endings-found h3 { font-family: var(--font-type); font-weight: 400; text-transform: uppercase; letter-spacing: .08em; font-size: .95rem; margin: 22px 0 8px; }
.endings-found ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.endings-found li { padding: 8px 10px; border: 1px dashed var(--ink-faint); border-radius: 4px; font-size: .88rem; color: var(--ink-faint); }
.endings-found li.got { border-style: solid; color: var(--ink); background: #fffdf6; }
.endings-found li.current { border-color: var(--eggplant); box-shadow: 0 0 0 2px rgba(91, 42, 134, .25); }
.end-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

.btn {
  padding: 11px 18px; border-radius: 4px; border: 2px solid var(--ink); background: #fffdf6; color: var(--ink);
  font-family: var(--font-type); letter-spacing: .04em; font-size: 1rem;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover, .btn:focus-visible { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn.primary { background: var(--eggplant); color: #fff; border-color: #2d1245; box-shadow: 3px 3px 0 #2d1245; }

/* ───────────── Cover ───────────── */
.cover { padding-top: 24px; }
.cover-folder { text-align: center; padding-top: 56px; }
.cover-emoji { font-size: clamp(4.5rem, 18vw, 7.5rem); line-height: 1; margin-bottom: 6px; animation: wobble 4s ease-in-out infinite; position: relative;
  display: inline-grid; place-items: center; width: clamp(124px, 34vw, 200px); height: clamp(124px, 34vw, 200px); }
/* On short screens the eggplant shrinks (and the folder starts higher) so the first button stays where it was. */
@media (max-height: 760px) { .cover-emoji { width: clamp(112px, 30vw, 124px); height: clamp(112px, 30vw, 124px); font-size: 4.5rem; } }
@media (max-height: 700px) { .cover-folder { padding-top: 28px; } .cover-emoji { width: 100px; height: 100px; } }
/* The 3D eggplant (js/eggplant3d.js) draws into the cover's slot; the emoji shows until it's ready, or for good without WebGL. */
.cover-emoji.is-3d { animation: none; }
.egg-glyph { animation: wobble 4s ease-in-out infinite; transition: opacity .5s ease; }
.egg3d { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .7s ease; touch-action: pan-y pinch-zoom; cursor: grab; }
.egg3d:active { cursor: grabbing; }
.cover-emoji.is-ready .egg3d { opacity: 1; }
.cover-emoji.is-ready .egg-glyph { opacity: 0; }
/* The eggplant system (js/eggplant-play.js): the play stage around the cover slot, the hit buttons, the DOM and
   sprite views, and the parked canvas. */
.cover-emoji.is-play { z-index: 2; }                 /* carried fruit draws over the title */
.cover-emoji.is-play .egg3d { inset: -45%; width: 190%; height: 190%; pointer-events: none; touch-action: auto; cursor: default; }
.cover-emoji.is-lite .egg3d { inset: -15%; width: 130%; height: 130%; }
.egg-hit { position: absolute; inset: 0; background: none; border: 0; padding: 0; border-radius: 50%; cursor: grab; touch-action: none; -webkit-tap-highlight-color: transparent; z-index: 3; }
.egg-hit:active { cursor: grabbing; }
.egg-hit:focus-visible { outline: 3px solid var(--eggplant-2); outline-offset: 4px; }
.egg-dom { position: absolute; pointer-events: none; will-change: auto; }
.egg-dom::after, .egg-glyph::after { content: ""; position: absolute; left: 10%; right: 10%; bottom: -6%; height: 18%; border-radius: 50%; background: radial-gradient(closest-side, rgba(48,34,26,.6), rgba(48,34,26,0)); transform: scale(calc(1 + .3 * var(--lift, 0))); opacity: calc(.9 - .55 * var(--lift, 0)); }
.egg-glyph { position: relative; display: inline-block; } /* an in-flow grid item (it keeps the slot's baseline) that carries the same contact shadow */
.egg-sprite { position: absolute; pointer-events: none; }
.is-thud { animation: none; }                        /* jolts are WAAPI transforms */
.egg-park { display: none; }
/* M1: the Invoice stage on Chapter 6 (the fruit served after the SACRIFICE transcript), the chalk outline, the nod */
.egg-stage { position: relative; height: clamp(150px, 42vw, 200px); margin: 14px 0 18px; overflow: hidden; touch-action: pan-y; }
.egg-stage--desk {
  /* the desk: a pencil-dashed edge at the rest height and a faint shade below it, so the fruit sits on something */
  background:
    repeating-linear-gradient(90deg, var(--ink-faint) 0 5px, transparent 5px 9px) 0 88% / 100% 1px no-repeat,
    linear-gradient(180deg, transparent 88%, rgba(0,0,0,.09));
}
.egg-stage .egg3d { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 1; transition: none; touch-action: auto; cursor: default; }
.egg-stage.is-lost .egg3d { visibility: hidden; } /* a lost WebGL context: the PNG shows on the same body until it is back */
.egg-stage .egg-dom, .egg-stage .egg-twin { position: absolute; left: 50%; top: 0; pointer-events: none; }
.egg-shadow { position: absolute; left: 50%; pointer-events: none; border-radius: 50%; background: radial-gradient(closest-side, rgba(48,34,26,.6), rgba(48,34,26,0)); }
.egg-grip { position: absolute; left: 0; top: 0; width: 40%; height: 70%; border: 0; padding: 0; background: none; border-radius: 50%; touch-action: none; cursor: grab; -webkit-tap-highlight-color: transparent; }
.egg-grip:active { cursor: grabbing; }
.egg-grip:focus-visible { outline: 3px solid var(--eggplant-2); outline-offset: 2px; }
.egg-string { position: absolute; top: 0; left: 50%; width: 0; height: 0; border-left: 1px dashed var(--ink-soft); pointer-events: none; visibility: hidden; }
.egg-string.is-visible { visibility: visible; }
.egg-chalk { display: block; height: 56px; margin: 4px 0 0 auto; width: 96px; overflow: visible; }
.egg-chalk path { fill: none; stroke: var(--ink-faint); stroke-width: 1.5; stroke-dasharray: 4 3; }
.egg-nod { position: absolute; top: 8px; right: 10px; width: 40px; height: 40px; transform-origin: 50% 90%; }
/* M3: the paperweight on the casefile's coffee ring (the match cut from the cover): the live canvas or a sheet sprite
   in a slot that is the article's first child, measured at mount so it never touches the chapter line */
.egg-weight { position: absolute; top: 60px; right: 24px; width: 84px; height: 84px; z-index: 1; }
.egg-weight .egg3d, .egg-weight .egg-sprite { position: absolute; inset: -30%; width: 160%; height: 160%; pointer-events: none; }
.egg-weight .egg3d { opacity: 1; transition: none; touch-action: auto; cursor: default; }
.egg-weight.is-lost .egg3d { visibility: hidden; } /* a lost WebGL context: the sprite shows on the same body until it is back */
.egg-weight .egg-hit { inset: 0; }
.egg-weight.is-small { width: 48px; height: 48px; }
/* the paperweight lies on the stamp (it pins the ink, not the other way round); the stamp stays decorative and lets pointers through */
@media (max-width: 720px) { .egg-weight { top: 6px; right: 8px; width: 56px; height: 56px; } .egg-weight.is-small { width: 48px; height: 48px; } }
/* M4: the verdict's eggplant under the Case Closed stamp (a sprite and its hit at the ending panel's top right; nothing
   in the flow). M5: the harvest's railing canvas across the panel, hung on its dashed top border, and a hit per fruit. */
.egg-verdict { position: absolute; top: 8px; right: 16px; width: 72px; height: 72px; }
.egg-verdict-hit { inset: 8px 16px auto auto; width: 72px; height: 72px; }
.egg-verdict-shadow { left: auto; }
@media (max-width: 720px) { .egg-verdict, .egg-verdict-hit { width: 60px; height: 60px; } }
.egg-harvest { position: absolute; left: 0; right: 0; top: -42px; height: 84px; pointer-events: none; }
.egg-pluck { inset: -42px auto auto 50%; width: 64px; height: 84px; margin-left: -32px; }
/* The witness (M6): the brand's live sprite over its PNG (the same box, measured on mount), lit for the dark header. */
.brand { position: relative; }
.brand-egg-live { position: absolute; width: 1.7em; height: 1.7em; left: 0; top: 50%; margin-top: -0.85em; transform-origin: 50% 85%; pointer-events: none; filter: brightness(2) drop-shadow(0 0 3px rgba(182, 129, 239, .45)); }
.brand-egg.is-hidden { opacity: 0; }
/* Reopen the case (M8): the button's glyph as a sprite, the span the glyph's own width. */
.egg-ico { display: inline-block; width: 1em; height: 1em; vertical-align: -.15em; margin-right: .25em; }
.egg-ico canvas { width: 100%; height: 100%; display: block; transform-origin: 50% 100%; filter: brightness(1.7); }
.cover h1 { font-size: clamp(2.3rem, 8vw, 4.2rem); text-transform: uppercase; letter-spacing: .04em; }
.tagline { font-size: 1.15rem; color: var(--eggplant); margin: 10px 0 4px; font-weight: 700; }
.subtitle { color: var(--ink-soft); max-width: 52ch; margin: 8px auto 24px; }
.cover-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 26px; }
.how { list-style: none; padding: 0; margin: 0 auto; max-width: 560px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: left; font-size: .9rem; }
.how li { display: flex; }
.how-card {
  position: relative; flex: 1; display: block; padding: 8px 28px 8px 10px; color: inherit; text-decoration: none;
  background: rgba(255, 255, 255, .5); border: 1px solid var(--paper-edge); border-radius: 4px;
  transition: transform .12s, box-shadow .12s, border-color .12s, background .12s;
}
.how-card:hover, .how-card:focus-visible { background: #fffdf6; border-color: var(--eggplant-2); transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--eggplant-2); }
.how-card:focus-visible { outline: 2px solid var(--eggplant-2); outline-offset: 2px; }
.how b { display: block; color: var(--eggplant); }
.how-go { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--eggplant-2); font-weight: 700; transition: transform .12s; }
.how-card:hover .how-go, .how-card:focus-visible .how-go { transform: translate(3px, -50%); }
.found { margin: 18px 0 0; font-family: var(--font-type); color: var(--leaf); }
.content-note { margin: 22px auto 0; font-size: .8rem; color: var(--ink-faint); max-width: 50ch; }

/* ───────────── Dialogs ───────────── */
dialog {
  width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
  padding: 0; border: 0; border-radius: var(--radius);
  background: var(--paper); color: var(--ink); box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(10, 6, 14, .72); backdrop-filter: blur(3px); }
.dlg-head {
  position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center;
  padding: 14px 20px; background: var(--paper-2); border-bottom: 1px solid var(--paper-edge);
}
.dlg-head h2 { margin: 0; font-family: var(--font-type); font-weight: 400; font-size: 1.3rem; }
.dlg-close { background: none; border: 0; font-size: 1.2rem; padding: 4px 8px; }
#dlg-confirm { width: min(580px, calc(100vw - 32px)); }
.confirm-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.dlg-body { padding: 16px 20px 24px; }
.dlg-sub { margin: 0 0 16px; color: var(--ink-soft); font-size: .92rem; }
.exhibits { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.exhibits li { position: relative; background: #fffdf6; border: 1px solid var(--paper-edge); border-radius: 4px; padding: 12px; box-shadow: 0 3px 8px rgba(0, 0, 0, .08); }
.exhibits li.missing { background: transparent; border-style: dashed; color: var(--ink-faint); box-shadow: none; }
.ex-code { position: absolute; top: 8px; right: 10px; font-family: var(--font-type); font-size: .7rem; color: var(--stamp); letter-spacing: .08em; text-transform: uppercase; }
.ex-icon { font-size: 1.8rem; display: block; margin-bottom: 4px; }
.exhibits b { display: block; font-size: .95rem; line-height: 1.3; margin-bottom: 4px; }
.exhibits p { margin: 0; font-size: .82rem; line-height: 1.4; }
.bingo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 520px; margin: 0 auto; }
.sq {
  position: relative; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  text-align: center; padding: 8px; border: 2px solid var(--ink); background: #fffdf6; font-size: clamp(.7rem, 2.4vw, .9rem); line-height: 1.25;
}
.sq-icon { font-size: clamp(1.4rem, 5vw, 2rem); }
.sq.on { background: #efe3fb; }
.sq > span:not(.dab) { position: relative; z-index: 1; }
.dab {
  position: absolute; inset: 14%; border-radius: 50%; z-index: 0;
  background: rgba(124, 63, 179, .22); box-shadow: 0 0 0 3px rgba(124, 63, 179, .35);
  animation: dab .35s cubic-bezier(.2, 1.6, .4, 1) both;
}
.check {
  position: absolute !important; top: 6px; right: 8px;
  color: var(--eggplant); font-weight: 700; font-size: 1.1rem;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ───────────── Toasts & footer ───────────── */
#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast {
  background: #fffdf6; color: var(--ink); border-left: 5px solid var(--eggplant);
  padding: 10px 14px; border-radius: 4px; box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
  font-size: .9rem; max-width: min(360px, calc(100vw - 32px)); animation: toast-in .3s ease-out both;
}
.toast.big { border-left-color: var(--stamp); font-family: var(--font-type); font-size: 1.05rem; }
.toast.out { opacity: 0; transform: translateY(8px); transition: all .5s ease; }

.site-foot { max-width: 860px; margin: 0 auto; padding: 8px 16px 40px; color: var(--on-desk-soft); font-size: .8rem; text-align: center; }
.site-foot p { margin: 6px 0; }
.noscript { color: var(--on-desk); text-align: center; }

/* ───────────── Motion ───────────── */
@keyframes slide-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes drop-in { from { opacity: 0; transform: translateY(-12px) rotate(-3deg); } to { opacity: 1; transform: rotate(-.6deg); } }
@keyframes stamp { from { opacity: 0; transform: scale(2.2) rotate(-6deg); } to { opacity: .85; transform: scale(1) rotate(-6deg); } }
@keyframes dab { from { opacity: 0; transform: scale(1.8); } to { opacity: 1; transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { to { visibility: hidden; } }
@keyframes scan { from { transform: translateY(-100%); } to { transform: translateY(100%); } }
@keyframes pulse { 50% { opacity: .45; } }
@keyframes wobble { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes reveal { from { background-size: 0 100%; opacity: .2; } to { opacity: 1; } }
/* A toast lands instead of fading in (M7): up from below, a 3 px overshoot at 70 %, a one-frame squash on impact
   (origin at the bottom), done in 320 ms; .big drops from 24 px, overshoots 4 px and lands with a scale(.9), 380 ms. */
@keyframes toast-in {
  0% { opacity: 0; transform: translateY(var(--toast-drop, 18px)); animation-timing-function: cubic-bezier(.2, .7, .3, 1); }
  70% { opacity: 1; transform: translateY(var(--toast-over, -3px)); animation-timing-function: ease-in; }
  82% { transform: translateY(0) var(--toast-impact, scaleY(.94)); animation-timing-function: ease-out; }
  100% { opacity: 1; transform: none; }
}
.toast { transform-origin: bottom; animation-duration: .32s; animation-timing-function: linear; }
.toast.big { --toast-drop: 24px; --toast-over: -4px; --toast-impact: scale(.9); animation-duration: .38s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ───────────── Small screens ───────────── */
@media (max-width: 720px) {
  body { font-size: 16px; }
  #hud { flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
  .brand span { display: none; }
  .stats { gap: 12px; order: 3; width: 100%; justify-content: space-between; }
  .stat small { display: none; }
  .tools { gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
  .tools button { padding: 5px 8px; }
  .media-row { grid-template-columns: 1fr; }
  .scene-head { padding-right: 0; margin-top: 26px; }
  .stamp { top: 12px; font-size: .7rem; }
  .how { grid-template-columns: 1fr; }
  main { padding-top: 24px; }
}

/* ───────────── Field Manual, Their Dossier, 4×4 bingo, build stamp ───────────── */
.gains .dossier { background: #fde8e8; border-color: #e8a9a9; }
.gains .script { background: #e6f4e6; border-color: #9fcf9f; }
.choices.single ol { max-width: 560px; }
.bingo-grid.cols-4 { max-width: 640px; }
.bingo-grid.cols-4 .sq { padding: 8px 6px; font-size: .74rem; line-height: 1.2; }
.sq { min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
@media (max-width: 480px) { .bingo-grid.cols-4 { gap: 4px; } .bingo-grid.cols-4 .sq { padding: 6px 2px; font-size: .62rem; letter-spacing: -.02em; } }
.bingo-grid.cols-4 .sq-icon { font-size: clamp(1.1rem, 4vw, 1.5rem); }
.scripts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.scripts li { background: #fffdf6; border: 1px solid var(--paper-edge); border-left: 4px solid var(--leaf); border-radius: 4px; padding: 12px 14px; }
.scripts li.missing { border-left-color: var(--ink-faint); border-style: dashed; border-left-style: solid; color: var(--ink-faint); background: transparent; }
.scripts .sc-name { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 4px; }
.scripts .sc-line { margin: 0; font-family: var(--font-type); font-size: 1.02rem; line-height: 1.45; }
.scripts li.missing .sc-line { font-family: inherit; font-size: .88rem; }
.scripts .sc-when { margin: 6px 0 0; font-size: .78rem; color: var(--ink-soft); }
.site-foot .build { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .72rem; opacity: .7; }

/* ───────────── External evidence (outbound links) ───────────── */
.links { margin: 0 0 30px; padding: 14px 18px; border: 1px dashed var(--eggplant-2); border-radius: 10px; background: rgba(124, 63, 179, .06); }
.links h2 { margin: 0 0 10px; font-family: var(--font-type); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--eggplant-2); }
.links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.links a { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; color: var(--ink); text-decoration: none; }
.links a b { text-decoration: underline; text-decoration-color: var(--eggplant-2); text-underline-offset: 3px; }
.links a:hover b, .links a:focus-visible b { color: var(--eggplant-2); }
.links a small { color: var(--ink-soft); font-family: var(--font-type); font-size: .75rem; }
.links a::after { content: "↗"; color: var(--eggplant-2); font-size: .85rem; }
.links a.internal::after { content: "→"; }
.links li p { margin: 4px 0 0; font-size: .9rem; color: var(--ink-soft); }
/* Links written inside the story text: [text](https://…) or a pasted address. */
a.inline-link { color: var(--eggplant-2); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
a.inline-link:hover, a.inline-link:focus-visible { color: var(--ink); }
a.inline-link:not(.internal)::after { content: "↗"; margin-left: 2px; font-size: .8em; text-decoration: none; display: inline-block; }

/* ───────────── “Unbroken”: Now Playing cards, clips, lyric sheet ───────────── */
.analyst.tagged { border-color: rgba(91, 42, 134, .55); background: rgba(91, 42, 134, .05); }
.analyst.tagged .tag { color: var(--eggplant); }

.track-card {
  margin: 1.8em 0 1.4em; padding: 16px 18px 18px; border-radius: 10px; position: relative; overflow: hidden;
  color: #f4ecff; background: radial-gradient(120% 140% at 0% 0%, #4a1f6e 0%, #241033 55%, #140a1d 100%);
  box-shadow: 0 0 0 1px rgba(182, 129, 239, .35), 0 12px 26px rgba(20, 8, 30, .35);
}
.track-card::after { /* a faint groove pattern, like a record under the lyric */
  content: ""; position: absolute; right: -70px; top: -70px; width: 220px; height: 220px; border-radius: 50%; pointer-events: none;
  background: repeating-radial-gradient(circle, rgba(255, 255, 255, .06) 0 1px, transparent 1px 6px);
}
.tc-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 10px; font-family: var(--font-type); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; }
.tc-now { color: var(--highlight); }
.tc-now::before { content: "● "; color: #ff4d6d; }
.tc-name { color: #cdb8e8; }
.tc-lyric { margin: 0 0 12px; position: relative; z-index: 1; }
.tc-lyric p { margin: 0; font-family: var(--font-body); font-weight: 700; font-style: italic; font-size: clamp(1.25rem, 4.2vw, 1.7rem); line-height: 1.3; color: #fff; text-wrap: balance; }
.tc-his { display: inline-block; font-family: var(--font-type); font-style: normal; font-weight: 400; font-size: .82rem; color: var(--highlight); transform: rotate(-2deg); }
.tc-lyric cite { display: block; margin-top: 6px; font-style: normal; font-size: .78rem; color: #b9a6d3; }
.tc-where { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: .8rem; color: #cdb8e8; margin-bottom: 12px; }
.tc-where b { color: #fff; }
.tc-strip { display: flex; gap: 3px; list-style: none; margin: 0; padding: 0; flex: 1 1 180px; max-width: 320px; }
.tc-strip li { flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .16); }
.tc-strip li.done { background: var(--eggplant-glow); }
.tc-strip li.now { background: var(--highlight); box-shadow: 0 0 8px rgba(255, 232, 107, .8); }
.tc-play, .tc-row {
  position: relative; overflow: hidden; font: inherit; cursor: pointer; color: #fff;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(182, 129, 239, .7); border-radius: 999px;
}
.tc-play { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; font-size: .9rem; max-width: 100%; text-align: left; }
.tc-play small, .tc-row small { color: #b9a6d3; font-size: .75rem; }
.tc-play:hover, .tc-row:hover, .tc-play.playing, .tc-row.playing { background: rgba(182, 129, 239, .28); }
.tc-play:focus-visible, .tc-row:focus-visible { outline: 2px solid var(--highlight); outline-offset: 2px; }
.tc-play:disabled, .tc-row:disabled { cursor: default; opacity: .6; }
.tc-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--highlight); transition: width .25s linear; }
.track-card.is-hidden { background: #120a19; box-shadow: 0 0 0 1px rgba(182, 129, 239, .25); }
.track-card.is-hidden .tc-now::before { content: "◌ "; color: #b9a6d3; }
/* The song page's "Press play" card: the whole recording up top, the lyric sheet under it */
.track-card.is-full { box-shadow: 0 0 0 2px var(--highlight), 0 10px 30px rgba(0, 0, 0, .35); }
.track-card.is-full .tc-now::before { content: "▶ "; color: var(--highlight); }
.track-card.is-full .tc-head { font-size: .86rem; }
.tc-full-note { position: relative; margin: 0 0 12px; font-family: var(--font-type); font-size: 1.05rem; line-height: 1.4; color: #f1e8ff; }
.track-card.is-full .tc-play { font-size: 1rem; padding: 10px 18px; margin-bottom: 14px; }
.tc-sheet { margin: 4px 0 14px; padding-top: 12px; border-top: 1px dashed rgba(182, 129, 239, .45); }
.tc-sheet-title { margin: 0 0 8px; font-family: var(--font-type); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--highlight); }
.tc-sheet ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tc-sheet li { display: grid; grid-template-columns: 34px 1fr auto; grid-template-rows: auto auto; column-gap: 10px; align-items: baseline; padding-bottom: 8px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.tc-row { grid-row: span 2; align-self: center; width: 30px; height: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; }
.tc-row .tc-label, .tc-row small { display: none; }
.tc-sec { grid-column: 2; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: #b9a6d3; }
.tc-line { grid-column: 2; font-weight: 700; font-style: italic; color: #fff; }
.tc-sheet .tc-his { font-size: .72rem; }
.tc-when { grid-column: 3; grid-row: 1 / span 2; font-size: .78rem; color: var(--highlight); text-align: right; max-width: 170px; }
@media (max-width: 560px) {
  .tc-sheet li { grid-template-columns: 34px 1fr; }
  .tc-when { grid-column: 2; grid-row: auto; text-align: left; max-width: none; }
  .tc-row { grid-row: span 3; }
}

/* ───────────── Things People Say (voicemail tab: his shelf and Stacey's) ───────────── */
.tools button.has-new { position: relative; border-color: var(--eggplant-glow); }
.tools button.has-new::after {
  content: ""; position: absolute; top: -2px; right: -2px; width: 9px; height: 9px; border-radius: 50%;
  background: #ff4d3d; box-shadow: 0 0 0 2px var(--desk); animation: pulse 1.6s ease-in-out infinite;
}
.vm-shelf { font-family: var(--font-type); font-weight: 400; text-transform: uppercase; letter-spacing: .12em; font-size: 1rem; margin: 26px 0 12px; padding-bottom: 6px; border-bottom: 1px dashed currentColor; }
.vm-shelf:first-of-type { margin-top: 8px; }
.tape-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 18px; align-items: start; }
.tape { display: flex; flex-direction: column; }
.ph-audio.pending .ph-label { color: var(--highlight); display: inline-flex; align-items: center; gap: 8px; }
.ph-audio.pending .vm-spin { border-color: rgba(255, 232, 107, .25); border-top-color: var(--highlight); }
.transcript-card { background: #fffdf6; border: 1px solid var(--paper-edge); border-top: 0; border-left: 4px solid var(--eggplant-2); border-radius: 0 0 6px 6px; padding: 10px 12px 12px; }
.tape.pinned .transcript-card { border-left-color: var(--stamp); background: #fff7ec; }
.tape.checked .transcript-card { border-left-color: var(--leaf); }
.tape.locked .transcript-card { background: transparent; border-style: dashed; border-top-style: none; border-left-style: solid; border-left-color: var(--ink-faint); color: var(--ink-faint); }
.tape.locked .tape-label { opacity: .75; }
.tape.just-checked .transcript-card { animation: vm-flash 1.2s ease-out; }
.tr-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 6px; font-family: var(--font-type); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.tr-title .vm-new { margin-left: auto; }
.transcript-card .vm-head { margin: 0 0 4px; }
.vm-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.vm-how { font-size: 1.1rem; }
.vm-who { font-size: .98rem; }
.vm-meta { font-size: .78rem; color: var(--ink-soft); }
.vm-tag, .vm-pin, .vm-new {
  font-family: var(--font-type); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase;
  border-radius: 999px; padding: 1px 8px; border: 1px solid currentColor;
}
.vm-tag { color: var(--eggplant-2); }
.vm-tag.self { color: var(--stamp); }
.vm-pin { color: var(--stamp); border-color: transparent; padding: 1px 0; }
.vm-new { margin-left: auto; color: #fff; background: #d6342a; border-color: #d6342a; }
.vm-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(179, 38, 30, .25); border-top-color: var(--stamp); animation: vm-spin 1.1s linear infinite; }
.vm-text { margin: 4px 0 0; font-family: var(--font-type); font-size: 1.02rem; line-height: 1.5; }
.vm-word {
  font: inherit; color: inherit; background: var(--highlight); border: 0; border-bottom: 2px dashed var(--stamp);
  padding: 0 2px; border-radius: 2px; cursor: pointer;
}
.vm-word:hover, .vm-word:focus-visible { background: #ffd84a; }
.vm-struck { text-decoration: line-through; text-decoration-color: var(--stamp); text-decoration-thickness: 2px; color: var(--ink-faint); }
.vm-hint { margin: 6px 0 0; font-size: .76rem; color: var(--ink-faint); }
.vm-check { margin: 8px 0 0; padding: 8px 10px; background: rgba(63, 122, 58, .08); border-radius: 4px; font-size: .88rem; line-height: 1.45; }
.vm-stamp {
  display: inline-block; margin-right: 6px; padding: 0 6px; transform: rotate(-3deg);
  font-family: var(--font-type); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--leaf); border: 2px solid var(--leaf); border-radius: 3px;
}
.vm-more { margin: 14px 0 0; text-align: center; font-family: var(--font-type); color: var(--ink-soft); }
@keyframes vm-spin { to { transform: rotate(360deg); } }
@keyframes vm-flash { from { background: #e3f4dc; } to { background: #fffdf6; } }
@media (prefers-reduced-motion: reduce) {
  .vm-spin, .tape.just-checked .transcript-card, .tools button.has-new::after { animation: none; }
}

/* ───────────── The tapes as objects: 3D cassettes ───────────── */
/* Lean toward the pointer, drag to spin, tap to turn over (js: "tapes in 3D"). The obj is 100 × 64 units; faces size
   their parts in cqw (100cqw = the cassette's width). The window is a real hole: the reels sit inside, at mid-depth. */
:root {
  --t3-hole: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 64' preserveAspectRatio='none'%3E%3Cpath fill-rule='evenodd' d='M0 0H100V64H0ZM31 21.8H69A7.5 7.5 0 0 1 69 36.8H31A7.5 7.5 0 0 1 31 21.8Z'/%3E%3C/svg%3E");
}
.t3-hint { margin: -8px 0 14px; font-family: var(--font-type); font-size: .78rem; color: var(--ink-faint); }
.t3 {
  --d: 22px; --a: 16; --b: -164; --x: -8; --sx: -2px; --sw: .96; --l: 0;
  --s1: #34293f; --s2: #1c1523; --edge: #241b2c; --edge-hi: #3b2f47; --head: #2a2132; --grain: .025;
  --pack: #4d3222; --pack-2: #3a2418; --hub: #efe7f8; --hub-2: #7d6f8c; --glow: #b681ef; --tint: rgba(25, 12, 35, .45); --film: rgba(14, 9, 18, .62);
  position: relative; padding: 12px 7% 26px; perspective: 1000px; container-type: inline-size;
  touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
  cursor: grab; outline: none;
}
.t3.held { cursor: grabbing; }
/* shells */
.t3[data-shell="smoke"] { --s1: rgba(58, 50, 66, .9); --s2: rgba(22, 18, 27, .93); --edge: rgba(26, 22, 31, .96); --edge-hi: #48405a; --head: rgba(36, 30, 42, .95); --glow: #a3a9c9; }
.t3[data-shell="clear"] { --film: rgba(255, 255, 255, .1);
  --s1: rgba(236, 242, 250, .2); --s2: rgba(196, 208, 224, .14); --edge: rgba(180, 192, 210, .5); --edge-hi: rgba(240, 246, 255, .7);
  --head: rgba(220, 228, 240, .28); --grain: .07; --glow: #cfe8ff; --tint: rgba(60, 70, 95, .28);
}
.t3[data-shell="eggplant"] { --s1: rgba(128, 64, 182, .9); --s2: rgba(66, 28, 100, .94); --edge: #3b1d57; --edge-hi: #7a45ad; --head: rgba(60, 26, 92, .95); --glow: #c38bff; }
.t3[data-shell="white"] { --s1: #f7f6f9; --s2: #d4d0da; --edge: #b5b0bd; --edge-hi: #f4f2f7; --head: #e2dfe7; --hub: #ffffff; --hub-2: #9b93a6; --glow: #ffffff; --tint: rgba(40, 30, 50, .32); }
.t3[data-shell="red"] { --s1: rgba(214, 44, 52, .86); --s2: rgba(124, 12, 22, .92); --edge: #6d0f17; --edge-hi: #c22f3a; --head: rgba(118, 14, 22, .93); --glow: #ff5a5f; --tint: rgba(110, 10, 20, .32); }
.t3[data-shell="ice"] { --film: rgba(255, 255, 255, .1);
  --s1: rgba(160, 208, 250, .5); --s2: rgba(76, 136, 208, .46); --edge: rgba(64, 116, 178, .72); --edge-hi: rgba(180, 222, 255, .85);
  --head: rgba(88, 148, 214, .52); --grain: .05; --glow: #8fd3ff; --tint: rgba(30, 80, 140, .3);
}
.t3[data-shell="cream"] { --s1: #f0e5cd; --s2: #c9b993; --edge: #a8977a; --edge-hi: #ebdfc5; --head: #dacbaa; --hub: #3a2f25; --hub-2: #8d7c64; --glow: #ffe2a8; --tint: rgba(60, 45, 20, .34); }
.t3[data-shell="black"] { --s1: #2c2a30; --s2: #111013; --edge: #0d0c0f; --edge-hi: #312e36; --head: #1c1a1f; --hub: #e9e9ec; --pack: #2e1f16; --pack-2: #1f140e; --glow: #ffd27a; }
.t3[data-shell="neon"] { --film: rgba(255, 255, 255, .1);
  --s1: rgba(176, 255, 112, .52); --s2: rgba(86, 196, 58, .5); --edge: rgba(74, 160, 46, .78); --edge-hi: rgba(206, 255, 168, .9);
  --head: rgba(104, 204, 66, .55); --grain: .05; --glow: #a6ff6b; --tint: rgba(40, 110, 20, .3);
}
.t3[data-shell="metal"] { --s1: #dde0e6; --s2: #8d94a0; --edge: #666c76; --edge-hi: #eceff3; --head: #b5bac3; --hub: #2b2b30; --hub-2: #8a8f99; --pack: #241912; --pack-2: #170f0a; --glow: #dfe7ff; --tint: rgba(30, 34, 44, .4); }
.t3-glow {
  position: absolute; left: 10%; right: 10%; top: 14%; bottom: 24%; border-radius: 40%; pointer-events: none;
  background: radial-gradient(closest-side, var(--glow), transparent); filter: blur(16px);
  opacity: calc(var(--l) * .3 + var(--lvl, 0) * .9); transform: scale(calc(1 + var(--lvl, 0) * .2));
}
.t3-obj { position: relative; z-index: 1; aspect-ratio: 100 / 64; transform-style: preserve-3d; transform: rotateX(-8deg) rotateY(16deg); }
.t3-face, .t3-edge, .t3-glass, .t3-seal { position: absolute; display: block; }
.t3-face {
  inset: 0; overflow: hidden; container-type: inline-size; border-radius: 3.4% / 5.3%; color: var(--ink);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  -webkit-mask: var(--t3-hole) center / 100% 100% no-repeat; mask: var(--t3-hole) center / 100% 100% no-repeat;
  background:
    radial-gradient(120% 90% at 25% 0%, rgba(255, 255, 255, .12), transparent 60%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, var(--grain)) 0 2px, transparent 2px 5px),
    linear-gradient(180deg, var(--s1), var(--s2));
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .12), inset 0 -2px 0 rgba(0, 0, 0, .3);
}
.t3[data-shell="metal"] .t3-face { background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .22) 0 1px, rgba(0, 0, 0, .06) 1px 3px), linear-gradient(180deg, var(--s1), var(--s2)); }
.t3-front { --dev: var(--a); --gx: var(--gxA, -300); --gy: var(--gyA, -300); --gs: var(--gsA, 0); --sh: var(--shA, 0); --dim: var(--dimA, .1); transform: translateZ(calc(var(--d) / 2)); }
.t3-back { --dev: var(--b); --gx: var(--gxB, -300); --gy: var(--gyB, -300); --gs: var(--gsB, 0); --sh: var(--shB, 0); --dim: var(--dimB, .3); transform: rotateY(180deg) translateZ(calc(var(--d) / 2)); }
.t3:focus-visible .t3-face { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .12), 0 0 0 3px var(--eggplant-glow); }
/* the shell's thickness, lit by how much each side faces the lamp */
.t3-edge::after { content: ""; position: absolute; inset: 0; background: #fff; pointer-events: none; }
.t3-l, .t3-r { top: 5%; bottom: 5%; width: var(--d); background: linear-gradient(90deg, var(--edge), var(--edge-hi) 50%, var(--edge)); }
.t3-l { left: calc(var(--d) / -2); transform: rotateY(-90deg); }
.t3-r { right: calc(var(--d) / -2); transform: rotateY(90deg); }
.t3-t, .t3-b { left: 3.4%; right: 3.4%; height: var(--d); background: linear-gradient(180deg, var(--edge), var(--edge-hi) 50%, var(--edge)); }
.t3-t { top: calc(var(--d) / -2); transform: rotateX(90deg); }
.t3-b { bottom: calc(var(--d) / -2); transform: rotateX(-90deg); }
.t3-l::after { opacity: var(--rl, 0); }
.t3-r::after { opacity: var(--rr, 0); }
.t3-t::after { opacity: var(--rt, 0); }
.t3-b::after { opacity: var(--rb, 0); }
.t3-shadow {
  position: absolute; left: 12%; right: 12%; bottom: 4px; height: 24px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, var(--tint), transparent);
  transform: translateX(var(--sx)) scaleX(var(--sw)) scale(calc(1 + var(--l) * .15)); opacity: calc(1 - var(--l) * .4);
}
/* inside the shell, at mid-depth: the two tape packs on their hubs and the tape running past the head */
.t3-inner { position: absolute; inset: 0; pointer-events: none; }
.t3-inner svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.t3-film { position: absolute; left: 22%; width: 56%; top: 32%; height: 27.5%; border-radius: 999px; background: var(--film); } /* the smoked strip behind the window */
.t3-inner path { fill: none; stroke: var(--pack); stroke-width: .7; }
.t3-inner circle { fill: #e9e5ee; }
.t3-pack {
  position: absolute; top: 45.8%; aspect-ratio: 1; border-radius: 50%; translate: -50% -50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .16), transparent 55%), repeating-radial-gradient(circle, var(--pack) 0 1px, var(--pack-2) 1px 2px);
}
.t3-pack.l { left: 31%; width: calc(11% + (1 - var(--p, 0)) * 24%); }
.t3-pack.r { left: 69%; width: calc(11% + var(--p, 0) * 24%); }
.t3-hub {
  position: absolute; top: 45.8%; width: 10%; aspect-ratio: 1; border-radius: 50%; translate: -50% -50%;
  background: radial-gradient(circle, rgba(10, 6, 14, .9) 0 27%, transparent 28%), repeating-conic-gradient(var(--hub) 0 24deg, var(--hub-2) 24deg 60deg);
  box-shadow: inset 0 0 0 2px var(--hub), 0 0 0 1px rgba(0, 0, 0, .35);
}
.t3-hub.l { left: 31%; }
.t3-hub.r { left: 69%; }
.deck3d.playing .t3-hub { animation: t3-spin 1.8s linear infinite; }
.deck3d.whirr-ff .t3-hub { animation: t3-spin .3s linear infinite; }
.deck3d.whirr-rew .t3-hub { animation: t3-spin .3s linear infinite reverse; }
@keyframes t3-spin { to { rotate: 360deg; } }
/* the window's glass, just inside each face, with the minute scale printed along the bottom */
.t3-glass {
  left: 23.5%; width: 53%; top: 34.06%; height: 23.44%; border-radius: 999px; pointer-events: none;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background:
    radial-gradient(circle at calc((var(--gx) - 23.5) * 1.887%) calc((var(--gy) - 34) * 4.27%), rgba(255, 255, 255, calc(var(--gs) * .85)), transparent 42%),
    linear-gradient(172deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, .05) 45%, rgba(0, 0, 0, .12) 62%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .4) 0 1px, transparent 1px 9%) 14% 100% / 72% 16% no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}
.t3-glass-a { --gx: var(--gxA, -300); --gy: var(--gyA, -300); --gs: var(--gsA, 0); transform: translateZ(calc(var(--d) / 2 - 3px)); }
.t3-glass-b { --gx: var(--gxB, -300); --gy: var(--gyB, -300); --gs: var(--gsB, 0); transform: rotateY(180deg) translateZ(calc(var(--d) / 2 - 3px)); }
/* screws, the head opening, the window's molded rim */
.t3-screw {
  position: absolute; width: 2.8cqw; height: 2.8cqw; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #d4cedb, #625b6b 60%, #2a2530); box-shadow: 0 0 0 .4cqw rgba(0, 0, 0, .3);
}
.t3-screw::after { content: ""; position: absolute; left: 18%; right: 18%; top: 44%; height: 12%; background: #241e29; transform: rotate(35deg); }
.t3-screw.s1 { left: 1.7cqw; top: 1.7cqw; }
.t3-screw.s2 { right: 1.7cqw; top: 1.7cqw; }
.t3-screw.s3 { left: 1.7cqw; bottom: 1.7cqw; }
.t3-screw.s4 { right: 1.7cqw; bottom: 1.7cqw; }
.t3-screw.s5 { left: 50%; top: 2.4cqw; margin-left: -1.4cqw; }
.t3-head { position: absolute; left: 21cqw; right: 21cqw; bottom: 0; height: 12.5cqw; clip-path: polygon(7% 0, 93% 0, 100% 100%, 0 100%); background: linear-gradient(180deg, var(--head), rgba(0, 0, 0, .25)), var(--head); }
.t3-hole { position: absolute; bottom: 2.2cqw; width: 4cqw; height: 4cqw; border-radius: .7cqw; background: rgba(10, 7, 13, .8); box-shadow: inset 0 .4cqw .6cqw rgba(0, 0, 0, .9); }
.t3-hole:nth-child(2) { left: 20%; }
.t3-hole:nth-child(3) { right: 20%; }
.t3-winrim { position: absolute; left: 23.5%; top: 34.06%; width: 53%; height: 23.44%; border-radius: 999px; box-shadow: 0 0 0 .6cqw rgba(0, 0, 0, .38), 0 0 0 1.1cqw rgba(255, 255, 255, .1); }
/* light on the face: a little darker when it turns from the lamp, a sheen, and the glint */
.t3-shade { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: rgba(8, 4, 14, var(--dim)); }
.t3-glare {
  position: absolute; inset: 0; pointer-events: none; border-radius: inherit; mix-blend-mode: screen;
  background:
    radial-gradient(circle at calc(var(--gx) * 1%) calc(var(--gy) * 1%), rgba(255, 255, 255, calc(var(--gs) * .7)), rgba(255, 255, 255, calc(var(--gs) * .16)) 20%, transparent 46%),
    linear-gradient(160deg, rgba(255, 255, 255, var(--sh)), transparent 65%);
}
/* labels: paper with a printed band by default; each tape has its own */
.t3-label {
  position: absolute; left: 6.5cqw; right: 6.5cqw; top: 4.6cqw; height: 42cqw; overflow: hidden; border-radius: 1.4cqw;
  background:
    linear-gradient(180deg, transparent 31%, var(--eggplant) 31%, var(--eggplant-2) 58%, var(--eggplant) 86%, transparent 86%),
    repeating-linear-gradient(180deg, transparent 0 4.6cqw, rgba(84, 74, 63, .18) 4.6cqw calc(4.6cqw + 1px)) 0 1.6cqw / 100% 31% no-repeat,
    var(--paper);
  box-shadow: 0 .3cqw .8cqw rgba(0, 0, 0, .35);
}
.t3 .tape-label, .t3-band {
  position: absolute; left: 3.5cqw; right: 3.5cqw; top: 1.6cqw; padding: 0; border: 0; background: none; border-radius: 0;
  font-family: var(--font-type); font-size: 3.5cqw; line-height: 4.6cqw; text-align: left; color: var(--ink);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.t3-band { -webkit-line-clamp: 1; color: var(--ink-soft); letter-spacing: .06em; text-transform: uppercase; }
.t3-line, .t3-spec {
  position: absolute; left: 3.5cqw; right: 3.5cqw; bottom: 0; margin: 0; height: 5.9cqw;
  font-size: 3cqw; line-height: 5.9cqw; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.t3-spec { font-family: var(--font-type); font-size: 2.4cqw; letter-spacing: .14em; text-transform: uppercase; }
.t3-side { position: absolute; left: 3.6cqw; top: 18.4cqw; font: 700 8.5cqw/1 var(--font-body); color: var(--paper); text-shadow: 0 .3cqw 0 rgba(0, 0, 0, .3); }
.t3-holo {
  position: absolute; right: 2.2cqw; top: 19.4cqw; width: 13cqw; padding: 1.3cqw 0; border-radius: 1cqw; text-align: center;
  font-family: var(--font-type); font-size: 2.1cqw; line-height: 1; letter-spacing: .02em; text-transform: uppercase; color: rgba(40, 18, 60, .75);
  background: linear-gradient(115deg, #ff9ad5, #fff59d, #9dffb0, #8fd3ff, #c99bff, #ff9ad5) calc(50% + var(--dev) * 3%) 50% / 400% 100%;
  box-shadow: inset 0 0 0 .3cqw rgba(255, 255, 255, .55);
}
.t3-stamp {
  position: absolute; right: 3cqw; top: 1.4cqw; padding: .4cqw 1.4cqw; transform: rotate(-6deg);
  font-family: var(--font-type); font-size: 2.6cqw; letter-spacing: .1em; text-transform: uppercase;
  color: var(--leaf); border: .5cqw solid var(--leaf); border-radius: .8cqw; background: rgba(241, 232, 212, .85);
}
.t3[data-label="rainbow"] .t3-label {
  background:
    linear-gradient(180deg, transparent 32%, #e8463c 32% 43%, #f39a2b 43% 54%, #f5d33b 54% 65%, #58b05a 65% 76%, #3f86d6 76% 86%, transparent 86%),
    #f8f6f1;
}
.t3[data-label="kraft"] .t3-label {
  background:
    repeating-linear-gradient(17deg, rgba(90, 60, 20, .09) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(-23deg, rgba(255, 255, 255, .07) 0 1px, transparent 1px 4px),
    radial-gradient(140% 100% at 30% 20%, #d3ab72, #b88a51);
}
.t3[data-label="grid"] .t3-label {
  background:
    linear-gradient(rgba(70, 120, 200, .28) 1px, transparent 1px) 0 0 / 100% 3.2cqw,
    linear-gradient(90deg, rgba(70, 120, 200, .28) 1px, transparent 1px) 0 0 / 3.2cqw 100%,
    #fbfbf7;
}
.t3[data-label="gold"] .t3-label {
  background:
    linear-gradient(180deg, transparent 30%, #c9a24a 30% calc(30% + 1px), transparent calc(30% + 1px) 87%, #c9a24a 87% calc(87% + 1px), transparent calc(87% + 1px)),
    linear-gradient(180deg, #1d1c20, #0c0b0e);
}
.t3[data-label="sunset"] .t3-label { background: linear-gradient(160deg, #ffb35c, #ff5e7a 50%, #8b3fe0); }
.t3[data-label="evidence"] .t3-label { background: linear-gradient(180deg, transparent 30%, #b3261e 30% 32%, transparent 32% 84%, #b3261e 84% 85%, transparent 85%), #ecd9a5; }
.t3[data-label="evidence"] .t3-label::after {
  content: "Evidence"; position: absolute; right: 3cqw; bottom: .7cqw; padding: .2cqw 1.2cqw; transform: rotate(-4deg);
  font-family: var(--font-type); font-size: 2.4cqw; letter-spacing: .12em; text-transform: uppercase; color: #b3261e; border: .5cqw solid #b3261e; border-radius: .6cqw;
}
.t3[data-label="masking"] .t3-label { background: none; box-shadow: none; }
.t3[data-label="masking"] .tape-label, .t3[data-label="masking"] .t3-band {
  left: 4cqw; right: 8cqw; top: 1cqw; padding: .8cqw 3cqw; -webkit-line-clamp: 1; transform: rotate(-1.6deg);
  background: rgba(238, 226, 190, .94); box-shadow: 0 .3cqw .6cqw rgba(0, 0, 0, .25);
  clip-path: polygon(0 8%, 3% 0, 6% 10%, 9% 2%, 100% 0, 97% 30%, 100% 55%, 97% 80%, 100% 100%, 3% 100%, 0 85%, 2% 50%);
}
.t3[data-label="kraft"] .tape-label, .t3[data-label="grid"] .tape-label, .t3[data-label="masking"] .tape-label,
.t3[data-label="kraft"] .t3-band, .t3[data-label="grid"] .t3-band, .t3[data-label="masking"] .t3-band {
  font-family: "Caveat", "Segoe Print", "Bradley Hand", cursive; font-weight: 700; font-size: 5.4cqw; line-height: 5.2cqw; letter-spacing: 0; text-transform: none;
}
.t3[data-label="kraft"] .tape-label, .t3[data-label="kraft"] .t3-band, .t3[data-label="kraft"] .t3-side, .t3[data-label="kraft"] .t3-spec, .t3[data-label="kraft"] .t3-line { color: #2f1f0f; text-shadow: none; }
.t3[data-label="grid"] .tape-label, .t3[data-label="grid"] .t3-band, .t3[data-label="grid"] .t3-side, .t3[data-label="grid"] .t3-spec, .t3[data-label="grid"] .t3-line { color: #1f4fa8; text-shadow: none; }
.t3[data-label="masking"] .tape-label, .t3[data-label="masking"] .t3-band { color: #1d1a20; }
.t3[data-label="masking"] .t3-side, .t3[data-label="masking"] .t3-spec, .t3[data-label="masking"] .t3-line { color: rgba(255, 255, 255, .55); text-shadow: 0 1px 0 rgba(0, 0, 0, .35); }
.t3[data-label="gold"] .tape-label, .t3[data-label="gold"] .t3-band, .t3[data-label="gold"] .t3-side, .t3[data-label="gold"] .t3-spec, .t3[data-label="gold"] .t3-line { color: #e8c76a; text-shadow: none; }
.t3[data-label="gold"] .tape-label { text-transform: uppercase; letter-spacing: .08em; font-size: 3cqw; }
.t3[data-label="sunset"] .tape-label, .t3[data-label="sunset"] .t3-band, .t3[data-label="sunset"] .t3-spec, .t3[data-label="sunset"] .t3-line { color: #fff; text-shadow: 0 .2cqw .4cqw rgba(0, 0, 0, .3); }
.t3[data-label="kraft"] .t3-holo, .t3[data-label="grid"] .t3-holo, .t3[data-label="evidence"] .t3-holo, .t3[data-label="masking"] .t3-holo { display: none; }
.t3[data-label="kraft"] .t3-side, .t3[data-label="grid"] .t3-side { font-family: "Caveat", cursive; font-size: 10cqw; }
.t3-seal {
  left: -1%; right: -1%; top: 40%; padding: 1.2cqw 0; text-align: center; white-space: nowrap; overflow: hidden; pointer-events: none;
  font-family: var(--font-type); font-size: 2.8cqw; letter-spacing: .14em; text-transform: uppercase; color: #1b1522;
  background: #ffd84a; box-shadow: 0 .5cqw 1.2cqw rgba(0, 0, 0, .4); backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.t3-seal-a { transform: translateZ(calc(var(--d) / 2 + 1px)) rotate(-6deg); }
.t3-seal-b { transform: rotateY(180deg) translateZ(calc(var(--d) / 2 + 1px)) rotate(-6deg); }

/* the deck under each tape: a screen with the recording's waveform, a counter and a VU meter, and piano keys */
.say-deck {
  display: flex; flex-direction: column; gap: 12px; padding: 12px 12px 16px; color: #efe6ff;
  background: linear-gradient(180deg, #30283a, #18131d); border-radius: 14px 14px 0 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 0 0 1px #3c2f49;
}
.deck3d:not(.say-tape) .say-deck { border-radius: 14px; } /* on a page, nothing hangs under the deck */
.dk-screen {
  --vfd: #ffb84d; position: relative; border-radius: 8px; padding: 10px 12px 8px;
  background: radial-gradient(120% 140% at 50% 0%, #22170f, #0a0705); box-shadow: inset 0 2px 10px rgba(0, 0, 0, .85), 0 1px 0 rgba(255, 255, 255, .07);
}
.dk-wave { position: relative; height: 44px; cursor: pointer; touch-action: pan-y; outline: none; }
.dk-wave:focus-visible { box-shadow: 0 0 0 2px var(--vfd); border-radius: 4px; }
.dk-bars { position: absolute; inset: 0; display: flex; align-items: center; gap: 2px; }
.dk-bars i { flex: 1; height: calc(var(--h, .08) * 100%); min-height: 2px; border-radius: 2px; background: rgba(255, 184, 77, .2); transition: height .5s ease-out; }
.dk-bars.lit { clip-path: inset(0 calc((1 - var(--p, 0)) * 100%) 0 0); }
.dk-bars.lit i { background: var(--vfd); box-shadow: 0 0 6px rgba(255, 184, 77, .65); }
.dk-wave:not(.has-wave)[data-src]::after {
  content: "Reading tape…"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-type); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 184, 77, .55);
  animation: pulse 1.6s ease-in-out infinite;
}
.dk-wave.no-wave::after { content: none; }
.dk-head { position: absolute; top: -3px; bottom: -3px; left: calc(var(--p, 0) * 100%); width: 2px; margin-left: -1px; background: #fff3d6; box-shadow: 0 0 8px var(--vfd); opacity: 0; }
.deck3d.loaded .dk-head { opacity: 1; }
.dk-read { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-family: var(--font-type); font-size: .78rem; letter-spacing: .08em; color: var(--vfd); text-shadow: 0 0 6px rgba(255, 184, 77, .55); }
.dk-read .time { min-width: 4.5ch; font-variant-numeric: tabular-nums; }
.dk-tag { opacity: .6; text-transform: uppercase; font-size: .66rem; letter-spacing: .16em; }
.dk-vu { display: flex; gap: 2px; margin-left: auto; }
.dk-vu i { width: 6px; height: 10px; border-radius: 1px; background: #5dd36a; opacity: clamp(.14, calc(var(--lvl, 0) * 9 - var(--i) + 1), 1); }
.dk-vu i:nth-child(n+6) { background: #ffb84d; }
.dk-vu i:nth-child(8) { background: #ff5a4e; }
.dk-screen .ph { position: absolute; inset: 0; border-radius: inherit; justify-content: center; background: rgba(10, 7, 5, .86); }
.deck3d[data-state="missing"] .dk-bars i { height: 6%; }
.dk-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0 2px; }
.key {
  position: relative; height: 50px; padding: 3px 0 0; border: 0; border-radius: 6px 6px 9px 9px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-family: var(--font-type); color: #2a2230; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  background: linear-gradient(180deg, #faf8fb 0%, #ded8e4 55%, #c3bccb 100%);
  box-shadow: 0 7px 0 #7f7787, 0 8px 0 #2e2834, 0 13px 14px rgba(0, 0, 0, .55), inset 0 1px 0 #fff, inset 0 -3px 4px rgba(0, 0, 0, .1);
  transition: transform .06s ease-out, box-shadow .06s ease-out, background .06s;
}
.key .key-ico { font-size: .95rem; line-height: 1; letter-spacing: -.14em; margin-left: -.14em; }
.key small { font-size: .56rem; letter-spacing: .16em; text-transform: uppercase; color: #6c6474; }
.key-play .key-ico { color: #1d6b35; }
.key:active:not(:disabled), .key.down {
  transform: translateY(6px);
  box-shadow: 0 1px 0 #7f7787, 0 2px 0 #2e2834, 0 3px 5px rgba(0, 0, 0, .5), inset 0 1px 0 #fff, inset 0 3px 7px rgba(0, 0, 0, .18);
}
.key.down { background: linear-gradient(180deg, #ebe6f0, #cdc6d4); }
.key-led { position: absolute; top: 6px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: #3a3a33; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .5); }
.key-play.down .key-led { background: #66ff7f; box-shadow: 0 0 6px #66ff7f, 0 0 12px rgba(102, 255, 127, .6); }
.key:disabled { cursor: not-allowed; opacity: .4; }
.key:focus-visible { outline: 2px solid var(--eggplant-glow); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .deck3d.playing .t3-hub, .deck3d.whirr-ff .t3-hub, .deck3d.whirr-rew .t3-hub, .dk-wave::after { animation: none; }
  .key { transition: none; }
}
@media (max-width: 480px) {
  .tools .count .of { display: none; } /* "4" instead of "4/23": six buttons fit on one row */
}

/* ───────────── Field Guide (the cover's five cards) ───────────── */
.guide-live { margin: 6px 0 28px; }
.guide-live .analyst { margin: 0 0 14px; }
.guide-meters { grid-template-columns: 1fr; max-width: 520px; }
.guide-meters dd { display: inline-flex; align-items: center; gap: 8px; }
.guide-meter i { background: rgba(0, 0, 0, .12); }
.guide-meter i.on { background: var(--leaf); }
.guide-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin: 0 0 22px; padding-top: 18px; border-top: 1px dashed var(--ink-faint); }
.guide-nav .btn, .guide-page .cover-actions .btn { text-decoration: none; }
.guide-page .cover-actions { justify-content: flex-start; margin-bottom: 0; }
a.btn { display: inline-block; }

/* ── Voice update (2026-10-15.3): two counters, the audit page, the cover footer, quick exit ── */
.stat[hidden] { display: none; }
.cover-footer { margin: 18px auto 0; font-size: .85rem; color: var(--ink-soft); max-width: 50ch; }
.found a { color: inherit; }
.audit-list { margin: 8px 0 18px; padding-left: 1.6em; display: grid; gap: 8px; }
.audit-list li { padding-left: 4px; }
.body em { font-style: italic; }


/* The eggplant system (js/eggplant-play.js), the fold: Say yes stays above the fold at 375x667. The cover's tagline and
   subtitle each wrap one line more at 375 px than at 390 px, so on the narrowest short phones the gap above the folder
   and the one under the subtitle close up (24 px in all); the .cover-emoji slot rules above are untouched. */
@media (max-width: 380px) and (max-height: 700px) {
  .cover { padding-top: 8px; }
  .cover .subtitle { margin-bottom: 16px; }
}

/* ───────────── Hash badges (SHA-256 of a loaded file, in the caption) ───────────── */
.m figcaption .hash {
  display: block; box-sizing: border-box; width: max-content; max-width: 100%; margin: 6px auto 0; padding: 2px 10px;
  font-family: var(--font-type); font-size: .72rem; letter-spacing: .04em; line-height: 1.6; text-align: center;
  color: var(--ink-soft); background: transparent; border: 1px dotted var(--ink-faint); border-radius: 999px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.m figcaption .hash:hover, .m figcaption .hash:focus-visible { color: var(--ink); border-style: solid; }
.m figcaption .hash:focus-visible { outline: 2px solid var(--eggplant-glow); outline-offset: 2px; }
.say-tape figcaption { font-size: .82rem; color: var(--ink-soft); margin: 6px 0 2px; text-align: center; } /* a tape in Things People Say has no caption of its own until a hash goes on */

/* ───────────── Three True Things notebook (endings) ───────────── */
.notebook { margin: 0 0 22px; max-width: 100%; }
.notebook h3 {
  margin: 0 0 6px; font-family: var(--font-type); font-weight: 400; font-size: 1.1rem; letter-spacing: .04em;
}
.nb-copy { margin: 0 0 4px; font-size: .9rem; color: var(--ink-soft); }
.nb-prev { margin: 0 0 4px; font-family: var(--font-type); font-size: .8rem; letter-spacing: .06em; color: var(--ink-faint); }
.nb-lines { display: grid; gap: 2px; margin: 8px 0 6px; }
.nb-line { display: flex; align-items: baseline; gap: 10px; border-bottom: 1px solid var(--ink-faint); padding: 6px 0 2px; }
.nb-line label { flex: 0 0 auto; font-family: var(--font-type); font-size: .95rem; color: var(--ink-soft); min-width: 1.6em; }
.nb-line input {
  flex: 1 1 auto; min-width: 0; width: 100%; border: 0; background: transparent; padding: 2px 0; margin: 0;
  font: inherit; color: var(--ink); line-height: 1.5; outline: none; border-radius: 0;
}
.nb-line:focus-within { border-bottom-color: var(--ink); }
.nb-line input:focus-visible { outline: 2px solid var(--eggplant, #5b2a86); outline-offset: 3px; }
.nb-note { margin: 0; font-size: .78rem; color: var(--ink-faint); font-style: italic; }

/* ───────────── DARVO card (Red Flag Bingo dialog) ───────────── */
.darvo-title { margin: 26px 0 4px; font-family: var(--font-type); font-size: 1.05rem; letter-spacing: .04em; text-transform: uppercase; text-align: center; }
.darvo-sub { margin-top: 0; }
.darvo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 520px; margin: 0 auto; }
.darvo-head { font-family: var(--font-type); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; text-align: center; color: var(--ink-soft); padding: 4px 0 2px; border-bottom: 2px solid var(--ink); }
.darvo-head.full { color: var(--eggplant); border-bottom-color: var(--eggplant); }
.darvo-grid .sq { aspect-ratio: auto; min-height: 5.6em; padding: 20px 6px 10px; font-size: clamp(.68rem, 2.3vw, .86rem); } /* no icon row here, so the top padding keeps the text clear of the corner check */
.darvo-grid .sq .check { top: 2px; right: 6px; font-size: .95rem; }
.darvo-grid .sq.darvo-empty { border-style: dashed; border-color: var(--ink-faint); background: transparent; }
@media (max-width: 480px) { .darvo-grid { gap: 4px; } .darvo-grid .sq { padding: 18px 3px 8px; font-size: .64rem; letter-spacing: -.01em; } .darvo-head { font-size: .66rem; letter-spacing: .08em; } }

/* ───────────── Bystander Blind Spot (#/guide/bystander) ───────────── */
.qb-list { list-style: none; margin: 8px 0 18px; padding: 0; display: grid; gap: 2px; }
.qb-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dotted var(--ink-faint); }
.qb-q { margin: 0; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.qb-num { font-family: var(--font-type); font-size: .8rem; letter-spacing: .08em; color: var(--ink-faint); margin-right: 6px; }
.qb-opts { display: inline-flex; gap: 6px; flex: 0 0 auto; }
.qb {
  font: inherit; font-family: var(--font-type); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em;
  min-width: 4.2em; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--ink-faint);
  background: #fffdf6; color: var(--ink-soft); cursor: pointer; line-height: 1.2;
}
.qb:hover { border-color: var(--eggplant-2); color: var(--eggplant); }
.qb:focus-visible { outline: 2px solid var(--eggplant-glow); outline-offset: 2px; }
.qb[aria-pressed="true"] { background: var(--eggplant); border-color: var(--eggplant); color: #fff; }
.qb-result:empty { display: none; }
.qb-result { background: rgba(91, 42, 134, .08); padding: 12px 14px; border-radius: 4px; font-size: .92rem; margin: 0 0 14px; }
.qb-result p { margin: 0 0 6px; }
.qb-result p:last-child { margin-bottom: 0; }
.qb-stamp {
  display: inline-block; font-family: var(--font-type); text-transform: uppercase; letter-spacing: .12em;
  font-size: 1.05rem; color: var(--eggplant); border: 3px double var(--eggplant); border-radius: 4px;
  padding: 2px 12px; transform: rotate(-3deg); margin: 2px 0 10px !important;
}
.qb-count { font-family: var(--font-type); font-size: .8rem; letter-spacing: .06em; color: var(--ink-faint); }
.qb-actions { margin: 0 0 22px; }
@media (max-width: 480px) {
  .qb-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .qb-opts { justify-content: flex-end; }
}

/* ── To the friend who got the folder (#/guide/bystander): each question, its Yes / No, and a clinical-commentary
   drop-down under it (a video slot, the forensic concept, breakdown, mechanism and audit, sources) ── */
.qb-list .qb-row { display: block; padding: 14px 0 12px; }
.qb-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
@media (max-width: 560px) { .qb-line { flex-direction: column; align-items: stretch; gap: 10px; } .qb-line .qb-opts { justify-content: flex-end; } }
.qb-q { font-weight: 600; line-height: 1.5; }
.qb-more { margin: 10px 0 2px; border-radius: 14px; background: #fffdf7; border: 1px solid #e3d6b8; box-shadow: inset 0 1px 0 #fff, 0 3px 0 #e2d4b2; }
.qb-more > summary {
  list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px;
  min-height: 44px; padding: 10px 44px 10px 14px; position: relative; border-radius: 14px;
}
.qb-more > summary::-webkit-details-marker { display: none; }
.qb-more > summary::after {
  content: "▾"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--eggplant-2);
  font-size: 1.1rem; transition: transform .2s ease;
}
.qb-more[open] > summary::after { transform: translateY(-50%) rotate(180deg); }
.qb-more > summary:hover { background: rgba(124, 63, 179, .06); }
.qb-more > summary:focus-visible { outline: 3px solid var(--eggplant-2); outline-offset: 2px; }
.qb-more-k { font-family: var(--font-type); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--eggplant); }
.qb-more > summary b { font-family: var(--font-type); font-weight: 400; font-size: 1rem; color: var(--ink); }
.qb-more-body { padding: 0 14px 14px; }
.qb-video { margin: 4px 0 14px; }
.qb-video .crt { padding: 8px; }
.qb-video .ph-video, .qb-video video { aspect-ratio: 16 / 9; }
.qb-video figcaption { text-align: left; }
.qb-analysis { margin: 0; display: grid; gap: 12px; }
.qb-analysis dt { font-family: var(--font-type); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--eggplant); margin-bottom: 2px; }
.qb-analysis dd { margin: 0; line-height: 1.65; }
.qb-sources { margin: 12px 0 0; font-size: .86rem; color: var(--ink-soft); line-height: 1.55; }
.qb-sources a { color: var(--eggplant); }
/* a quiz page with more than one track (Stuck in the Middle): each track's heading and line, a dashed rule between */
.qb-track + .qb-track { margin-top: 34px; padding-top: 26px; border-top: 2px dashed var(--paper-edge); }
.qb-track-h { margin: 0 0 6px; font-family: var(--font-type); font-size: 1.15rem; letter-spacing: .06em; text-transform: uppercase; color: var(--eggplant); }
.qb-track-intro { margin: 0 0 10px; color: var(--ink-soft); }
/* a Yes on a safety question: the band gives way to "Safety first" in stamp red */
.qb-stamp-safety { color: var(--stamp); border-color: var(--stamp); }
.qb-abuse:focus { outline: 3px solid var(--eggplant-glow); outline-offset: 4px; border-radius: 4px; }
/* a book's buy links after its source (js/affiliate.js; only while an affiliate ID is set), and the disclosure line */
.qb-buy { font-size: .8rem; color: var(--ink-faint); white-space: nowrap; }
.qb-buy a { font-weight: 700; }
.qb-buy a.is-amazon { font-weight: 400; }
.qb-disclosure { margin: 6px 0 0; font-size: .78rem; color: var(--ink-faint); line-height: 1.5; }
.qb-navigate { margin: 26px 0 18px; padding: 18px 18px 14px; border-radius: 16px; background: #f6f0ff; border: 1px solid #dccbf3; box-shadow: inset 0 1px 0 #fff, 0 3px 0 #d9c8f0; }
.qb-navigate h2 { margin: 0 0 10px; font-family: var(--font-type); font-weight: 400; font-size: 1.25rem; color: var(--eggplant); }
.qb-navigate ul { margin: 0 0 12px; padding-left: 1.2em; display: grid; gap: 8px; }
.qb-navigate li { line-height: 1.6; }
.qb-abuse { margin: 0; padding: 12px 14px; border-radius: 12px; background: #fde9e7; border: 1px solid #eab0a9; color: #4d0f0a; line-height: 1.6; }
.qb-cta { margin: 22px 0 18px; padding: 16px 18px; border-left: 5px solid var(--eggplant); border-radius: 0 14px 14px 0; background: rgba(91, 42, 134, .07); }
.qb-cta p { margin: 0; font-family: var(--font-type); font-size: 1.08rem; line-height: 1.55; color: var(--ink); }
