:root {
  --black: #000;
  --void: #050506;
  --ink: #0e0e11;
  --bone: #ece8de;
  --paper: #e7e1d3;
  --paper-2: #d8d0bd;
  --cobalt: #1f33ff;
  --cobalt-hot: #3f55ff;
  --cobalt-deep: #0b1cb8;
  --cobalt-ink: #001880;
  --uv: #5a2bff;
  --uv-deep: #150a30;
  --lilac: #b9abff;
  --grey-1: #8b8984;
  --grey-2: #55545a;
  --grey-3: #2a2a2e;
  --os-grey: #c5c3bd;
  --phosphor: #9fdcae;
  --phosphor-blue: #b7d7ff;

  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --f-bit: "VT323", "IBM Plex Mono", ui-monospace, monospace;
  --f-fell: "IM Fell English", "Iowan Old Style", "Times New Roman", serif;
  --f-read: "Newsreader", "Iowan Old Style", Georgia, serif;
  --f-hand: "Reenie Beanie", "Bradley Hand", "Segoe Print", cursive;

  --bg: var(--void);
  --fg: var(--bone);
  --dim: var(--grey-1);
  --accent: var(--cobalt);
  --line: rgba(236, 232, 222, .14);
  --grain: .07;
  --grain-blend: overlay;
  --sel-bg: var(--cobalt);
  --sel-fg: var(--bone);

  --gutter: clamp(16px, 4vw, 48px);
  --ease-out: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-mono);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video, canvas, iframe { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--sel-bg); color: var(--sel-fg); }
main:focus { outline: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; z-index: 1000; left: 12px; top: -60px;
  padding: 8px 12px; background: var(--cobalt); color: var(--bone);
  font: 13px var(--f-mono); text-decoration: none;
}
.skip:focus { top: 12px; }

.px { image-rendering: pixelated; }
.px .px-i { fill: currentColor; }
.px .px-f { fill: var(--px-fill, transparent); }
.px .px-a { fill: var(--px-accent, var(--accent)); }

.strip {
  position: relative;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  min-height: 36px;
  padding: 6px var(--gutter);
  border-bottom: 1px solid var(--line);
  font: 12px/1.2 var(--f-mono);
  letter-spacing: .02em;
  color: var(--strip-fg, var(--fg));
  background: var(--strip-bg, transparent);
}
.strip a { text-decoration: none; }
.strip-mark { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.strip-mark .px { width: 15px; height: auto; --px-fill: transparent; }
.strip-path { color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip-path i { font-style: normal; margin: 0 .5em; opacity: .5; }
.strip-path a:hover { color: var(--fg); }
.strip-nav { display: flex; gap: 2px; }
.strip-nav a { padding: 3px 7px; color: var(--dim); }
.strip-nav a:hover, .strip-nav a:focus-visible { color: var(--sel-fg); background: var(--accent); outline: none; }
.strip-nav a[aria-current="page"] { color: var(--fg); box-shadow: inset 0 -1px 0 currentColor; }

@media (max-width: 760px) {
  .strip { grid-template-columns: 1fr; gap: 6px; padding-top: 10px; padding-bottom: 8px; }
  .strip-path { display: none; }
  .strip-nav { flex-wrap: wrap; margin-left: -7px; }
}

.fx-grain {
  position: fixed; inset: -50%; z-index: 9000; pointer-events: none;
  opacity: var(--grain);
  mix-blend-mode: var(--grain-blend);
  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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(5) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -4%); }
  60% { transform: translate(-4%, -1%); }
  80% { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

.fx-scan { position: relative; }
.fx-scan::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, var(--scan, .28)) 2px 3px);
  mix-blend-mode: multiply;
}

.caret { display: inline-block; animation: blink 1.06s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.notice {
  position: fixed; z-index: 800; right: 16px; bottom: 16px;
  max-width: min(320px, calc(100vw - 32px));
  padding: 10px 12px 11px;
  border: 1px solid currentColor;
  background: var(--notice-bg, var(--void));
  color: var(--notice-fg, var(--bone));
  font: 12px/1.45 var(--f-mono);
  box-shadow: 4px 4px 0 var(--cobalt);
  animation: notice-in .25s var(--ease-out) both;
}
.notice b { display: block; margin-bottom: 3px; font: 17px/1 var(--f-bit); letter-spacing: .04em; color: var(--lilac); }
.notice button { position: absolute; top: 4px; right: 6px; padding: 0 4px; border: 0; background: none; line-height: 1; }
.notice.out { animation: notice-out .3s ease-in both; }
@keyframes notice-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes notice-out { to { opacity: 0; transform: translateY(4px); } }

.leaving main, .leaving .desk { animation: leave .32s ease-in forwards; }
@keyframes leave {
  0% { opacity: 1; filter: none; }
  40% { transform: scaleY(1.01); filter: brightness(1.4) contrast(1.2); }
  100% { opacity: 0; transform: scaleY(.003); filter: brightness(3); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .fx-grain { animation: none; }
}

.thanks { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 16px; background: rgba(5, 5, 6, .72); }
.thanks-card {
  width: min(520px, 100%); max-height: 86svh; overflow: auto; padding: 26px 28px 22px;
  background: var(--paper); color: #17171a; border: 1px solid #000; box-shadow: 8px 8px 0 rgba(0, 0, 0, .6);
}
.thanks-from { margin: 0 0 14px; font: 11px var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--grey-2); }
.thanks-body { font: 18px/1.6 var(--f-read); }
.thanks-body a { color: var(--cobalt); }
.thanks-close { margin-top: 18px; padding: 8px 16px; border: 1px solid #17171a; background: none; color: #17171a; font: 12px var(--f-mono); cursor: pointer; }
.thanks-close:hover, .thanks-close:focus-visible { background: #17171a; color: var(--paper); outline: none; }

@media print {
  .fx-grain, .strip, .notice, .skip { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  body::after {
    content: "prompt copy - not for the cast - /rehearsal";
    display: block; margin-top: 3em; padding-top: .6em; border-top: 1px solid #000;
    font: 9pt "IBM Plex Mono", monospace; letter-spacing: .08em; color: #555;
  }
}
