/* playresidual.com — the Kestrel Institute for Psychical Research, as it would print itself: paper,
   ink and rubber stamps, with its photographs as black plates set into the page. The game itself
   (outside the fiction) keeps the night look of the title screen. */

:root {
  --paper: #ece5d6;
  --paper-light: #f5f1e7;
  --ink: #1d1b17;
  --ink-soft: rgba(29, 27, 23, 0.82);
  --ink-dim: #6a6356;
  --rule: rgba(29, 27, 23, 0.2);
  --rule-strong: rgba(29, 27, 23, 0.55);
  --stamp: #b3301c;

  --night: #050606;
  --bone: #e9e2d2;
  --bone-soft: rgba(233, 226, 210, 0.82);
  --bone-dim: #aea89b;
  --line: rgba(233, 226, 210, 0.14);
  --rec: #ff4a1c;
  --tungsten: #f3c07a;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --type: "Special Elite", "American Typewriter", "Courier New", monospace;

  --gutter: clamp(20px, 5vw, 56px);
  --width: 1120px;
  --strip: 38px;
}

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

html {
  color-scheme: light;      /* one look: the Institute's paper, whatever the visitor's setting */
  background: var(--paper);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  scroll-padding-top: calc(var(--strip) + 16px);
}

body {
  margin: 0;
  background: var(--paper) url("images/paper.webp") repeat;
  background-size: 512px;
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  font-optical-sizing: auto;
}

a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--stamp); }
a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 2px; }
img { display: block; max-width: 100%; }

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

.label, .sec-note, .mast-dept {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.typed { font-family: var(--type); }

/* ------------------------------------------------------------------ outside the fiction: the strip */

.strip {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--strip);
  display: flex;
  align-items: center;
  padding: 6px var(--gutter);
  background: var(--night);
  color: var(--bone-soft);
  font-size: 0.92rem;
  line-height: 1.35;
}
.strip p { margin: 0; max-width: var(--width); }
.strip b { color: var(--bone); font-weight: 500; }
.strip a { color: var(--bone); margin-left: 0.4em; white-space: nowrap; }
.strip a:hover { color: #fff; }

/* ------------------------------------------------------------------ the masthead */

.masthead {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px 22px;
  max-width: var(--width);
  margin: 0 auto;
  padding: 26px var(--gutter) 22px;
  border-bottom: 4px double var(--rule-strong);
}
.seal { display: block; color: var(--ink); }
.crest { display: block; width: 84px; height: 84px; }
.crest text { font-family: var(--serif); }
.mast-title {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.mast-title span {
  display: block;
  margin-top: 2px;
  font-size: 1.05rem;
  font-style: italic;
  letter-spacing: 0;
  text-transform: none;
}
.mast-dept { margin-top: 8px; }
.mast-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 20px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.mast-nav a { text-decoration: none; color: var(--ink-soft); }
.mast-nav a:hover { color: var(--stamp); }

/* ------------------------------------------------------------------ photographs: black plates on card */

.exhibit { position: relative; margin: 0; }
.mount {
  position: relative;
  padding: 12px 12px 0;
  background: var(--paper-light);
  box-shadow: 0 18px 40px -18px rgba(40, 30, 15, 0.45), 0 2px 6px rgba(40, 30, 15, 0.15);
}
.mount::before, .mount::after {     /* tape */
  content: "";
  position: absolute;
  top: -12px;
  width: 92px;
  height: 26px;
  background: rgba(226, 214, 186, 0.72);
  box-shadow: 0 1px 2px rgba(40, 30, 15, 0.12);
  z-index: 2;
}
.mount::before { left: 18px; transform: rotate(-6deg); }
.mount::after { right: 18px; transform: rotate(5deg); }
.mount figcaption {
  padding: 12px 4px 14px;
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--ink-soft);
}
.photo {
  position: relative;
  overflow: hidden;
  background: var(--night);
}

/* the camera's marks on a photograph */
.viewfinder {
  position: absolute;
  inset: 16px;
  pointer-events: none;
  z-index: 3;
}
.viewfinder i {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 0 solid rgba(233, 226, 210, 0.7);
}
.viewfinder i:nth-child(1) { top: 0; left: 0; border-top-width: 1.5px; border-left-width: 1.5px; }
.viewfinder i:nth-child(2) { top: 0; right: 0; border-top-width: 1.5px; border-right-width: 1.5px; }
.viewfinder i:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.viewfinder i:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 1.5px; border-right-width: 1.5px; }
.rec {
  position: absolute;
  top: 28px;
  left: 30px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--bone-soft);
}
.rec::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rec);
  box-shadow: 0 0 8px rgba(255, 74, 28, 0.8);
  animation: rec 1.2s steps(1) infinite;
}
@keyframes rec { 50% { opacity: 0.2; } }

/* rubber stamps */
.stamp-wrap { position: absolute; z-index: 4; pointer-events: none; }
.stamp {
  margin: 0;
  padding: 0.35em 0.7em 0.25em;
  border: 3px solid var(--stamp);
  border-radius: 6px;
  font-family: var(--type);
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--stamp);
  transform: rotate(-8deg);
  opacity: 0.88;
  mix-blend-mode: multiply;
  -webkit-mask-image: url("images/stamp-ink.png");
  mask-image: url("images/stamp-ink.png");
  -webkit-mask-size: 180px;
  mask-size: 180px;
}

/* ------------------------------------------------------------------ the hero: Exhibit 001 */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(36px, 6vw, 88px);
  max-width: var(--width);
  margin: 0 auto;
  padding: clamp(40px, 7vw, 88px) var(--gutter) clamp(56px, 9vw, 120px);
}
.hero h1 {
  margin: 0.9rem 0 1rem;
  font-weight: 400;
  font-size: clamp(2.8rem, 7vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.lede { margin: 0; max-width: 30rem; font-size: 1.3rem; line-height: 1.5; color: var(--ink-soft); }
.tagline { margin: 1rem 0 0; font-style: italic; font-size: 1.15rem; color: var(--ink-dim); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 2rem; }
.button {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: var(--paper-light);
  border-radius: 3px;
  text-decoration: none;
  font-size: 1.1rem;
}
.button:hover { background: #000; color: #fff; }
.aside { margin: 0; font-size: 0.95rem; color: var(--ink-dim); }

.hero-exhibit .mount { rotate: 1.2deg; }
.hero-exhibit .photo { aspect-ratio: 4 / 5; }
.s-hero { right: -18px; bottom: 26%; }

/* the hallway inside the plate (the same as the game's title) */
.hall {
  position: absolute;
  inset: 0;
  opacity: 0;               /* the bulb is off until the page switches it on */
  background: var(--night);
}
.hall img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
  transform: scale(var(--push, 1));
  transform-origin: 50% 45%;
}
.hall .hall-room { opacity: 0; }
.hall.no-photo .hall-room,
.hall.no-photo .hall-empty { display: none; }
.hall .hall-figure {
  inset: auto;
  left: 50%;
  top: 68%;
  width: auto;
  height: 42%;
  transform: translate(-50%, -100%);
  object-fit: contain;
  opacity: 0;
  filter: drop-shadow(0 0 18px rgba(200, 220, 235, 0.18));
}
.hall:not(.no-photo) .hall-figure { display: none; }
.hall.no-photo::before,
.hall.no-photo::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
}
.hall.no-photo::before {
  top: 10%;
  width: 40%;
  aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(243, 192, 122, 0.5), rgba(243, 192, 122, 0.08) 60%, transparent);
}
.hall.no-photo::after {
  top: 61%;
  width: 92%;
  height: 14%;
  background: radial-gradient(closest-side, rgba(243, 192, 122, 0.24), rgba(243, 192, 122, 0.05) 70%, transparent);
}

/* ------------------------------------------------------------------ sections */

.section {
  position: relative;
  max-width: var(--width);
  margin: 0 auto;
  padding: clamp(56px, 9vw, 112px) var(--gutter) 0;
}
.sec-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 4px 18px;
  padding-bottom: 14px;
  margin-bottom: clamp(24px, 4vw, 40px);
  border-bottom: 1px solid var(--rule-strong);
}
.sec-no {
  margin: 0;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-style: italic;
  color: var(--stamp);
}
.sec-head h2 {
  margin: 0;
  font-weight: 400;
  font-size: clamp(2rem, 4.8vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.sec-lede { margin: 0 0 1.5rem; max-width: 40rem; font-size: 1.2rem; color: var(--ink-soft); }

/* I. the letter */
.institute {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}
.letter {
  position: relative;
  padding: clamp(24px, 4vw, 44px) clamp(22px, 4vw, 48px) clamp(26px, 4vw, 40px);
  background: var(--paper-light);
  box-shadow: 0 20px 40px -24px rgba(40, 30, 15, 0.45), 0 1px 3px rgba(40, 30, 15, 0.15);
  font-family: var(--type);
  font-size: 1.02rem;
  line-height: 1.65;
  color: #24211c;
  rotate: -0.6deg;
}
.letter p { margin: 0 0 1rem; }
.letterhead {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 1.6rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
  font-family: var(--serif);
}
.letterhead .crest { width: 52px; height: 52px; flex: none; }
.letterhead p { margin: 0; font-size: 0.98rem; line-height: 1.3; letter-spacing: 0.06em; text-transform: uppercase; }
.letterhead span { font-style: italic; letter-spacing: 0; text-transform: none; color: var(--ink-dim); }
.letter .signature {
  margin: 1.6rem 0 0;
  font-size: 1.6rem;
  transform: rotate(-3deg);
  transform-origin: left;
  color: #1f2a44;
}
.letter .sign-role {
  display: inline-block;
  margin: 0;
  padding-top: 4px;
  min-width: 160px;
  border-top: 1px solid var(--rule-strong);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.grades ol {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: grade;
}
.grades li {
  counter-increment: grade;
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  padding: 12px 0;
  border-top: 1px solid var(--rule);
}
.grades li::before {
  content: counter(grade, upper-roman);
  grid-row: span 2;
  font-style: italic;
  color: var(--stamp);
}
.grades b { font-weight: 500; }
.grades span { font-size: 0.98rem; color: var(--ink-dim); }

/* II. instruments */
.kit-table, .register {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.02rem;
}
.kit-table th, .kit-table td, .register th, .register td {
  padding: 12px 14px 12px 0;
  text-align: left;
  vertical-align: baseline;
  border-bottom: 1px solid var(--rule);
}
.kit-table thead th, .register thead th {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  border-bottom: 1px solid var(--rule-strong);
}
.kit-table tbody th { font-weight: 500; width: 26%; }
.kit-table td:nth-child(2) { font-family: var(--mono); font-size: 0.82rem; color: var(--ink-soft); width: 30%; }
.kit-table td:last-child { color: var(--ink-soft); }

/* Plate II: the four lenses, held in place while you scroll */
.lens-track { position: relative; height: 420vh; margin-top: clamp(40px, 6vw, 72px); }
.lens-stage {
  position: sticky;
  top: var(--strip);
  height: calc(100vh - var(--strip));
  height: calc(100svh - var(--strip));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px var(--gutter);
}
.lens-figure {
  width: min(100%, 880px);
  margin: 0;
  padding: 12px 12px 0;
  background: var(--paper-light);
  box-shadow: 0 24px 50px -24px rgba(40, 30, 15, 0.5), 0 2px 6px rgba(40, 30, 15, 0.15);
}
.lens-plate {
  position: relative;
  height: min(64svh, 58vw);
  overflow: hidden;
  background: #000;
}
.lens-pics {
  position: absolute;
  inset: 0;
  transform: scale(var(--zoom, 1));
  transform-origin: 50% 50%;
}
.lens-pic {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 57%;
  opacity: 0;
}
.lens-pic:first-child { opacity: 1; }
.lens-hud {
  position: absolute;
  top: 30px;
  left: 34px;
  right: 34px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--bone-soft);
}
.lens-hud p { margin: 0; white-space: nowrap; }
.emf { display: flex; align-items: center; gap: 8px; }
.emf b { font-weight: 400; color: var(--bone); min-width: 2.2em; text-align: right; }
.emf-bar { display: inline-block; width: 60px; height: 7px; border: 1px solid rgba(233, 226, 210, 0.5); }
.emf-bar i { display: block; height: 100%; width: 5%; background: var(--bone); }
.lens-figure figcaption {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 20px;
  padding: 14px 4px 16px;
}
.plate-title { margin: 0; font-style: italic; font-size: 1.05rem; }
.lens-strip {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.lens-strip li {
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink-dim);
  transition: color 0.3s, background-color 0.3s, border-color 0.3s;
}
.lens-strip li.on { color: var(--paper-light); background: var(--ink); border-color: var(--ink); }
.lens-lines {
  grid-column: 1 / -1;
  position: relative;
  min-height: 1.6em;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 1rem;
  line-height: 1.45;
}
.lens-lines li {
  position: absolute;
  inset: 0 0 auto 0;
  opacity: 0;
  transition: opacity 0.4s;
}
.lens-lines li.on { opacity: 1; }
.after-plate {
  max-width: 40rem;
  margin: 0 auto;
  padding: 18px var(--gutter) 0;
  text-align: center;
  font-style: italic;
  color: var(--ink-dim);
}

html:not(.js) .lens-track { height: auto; }
html:not(.js) .lens-stage { position: relative; height: auto; }
html:not(.js) .lens-pic:last-child { opacity: 1; }
html:not(.js) .lens-lines li { position: static; opacity: 1; }

/* III. the register */
.prints {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 4vw, 48px);
  margin: clamp(24px, 4vw, 40px) 0 clamp(48px, 7vw, 80px);
  padding: 0 clamp(0px, 3vw, 40px);
}
.print {
  margin: 0;
  padding: 10px 10px 0;
  background: #f8f5ee;
  box-shadow: 0 16px 32px -16px rgba(40, 30, 15, 0.5), 0 1px 3px rgba(40, 30, 15, 0.18);
}
.print-photo { aspect-ratio: 4 / 5; overflow: hidden; background: radial-gradient(ellipse at 50% 38%, #333d44, #0b0d0f 78%); }
.print-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 10%; }
.p2 .print-photo img { object-fit: contain; object-position: 50% 100%; padding: 10% 14% 0; }
.print figcaption { padding: 10px 2px 14px; font-size: 0.86rem; line-height: 1.35; color: var(--ink-soft); }
.p1 { rotate: -2.5deg; }
.p2 { rotate: 1.5deg; margin-top: 28px; }
.p3 { rotate: -1deg; margin-top: 8px; }
.s-prints { right: 4%; top: -18px; }
@media (max-width: 640px) { .s-prints { top: 30%; right: 2%; } }

.table-wrap { overflow-x: auto; }
.register caption {
  caption-side: top;
  text-align: left;
  padding-bottom: 10px;
  font-style: italic;
  color: var(--ink-dim);
}
.register .no { font-family: var(--mono); font-size: 0.82rem; color: var(--stamp); width: 3.2rem; }
.register .entry { font-weight: 500; white-space: nowrap; }
.register .cls { font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.04em; color: var(--ink-dim); white-space: nowrap; }
.register .note { color: var(--ink-soft); }
.redact {
  display: inline-block;
  background: var(--ink);
  color: transparent;
  border-radius: 1px;
}
.redact::selection { color: var(--paper-light); background: var(--stamp); }
.table-note { margin: 12px 0 0; font-size: 0.95rem; font-style: italic; color: var(--ink-dim); }

/* IV. sightings */
.sightings {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}
.tower-exhibit .mount { rotate: -1.5deg; }
.night-photo {
  aspect-ratio: 4 / 5;
  background:
    radial-gradient(ellipse 70% 30% at 50% 92%, rgba(150, 170, 190, 0.16), transparent 70%),
    radial-gradient(ellipse at 50% 40%, #151a1f, #050606 75%);
}
.night-photo img {
  position: absolute;
  left: 50%;
  bottom: 7%;
  height: 84%;
  width: auto;
  max-width: none;
  transform: translateX(-50%);
  filter: drop-shadow(0 0 24px rgba(180, 200, 220, 0.2));
}
.gazetteer {
  columns: 2;
  column-gap: 28px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.gazetteer li {
  break-inside: avoid;
  display: flex;
  flex-direction: column;
  padding: 7px 0;
  border-top: 1px solid var(--rule);
  line-height: 1.3;
}
.gazetteer .place { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-dim); }
.gazetteer .who { font-size: 1.02rem; }

.notice {
  position: relative;
  border: 2px solid var(--ink);
  outline: 1px solid var(--ink);
  outline-offset: 4px;
  padding: clamp(20px, 3vw, 30px) clamp(20px, 4vw, 40px);
  background: rgba(245, 241, 231, 0.6);
}
.notice-head {
  margin: 0 0 0.6rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stamp);
}
.notice-foot { margin: 0.8rem 0 0; font-style: italic; color: var(--ink-dim); font-size: 0.98rem; }
.halloween { max-width: 40rem; margin: clamp(48px, 7vw, 80px) auto 0; text-align: center; }
.halloween .notice-body { margin: 0; font-size: clamp(1.5rem, 3.6vw, 2.1rem); line-height: 1.25; }

/* ------------------------------------------------------------------ outside the file: the game */

.game {
  position: relative;
  margin-top: clamp(80px, 12vw, 140px);
  padding: clamp(64px, 10vw, 120px) var(--gutter) clamp(64px, 10vw, 110px);
  background: var(--night);
  color: var(--bone);
  overflow: hidden;
  overflow: clip;
}
.game-inner { max-width: var(--width); margin: 0 auto; text-align: center; }
.out-label {
  display: inline-block;
  margin: 0 0 1.2rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone-dim);
}
.game h2 {
  margin: 0 auto 1rem;
  max-width: 16ch;
  font-weight: 400;
  font-size: clamp(2.2rem, 5.4vw, 3.6rem);
  line-height: 1.03;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.game-lede { max-width: 34rem; margin: 0 auto; font-size: 1.2rem; color: var(--bone-soft); }

.phones {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(16px, 4vw, 56px);
  margin: clamp(48px, 8vw, 88px) 0 clamp(40px, 6vw, 64px);
}
.device { position: relative; flex: none; }
.device-caption {
  margin: 16px 0 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone-dim);
}
.d-room { margin-top: 48px; }
.phone {
  --w: clamp(150px, 22vw, 260px);
  position: relative;
  width: var(--w);
  aspect-ratio: 1206 / 2622;
  padding: calc(var(--w) * 0.034);
  border-radius: calc(var(--w) * 0.165);
  background: linear-gradient(150deg, #2b2d2d, #0f1111 38%, #1c1e1e);
  box-shadow: 0 0 0 1px rgba(233, 226, 210, 0.16), 0 50px 90px -30px rgba(0, 0, 0, 0.95);
  text-align: left;
}
.screen {
  position: relative;
  height: 100%;
  border-radius: calc(var(--w) * 0.135);
  overflow: hidden;
  background: #000;
  isolation: isolate;
}
.screen::after {           /* the island */
  content: "";
  position: absolute;
  top: 1.9%;
  left: 50%;
  width: 31%;
  height: 3.4%;
  transform: translateX(-50%);
  border-radius: 99px;
  background: #000;
  z-index: 5;
}
.shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;
  opacity: 0;
  transition: opacity 0.5s;
  z-index: 2;
}
.has-shot .shot { opacity: 1; }
.standin { position: absolute; inset: 0; overflow: hidden; color: var(--bone); }

.standin-map { background: #0a0d0e; }
.standin-map .streets {
  position: absolute;
  left: -70%;
  top: -40%;
  width: 240%;
  height: 180%;
  max-width: none;
  object-fit: cover;
}
.sig, .standin-map .you {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
}
.sig { background: var(--tungsten); box-shadow: 0 0 12px rgba(243, 192, 122, 0.75); }
.sig::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(243, 192, 122, 0.7);
  animation: ping 2.6s ease-out infinite;
}
.sig.strong { background: var(--rec); box-shadow: 0 0 14px rgba(255, 74, 28, 0.85); }
.sig.strong::after { border-color: rgba(255, 74, 28, 0.75); animation-duration: 1.8s; }
@keyframes ping { from { transform: scale(0.4); opacity: 1; } to { transform: scale(2.3); opacity: 0; } }
.standin-map .you { background: var(--bone); box-shadow: 0 0 0 4px rgba(233, 226, 210, 0.2), 0 0 0 9px rgba(233, 226, 210, 0.07); }
.standin-map .sheet {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 4%;
  margin: 0;
  padding: 0.6em 0.75em;
  border-radius: calc(var(--w) * 0.07);
  background: rgba(14, 16, 16, 0.94);
  border: 1px solid var(--line);
  font-size: calc(var(--w) * 0.052);
  line-height: 1.3;
}
.standin-map .sheet span {
  display: block;
  margin-bottom: 0.15em;
  font-family: var(--mono);
  font-size: 0.7em;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rec);
}

.standin-room { background: #07060c; }
.standin-room .room-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.standin .vf { position: absolute; inset: 9% 7% 11%; }
.standin .vf i { position: absolute; width: 12%; aspect-ratio: 1; border: 0 solid rgba(233, 226, 210, 0.7); }
.standin .vf i:nth-child(1) { top: 0; left: 0; border-top-width: 1.5px; border-left-width: 1.5px; }
.standin .vf i:nth-child(2) { top: 0; right: 0; border-top-width: 1.5px; border-right-width: 1.5px; }
.standin .vf i:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.standin .vf i:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 1.5px; border-right-width: 1.5px; }
.hud-top, .hud-bottom {
  position: absolute;
  left: 10%;
  margin: 0;
  font-family: var(--mono);
  font-size: calc(var(--w) * 0.038);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone-soft);
}
.hud-top { top: 10.5%; display: flex; align-items: center; gap: 5px; }
.hud-top::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--rec); }
.hud-bottom { bottom: 12.5%; display: flex; align-items: center; gap: 2px; }
.hud-bottom b { width: 3px; height: 8px; background: var(--bone); }
.hud-bottom b:first-of-type { margin-left: 5px; }
.hud-bottom b.off { background: rgba(233, 226, 210, 0.25); margin-right: 5px; }

.standin-evidence {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.6%;
  padding: 16% 10% 10%;
  text-align: center;
  background: radial-gradient(ellipse at 50% 30%, #1b1e1f, #070808 75%);
}
.standin-evidence p {
  margin: 0;
  font-family: var(--mono);
  font-size: calc(var(--w) * 0.038);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone-dim);
}
.print-mini {
  width: 100%;
  aspect-ratio: 4 / 5;
  margin: 3% 0 4%;
  padding: 5% 5% 15%;
  background: #e6e0d2;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.6);
  transform: rotate(-2deg);
}
.print-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 8%;
  background: radial-gradient(ellipse at 50% 35%, #39434a, #0e1113 80%);
}
.standin-evidence .grade { display: flex; align-items: center; gap: 0.5em; color: var(--bone); }
.standin-evidence .grade span { font-family: var(--serif); font-size: calc(var(--w) * 0.13); line-height: 1; letter-spacing: 0; text-transform: none; }

.game-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 2rem;
  padding: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
}
.game-facts li { padding: 0.35rem 0.7rem; border: 1px solid var(--line); border-radius: 3px; color: var(--bone-soft); }

.cta { display: flex; justify-content: center; }
.soon {
  margin: 0;
  padding: 0.8rem 1.3rem;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-size: 1.125rem;
}
.game .soon { color: var(--bone); border-color: rgba(233, 226, 210, 0.55); }
.badge img { height: 54px; width: auto; }

/* V. field safety */
.safety { max-width: 44rem; }
.safety ol { margin: 0; padding-left: 1.3rem; }
.safety li { margin: 0.5rem 0; padding-left: 0.3rem; }
.safety li::marker { font-family: var(--mono); font-size: 0.85rem; color: var(--stamp); }
.warning { max-width: 44rem; margin: 1.6rem 0 0; font-size: 1rem; color: var(--ink-dim); }

/* VI. applications */
.form {
  position: relative;
  max-width: 46rem;
  padding: clamp(22px, 4vw, 40px);
  background: var(--paper-light);
  box-shadow: 0 20px 40px -24px rgba(40, 30, 15, 0.45), 0 1px 3px rgba(40, 30, 15, 0.15);
}
.form-head {
  margin: 0 0 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.form-fields {
  display: grid;
  grid-template-columns: minmax(9rem, max-content) minmax(0, 1fr);
  margin: 0;
}
.form-fields dt, .form-fields dd {
  padding: 10px 0;
  border-bottom: 1px dotted var(--rule-strong);
}
.form-fields dt {
  padding-right: 18px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  line-height: 2.1;
}
.form-fields dd { margin: 0; font-family: var(--type); font-size: 1.02rem; line-height: 1.5; }
.form-foot { margin-top: 1.8rem; }
.form-foot .cta { justify-content: flex-start; }
.s-form { right: 5%; top: 78px; }
.s-form .stamp { transform: rotate(-12deg); font-size: 1.3rem; }

/* ------------------------------------------------------------------ footer (outside the fiction) */

.foot {
  margin-top: clamp(64px, 10vw, 120px);
  padding: 28px var(--gutter) 40px;
  background: var(--night);
  color: var(--bone-dim);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  font-size: 0.95rem;
}
.foot p { margin: 0; max-width: 40rem; }
.foot b { color: var(--bone); font-weight: 500; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot a { color: var(--bone-dim); }
.foot a:hover { color: var(--bone); }

/* ------------------------------------------------------------------ inner pages (support, privacy, press) */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px var(--gutter);
  border-bottom: 4px double var(--rule-strong);
}
.top a { text-decoration: none; }
.top .mark { display: flex; align-items: center; gap: 12px; font-size: 1.5rem; letter-spacing: -0.02em; }
.top .mark img { width: 34px; height: 34px; border-radius: 8px; }
.top nav { display: flex; gap: 18px; font-size: 1rem; }
.top nav a { color: var(--ink-dim); }
.top nav a[aria-current="page"] { color: var(--ink); }

.doc { padding: clamp(40px, 8vw, 88px) var(--gutter) 24px; }
.doc > * { max-width: 38rem; }
.doc h1 {
  margin: 0 0 0.5rem;
  font-weight: 400;
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.doc .lede { margin: 0 0 2.5rem; }
.doc h2 { margin: 2.75rem 0 0.6rem; font-weight: 500; font-size: 1.45rem; line-height: 1.2; }
.doc h3 { margin: 1.75rem 0 0.35rem; font-weight: 500; font-size: 1.15rem; }
.doc p, .doc li { color: var(--ink-soft); }
.doc ul { padding-left: 1.2rem; }
.doc li { margin: 0.35rem 0; }
.doc .updated { color: var(--ink-dim); font-size: 0.95rem; }
.doc .contact { display: inline-block; margin-top: 0.25rem; font-size: 1.35rem; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.5rem; margin: 1.5rem 0 0; }
.facts dt { color: var(--ink-dim); }
.facts dd { margin: 0; }
.assets { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 1rem; }
.assets figure { margin: 0; width: 180px; }
.assets img { width: 180px; height: 180px; object-fit: cover; border-radius: 6px; border: 1px solid var(--rule); }
.assets figcaption { margin-top: 0.4rem; font-size: 0.95rem; color: var(--ink-dim); }

/* ------------------------------------------------------------------ words arriving, and smaller screens */

.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s ease, transform 1.1s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .masthead { grid-template-columns: auto minmax(0, 1fr); }
  .mast-nav { grid-column: 1 / -1; justify-content: flex-start; }
  .hero, .institute, .sightings { grid-template-columns: 1fr; }
  .hero-exhibit { max-width: 460px; justify-self: center; width: 100%; }
  .tower-exhibit { max-width: 380px; justify-self: center; width: 100%; }
}

@media (max-width: 640px) {
  :root { --strip: 52px; }
  .strip { font-size: 0.86rem; }
  .crest { width: 60px; height: 60px; }
  .mast-title { font-size: 1.15rem; letter-spacing: 0.08em; }
  .mast-title span { font-size: 0.98rem; }
  .mast-nav { gap: 6px 16px; font-size: 0.66rem; }
  .sec-head { grid-template-columns: auto minmax(0, 1fr); }
  .sec-note { grid-column: 2; }
  .lede { font-size: 1.18rem; }
  .s-hero { right: -6px; bottom: 24%; }
  .stamp { font-size: 1rem; }
  .kit-table thead { display: none; }
  .kit-table tr { display: grid; grid-template-columns: 1fr; padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .kit-table th, .kit-table td { width: auto !important; padding: 2px 0; border: 0; }
  .lens-plate { height: min(56svh, 120vw); }
  .lens-hud { top: 26px; left: 28px; right: 28px; font-size: 0.62rem; letter-spacing: 0.04em; }
  .emf-bar { width: 36px; }
  .lens-figure figcaption { grid-template-columns: 1fr; }
  .plate-title { font-size: 0.98rem; }
  .lens-strip { font-size: 0.6rem; }
  .lens-lines { min-height: 2.9em; font-size: 0.95rem; }
  .prints { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0; }
  .p3 { display: none; }
  .p2 { margin-top: 36px; }
  .register thead { display: none; }
  .register tr { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); padding: 10px 0; border-bottom: 1px solid var(--rule); }
  .register td { padding: 1px 0; border: 0; }
  .register .no { grid-row: span 3; }
  .register .entry, .register .cls { white-space: normal; }
  .gazetteer { column-gap: 18px; }
  .gazetteer .who { font-size: 0.95rem; }
  .gazetteer .place { font-size: 0.6rem; }
  .phones { gap: 0; margin-left: -10px; margin-right: -10px; }
  .phone { --w: 31vw; }
  .d-map { margin-right: -4vw; z-index: 1; }
  .d-room { z-index: 2; margin-top: 28px; }
  .d-evidence { margin-left: -4vw; z-index: 1; }
  .device-caption { font-size: 0.6rem; }
  .form-fields { grid-template-columns: 1fr; }
  .form-fields dt { border-bottom: 0; padding-bottom: 0; line-height: 1.6; }
  .form-fields dd { padding-top: 2px; }
}

/* the waiting list */
.waitlist { width: 100%; max-width: 34rem; }
.waitlist-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 8px;
}
.waitlist-row { display: flex; gap: 10px; flex-wrap: wrap; }
.waitlist input[type=email] {
  flex: 1 1 14rem;
  min-width: 0;
  font: 1.05rem var(--type);
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--rule-strong);
  border-radius: 0;
  padding: 10px 2px;
  -webkit-appearance: none;
  appearance: none;
}
.waitlist input[type=email]:focus { outline: none; border-bottom-color: var(--ink); }
.waitlist input::placeholder { color: var(--ink-dim); opacity: 0.6; }
.waitlist .button { flex: 0 0 auto; cursor: pointer; border: 0; font-family: var(--serif); font-size: 1.05rem; }
.waitlist .button:disabled { background: var(--stamp); cursor: default; }
.waitlist-note { margin: 10px 0 0; font-size: 0.86rem; color: var(--ink-dim); }
.waitlist-note a { color: inherit; }
.waitlist-frame { position: absolute; width: 0; height: 0; border: 0; visibility: hidden; }
a.soon { text-decoration: none; }

/* phones: a lighter masthead, the strip scrolls away, and Plate II takes less scrolling */
@media (max-width: 640px) {
  .strip { position: relative; }
  .strip-more { display: none; }
  .lens-stage { top: 0; height: 100vh; height: 100svh; }
  .lens-track { height: 300vh; }
  .mast-nav { display: none; }
  .mast-dept { display: none; }
  .masthead { padding-top: 14px; padding-bottom: 14px; }
  .waitlist-row { flex-direction: column; }
  .waitlist input[type=email] { flex: none; }
  .waitlist .button { width: 100%; }
  .s-form { top: -22px; right: -6px; }
}

@media (prefers-reduced-motion: reduce) {
  .rec::before, .sig::after { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .lens-lines li, .lens-strip li { transition: none; }
}
