/* =========================================================
   Ali Nagi — Designer for Fun
   Two voices, one page:
     data-mode="fun"      manga chapter (default)
     data-mode="serious"  dark, precise, skimmable version
   Most of the switch happens through the tokens below.
   ========================================================= */

/* Dela Gothic One, Latin letters, served from this site and preloaded on every page, so the
   lettering (and the word on the impact frame) never paints in a fallback font first.
   font-display: block waits for it instead of swapping. Japanese characters still come from
   Google's copy of the same font. */
@font-face {
  font-family: "Dela Punch";
  src: url("../fonts/dela-gothic-one-latin.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: block;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #f3eee2;
  --panel: #fffdf6;
  --ink: #121110;
  --rule: #121110;
  --red: #e3261c;
  --yellow: #ffd500;
  --mute: #5e594f;

  --line: 4px;
  --line-s: 3px;
  --gap: clamp(10px, 1.5vw, 18px);
  --pad: clamp(1.1rem, 2.6vw, 2.25rem);
  --edge: clamp(1.25rem, 4vw, 1.5rem);       /* page side margin: 20px on phones, 24px from tablets up */
  --shadow: 6px 6px 0 var(--ink);
  --sec: clamp(3rem, 7vw, 5.5rem);          /* between sections: 48px on phones, 88px on desktop */
  --lead: clamp(1.5rem, 3.5vw, 2.75rem);    /* from a page's title panel to its first content */

  --k: 1;                 /* tilt multiplier: 1 = theatrics, 0 = straight */
  --caps: uppercase;
  --dw: 400;              /* display weight */
  --h2: clamp(2.1rem, 6.2vw, 4.75rem);

  --display: "Dela Punch", "Dela Gothic One", "Archivo", system-ui, sans-serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

html[data-mode="serious"] {
  /* matte and dark: graphite, a slightly lighter graphite for cards, bone type, no pure black or white.
     --yellow is the accent slot the rest of Serious mode was built on: here it is bone,
     and --night (text on the accent) is the graphite. */
  --paper: #1e1e1d;
  --panel: #252524;
  --ink: #e9e6e0;
  --rule: #31302e;
  --red: #d08465;
  --yellow: #e9e6e0;
  --mute: #8f8b84;
  --night: #1e1e1d;

  --line: 1px;
  --line-s: 1px;
  --shadow: none;

  --k: 0;
  --caps: none;
  --dw: 600;
  --h2: clamp(1.7rem, 3.2vw, 2.6rem);

  --display: "Archivo", system-ui, sans-serif;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.75rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0; overflow-x: clip;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(18, 17, 16, .09) 1px, transparent 1.3px);
  background-size: 13px 13px;
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1rem, .94rem + .28vw, 1.125rem);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }
svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }

.vh {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: 1rem; top: -5rem; z-index: 300;
  background: var(--ink); color: var(--panel);
  padding: .6em 1em; font-weight: 700;
}
.skip:focus { top: 1rem; }

/* the two voices */
.s { display: none; }
html[data-mode="fun"] .s { display: none !important; }
html[data-mode="serious"] .m { display: none !important; }
html[data-mode="serious"] .s { display: revert; }

/* ---------- top bar ----------
   A panel the same width as the page, split into cells like a strip of frames:
   name | chapters … | contact | serious switch. */
.bar {
  position: sticky; top: 0; z-index: 50;
  max-width: 82rem; margin: 0 auto;
  padding: var(--gap) var(--edge) 0;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(18, 17, 16, .09) 1px, transparent 1.3px);
  background-size: 13px 13px;
}
.bar-in {
  display: flex; align-items: stretch;
  background: var(--panel);
  border: var(--line) solid var(--rule);
  box-shadow: var(--shadow);
}
.mark {
  display: flex; align-items: center; padding: .95rem 1.2rem;
  background: var(--ink); color: var(--panel);
  font-family: var(--display); font-weight: var(--dw);
  font-size: 1.05rem; letter-spacing: .02em; white-space: nowrap;
  text-transform: var(--caps); text-decoration: none;
}
.mark[aria-current="page"] { color: var(--yellow); }
.bar nav { display: flex; flex: 1; min-width: 0; }
.bar nav a {
  display: flex; align-items: center; gap: .65em;
  padding: 1rem 1.2rem;
  border-right: var(--line-s) solid var(--rule);
  font: 700 .85rem/1 var(--mono); letter-spacing: .1em; white-space: nowrap;
  text-transform: uppercase; text-decoration: none;
}
.nav-no { color: var(--red); }
.bar nav a.nav-contact { margin-left: auto; border-right: 0; border-left: var(--line-s) solid var(--rule); }
.nav-contact .nav-no { display: none; }
.menu-btn { display: none; }
.bar nav a[aria-current="page"] { background: var(--yellow); }
html[data-mode="fun"] .bar nav a:hover,
html[data-mode="fun"] .bar nav a:focus-visible { background: var(--ink); color: var(--panel); }
html[data-mode="fun"] .bar nav a:hover .nav-no,
html[data-mode="fun"] .bar nav a:focus-visible .nav-no { color: var(--yellow); }

.toggle {
  display: inline-flex; align-items: center; gap: .6rem;
  background: none; border: 0; color: inherit; cursor: pointer;
  padding: 0 1.1rem; border-left: var(--line-s) solid var(--rule);
  font: 700 .82rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
}
.toggle-track {
  position: relative; width: 44px; height: 24px;
  border: 3px solid var(--ink); border-radius: 99px; background: var(--panel);
}
.toggle-track::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px; border-radius: 50%; background: var(--ink);
  transition: translate .12s ease-out;
}
.toggle[aria-pressed="true"] .toggle-track { background: var(--ink); }
.toggle[aria-pressed="true"] .toggle-track::after { translate: 20px 0; background: #fff; }
.toggle-state { min-width: 2.2em; text-align: left; }

/* When the row no longer fits, the chapters fold into a menu that drops from the bar. */
@media (max-width: 1180px) {
  .bar-in { position: relative; }
  .mark { margin-right: auto; }
  .menu-btn {
    display: flex; align-items: center; gap: .7em;
    padding: 0 1.1rem; cursor: pointer;
    background: none; color: inherit; border: 0; border-left: var(--line-s) solid var(--rule);
    font: 700 .85rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  }
  .menu-icon { width: 18px; height: 11px; border-top: 3px solid currentColor; border-bottom: 3px solid currentColor; }
  html[data-mode="fun"] .menu-btn:hover { background: var(--ink); color: var(--panel); }
  .bar.open .menu-btn, html[data-mode="fun"] .bar.open .menu-btn:hover { background: var(--yellow); color: #121110; }
  .bar.open .menu-icon { height: 0; border-bottom: 0; }

  .bar nav {
    display: none; flex-direction: column;
    position: absolute; top: 100%; left: calc(-1 * var(--line)); right: calc(-1 * var(--line));
    background: var(--panel);
    border: var(--line) solid var(--rule); box-shadow: var(--shadow);
  }
  .bar.open nav { display: flex; }
  .bar nav a, .bar nav a.nav-contact {
    gap: 1.1rem; margin: 0; padding: 1.05rem 1.2rem;
    border: 0; border-bottom: var(--line-s) solid var(--rule);
    font: var(--dw) clamp(1.35rem, 5.2vw, 2rem)/1 var(--display); letter-spacing: 0; text-transform: var(--caps);
  }
  .bar nav a.nav-contact { border-bottom: 0; }
  .bar nav .nav-no, .nav-contact .nav-no { display: inline; width: 3.9rem; font: 700 .82rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }

  /* without scripts there is no menu button: show the links as a second row */
  html:not(.js) .menu-btn { display: none; }
  html:not(.js) .bar-in { flex-wrap: wrap; }
  html:not(.js) .bar nav { display: flex; flex-direction: row; flex-wrap: wrap; position: static; order: 5; flex: 1 1 100%; border: 0; border-top: var(--line-s) solid var(--rule); box-shadow: none; }
  html:not(.js) .bar nav a { flex: 1; justify-content: center; padding: .8rem .5rem; border: 0; border-right: var(--line-s) solid var(--rule); font: 700 .7rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
  html:not(.js) .bar nav .nav-no { display: none; }
}

/* ---------- page ---------- */
.page {
  max-width: 82rem; margin: 0 auto;
  padding: var(--gap) var(--edge) 0;
}
section { scroll-margin-top: 5.75rem; }

.kicker {
  margin: 0;
  font: 700 .87rem/1.3 var(--mono);
  letter-spacing: .14em; text-transform: uppercase;
}

.btn {
  display: inline-flex; align-items: center; gap: .7em;
  font: 800 1rem/1 var(--body); font-stretch: 88%;
  letter-spacing: .07em; text-transform: uppercase; text-decoration: none;
  color: var(--panel); background: var(--ink);
  border: var(--line) solid var(--ink);
  padding: .95em 1.25em;
  box-shadow: 5px 5px 0 var(--red);
}
.btn:hover { translate: 2px 2px; box-shadow: 3px 3px 0 var(--red); }
.btn:active { translate: 5px 5px; box-shadow: none; }

/* ---------- screentone + speed lines ---------- */
.speed {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  --fx: 46%; --fy: 40%; --c: var(--ink);
  background:
    repeating-conic-gradient(from 0deg at var(--fx) var(--fy), var(--c) 0 .32deg, transparent .32deg 4.5deg),
    repeating-conic-gradient(from 2deg at var(--fx) var(--fy), var(--c) 0 .6deg, transparent .6deg 7.2deg),
    repeating-conic-gradient(from 5deg at var(--fx) var(--fy), var(--c) 0 1deg, transparent 1deg 12deg);
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at var(--fx) var(--fy), transparent var(--hole), #000 100%);
          mask-image: radial-gradient(ellipse 80% 90% at var(--fx) var(--fy), transparent var(--hole), #000 100%);
  --o: .5; opacity: calc(var(--o) * var(--pulse) * var(--flare));
}
.speed--light { --c: #fffdf6; --o: .16; --fx: 100%; --fy: 0%; }

/* halftone: ink dots that shrink away from one corner. Big dots near the corner, small dots
   further out, and the whole field fades with a mask. No filters or blend modes, so it renders
   the same in every browser (Safari on iOS painted the old contrast-and-multiply version as a
   pale patch over the speed lines). */
.halftone {
  position: absolute; z-index: -1; pointer-events: none;
  -webkit-mask-image: linear-gradient(var(--dir, to top right), #000 0%, #000 18%, transparent 62%);
          mask-image: linear-gradient(var(--dir, to top right), #000 0%, #000 18%, transparent 62%);
}
.halftone::before, .halftone::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at center, var(--ink) var(--r), transparent calc(var(--r) + .6px)) 0 0 / 10px 10px,
    radial-gradient(circle at center, var(--ink) var(--r), transparent calc(var(--r) + .6px)) 5px 5px / 10px 10px;
}
.halftone::before {   /* big dots, only near the corner */
  --r: 3.3px;
  -webkit-mask-image: linear-gradient(var(--dir, to top right), #000 0%, #000 12%, transparent 32%);
          mask-image: linear-gradient(var(--dir, to top right), #000 0%, #000 12%, transparent 32%);
}
.halftone::after { --r: 1.5px; }   /* small dots everywhere the field reaches */

/* =========================================================
   CH.01 — COVER
   ========================================================= */
.cover {
  position: relative; isolation: isolate; overflow: hidden;
  container-type: inline-size;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "kick jp" "title jp" "foot foot";
  gap: clamp(1rem, 2.4vw, 2rem) clamp(.75rem, 2vw, 1.5rem);
  align-content: space-between;
  min-height: min(86svh, 900px);
  padding: var(--pad);
  background: var(--yellow);
  border: var(--line) solid var(--rule);
  box-shadow: var(--shadow);
}
.cover > .kicker { grid-area: kick; }
.cover-tone { inset: 35% 45% 0 0; --dir: to top right; opacity: .32; }

.jp {
  grid-area: jp; align-self: start; margin: 0;
  writing-mode: vertical-rl;
  font-family: var(--display);
  font-size: clamp(.8rem, 1.5cqw, 1.15rem);
  letter-spacing: .2em; line-height: 1.2;
  background: var(--panel);
  border: var(--line-s) solid var(--ink);
  padding: .9em .5em;
}

.title { grid-area: title; margin: 0; align-self: center; }
.title-fun {
  display: block;
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2.5rem, 13.3cqw, 12.5rem);
  line-height: .93; letter-spacing: -.01em; text-transform: uppercase;
  rotate: -3deg; transform-origin: 0 100%;
  padding: .12em 0 0 .1em;
}
.title-fun .t1, .title-fun .t2 { display: block; white-space: nowrap; }
.title-fun .t2 {
  margin-left: .5em;
  color: var(--panel);
  -webkit-text-stroke: .05em var(--ink);
  paint-order: stroke fill;
  text-shadow: .055em .055em 0 var(--red);
}

.cover-foot {
  grid-area: foot;
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr);
  gap: clamp(1rem, 3cqw, 2.5rem); align-items: end;
}
.cover-left { display: grid; gap: 1.4rem; justify-items: start; }

.narration {
  max-width: 44rem;
  background: var(--panel);
  border: var(--line-s) solid var(--rule);
  box-shadow: var(--shadow);
  padding: 1rem 1.2rem;
  font-size: clamp(1rem, 1.55cqw, 1.2rem); line-height: 1.45; font-weight: 500;
}
.narration p { margin: 0; }
/* the way out, for anyone who finds the comic too loud */
/* first visit: a one-time note under the switch */
.mode-hint {
  position: fixed; z-index: 70;
  top: calc(var(--tag-top) + var(--tag-h) + .85rem);
  right: max(var(--edge), calc((100vw - 82rem) / 2 + var(--edge)));
  width: min(18.5rem, calc(100vw - 2 * var(--edge)));
  padding: .95rem 2.6rem 1rem 1.05rem;
  background: var(--panel); color: var(--ink);
  border: var(--line) solid var(--ink); box-shadow: 5px 5px 0 var(--red);
  font: 600 1rem/1.35 var(--body);
  animation: hint-in .4s cubic-bezier(.2, 1.4, .3, 1) both;
}
.mode-hint::before {
  content: ""; position: absolute; top: -9px; right: var(--arrow, 5rem);
  width: 14px; height: 14px; background: var(--panel);
  border-left: var(--line) solid var(--ink); border-top: var(--line) solid var(--ink); rotate: 45deg;
}
.mode-hint p { margin: 0 0 .8rem; }
.mode-hint-x {
  position: absolute; top: .3rem; right: .3rem; width: 2.2rem; height: 2.2rem;
  display: grid; place-items: center; padding: 0; border: 0; background: none; color: var(--ink);
  font: 400 1.5rem/1 var(--body); cursor: pointer;
}
.mode-hint-x:hover, .mode-hint-x:focus-visible { background: var(--yellow); outline: none; }
.mode-hint.is-out { opacity: 0; translate: 0 -6px; transition: opacity .2s, translate .2s; }
@keyframes hint-in { from { opacity: 0; translate: 0 -10px; } }
@media (prefers-reduced-motion: reduce) { .mode-hint { animation: none; } .mode-hint.is-out { transition: none; } }
.narration .narration-quiet { margin-top: .9rem; font-size: .88em; font-weight: 600; }
.narration-quiet button {
  padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer;
  text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: .22em; text-decoration-color: var(--red);
}
.narration-quiet button:hover { text-decoration-color: var(--ink); }
.narration-quiet button:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.narration .narration-tag {
  display: inline-block; margin-top: .85rem;
  background: var(--ink); color: var(--yellow);
  font-family: var(--display); text-transform: uppercase;
  font-size: .95em; line-height: 1.2;
  padding: .5em .85em; rotate: -1.5deg;
}

.cover-right { display: grid; justify-items: end; gap: .25rem; }
.threat-report {
  width: min(100%, 19rem);
  background: var(--ink); color: var(--panel);
  font: 700 .74rem/1.55 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  rotate: 1.5deg;
  box-shadow: 5px 5px 0 var(--red);
}
.threat-report b { display: block; background: var(--red); color: #fff; padding: .45em .8em; }
.threat-report p { margin: 0; padding: .7em .8em .8em; }
.threat-report em { font-style: normal; color: var(--yellow); }

.ok, .say { position: relative; display: grid; place-items: center; }
.ok { width: clamp(7rem, 15cqw, 11rem); margin-right: 1rem; rotate: -4deg; }
.ok svg, .say svg { grid-area: 1 / 1; width: 100%; height: auto; overflow: visible; }
.ok path, .say path { fill: var(--panel); stroke: var(--ink); stroke-width: 7; stroke-linejoin: round; }
.ok span, .say span {
  grid-area: 1 / 1; translate: 0 -8%;
  font-family: var(--display); line-height: 1; text-align: center;
}
.ok span { font-size: clamp(1.6rem, 4.2cqw, 3rem); }

/* =========================================================
   Chapter headers
   ========================================================= */
.chapter {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem 1rem;
  margin: var(--sec) 0 clamp(.9rem, 2vw, 1.4rem);
}
.chapter-no {
  display: inline-grid; justify-items: start; row-gap: .4em;
  font: 700 .85rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  background: var(--ink); color: var(--panel);
  padding: .5em .7em; margin-bottom: .55em;
}
.chapter h2 {
  margin: 0;
  font-family: var(--display); font-weight: var(--dw);
  font-size: var(--h2); line-height: .98; letter-spacing: -.01em;
  text-transform: var(--caps);
}
.chapter p { margin: 0 0 .5em auto; max-width: 26rem; font-weight: 600; text-align: right; }

.lead { max-width: 46rem; margin: 0; font-size: 1.15em; }

/* =========================================================
   CH.02 — ORIGIN STRIP
   ========================================================= */
.strip {
  display: grid; grid-template-columns: 1.1fr .8fr 1.5fr; gap: var(--gap);
  padding: 0 clamp(16px, 2.2vw, 28px);
}
.cell {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(16rem, 27vw, 22rem);
  background: var(--panel);
  border: var(--line) solid var(--ink);
  transform: skewX(-7deg);
}
.cell-in {
  height: 100%; transform: skewX(7deg);
  display: flex; flex-direction: column; justify-content: space-between; gap: 1rem;
  padding: 1.1rem clamp(1.6rem, 3vw, 2.4rem);
}
.cap {
  margin: 0; align-self: flex-start; max-width: 24rem;
  background: var(--panel); border: var(--line-s) solid var(--ink);
  padding: .55em .75em;
  font-size: .95rem; font-weight: 600; line-height: 1.4;
}
.cap--tag {
  align-self: flex-end; background: var(--ink); color: var(--yellow);
  font-family: var(--display); font-weight: 400; text-transform: uppercase; rotate: -2deg;
}
.cell--year .big {
  margin: 0; align-self: flex-end;
  font-family: var(--display); font-size: clamp(3.4rem, 7vw, 6.2rem); line-height: .8;
  color: var(--panel); -webkit-text-stroke: .04em var(--ink); paint-order: stroke fill;
  text-shadow: .05em .05em 0 var(--ink);
}
.cell--dark { background: var(--ink); }
.cell--dark .cell-in { justify-content: center; align-items: center; }
.say { width: min(100%, 13rem); }
.say span { font-size: clamp(1.05rem, 2vw, 1.5rem); max-width: 6.5em; }
.cell--dark .cap { align-self: flex-end; }
.later-tone { inset: 0; --dir: to bottom left; opacity: .55; }
.band {
  margin: .4rem 0 0; align-self: flex-start;
  background: var(--ink); color: var(--panel);
  font-family: var(--display); text-transform: uppercase;
  font-size: clamp(1.5rem, 3.6vw, 3rem); line-height: 1.05;
  padding: .25em .5em; rotate: -2deg;
}

/* =========================================================
   CH.03 — CASE FILES
   ========================================================= */
.files { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.file { display: flex; grid-column: span 6; }
.file:nth-child(1), .file:nth-child(4) { grid-column: span 7; }
.file:nth-child(2), .file:nth-child(3) { grid-column: span 5; }

.file-body {
  flex: 1; position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; gap: 1rem;
  padding: var(--pad);
  background: var(--panel); color: var(--ink);
  border: var(--line) solid var(--rule);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.file-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.file-no { font: 700 .85rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; }

.stamp {
  display: inline-flex; align-items: center; gap: .45em;
  font: 800 .78rem/1 var(--body); font-stretch: 82%;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--red); border: var(--line-s) solid currentColor;
  padding: .4em .6em;
  rotate: calc(var(--k) * 4deg);
}
.stamp svg { width: .95em; height: .95em; }
.stamp--wip { color: var(--mute); }
.stamp--open { color: var(--ink); rotate: calc(var(--k) * -3deg); }
html[data-mode="fun"] a.file-body:hover .stamp--open,
html[data-mode="fun"] a.file-body:focus-visible .stamp--open { color: var(--yellow); }

.file h3 {
  margin: 0;
  font-family: var(--display); font-weight: var(--dw);
  font-size: clamp(1.7rem, 4.1vw, 3.3rem); line-height: 1; text-transform: var(--caps);
}
.file h3 small {
  display: block; margin-bottom: .55em;
  font: 800 .8rem/1.2 var(--body); font-stretch: 82%;
  letter-spacing: .16em; text-transform: uppercase; color: var(--red);
}
.file-line { margin: 0; max-width: 34rem; font-weight: 500; }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.chips li {
  font: 700 .78rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  border: 2px solid currentColor; padding: .5em .6em;
}

.file-meta { display: flex; flex-wrap: wrap; gap: .5rem 2.2rem; margin: 0; }
.file-meta dt, .fields dt, .gate-meta dt {
  font: 700 .76rem/1.5 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute);
}
.file-meta dd { margin: 0; font-weight: 700; }

.threat {
  margin-top: auto; padding-top: 1rem;
  border-top: var(--line-s) solid var(--rule);
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .7rem;
  font: 700 .82rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
}
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 1.15rem; height: .72rem; border: 2px solid currentColor; transform: skewX(-18deg); }
.threat[data-level="1"] i:nth-child(-n+1),
.threat[data-level="2"] i:nth-child(-n+2),
.threat[data-level="3"] i:nth-child(-n+3),
.threat[data-level="4"] i { background: var(--red); border-color: var(--red); }
.threat strong { font-family: var(--display); font-weight: var(--dw); font-size: 1.05rem; letter-spacing: .02em; }

.file-cta {
  display: inline-flex; align-items: center; gap: .5em; align-self: flex-start; width: fit-content;
  font: 800 .9rem/1 var(--body); font-stretch: 88%; letter-spacing: .08em; text-transform: uppercase;
  padding-bottom: .4em; background: linear-gradient(var(--red), var(--red)) left bottom / 100% 3px no-repeat;
}
.file-cta .ext { width: 1em; height: 1em; flex: none; }

.file-body::after {
  content: attr(data-no);
  position: absolute; right: -.04em; bottom: .32em; z-index: -1; pointer-events: none;
  font-family: "Dela Punch", "Dela Gothic One", sans-serif; font-size: clamp(7rem, 17vw, 14rem); line-height: .8;
  color: transparent; -webkit-text-stroke: 2px var(--ghost, rgba(18, 17, 16, .13));
}
html[data-mode="serious"] .file-body::after { content: none; }

/* the punch: a sealed file takes the hit and flips to ink */
a.file-body::before, a.door::before, a.next::before, .pin::after, a.note::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; pointer-events: none;
  background:
    repeating-conic-gradient(from 0deg at 100% 0%, #fffdf6 0 .4deg, transparent .4deg 5deg),
    repeating-conic-gradient(from 1deg at 100% 0%, #fffdf6 0 .8deg, transparent .8deg 9deg);
  -webkit-mask-image: radial-gradient(circle at 100% 0%, transparent 25%, #000 90%);
          mask-image: radial-gradient(circle at 100% 0%, transparent 25%, #000 90%);
}
html[data-mode="fun"] a.file-body:hover,
html[data-mode="fun"] a.file-body:focus-visible {
  --mute: #bdb7a9; --rule: #fffdf6; --ghost: rgba(255, 253, 246, .2);
  background: var(--ink); color: var(--panel);
  border-color: var(--ink);
  animation: hit .22s cubic-bezier(.2, 1.6, .4, 1);
}
html[data-mode="fun"] a.file-body:hover::before,
html[data-mode="fun"] a.file-body:focus-visible::before,
html[data-mode="fun"] a.door:hover::before,
html[data-mode="fun"] a.door:focus-visible::before,
html[data-mode="fun"] a.next:hover::before,
html[data-mode="fun"] a.next:focus-visible::before,
html[data-mode="fun"] .board .pin:hover::after,
html[data-mode="fun"] .board .pin:focus-within::after,
html[data-mode="fun"] a.note:hover::before { opacity: .2; }
html[data-mode="fun"] a.file-body:hover h3 small,
html[data-mode="fun"] a.file-body:focus-visible h3 small { color: var(--yellow); }
@keyframes hit { from { scale: 1.03; } to { scale: 1; } }

.legend {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none; margin: calc(var(--gap) + 6px) 0 0; padding: 0;
  background: var(--panel); border: var(--line) solid var(--ink);
}
.legend li {
  padding: .8rem 1rem; border-right: var(--line-s) solid var(--ink);
  font-size: .9rem; font-weight: 500; line-height: 1.35;
}
.legend li:last-child { border-right: 0; }
.legend b {
  display: block; margin-bottom: .15em;
  font-family: var(--display); font-weight: 400; font-size: 1.05rem; text-transform: uppercase;
}
.sealed-note { margin: 1.1rem 0 0; font-weight: 600; }
.sealed-note a, .gate-help a, .case a { text-decoration-thickness: 3px; text-underline-offset: .25em; text-decoration-color: var(--red); }

/* =========================================================
   CH.04 — REGISTRY
   ========================================================= */
.registry {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  gap: clamp(1.25rem, 3vw, 2.5rem); align-items: start;
}
.idcard {
  background: var(--panel);
  border: var(--line) solid var(--rule);
  box-shadow: var(--shadow);
  rotate: calc(var(--k) * -.8deg);
}
.idcard-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem 1rem;
  background: var(--ink); color: var(--panel);
  font: 700 .8rem/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  padding: .75em 1.1em;
}
.idcard-body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(1rem, 2.4vw, 1.75rem); padding: var(--pad); }
.idside { display: grid; gap: 1rem; align-content: start; width: clamp(6.5rem, 13vw, 9.5rem); }
.idphoto {
  aspect-ratio: 4 / 5; display: grid; place-content: center; gap: .5rem; text-align: center; padding: .5rem;
  border: var(--line-s) solid var(--ink);
  background: repeating-linear-gradient(45deg, transparent 0 6px, rgba(18, 17, 16, .14) 6px 7px);
  font: 700 .62rem/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase;
}
.idphoto small { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 1em; }
.idclass { border: var(--line-s) solid var(--red); color: var(--red); text-align: center; rotate: -5deg; padding: .3rem; }
.idclass span { display: block; font: 700 .62rem/1.4 var(--mono); letter-spacing: .22em; text-transform: uppercase; }
.idclass b { display: block; font-family: var(--display); font-weight: 400; font-size: 3.2rem; line-height: 1; }

.fields { margin: 0; display: grid; align-content: start; }
.fields > div {
  display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: .75rem;
  padding: .55rem 0; border-bottom: 2px dashed color-mix(in srgb, var(--ink) 28%, transparent);
}
.fields > div:last-child { border-bottom: 0; }
.fields dd { margin: 0; font-weight: 600; line-height: 1.4; }

.mini {
  margin: 0 0 .6rem;
  font: 700 .87rem/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase;
}
.ranks { list-style: none; margin: 0; padding: 0; border-top: var(--line) solid var(--rule); }
.ranks li {
  display: flex; align-items: center; gap: .9rem;
  padding: .7rem 0; border-bottom: var(--line-s) solid var(--rule);
}
.rank-class {
  flex: none; width: 2.5rem; aspect-ratio: 1; display: grid; place-items: center;
  font-family: var(--display); font-size: 1.4rem; line-height: 1;
  border: var(--line-s) solid var(--ink); background: var(--panel);
}
.ranks .now .rank-class { background: var(--red); border-color: var(--red); color: #fff; }
.rank-year { flex: none; width: 3rem; font: 700 .8rem/1 var(--mono); }
.rank-role { flex: 1; line-height: 1.3; color: var(--mute); font-weight: 500; }
.rank-role b { display: block; color: var(--ink); font-weight: 750; }
.ranks em {
  font: 700 .76rem/1 var(--mono); font-style: normal; letter-spacing: .14em; text-transform: uppercase;
  background: var(--ink); color: var(--panel); padding: .45em .6em;
}

/* =========================================================
   CH.05 — TRAINING
   ========================================================= */
.training { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); }
.regimen {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  background: var(--ink); color: var(--panel);
  border: var(--line) solid var(--ink);
  box-shadow: 6px 6px 0 var(--red);
  padding: var(--pad);
}
.regimen ul {
  list-style: none; margin: 0; padding: 0;
  font-family: var(--display); text-transform: uppercase;
  font-size: clamp(1.25rem, 2.7vw, 2.2rem); line-height: 1.22;
}
.regimen li b { font-weight: 400; color: var(--yellow); }
.regimen .every {
  margin: .5em 0 0; font-family: var(--display); text-transform: uppercase;
  font-size: clamp(1.7rem, 4vw, 3.2rem); line-height: 1; color: var(--red);
  rotate: -2deg; transform-origin: 0 50%;
}
.regimen .fine { margin: 1.4rem 0 0; font: 400 .85rem/1.4 var(--mono); letter-spacing: .06em; opacity: .75; }

.principles { list-style: none; counter-reset: p; display: grid; gap: var(--gap); margin: 0; padding: 0; }
.principles li {
  position: relative; counter-increment: p;
  background: var(--panel); border: var(--line) solid var(--rule);
  padding: 1rem 1.2rem 1.05rem 4.4rem;
}
.principles li::before {
  content: counter(p, decimal-leading-zero);
  position: absolute; left: 1.1rem; top: .95rem;
  font-family: var(--display); font-weight: var(--dw); font-size: 1.4rem; line-height: 1.15; color: var(--red);
}
.principles h3 { margin: 0 0 .25rem; font-size: 1.15rem; font-weight: 800; line-height: 1.25; }
.principles p { margin: 0; font-weight: 450; }

/* =========================================================
   CH.06 — CONTACT + footer
   ========================================================= */
.contact {
  position: relative; isolation: isolate; overflow: hidden;
  margin-top: var(--sec);
  padding: clamp(1.75rem, 5vw, 4rem) var(--pad);
  background: var(--yellow);
  border: var(--line) solid var(--rule);
  box-shadow: var(--shadow);
}
.contact .speed { --fx: 22%; --fy: 50%; --o: .34; }
.contact h2 {
  margin: .3em 0 .12em;
  font-family: var(--display); font-weight: var(--dw);
  font-size: clamp(2.4rem, 9vw, 7.5rem); line-height: .95; text-transform: var(--caps);
}
.contact-line { margin: 0 0 1.6rem; font-size: 1.25em; font-weight: 600; max-width: 34rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.foot {
  max-width: 82rem; margin: 0 auto;
  padding: 2rem var(--edge) 2.5rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 2rem;
  font: 400 .85rem/1.5 var(--mono); letter-spacing: .04em;
}
.foot p { margin: 0; }

/* =========================================================
   Motion
   ========================================================= */
.js .reveal { opacity: 0; scale: 1.04; }
.js .reveal.in { opacity: 1; scale: 1; transition: scale .24s cubic-bezier(.2, 1.5, .4, 1), opacity .1s linear; }

.impact {
  position: fixed; inset: 0; z-index: 200; pointer-events: none;
  display: grid; place-items: center; overflow: hidden;
  background: #fffdf6; opacity: 0; visibility: hidden;
}
.impact::before {
  content: ""; position: absolute; inset: 0;
  background:
    repeating-conic-gradient(from 0deg at 50% 50%, rgba(18, 17, 16, .32) 0 .5deg, transparent .5deg 4.5deg),
    repeating-conic-gradient(from 2deg at 50% 50%, rgba(18, 17, 16, .32) 0 1deg, transparent 1deg 9deg);
  -webkit-mask-image: radial-gradient(ellipse at center, transparent 48%, #000 100%);
          mask-image: radial-gradient(ellipse at center, transparent 48%, #000 100%);   /* soft grey lines at the edges: no dark strobe */
}
.impact span {
  position: relative; rotate: -8deg; white-space: nowrap;
  font-family: "Dela Punch", "Dela Gothic One", sans-serif; font-size: min(30vw, 46vh); line-height: 1; color: #121110;
}
html.punch .impact { visibility: visible; animation: impact .82s ease-out both; }
html.punch .impact span { animation: slam .82s cubic-bezier(.2, 1.4, .3, 1) both; }
@keyframes impact { 0% { opacity: 0; } 11%, 70% { opacity: 1; } 100% { opacity: 0; } }   /* a 90ms fade in, not a hard cut to white */
@keyframes slam { 0% { scale: 1.25; opacity: 0; } 11% { opacity: 1; } 20% { scale: 1; } 100% { scale: 1.05; } }   /* a pop, not a screen-filling slam */
@keyframes shake {
  20% { translate: -8px 0; } 40% { translate: 7px 0; } 60% { translate: -5px 0; } 80% { translate: 3px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .reveal.in { opacity: 1; scale: 1; transition: none; }
  a.file-body, .gate.shake { animation: none !important; }
  .toggle-track::after { transition: none; }
}

/* =========================================================
   CASE PAGES — the gate and the unlocked file
   ========================================================= */
.page--case { padding-top: clamp(1.5rem, 4vw, 3rem); }
.back {
  display: inline-block; margin-bottom: 1.25rem;
  font: 700 .85rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
  border-bottom: 3px solid var(--red); padding-bottom: .35em;
}
.gate {
  position: relative; isolation: isolate; overflow: hidden;
  margin: 0;   /* full page width, like every other panel */
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.4rem; container-type: inline-size;
  padding: clamp(1.4rem, 4vw, 3rem);
  background: var(--ink); color: var(--panel);
  border: var(--line) solid var(--ink);
  box-shadow: 6px 6px 0 var(--red);
  --mute: #bdb7a9;
}
.gate h1 {
  margin: 0;
  font-family: var(--display); font-weight: var(--dw);
  font-size: clamp(2.1rem, 7vw, 4.6rem); line-height: .98; text-transform: var(--caps);
}
.gate h1 small {
  display: block; margin-bottom: .6em;
  font: 800 .85rem/1.2 var(--body); font-stretch: 82%; letter-spacing: .16em; text-transform: uppercase; color: var(--yellow);
}
.gate-meta { display: flex; flex-wrap: wrap; gap: .6rem 2.4rem; margin: 0; }
.gate-meta dd { margin: 0; font-weight: 700; }
.gate-why { margin: 0; font-size: 1.15em; font-weight: 600; max-width: 34rem; }
.gate-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .9rem; max-width: 40rem; }   /* the card is wide; the field stays a sensible length */
.gate-form label {
  flex: 1 1 16rem; display: grid; gap: .5rem;
  font: 700 .82rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
}
.gate-form input {
  width: 100%; border-radius: 0;
  font: 600 1.1rem/1.2 var(--mono); color: inherit;
  background: transparent; border: var(--line-s) solid currentColor;
  padding: .8em .9em;
}
.gate-form .btn { background: var(--yellow); color: var(--ink); border-color: var(--yellow); cursor: pointer; }
.gate-form .btn[disabled] { opacity: .6; cursor: progress; }
.gate-msg { margin: 0; min-height: 1.5em; font-weight: 700; color: var(--yellow); }
.gate-help { margin: 0; font-size: .95rem; }
.gate.shake { animation: shake .32s; }

.case { max-width: 46rem; margin: 0 auto; }
.case:focus { outline: none; }
.case-head { padding-bottom: 1.5rem; border-bottom: var(--line) solid var(--rule); }
.case h1 {
  margin: .5rem 0 clamp(1rem, 2.2vw, 1.5rem);
  font-family: var(--display); font-weight: var(--dw);
  font-size: clamp(2.3rem, 8vw, 5.2rem); line-height: .98; text-transform: var(--caps);
}
.case-lede { margin: 0; font-size: 1.25em; font-weight: 500; }
.case section { padding: 1.75rem 0; border-bottom: var(--line-s) solid var(--rule); }
.case h2 {
  display: inline-block; margin: 0 0 .8rem;
  font-family: var(--display); font-weight: var(--dw); font-size: 1.35rem; line-height: 1.1; text-transform: var(--caps);
  background: var(--ink); color: var(--panel); padding: .3em .6em; rotate: calc(var(--k) * -1.2deg);
}
.case p { margin: 0 0 1em; }
.case figure { margin: 1.5rem 0; }
.case img { display: block; max-width: 100%; height: auto; border: var(--line) solid var(--rule); }
.case figcaption { margin-top: .85rem; font: 400 .88rem/1.4 var(--mono); color: var(--mute); }
.placeholder {
  border: 2px dashed var(--mute); padding: .8rem 1rem; color: var(--mute);
  font: 400 .85rem/1.5 var(--mono);
}

/* =========================================================
   Smaller screens
   ========================================================= */
@media (max-width: 880px) {
  .cover-foot { grid-template-columns: 1fr; }
  .cover-right { justify-items: start; grid-auto-flow: column; align-items: end; justify-content: start; gap: 1rem; }
  .strip { grid-template-columns: 1fr; padding: 0; }
  .cell, .cell-in { transform: none; }
  .cell { min-height: 0; }
  .cell-in { padding: 1.1rem; min-height: 12rem; }
  .file { grid-column: 1 / -1 !important; }
  .file-body::after { content: none; }
  .legend { grid-template-columns: 1fr 1fr; }
  .legend li:nth-child(2) { border-right: 0; }
  .legend li:nth-child(-n+2) { border-bottom: var(--line-s) solid var(--ink); }
  .registry, .training { grid-template-columns: 1fr; }
  .chapter p { margin-left: 0; text-align: left; }
}
@media (max-width: 560px) {
  .cover { grid-template-columns: minmax(0, 1fr); grid-template-areas: "kick" "jp" "title" "foot"; min-height: 0; }
  .jp { writing-mode: horizontal-tb; justify-self: start; font-size: .68rem; letter-spacing: .12em; padding: .5em .7em; }
  .title-fun { font-size: 14.4cqw; }
  .ok { margin-right: 0; }
  .toggle-label, .toggle-state { display: none; }
  .toggle::before { content: "Serious"; }
  .toggle, .menu-btn { padding: 0 .8rem; }
  .mark { flex: 1; padding: .95rem .9rem; }
  .menu-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .idcard-body { grid-template-columns: 1fr; }
  .idside { width: auto; grid-template-columns: 7rem 5rem; align-items: center; }
  .fields > div { grid-template-columns: 1fr; gap: 0; }
  .principles li { padding-left: 3.9rem; }
  .principles li::before { left: .9rem; font-size: 1.2rem; line-height: 1.3; }
}
@media (max-width: 350px) {
  .toggle::before { content: none; }
  .mark { font-size: .95rem; padding-inline: .75rem; }
}

/* =========================================================
   PAGE HEADS, and the PLAYGROUND — the moodboard
   ========================================================= */

.page-head {
  position: relative; isolation: isolate; overflow: hidden;
  container-type: inline-size;
  display: grid; gap: .9rem; justify-items: start;
  padding: clamp(1.4rem, 4vw, 3rem) var(--pad);
  background: var(--yellow);
  border: var(--line) solid var(--rule);
  box-shadow: var(--shadow);
}
.page-head .speed { --fx: 82%; --fy: 35%; --o: .4; }
.page-head h1 {
  margin: 0;
  font-family: var(--display); font-weight: var(--dw);
  font-size: clamp(1.7rem, var(--fit, 15cqw), 11rem); line-height: .95; text-transform: var(--caps);
}
.head-jp {
  display: inline-block; margin-left: .4em; vertical-align: .95em;
  font-size: .26em; line-height: 1; letter-spacing: .12em;
  background: var(--panel); border: var(--line-s) solid var(--ink);
  padding: .35em .5em; rotate: 6deg;
}
.page-sub {
  margin: 0; max-width: 40rem;
  background: var(--panel); border: var(--line-s) solid var(--rule); box-shadow: var(--shadow);
  padding: .8rem 1.1rem; font-size: 1.1em; font-weight: 600; line-height: 1.4;
}

.board {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 clamp(14px, 2vw, 26px);
  margin-top: clamp(2rem, 4.5vw, 3.25rem); padding: 0 6px;
}
.col { flex: 1 1 0; min-width: 0; }
.pin, .note { margin: 0 0 clamp(20px, 2.6vw, 32px); }

.pin {
  position: relative; isolation: isolate; display: block;
  padding: .5rem .5rem .1rem;
  background: var(--panel);
  border: var(--line) solid var(--rule);
  box-shadow: var(--shadow);
  rotate: calc(var(--k) * var(--r, -1deg));
}
.col > :nth-child(odd) { --r: -1.2deg; }
.col > :nth-child(even) { --r: 1deg; }
.col:nth-child(even) > :nth-child(odd) { --r: .8deg; }
.col:nth-child(even) > :nth-child(even) { --r: -1.5deg; }
.col > :nth-child(3n) { --r: 1.9deg; }
.pin::before {                       /* tape */
  content: ""; position: absolute; z-index: 1; top: -.8rem; left: 50%;
  width: 5rem; height: 1.45rem; translate: -50% 0; rotate: -3deg;
  background: var(--yellow); border: 2px solid var(--ink);
}
.col > .pin:nth-child(3n)::before { background: var(--red); rotate: 4deg; left: 38%; }
.pin-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.pin img { display: block; width: 100%; height: auto; border: var(--line-s) solid var(--rule); }
.pin-tag {
  position: absolute; top: 1.1rem; left: -.55rem; rotate: -4deg;
  font: 700 .76rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  background: var(--ink); color: var(--panel); padding: .5em .65em;
}
.pin figcaption { padding: .6rem .25rem .65rem; font-size: .92rem; font-weight: 650; line-height: 1.35; }
html[data-mode="fun"] .board .pin:hover,
html[data-mode="fun"] .board .pin:focus-within {
  --rule: #fffdf6;
  rotate: 0deg; scale: 1.025; z-index: 2;
  background: var(--ink); color: var(--panel); border-color: var(--ink);
}
html[data-mode="fun"] .board .pin:hover .pin-tag,
html[data-mode="fun"] .board .pin:focus-within .pin-tag { background: var(--yellow); color: var(--ink); }

.note {
  position: relative; isolation: isolate; overflow: hidden;
  display: block; padding: 1.25rem 1.1rem 1.1rem; text-decoration: none;
  container-type: inline-size;
  border: var(--line) solid var(--ink); box-shadow: var(--shadow);
  rotate: calc(var(--k) * var(--r, 1.5deg));
}
.note p {
  margin: 0; font-family: var(--display); font-weight: var(--dw); text-transform: var(--caps);
  font-size: clamp(.8rem, 9.6cqw, 1.8rem); line-height: 1.1;
}
.note small { display: block; margin-top: .9rem; font: 700 .76rem/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.note--yellow { background: var(--yellow); color: var(--ink); }
.note--ink { background: var(--ink); color: var(--panel); }
.note--ink p { color: var(--yellow); }
.note--red { background: var(--red); color: #fff; }
html[data-mode="fun"] a.note:hover, html[data-mode="fun"] a.note:focus-visible { rotate: 0deg; scale: 1.025; background: var(--ink); color: var(--panel); }

.board-back { margin: clamp(1.5rem, 4vw, 3rem) 0 0; }

.lightbox {
  max-width: min(94vw, 62rem); max-height: 94vh; padding: .75rem;
  background: var(--panel); color: var(--ink);
  border: var(--line) solid var(--ink); box-shadow: 8px 8px 0 var(--red);
}
.lightbox::backdrop { background: rgba(18, 17, 16, .84); }
/* while an image is open the page behind it stays put; the gutter keeps the layout from jumping */
html:has(.lightbox[open]) { overflow: hidden; scrollbar-gutter: stable; }
.lightbox { overscroll-behavior: contain; }
.lightbox form { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .6rem; }
.lightbox-close {
  font: 700 .82rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  background: var(--ink); color: var(--panel); border: 0; padding: .7em .9em; cursor: pointer;
}
.lightbox img { display: block; margin: 0 auto; max-width: 100%; max-height: 72vh; width: auto; height: auto; border: var(--line-s) solid var(--ink); }
.lightbox p { margin: .7rem 0 .1rem; font-weight: 650; max-width: 46rem; }

/* doors: the contents page on the homepage, one per page of the site */
.doors { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.door {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; gap: .9rem;
  padding: var(--pad); text-decoration: none;
  background: var(--panel); color: var(--ink);
  border: var(--line) solid var(--rule); box-shadow: var(--shadow);
}
.door--work { grid-column: span 7; grid-row: span 2; }
.door--about, .door--play { grid-column: span 5; }
.door-top {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  font: 700 .85rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
}
.door-go { color: var(--red); }
.door-title {
  font-family: var(--display); font-weight: var(--dw); text-transform: var(--caps);
  font-size: clamp(2.2rem, 5.6vw, 4.6rem); line-height: .98;
}
.door--about .door-title, .door--play .door-title { font-size: clamp(1.8rem, 3.6vw, 2.9rem); }
.door-line { max-width: 30rem; font-weight: 600; }
.door-rows { display: grid; margin-top: auto; border-top: var(--line-s) solid var(--rule); }
.door-row {
  display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) auto; gap: .8rem; align-items: center;
  padding: .75rem 0; border-bottom: var(--line-s) solid var(--rule);
}
.door-row:last-child { border-bottom: 0; padding-bottom: 0; }
.door--work .door-rows { flex: 1; margin-top: .4rem; grid-auto-rows: 1fr; }
.door-row--kv { grid-template-columns: 5.5rem minmax(0, 1fr); align-items: baseline; }
.door-row b { font: 700 .85rem/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--red); }
.door-name { font-weight: 750; line-height: 1.25; }
.door-name i { display: block; font-style: normal; font-weight: 500; font-size: .9em; color: var(--mute); }
.door-row em {
  font: 700 .76rem/1 var(--mono); font-style: normal; letter-spacing: .1em; text-transform: uppercase;
  border: 2px solid currentColor; padding: .45em .55em;
}
html[data-mode="fun"] a.door:hover,
html[data-mode="fun"] a.door:focus-visible {
  --mute: #bdb7a9; --rule: #fffdf6;
  background: var(--ink); color: var(--panel); border-color: var(--ink);
  animation: hit .22s cubic-bezier(.2, 1.6, .4, 1);
}
html[data-mode="fun"] a.door:hover .door-go,
html[data-mode="fun"] a.door:hover .door-row b { color: var(--yellow); }

.teaser-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.5rem, 1.2vw, 1rem); margin-top: auto; padding: .4rem .2rem; }
.teaser-thumbs img {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover;
  border: var(--line-s) solid var(--rule); box-shadow: 4px 4px 0 var(--ink);
  rotate: calc(var(--k) * var(--r, -2deg));
}
.teaser-thumbs img:nth-child(2) { --r: 1.5deg; }
.teaser-thumbs img:nth-child(3) { --r: -1deg; }
.teaser-thumbs img:nth-child(4) { --r: 2.5deg; }

.next {
  display: flex; align-items: center; gap: .6rem 1.4rem; flex-wrap: wrap;
  margin-top: clamp(2.5rem, 6vw, 4.5rem); padding: var(--pad);
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--panel); color: var(--ink); text-decoration: none;
  border: var(--line) solid var(--rule); box-shadow: var(--shadow);
}
.next-label { font: 700 .85rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.next strong {
  font-family: var(--display); font-weight: var(--dw); text-transform: var(--caps);
  font-size: clamp(1.8rem, 5vw, 3.6rem); line-height: 1;
}
.next-arrow { margin-left: auto; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1; }
html[data-mode="fun"] a.next:hover,
html[data-mode="fun"] a.next:focus-visible { background: var(--ink); color: var(--panel); border-color: var(--ink); animation: hit .22s cubic-bezier(.2, 1.6, .4, 1); }
html[data-mode="fun"] a.next:hover .next-label { color: var(--yellow); }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.page-head + section { margin-top: var(--lead); }
.page--tail { padding-top: 0; }

@media (max-width: 880px) {
  .door { grid-column: 1 / -1 !important; grid-row: auto !important; }
  .col { flex: 1 1 calc(50% - 13px); }
}
@media (max-width: 560px) {
  .board { gap: 0 12px; padding: 0 2px; }
  .col { flex: 1 1 calc(50% - 6px); }
  .pin { padding: .3rem .3rem 0; }
  .pin::before { width: 3.2rem; height: 1.1rem; top: -.65rem; }
  .pin-tag { font-size: .56rem; top: .7rem; left: -.4rem; }
  .pin figcaption { font-size: .78rem; padding: .45rem .15rem .5rem; }
  .note { padding: .9rem .75rem .8rem; }
  .note small { font-size: .56rem; margin-top: .6rem; }
  .head-jp { vertical-align: .7em; font-size: .3em; }
}

/* =========================================================
   SERIOUS MODE — the same designer, with the theatrics off.
   Dark, hairline-ruled, one accent (the cover's yellow).
   Tokens do most of it; this is what they can't.
   ========================================================= */
html[data-mode="serious"] body {
  background-image: linear-gradient(to right, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: max(8.3333vw, 5rem) 100%;
}
html[data-mode="serious"] :focus-visible { outline-color: var(--yellow); }
html[data-mode="serious"] ::selection { background: var(--yellow); color: var(--night); }

/* bar */
html[data-mode="serious"] .bar { background-image: none; }
html[data-mode="serious"] .mark {
  background: none; color: var(--ink); border-right: 1px solid var(--rule);
  font-weight: 650; font-size: 1.05rem; letter-spacing: -.01em;
}
html[data-mode="serious"] .mark[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--yellow); }
html[data-mode="serious"] .bar nav a { color: var(--mute); transition: color .15s, background-color .15s; }
html[data-mode="serious"] .bar nav a:hover { color: var(--ink); background: #171a1f; }
html[data-mode="serious"] .bar nav a[aria-current="page"] { background: none; color: var(--ink); box-shadow: inset 0 -2px 0 var(--yellow); }
html[data-mode="serious"] .toggle, html[data-mode="serious"] .menu-btn { color: var(--mute); }
html[data-mode="serious"] .menu-btn:hover { color: var(--ink); }
html[data-mode="serious"] .bar.open .menu-btn { background: var(--yellow); color: var(--night); }
@media (max-width: 1180px) {
  html[data-mode="serious"].js .bar nav a { font: 600 clamp(1.25rem, 4.6vw, 1.7rem)/1 var(--body); letter-spacing: -.02em; }
}
html[data-mode="serious"] .toggle[aria-pressed="true"] .toggle-track { background: var(--yellow); border-color: var(--yellow); }
html[data-mode="serious"] .toggle[aria-pressed="true"] .toggle-track::after { background: var(--night); }

/* buttons */
html[data-mode="serious"] .btn {
  font: 650 .95rem/1 var(--body); letter-spacing: 0; text-transform: none;
  background: var(--yellow); color: var(--night); border: 1px solid var(--yellow);
  border-radius: 2px; padding: .95em 1.3em; box-shadow: none;
  transition: background-color .15s, border-color .15s, color .15s;
}
html[data-mode="serious"] .btn:hover, html[data-mode="serious"] .btn:active { translate: none; background: #fff; border-color: #fff; }
html[data-mode="serious"] .btn.s { display: inline-flex; }
html[data-mode="serious"] .btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
html[data-mode="serious"] .btn--ghost:hover { background: transparent; color: var(--ink); border-color: var(--ink); }

/* hero */
html[data-mode="serious"] .cover {
  display: block; min-height: 0; overflow: visible;
  background: none; border: 0;
  padding: clamp(3rem, 9vw, 7rem) 0 0;
}
html[data-mode="serious"] .cover > .kicker,
html[data-mode="serious"] .page-head .kicker,
html[data-mode="serious"] .gate .kicker {
  display: flex; align-items: center; gap: .8em; color: var(--mute);
}
html[data-mode="serious"] .cover > .kicker::before,
html[data-mode="serious"] .page-head .kicker::before,
html[data-mode="serious"] .gate .kicker::before {
  content: ""; flex: none; width: .6em; height: .6em; background: var(--yellow);
}
html[data-mode="serious"] .cover > .kicker { margin-bottom: clamp(1.4rem, 3vw, 2.2rem); }
html[data-mode="serious"] .cover-foot { display: block; margin-top: clamp(1.6rem, 3.2vw, 2.6rem); }
html[data-mode="serious"] .cover-left { gap: 1.9rem; }
html[data-mode="serious"] .narration {
  max-width: 40rem; padding: 0; background: none; border: 0;
  font-weight: 400; font-size: clamp(1.08rem, 1.5vw, 1.3rem); line-height: 1.5;
  color: color-mix(in srgb, var(--ink) 80%, transparent);
}
html[data-mode="serious"] .narration strong { color: var(--ink); font-weight: 600; }


/* section headers, numbered */
html[data-mode="serious"] main { counter-reset: sec; }
html[data-mode="serious"] .chapter {
  align-items: baseline; gap: .4rem 1.2rem;
  margin-top: clamp(3.5rem, 8vw, 6rem); padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
}
html[data-mode="serious"] .chapter::before {
  counter-increment: sec; content: counter(sec, decimal-leading-zero);
  font: 700 .72rem/1 var(--mono); letter-spacing: .1em; color: var(--yellow);
}
html[data-mode="serious"] .chapter.s { display: flex; }
html[data-mode="serious"] .chapter h2 { font-stretch: 94%; letter-spacing: -.028em; line-height: 1.08; }
html[data-mode="serious"] .chapter p { margin-bottom: 0; font-weight: 400; color: var(--mute); }
html[data-mode="serious"] .lead { color: color-mix(in srgb, var(--ink) 80%, transparent); font-size: clamp(1.08rem, 1.5vw, 1.3rem); }

/* page heads */
html[data-mode="serious"] .page-head {
  overflow: visible; gap: 1.3rem;
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(1.75rem, 3.5vw, 2.75rem);
  background: none; border: 0; border-bottom: 1px solid var(--rule);
}
html[data-mode="serious"] .page-head h1 {
  font-family: var(--body); font-weight: 600; font-stretch: 92%;
  font-size: clamp(2.7rem, 7.4vw, 6rem); line-height: .98; letter-spacing: -.035em;
}
html[data-mode="serious"] .page-sub {
  max-width: 40rem; padding: 0; background: none; border: 0;
  font-weight: 400; font-size: clamp(1.08rem, 1.5vw, 1.3rem); line-height: 1.5;
  color: color-mix(in srgb, var(--ink) 80%, transparent);
}

/* cards: case files, doors, principles */
html[data-mode="serious"] .file-body,
html[data-mode="serious"] .door,
html[data-mode="serious"] .pin,
html[data-mode="serious"] .principles li { transition: border-color .15s, background-color .15s; }
html[data-mode="serious"] a.file-body:hover,
html[data-mode="serious"] a.next:hover,
html[data-mode="serious"] a.door:hover,
html[data-mode="serious"] .board .pin:hover { border-color: var(--yellow); background: #171a1f; }
@media (min-width: 881px) {
  html[data-mode="serious"] .file { grid-column: span 6; }
}
html[data-mode="serious"] .file-no, html[data-mode="serious"] .door-top { color: var(--mute); }
html[data-mode="serious"] .stamp {
  color: var(--mute); border-color: var(--rule);
  font: 700 .64rem/1 var(--mono); letter-spacing: .12em; padding: .5em .65em;
}
html[data-mode="serious"] .stamp--open { color: var(--yellow); border-color: color-mix(in srgb, var(--yellow) 45%, transparent); }
html[data-mode="serious"] .file h3 { font-stretch: 94%; font-size: clamp(1.7rem, 2.9vw, 2.4rem); line-height: 1.06; letter-spacing: -.028em; }
html[data-mode="serious"] .file h3 small {
  margin-bottom: .8em; color: var(--mute);
  font: 700 .66rem/1.3 var(--mono); letter-spacing: .12em;
}
html[data-mode="serious"] .file-line, html[data-mode="serious"] .door-line { font-weight: 400; color: color-mix(in srgb, var(--ink) 80%, transparent); }
html[data-mode="serious"] .chips li { border: 1px solid var(--rule); color: var(--mute); font-weight: 400; }
html[data-mode="serious"] .threat { color: var(--mute); }
html[data-mode="serious"] .threat strong { color: var(--ink); font: 600 .9rem/1 var(--body); letter-spacing: 0; text-transform: none; }
html[data-mode="serious"] .pips { gap: 4px; }
html[data-mode="serious"] .pips i { width: 1.4rem; height: 3px; border: 0; background: var(--rule); transform: none; }
html[data-mode="serious"] .threat[data-level="1"] i:nth-child(-n+1),
html[data-mode="serious"] .threat[data-level="2"] i:nth-child(-n+2),
html[data-mode="serious"] .threat[data-level="3"] i:nth-child(-n+3),
html[data-mode="serious"] .threat[data-level="4"] i { background: var(--yellow); }
html[data-mode="serious"] .file-cta {
  color: var(--yellow); text-decoration: none; background: none; padding-bottom: 0;
  font: 600 .95rem/1 var(--body); letter-spacing: 0; text-transform: none;
}
html[data-mode="serious"] .sealed-note { font-weight: 400; color: var(--mute); }
html[data-mode="serious"] .sealed-note a,
html[data-mode="serious"] .gate-help a,
html[data-mode="serious"] .case a { text-decoration-thickness: 1px; text-decoration-color: var(--yellow); }

html[data-mode="serious"] .door-go, html[data-mode="serious"] .door-row b, html[data-mode="serious"] .next-label { color: var(--yellow); }
html[data-mode="serious"] .next { transition: border-color .15s, background-color .15s; }
html[data-mode="serious"] .next strong { font-stretch: 94%; letter-spacing: -.03em; font-size: clamp(1.6rem, 3.6vw, 2.6rem); }
html[data-mode="serious"] .next-arrow { color: var(--yellow); }
html[data-mode="serious"] .door-title { font-stretch: 94%; letter-spacing: -.03em; line-height: 1; font-size: clamp(2rem, 4.6vw, 3.6rem); }
html[data-mode="serious"] .door--about .door-title,
html[data-mode="serious"] .door--play .door-title { font-size: clamp(1.6rem, 2.9vw, 2.2rem); }
html[data-mode="serious"] .door-name { font-weight: 600; }
html[data-mode="serious"] .door-name i { font-weight: 400; }
html[data-mode="serious"] .door-row em { border: 1px solid var(--rule); color: var(--mute); font-weight: 400; }
html[data-mode="serious"] .teaser-thumbs { padding: 0; }
html[data-mode="serious"] .teaser-thumbs img { border: 0; box-shadow: none; }

/* about */
html[data-mode="serious"] .registry { gap: clamp(2rem, 5vw, 4.5rem); }
html[data-mode="serious"] .idcard { background: none; border: 0; }
html[data-mode="serious"] .idcard-body { display: block; padding: 0; }
html[data-mode="serious"] .fields > div { grid-template-columns: 6.5rem minmax(0, 1fr); padding: .9rem 0; border-bottom: 1px solid var(--rule); }
html[data-mode="serious"] .fields > div:first-child { border-top: 1px solid var(--rule); }
html[data-mode="serious"] .fields dd { font-weight: 450; }
html[data-mode="serious"] .mini { color: var(--mute); }
html[data-mode="serious"] .ranks li { padding: .9rem 0; }
html[data-mode="serious"] .rank-year { color: var(--mute); }
html[data-mode="serious"] .ranks .now .rank-year { color: var(--yellow); }
html[data-mode="serious"] .rank-role b { font-weight: 600; }
html[data-mode="serious"] .ranks em { background: var(--yellow); color: var(--night); }

html[data-mode="serious"] .training { grid-template-columns: 1fr; }
html[data-mode="serious"] .principles { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15.5rem), 1fr)); }
html[data-mode="serious"] .principles li { padding: 1.3rem 1.35rem 1.45rem; }
html[data-mode="serious"] .principles li::before {
  position: static; display: block; margin-bottom: 1.1rem;
  font: 700 .72rem/1 var(--mono); letter-spacing: .1em; color: var(--yellow);
}
html[data-mode="serious"] .principles h3 { font-weight: 600; font-size: 1.2rem; letter-spacing: -.015em; margin-bottom: .45rem; }
html[data-mode="serious"] .principles p { font-weight: 400; color: color-mix(in srgb, var(--ink) 78%, transparent); }

/* extras */
html[data-mode="serious"] .board { padding: 0; }
html[data-mode="serious"] .pin { padding: 0; }
html[data-mode="serious"] .pin::before { content: none; }
html[data-mode="serious"] .pin img { border: 0; }
html[data-mode="serious"] .pin-tag {
  position: static; display: inline-block; rotate: none;
  margin: .85rem .95rem 0; padding: 0; background: none; color: var(--yellow); font-size: .62rem;
}
html[data-mode="serious"] .pin figcaption {
  padding: .4rem .95rem 1rem; font-weight: 400; font-size: .9rem;
  color: color-mix(in srgb, var(--ink) 84%, transparent);
}
html[data-mode="serious"] .note { background: var(--panel); color: var(--ink); border: 1px solid var(--rule); }
html[data-mode="serious"] .note p { font-stretch: 92%; font-size: clamp(.95rem, 8cqw, 1.5rem); line-height: 1.12; letter-spacing: -.02em; }
html[data-mode="serious"] .note small { font-weight: 400; opacity: .75; }
html[data-mode="serious"] .note--yellow { background: var(--yellow); color: var(--night); border-color: var(--yellow); }
html[data-mode="serious"] a.note:hover { border-color: var(--yellow); }
html[data-mode="serious"] .lightbox { border-color: var(--rule); box-shadow: none; }
html[data-mode="serious"] .lightbox::backdrop { background: rgba(0, 0, 0, .88); }
html[data-mode="serious"] .lightbox img { border: 0; }
html[data-mode="serious"] .lightbox p { font-weight: 400; }
/* arrows match the Close button; the fun hover (yellow fill) is the same pale as the arrow here, so it gets its own */
html[data-mode="serious"] .lb-nav { background: var(--ink); color: var(--panel); border: 0; box-shadow: none; border-radius: 0; }
html[data-mode="serious"] .lb-nav:is(:hover, :focus-visible) { background: #fff; color: var(--panel); }
html[data-mode="serious"] .lb-nav:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
html[data-mode="serious"] .lb-nav:active { translate: 0 -50%; scale: .94; box-shadow: none; }

/* contact: the one block of solid yellow */
html[data-mode="serious"] .contact {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .2rem 3rem;
  margin-top: clamp(4rem, 9vw, 7rem);
  padding: clamp(2rem, 6vw, 4.5rem) clamp(1.4rem, 4vw, 3.5rem);
  background: var(--yellow); color: var(--night); border: 0;
}
html[data-mode="serious"] .contact h2 {
  grid-column: 1; margin: 0 0 .25em;
  font-stretch: 92%; font-size: clamp(2.4rem, 6.4vw, 5rem); line-height: .98; letter-spacing: -.035em;
}
html[data-mode="serious"] .contact-line { grid-column: 1; margin: 0; font-weight: 450; font-size: 1.15em; }
html[data-mode="serious"] .contact-actions { grid-column: 2; grid-row: 1 / span 2; align-self: end; }
html[data-mode="serious"] .contact .btn { background: var(--night); color: #fff; border-color: var(--night); }
html[data-mode="serious"] .contact .btn:hover { background: #fff; color: var(--night); border-color: #fff; }
html[data-mode="serious"] .foot { color: var(--mute); }

/* case pages */
html[data-mode="serious"] .back { color: var(--mute); border-bottom: 1px solid var(--yellow); }
html[data-mode="serious"] .gate {
  background: var(--panel); color: var(--ink);
  border: 1px solid var(--rule); box-shadow: none; --mute: #9a9da6;
}
html[data-mode="serious"] .gate h1 { font-stretch: 92%; font-size: clamp(2.3rem, 6vw, 4.2rem); line-height: 1; letter-spacing: -.035em; }
html[data-mode="serious"] .gate h1 small { color: var(--yellow); font: 700 .68rem/1.3 var(--mono); letter-spacing: .12em; }
html[data-mode="serious"] .gate-why { font-weight: 400; color: color-mix(in srgb, var(--ink) 80%, transparent); }
html[data-mode="serious"] .gate-form input { background: var(--paper); border: 1px solid var(--rule); border-radius: 2px; }
html[data-mode="serious"] .gate-form input:focus-visible { outline: 0; border-color: var(--yellow); }
html[data-mode="serious"] .gate-form .btn { background: var(--yellow); color: var(--night); border-color: var(--yellow); }
html[data-mode="serious"] .gate-msg { color: var(--red); }
html[data-mode="serious"] .case h1 { font-stretch: 92%; font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1; letter-spacing: -.035em; }
html[data-mode="serious"] .case-lede { font-weight: 400; }
html[data-mode="serious"] .case h2 {
  padding: 0; background: none; color: var(--yellow);
  font: 700 .72rem/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase;
}

/* motion: panels rise in, they don't slam */
html[data-mode="serious"].js .reveal { scale: 1; translate: 0 16px; }
html[data-mode="serious"].js .reveal.in {
  translate: 0 0;
  transition: opacity .55s ease, translate .55s cubic-bezier(.2, .7, .2, 1), border-color .15s, background-color .15s;
}

@media (max-width: 880px) {
  html[data-mode="serious"] .contact { grid-template-columns: 1fr; gap: .2rem; }
  html[data-mode="serious"] .contact-actions { grid-column: 1; grid-row: auto; margin-top: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  html[data-mode="serious"].js .reveal, html[data-mode="serious"].js .reveal.in { translate: none; transition: none; }
}

/* =========================================================
   SERIOUS MODE, PART TWO — its own forms, not the manga's.
   The manga tells the career as a comic strip; here it is a chart.
   The manga files cases as cards; here they are an index.
   ========================================================= */

/* a soft spotlight on the grid, following the pointer */
html[data-mode="serious"] body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 213, 0, .2) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: max(8.3333vw, 5rem) 100%, 100% max(8.3333vw, 5rem);
  -webkit-mask-image: radial-gradient(circle 20rem at var(--mx, -40rem) var(--my, -40rem), #000, transparent 72%);
          mask-image: radial-gradient(circle 20rem at var(--mx, -40rem) var(--my, -40rem), #000, transparent 72%);
}


/* section links */
.more { font: 400 .82rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; color: var(--mute); }
.more:hover { color: var(--yellow); }

/* the work, as an index */
.index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.index-row {
  position: relative; display: grid; align-items: center;
  grid-template-columns: 3rem minmax(0, 1.5fr) minmax(0, 1fr) 13rem 8rem; gap: 1.5rem;
  padding: 1.7rem .25rem; color: inherit; text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: padding .3s cubic-bezier(.2, .7, .2, 1), background-color .2s;
}
.index-row::after {                         /* a yellow rule that runs along the bottom on hover */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: var(--yellow); transform: scaleX(0); transform-origin: left;
  transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}
a.index-row:hover, a.index-row:focus-visible { padding-left: 1.1rem; background: linear-gradient(90deg, rgba(255, 213, 0, .06), transparent 55%); }
a.index-row:hover::after, a.index-row:focus-visible::after { transform: scaleX(1); }
.index-no { font: 700 .82rem/1 var(--mono); letter-spacing: .1em; color: var(--yellow); }
.index-title {
  font-weight: 600; font-stretch: 92%; font-size: clamp(1.7rem, 3.5vw, 3rem); line-height: 1.02; letter-spacing: -.032em;
  transition: color .2s;
}
a.index-row:hover .index-title, a.index-row:focus-visible .index-title { color: var(--yellow); }
.index-meta { display: grid; gap: .35rem; font: 400 .78rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.index-meta b { font: 500 .98rem/1.25 var(--body); letter-spacing: 0; text-transform: none; color: var(--ink); }
.threat.index-scope { margin: 0; padding: 0; border: 0; flex-wrap: nowrap; gap: .7rem; font-size: .66rem; white-space: nowrap; }
.index-go {
  justify-self: end; display: inline-flex; align-items: center; gap: .55em;
  font: 400 .78rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute);
  transition: color .2s, translate .3s cubic-bezier(.2, .7, .2, 1);
}
.index-go svg { width: .95em; height: .95em; }
a.index-row:hover .index-go, a.index-row:focus-visible .index-go { color: var(--yellow); translate: 4px 0; }
.index-row--wip { opacity: .5; }

/* outside work, as a strip of film: grey until you look at it */
.film {
  display: block; overflow-x: auto; scrollbar-width: none;
  padding: 1.25rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.film::-webkit-scrollbar { display: none; }
.film-track { display: flex; gap: 1rem; width: max-content; }
.film img {
  display: block; width: auto; height: clamp(9rem, 17vw, 14rem);
  filter: grayscale(1) contrast(1.05); opacity: .7;
  transition: filter .45s ease, opacity .45s ease;
}
.film:hover img, .film:focus-visible img { filter: none; opacity: 1; }
@media (hover: none) { .film img { filter: none; opacity: 1; } }

/* the Work page: the same index idea, built from the case files */
@media (min-width: 881px) {
  html[data-mode="serious"] .files { display: block; border-top: 1px solid var(--rule); }
  html[data-mode="serious"] .file { display: block; }
  html[data-mode="serious"] .file-body {
    display: grid; align-items: start;
    grid-template-columns: 3rem minmax(0, 1.45fr) minmax(0, 1fr) 12.5rem;
    grid-template-areas: "no title meta stamp" "no line scope cta" "no chips chips cta";
    gap: .7rem 2.25rem; padding: 2.3rem .25rem;
    background: none; border: 0; border-bottom: 1px solid var(--rule);
    transition: padding .3s cubic-bezier(.2, .7, .2, 1), background-color .2s, border-color .2s;
  }
  html[data-mode="serious"] .file-top { display: contents; }
  html[data-mode="serious"] .file-no { grid-area: no; padding-top: .7rem; color: var(--yellow); }
  html[data-mode="serious"] .stamp { grid-area: stamp; justify-self: end; }
  html[data-mode="serious"] .file h3 { grid-area: title; font-size: clamp(2rem, 3.7vw, 3.1rem); letter-spacing: -.032em; line-height: 1.02; transition: color .2s; }
  html[data-mode="serious"] .file-line { grid-area: line; }
  html[data-mode="serious"] .chips { grid-area: chips; }
  html[data-mode="serious"] .file-meta { grid-area: meta; padding-top: 1.55rem; }
  html[data-mode="serious"] .file .threat { grid-area: scope; margin: 0; padding: 0; border: 0; }
  html[data-mode="serious"] .file-cta { grid-area: cta; justify-self: end; align-self: end; }
  html[data-mode="serious"] a.file-body:hover,
  html[data-mode="serious"] a.file-body:focus-visible {
    padding-left: 1.1rem; border-color: var(--yellow);
    background: linear-gradient(90deg, rgba(255, 213, 0, .06), transparent 55%);
  }
  html[data-mode="serious"] a.file-body:hover h3,
  html[data-mode="serious"] a.file-body:focus-visible h3 { color: var(--yellow); }
}

@media (max-width: 880px) {
  .index-row { grid-template-columns: 2.2rem minmax(0, 1fr) auto; gap: .5rem 1rem; padding: 1.3rem 0; }
  .index-meta { grid-column: 2 / -1; grid-row: 2; }
  .threat.index-scope { display: none; }
  .index-go { grid-column: 3; grid-row: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .index-row, .index-row::after, .index-go, .film img { transition: none; }
}

/* =========================================================
   SERIOUS MODE — the hero: say hello, then ask a question.
   ========================================================= */
html[data-mode="serious"] .cover { padding-top: clamp(2.25rem, 6vw, 5rem); }
html[data-mode="serious"] .page-head .kicker { display: none; }

/* the greeting: every letter leans toward the pointer */
html[data-mode="serious"] .title-serious { display: block; }
.title-serious {
  font-family: var(--body); font-weight: 600; font-stretch: 92%;
  font-size: clamp(2.2rem, 7.3vw, 6.3rem); line-height: 1; letter-spacing: -.035em;
}
.title-serious .line { display: block; white-space: nowrap; }
.title-serious .line + .line { margin-top: .05em; }
.title-serious .hl { color: var(--yellow); }
.title-serious .word { display: inline-block; white-space: nowrap; }
.title-serious .ch {
  display: inline-block;
  font-variation-settings: "wght" var(--w, 600), "wdth" var(--d, 92);
  transition: font-variation-settings .3s cubic-bezier(.2, .7, .2, 1);
}
html[data-mode="serious"] .narration { max-width: 46rem; font-size: clamp(1.1rem, 1.65vw, 1.4rem); }

/* the question, and four ways to answer it */
html[data-mode="serious"] .ask-band {
  display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 5vw, 5rem); align-items: start;
  margin-top: clamp(2.5rem, 6vw, 4.5rem); padding-top: clamp(1.75rem, 4vw, 3rem);
  border-top: 1px solid var(--rule);
}
.ask-q {
  margin: 0; font-weight: 600; font-stretch: 92%;
  font-size: clamp(1.9rem, 4.3vw, 3.6rem); line-height: 1.02; letter-spacing: -.032em;
}
.ask-q span { display: block; color: var(--mute); }
.ask-q em { font-style: normal; color: var(--yellow); }

.asks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.ask {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) auto; gap: 1rem; align-items: baseline;
  padding: 1.2rem 1.1rem 1.2rem .3rem;
  color: inherit; text-decoration: none; border-bottom: 1px solid var(--rule);
  transition: padding .32s cubic-bezier(.2, .8, .2, 1), color .18s, opacity .3s;
}
.ask::before {                                  /* the answer fills with yellow from the left */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--yellow); transform: scaleX(0); transform-origin: left;
  transition: transform .4s cubic-bezier(.2, .8, .2, 1);
}
.ask:hover::before, .ask:focus-visible::before, .ask.is-picked::before { transform: scaleX(1); }
.ask:hover, .ask:focus-visible, .ask.is-picked { color: var(--night); padding-left: 1.1rem; }
.ask:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.ask-no { font: 700 .8rem/1 var(--mono); color: var(--yellow); transition: color .18s; }
.ask:hover .ask-no, .ask:focus-visible .ask-no, .ask.is-picked .ask-no { color: var(--night); }
.ask-main { font-weight: 600; font-stretch: 94%; font-size: clamp(1.35rem, 2.7vw, 2.2rem); line-height: 1.1; letter-spacing: -.026em; }
.ask-main small {
  display: grid; grid-template-rows: 0fr; margin-top: 0; opacity: 0;
  font: 450 1rem/1.4 var(--body); font-stretch: 100%; letter-spacing: 0;
  transition: grid-template-rows .32s cubic-bezier(.2, .8, .2, 1), opacity .25s, margin-top .32s;
}
.ask-main small > span { overflow: hidden; }
.ask:hover small, .ask:focus-visible small, .ask.is-picked small { grid-template-rows: 1fr; margin-top: .4rem; opacity: .85; }
.ask-go { font-size: 1.5rem; line-height: 1; transition: translate .32s cubic-bezier(.2, .8, .2, 1); }
.ask:hover .ask-go, .ask:focus-visible .ask-go, .ask.is-picked .ask-go { translate: 6px 0; }
.asks.is-chosen .ask:not(.is-picked) { opacity: .28; }

@media (hover: none) {
  .ask-main small { grid-template-rows: 1fr; margin-top: .35rem; opacity: .7; }
}
@media (max-width: 880px) {
  html[data-mode="serious"] .ask-band { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .title-serious .line { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .title-serious .ch, .ask, .ask::before, .ask-main small, .ask-go { transition: none; }
}

/* wide screens: the intro sits beside the greeting, so the question lands on the first screen */
@media (min-width: 1200px) {
  html[data-mode="serious"] .cover {
    display: grid; grid-template-columns: minmax(0, 1fr) 21rem;
    grid-template-areas: "title foot" "ask ask";
    gap: 0 clamp(2rem, 4vw, 3.5rem); align-items: end; align-content: start;
  }
  html[data-mode="serious"] .cover .title { grid-area: title; align-self: end; }
  html[data-mode="serious"] .cover-foot { grid-area: foot; margin-top: 0; padding-bottom: .55rem; }
  html[data-mode="serious"] .ask-band { grid-area: ask; margin-top: clamp(2rem, 4vw, 3.25rem); padding-top: clamp(1.5rem, 3vw, 2.5rem); }
  html[data-mode="serious"] .title-serious { font-size: clamp(4rem, 6vw, 5.6rem); }
  html[data-mode="serious"] .narration { font-size: 1.05rem; line-height: 1.55; }
}

/* =========================================================
   ORIGIN STORY — the full comic: three rows of three
   ========================================================= */
.comic { display: grid; gap: var(--gap); }
.strip--a { grid-template-columns: 1.35fr 1fr 1.05fr; }
.strip--b { grid-template-columns: 1.1fr .8fr 1.3fr; }
.strip--c { grid-template-columns: 1.35fr .85fr 1.1fr; }
.strip--b .cell { transform: skewX(7deg); }          /* the middle row leans the other way */
.strip--b .cell-in { transform: skewX(-7deg); }
.cell-in > .cap, .cell-in > .band, .cell-in > .big, .cell-in > .tbc { position: relative; }

/* panel 1: NYU */
.term {
  align-self: stretch; display: flex; align-items: center; gap: .4em;
  background: var(--ink); color: var(--yellow); border: var(--line-s) solid var(--ink);
  box-shadow: 5px 5px 0 var(--red); padding: .9rem 1rem; rotate: -1.5deg;
  font: 700 clamp(.85rem, 1.5vw, 1.1rem)/1 var(--mono);
}
.term i { width: .6em; height: 1.1em; background: var(--yellow); }

/* panel 6: the turn */
.say--small { width: min(60%, 9rem); align-self: flex-end; margin: -.4rem 1rem -.4rem 0; }
.say--small span { font-size: clamp(1.2rem, 2.3vw, 1.8rem); }

/* panel 8: the soda */
.cell--soda .cell-in { align-items: center; }
.ventures { align-self: center; display: flex; align-items: center; justify-content: center; gap: clamp(.5rem, 1.4vw, 1.2rem); }
.pt-mark {
  flex: none; width: clamp(4rem, 7.2vw, 6rem); height: auto; rotate: -8deg;
  background: var(--yellow); border: var(--line-s) solid var(--ink); border-radius: 50%;
  box-shadow: 4px 4px 0 var(--ink);
}
.pt-f { fill: var(--panel); stroke: var(--ink); stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.pt-d { fill: var(--ink); }
.can-img {
  display: block; flex: none; width: auto; height: clamp(7rem, 12.5vw, 10.5rem); rotate: 20deg;
  filter: drop-shadow(5px 5px 0 var(--red));
}
.cell--soda .cap { align-self: stretch; }

/* panel 9: now */
.cell--now { background: var(--yellow); }
.cell--now .speed { --fx: 80%; --fy: 20%; --o: .32; }
.cell--now .big {
  margin: 0; font-family: var(--display); font-size: clamp(3.4rem, 7vw, 6.2rem); line-height: .85;
  color: var(--ink);
}
.tbc {
  align-self: flex-end; text-decoration: none; rotate: -2deg;
  background: var(--ink); color: var(--yellow); padding: .45em .7em;
  font-family: var(--display); font-size: clamp(.95rem, 1.6vw, 1.25rem); line-height: 1.1; text-transform: uppercase;
  box-shadow: 4px 4px 0 var(--red);
}
.tbc:hover { rotate: 0deg; translate: 2px 2px; box-shadow: 2px 2px 0 var(--red); }

@media (max-width: 880px) {
  .strip--b .cell, .strip--b .cell-in { transform: none; }
}

/* =========================================================
   YOUR TURN — "What brings you here?", manga version
   ========================================================= */
.askm {
  display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: var(--gap); align-items: stretch;
  margin-top: var(--sec);
}
.askm-q {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem;
  padding: var(--pad);
  background: var(--yellow); border: var(--line) solid var(--ink); box-shadow: var(--shadow);
}
.askm-q .speed { --fx: 88%; --fy: 60%; --o: .4; }
.askm-q h2 {
  margin: 0; rotate: -2deg; transform-origin: 0 100%;
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(2.3rem, 5.6vw, 4.9rem); line-height: .95;
}
.askm-q h2 span {                       /* "Enough about me." as a narration box */
  display: table; margin-bottom: 1.1rem; rotate: 3deg;
  background: var(--panel); border: var(--line-s) solid var(--ink); box-shadow: 5px 5px 0 var(--ink);
  padding: .55em .8em;
  font: 650 clamp(.95rem, 1.5vw, 1.15rem)/1.2 var(--body); text-transform: none;
}
.askm-q h2 em {
  font-style: normal; color: var(--panel);
  -webkit-text-stroke: .05em var(--ink); paint-order: stroke fill;
  text-shadow: .055em .055em 0 var(--red);
}
.askm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); }
.askm-list li { display: flex; }
.next--ask { flex: 1; flex-wrap: nowrap; margin-top: 0; padding: 1.15rem var(--pad); }
.next--ask .next-label { font-family: var(--display); font-size: 1.5rem; letter-spacing: 0; }
.next--ask strong { font-size: clamp(1.15rem, 2.25vw, 1.95rem); line-height: 1.05; }
.next--ask .next-arrow { font-size: clamp(1.4rem, 2.4vw, 2rem); }

.doors--bonus { margin-top: var(--gap); }
.door--wide { grid-column: 1 / -1; }
@media (min-width: 881px) {
  .door--wide { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); grid-template-areas: "top thumbs" "title thumbs" "line thumbs"; column-gap: clamp(1.5rem, 4vw, 3.5rem); align-content: center; }
  .door--wide .door-top { grid-area: top; }
  .door--wide .door-title { grid-area: title; }
  .door--wide .door-line { grid-area: line; }
  .door--wide .teaser-thumbs { grid-area: thumbs; margin: 0; align-self: center; }
}
@media (max-width: 880px) {
  .askm { grid-template-columns: 1fr; }
}

/* comic touch-ups */
.cell--year .big { font-size: clamp(3.2rem, 5.6vw, 5rem); }
@media (max-width: 880px) {
  .strip--a, .strip--b, .strip--c { grid-template-columns: 1fr; }
  .cell--year .big { font-size: clamp(3.4rem, 18vw, 5rem); }
  .cell--now .cell-in { min-height: 13rem; }
}

/* panel 3: the student paper */
.cell--paper .cell-in { align-items: flex-start; }
.paper {
  align-self: center; width: min(72%, 12.5rem); rotate: 3deg;
  background: var(--panel); border: var(--line-s) solid var(--ink); box-shadow: 5px 5px 0 var(--ink);
  padding: .6rem .7rem .75rem;
}
.paper b {
  display: block; margin-bottom: .5rem; padding-bottom: .35rem; border-bottom: 3px solid var(--ink);
  font-family: var(--display); font-weight: 400; font-size: clamp(.8rem, 1.4vw, 1.05rem); line-height: 1;
  text-align: center; text-transform: uppercase; white-space: nowrap;
}
.paper i { display: block; height: .85rem; margin-bottom: .45rem; background: var(--ink); }
.paper span {
  display: block; height: 2.7rem;
  background:
    linear-gradient(var(--panel), var(--panel)) 50% 0 / 8px 100% no-repeat,
    repeating-linear-gradient(var(--mute) 0 2px, transparent 2px 7px);
}
.cell--paper .cap--tag { align-self: flex-end; }
@media (max-width: 880px) {
  .cell--soda .cell-in { min-height: 14rem; }
}

/* panel 1: the sketchbook, using the real drawings */
.sketches { align-self: center; display: flex; align-items: center; justify-content: center; gap: clamp(.4rem, 1vw, .8rem); }
.sketches img {
  display: block; width: auto; height: clamp(5.2rem, 9.5vw, 8rem); aspect-ratio: 4 / 5; object-fit: cover;
  background: var(--panel); border: var(--line-s) solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  rotate: -5deg;
}
.sketches img:nth-child(2) { rotate: 3deg; translate: 0 -.4rem; }
.sketches img:nth-child(3) { rotate: -2deg; translate: 0 .3rem; }
.cell--art .cap--tag { align-self: flex-end; }

/* =========================================================
   Serious mode parked + the opening impact frame
   ========================================================= */
.no-serious .toggle { display: none; }

/* first page of a visit: hold the impact frame, then cut to the page */
html.intro body > *:not(.impact) { opacity: 0; animation: intro-show 0s linear 3s forwards; }
html.intro .impact { visibility: visible; opacity: 1; }
html.intro:not(.punch) .impact { animation: intro-hide .3s linear 3s forwards; }   /* safety net if the script never runs */
html.intro:not(.punch) .impact span { opacity: 0; }
@keyframes intro-show { to { opacity: 1; } }
@keyframes intro-hide { to { opacity: 0; visibility: hidden; } }

/* the word on the impact frame: set from script, sized to fit however long it is */
.impact span { font-size: min(calc(84vw / (var(--punch-len, 3) * .84)), calc(46vh / var(--punch-lines, 1))); white-space: pre; text-align: center; }
.impact span::after { content: var(--punch-word, ""); }

/* arriving through a link: the frame is already up, then clears */
html.arrive body > *:not(.impact) { opacity: 0; animation: intro-show 0s linear 3s forwards; }
html.arrive .impact { visibility: visible; opacity: 1; animation: intro-hide .3s linear 3s forwards; }
html.arrived .impact { visibility: visible; animation: impact-out .4s ease-out both; }
@keyframes impact-out { from { opacity: 1; } to { opacity: 0; } }

/* the two logos in the comic are links to their sites */
.venture { display: block; flex: none; }
.venture > * { transition: scale .18s cubic-bezier(.2, 1.6, .4, 1), rotate .18s ease-out; }
.venture:hover > *, .venture:focus-visible > * { scale: 1.1; rotate: 0deg; }
.venture:hover .can-img, .venture:focus-visible .can-img { rotate: 8deg; }
.venture:focus-visible { outline: 3px solid var(--red); outline-offset: 6px; }
@media (prefers-reduced-motion: reduce) { .venture > * { transition: none; } }

/* comic, panel 4: the intern badge */
.badge {
  position: relative; align-self: flex-start; margin: .2rem 0 0 clamp(.5rem, 2.5vw, 2.2rem);
  width: clamp(5.4rem, 8.5vw, 7rem); padding: .7rem .5rem .55rem; rotate: -7deg;
  display: grid; justify-items: center; gap: .35rem; text-align: center;
  background: var(--panel); border: var(--line-s) solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
}
.badge::before {                                  /* the lanyard */
  content: ""; position: absolute; left: 50%; bottom: 100%; translate: -50% 0;
  width: 1.05rem; height: 4.5rem;
  background: var(--yellow); border: var(--line-s) solid var(--ink); border-bottom: 0;
}
.badge::after {                                   /* the clip hole */
  content: ""; position: absolute; top: .25rem; left: 50%; translate: -50% 0;
  width: 1.3rem; height: .28rem; border-radius: 99px; background: var(--ink);
}
.badge i {
  width: 58%; aspect-ratio: 1; margin-top: .35rem; border: var(--line-s) solid var(--ink);
  background:
    radial-gradient(circle at 50% 36%, var(--ink) 0 26%, transparent 27%),
    radial-gradient(ellipse at 50% 108%, var(--ink) 0 52%, transparent 53%),
    var(--yellow);
}
.badge b { font-family: var(--display); font-weight: 400; font-size: clamp(.8rem, 1.25vw, 1rem); line-height: 1; text-transform: uppercase; }
.badge span { font: 700 .54rem/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }

/* comic, panel 6: a messy screen becomes a tidy one */
.huh-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.fixit { flex: 1 1 auto; width: auto; max-width: 15rem; min-width: 0; height: auto; overflow: visible; rotate: -2deg; }
.wf { fill: var(--panel); stroke: var(--ink); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
path.wf { fill: none; }
.wf--ink { fill: var(--ink); }
.wf--go { fill: var(--yellow); }
.wf--mark { stroke: var(--red); stroke-width: 4; }
.huh-row .say--small { flex: none; width: clamp(6.5rem, 10vw, 9rem); margin: 0 .5rem 0 0; }
.cell-in > .cap { z-index: 1; }                    /* captions sit in front of the artwork */

/* the name cell is chapter one */
.mark .nav-no { margin-right: .7em; font: 700 .85rem/1 var(--mono); letter-spacing: .1em; color: var(--yellow); }
.mark[aria-current="page"] .nav-no { color: var(--red); }
@media (max-width: 1180px) { .mark .nav-no { display: none; } }

/* cover: a one-line hello that runs into the title */
.hello {
  grid-area: kick; justify-self: start; margin: 0 0 -.2rem; rotate: -3deg; transform-origin: 0 100%;
  background: var(--panel); border: var(--line-s) solid var(--ink); box-shadow: 5px 5px 0 var(--ink);
  padding: .5em .8em; font-weight: 700; font-size: clamp(1.05rem, 2.3cqw, 1.9rem); line-height: 1.1;
}

/* threat report: larger and steadier, so it reads */
.threat-report { width: min(100%, 24rem); rotate: .8deg; font-size: clamp(.82rem, 1.3cqw, 1rem); line-height: 1.6; letter-spacing: .05em; }
.threat-report b { padding: .5em .9em; }
.threat-report p { padding: .75em .9em .9em; }

/* artwork inside the leaning comic panels reaches every edge */
.cell-in > .halftone, .cell-in > .speed { inset: 0 -3.5rem; }

/* speed lines pulse while the pointer is over their panel (and follow it, from script) */
/* hover: a soft breathing in the lines' strength, no growth, and the burst glides (see site.js) */
@property --fx { syntax: "<percentage>"; inherits: false; initial-value: 46%; }
@property --fy { syntax: "<percentage>"; inherits: false; initial-value: 40%; }
@property --pulse { syntax: "<number>"; inherits: false; initial-value: 1; }
@keyframes lines-pulse { 0%, 100% { --pulse: 1; } 50% { --pulse: 1.3; } }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .speed { transition: --fx .7s cubic-bezier(.2, .7, .2, 1), --fy .7s cubic-bezier(.2, .7, .2, 1); }
  :hover > .speed { animation: lines-pulse 2.4s ease-in-out infinite; }
}
@media (max-width: 560px) {
  .cover { grid-template-areas: "kick" "title" "jp" "foot"; }
  .hello { margin: .9rem 0 0; }
  .cover-right { grid-auto-flow: row; justify-items: stretch; }
  .threat-report { width: 100%; }
  .ok { justify-self: end; }
}

/* the cover lettering splashes in: hello, DESIGNER, FOR FUN, then the OK */
@media (prefers-reduced-motion: no-preference) {
  .js .hello, .js .title-fun .t1, .js .title-fun .t2, .js .cover .ok { opacity: 0; animation: intro-show 0s linear 4s forwards; }
  .splash .hello, .splash .title-fun .t1, .splash .title-fun .t2, .splash .cover .ok {
    animation: splash .5s cubic-bezier(.2, 1.5, .3, 1) both;
  }
  .splash .title-fun .t1 { animation-delay: .14s; transform-origin: 30% 60%; }
  .splash .title-fun .t2 { animation-delay: .34s; transform-origin: 60% 50%; }
  .splash .cover .ok { animation-delay: .75s; }
}
@keyframes splash {
  0% { opacity: 0; scale: 2.7; filter: blur(8px); }
  55% { opacity: 1; scale: .93; filter: blur(0); }
  78% { scale: 1.03; }
  100% { opacity: 1; scale: 1; }
}

/* cover spacing: the hello sits lower, and FOR and FUN get some air */
.hello { margin: clamp(.6rem, 2.2cqw, 1.8rem) 0 .2rem; }
.title-fun .t2 { word-spacing: .2em; }

/* cover: the hello and the title travel together; the spare height goes below the title, not between them */
/* the cover hugs its content: no forced screen height, so no empty bands */
html[data-mode="fun"] .cover { min-height: 0; grid-template-rows: auto auto auto; align-content: start; }
html[data-mode="fun"] .cover .title { align-self: start; }
html[data-mode="fun"] .hello { align-self: start; }            /* keep its own height, never stretch to the row */
html[data-mode="fun"] .cover-foot { margin-top: clamp(1rem, 3vw, 2.5rem); }
/* the caption sits tight on top of DESIGNER */
html[data-mode="fun"] .cover { row-gap: 0; }
html[data-mode="fun"] .hello { margin-bottom: clamp(.5rem, 1.6cqw, 1.25rem); }
html[data-mode="fun"] .title-fun { padding-top: 0; margin-top: -.06em; }
@media (max-width: 560px) {
  /* phones: no gap between the caption and the title; space only between the title and what follows */
  html[data-mode="fun"] .cover { row-gap: 0; }
  html[data-mode="fun"] .hello { margin-bottom: 0; }
  html[data-mode="fun"] .title-fun { margin-top: .12em; }   /* clears the tilt on the right */
  html[data-mode="fun"] .cover .title { margin-bottom: .8rem; }
  html[data-mode="fun"] .cover .jp { margin-bottom: .9rem; }
}
/* the caption, DESIGNER and FOR FUN share one left edge */
html[data-mode="fun"] .title-fun { padding-left: 0; }
html[data-mode="fun"] .title-fun .t2 { margin-left: 0; }
/* the title's tilt shifts each line sideways a little; nudge them back onto one edge (cover-relative units, so it holds at any width) */
html[data-mode="fun"] .hello { margin-left: -1.1cqw; }
html[data-mode="fun"] .title-fun .t2 { margin-left: -.62cqw; }

/* page changes: the frame never fades on the page being left, and the next page takes over
   under the same frame, at the same size */
html.leaving .impact { visibility: visible; opacity: 1; animation: impact-in .09s ease-out both; }
@keyframes impact-in { from { opacity: 0; } to { opacity: 1; } }
html.arrive .impact span, html.arrived .impact span { scale: 1.05; }   /* where the slam ended */
/* the cover's contents get more room from its edges */
html[data-mode="fun"] .cover { padding: clamp(1.5rem, 4.2vw, 3.75rem) clamp(1.35rem, 4.6vw, 4.25rem); }

/* the enlarged view: step through with arrows */
.lb-count { font: 700 .82rem/1 var(--mono); letter-spacing: .14em; font-variant-numeric: tabular-nums; }
.lb-stage { position: relative; touch-action: pan-y; }
.lb-nav {
  position: absolute; top: 50%; translate: 0 -50%; z-index: 1;
  display: grid; place-items: center;
  width: clamp(2.75rem, 5vw, 3.5rem); aspect-ratio: 1;
  background: var(--ink); color: var(--panel); border: var(--line-s) solid var(--ink);
  box-shadow: 4px 4px 0 var(--red); cursor: pointer;
  font: 700 clamp(1.2rem, 2.2vw, 1.6rem)/1 var(--body);
  transition: background-color .12s, color .12s, translate .12s, box-shadow .12s;
}
.lb-prev { left: clamp(.4rem, 1.2vw, .9rem); }
.lb-next { right: clamp(.4rem, 1.2vw, .9rem); }
.lb-nav:hover, .lb-nav:focus-visible { background: var(--yellow); color: var(--ink); outline: none; }
.lb-nav:active { translate: 3px calc(-50% + 3px); box-shadow: 1px 1px 0 var(--red); }
@media (prefers-reduced-motion: reduce) { .lb-nav { transition: none; } }

/* =========================================================
   NAVIGATION — a name tag, a "Chapters" burst, and a contents
   page that opens as a full manga page of panels.
   ========================================================= */

/* the bar is no longer a strip: just two things floating at the top */
html[data-mode="fun"] .bar { background: none; pointer-events: none; }
html[data-mode="fun"] .bar-in {
  background: none; border: 0; box-shadow: none;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
html[data-mode="fun"] .bar-in > * { pointer-events: auto; }
html[data-mode="fun"] .mark {
  flex: none; margin: 0; padding: .7rem 1.1rem;
  border: var(--line) solid var(--ink); box-shadow: 4px 4px 0 var(--red);
  rotate: -2deg;
}
html[data-mode="fun"] .mark:hover { rotate: 0deg; }
.mark .nav-no { display: none; }

.burst {
  position: relative; display: grid; place-items: center; flex: none;
  width: clamp(7.5rem, 11vw, 9.5rem); aspect-ratio: 200 / 110;
  padding: 0; background: none; border: 0; cursor: pointer; color: var(--ink);
  rotate: 4deg; transition: rotate .18s ease-out, scale .18s cubic-bezier(.2, 1.6, .4, 1);
}
.burst-shape { grid-area: 1 / 1; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(4px 4px 0 var(--ink)); }
.burst-shape path { fill: var(--yellow); stroke: var(--ink); stroke-width: 5; stroke-linejoin: round; }
.burst > span:not(.book3d) {
  grid-area: 1 / 1; position: relative;
  font-family: var(--display); font-size: clamp(.9rem, 1.35vw, 1.15rem); line-height: 1; text-transform: uppercase;
}
.burst:hover, .burst:focus-visible { rotate: -3deg; scale: 1.07; outline: none; }
.burst:hover .burst-shape path, .burst:focus-visible .burst-shape path { fill: #fffdf6; }
.burst:focus-visible .burst-shape { filter: drop-shadow(4px 4px 0 var(--red)); }

/* the contents page */
.toc {
  width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0;
  border: 0; background: transparent; color: var(--ink); overflow: auto; overscroll-behavior: contain;
}
.toc::backdrop { background: #121110; }
html.toc-open { overflow: hidden; }
.toc-page {
  position: relative; isolation: isolate; min-height: 100%;
  max-width: 82rem; margin: 0 auto;
  padding: clamp(1rem, 3vw, 2.25rem) max(var(--edge), clamp(.9rem, 2.5vw, 2rem)) clamp(1.5rem, 4vw, 3rem);
}
.toc-page > .speed { --c: #fffdf6; --o: .08; }
.toc-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1.2rem;
  margin-bottom: clamp(1rem, 2.5vw, 1.75rem);
}
.toc-kicker {
  margin: 0; padding: .45em .7em; background: var(--red); color: #fff;
  font: 700 .85rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
}
.toc-title {
  margin: 0; color: var(--yellow);
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(2rem, 6vw, 4.5rem); line-height: .95; rotate: -2deg;
}
.toc-head form { margin: 0 0 0 auto; }
.burst--close { rotate: -5deg; }

.toc-grid {
  display: grid; gap: var(--gap);
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-areas: "home home work work work work" "about about play play contact contact";
  padding: 0 var(--edge);
}
.toc-panel--home { grid-area: home; }
.toc-panel--work { grid-area: work; }
.toc-panel--about { grid-area: about; }
.toc-panel--play { grid-area: play; }
.toc-panel--contact { grid-area: contact; }

.toc-panel {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; gap: .55rem;
  min-height: clamp(13rem, 30vh, 18rem);
  padding: clamp(1rem, 2vw, 1.6rem) clamp(1.3rem, 2.6vw, 2.2rem);
  container-type: inline-size;
  background: var(--panel); color: var(--ink); text-decoration: none;
  border: var(--line) solid var(--ink); box-shadow: 6px 6px 0 #000;
  transform: skewX(-4deg);
  transition: background-color .15s, color .15s;
}
.toc-grid > :nth-child(n+3) { transform: skewX(4deg); }
.toc-panel > * { transform: skewX(4deg); }
.toc-grid > :nth-child(n+3) > * { transform: skewX(-4deg); }
.toc-panel > .speed { transform: none; inset: 0 -3rem; }
.toc-no { font: 700 .85rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.toc-name { font-family: var(--display); font-weight: 400; font-size: clamp(1.35rem, 10.5cqi, 3rem); line-height: .95; text-transform: uppercase; }
.toc-line { max-width: 24rem; font-weight: 600; line-height: 1.35; }

.toc-panel--work { background: var(--yellow); }
.toc-panel--work .speed { --fx: 85%; --fy: 75%; --o: .3; }
.toc-panel--contact { background: var(--red); color: #fff; }
.toc-panel--contact .toc-no { color: var(--yellow); }

/* small drawings, bottom right of each panel */
.toc-art { margin-top: auto; align-self: flex-end; }
.toc-art--ok { display: grid; place-items: center; width: clamp(4.5rem, 8vw, 6.5rem); rotate: -6deg; }
.toc-art--ok svg { grid-area: 1 / 1; width: 100%; height: auto; overflow: visible; }
.toc-art--ok path { fill: var(--panel); stroke: var(--ink); stroke-width: 8; }
.toc-art--ok b { grid-area: 1 / 1; translate: 0 -8%; font-family: var(--display); font-weight: 400; font-size: clamp(1rem, 1.9vw, 1.5rem); color: var(--ink); }   /* ink on the bubble, even when the panel flips dark */
.toc-art--stamp {
  rotate: 7deg; color: var(--red); border: var(--line-s) solid var(--red); background: var(--panel);
  padding: .35em .6em; font: 800 clamp(.8rem, 1.3vw, 1rem)/1 var(--body); font-stretch: 82%; letter-spacing: .16em; text-transform: uppercase;
}
.toc-art--class {
  display: grid; justify-items: center; rotate: -6deg; color: var(--red);
  border: var(--line-s) solid var(--red); padding: .2rem .6rem;
  font-family: var(--display); font-size: clamp(2rem, 3.4vw, 2.8rem); line-height: 1;
}
.toc-art--class small { font: 700 .55rem/1.4 var(--mono); letter-spacing: .22em; text-transform: uppercase; }
.toc-art--prints { display: flex; gap: .4rem; }
.toc-art--prints img {
  width: clamp(2.6rem, 4.4vw, 3.6rem); aspect-ratio: 4 / 5; height: auto; object-fit: cover;
  border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); rotate: -4deg; background: var(--panel);
}
.toc-art--prints img:nth-child(2) { rotate: 3deg; }
.toc-art--prints img:nth-child(3) { rotate: -1deg; }

/* "you are here" */
.toc-panel[aria-current]::after {
  content: "You are here"; position: absolute; top: .8rem; right: 1rem; z-index: 2;
  transform: skewX(4deg) rotate(4deg);
  background: var(--red); color: #fff; padding: .4em .6em;
  font: 700 .74rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
}

/* hover: the panel takes the hit, like the case files */
.toc-panel:hover, .toc-panel:focus-visible { background: var(--ink); color: var(--panel); outline: none; }
.toc-panel:hover .toc-no, .toc-panel:focus-visible .toc-no { color: var(--yellow); }
.toc-panel--contact:hover, .toc-panel--contact:focus-visible { background: var(--yellow); color: var(--ink); }
.toc-panel--contact:hover .toc-name, .toc-panel--contact:hover .toc-no,
.toc-panel--contact:focus-visible .toc-name, .toc-panel--contact:focus-visible .toc-no { color: var(--ink); }
.toc-panel:focus-visible { box-shadow: 6px 6px 0 var(--red); }

/* opening: the panels slam in one after another */
@media (prefers-reduced-motion: no-preference) {
  .toc[open] .toc-title { animation: splash .45s cubic-bezier(.2, 1.5, .3, 1) both; }
  .toc[open] .toc-panel { animation: toc-in .42s cubic-bezier(.2, 1.5, .3, 1) both; animation-delay: calc(var(--i) * 55ms + 60ms); }
  .toc-panel:hover { animation: hit .22s cubic-bezier(.2, 1.6, .4, 1); }
}
@keyframes toc-in { from { opacity: 0; scale: 1.18; } to { opacity: 1; scale: 1; } }

/* the page number, bottom left, like the corner of a manga page */
.folio {
  position: fixed; left: clamp(.6rem, 1.5vw, 1.25rem); bottom: clamp(.6rem, 1.5vw, 1.25rem); z-index: 40;
  display: grid; justify-items: center; align-content: center; gap: .45em;   /* chapter over page: a small square tag */
  min-width: 5.4em; padding: .85em .95em; cursor: pointer;
  background: var(--ink); color: var(--panel); border: 0; box-shadow: 3px 3px 0 var(--red);
  font: 700 .8rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.folio-ch { color: var(--yellow); }
.folio:hover, .folio:focus-visible { background: var(--yellow); color: var(--ink); outline: none; }
.folio:hover .folio-ch, .folio:focus-visible .folio-ch { color: var(--red); }
html[data-mode="serious"] .folio, html.toc-open .folio { display: none; }

@media (max-width: 880px) {
  .toc-grid { grid-template-columns: 1fr 1fr; grid-template-areas: "home home" "work work" "about play" "contact contact"; padding: 0; }
  .toc-panel, .toc-grid > :nth-child(n+3) { transform: none; min-height: 0; }
  .toc-panel > *, .toc-grid > :nth-child(n+3) > * { transform: none; }
  .toc-panel[aria-current]::after { transform: rotate(4deg); }
}
@media (max-width: 560px) {
  .toc-grid { grid-template-columns: 1fr; grid-template-areas: "home" "work" "about" "play" "contact"; }
  .toc-panel { gap: .35rem; padding: .9rem 1.1rem 1rem; }
  .toc-line { flex-basis: 100%; font-size: .92rem; }
  .toc-art { display: none; }
  html[data-mode="fun"] .mark { padding: .6rem .9rem; }
  .burst { width: 7.6rem; }
  .burst > span:not(.book3d) { font-size: .82rem; }
  .toc-panel[aria-current]::after { position: static; align-self: flex-start; margin-top: .35rem; transform: rotate(-2deg); }
  .folio { display: none; }
}

/* the Chapters burst carries an open book */
.book { grid-area: 1 / 1; position: relative; width: 42%; height: auto; overflow: visible; rotate: -4deg; }
.book-page { fill: #fffdf6; stroke: var(--ink); stroke-width: 3.4; stroke-linejoin: round; }
.book-lines { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; }
.burst:hover .book-page, .burst:focus-visible .book-page { fill: var(--yellow); }

/* contents header: label over title on the left, Close pinned top right, at every width */
.toc-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "kick close" "title close";
  align-items: start; gap: .7rem clamp(.75rem, 2vw, 1.5rem);
}
.toc-kicker { grid-area: kick; justify-self: start; }
.toc-title { grid-area: title; font-size: clamp(1.9rem, 6vw, 4.5rem); }
.toc-head form { grid-area: close; margin: 0; align-self: start; }
.burst--close { width: clamp(6.2rem, 10vw, 8.5rem); }

/* the name tag scrolls away with the page; only the Chapters burst stays, fixed top right */
html[data-mode="fun"] .bar { position: relative; }
.bar-in .burst {
  position: fixed; z-index: 60;
  top: clamp(.6rem, 1.6vw, 1.1rem);
  right: max(var(--edge), calc((100vw - 82rem) / 2 + var(--edge)));
}
html { scroll-padding-top: 1.25rem; }
section { scroll-margin-top: 1.25rem; }

/* the Chapters burst is near-square, so the book sits in the middle of it */
.burst--book { aspect-ratio: 140 / 124; width: clamp(5.4rem, 7.2vw, 6.6rem); }
.burst--book .book { width: 52%; }
@media (max-width: 560px) { .burst.burst--book { width: 5.2rem; } }

/* trying it without the burst: just the open book */
.burst--book { aspect-ratio: 64 / 44; width: clamp(3.4rem, 4.4vw, 4.2rem); rotate: -4deg; }
.burst--book .burst-shape { display: none; }
.burst--book .book { width: 100%; rotate: 0deg; filter: drop-shadow(3px 3px 0 var(--ink)); }
.burst--book .book-page { stroke-width: 3; }
.burst--book:hover, .burst--book:focus-visible { rotate: 2deg; scale: 1.1; }
.burst--book:focus-visible .book { filter: drop-shadow(3px 3px 0 var(--red)); }
@media (max-width: 560px) { .burst.burst--book { width: 3.3rem; } }

/* contents page: more room under the title, lines to every edge; it starts at the top,
   so Close appears right where the book button was */
.toc-head { margin-bottom: clamp(1.75rem, 4vw, 3rem); }
.toc-page > .speed { position: fixed; inset: 0; }
/* Close lands exactly where the book button sits, so it opens and shuts from the same corner */
.toc .burst--close {
  position: fixed; z-index: 2;
  top: clamp(.6rem, 1.6vw, 1.1rem);
  right: max(var(--edge), calc((100vw - 82rem) / 2 + var(--edge)));
}
.toc-head { padding-right: clamp(6.5rem, 10vw, 9rem); }
/* the label and title start where the Ch.01 panel's top-left corner does
   (the grid's side padding plus the panel's lean) */
@media (min-width: 881px) {
  .toc-head { padding-left: calc(var(--edge) + var(--lean, .55rem)); }
  .toc-title { transform-origin: 0 100%; }
}

/* =========================================================
   Name tag and book: one matched pair of tags at the top
   ========================================================= */
:root { --tag-h: clamp(2.75rem, 3.6vw, 3.3rem); --tag-top: clamp(1rem, 2.2vw, 1.6rem); }
html[data-mode="fun"] .mark {
  height: var(--tag-h); padding: 0 clamp(.9rem, 1.6vw, 1.2rem);
  display: flex; align-items: center;
  font-size: clamp(.95rem, 1.35vw, 1.1rem);
}
.bar-in .burst--book,
.toc .burst--close { top: var(--tag-top); }
.burst--book {
  width: calc(var(--tag-h) * 1.3); height: var(--tag-h); aspect-ratio: auto;
  display: grid; place-items: center;
  background: var(--ink); border: var(--line) solid var(--ink); box-shadow: 4px 4px 0 var(--red);
  rotate: 2deg;
}
.burst--book .book { width: 68%; filter: none; rotate: 0deg; }
.burst--book .book-page { fill: #fffdf6; stroke: var(--ink); stroke-width: 2.6; }
.burst--book:hover, .burst--book:focus-visible { rotate: 0deg; scale: 1.05; }
.burst--book:hover .book-page, .burst--book:focus-visible .book-page { fill: #fffdf6; }
.burst--book:focus-visible { box-shadow: 4px 4px 0 var(--yellow); }
@media (max-width: 560px) { .burst.burst--book { width: calc(var(--tag-h) * 1.3); } }

/* the book, built as real pages so a page can actually turn in 3D on hover */
.book3d {
  position: relative; display: block; width: 66%; aspect-ratio: 64 / 44;
  perspective: 160px; transform-style: preserve-3d;
}
.pg {
  position: absolute; top: 6%; bottom: 6%; width: 47%;
  border: 2.5px solid var(--ink);
  background:
    linear-gradient(var(--ink), var(--ink)) 50% 30% / 62% 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 50% 50% / 62% 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 50% 70% / 62% 2px no-repeat,
    #fffdf6;
}
.pg-l { left: 3%; border-radius: 4px 1px 1px 4px; }
.pg-r { left: 50%; border-radius: 1px 4px 4px 1px; }
.leaf {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 47%;
  transform-origin: 0 50%; transform-style: preserve-3d;
}
.leaf .pg { top: 6%; bottom: 6%; left: 0; width: 100%; backface-visibility: hidden; }
.leaf-f { border-radius: 1px 4px 4px 1px; }
.leaf-b { border-radius: 4px 1px 1px 4px; transform: rotateY(180deg); }
.burst--book { transition: rotate .2s ease-out, scale .25s cubic-bezier(.2, 1.6, .4, 1), box-shadow .2s ease-out; }
.burst--book:hover, .burst--book:focus-visible { rotate: -2deg; scale: 1.08; box-shadow: 5px 5px 0 var(--red); }
@media (prefers-reduced-motion: no-preference) {
  .burst--book:hover .leaf, .burst--book:focus-visible .leaf { animation: leaf-turn .6s cubic-bezier(.5, 0, .3, 1); }
  .burst--book:hover .leaf:nth-of-type(2), .burst--book:focus-visible .leaf:nth-of-type(2) { animation-delay: .13s; }
  .burst--book:hover .leaf:nth-of-type(3), .burst--book:focus-visible .leaf:nth-of-type(3) { animation-delay: .26s; }
}
/* a page lifts off the right side, arcs over the spine, and lays down on the left;
   it shades as it stands upright, like paper catching less light */
@keyframes leaf-turn {
  0% { transform: rotateY(0deg); filter: brightness(1); }
  50% { transform: rotateY(-90deg) translateZ(2px); filter: brightness(.82); }
  100% { transform: rotateY(-180deg); filter: brightness(1); }
}
/* read as a book, not two sheets: pages meet at the spine on a yellow cover; stronger perspective */
.book3d { perspective: 70px; }
.book3d::before {
  content: ""; position: absolute; left: 0; right: 0; top: 16%; bottom: -2%;
  background: var(--yellow); border: 2.5px solid var(--ink); border-radius: 3px;
}
.pg { top: 4%; bottom: 10%; width: 48%; }
.pg-l { left: 2%; }
.pg-r { left: 50%; }
.leaf { left: 50%; width: 48%; }
.leaf .pg { top: 4%; bottom: 10%; }

/* the book is the drawing again (curved pages, ruled lines); turning leaves are copies of its
   right page that swing over the spine in 3D and land as the left page */
.book3d { width: 72%; perspective: 80px; }
.book3d::before { content: none; }
.book3d > .book { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.leaf { top: 0; bottom: 0; left: 50%; width: 50%; }
.leaf svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; backface-visibility: hidden; }
.leaf-b { transform: rotateY(180deg); }
.book3d .book-page { fill: #fffdf6; stroke: var(--ink); stroke-width: 2.6; stroke-linejoin: round; }
.book3d .book-lines { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }

/* the cover's grand entrance: as the lettering slams in, its speed lines rush in from
   oversized, flare, and pulse three times, each weaker, before settling */
@property --flare { syntax: "<number>"; inherits: false; initial-value: 1; }
@media (prefers-reduced-motion: no-preference) {
  html.js:not(.splash) .cover > .speed { --flare: 0; }
  .splash .cover > .speed {
    animation: cover-lines-in 2.6s cubic-bezier(.2, .7, .3, 1) .08s both,
               cover-lines-drift 2.2s ease-in-out 2.68s infinite alternate;
  }

}
@keyframes cover-lines-in {
  0%   { --flare: 0;    scale: 1.7; }
  16%  { --flare: 1.9;  scale: 1; }
  30%  { --flare: 1;    scale: 1; }
  44%  { --flare: 1.65; scale: 1.04; }
  58%  { --flare: 1;    scale: 1; }
  72%  { --flare: 1.35; scale: 1.02; }
  86%, 100% { --flare: 1; scale: 1; }
}

/* after the entrance the cover's lines never stop: they grow in toward the centre and shrink
   back, at a steady strength, for as long as the cover is on screen */
@property --hole { syntax: "<percentage>"; inherits: false; initial-value: 42%; }
@keyframes cover-lines-drift {
  from { --hole: 46%; scale: 1; }
  to   { --hole: 33%; scale: 1.03; }
}
.cover.is-offscreen > .speed { animation-play-state: paused; }

/* the two logos read as links: each carries its web address on a tag, and the whole thing
   reacts on hover */
.ventures { align-items: flex-end; }
.venture {
  display: flex; flex-direction: column; align-items: center; gap: .55rem;
  text-decoration: none; color: inherit; cursor: pointer;
}
.venture-tag {
  display: inline-flex; align-items: center; gap: .35em; white-space: nowrap;
  padding: .4em .55em; background: var(--ink); color: var(--panel);
  font: 700 clamp(.56rem, .8vw, .66rem)/1 var(--mono); letter-spacing: .06em; text-transform: lowercase;
  box-shadow: 2px 2px 0 var(--red); rotate: -2deg;
  transition: background-color .15s, color .15s, translate .15s, box-shadow .15s;
}
.venture:nth-child(2) .venture-tag { rotate: 2deg; }
.venture:hover .venture-tag, .venture:focus-visible .venture-tag {
  background: var(--yellow); color: var(--ink); translate: 0 -2px; box-shadow: 3px 3px 0 var(--ink);
}
.venture:hover > svg, .venture:hover > img, .venture:focus-visible > svg, .venture:focus-visible > img { scale: 1.12; rotate: 0deg; }
.venture:hover > .venture-tag, .venture:focus-visible > .venture-tag { scale: 1; }
@media (prefers-reduced-motion: reduce) { .venture-tag { transition: none; } }

/* the soda panel leans and is narrow, so keep the two address tags compact enough to sit
   clear of its borders */
.cell--soda .ventures { gap: clamp(.45rem, 1vw, .9rem); }
@media (min-width: 881px) and (max-width: 1040px) {
  .strip--c { grid-template-columns: 1.1fr 1fr 1fr; }   /* the soda panel needs the room here */
  .cell--soda .ventures { gap: .3rem; }
}
.cell--soda .venture-tag { font-size: clamp(.5rem, .7vw, .6rem); letter-spacing: 0; padding: .4em .45em; gap: .3em; }

/* comic panels: items slide along the panel's lean (offsets set in site.js) */
.comic .cell-in { position: relative; }
.comic .cell-in > :not(.halftone, .speed) { position: relative; left: var(--follow, 0px); }

/* the campus paper's masthead always fits the paper */
.paper { container-type: inline-size; }
.paper { width: min(84%, 12.5rem); }
.paper b { font-size: min(clamp(.8rem, 1.4vw, 1.05rem), 9.2cqi); }

/* =========================================================
   HOME — the training montage: the reps count up, then EVERY. SINGLE. DAY. lands
   (site.js arms it with .armed and plays it with .go when it scrolls into view)
   ========================================================= */
.reps { margin-top: var(--sec); }
.reps-in {
  container-type: inline-size;
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "kick every" "list every" "fine every";
  column-gap: clamp(1.5rem, 4cqi, 4rem);
  background: var(--ink); color: var(--panel);
  border: var(--line) solid var(--ink); box-shadow: 8px 8px 0 var(--red);
  padding: clamp(1.75rem, 5cqi, 4.25rem) clamp(1.35rem, 5cqi, 4.25rem);
}
.reps .speed { --fx: 96%; --fy: 50%; --o: .2; }
.reps-kicker { grid-area: kick; align-self: end; margin-bottom: 1.1rem; color: var(--yellow); }
.reps-list {
  grid-area: list; list-style: none; margin: 0; padding: 0;
  font-family: var(--display); text-transform: uppercase; white-space: nowrap;
  font-size: min(3.15cqi, 2.5rem); line-height: 1.24;
}
.reps-list b { font-weight: 400; color: var(--yellow); }
.reps-every {
  grid-area: every; margin: 0; justify-self: end;
  display: flex; flex-direction: column; align-items: flex-end; row-gap: .16em;   /* a little air between the tilted words, so they never touch */
  font-family: var(--display); text-transform: uppercase; line-height: .92;
  font-size: min(7.2cqi, 6.8rem); color: var(--red);
}
.reps-every span { display: block; }
.reps-every span:nth-child(1) { rotate: -4deg; }
.reps-every span:nth-child(2) { rotate: 2deg; margin-right: .3em; }
.reps-every span:nth-child(3) {
  rotate: -3deg; font-size: 1.45em; color: var(--panel);
  text-shadow: .06em .06em 0 var(--red);
}
.reps-fine { grid-area: fine; align-self: start; margin: 1.4rem 0 0; font: 400 .85rem/1.4 var(--mono); letter-spacing: .06em; opacity: .7; }

@media (max-width: 880px) {
  .reps-in { grid-template-columns: 1fr; grid-template-areas: "kick" "list" "every" "fine"; }
  .reps-list { font-size: 6.1cqi; }
  .reps-every { justify-self: start; align-items: flex-start; margin-top: 1.6rem; font-size: 12.5cqi; }
  .reps-every span:nth-child(2) { margin: 0 0 0 .5em; }
}

/* the montage, on the home page and in the About regimen */
.montage::after {                                   /* the flash when DAY lands */
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: var(--yellow); opacity: 0;
}
.montage .n { display: inline-grid; justify-items: end; }
.montage .n > i, .montage .n::after { grid-area: 1 / 1; font-style: normal; }
.montage .n::after { content: attr(data-to); visibility: hidden; }   /* keeps the width while it counts */
.regimen .every span { display: inline-block; }
.regimen .every span:nth-child(3) { color: var(--panel); text-shadow: .06em .06em 0 var(--red); }
.regimen .fine { opacity: .7; }
@media (prefers-reduced-motion: no-preference) {
  .montage.armed li, .montage.armed .every > span, .montage.armed .fine { opacity: 0; }
  .montage.go li { animation: rep-in .4s cubic-bezier(.2, 1.3, .3, 1) calc(.1s + var(--i) * .2s) both; }
  .montage.go .every > span { animation: rep-slam .42s cubic-bezier(.2, 1.5, .3, 1) calc(1.1s + var(--w) * .36s) both; }
  .montage.go .every > span:nth-child(3) { animation-name: rep-slam-big; }
  .montage.go .fine { animation: rep-fade .5s ease-out 2.3s both; }
  .montage.go { animation: rep-shake .34s linear 1.86s; }
  .montage.go::after { animation: rep-flash .38s ease-out 1.86s; }
  .montage.go > .speed { animation: rep-lines 1.6s cubic-bezier(.2, .7, .3, 1) both, cover-lines-drift 2.2s ease-in-out 1.6s infinite alternate; }
}
@keyframes rep-in {
  from { opacity: 0; translate: -3rem 0; transform: skewX(-18deg); filter: blur(3px); }
  to   { opacity: 1; translate: 0 0; transform: none; filter: none; }
}
@keyframes rep-slam {
  from { opacity: 0; scale: 2.6; }
  25%  { opacity: 1; }
  to   { opacity: 1; scale: 1; }
}
@keyframes rep-slam-big {
  from { opacity: 0; scale: 3.6; }
  25%  { opacity: 1; }
  to   { opacity: 1; scale: 1; }
}
@keyframes rep-fade { from { opacity: 0; } to { opacity: .7; } }
@keyframes rep-shake {
  15% { translate: -10px 4px; } 30% { translate: 8px -3px; } 50% { translate: -6px 2px; }
  70% { translate: 4px -1px; } 85% { translate: -2px 0; } 100% { translate: 0 0; }
}
@keyframes rep-flash { 0% { opacity: .55; } 100% { opacity: 0; } }
@keyframes rep-lines { from { --flare: 0; scale: 1.6; } 40% { --flare: 1.8; scale: 1; } to { --flare: 1; scale: 1; } }

/* =========================================================
   WORK — the archive: older files, filed away
   ========================================================= */
.files--archive .file { grid-column: span 6; }
.file--archive .file-body {
  --rule: var(--ink);
  background:
    linear-gradient(color-mix(in srgb, var(--yellow) 9%, transparent), color-mix(in srgb, var(--yellow) 9%, transparent)),
    var(--panel);
  border-style: dashed;
  rotate: -.6deg;
}
.file--archive .file-body::after { font-size: clamp(5rem, 11vw, 9rem); }
.file--archive h3 { font-size: clamp(1.5rem, 3.2vw, 2.5rem); }
.file--archive .file-cta { margin-top: auto; }
/* a strip of filing tape across the top corner */
.file--archive .file-top::before {
  content: ""; position: absolute; top: -.35rem; left: 50%; width: 5.5rem; height: 1.4rem;
  translate: -50% 0; rotate: -3deg;
  background: color-mix(in srgb, var(--yellow) 70%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 15%, transparent);
}
@media (max-width: 880px) {
  .files--archive .file { grid-column: 1 / -1; }
}

/* =========================================================
   CASE STUDY — richer pieces (first used by the NEXEN archive file)
   ========================================================= */
.case figure.wide { width: min(68rem, calc(100vw - 2.5rem)); position: relative; left: 50%; translate: -50% 0; }
.case figure.case-hero { width: min(54rem, calc(100vw - 2.5rem)); margin: clamp(1.5rem, 4vw, 2.5rem) 0; }
.case-hero img { width: 100%; box-shadow: 8px 8px 0 var(--red); }
.case-hero figcaption { margin-top: calc(8px + .75rem); }   /* clear of the red shadow first */
.case figure.wide > img { width: 100%; }

.case-facts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0;
  margin: 0 0 .5rem; border: var(--line) solid var(--ink); background: var(--panel);
}
.case-facts > div { padding: .85rem 1rem; border-bottom: var(--line-s) solid var(--ink); }
.case-facts > div:nth-child(odd) { border-right: var(--line-s) solid var(--ink); }
.case-facts > div:nth-last-child(-n+2) { border-bottom: 0; }
.case-facts dt { font: 700 .82rem/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.case-facts dd { margin: .2rem 0 0; font-weight: 700; line-height: 1.35; }

.shots { display: grid; gap: var(--gap); }
.shots--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shots--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shots--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.case .shots img { width: 100%; }
.shots--5 img:nth-child(odd) { rotate: -1.2deg; }
.shots--5 img:nth-child(even) { rotate: 1.4deg; }

.findings { list-style: none; counter-reset: find; display: grid; gap: var(--gap); margin: 1.2rem 0 0; padding: 0; }
.findings li {
  counter-increment: find; position: relative;
  padding: 1rem 1.1rem 1rem 3.6rem; background: var(--panel);
  border: var(--line) solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
}
.findings li::before {
  content: counter(find, decimal-leading-zero);
  position: absolute; left: 1rem; top: .95rem;
  font-family: var(--display); font-size: 1.25rem; line-height: 1; color: var(--red);
}
.findings b { display: block; margin-bottom: .2rem; }

.sprites { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1.5rem; }
.case .sprites img { width: auto; height: clamp(7rem, 16vw, 10rem); border: 0; filter: drop-shadow(4px 4px 0 var(--ink)); }
.sprites figcaption { flex: 1 1 12rem; align-self: center; margin: 0; }

.case-stat { margin: .4rem 0 1.2rem; font-weight: 700; font-size: 1.15rem; line-height: 1.3; }
.case-stat b {
  display: block; font-family: var(--display); font-weight: var(--dw);
  font-size: clamp(3.4rem, 11vw, 6.5rem); line-height: .95; color: var(--red);
  text-shadow: 4px 4px 0 var(--ink); margin-bottom: .2em;
}

@media (max-width: 880px) {
  .shots--3, .shots--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shots--5 img:last-child, .shots--3 img:last-child { grid-column: 1 / -1; justify-self: center; width: 50%; }
  .shots--3 img:last-child { width: 100%; }
}
@media (max-width: 540px) {
  .case-facts { grid-template-columns: 1fr; }
  .case-facts > div:nth-child(odd) { border-right: 0; }
  .case-facts > div:nth-last-child(2) { border-bottom: var(--line-s) solid var(--ink); }
  .shots--2 { grid-template-columns: 1fr; }
}

/* =========================================================
   FOOTER — the back page of the book: THE END?, the colophon, the chapters
   ========================================================= */
.foot { display: block; padding-top: clamp(1.5rem, 4vw, 3rem); }
.foot-book {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; gap: clamp(1.5rem, 3.5vw, 2.75rem) clamp(1.5rem, 4vw, 4rem);
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  grid-template-areas: "end colophon" "chapters chapters" "base base";
  padding: clamp(1.75rem, 5vw, 4rem) clamp(1.35rem, 5vw, 4.25rem) clamp(1.25rem, 3vw, 2rem);
  background: var(--ink); color: var(--panel);
  border: var(--line) solid var(--ink); box-shadow: 8px 8px 0 var(--red);
}
.foot-book { font: 400 1rem/1.5 var(--body); letter-spacing: normal; }
.foot-book .speed { --fx: 0%; --fy: 100%; --o: .14; }
.foot-book p { margin: 0; }

.foot-end { grid-area: end; align-self: end; }
.foot-vol { font: 700 .85rem/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--yellow); }
.foot-the-end {
  margin: .5em 0 .12em !important;   /* the tilt lifts the right end; leave it room under the kicker */
  font-family: "Dela Punch", "Dela Gothic One", sans-serif; text-transform: uppercase;
  font-size: clamp(3.6rem, 10vw, 8.6rem); line-height: .9; letter-spacing: -.01em;
  rotate: -3deg; transform-origin: 0 100%;
  text-shadow: .05em .05em 0 var(--red);
}
.foot-the-end span { display: inline-block; color: var(--yellow); text-shadow: .05em .05em 0 var(--red); rotate: 10deg; }
.foot-next { margin-top: 1.5rem !important; max-width: 30rem; font-weight: 600; font-size: 1.05rem; line-height: 1.4; }
.foot-next a {
  display: inline-block; margin-left: .2em; color: var(--yellow); font-weight: 800;
  text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: .25em; text-decoration-color: var(--red);
}
.foot-next a:hover { color: var(--panel); }

.foot-colophon {
  grid-area: colophon; align-self: end; margin: 0;
  display: grid; border: var(--line-s) solid color-mix(in srgb, var(--panel) 35%, transparent);
}
.foot-colophon > div {
  display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 1rem; align-items: baseline;
  padding: .7rem .95rem; border-bottom: 1px dashed color-mix(in srgb, var(--panel) 30%, transparent);
}
.foot-colophon > div:last-child { border-bottom: 0; }
.foot-colophon dt { font: 700 .78rem/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--yellow); }
.foot-colophon dd { margin: 0; font-weight: 600; line-height: 1.35; }

.foot-chapters {
  grid-area: chapters; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap);
}
.foot-chapters a {
  display: flex; flex-direction: column; gap: .35rem;
  padding: .85rem 1rem; background: var(--panel); color: var(--ink); text-decoration: none;
  border: var(--line-s) solid var(--panel);
  font-family: var(--display); font-weight: var(--dw); font-size: clamp(1rem, 1.6vw, 1.3rem); line-height: 1; text-transform: uppercase;
  transition: translate .15s, box-shadow .15s, background-color .15s;
}
.foot-chapters a:nth-child(odd) { rotate: -.8deg; }
.foot-chapters a:nth-child(even) { rotate: .8deg; }
.foot-chapters b { font: 700 .78rem/1 var(--mono); letter-spacing: .12em; color: var(--red); }
.foot-chapters a:hover, .foot-chapters a:focus-visible { background: var(--yellow); translate: -2px -3px; box-shadow: 5px 5px 0 var(--red); outline: none; }
.foot-chapters a[aria-current] { background: var(--yellow); }

.foot-base {
  grid-area: base; display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.6rem;
  padding-top: 1.1rem; border-top: var(--line-s) solid color-mix(in srgb, var(--panel) 35%, transparent);
  font: 400 .85rem/1.4 var(--mono); letter-spacing: .04em;
}
.foot-top {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .9em 1em; background: var(--red); color: var(--panel); text-decoration: none;
  font: 700 .85rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  box-shadow: 3px 3px 0 var(--panel); transition: translate .15s, box-shadow .15s;
}
.foot-top:hover, .foot-top:focus-visible { translate: 0 -3px; box-shadow: 3px 6px 0 var(--panel); outline: none; }
.foot-copy { margin-left: auto !important; opacity: .75; }
.foot-plain { font: 400 .85rem/1.5 var(--mono); }

@media (max-width: 880px) {
  .foot-book { grid-template-columns: 1fr; grid-template-areas: "end" "colophon" "chapters" "base"; }
  .foot-chapters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .foot-chapters { grid-template-columns: 1fr; }
  .foot-chapters a { flex-direction: row; align-items: baseline; gap: .8rem; padding: .75rem .9rem; }
  .foot-colophon > div { grid-template-columns: 1fr; gap: .25rem; }
  .foot-base { justify-content: space-between; }
}

/* =========================================================
   SPACING PASS — one rhythm. Gaps are measured to the visible edge, so where an
   element carries a hard shadow the gap below it is widened by the shadow's depth.
   ========================================================= */
/* the cover, stacked (tablet and phone): title, tagline, story box, button, threat report */
@media (max-width: 880px) {
  html[data-mode="fun"] .cover { --cg: 1.4rem; row-gap: 0; }
  html[data-mode="fun"] .cover .title { margin-bottom: var(--cg); }
  html[data-mode="fun"] .cover .jp { margin-bottom: var(--cg); }
  html[data-mode="fun"] .cover-foot { margin-top: 0; row-gap: calc(var(--cg) + 7px); }   /* the button's shadow, and the report's tilt */
  html[data-mode="fun"] .cover-left { gap: calc(var(--cg) + 6px); }                      /* the story box's shadow */
}
/* tablets use the phone order too: title, then the tagline running across under it */
@media (min-width: 561px) and (max-width: 880px) {
  html[data-mode="fun"] .cover { grid-template-columns: minmax(0, 1fr); grid-template-areas: "kick" "title" "jp" "foot"; }
  html[data-mode="fun"] .cover .jp {
    writing-mode: horizontal-tb; justify-self: start; align-self: start;
    font-size: .74rem; letter-spacing: .12em; padding: .5em .7em;
  }
}
/* blocks that had drifted off the shared gaps */
.next:not(.next--ask) { margin-top: var(--sec); }   /* the chapter link only; the answer cards on the home page share .next */
.foot { padding-top: var(--sec); }
.board { margin-top: var(--lead); }
/* the gap you see runs from the bottom of a panel's shadow (or tilt), not its box: add that depth back */
#top + section > .chapter:first-child { margin-top: calc(var(--sec) + 6px); }   /* the cover's shadow */
.reps + #contents .askm { margin-top: calc(var(--sec) + 8px); }                 /* the montage's shadow */
.archive + .next { margin-top: calc(var(--sec) + 9px); }                        /* tilted archive cards */
@media (min-width: 881px) {   /* side by side, these end in a shadowed panel; stacked, they don't */
  section:has(.training) + .next { margin-top: calc(var(--sec) + 6px); }
  section:has(> .registry) + section > .chapter:first-child { margin-top: calc(var(--sec) + 11px); }
}
.contact { margin-top: calc(var(--sec) + 6px); }
body:has(.page--case) .contact { margin-top: var(--sec); }
.foot { padding-top: calc(var(--sec) + 6px); }                                  /* the contact panel's shadow */
/* breathing room between the name tag and the first panel */
/* the name tag sits with the same room above it as below it (below is measured from its
   shadow to the first panel, so the page's own top padding and the shadow are allowed for) */
html[data-mode="fun"] .bar { padding-top: var(--tag-top); padding-bottom: calc(var(--tag-top) - var(--gap) + 5px); }
html[data-mode="fun"] .page--case { padding-top: var(--gap); }   /* same room under the name tag as every other page */
.page--case > .back { display: block; width: fit-content; }   /* no line box above it, so it sits flush like the other pages' first panel */

/* the training reps: a little air between the lines */
.montage li + li { margin-top: .22em; }
/* "I do all of it for fun.": Dela Gothic One carries more room above its capitals than below,
   so the words sat low in the tag. Trim the line to the capitals and pad from the letters. */
.narration .narration-tag { padding: .72em .85em; text-box: trim-both cap alphabetic; }
@supports not (text-box: trim-both cap alphabetic) {
  .narration .narration-tag { padding: .41em .85em .59em; }
}

/* first visit: no empty frame while the lettering font loads; the frame arrives with its word */
html.intro:not(.punch) .impact { visibility: hidden; animation: none; }


/* =========================================================
   CASE STUDY — more pieces for the archive files
   ========================================================= */
.case-links { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.2rem 0 0; }
.case .case-links a {
  display: inline-flex; align-items: center; gap: .45em; padding: .7em .9em;
  background: var(--ink); color: var(--panel); text-decoration: none;
  font: 700 .82rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  box-shadow: 3px 3px 0 var(--red); transition: translate .15s, box-shadow .15s, background-color .15s;
}
.case .case-links a:hover, .case .case-links a:focus-visible { background: var(--yellow); color: var(--ink); translate: 0 -2px; box-shadow: 3px 5px 0 var(--red); outline: none; }

.shots--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.case video { display: block; max-width: 100%; height: auto; border: var(--line) solid var(--rule); background: var(--panel); }
.shots video { width: 100%; }

.stats { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin: 1.4rem 0; padding: 0; }
.stats--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats--1 { grid-template-columns: minmax(0, 24rem); }
.stats li { padding: 1.1rem 1.1rem 1.2rem; background: var(--ink); color: var(--panel); box-shadow: 4px 4px 0 var(--red); line-height: 1.35; }
.stats b {
  display: block; margin-bottom: .45rem;
  font-family: var(--display); font-weight: var(--dw); font-size: clamp(2.2rem, 6vw, 3.2rem); line-height: 1; color: var(--yellow);
}

.personas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin: 1.4rem 0; }
.persona {
  display: grid; grid-template-columns: 4.75rem minmax(0, 1fr); gap: .5rem 1rem; align-content: start;
  padding: 1rem 1.1rem 1.15rem; background: var(--panel); border: var(--line) solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
}
.case .persona img { grid-row: span 2; width: 4.75rem; height: auto; border: 0; }
.persona h3 { margin: 0; font-family: var(--display); font-weight: var(--dw); font-size: 1.25rem; line-height: 1; text-transform: uppercase; }
.persona small { display: block; margin-top: .35rem; font: 700 .76rem/1.35 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.persona blockquote { grid-column: 1 / -1; margin: .35rem 0 0; padding: .55rem .75rem; background: var(--yellow); font-weight: 700; line-height: 1.35; }
.persona p { grid-column: 1 / -1; margin: .2rem 0 0; }

.ba-item { position: relative; }
.ba-tag {
  position: absolute; top: -.65rem; left: .8rem; z-index: 1; rotate: -3deg;
  padding: .4em .65em; background: var(--red); color: #fff;
  font: 700 .8rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
}
.ba-item:last-child .ba-tag { background: var(--ink); color: var(--yellow); rotate: 2deg; }

@media (max-width: 880px) {
  .shots--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats, .stats--2, .personas { grid-template-columns: 1fr; }
}
/* the archive's tagline sits under its heading, not off to the right on a line of its own */
.archive .chapter p, .extras .chapter p { flex-basis: 100%; margin: .15rem 0 0; text-align: left; max-width: none; }
/* five archive files: two wide, then three */
@media (min-width: 881px) {
  .files--archive .file:nth-child(n+3) { grid-column: span 4; }
}
/* phone screens side by side: phone-sized, centred, never stretched across the page */
.shots--phones { grid-template-columns: repeat(2, minmax(0, 15.5rem)); justify-content: center; column-gap: clamp(1rem, 4vw, 3rem); }
/* the archive tagline lines up under the heading's first letter, not under the chapter chip */
@media (min-width: 881px) {
  .archive .chapter, .extras .chapter { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 1rem; align-items: end; }
  .archive .chapter .chapter-no, .extras .chapter .chapter-no { grid-column: 1; grid-row: 1; justify-self: start; }
  .archive .chapter h2, .extras .chapter h2 { grid-column: 2; grid-row: 1; }
  .archive .chapter p, .extras .chapter p { grid-column: 2; grid-row: 2; }
}
/* contents page: a plain-language hint beside each chapter number (Case files = Portfolio) */
.toc-hint {
  margin-left: .45em; padding-left: .7em; border-left: 2px solid currentColor;
  color: var(--mute); letter-spacing: .12em;
}
.toc-panel--contact .toc-hint { color: rgba(255, 253, 246, .78); }
.toc-panel:hover .toc-hint, .toc-panel:focus-visible .toc-hint { color: rgba(255, 253, 246, .72); }
.toc-panel--contact:hover .toc-hint, .toc-panel--contact:focus-visible .toc-hint { color: rgba(18, 17, 16, .72); }
/* the registry photo, on file */
.idphoto--on { aspect-ratio: auto; display: block; padding: 0; margin: 0; background: var(--ink); }
.idphoto--on img { display: block; width: 100%; aspect-ratio: 4 / 5; height: auto; object-fit: cover; object-position: 50% 58%; }

/* =========================================================
   IMPACT FRAME — it comes in harder. Same look as before; only the entrance changes:
   the word slams down and bounces, the speed lines rush in, and the frame jolts on contact.
   ========================================================= */
html.punch .impact span { animation: bang-slam .82s cubic-bezier(.2, 1.1, .3, 1) both; }
html.punch .impact::before { animation: bang-lines .5s cubic-bezier(.15, .8, .3, 1) both; }
html.punch .impact { animation: impact .82s ease-out both, bang-jolt .3s linear .12s; }
html.leaving .impact { animation: impact-in .09s ease-out both, bang-jolt .3s linear .12s; }

@keyframes bang-slam {
  0%   { scale: 1.8; opacity: 0; }
  8%   { opacity: 1; }
  15%  { scale: .9; }
  23%  { scale: 1.04; }
  31%  { scale: 1; }
  100% { scale: 1.05; }
}
@keyframes bang-lines {
  from { scale: 1.6; opacity: 0; }
  to   { scale: 1; opacity: 1; }
}
@keyframes bang-jolt {
  15% { translate: -14px 6px; }
  30% { translate: 11px -5px; }
  50% { translate: -7px 3px; }
  70% { translate: 4px -2px; }
  85% { translate: -2px 1px; }
  100% { translate: 0 0; }
}
/* contents page open: the page behind turns dark too, so the strip a phone shows below the
   dialog (gesture bar, overscroll) matches it instead of showing cream paper; and the last
   panel can always scroll clear of that strip */
html.toc-open, html.toc-open body { background: #121110; }
.toc-page { padding-bottom: calc(clamp(1.5rem, 4vw, 3rem) + env(safe-area-inset-bottom, 0px)); }

/* contact: email first, then the other places to find me, and the address itself to copy */
.contact-actions { align-items: center; }
.btn--small { padding-block: .75em; padding-inline: 1em; font-size: .82rem; }
.contact-mail { margin: 1.1rem 0 0; font-weight: 600; }
.contact-mail a { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: .25em; text-decoration-color: var(--red); color: inherit; }
/* copy the email address */
.contact-mail { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .7rem; }
.copy-mail {
  display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; padding: 0; cursor: pointer;
  background: var(--panel); color: var(--ink); border: var(--line-s) solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  font: 700 .78rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  transition: translate .12s, box-shadow .12s, background-color .15s;
}
.copy-mail:hover, .copy-mail:focus-visible { translate: -1px -1px; box-shadow: 4px 4px 0 var(--ink); outline: none; }
.copy-mail:active { translate: 2px 2px; box-shadow: 1px 1px 0 var(--ink); }
.copy-mail.is-copied { background: var(--ink); color: var(--yellow); }
.copy-mail svg { grid-area: 1 / 1; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: square; stroke-linejoin: miter; }
.copy-mail .copy-done { opacity: 0; scale: .5; transition: opacity .15s, scale .2s cubic-bezier(.2, 1.6, .4, 1); }
.copy-mail .copy-icon { transition: opacity .15s; }
.copy-mail.is-copied .copy-icon { opacity: 0; }
.copy-mail.is-copied .copy-done { opacity: 1; scale: 1; stroke-width: 3; }
/* Copy email as a full button beside Email me (end of every page) */
.copy-mail.btn { display: inline-flex; width: auto; height: auto; padding-block: .75em; padding-inline: 1em; font: 800 .82rem/1 var(--body); font-stretch: 88%; letter-spacing: .07em; background: var(--ink); color: var(--panel); border: var(--line) solid var(--ink); box-shadow: 5px 5px 0 var(--red); }
.copy-mail.btn:hover, .copy-mail.btn:focus-visible { translate: 2px 2px; box-shadow: 3px 3px 0 var(--red); }
.copy-mail.btn:active { translate: 5px 5px; box-shadow: none; }
.copy-mail.btn.is-copied { background: var(--yellow); color: var(--ink); }
.copy-swap { display: inline-grid; }
.copy-swap svg { grid-area: 1 / 1; width: 1.1em; height: 1.1em; }
.copy-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Global Fund Controls case ---------- */
.case blockquote.pull {
  margin: 1.6rem 0; padding: 1.1rem 1.25rem 1rem; background: var(--yellow); border: var(--line) solid var(--ink); box-shadow: 5px 5px 0 var(--ink);
  font-weight: 700; font-size: clamp(1.15rem, 2.4vw, 1.45rem); line-height: 1.3; rotate: -.6deg;
}
.case blockquote.pull cite { display: block; margin-top: .55rem; font: 700 .78rem/1.3 var(--mono); font-style: normal; letter-spacing: .1em; text-transform: uppercase; }
.personas--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.persona--text { grid-template-columns: minmax(0, 1fr); }
.persona--text blockquote { margin-top: .5rem; }
/* the embedded prototype: a live page inside the case */
.case figure.proto iframe {
  display: block; width: 100%; height: min(820px, 82vh); background: #f3f5f7;
  border: var(--line) solid var(--rule); box-shadow: 8px 8px 0 var(--ink);
}
.proto-small { display: none; }
@media (max-width: 760px) {
  .case figure.proto iframe { display: none; }
  .proto-small { display: inline; }
  .personas--3 { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 761px) and (max-width: 1000px) { .personas--3 { grid-template-columns: minmax(0, 1fr); } }
/* research to screen */
.trace { margin: 1.4rem 0 .4rem; border: var(--line) solid var(--ink); background: var(--panel); box-shadow: 4px 4px 0 var(--ink); }
.trace > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-top: var(--line-s) solid var(--ink); }
.trace > div:first-child { border-top: 0; }
.trace span { padding: .7rem .9rem; line-height: 1.4; }
.trace span + span { border-left: var(--line-s) solid var(--ink); font-weight: 600; }
.trace-h { background: var(--ink); color: var(--panel); }
.trace-h span { font: 700 .78rem/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--yellow); }
.trace-h span + span { border-left-color: rgba(255, 253, 246, .25); }
/* the old mainframe, recreated as live text: it scales with its box like a picture would */
.mf-pair { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: clamp(1rem, 2.4vw, 1.75rem); align-items: start; }
.mf {
  container-type: inline-size; overflow-x: auto;
  padding: clamp(.7rem, 2.4vw, 1.6rem); border-radius: 14px;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px), #050605;
  box-shadow: inset 0 0 90px rgba(0, 255, 120, .06), 8px 8px 0 var(--ink);
  border: var(--line-s) solid #050605;
}
.mf pre {
  margin: 0; white-space: pre; font: 400 min(2.08cqi, .84rem)/1.5 var(--mono);
  color: #3cf06b; text-shadow: 0 0 6px rgba(60, 240, 107, .4);
}
.mf .c { color: #5fd4ff; text-shadow: 0 0 6px rgba(95, 212, 255, .4); }
.mf .w { color: #e8f2e8; text-shadow: none; }
.mf .y { background: #ece53a; color: #050605; text-shadow: none; }
.mf .cur { background: #3cf06b; color: #050605; text-shadow: none; animation: mf-blink 1.1s steps(1) infinite; }
@keyframes mf-blink { 50% { background: transparent; color: #3cf06b; } }
.mf-took { padding: 1rem 1.15rem 1.1rem; background: var(--panel); border: var(--line) solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.case .mf-took h3 { margin: 0 0 .6rem; font: 700 .82rem/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.mf-took ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .55rem; line-height: 1.45; }
@media (max-width: 900px) { .mf-pair { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .mf .cur { animation: none; } }
/* sketches shown as separate frames */
.frames { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2.4vw, 1.75rem); }
.case figure.frame { margin: 0; background: var(--panel); border: var(--line) solid var(--ink); box-shadow: 5px 5px 0 var(--ink); }
.case figure.frame img { display: block; width: 100%; height: auto; aspect-ratio: 99 / 70; object-fit: cover; border-bottom: var(--line-s) solid var(--ink); }
.case figure.frame figcaption { margin: 0; padding: .6rem .8rem .65rem; font: 700 .78rem/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.case figure.frame figcaption b { color: var(--red); margin-right: .4rem; }
@media (max-width: 760px) { .frames { grid-template-columns: minmax(0, 1fr); } }

/* ---------- the briefing (prep notes) ---------- */
.doc-toc { margin: 1.5rem 0 .5rem; padding: 1rem 1.2rem; background: var(--panel); border: var(--line) solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.doc-toc ol { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 2rem; counter-reset: toc; }
.doc-toc li { counter-increment: toc; padding: .25rem 0; break-inside: avoid; }
.doc-toc li::before { content: counter(toc, decimal-leading-zero); font: 700 .8rem/1 var(--mono); color: var(--red); margin-right: .6rem; }
.doc-toc a { color: inherit; font-weight: 600; text-decoration-color: var(--red); text-underline-offset: .2em; }
.case section[id^="d-"] { scroll-margin-top: 6rem; }
.doc-h3 { margin: 1.6rem 0 .6rem; font: 700 .85rem/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.doc-note { padding: .7rem .9rem; border-left: 5px solid var(--red); background: rgba(227, 38, 28, .07); font-size: .95rem; }
.formula { margin: .4rem 0 1rem; padding: .9rem 1rem; background: var(--ink); color: var(--yellow); font: 700 1.05rem/1.4 var(--mono); }
.gloss-list { display: grid; grid-template-columns: minmax(7rem, max-content) minmax(0, 1fr); margin: 1rem 0 0; border: var(--line-s) solid var(--ink); background: var(--panel); }
.gloss-list dt, .gloss-list dd { margin: 0; padding: .6rem .8rem; border-top: 1px solid rgba(18, 17, 16, .2); }
.gloss-list dt:first-of-type, .gloss-list dt:first-of-type + dd { border-top: 0; }
.gloss-list dt { font: 700 .9rem/1.4 var(--mono); }
.doc-table { width: 100%; border-collapse: collapse; margin: .6rem 0 1rem; background: var(--panel); border: var(--line-s) solid var(--ink); font-size: .95rem; }
.doc-table th, .doc-table td { padding: .55rem .75rem; border: 1px solid rgba(18, 17, 16, .25); text-align: left; vertical-align: top; }
.doc-table th { background: var(--ink); color: var(--panel); font: 700 .76rem/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.doc-steps { margin: .6rem 0 1rem; padding-left: 1.4rem; }
.doc-steps li, .doc-list li { margin: .45rem 0; line-height: 1.5; }
.doc-list { margin: .6rem 0 1rem; padding-left: 1.2rem; }
.doc-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin-top: 1rem; }
.doc-cards article { padding: 1rem 1.1rem; background: var(--panel); border: var(--line-s) solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.doc-cards h3 { margin: 0 0 .4rem; font-size: 1.05rem; line-height: 1.25; }
.doc-cards p { margin: 0; font-size: .95rem; }
.qa { display: grid; gap: .6rem; margin-top: 1rem; }
.qa details { background: var(--panel); border: var(--line-s) solid var(--ink); }
.qa summary { cursor: pointer; padding: .8rem 1rem; font-weight: 700; list-style: none; display: flex; gap: .7rem; align-items: baseline; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::before { content: "+"; font: 700 1.1rem/1 var(--mono); color: var(--red); width: 1ch; }
.qa details[open] summary::before { content: "−"; }
.qa details[open] summary { border-bottom: 1px solid rgba(18, 17, 16, .2); }
.qa details p { margin: 0; padding: .8rem 1rem 1rem 2.6rem; }
@media (max-width: 640px) {
  .doc-toc ol { columns: 1; }
  .doc-cards { grid-template-columns: minmax(0, 1fr); }
  .gloss-list { grid-template-columns: minmax(0, 1fr); }
  .gloss-list dd { border-top: 0; padding-top: 0; }
  .trace > div { grid-template-columns: minmax(0, 1fr); }
  .trace span + span { border-left: 0; padding-top: 0; }
  .trace-h span + span { display: none; }
}
/* five case files: the two bank platforms side by side, then three across */
html:not([data-mode="serious"]) .files:not(.files--archive):has(> .file:nth-child(5):last-child) > .file:nth-child(n+3) h3 { font-size: clamp(1.5rem, 2.9vw, 2.4rem); }
.files:not(.files--archive):has(> .file:nth-child(5):last-child) > .file:nth-child(n+3) { grid-column: span 4; }
@media (min-width: 701px) and (max-width: 1000px) {
  .files:not(.files--archive):has(> .file:nth-child(5):last-child) > .file:nth-child(n+3) { grid-column: span 6; }
  .files:not(.files--archive):has(> .file:nth-child(5):last-child) > .file:nth-child(5) { grid-column: 1 / -1; }
}
/* the old way: four systems pasted into one deck (portfolio review case) */
.oldway { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: clamp(.8rem, 2.4vw, 1.6rem); align-items: center; }
.ow-src { display: grid; gap: .6rem; }
.ow-src div { padding: .7rem .9rem; background: var(--panel); border: var(--line-s) solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.ow-src b { display: block; font: 700 .82rem/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.ow-src span { display: block; margin-top: .2rem; font-size: .95rem; line-height: 1.35; }
.ow-arrow { display: grid; gap: .35rem; justify-items: center; position: relative; padding: 0 .4rem; }
.ow-arrow::after { content: "→"; font: 400 2.2rem/1 var(--display); color: var(--red); margin-top: .2rem; }
.ow-arrow span { font: 700 .74rem/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; background: var(--yellow); color: #121110; padding: .25rem .45rem; rotate: -1.5deg; }
.ow-arrow span:nth-child(even) { rotate: 1.5deg; }
.ow-deck { padding: .9rem; background: var(--panel); border: var(--line) solid var(--ink); box-shadow: 6px 6px 0 var(--red); }
.ow-file { font: 700 .8rem/1.2 var(--mono); letter-spacing: .02em; padding-bottom: .6rem; border-bottom: var(--line-s) solid var(--ink); overflow-wrap: anywhere; }
.ow-slides { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; margin: .7rem 0; }
.ow-slides i { aspect-ratio: 16 / 9; border: 2px solid var(--ink); background: repeating-linear-gradient(to bottom, transparent 0 22%, rgba(18, 17, 16, .18) 22% 28%); }
.ow-slides i:nth-child(3n+2) { rotate: 2deg; translate: 2px 1px; }
.ow-slides i:nth-child(4) { rotate: -2.5deg; }
.ow-time { font-family: var(--display); font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1; color: var(--red); }
.ow-time small { display: block; margin-top: .3rem; font: 700 .74rem/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
@media (max-width: 760px) {
  .oldway { grid-template-columns: minmax(0, 1fr); }
  .ow-arrow { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; }
  .ow-arrow span { white-space: nowrap; }
  .ow-arrow::after { content: "↓"; flex-basis: 100%; text-align: center; margin-top: 0; }
}
/* four steps in a row */
.flow4 { list-style: none; counter-reset: f4; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin: 1.2rem 0 0; padding: 0; }
.flow4 li { counter-increment: f4; position: relative; padding: 2.6rem 1rem 1rem; background: var(--panel); border: var(--line) solid var(--ink); box-shadow: 4px 4px 0 var(--ink); line-height: 1.4; }
.flow4 li::before { content: counter(f4, decimal-leading-zero); position: absolute; left: 1rem; top: .8rem; font-family: var(--display); font-size: 1.25rem; line-height: 1; color: var(--red); }
.flow4 b { display: block; font-family: var(--display); text-transform: uppercase; font-size: 1.15rem; margin-bottom: .35rem; }
.flow4 span { display: block; font-size: .95rem; }
@media (max-width: 560px) { .flow4 { grid-template-columns: minmax(0, 1fr); } }
/* the Don’t Drink case file carries the can from the home page */
.file-can {
  display: block; align-self: center; margin-block: auto; position: relative; z-index: 1;
  width: auto; height: clamp(9rem, 15vw, 12.5rem); rotate: 20deg;
  filter: drop-shadow(5px 5px 0 var(--red));
  transition: scale .18s cubic-bezier(.2, 1.6, .4, 1), rotate .18s ease-out;
}
a.file-body:hover .file-can, a.file-body:focus-visible .file-can { scale: 1.08; rotate: 8deg; }
html[data-mode="serious"] .file-can { display: none; }
/* and the Pigeon Theory file carries the studio's pigeon, leaning the other way */
.file-pigeon {
  display: block; align-self: center; margin-block: auto; position: relative; z-index: 1; overflow: visible;
  width: auto; height: clamp(8rem, 13vw, 10.5rem); rotate: -8deg;
  transition: scale .18s cubic-bezier(.2, 1.6, .4, 1), rotate .18s ease-out;
}
.file-pigeon .pg-sun { fill: var(--yellow); }   /* the sun from the studio's own share image */
.file-pigeon .pg-f { fill: var(--panel); stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.file-pigeon .pg-l, .file-pigeon .pg-c { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.file-pigeon .pg-c { stroke-width: 3.4; }
.file-pigeon .pg-d { fill: var(--ink); }
a.file-body:hover .file-pigeon, a.file-body:focus-visible .file-pigeon { scale: 1.08; rotate: -2deg; }
html[data-mode="serious"] .file-pigeon { display: none; }
@media (prefers-reduced-motion: reduce) { .file-pigeon { transition: none; } }
@media (prefers-reduced-motion: reduce) { .file-can { transition: none; } }
/* GFC process map, redrawn as live vector */
.pmap-wrap { background: #f7f8f9; border: var(--line) solid var(--rule); padding: clamp(.5rem, 1.5vw, 1rem); }
.pmap { display: block; width: 100%; height: auto; font-family: var(--body); }
/* the sparring: an argument, then what came of it */
.spar { list-style: none; counter-reset: spar; display: grid; gap: var(--gap); margin: 1.2rem 0 0; padding: 0; }
.spar li { counter-increment: spar; position: relative; padding: 1.1rem 1.2rem 1.15rem 3.6rem; background: var(--panel); border: var(--line) solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.spar li::before { content: counter(spar, decimal-leading-zero); position: absolute; left: 1rem; top: 1.05rem; font-family: var(--display); font-size: 1.25rem; line-height: 1; color: var(--red); }
.case .spar h3 { margin: 0 0 .4rem; font-size: 1.05rem; line-height: 1.3; }
.case .spar p { margin: 0 0 .7rem; }
.case .spar .spar-r { margin: 0; padding: .7rem .85rem; background: var(--yellow); color: #121110; border: var(--line-s) solid #121110; }
/* the answer is a reply bubble: no label, just a tail pointing back up at the problem it answers */
.case .spar .spar-r { position: relative; margin-top: 1.25rem; }
.spar-r::before, .spar-r::after { content: ""; position: absolute; bottom: 100%; border-style: solid; border-color: transparent; }
.spar-r::before { left: 1.1rem; border-width: 0 0 15px 17px; border-bottom-color: #121110; }
.spar-r::after { left: calc(1.1rem + 3px); margin-bottom: -3px; border-width: 0 0 10px 11.5px; border-bottom-color: var(--yellow); }
@media (max-width: 560px) { .spar li { padding-left: 1.1rem; padding-top: 2.6rem; } .spar li::before { top: .9rem; } }
/* GFC journey map, redrawn as live HTML: a grid on wide screens, one card per stage on phones */
.jm { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(6.5rem, .62fr) repeat(5, minmax(0, 1fr)); grid-template-rows: auto auto 9.5rem auto auto auto; gap: 3px; padding: 3px; background: #fff; border: var(--line) solid var(--rule); color: #121110; font-size: .88rem; line-height: 1.38; }
.jm-labels, .jm-col { grid-row: 1 / -1; display: grid; grid-template-rows: subgrid; }
.jm-labels { grid-column: 1; }
.jm-col { grid-column: var(--c); }
.jm-labels > div, .jm-c, .jm-h { padding: .7rem .75rem; }
.jm-labels > div { display: flex; align-items: center; background: #b9c6df; font: 700 .72rem/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.jm-h { font-weight: 700; text-align: center; }
.jm-ta { --tone: #b3cdfa; } .jm-tb { --tone: #e4ece9; } .jm-tc { --tone: #fde1df; } .jm-td { --tone: #fdf2d2; } .jm-te { --tone: #d8e4fb; }
.jm-col > * { background: var(--tone); }
.jm-c > ul { margin: 0; padding-left: 1rem; } .jm-c li + li { margin-top: .25rem; }
.jm-col > .jm-feel { position: relative; background: #fff; }
.jm-line { grid-row: 3; grid-column: 2 / -1; align-self: start; width: 100%; height: 72%; margin-top: 0; z-index: 1; color: #6f86a8; pointer-events: none; }
.jm-pt { position: absolute; z-index: 2; left: 50%; top: calc(var(--y) * .72); translate: -50% -7px; width: 92%; display: flex; flex-direction: column; align-items: center; text-align: center; font-weight: 600; font-size: .8rem; line-height: 1.2; }
.jm-pt i { width: 14px; height: 14px; border-radius: 50%; background: #121110; border: 3px solid #fff; box-shadow: 0 0 0 2px #121110; margin-bottom: .35rem; }
.jm-pain { font-weight: 600; }
@media (max-width: 760px) {
  .jm { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: none; gap: .8rem; padding: 0; background: none; border: 0; }
  .jm-labels, .jm-line { display: none; }
  .jm-col { display: block; grid-row: auto; grid-column: auto; border: var(--line-s) solid var(--rule); }
  .jm-h { text-align: left; font-family: var(--display); text-transform: uppercase; font-weight: var(--dw); }
  .jm-c::before { content: attr(data-l); display: block; margin-bottom: .25rem; font: 700 .7rem/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
  .jm-col > .jm-feel { background: var(--tone); }
  .jm-col > * { border-top: 1px solid rgba(18, 17, 16, .12); }
  .jm-pt { position: static; translate: none; width: auto; flex-direction: row; gap: .5rem; text-align: left; font-size: .9rem; }
  .jm-pt i { margin: 0; flex: none; }
}
.case .findings + p, .case .spar + p { margin-top: clamp(1.4rem, 3vw, 1.9rem); }
/* liquidity case: the old afternoon, four windows and a clock */
.before { display: grid; grid-template-columns: minmax(0, 1fr) minmax(11rem, .34fr); gap: clamp(.8rem, 2vw, 1.4rem); align-items: center; }
.bf-wins { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.bf-win { background: var(--panel); border: var(--line-s) solid var(--ink); box-shadow: 3px 3px 0 var(--ink); font-size: .85rem; min-width: 0; }
.bf-win:nth-child(2) { rotate: 1deg; } .bf-win:nth-child(3) { rotate: -1deg; }
.bf-bar { display: flex; align-items: center; gap: .3rem; padding: .4rem .55rem; border-bottom: var(--line-s) solid var(--ink); background: var(--ink); color: var(--panel); }
.bf-bar i { width: .5rem; height: .5rem; border-radius: 50%; background: var(--panel); opacity: .6; flex: none; }
.bf-bar span { margin-left: .3rem; font: 700 .72rem/1.2 var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bf-body { padding: .6rem .7rem .7rem; display: grid; gap: .4rem; }
.bf-body small { font: 700 .66rem/1.3 var(--mono); letter-spacing: .04em; text-transform: uppercase; opacity: .65; }
.bf-row { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.bf-row b { height: .5rem; flex: 1; max-width: 60%; background: rgba(18, 17, 16, .16); }
.bf-row em { font: 700 .8rem/1 var(--mono); font-style: normal; }
.bf-lines { display: grid; gap: .35rem; }
.bf-lines b { height: .45rem; background: rgba(18, 17, 16, .14); }
.bf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid rgba(18, 17, 16, .3); border-left: 1px solid rgba(18, 17, 16, .3); font: 700 .7rem/1.2 var(--mono); }
.bf-grid span { padding: .25rem .3rem; border-right: 1px solid rgba(18, 17, 16, .3); border-bottom: 1px solid rgba(18, 17, 16, .3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bf-grid span:nth-child(-n+3) { background: rgba(18, 17, 16, .08); }
.bf-grid .hot { background: var(--yellow); color: #121110; }
.bf-mail { margin: 0; line-height: 1.35; }
.bf-mail b { display: block; }
.bf-clock { padding: 1rem; background: var(--ink); color: var(--panel); box-shadow: 6px 6px 0 var(--red); text-align: center; }
.bf-clock b { display: block; font: 700 clamp(1.6rem, 3.6vw, 2.4rem)/1 var(--mono); letter-spacing: .02em; color: var(--yellow); }
.bf-clock span { display: block; margin-top: .5rem; font: 700 .74rem/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.bf-clock em { display: block; margin-top: .5rem; font: 400 clamp(1.2rem, 2.6vw, 1.6rem)/1 var(--display); font-style: normal; color: var(--red); }
@media (max-width: 760px) { .before { grid-template-columns: minmax(0, 1fr); } .bf-wins { grid-template-columns: minmax(0, 1fr); } .bf-win { rotate: 0deg !important; } }
/* concept wireframes, drawn as line art inside the frames */
.case figure.frame svg.wf { display: block; width: 100%; height: auto; aspect-ratio: 10 / 7; background: #fffdf6; border-bottom: var(--line-s) solid var(--ink); }
.wf * { fill: none; stroke: #121110; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.wf .soft { stroke: rgba(18, 17, 16, .35); stroke-width: 6; }
.wf .go { stroke: #e3261c; stroke-width: 6; }
.wf .hl { fill: #ffd500; }
.wf .fill { fill: #121110; }
/* titles with one very long word scale to the column instead of spilling out of it */
.case-head:has(> .h1-fit) { container-type: inline-size; }
.case h1.h1-fit { font-size: min(5.2rem, 7.6cqi); }
/* a gate title with one very long word scales to the card, so nothing in the gate gets pushed off-screen */
.gate h1 { font-size: min(clamp(2.1rem, 7vw, 4.6rem), 11.4cqi); }
html[data-mode="serious"] .gate h1 { font-size: min(clamp(2.3rem, 6vw, 4.2rem), 12cqi); }
.gate h1.h1-fit { font-size: min(clamp(2.1rem, 7vw, 4.6rem), 7.4cqi); }
html[data-mode="serious"] .gate h1.h1-fit { font-size: min(clamp(2.3rem, 6vw, 4.2rem), 8cqi); }
/* case studies: a dock of sections along the bottom, with a reading-progress line */
.dock {
  position: fixed; left: 50%; bottom: clamp(.6rem, 1.5vw, 1.25rem); z-index: 39;
  width: min(60rem, calc(100% - 2 * var(--edge)));
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .2rem;
  padding: .45rem .35rem .35rem; background: var(--ink); color: var(--panel); box-shadow: 4px 4px 0 var(--red);
  translate: -50% calc(100% + 2rem); opacity: 0; pointer-events: none;
  transition: translate .35s cubic-bezier(.3, .7, .2, 1), opacity .2s;
}
.dock.is-on { translate: -50% 0; opacity: 1; pointer-events: auto; }
.dock-bar { position: absolute; left: 0; right: 0; top: 0; height: 4px; background: rgba(255, 253, 246, .14); }
.dock-bar i { display: block; height: 100%; width: 0; background: var(--yellow); }
.dock-list {
  list-style: none; margin: 0; padding: 0; display: flex; gap: .15rem; overflow-x: auto; scrollbar-width: none;
  scroll-snap-type: x proximity;
  mask-image: linear-gradient(90deg, transparent, #000 1rem, #000 calc(100% - 1rem), transparent);
}
.dock-list::-webkit-scrollbar { display: none; }
.dock-list li { flex: none; scroll-snap-align: center; }
.dock-list li:first-child { margin-left: .6rem; } .dock-list li:last-child { margin-right: .6rem; }
.dock-item {
  display: flex; align-items: center; gap: .5em; padding: .6em .75em; white-space: nowrap;
  font: 700 .72rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--panel); text-decoration: none;
}
.dock-item b { font-weight: 700; opacity: .5; }
@media (hover: hover) { .dock-item:hover { background: rgba(255, 253, 246, .1); } }   /* touch screens keep :hover after a tap, so it only counts with a real pointer */
.dock-item:focus-visible { outline: 2px solid var(--yellow); outline-offset: -2px; }
.dock-item[aria-current] { background: var(--yellow); color: #121110; }
.dock-item[aria-current] b { opacity: .65; }
.dock-step { width: 2.3rem; height: 2.3rem; border: 0; background: transparent; color: var(--panel); font: 700 1rem/1 var(--mono); cursor: pointer; }
.dock-step:focus-visible { color: var(--yellow); outline: none; }
@media (hover: hover) { .dock-step:hover:not([disabled]) { color: var(--yellow); } }
.dock-step[disabled] { opacity: .3; cursor: default; }
html.dock-on .folio { opacity: 0; pointer-events: none; }
.folio { transition: opacity .2s; }
html.toc-open .dock { display: none; }
html[data-mode="serious"] .dock { border-radius: 14px; overflow: hidden; box-shadow: 0 12px 34px rgba(0, 0, 0, .35); background: color-mix(in srgb, var(--ink) 94%, transparent); backdrop-filter: blur(8px); }
html[data-mode="serious"] .dock-item { font: 600 .82rem/1 var(--body); letter-spacing: 0; text-transform: none; border-radius: 8px; }
html[data-mode="serious"] .dock-item b { display: none; }
@media (max-width: 560px) {
  /* a solid bar along the bottom edge: nothing scrolls by underneath it, and the extra padding at the
     bottom keeps the buttons above the gesture bar or home indicator */
  .dock {
    left: 0; right: 0; bottom: 0; width: auto; translate: 0 100%;
    padding: .6rem .3rem calc(1.1rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -3px 0 var(--red);
  }
  .dock.is-on { translate: 0 0; }
  .dock-step { width: 2.75rem; height: 2.75rem; font-size: 1.1rem; }
  .dock-item { padding: 1.05em .85em; font-size: .78rem; }
}
@media (prefers-reduced-motion: reduce) { .dock { transition: opacity .2s; } }
.case > section, .case > .case-head { scroll-margin-top: 1.25rem; }
@media (max-width: 560px) {
  html[data-mode="serious"] .dock { border-radius: 0; background: var(--ink); backdrop-filter: none; box-shadow: 0 -1px 0 var(--rule); }
}

/* edge to edge on phones (viewport-fit=cover): the page now draws under the system bars, so the
   phone's own bottom bar shows whatever sits there — the dock's black while reading a case.
   Everything else steps clear: gutters past a landscape notch, the foot and floating tags
   above the home indicator. On screens without insets every env() here is 0 and nothing moves. */
:root { --edge: max(clamp(1.25rem, 4vw, 1.5rem), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)); }
.foot { padding-bottom: calc(2.5rem + env(safe-area-inset-bottom, 0px)); }
.folio {
  left: max(clamp(.6rem, 1.5vw, 1.25rem), env(safe-area-inset-left, 0px));
  bottom: calc(clamp(.6rem, 1.5vw, 1.25rem) + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 561px) {
  .dock { bottom: calc(clamp(.6rem, 1.5vw, 1.25rem) + env(safe-area-inset-bottom, 0px)); }
}

/* the dock, take two: one compact tab instead of a long ribbon of sections, on every screen.
   A progress ring with the section number in it, the section you're reading, and every section
   in a menu that opens upward. On phones the tab spans a solid bar along the bottom edge. */
/* the whole bar is the progress: a lighter fill sweeps left to right behind everything, led by a yellow edge */
.dock-bar { inset: 0; height: auto; z-index: 0; overflow: hidden; border-radius: inherit; background: none; pointer-events: none; }
.dock-bar i { background: color-mix(in srgb, var(--panel) 22%, var(--ink)); box-shadow: inset -3px 0 0 var(--yellow); transition: width .12s linear; }
.dock-step, .dock-now { position: relative; z-index: 1; }
.dock-list { z-index: 2; }
.dock { grid-template-columns: auto minmax(0, 1fr) auto; gap: 0; }
.dock-now {
  display: flex; align-items: center; gap: .75rem; min-width: 0; padding: .3rem .7rem .3rem .75rem;
  border: 0; background: transparent; color: var(--panel); cursor: pointer; text-align: left;
  font: 700 .76rem/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase;
}
.dock-now:focus-visible, .dock.is-open .dock-now { background: rgba(255, 253, 246, .09); outline: none; }
@media (hover: hover) { .dock-now:hover { background: rgba(255, 253, 246, .09); } }
.dock-no { flex: none; font: 700 1em/1 var(--mono); letter-spacing: .04em; color: var(--yellow); }
.dock-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dock-of { flex: none; font-size: .68rem; opacity: .5; }
.dock-caret { flex: none; font-size: .7rem; color: var(--yellow); transition: rotate .2s; }
.dock.is-open .dock-caret { rotate: 180deg; }

.dock-list {
  position: absolute; left: 0; right: 0; bottom: calc(100% + .75rem);
  flex-direction: column; gap: .1rem; overflow: visible; mask-image: none; padding: .4rem;
  background: var(--ink); box-shadow: 4px 4px 0 var(--red);
  visibility: hidden; opacity: 0; translate: 0 .6rem;
  transition: opacity .15s, translate .2s cubic-bezier(.3, .7, .2, 1), visibility 0s .2s;
}
.dock.is-open .dock-list { visibility: visible; opacity: 1; translate: 0 0; transition: opacity .15s, translate .2s cubic-bezier(.3, .7, .2, 1); }
.dock-list li:first-child, .dock-list li:last-child { margin: 0; }
.dock-item { padding: .85em .8em; font-size: .74rem; }

html[data-mode="serious"] .dock-now { font: 600 .9rem/1.2 var(--body); letter-spacing: 0; text-transform: none; }
html[data-mode="serious"] .dock-list {
  border-radius: 14px; box-shadow: 0 12px 34px rgba(0, 0, 0, .35);
  background: color-mix(in srgb, var(--ink) 94%, transparent); backdrop-filter: blur(8px);
}

@media (min-width: 561px) {
  .dock { width: auto; grid-template-columns: auto auto auto; padding: .3rem; }
  .dock-step { width: 2.6rem; height: 2.6rem; }
  .dock-now { width: 19.5rem; }
  html[data-mode="serious"] .dock { overflow: visible; border-radius: 999px; padding: .3rem .35rem; }
  html[data-mode="serious"] .dock-now, html[data-mode="serious"] .dock-step { border-radius: 999px; }
}
@media (max-width: 560px) {
  /* the full-width bar stays (black down behind the gesture bar), with the tab filling it */
  .dock { box-shadow: none; padding: .5rem .3rem calc(.85rem + env(safe-area-inset-bottom, 0px)); }
  .dock-now { min-height: 3rem; padding-right: .8rem; font-size: .8rem; }
  .dock-of { font-size: .72rem; }
  /* the progress fills the tab only, not the whole bar down past the gesture area: the bar stays black,
     the tab gets a faint track, and the fill sweeps across it (an absolute child of the grid can take a grid cell) */
  .dock-bar { grid-column: 2 / 3; grid-row: 1 / 2; background: color-mix(in srgb, var(--panel) 7%, var(--ink)); }
  /* the menu rises out of the bar as one sheet, edge to edge with no gap, and scrolls if a case runs long */
  .dock-list {
    left: 0; right: 0; bottom: 100%; padding: .5rem .5rem .2rem; box-shadow: none;
    max-height: calc(100dvh - 10rem); overflow-y: auto; overscroll-behavior: contain;
  }
  html[data-mode="serious"] .dock-list { border-radius: 16px 16px 0 0; background: var(--ink); backdrop-filter: none; box-shadow: 0 -10px 30px rgba(0, 0, 0, .22); }
  .dock-item { padding: 1.05em .9em; font-size: .8rem; }
  html[data-mode="serious"] .dock { overflow: visible; }
  html[data-mode="serious"] .dock-now { border-radius: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .dock-list, .dock.is-open .dock-list { translate: 0 0; }
}

/* =========================================================
   SERIOUS MODE, MATTE
   Graphite and bone, a fine grain over everything, an icon rail down the left,
   and one quiet column: a profile, then labelled sections and soft cards.
   (Home first; the other pages follow.)
   ========================================================= */
html[data-mode="serious"] body { background-image: none; }
html[data-mode="serious"] body::before { content: none; }
html[data-mode="serious"] body::after {           /* the grain that makes it matte */
  content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .07; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
html[data-mode="serious"] ::selection { background: #3a3936; color: var(--ink); }
html[data-mode="serious"] :focus-visible { outline: 2px solid color-mix(in srgb, var(--ink) 70%, transparent); outline-offset: 3px; }

/* the bar: the manga's layout, matte. Name top left, the switch top right, and the book in
   the corner opens the menu, so both modes keep their controls in the same places */
html[data-mode="serious"] .bar { position: relative; z-index: 60; padding: var(--tag-top) var(--edge) 0; background: none; }
html[data-mode="serious"] .bar-in {
  display: flex; align-items: center; justify-content: flex-start; gap: 1rem; min-height: var(--tag-h);
  background: none; border: 0; box-shadow: none;
}
html[data-mode="serious"] .bar .mark {
  height: var(--tag-h); margin: 0; padding: 0; background: none; border: 0; box-shadow: none; color: var(--ink);
  font: 500 1rem/1 var(--body); letter-spacing: -.01em;
}
/* no name in the bar: the switch and the menu are all it holds. The name stays as a home link for
   keyboards, shown when it is focused */
html[data-mode="serious"] .bar .mark:not(:focus-visible) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html[data-mode="serious"] .bar .toggle { color: var(--mute); font: 400 .88rem/1 var(--body); letter-spacing: 0; transition: color .2s; }
html[data-mode="serious"] .bar .toggle:hover { color: var(--ink); }
html[data-mode="serious"] .bar .toggle-track { width: 36px; height: 20px; border: 1.5px solid var(--mute); background: transparent; }
html[data-mode="serious"] .bar .toggle-track::after { top: 2px; left: 2px; width: 13px; height: 13px; background: var(--mute); }
html[data-mode="serious"] .bar .toggle[aria-pressed="true"] .toggle-track { background: var(--ink); border-color: var(--ink); }
html[data-mode="serious"] .bar .toggle[aria-pressed="true"] .toggle-track::after { translate: 16px 0; background: var(--paper); }
html[data-mode="serious"] .bar .toggle-state { color: var(--ink); }

/* the book: the same button in the same corner, drawn in line. Its corner is measured from the
   page beside the work panel, when there is one (--lft) */
html[data-mode="serious"] body { --lft: 0px; --corner: max(var(--edge), calc((100vw - var(--lft) - 82rem) / 2 + var(--edge))); }
@media (min-width: 1100px) { html[data-mode="serious"] body[data-page="work"] { --lft: var(--wp); } }
html[data-mode="serious"] .bar-in .burst--book,
html[data-mode="serious"] .toc .burst--close { right: var(--corner); }
html[data-mode="serious"] .bar-in .burst--book {
  background: var(--panel); border: 1px solid var(--rule); border-radius: 10px; box-shadow: none; rotate: none;
  transition: background-color .2s, border-color .2s;
}
html[data-mode="serious"] .bar-in .burst--book:hover,
html[data-mode="serious"] .bar-in .burst--book:focus-visible { rotate: none; scale: none; background: #2b2a28; border-color: #45433f; }
html[data-mode="serious"] .bar-in .burst--book,
html[data-mode="serious"] .toc .burst--close { width: var(--tag-h); }      /* square tiles for plain icons */
html[data-mode="serious"] .bar .toggle { margin-right: calc(var(--tag-h) + 1.2rem); }
html[data-mode="serious"] .toc .burst--close span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html[data-mode="serious"] .toc .burst--close::before,
html[data-mode="serious"] .toc .burst--close::after {
  content: ""; grid-area: 1 / 1; width: 18px; height: 1.6px; border-radius: 1px; background: var(--ink); rotate: 45deg;
}
html[data-mode="serious"] .toc .burst--close::after { rotate: -45deg; }
html[data-mode="serious"] .burst--book .book3d { display: none; }      /* serious gets a plain menu icon in the book's place */
html[data-mode="serious"] .burst--book .menu-ico { display: block; width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; }
html[data-mode="serious"] .burst--book .book-page { fill: var(--panel); stroke: var(--ink); stroke-width: 2.4; }
html[data-mode="serious"] .burst--book .book-lines { stroke: var(--mute); }

/* the menu: a small sheet that drops from the book, one row per page */
html[data-mode="serious"].toc-open, html[data-mode="serious"].toc-open body { background: var(--paper); }
html[data-mode="serious"] .toc {
  inset: calc(var(--tag-top) + var(--tag-h) + .6rem) var(--corner) auto auto;
  width: min(21rem, calc(100vw - 2 * var(--edge))); height: auto;
  max-height: calc(100dvh - var(--tag-top) - var(--tag-h) - 1.6rem);
  background: var(--panel); border: 1px solid var(--rule); border-radius: 14px; color: var(--ink);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
}
html[data-mode="serious"] .toc::backdrop { background: rgba(12, 12, 11, .55); }
html[data-mode="serious"] .toc-page { min-height: 0; max-width: none; padding: .4rem; }
html[data-mode="serious"] .toc .speed { display: none; }
html[data-mode="serious"] .toc-head { display: block; margin: 0; padding: 0; }
html[data-mode="serious"] .toc-kicker,
html[data-mode="serious"] .toc-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html[data-mode="serious"] .toc .burst--close {        /* Close sits where the book was, as in the manga */
  display: grid; place-items: center; width: var(--tag-h); height: var(--tag-h); padding: 0; rotate: none;
  background: var(--panel); border: 1px solid var(--rule); border-radius: 10px; color: var(--ink);
  font: 400 .82rem/1 var(--body); letter-spacing: 0;
}
html[data-mode="serious"] .toc .burst--close:hover,
html[data-mode="serious"] .toc .burst--close:focus-visible { rotate: none; scale: none; background: #2b2a28; border-color: #45433f; }
html[data-mode="serious"] .toc .burst--close .burst-shape { display: none; }
html[data-mode="serious"] .toc-grid { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: none; gap: 2px; padding: 0; }
html[data-mode="serious"] .toc-grid > .toc-panel {
  grid-area: auto; display: grid; gap: .2rem; min-height: 0; padding: .75rem .85rem; overflow: visible;
  transform: none; border: 0; border-radius: 10px; background: none; box-shadow: none; color: var(--ink);
  container-type: normal; animation: none; transition: background-color .2s;
}
html[data-mode="serious"] .toc-grid > .toc-panel > * { transform: none; }
html[data-mode="serious"] .toc-no, html[data-mode="serious"] .toc-art { display: none; }
html[data-mode="serious"] .toc-name { font: 500 .98rem/1.3 var(--body); letter-spacing: -.01em; color: var(--ink); }
html[data-mode="serious"] .toc-line { max-width: none; flex-basis: auto; font: 400 .86rem/1.4 var(--body); color: var(--mute); }
html[data-mode="serious"] .toc-grid > .toc-panel:hover,
html[data-mode="serious"] .toc-grid > .toc-panel:focus-visible { background: rgba(233, 230, 224, .05); color: var(--ink); box-shadow: none; animation: none; }
html[data-mode="serious"] .toc-grid > .toc-panel[aria-current] { background: rgba(233, 230, 224, .08); }
html[data-mode="serious"] .toc-grid > .toc-panel[aria-current]::after { content: none; }
@media (prefers-reduced-motion: no-preference) {
  html[data-mode="serious"] .toc[open] { animation: sx-menu .18s cubic-bezier(.2, .8, .2, 1); }
  html[data-mode="serious"] .toc[open] .toc-title { animation: none; }
}
@keyframes sx-menu { from { opacity: 0; } }   /* a fade only: a moving sheet would carry Close with it */

/* hover labels, for the icons that use them */
html[data-mode="serious"] [data-tip] { position: relative; }
html[data-mode="serious"] [data-tip]::after {
  content: attr(data-tip); position: absolute; left: calc(100% + 12px); top: 50%; z-index: 5;
  translate: -4px -50%; opacity: 0; pointer-events: none; white-space: nowrap;
  padding: .4rem .6rem; border-radius: 7px; background: #2b2a28; border: 1px solid var(--rule); color: var(--ink);
  font: 500 .78rem/1 var(--body); letter-spacing: 0; text-transform: none;
  transition: opacity .15s, translate .2s cubic-bezier(.2, .8, .2, 1);
}
html[data-mode="serious"] [data-tip]:hover::after,
html[data-mode="serious"] [data-tip]:focus-visible::after { opacity: 1; translate: 0 -50%; }

/* the page: one column, the section labels hanging in the margin to its left */
html[data-mode="serious"] body[data-page="home"] .cover { display: none; }
html[data-mode="serious"] .sx { width: min(100%, var(--col)); margin: 0 auto; padding-top: 0; }
html[data-mode="serious"] .sx-head { display: flex; flex-direction: column; align-items: center; text-align: center; }
html[data-mode="serious"] .sx-avatar {
  width: 76px; height: 76px; border-radius: 50%; overflow: hidden; background: var(--panel);
  box-shadow: 0 0 0 1px var(--rule), 0 0 0 5px var(--paper), 0 0 0 6px var(--rule);
}
html[data-mode="serious"] .sx-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; scale: 1.12; transform-origin: 50% 35%; filter: saturate(.85); }
html[data-mode="serious"] .sx-name { margin: 1.1rem 0 .25rem; font: 550 1.45rem/1.2 var(--body); letter-spacing: -.015em; color: var(--ink); text-transform: none; }
html[data-mode="serious"] .sx-role { margin: 0; font: 400 1.1rem/1.4 var(--body); color: var(--mute); }
html[data-mode="serious"] .sx-social { display: flex; gap: .35rem; margin: 1.4rem 0 0; padding: 0; list-style: none; }
html[data-mode="serious"] .sx-social a { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; color: var(--mute); transition: color .2s, background-color .2s; }
html[data-mode="serious"] .sx-social a:hover, html[data-mode="serious"] .sx-social a:focus-visible { color: var(--ink); background: rgba(233, 230, 224, .06); }
html[data-mode="serious"] .sx-social [data-tip]::after { left: 50%; top: auto; bottom: calc(100% + 8px); translate: -50% 4px; }
html[data-mode="serious"] .sx-social [data-tip]:hover::after, html[data-mode="serious"] .sx-social [data-tip]:focus-visible::after { translate: -50% 0; }
html[data-mode="serious"] .sx-social svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
html[data-mode="serious"] .sx-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .75rem 1rem; margin-top: 1.4rem; }
html[data-mode="serious"] .sx-copy { margin: 0; }
html[data-mode="serious"] .sx-or { font-size: .88rem; color: var(--mute); }
html[data-mode="serious"] .sx-btn,
html[data-mode="serious"] .sx-btn.copy-mail {
  display: inline-flex; align-items: center; gap: .55rem; width: auto; height: auto; padding: .66rem 1.1rem;
  border: 1px solid var(--rule); border-radius: 8px; background: var(--panel); color: var(--ink); box-shadow: none; translate: none;
  font: 500 .92rem/1 var(--body); letter-spacing: 0; text-transform: none; text-decoration: none; cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}
html[data-mode="serious"] .sx-btn:hover, html[data-mode="serious"] .sx-btn.copy-mail:hover { background: #2c2b29; border-color: #42403c; translate: none; box-shadow: none; }
html[data-mode="serious"] .sx-btn--solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }
html[data-mode="serious"] .sx-btn--solid:hover { background: #fffdf7; border-color: #fffdf7; color: var(--paper); }
html[data-mode="serious"] .sx-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
html[data-mode="serious"] .sx-swap { display: inline-grid; }
html[data-mode="serious"] .sx-swap svg { grid-area: 1 / 1; }
html[data-mode="serious"] .sx-btn.copy-mail.is-copied { background: var(--panel); color: var(--ink); }
html[data-mode="serious"] .sx-btn.copy-mail.is-copied .copy-done { stroke-width: 2; }

html[data-mode="serious"] .sx-sec { position: relative; margin-top: clamp(3.5rem, 8vw, 4.75rem); }
html[data-mode="serious"] .sx-sec > h2 {
  margin: 0 0 1rem; font: 500 .95rem/1.6 var(--body); letter-spacing: 0; text-transform: none; color: var(--mute);
}
@media (min-width: 1100px) {
  html[data-mode="serious"] .sx-sec > h2 { position: absolute; top: 0; right: calc(100% + 2.75rem); width: 9rem; margin: 0; text-align: right; }
}
html[data-mode="serious"] .sx-prose p { margin: 0 0 1.05rem; font-size: 1rem; line-height: 1.62; color: color-mix(in srgb, var(--ink) 90%, transparent); }
html[data-mode="serious"] .sx-prose p:last-child { margin-bottom: 0; }
html[data-mode="serious"] .sx-prose a { color: var(--ink); text-decoration-color: #55524d; text-underline-offset: .2em; }
html[data-mode="serious"] .sx-exp { margin: 0; padding: 0; list-style: none; }
html[data-mode="serious"] .sx-exp li {
  display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) auto; gap: 1rem; align-items: baseline;
  padding: .75rem 0; border-bottom: 1px solid var(--rule); font-size: .96rem;
}
html[data-mode="serious"] .sx-exp li:first-child { padding-top: .2rem; }
html[data-mode="serious"] .sx-exp b { font-weight: 500; color: var(--ink); }
html[data-mode="serious"] .sx-exp span { color: var(--mute); }
html[data-mode="serious"] .sx-exp time { font: 400 .74rem/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--mute); }

/* cards: soft, rounded, a cover that glows a little when you point at it */
html[data-mode="serious"] .sx-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
html[data-mode="serious"] .sx-cards > * { min-width: 0; }
html[data-mode="serious"] .sx-card {
  display: block; padding: .4rem; border: 1px solid var(--rule); border-radius: 14px; background: var(--panel);
  color: var(--ink); text-decoration: none;
  transition: border-color .25s, translate .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s;
}
html[data-mode="serious"] .sx-card:hover, html[data-mode="serious"] .sx-card:focus-visible { border-color: #45433f; translate: 0 -3px; box-shadow: 0 14px 30px -18px rgba(0, 0, 0, .7); }
html[data-mode="serious"] .sx-card-head { display: flex; align-items: center; gap: .55rem; padding: .5rem .55rem .65rem; }
html[data-mode="serious"] .sx-ico { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--mute); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
html[data-mode="serious"] .sx-card-title { font-weight: 500; font-size: .96rem; white-space: nowrap; }
html[data-mode="serious"] .sx-card-org { min-width: 0; margin-left: auto; overflow: hidden; text-overflow: ellipsis; font-size: .84rem; color: var(--mute); white-space: nowrap; }
html[data-mode="serious"] .sx-cards--two .sx-card-org { font-size: .78rem; }
html[data-mode="serious"] .sx-cover {
  position: relative; display: block; aspect-ratio: 2 / 1; overflow: hidden; border-radius: 10px;
  background:
    radial-gradient(115% 95% at 82% 112%, rgba(233, 230, 224, .07), transparent 62%),
    linear-gradient(#1b1b1a, #1b1b1a);   /* one neutral tone for every case */
  transition: filter .5s;
}
html[data-mode="serious"] .sx-cover::before {        /* faint lines, like a plotted sheet */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(233, 230, 224, .045) 1px, transparent 1px) 0 0 / 2.5rem 100%;
  -webkit-mask-image: linear-gradient(to top, #000, transparent 85%); mask-image: linear-gradient(to top, #000, transparent 85%);
}
html[data-mode="serious"] .sx-card:hover .sx-cover, html[data-mode="serious"] .sx-card:focus-visible .sx-cover { filter: brightness(1.18) saturate(1.15); }
html[data-mode="serious"] .sx-cover-no {
  position: absolute; left: 1rem; bottom: -.12em;
  font: 650 clamp(4.5rem, 14vw, 7.5rem)/1 var(--display); letter-spacing: -.06em; color: rgba(233, 230, 224, .085);
  transition: color .5s, translate .6s cubic-bezier(.2, .8, .2, 1);
}
html[data-mode="serious"] .sx-card:hover .sx-cover-no { color: rgba(233, 230, 224, .14); translate: 0 -.06em; }
html[data-mode="serious"] .sx-cover-tag {
  position: absolute; top: .8rem; right: .8rem; padding: .38rem .6rem; border-radius: 99px;
  background: rgba(27, 27, 26, .55); border: 1px solid rgba(233, 230, 224, .08);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font: 400 .68rem/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--mute);
}
html[data-mode="serious"] .sx-card-line { display: block; padding: .8rem .55rem .55rem; font-size: .92rem; line-height: 1.5; color: var(--mute); }
@media (min-width: 560px) { html[data-mode="serious"] .sx-cards--two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  /* phones: the company and year drop under the title instead of squeezing it */
  html[data-mode="serious"] .sx-card-head { flex-wrap: wrap; row-gap: .2rem; }
  html[data-mode="serious"] .sx-card-title { white-space: normal; }
  html[data-mode="serious"] .sx-card:not(.sx-cards--two *) .sx-card-org { flex-basis: 100%; margin-left: calc(16px + .55rem); }
}
html[data-mode="serious"] .sx-cover--art {
  display: grid; place-items: center; aspect-ratio: 4 / 3;
  background: radial-gradient(80% 80% at 50% 60%, #2a2927, #1b1b1a 75%);
}
html[data-mode="serious"] .sx-pigeon { width: 66%; height: auto; overflow: visible; transition: rotate .35s cubic-bezier(.2, .8, .2, 1), scale .35s cubic-bezier(.2, .8, .2, 1); rotate: -6deg; }
html[data-mode="serious"] .sx-pigeon .pg-sun { fill: var(--red); opacity: .85; }
html[data-mode="serious"] .sx-pigeon .pg-f { fill: #1f1f1e; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
html[data-mode="serious"] .sx-pigeon :is(.pg-l, .pg-c) { fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
html[data-mode="serious"] .sx-pigeon .pg-c { stroke-width: 3; }
html[data-mode="serious"] .sx-pigeon .pg-d { fill: var(--ink); }
html[data-mode="serious"] .sx-can { position: absolute; top: 13%; left: 50%; translate: -50% 0; width: auto; height: 74%; rotate: 16deg; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .45)); transition: rotate .35s cubic-bezier(.2, .8, .2, 1), scale .35s cubic-bezier(.2, .8, .2, 1); }
html[data-mode="serious"] .sx-card:hover .sx-pigeon { rotate: 0deg; scale: 1.05; }
html[data-mode="serious"] .sx-card:hover .sx-can { rotate: 6deg; scale: 1.05; }

html[data-mode="serious"] .sx-mosaic { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
html[data-mode="serious"] .sx-mosaic img {
  width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; border: 1px solid var(--rule);
  filter: grayscale(.7) brightness(.82); transition: filter .4s, translate .35s cubic-bezier(.2, .8, .2, 1);
}
html[data-mode="serious"] .sx-mosaic:hover img { filter: none; }
html[data-mode="serious"] .sx-mosaic img:nth-child(even) { translate: 0 .6rem; }
html[data-mode="serious"] .sx-note { margin: 1.4rem 0 0; font-size: .92rem; color: var(--mute); }
html[data-mode="serious"] .sx-note a { color: var(--ink); text-decoration: none; }
html[data-mode="serious"] .sx-note a:hover { text-decoration: underline; text-underline-offset: .2em; }

/* the shared contact panel and footer, set in the same column */
html[data-mode="serious"] .page--tail { padding-top: 0; }
html[data-mode="serious"] .contact {
  position: relative; display: block; overflow: visible; width: min(100%, var(--col)); margin: clamp(3.5rem, 8vw, 4.75rem) auto 0; padding: 0;
  background: none; color: var(--ink); border: 0;
}
html[data-mode="serious"] .contact h2 { margin: 0 0 1rem; font: 500 .95rem/1.6 var(--body); letter-spacing: 0; text-transform: none; color: var(--mute); }
@media (min-width: 1100px) {
  html[data-mode="serious"] .contact h2 { position: absolute; top: 0; right: calc(100% + 2.75rem); width: 9rem; margin: 0; text-align: right; }
}
html[data-mode="serious"] .contact-line { margin: 0 0 1.1rem; font-size: 1rem; line-height: 1.6; color: color-mix(in srgb, var(--ink) 90%, transparent); }
html[data-mode="serious"] .contact-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; }
html[data-mode="serious"] .contact .btn,
html[data-mode="serious"] .contact .btn--small {
  padding: .62rem 1rem; border: 1px solid var(--rule); border-radius: 8px; background: var(--panel); color: var(--ink);
  font: 500 .9rem/1 var(--body); box-shadow: none;
}
html[data-mode="serious"] .contact .btn:hover, html[data-mode="serious"] .contact .btn--small:hover { background: #2c2b29; border-color: #42403c; color: var(--ink); }
html[data-mode="serious"] .contact .btn:not(.btn--small) { background: var(--ink); color: var(--paper); border-color: var(--ink); }
html[data-mode="serious"] .contact .btn:not(.btn--small):hover { background: #fffdf7; border-color: #fffdf7; color: var(--paper); }
html[data-mode="serious"] .contact-mail { margin-top: 1.1rem; font-size: .92rem; font-weight: 400; color: var(--mute); }
html[data-mode="serious"] .contact-mail a { color: var(--ink); text-decoration-color: #55524d; text-decoration-thickness: 1px; }
html[data-mode="serious"] .copy-mail { background: var(--panel); color: var(--mute); border: 1px solid var(--rule); border-radius: 7px; box-shadow: none; }
html[data-mode="serious"] .copy-mail:hover, html[data-mode="serious"] .copy-mail:focus-visible { translate: none; box-shadow: none; color: var(--ink); border-color: #42403c; }
html[data-mode="serious"] .copy-mail svg { stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
html[data-mode="serious"] .copy-mail.is-copied { background: var(--panel); color: var(--ink); }
html[data-mode="serious"] .contact .copy-mail.btn { color: var(--ink); }
html[data-mode="serious"] .contact .copy-mail.btn:hover { translate: none; }
html[data-mode="serious"] .foot { max-width: none; padding: clamp(4rem, 9vw, 6rem) var(--edge) 2.5rem; }
html[data-mode="serious"] .foot-plain { text-align: center; font: 400 .72rem/1.5 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--mute); opacity: .8; }

/* arriving: the profile and each section settle in, one after another */
@media (prefers-reduced-motion: no-preference) {
  html[data-mode="serious"] .sx-head > *, html[data-mode="serious"] .sx-sec { animation: sx-in .8s cubic-bezier(.2, .8, .2, 1) both; }
  html[data-mode="serious"] .sx-head > :nth-child(2) { animation-delay: .05s; }
  html[data-mode="serious"] .sx-head > :nth-child(3) { animation-delay: .1s; }
  html[data-mode="serious"] .sx-head > :nth-child(4) { animation-delay: .15s; }
  html[data-mode="serious"] .sx-head > :nth-child(5) { animation-delay: .2s; }
  html[data-mode="serious"] .sx-head > :nth-child(6) { animation-delay: .25s; }
  html[data-mode="serious"] .sx-head > :nth-child(7) { animation-delay: .3s; }
  html[data-mode="serious"] .sx-sec { animation-delay: .4s; }
  @supports (animation-timeline: view()) {
    html[data-mode="serious"] .sx-card { animation: sx-in linear both; animation-timeline: view(); animation-range: entry 0% entry 45%; }
  }
}
@keyframes sx-in { from { opacity: 0; translate: 0 10px; filter: blur(3px); } }
@media (max-width: 560px) {
  html[data-mode="serious"] .sx-exp li { grid-template-columns: minmax(0, 1fr) auto; gap: .15rem 1rem; }
  html[data-mode="serious"] .sx-exp span { grid-column: 1; grid-row: 2; }
  html[data-mode="serious"] .sx-exp time { grid-column: 2; grid-row: 1; }
  html[data-mode="serious"] .sx-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html[data-mode="serious"] .sx-mosaic img:nth-child(even) { translate: none; }
}

/* =========================================================
   SERIOUS MODE, MATTE — the other pages
   The same column, the same quiet type, the same soft cards. Work pages add a
   panel of every case beside the rail; the one being read sits under "Now viewing".
   ========================================================= */
html[data-mode="serious"] body { --col: 36rem; --wp: 19rem; }
html[data-mode="serious"] body:has(.page--case) { --col: 40rem; }
html[data-mode="serious"] main.page { max-width: none; padding: clamp(1rem, 2.5vw, 1.75rem) var(--edge) 0; }   /* the bar above already gives the top its room */
html[data-mode="serious"] main.page > :not(.sx) { width: min(100%, var(--col)); margin-left: auto; margin-right: auto; }

/* the work panel */
html[data-mode="serious"] .wpanel { display: none; }
@media (min-width: 1100px) {
  html[data-mode="serious"] body[data-page="work"] { padding-left: var(--wp); }
  html[data-mode="serious"] body[data-page="work"] .wpanel {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 55; display: block; width: var(--wp);
    overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #3a3936 transparent;
    padding: 1.6rem .85rem 2.5rem; background: var(--paper); border-right: 1px solid var(--rule);
  }
}
html[data-mode="serious"] .wp-title { margin: 0 .65rem 1rem; font: 500 .95rem/1.4 var(--body); }
html[data-mode="serious"] .wp-title a { color: var(--ink); text-decoration: none; }
html[data-mode="serious"] .wp-label { margin: 1.35rem .65rem .45rem; font: 400 .86rem/1.4 var(--body); color: var(--mute); }
html[data-mode="serious"] .wp-title + .wp-label { margin-top: 0; }
html[data-mode="serious"] .wp-list { display: grid; gap: .1rem; margin: 0; padding: 0; list-style: none; }
html[data-mode="serious"] .wp-item {
  display: grid; gap: .2rem; padding: .7rem .65rem; border-radius: 10px; color: var(--ink); text-decoration: none;
  transition: background-color .2s;
}
html[data-mode="serious"] .wp-item b { font-weight: 450; font-size: .93rem; line-height: 1.35; }
html[data-mode="serious"] .wp-item b span { color: var(--mute); }
html[data-mode="serious"] .wp-item > span { font-size: .86rem; line-height: 1.4; color: var(--mute); }
html[data-mode="serious"] .wp-item:hover, html[data-mode="serious"] .wp-item:focus-visible { background: rgba(233, 230, 224, .045); }
html[data-mode="serious"] .wp-now .wp-item { background: rgba(233, 230, 224, .075); }

/* page heads: a small label, the title, one line */
html[data-mode="serious"] .page-head {
  display: block; min-height: 0; margin-top: 0; margin-bottom: clamp(2.5rem, 6vw, 3.5rem); padding: 0;
  background: none; border: 0; box-shadow: none; text-align: left;
}
html[data-mode="serious"] .page-head .kicker { display: block; margin: 0 0 1.4rem; font: 400 .74rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
html[data-mode="serious"] .page-head .kicker::before { content: none; }
html[data-mode="serious"] .page-head h1 { margin: 0 0 .5rem; font: 550 1.6rem/1.2 var(--body); font-stretch: 100%; letter-spacing: -.015em; text-transform: none; color: var(--ink); }
html[data-mode="serious"] .page-sub { max-width: none; margin: 0; font: 400 1.05rem/1.6 var(--body); color: var(--mute); }

/* sections: the heading becomes a label; on wide screens it hangs in the margin */
html[data-mode="serious"] main.page .chapter {
  position: relative; display: block; margin: clamp(3.5rem, 8vw, 4.75rem) auto 1rem; padding: 0; border: 0; background: none; animation: none;
}
html[data-mode="serious"] main.page .chapter::before { content: none; }
html[data-mode="serious"] main.page .chapter h2 { margin: 0; font: 500 .95rem/1.6 var(--body); letter-spacing: 0; text-transform: none; color: var(--mute); }
html[data-mode="serious"] main.page .chapter p { max-width: none; margin: .3rem 0 0; font-size: .95rem; line-height: 1.55; font-weight: 400; text-align: left; color: color-mix(in srgb, var(--ink) 80%, transparent); }
@media (min-width: 1100px) {
  html[data-mode="serious"] body:not([data-page="work"]) main.page .chapter h2 { position: absolute; top: 0; right: calc(100% + 2.75rem); width: 9rem; text-align: right; }
}
html[data-mode="serious"] main.page > section + section { margin-top: 0; }

/* the case files, as cards */
html[data-mode="serious"] .files { display: grid; grid-template-columns: minmax(0, 1fr); gap: .9rem; border: 0; }
html[data-mode="serious"] .files > .file { display: block; min-width: 0; }
html[data-mode="serious"] .file-body,
html[data-mode="serious"] a.file-body:hover,
html[data-mode="serious"] a.file-body:focus-visible {
  display: flex; flex-direction: column; gap: .5rem; padding: 1rem 1.1rem 1.05rem;
  border: 1px solid var(--rule); border-radius: 14px; background: var(--panel); box-shadow: none; color: var(--ink); text-decoration: none;
}
html[data-mode="serious"] .file-body { transition: border-color .25s, translate .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s; }
html[data-mode="serious"] a.file-body:hover, html[data-mode="serious"] a.file-body:focus-visible { border-color: #45433f; translate: 0 -3px; box-shadow: 0 14px 30px -18px rgba(0, 0, 0, .7); }
html[data-mode="serious"] .file-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0; }
html[data-mode="serious"] .file-no { padding: 0; font: 400 .72rem/1 var(--mono); letter-spacing: .05em; color: var(--mute); }
html[data-mode="serious"] .file .stamp {
  display: inline-flex; align-items: center; gap: .4em; margin: 0; padding: .32rem .58rem; rotate: none; box-shadow: none;
  border: 1px solid rgba(233, 230, 224, .1); border-radius: 99px; background: none; color: var(--mute);
  font: 400 .66rem/1 var(--mono); letter-spacing: .05em; text-transform: uppercase;
}
html[data-mode="serious"] .file .stamp svg { width: .9em; height: .9em; }
html[data-mode="serious"] .file h3, html[data-mode="serious"] a.file-body:hover h3 {
  margin: .15rem 0 0; font: 500 1.08rem/1.3 var(--body); font-stretch: 100%; letter-spacing: -.01em; color: var(--ink);
}
html[data-mode="serious"] .file h3 small { display: block; margin-bottom: .3rem; font: 400 .68rem/1.2 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--mute); }
html[data-mode="serious"] .file-line { margin: 0; font-size: .92rem; line-height: 1.5; color: var(--mute); }
html[data-mode="serious"] .file-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.75rem; margin: .25rem 0 0; padding: 0; }
html[data-mode="serious"] .file-meta dt { font: 400 .64rem/1.4 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--mute); }
html[data-mode="serious"] .file-meta dd { margin: .15rem 0 0; font-size: .88rem; color: var(--ink); }
html[data-mode="serious"] .file .threat, html[data-mode="serious"] .threat { display: none; }   /* scope ratings are the manga's joke; serious mode leaves them out */
html[data-mode="serious"] .file .threat .pips { display: none; }
html[data-mode="serious"] .file .threat > .s { font: 400 .64rem/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--mute); }
html[data-mode="serious"] .file .threat strong { font: 400 .86rem/1.3 var(--body); color: var(--mute); }
html[data-mode="serious"] .file-cta {
  align-self: flex-end; width: auto; margin-top: .1rem; padding: 0; background: none; border: 0;
  font: 500 .86rem/1 var(--body); letter-spacing: 0; text-transform: none; color: var(--ink);
}
html[data-mode="serious"] .file .chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: .2rem 0 0; padding: 0; }
html[data-mode="serious"] .file .chips li { padding: .3rem .55rem; border: 1px solid var(--rule); border-radius: 99px; background: none; box-shadow: none; rotate: none; font: 400 .66rem/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--mute); }
html[data-mode="serious"] .sealed-note { margin: 1.25rem 0 0; font-size: .9rem; line-height: 1.55; color: var(--mute); }
html[data-mode="serious"] .sealed-note a { color: var(--ink); }
html[data-mode="serious"] .file-body::before, html[data-mode="serious"] .file-body::after { content: none; }

/* the way back, the password gate */
html[data-mode="serious"] .back { display: flex; gap: .5em; margin-bottom: 1.5rem; padding: 0; border: 0; background: none; font: 400 .74rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); text-decoration: none; }
html[data-mode="serious"] .back:hover { color: var(--ink); }
html[data-mode="serious"] .gate {
  display: block; padding: clamp(1.4rem, 4vw, 2rem); border: 1px solid var(--rule); border-radius: 16px;
  background: var(--panel); box-shadow: none; color: var(--ink);
}
html[data-mode="serious"] .gate .kicker { display: block; margin: 0 0 1.2rem; font: 400 .72rem/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
html[data-mode="serious"] .gate .kicker::before { content: none; }
html[data-mode="serious"] .gate h1, html[data-mode="serious"] .gate h1.h1-fit { margin: 0; font: 550 1.6rem/1.2 var(--body); font-stretch: 100%; letter-spacing: -.015em; text-transform: none; }
html[data-mode="serious"] .gate h1 small { display: block; margin-bottom: .35rem; font: 400 .7rem/1.2 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--mute); }
html[data-mode="serious"] .gate-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.75rem; margin: 1rem 0 0; padding: 0; border: 0; }
html[data-mode="serious"] .gate-meta dt { font: 400 .64rem/1.4 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--mute); }
html[data-mode="serious"] .gate-meta dd { margin: .15rem 0 0; font-size: .9rem; }
html[data-mode="serious"] .gate-why { margin: 1.25rem 0 0; font-size: .95rem; color: var(--mute); }
html[data-mode="serious"] .gate-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem; margin-top: 1.25rem; }
html[data-mode="serious"] .gate-form label { flex: 1 1 14rem; display: grid; gap: .45rem; font: 400 .8rem/1 var(--body); color: var(--mute); letter-spacing: 0; text-transform: none; }
html[data-mode="serious"] .gate-form input {
  width: 100%; padding: .72rem .85rem; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); color: var(--ink);
  font: 400 1rem/1.2 var(--body); box-shadow: none;
}
html[data-mode="serious"] .gate-form input:focus-visible { outline: 0; border-color: #6a6761; }
html[data-mode="serious"] .gate-form .btn { padding: .78rem 1.2rem; border: 1px solid var(--ink); border-radius: 8px; background: var(--ink); color: var(--paper); font: 500 .92rem/1 var(--body); box-shadow: none; }
html[data-mode="serious"] .gate-form .btn:hover { background: #fffdf7; border-color: #fffdf7; }
html[data-mode="serious"] .gate-msg { color: var(--red); font-size: .9rem; }
html[data-mode="serious"] .gate-help { margin: .9rem 0 0; font-size: .88rem; color: var(--mute); }
html[data-mode="serious"] .gate-help a { color: var(--ink); }

/* the case itself: a reading column */
html[data-mode="serious"] .case { font-size: 1rem; }
html[data-mode="serious"] .case-head .kicker { margin: 0 0 1.1rem; font: 400 .72rem/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
html[data-mode="serious"] .case h1, html[data-mode="serious"] .case h1.h1-fit { margin: 0 0 .9rem; font: 550 clamp(1.7rem, 3vw, 2.1rem)/1.15 var(--body); font-stretch: 100%; letter-spacing: -.02em; text-transform: none; }
html[data-mode="serious"] .case-lede { margin: 0; font-size: 1.08rem; line-height: 1.62; color: color-mix(in srgb, var(--ink) 88%, transparent); }
html[data-mode="serious"] .case figure, html[data-mode="serious"] .case figure.wide, html[data-mode="serious"] .case figure.case-hero {
  position: static; left: auto; width: auto; translate: none; margin: 2rem 0;
}
html[data-mode="serious"] .case img, html[data-mode="serious"] .case video, html[data-mode="serious"] .case-hero img { border: 1px solid var(--rule); border-radius: 12px; box-shadow: none; }
html[data-mode="serious"] .case figcaption, html[data-mode="serious"] .case-hero figcaption { margin-top: .7rem; font: 400 .84rem/1.5 var(--body); color: var(--mute); }
html[data-mode="serious"] .case-facts { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: .65rem 1.25rem; margin: 2rem 0; padding: 0; border: 0; background: none; }
html[data-mode="serious"] .case-facts > div { display: contents; }
html[data-mode="serious"] .case-facts dt { padding: 0; font: 400 .92rem/1.5 var(--body); letter-spacing: 0; text-transform: none; color: var(--mute); }
html[data-mode="serious"] .case-facts dd { margin: 0; font: 400 .95rem/1.5 var(--body); color: var(--ink); }
html[data-mode="serious"] .case > section { margin-top: clamp(3rem, 7vw, 4rem); padding-top: 0; border: 0; }
html[data-mode="serious"] .case h2 { margin: 0 0 1rem; padding: 0; border: 0; font: 550 1.25rem/1.3 var(--body); font-stretch: 100%; letter-spacing: -.015em; text-transform: none; color: var(--ink); }
html[data-mode="serious"] .case h2::before, html[data-mode="serious"] .case h2::after { content: none; }
html[data-mode="serious"] .case h3 { font-family: var(--body); text-transform: none; letter-spacing: -.01em; }
html[data-mode="serious"] .case p, html[data-mode="serious"] .case li { line-height: 1.65; }
html[data-mode="serious"] .case > section > p { color: color-mix(in srgb, var(--ink) 90%, transparent); }
html[data-mode="serious"] .case blockquote.pull { margin: 1.75rem 0; padding: 0 0 0 1.1rem; border: 0; border-left: 2px solid #4a4844; background: none; box-shadow: none; rotate: none; font: 400 1.12rem/1.55 var(--body); color: var(--ink); }
html[data-mode="serious"] .case blockquote.pull cite { display: block; margin-top: .55rem; font: 400 .84rem/1 var(--body); color: var(--mute); }

/* about */
html[data-mode="serious"] .registry { display: block; }
html[data-mode="serious"] .idcard { padding: .35rem 1.1rem; border: 1px solid var(--rule); border-radius: 14px; background: var(--panel); box-shadow: none; rotate: none; }
html[data-mode="serious"] .idcard .fields { margin: 0; }
html[data-mode="serious"] .idcard .fields > div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--rule); }
html[data-mode="serious"] .idcard .fields > div:last-of-type { border-bottom: 0; }
html[data-mode="serious"] .idcard .fields dt { font: 400 .9rem/1.5 var(--body); letter-spacing: 0; text-transform: none; color: var(--mute); }
html[data-mode="serious"] .idcard .fields dd { margin: 0; font: 400 .95rem/1.5 var(--body); color: var(--ink); }
html[data-mode="serious"] .ranks-wrap { margin-top: clamp(3rem, 7vw, 4rem); padding: 0; border: 0; background: none; box-shadow: none; }
html[data-mode="serious"] .ranks-wrap .mini { margin: 0 0 1rem; font: 500 .95rem/1.6 var(--body); letter-spacing: 0; text-transform: none; color: var(--mute); }
html[data-mode="serious"] .ranks { margin: 0; padding: 0; list-style: none; border: 0; }
html[data-mode="serious"] .ranks li {
  display: grid; grid-template-columns: 3.5rem minmax(0, 1fr) auto; gap: 1rem; align-items: baseline;
  padding: .75rem 0; border: 0; border-bottom: 1px solid var(--rule); background: none;
}
html[data-mode="serious"] .ranks li::before, html[data-mode="serious"] .ranks li::after { content: none; }
html[data-mode="serious"] .rank-year { font: 400 .74rem/1 var(--mono); letter-spacing: .04em; color: var(--mute); }
html[data-mode="serious"] .rank-role { display: flex; flex-wrap: wrap; gap: .1rem .6rem; font-size: .95rem; color: var(--mute); }
html[data-mode="serious"] .rank-role b { font-weight: 500; color: var(--ink); }
html[data-mode="serious"] .ranks em { padding: .25rem .5rem; border: 1px solid rgba(233, 230, 224, .12); border-radius: 99px; background: none; font: 400 .64rem/1 var(--mono); font-style: normal; letter-spacing: .05em; text-transform: uppercase; color: var(--ink); }
html[data-mode="serious"] .training { display: block; }
html[data-mode="serious"] .principles { display: grid; gap: 0; margin: 0; padding: 0; counter-reset: p; }
html[data-mode="serious"] .principles li {
  display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: 0 .5rem; padding: 1rem 0; border: 0; border-bottom: 1px solid var(--rule);
  background: none; box-shadow: none; rotate: none;
}
html[data-mode="serious"] .principles li::before { content: counter(p, decimal-leading-zero); grid-row: 1 / span 2; padding-top: .3rem; font: 400 .72rem/1 var(--mono); color: var(--mute); }
html[data-mode="serious"] .principles h3 { margin: 0 0 .3rem; font: 500 1rem/1.4 var(--body); letter-spacing: -.01em; text-transform: none; color: var(--ink); }
html[data-mode="serious"] .principles p { margin: 0; font-size: .93rem; line-height: 1.55; color: var(--mute); }
html[data-mode="serious"] .next, html[data-mode="serious"] .next:hover {
  display: flex; align-items: center; gap: 1rem; margin-top: clamp(3rem, 7vw, 4rem); padding: 1rem 1.15rem;
  border: 1px solid var(--rule); border-radius: 14px; background: var(--panel); box-shadow: none; rotate: none; translate: none;
  color: var(--ink); text-decoration: none;
}
html[data-mode="serious"] .next:hover { border-color: #45433f; }
html[data-mode="serious"] .next-label { font: 400 .72rem/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--mute); }
html[data-mode="serious"] .next strong { font: 500 1rem/1.3 var(--body); letter-spacing: 0; text-transform: none; }
html[data-mode="serious"] .next-arrow { margin-left: auto; font-size: 1rem; color: var(--mute); }

/* phones: the case dock along the bottom edge */
@media (max-width: 760px) {
  html[data-mode="serious"] .dock { border-top: 1px solid var(--rule); }
}
@media (min-width: 1100px) {
  html[data-mode="serious"] body[data-page="work"] .dock { left: calc(50% + var(--wp) / 2); }
}

/* the case dock, matte: a dark pill with a faint fill for progress */
html[data-mode="serious"] .case:focus, html[data-mode="serious"] .case:focus-visible { outline: none; }
html[data-mode="serious"] .dock,
html[data-mode="serious"] .dock.is-on {
  background: color-mix(in srgb, #2a2928 92%, transparent); color: var(--ink);
  border: 1px solid #3a3936; box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .8);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
html[data-mode="serious"] .dock-step, html[data-mode="serious"] .dock-now { color: var(--ink); }
html[data-mode="serious"] .dock-no { color: var(--mute); font-family: var(--mono); }
html[data-mode="serious"] .dock-caret { color: var(--mute); }
html[data-mode="serious"] .dock-bar i { background: rgba(233, 230, 224, .08); box-shadow: inset -2px 0 0 rgba(233, 230, 224, .55); }
html[data-mode="serious"] .dock-now:focus-visible, html[data-mode="serious"] .dock.is-open .dock-now { background: rgba(233, 230, 224, .06); }
@media (hover: hover) { html[data-mode="serious"] .dock-now:hover { background: rgba(233, 230, 224, .06); } }
html[data-mode="serious"] .dock-list { background: #2a2928; border: 1px solid #3a3936; color: var(--ink); }
html[data-mode="serious"] .dock-item { color: var(--ink); }
html[data-mode="serious"] .dock-item b { opacity: 1; color: var(--mute); }
html[data-mode="serious"] .dock-item[aria-current] { background: rgba(233, 230, 224, .09); color: var(--ink); }
@media (max-width: 760px) {
  html[data-mode="serious"] .dock, html[data-mode="serious"] .dock.is-on { border: 0; border-top: 1px solid var(--rule); border-radius: 0; background: var(--paper); box-shadow: none; }
  html[data-mode="serious"] .dock-bar { background: rgba(233, 230, 224, .04); border-radius: 8px; overflow: hidden; }
  html[data-mode="serious"] .dock-list { border-radius: 14px 14px 0 0; }
}

/* case components, matte: no hard shadows, no tilts, soft panels with a hairline */
html[data-mode="serious"] .case :is(.findings li, .spar li, .flow4 li, figure.frame, .persona, .trace, .mf-took, .doc-toc, .doc-cards article, .ow-src div, .bf-win, .qa details, .case-links a) {
  box-shadow: none; rotate: none; border: 1px solid var(--rule); border-radius: 12px; background: var(--panel); color: var(--ink);
}
html[data-mode="serious"] .case :is(.findings li, .spar li, .flow4 li)::before { color: var(--red); }
html[data-mode="serious"] .case .stats li { background: var(--panel); color: var(--ink); border: 1px solid var(--rule); border-radius: 12px; box-shadow: none; }
html[data-mode="serious"] .case .stats b { color: var(--ink); }
html[data-mode="serious"] .case .formula { background: rgba(233, 230, 224, .05); color: var(--ink); border: 1px solid var(--rule); border-radius: 10px; }
html[data-mode="serious"] .case :is(.persona blockquote, .ow-arrow span, .bf-grid .hot) { background: rgba(233, 230, 224, .08); color: var(--ink); }
/* numbers share the title's font, size and line box, so they sit on its baseline */
html[data-mode="serious"] .case .findings li { padding: 1rem 1.2rem 1.05rem 3.3rem; }
html[data-mode="serious"] .case .findings li::before { top: 1rem; left: 1.2rem; font-family: inherit; font-size: inherit; line-height: inherit; font-weight: 600; font-variant-numeric: tabular-nums; }
/* link buttons: room above them, even gaps, plain body type */
html[data-mode="serious"] .case .case-links { gap: .6rem; margin-top: clamp(1.4rem, 3vw, 1.75rem); }
html[data-mode="serious"] .case .case-links a { padding: .72rem 1.05rem; font: 500 .92rem/1 var(--body); letter-spacing: 0; }
html[data-mode="serious"] .case .case-links a:hover { background: #2c2b29; color: var(--ink); translate: none; box-shadow: none; }
html[data-mode="serious"] .case .spar .spar-r { background: #2c2b29; color: var(--ink); border: 1px solid #3d3b38; border-radius: 10px; }
html[data-mode="serious"] .case .spar-r::before { border-bottom-color: #3d3b38; }
html[data-mode="serious"] .case .spar-r::after { border-bottom-color: #2c2b29; }
html[data-mode="serious"] .case figure.frame img { border: 0; border-radius: 12px 12px 0 0; border-bottom: 1px solid var(--rule); }
html[data-mode="serious"] .case figure.frame figcaption { color: var(--ink); }
html[data-mode="serious"] .case .qa details[open] summary { border-bottom-color: var(--rule); }
html[data-mode="serious"] .case .pmap-wrap { border: 1px solid var(--rule); border-radius: 12px; }
html[data-mode="serious"] .case .case-stat b { color: var(--ink); }
html[data-mode="serious"] .principles { grid-template-columns: minmax(0, 1fr); }
html[data-mode="serious"] .ranks-wrap { position: relative; }
@media (min-width: 1100px) {
  html[data-mode="serious"] .ranks-wrap .mini { position: absolute; top: 0; right: calc(100% + 2.75rem); width: 9rem; margin: 0; text-align: right; }
}

/* playground: a wider column, so the board stays a gallery; pins and notes as soft cards */
html[data-mode="serious"] body[data-page="playground"] { --col: 62rem; }
html[data-mode="serious"] body[data-page="playground"] .page-head { width: min(100%, 36rem); margin-left: auto; margin-right: auto; }
html[data-mode="serious"] .pin, html[data-mode="serious"] .board .pin:hover {
  overflow: hidden; border: 1px solid var(--rule); border-radius: 12px; background: var(--panel); box-shadow: none; rotate: none;
}
html[data-mode="serious"] .board .pin:hover { border-color: #45433f; }
html[data-mode="serious"] .pin img { border-radius: 0; filter: saturate(.85); }
html[data-mode="serious"] .pin-tag { font: 400 .64rem/1 var(--mono); letter-spacing: .05em; color: var(--mute); background: none; }
html[data-mode="serious"] .pin figcaption { font: 400 .88rem/1.45 var(--body); color: var(--ink); }
html[data-mode="serious"] .note, html[data-mode="serious"] .note--yellow, html[data-mode="serious"] .note--ink, html[data-mode="serious"] .note--red {
  border: 1px solid var(--rule); border-radius: 12px; background: #262524; color: var(--ink); box-shadow: none; rotate: none;
}
html[data-mode="serious"] .note p, html[data-mode="serious"] .note--ink p { font: 500 1.05rem/1.35 var(--body); letter-spacing: -.01em; color: var(--ink); }
html[data-mode="serious"] .note small { font: 400 .64rem/1.4 var(--mono); letter-spacing: .05em; color: var(--mute); opacity: 1; }

/* the switch is back: in the manga it sits left of the book button, clear of it */
.bar .toggle {
  margin-left: auto; margin-right: calc(clamp(3.4rem, 4.4vw, 4.2rem) + 1.4rem); padding: 0; border-left: 0;
}
@media (max-width: 560px) {
  .bar .toggle { margin-right: calc(3.3rem + 1rem); gap: .45rem; }
  .bar .toggle-state { display: none; }
}

/* =========================================================
   CONTACT PAGE — the address big, every other way to reach me underneath.
   (The small contact panel stays at the foot of every other page.)
   ========================================================= */
body[data-page="contact"] .page--tail .contact { display: none; }
.reach { display: grid; gap: var(--gap); margin-top: var(--lead); }
.reach-label { display: block; font: 700 .8rem/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.reach-mail { padding: var(--pad); background: var(--panel); border: var(--line) solid var(--ink); box-shadow: 8px 8px 0 var(--red); }
.reach-address {
  display: block; margin: .5rem 0 0; overflow-wrap: break-word;
  font-family: var(--display); font-weight: var(--dw); font-size: clamp(1.45rem, 5.4vw, 3.6rem); line-height: 1.05;
  color: var(--ink); text-decoration: none;
}
.reach-address:hover { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: .08em; text-underline-offset: .12em; }
.reach-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin-top: 1.4rem; }
.reach-copy { margin: 0; }
.reach .reach-btn.copy-mail { display: inline-flex; align-items: center; gap: .55rem; width: auto; height: auto; padding: .75em 1em; }
.sx-swap { display: inline-grid; }
.sx-swap svg { grid-area: 1 / 1; width: 1.05em; height: 1.05em; }
.reach-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin: 0; padding: 0; list-style: none; }
.reach-list a, .reach-row {
  position: relative; display: grid; gap: .35rem; height: 100%; padding: 1rem 2.6rem 1.1rem 1.15rem;
  background: var(--panel); border: var(--line-s) solid var(--ink); box-shadow: 5px 5px 0 var(--ink);
  color: var(--ink); text-decoration: none; transition: translate .12s, box-shadow .12s;
}
.reach-list b { font-weight: 700; font-size: 1.05rem; overflow-wrap: break-word; }
.reach-go { position: absolute; top: .9rem; right: 1rem; font-weight: 700; }
.reach-list a:hover, .reach-list a:focus-visible { translate: -2px -2px; box-shadow: 7px 7px 0 var(--red); outline: none; }
@media (max-width: 560px) { .reach-list { grid-template-columns: minmax(0, 1fr); } }
/* fun: the other ways in one panel, a rule between rows, not a card each */
html[data-mode="fun"] .reach-list {
  display: block; background: var(--panel); border: var(--line) solid var(--ink); box-shadow: 8px 8px 0 var(--ink);
}
html[data-mode="fun"] .reach-list li + li { border-top: var(--line-s) solid var(--ink); }
html[data-mode="fun"] .reach-list a, html[data-mode="fun"] .reach-row {
  display: grid; grid-template-columns: 8rem minmax(0, 1fr) auto; align-items: baseline; gap: .3rem 1rem;
  padding: 1rem var(--pad); border: 0; box-shadow: none; transition: background-color .12s, color .12s;
}
html[data-mode="fun"] .reach-go { position: static; }
html[data-mode="fun"] .reach-list a:hover, html[data-mode="fun"] .reach-list a:focus-visible {
  translate: none; box-shadow: none; background: var(--yellow);
}
@media (max-width: 560px) {
  html[data-mode="fun"] .reach-list a, html[data-mode="fun"] .reach-row { grid-template-columns: minmax(0, 1fr) auto; padding: .9rem 1.15rem; }
  html[data-mode="fun"] .reach-list .reach-label { grid-column: 1 / -1; }   /* label on its own line, the address and arrow under it */
}

html[data-mode="serious"] .reach { gap: 0; margin-top: 0; }
html[data-mode="serious"] .reach-label { font: 400 .9rem/1.5 var(--body); letter-spacing: 0; text-transform: none; color: var(--mute); }
html[data-mode="serious"] .reach-mail { padding: 1.25rem 1.3rem 1.35rem; border: 1px solid var(--rule); border-radius: 14px; background: var(--panel); box-shadow: none; }
html[data-mode="serious"] .reach-address { margin-top: .3rem; font: 550 clamp(1.3rem, 4.2vw, 1.75rem)/1.2 var(--body); letter-spacing: -.015em; color: var(--ink); }
html[data-mode="serious"] .reach-address:hover { text-decoration-color: #55524d; text-decoration-thickness: 1px; }
html[data-mode="serious"] .reach .reach-btn, html[data-mode="serious"] .reach .reach-btn.copy-mail {
  display: inline-flex; align-items: center; gap: .55rem; width: auto; height: auto; padding: .66rem 1.1rem;
  border: 1px solid var(--rule); border-radius: 8px; background: #2c2b29; color: var(--ink); box-shadow: none; translate: none;
  font: 500 .92rem/1 var(--body); letter-spacing: 0; text-transform: none;
}
html[data-mode="serious"] .reach .reach-btn:not(.copy-mail) { background: var(--ink); border-color: var(--ink); color: var(--paper); }
html[data-mode="serious"] .reach .reach-btn:not(.copy-mail):hover { background: #fffdf7; border-color: #fffdf7; }
html[data-mode="serious"] .reach .reach-btn.copy-mail:hover { border-color: #42403c; }
html[data-mode="serious"] .reach .copy-mail svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
html[data-mode="serious"] .reach-list { display: block; margin-top: 1.75rem; }
html[data-mode="serious"] .reach-list a, html[data-mode="serious"] .reach-row,
html[data-mode="serious"] .reach-list a:hover, html[data-mode="serious"] .reach-list a:focus-visible {
  display: grid; grid-template-columns: 7rem minmax(0, 1fr) auto; gap: 1rem; align-items: baseline; height: auto;
  padding: .85rem 0; background: none; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; box-shadow: none; translate: none;
}
html[data-mode="serious"] .reach-list b { font-weight: 400; font-size: .95rem; }
html[data-mode="serious"] .reach-go { position: static; font-weight: 400; color: var(--mute); transition: color .2s, translate .25s; }
html[data-mode="serious"] .reach-list a:hover .reach-go { color: var(--ink); translate: 2px -2px; }
@media (max-width: 560px) {
  html[data-mode="serious"] .reach-list a, html[data-mode="serious"] .reach-row { grid-template-columns: 5.5rem minmax(0, 1fr) auto; }
}

/* the footer's chapters, five of them now: three across, then two */
.foot-chapters { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.foot-chapters a { grid-column: span 2; }
.foot-chapters a:nth-child(n+4) { grid-column: span 3; }
@media (max-width: 880px) {
  .foot-chapters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-chapters a, .foot-chapters a:nth-child(n+4) { grid-column: auto; }
  .foot-chapters a:last-child { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .foot-chapters { grid-template-columns: minmax(0, 1fr); }
}

/* Work, serious, wide: the panel lists everything, so the page itself is an empty state that invites a pick.
   Narrower screens have no panel, so they keep the cards. */
html[data-mode="serious"] .wselect { display: none; }
@media (min-width: 1100px) {
  html[data-mode="serious"] .page--work > :not(.wselect) { display: none; }
  html[data-mode="serious"] .page--work > .wselect {
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    min-height: calc(100svh - clamp(2.25rem, 6vw, 4.5rem)); margin: 0 auto; padding-bottom: clamp(2.25rem, 6vw, 4.5rem);
  }
  html[data-mode="serious"] body:has(.page--work) .page--tail .contact { margin-top: 0; }
}
html[data-mode="serious"] .wselect-ico {
  width: 46px; height: 46px; padding: 11px; margin-bottom: 1.25rem; box-sizing: border-box;
  border: 1px solid var(--rule); border-radius: 12px; background: var(--panel);
  fill: none; stroke: var(--mute); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
html[data-mode="serious"] .wselect h1 { margin: 0 0 .5rem; font: 550 1.35rem/1.25 var(--body); letter-spacing: -.015em; color: var(--ink); }
html[data-mode="serious"] .wselect p { max-width: 24rem; margin: 0; font-size: .95rem; line-height: 1.55; color: var(--mute); }
html[data-mode="serious"] .wselect p a { color: var(--ink); text-decoration-color: #55524d; text-underline-offset: .2em; }
html[data-mode="serious"] .wselect-hint { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin-top: 1.4rem !important; max-width: none !important; }
html[data-mode="serious"] .wselect-hint span { padding: .32rem .6rem; border: 1px solid var(--rule); border-radius: 99px; font: 400 .66rem/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--mute); }

/* Serious mode, tighter: every label sits inside the column (nothing hangs in the margin),
   and nothing is set in capitals */
html[data-mode="serious"] .sx-sec > h2,
html[data-mode="serious"] .contact h2,
html[data-mode="serious"] main.page .chapter h2,
html[data-mode="serious"] body:not([data-page="work"]) main.page .chapter h2,
html[data-mode="serious"] .ranks-wrap .mini {
  position: static; right: auto; width: auto; margin: 0 0 1rem; text-align: left;
}
html[data-mode="serious"] main.page .chapter h2 { margin-bottom: 0; }
html[data-mode="serious"] *, html[data-mode="serious"] *::before, html[data-mode="serious"] *::after { text-transform: none !important; }
html[data-mode="serious"] :is(.sx-exp time, .sx-cover-tag, .kicker, .file-no, .stamp, .file h3 small,
  .file-meta dt, .gate-meta dt, .gate h1 small, .back, .rank-year, .ranks em, .next-label, .wselect-hint span, .chips li,
  .pin-tag, .note small, .foot-plain, .dock-no, .principles li, .case-facts dt) { letter-spacing: 0; }
html[data-mode="serious"] .principles li::before { letter-spacing: 0; }
/* small labels in the body font; mono is kept for numbers and the location */
html[data-mode="serious"] :is(.kicker, .file h3 small, .file-meta dt, .gate-meta dt, .gate h1 small, .back, .next-label, .note small, .foot-plain) {
  font-family: var(--body); font-size: .85rem; font-weight: 400; line-height: 1.4;
}
html[data-mode="serious"] :is(.stamp, .ranks em, .wselect-hint span, .chips li, .pin-tag, .sx-cover-tag) { font-family: var(--body); font-size: .74rem; }
html[data-mode="serious"] .file .stamp, html[data-mode="serious"] .file .chips li { font-size: .74rem; }
html[data-mode="serious"] .file h3 small, html[data-mode="serious"] .gate h1 small { font-size: .82rem; }
html[data-mode="serious"] .gate .kicker, html[data-mode="serious"] .page-head .kicker, html[data-mode="serious"] .case-head .kicker,
html[data-mode="serious"] .gate h1 small, html[data-mode="serious"] .file h3 small {
  font-family: var(--body); font-size: .85rem; letter-spacing: 0; line-height: 1.4;
}
/* the profile card: rules only between rows (the manga-only rows are hidden, so count the visible ones) */
html[data-mode="serious"] .idcard .fields, html[data-mode="serious"] .idcard .fields > div { border: 0; }
html[data-mode="serious"] .idcard .fields > div:not(.m) ~ div:not(.m) { border-top: 1px solid var(--rule); }
/* the line above a page title only repeated it */
html[data-mode="serious"] .page-head .kicker { display: none; }

/* the case cards are text only: title, company and year, the line; the lock says it's protected */
html[data-mode="serious"] .sx-cards:not(.sx-cards--two) .sx-card-line { padding-top: .1rem; }
