/* Public styles (placeholder look until Marc picks a mockup direction) + shared form/button basics used by
   the admin too. Self-hosted fonts, no inline styles anywhere (strict CSP). The admin and sign-in cards use the
   light tokens in :root; public pages (body.pub) switch to the dark "motel at night" tokens. */
@font-face { font-family: 'Serif4'; src: url('/fonts/serif.woff2') format('woff2'); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Serif4'; src: url('/fonts/serif-italic.woff2') format('woff2'); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'Typewriter'; src: url('/fonts/typewriter.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url('/fonts/mono-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url('/fonts/mono-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Marker'; src: url('/fonts/marker.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Bebas'; src: url('/fonts/bebas.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Hand'; src: url('/fonts/hand-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Hand'; src: url('/fonts/hand-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --bg: #F3F1EC; --paper: #FFFFFF; --ink: #1C1A17; --ink-2: #3E3A33; --muted: #6A645A;
  --line: #E2DDD3; --line-2: #EFEBE3;
  --accent: #A3322A; --accent-dark: #7E241E; --accent-tint: #F6E6E3; --accent-ink: #FFFFFF;
  --ok: #2F7D4F; --ok-tint: #E4F2E8; --warn: #8A5300; --warn-tint: #FCF0D9; --bad: #B4400B; --bad-tint: #FDEBD8;
  --glow: #39FF88;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 10px 28px rgba(0,0,0,.08);
  --radius: 10px;
  --f-body: 'Serif4', Georgia, 'Times New Roman', serif;
  --f-ui: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-type: 'Typewriter', 'Courier New', monospace;
  --f-mono: 'Plex Mono', ui-monospace, Consolas, monospace;
}
body.pub {
  --bg: #15120F; --paper: #211C17; --ink: #EDE6D6; --ink-2: #CFC6B2; --muted: #9C927E;
  --line: #3A3229; --line-2: #2A241E;
  --accent: #E0533F; --accent-dark: #F07A62; --accent-tint: #3A1E19; --accent-ink: #1A0F0C;
  --ok-tint: #1D3325; --warn-tint: #3A2C12; --bad-tint: #3E2216;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 14px 34px rgba(0,0,0,.45);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 1.0625rem; line-height: 1.6; }
img, svg { max-width: 100%; }
a { color: var(--accent-dark); text-underline-offset: .18em; }
a:hover { color: var(--ink); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); }
h2 { font-size: 1.3rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
code { font-family: var(--f-mono); font-size: .9em; background: var(--line-2); padding: .05em .35em; border-radius: 4px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.fine { font-size: .86rem; color: var(--muted); font-family: var(--f-ui); }
.eyebrow { font-family: var(--f-type); font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-dark); margin: 0 0 .5rem; }
.lede { font-size: 1.18rem; color: var(--ink-2); max-width: 42rem; }
.stack { display: flex; flex-direction: column; gap: .9rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg); padding: .6rem 1rem; z-index: 50; }
.skip:focus { left: 8px; top: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- buttons, chips, messages */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; white-space: nowrap; min-height: 44px; padding: 0 1.05rem; border-radius: var(--radius); border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); font: 600 .97rem var(--f-ui); text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); color: var(--accent-ink); }
.btn.small { min-height: 38px; padding: 0 .85rem; font-size: .9rem; }
.btn.block { width: 100%; }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn.danger:hover { background: var(--bad); color: #fff; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-dark); text-decoration: underline; cursor: pointer; }
.ic { flex: none; }
.chip { display: inline-block; font: 700 .74rem var(--f-ui); letter-spacing: .03em; padding: .14rem .55rem; border-radius: 999px; background: var(--line-2); color: var(--ink-2); vertical-align: middle; }
.chip.ok { background: var(--ok-tint); color: var(--ok); }
.chip.warn { background: var(--warn-tint); color: var(--warn); }
.chip.bad { background: var(--bad-tint); color: var(--bad); }
body.pub .chip.ok { color: #7FD39C; } body.pub .chip.warn { color: #F2C46B; } body.pub .chip.bad { color: #F49A7A; }
.form-err, .form-ok, .notice { border-radius: var(--radius); padding: .75rem 1rem; margin: 0 0 1rem; font-family: var(--f-ui); font-size: .95rem; }
.form-err { background: var(--bad-tint); color: var(--bad); border: 1px solid currentColor; }
.form-ok { background: var(--ok-tint); color: var(--ok); border: 1px solid currentColor; }
body.pub .form-err { color: #F49A7A; } body.pub .form-ok { color: #7FD39C; }
.notice { background: var(--line-2); color: var(--ink-2); }
.draft { display: inline-block; font: 700 .8rem var(--f-ui); color: var(--warn); background: var(--warn-tint); border-radius: 6px; padding: .2rem .6rem; }

/* ---------- form fields */
.field { display: flex; flex-direction: column; gap: .35rem; font-family: var(--f-ui); }
.field > span { font-weight: 700; font-size: .93rem; }
.field small { color: var(--muted); font-size: .84rem; }
.field input, .field textarea, .field select { font: 1rem var(--f-ui); color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: 8px; padding: .65rem .75rem; min-height: 44px; width: 100%; }
.field textarea { min-height: 8rem; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); outline: none; }
.check { display: flex; gap: .55rem; align-items: flex-start; font-family: var(--f-ui); }
.check input { width: 20px; height: 20px; margin-top: .15rem; }
.choice { border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; display: grid; gap: .7rem; margin: 0; }
.choice legend { font: 700 .93rem var(--f-ui); padding: 0 .3rem; }

/* ---------- header and footer */
/* the header stays pinned at the top while you scroll, on every screen; jumps to #anchors stop just below it */
.top { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 40; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
html { scroll-padding-top: 84px; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: .8rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); }
.brand .mark { color: var(--accent); }
.brand .logo { display: block; height: 46px; width: auto; filter: drop-shadow(0 2px 3px rgba(0,0,0,.45)); }
.foot .brand .logo { height: 40px; }
@media (max-width: 640px) { .brand .logo { height: 40px; } }
.wordmark { font-family: var(--f-type); font-size: 1.2rem; letter-spacing: .02em; white-space: nowrap; }
.top-a { display: flex; align-items: center; gap: .5rem; }
.top-nav { display: flex; gap: .2rem; }
.top-nav a { font: 600 .93rem var(--f-ui); color: var(--ink-2); text-decoration: none; padding: .5rem .6rem; border-radius: 8px; }
.top-nav a:hover, .top-nav a.on { color: var(--ink); background: var(--line-2); }
@media (max-width: 640px) { .top-nav { display: none; } .wordmark { font-size: 1.05rem; } }
.nudge { background: var(--warn-tint); color: var(--ink); font: .92rem var(--f-ui); padding: .6rem 0; }
.foot { margin-top: 4rem; border-top: 1px solid var(--line); padding: 2rem 0 2.5rem; font-family: var(--f-ui); }
.foot-in { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.foot-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.foot-links a { color: var(--ink-2); }
main { min-height: 50vh; }

/* ---------- placeholder home: the wall of pinned items + the laptop */
.page-head { padding-top: 2.2rem; padding-bottom: 1.2rem; }
.placeholder-note { font: .9rem var(--f-ui); border: 1px dashed var(--line); color: var(--muted); border-radius: var(--radius); padding: .7rem 1rem; margin: 0 0 1.5rem; }
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 1rem; }
.pin { position: relative; display: block; background: #E9DFC9; color: #2A241D; text-decoration: none; padding: 1.1rem 1rem 1rem; border-radius: 3px; box-shadow: var(--shadow); transform: rotate(-1.2deg); }
.pin:nth-child(2n) { transform: rotate(1.4deg); background: #DCE3D3; }
.pin:nth-child(3n) { transform: rotate(-.4deg); background: #EAD9CF; }
.pin:hover { transform: rotate(0) scale(1.02); color: #000; }
.pin::before { content: ''; position: absolute; top: -7px; left: calc(50% - 7px); width: 14px; height: 14px; border-radius: 50%; background: #C0392B; box-shadow: 0 2px 3px rgba(0,0,0,.4); }
.pin b { display: block; font-family: var(--f-type); font-size: 1.12rem; margin-bottom: .3rem; }
.pin span { font-size: .93rem; line-height: 1.4; }
.pin .count { display: block; margin-top: .6rem; font: 700 .78rem var(--f-ui); opacity: .7; }
.laptop { display: block; margin-top: 2rem; background: #0B0F0C; border: 10px solid #3B3F38; border-radius: 12px; padding: 1.1rem 1.2rem; color: var(--glow); font-family: var(--f-mono); text-decoration: none; text-shadow: 0 0 6px rgba(57,255,136,.55); }
.laptop:hover { color: #9CFFC4; }
.laptop .cursor { display: inline-block; width: .6em; height: 1.1em; background: currentColor; vertical-align: text-bottom; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .laptop .cursor { animation: none; } .pin, .pin:hover { transform: none; } }

/* ---------- the topics wall (/topics): a manila file folder per topic (src/views/folders.js). Papers stick out of the
   top and sides from between the back and the front, rubber stamps on the front, a technical drawing clipped to it. */
.folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 3.4rem 2rem; padding: 2rem 12px 1rem; }
.folder { position: relative; display: block; color: #2a2116; text-decoration: none; transition: transform .2s ease; }
.folder.tilt1 { transform: rotate(-1.1deg); } .folder.tilt2 { transform: rotate(.9deg); } .folder.tilt3 { transform: rotate(-.4deg); } .folder.tilt4 { transform: rotate(1.5deg); }
.folder:hover, .folder:focus-visible { transform: translateY(-5px) rotate(0); color: #000; }
.f-back { position: absolute; inset: 0; background: #b8914f; border-radius: 3px 6px 4px 4px; box-shadow: 0 10px 26px rgba(0,0,0,.5); }
.f-tab { position: absolute; top: -21px; left: 7%; width: 42%; height: 24px; padding: 3px 0 0 .7rem; background: #b8914f; border-radius: 8px 8px 0 0; z-index: 1; font: .72rem var(--f-type); letter-spacing: .06em; color: #3b2c15; white-space: nowrap; overflow: hidden; }
.tab2 .f-tab { left: 30%; } .tab3 .f-tab { left: 52%; }
.f-paper { position: absolute; background: #f4f0e4; box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: translate .25s ease; }
.folder:hover .f-paper, .folder:focus-visible .f-paper { translate: 0 -6px; }
.f-paper.pa { top: -13px; left: 9%; width: 70%; height: 60%; transform: rotate(-2deg); background: #f6f3ea repeating-linear-gradient(transparent 0 9px, rgba(70,110,170,.35) 9px 10px); }
.f-paper.pb { top: -7px; right: -11px; width: 58%; height: 70%; transform: rotate(3deg); background: #f1e49b repeating-linear-gradient(transparent 0 8px, rgba(90,120,160,.35) 8px 9px); }
.f-paper.pc { top: 22%; left: -10px; width: 50%; height: 52%; transform: rotate(-4deg); background: #fbfaf6 repeating-linear-gradient(transparent 0 6px, rgba(60,55,45,.35) 6px 7px, transparent 7px 12px); }
.f-paper.pd { top: -20px; left: 36%; width: 30%; height: 28%; transform: rotate(5deg); border: 5px solid #f1eee6; background: linear-gradient(160deg, #6b7076, #2a2e31); }
.f-paper.pe { top: 34%; right: -13px; width: 40%; height: 40%; transform: rotate(6deg); background: #f0d3cd repeating-linear-gradient(transparent 0 7px, rgba(150,60,60,.25) 7px 8px); }
.f-paper.pf { top: -10px; left: 48%; width: 46%; height: 50%; transform: rotate(-1.2deg); background-color: #2f5d8c; background-image: linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px); background-size: 8px 8px; }
.f-paper.pg { bottom: 16%; left: -8px; width: 32%; height: 24%; transform: rotate(8deg); background: #fff linear-gradient(transparent 7px, #c94a3f 7px 8px, transparent 8px); }
.f-front { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; padding: 1rem 1rem 1.1rem; min-height: 100%; border-radius: 3px 3px 4px 4px; background: #d8b878 linear-gradient(175deg, rgba(255,255,255,.18), rgba(0,0,0,.06) 60%, rgba(0,0,0,.12)); box-shadow: 0 -1px 0 rgba(255,255,255,.25) inset, 0 2px 4px rgba(0,0,0,.25); }
.f-front::after { content: ''; position: absolute; left: 0; right: 0; bottom: 14px; border-top: 1px solid rgba(80,55,20,.25); }
.f-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem .8rem; align-self: stretch; }
.f-name { padding: .3rem .65rem; background: #f7f3e8; border: 1px solid rgba(0,0,0,.18); color: #120d07; font: 400 1.18rem/1.22 var(--f-type); -webkit-text-stroke: .6px currentColor; letter-spacing: .01em; transform: rotate(-.6deg); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.f-sheet { position: relative; align-self: stretch; padding: 5px; background-color: #f3f5f2; background-image: linear-gradient(rgba(60,110,160,.13) 1px, transparent 1px), linear-gradient(90deg, rgba(60,110,160,.13) 1px, transparent 1px); background-size: 9px 9px; box-shadow: 0 1px 3px rgba(0,0,0,.3); transform: rotate(.5deg); }
.f-sheet::before { content: ''; position: absolute; top: -9px; left: 18px; width: 11px; height: 30px; border: 2px solid #8b9298; border-radius: 6px; }
.f-blurb { font-size: .92rem; line-height: 1.4; }
.f-count { margin-bottom: .3rem; padding: .05rem .45rem; border: 2px solid currentColor; color: #8e2a20; font: .78rem var(--f-type); letter-spacing: .06em; text-transform: uppercase; transform: rotate(-3deg); opacity: .85; }
.stk { flex: none; margin-left: auto; padding: .02rem .4rem 0; font: 400 .9rem/1.2 'Bebas', var(--f-ui); letter-spacing: .14em; white-space: nowrap; pointer-events: none; color: var(--ink-stamp); border: 2px solid currentColor; border-radius: 2px; opacity: .78; mix-blend-mode: multiply; }
/* rubber stamps: red, blue or violet ink, single or double border; they sit beside the title and the story count, inside the folder, clear of the drawing */
.s-red { --ink-stamp: #a3221a; } .s-red2 { --ink-stamp: #a3221a; border-style: double; border-width: 3px; }
.s-blue { --ink-stamp: #1f3f7a; } .s-violet { --ink-stamp: #5a2a72; border-style: double; border-width: 3px; }
.stk.k1 { transform: rotate(5deg); }
.stk.k2 { margin-bottom: .3rem; transform: rotate(-5deg); }
/* the drawing: blue-black ink, centre lines, dimension lines and small capitals, like a draughtsman's sheet */
.f-draw { display: block; width: 100%; height: auto; color: #1f3550; fill: none; stroke: currentColor; stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; }
.f-draw .th { stroke-width: .55; }
.f-draw .cl { stroke-width: .5; stroke-dasharray: 8 2.5 1.5 2.5; }
.f-draw .da { stroke-width: .7; stroke-dasharray: 3 2.5; }
.f-draw .gr { stroke-width: .4; opacity: .5; }
.f-draw .fi { fill: currentColor; stroke: none; }
.f-draw .red { color: #a3221a; }
.f-draw text { fill: currentColor; stroke: none; font: 6.4px var(--f-mono); letter-spacing: .02em; }
.f-draw .tt { font-size: 7.4px; font-weight: 600; }
/* ---------- pull a random file (/random, src/views/roll.js + public/js/roll.js): the folders spin on a ring, then one
   opens on the story. Without the script the open folder is simply there (the cover and the ring stay hidden). */
.roll-head { padding-bottom: .4rem; }
.roll-stage { position: relative; height: 270px; margin: 0 -16px; perspective: 1100px; overflow: hidden; cursor: pointer; }
.roll-ring { position: absolute; left: 50%; top: 34px; width: 0; height: 0; transform-style: preserve-3d; }
.rc { position: absolute; left: -95px; top: 0; width: 190px; backface-visibility: hidden; }
.rc-tab { display: inline-block; margin-left: 14px; padding: 2px .6rem 0; background: #b8914f; border-radius: 6px 6px 0 0; font: .64rem var(--f-type); letter-spacing: .06em; color: #3b2c15; }
.rc-front { display: flex; flex-direction: column; align-items: flex-start; gap: .45rem; padding: .55rem; border-radius: 3px; background: #d8b878 linear-gradient(175deg, rgba(255,255,255,.18), rgba(0,0,0,.1)); box-shadow: 0 6px 16px rgba(0,0,0,.55); transition: box-shadow .3s; }
.rc .f-name { padding: .12rem .45rem; font-size: .82rem; }
.rc .f-sheet { padding: 3px; } .rc .f-sheet::before { top: -6px; height: 20px; width: 8px; }
.rc.picked .rc-front { box-shadow: 0 0 0 3px #e9c46a, 0 0 28px rgba(233,196,106,.7); }
.roll.rolling .open-file, .roll.rolling .roll-nav, .roll.rolling .roll-actions { display: none; }
.open-file { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); margin-top: .6rem; padding: 14px; background: #b8914f; border-radius: 6px; box-shadow: 0 12px 30px rgba(0,0,0,.5); color: #2a2116; perspective: 1800px; }
.of-left { display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; padding: 1rem; border-radius: 3px 0 0 3px; background: #d8b878 linear-gradient(175deg, rgba(255,255,255,.15), rgba(0,0,0,.08)); box-shadow: inset -10px 0 14px -10px rgba(0,0,0,.4); }
.of-left .f-sheet { align-self: stretch; }
.of-tab { font: .74rem var(--f-type); letter-spacing: .08em; color: #3b2c15; }
.of-right { margin: 6px 4px 6px -2px; padding: 1.3rem 1.4rem; background: #f6f2e7 repeating-linear-gradient(transparent 0 27px, rgba(70,110,170,.16) 27px 28px); color: #1d1812; box-shadow: 0 1px 4px rgba(0,0,0,.3); transform: rotate(.4deg); }
.of-right h2 { margin: .2rem 0 .7rem; font: 400 1.55rem/1.25 var(--f-type); -webkit-text-stroke: .4px currentColor; }
.of-right h2 a { color: inherit; text-decoration: none; } .of-right h2 a:hover { text-decoration: underline; }
.of-kicker { margin: 0; font: .76rem var(--f-type); letter-spacing: .12em; text-transform: uppercase; color: #8e2a20; }
.of-line { font: .86rem var(--f-ui); color: #4a443a; }
.of-right .rating { background: rgba(255,255,255,.5); text-decoration: none; }
.of-right .r-documented { color: #1E7A45; } .of-right .r-plausible { color: #4E7A12; } .of-right .r-disputed { color: #7d5f00; } .of-right .r-speculative { color: #A2520F; } .of-right .r-tinfoil { color: #6B3FB0; }
.of-dek { font-size: 1.02rem; }
.of-filed { font: .86rem var(--f-type); color: #5a5245; }
.of-cover { display: none; position: absolute; z-index: 2; top: 14px; right: 14px; bottom: 14px; width: calc((100% - 28px) * 1.15 / 2.15); flex-direction: column; align-items: flex-start; gap: .9rem; padding: 1.2rem; border-radius: 0 3px 3px 0; background: #d8b878 linear-gradient(175deg, rgba(255,255,255,.2), rgba(0,0,0,.1)); box-shadow: 0 2px 6px rgba(0,0,0,.35); transform-origin: left center; backface-visibility: hidden; pointer-events: none; }
.of-cover .stk { margin-left: 0; }
.roll.opening .of-cover { display: flex; animation: of-open 1.2s .15s cubic-bezier(.45,0,.25,1) both; }
.roll.opening .of-left { animation: of-fade .5s .55s both; }
@keyframes of-open { to { transform: rotateY(-178deg); } }
@keyframes of-fade { from { opacity: 0; } }
.roll-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-top: 1rem; }
.roll-nav span { font: .8rem var(--f-type); letter-spacing: .06em; color: var(--muted); }
.roll-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
@media (max-width: 699px) {
  .open-file { grid-template-columns: 1fr; }
  .of-left { border-radius: 3px 3px 0 0; box-shadow: inset 0 -10px 14px -10px rgba(0,0,0,.4); }
  .of-right { margin: -2px 4px 6px; padding: 1.1rem 1rem; }
  .of-cover { left: 14px; width: auto; border-radius: 3px; transform-origin: center top; }
  .roll-nav span { order: -1; flex-basis: 100%; text-align: center; }
  @keyframes of-open { to { transform: rotateX(178deg); } }
}

@media (prefers-reduced-motion: reduce) { .folder, .f-paper { transition: none; } .folder:hover .f-paper, .folder:focus-visible .f-paper { translate: none; } }

/* ---------- stories and lists */
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.item { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.item h2, .item h3 { font-size: 1.15rem; margin: 0 0 .3rem; }
.item h2 a, .item h3 a { color: var(--ink); text-decoration: none; }
.item h2 a:hover, .item h3 a:hover { text-decoration: underline; }
.meta { font: .84rem var(--f-ui); color: var(--muted); display: flex; flex-wrap: wrap; gap: .35rem .8rem; align-items: center; }
.rating { font: 700 .74rem var(--f-ui); letter-spacing: .06em; text-transform: uppercase; padding: .15rem .55rem; border-radius: 4px; border: 1.5px solid currentColor; }
.r-documented { color: #6FCF97; } .r-plausible { color: #A8D86E; } .r-disputed { color: #F2C94C; } .r-speculative { color: #F2994A; } .r-tinfoil { color: #C9A0FF; }
body:not(.pub) .r-documented { color: #1E7A45; } body:not(.pub) .r-plausible { color: #4E7A12; } body:not(.pub) .r-disputed { color: #8A6A00; } body:not(.pub) .r-speculative { color: #A2520F; } body:not(.pub) .r-tinfoil { color: #6B3FB0; }
.prose { max-width: 44rem; }
.prose h2 { margin-top: 1.6em; }
.story-head { padding-top: 2rem; padding-bottom: 1rem; }
.dek { font-size: 1.2rem; color: var(--ink-2); }
.scale { display: grid; gap: .4rem; margin: 1rem 0; font-family: var(--f-ui); font-size: .92rem; }
.sources { font-family: var(--f-ui); font-size: .95rem; }
.story-body h2 { font-size: 1.15rem; font-family: var(--f-type); letter-spacing: .03em; color: var(--accent-dark); margin: 1.6em 0 .5em; }
/* the man in room 33: his aside, beside his silhouette */
.room33 { max-width: 44rem; margin: 1.2rem 0 1.8rem; display: grid; grid-template-columns: 104px 1fr; gap: 1.1rem; align-items: start; background: #0d0907; border: 1px solid #3d2b1f; border-radius: 10px; padding: 1rem; box-shadow: inset 0 0 40px rgba(242,166,84,.06); }
.r33-art { width: 104px; height: auto; border-radius: 6px; display: block; }
.r33-who { font: .82rem var(--f-type); letter-spacing: .12em; text-transform: uppercase; color: #e8b878; margin: 0 0 .45rem; }
.room33 p:not(.r33-who) { font-style: italic; color: #e6d9c0; margin: 0 0 .7em; }
@media (max-width: 520px) { .room33 { grid-template-columns: 72px 1fr; gap: .8rem; } .r33-art { width: 72px; } }
.sources li { margin-bottom: .5rem; }
.empty-note { color: var(--muted); font-family: var(--f-ui); border: 1px dashed var(--line); border-radius: var(--radius); padding: 1.2rem; text-align: center; }

/* ---------- the terminal (board) */
body.term { --paper: #0E130F; --line: #1F3A28; --line-2: #132018; --ink: #C8F7D6; --ink-2: #9DDCB0; --muted: #6FA984; --accent: #39FF88; --accent-dark: #39FF88; --accent-ink: #04140A; background: #070A08; }
body.term main { font-family: var(--f-mono); font-size: .98rem; }
body.term h1, body.term h2 { font-family: var(--f-mono); color: var(--glow); text-shadow: 0 0 6px rgba(57,255,136,.35); }
body.term .item { border-radius: 4px; }
.prompt::before { content: '> '; color: var(--glow); }
.post { border-left: 3px solid var(--line); padding: .3rem 0 .3rem .9rem; margin: 0 0 1.2rem; }
.post .meta { font-family: var(--f-mono); }
.post.hidden-post { opacity: .55; }
.post-body p { margin: 0 0 .6em; }
.post-actions { display: flex; gap: .8rem; margin-top: .2rem; }
details.flag > summary { cursor: pointer; font: .82rem var(--f-ui); color: var(--muted); }

/* ---------- account pages */
.auth-wrap { padding: 2.5rem 16px; display: flex; justify-content: center; }
.auth-card { width: 100%; max-width: 440px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 1.6rem; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.6rem; }
.acct { padding: 2rem 16px; }
.acct-head { margin-bottom: 1rem; }
.acct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1rem; align-items: start; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem; }
.panel h2 { font-size: 1.1rem; }
.danger-zone { border-color: var(--bad); }
.thumbs { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ---------- the 3D motel room (public/js/room.js). Overlays only; the room itself is drawn in WebGL. */
.room { position: relative; height: calc(100svh - 64px); min-height: 520px; max-height: 1050px; background: #0b0807; overflow: hidden; isolation: isolate; }
.room-gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: crosshair; }
.room.hovering .room-gl { cursor: pointer; }
.room-veil { position: absolute; inset: 0; display: grid; place-items: center; background: #0b0807; color: #a8987f; font-family: var(--f-type); letter-spacing: .12em; transition: opacity .9s ease; z-index: 3; pointer-events: none; }
.room-veil.gone { opacity: 0; }
.room-tip { position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none; max-width: 270px; background: rgba(14,10,8,.9); border: 1px solid #5a4636; border-radius: 6px; padding: .55rem .75rem; color: #efe6d6; font: .86rem/1.35 var(--f-ui); box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.room-tip b { display: block; font: 1.02rem var(--f-type); color: #fff3dc; margin-bottom: .15rem; }
.room-tip span { display: block; color: #cbbfa6; }
.room-tip em { display: block; font-style: normal; color: #ff8a7a; margin-top: .3rem; font-weight: 700; }
.room-card { position: absolute; z-index: 5; right: 20px; top: 20px; width: min(400px, calc(100% - 40px)); max-height: calc(100% - 40px); overflow: auto; background: rgba(18,13,10,.94); border: 1px solid #5a4636; border-radius: 12px; padding: 1rem 1.2rem 1.2rem; color: #efe6d6; box-shadow: 0 20px 50px rgba(0,0,0,.6); backdrop-filter: blur(4px); }
.room-card h2 { font-size: 1.6rem; margin: .2rem 0 .4rem; }
.room-card p { font-family: var(--f-ui); font-size: .95rem; color: #d6cbb4; }
.room-latest { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .45rem; font-family: var(--f-ui); font-size: .93rem; }
.room-latest a { color: #f3e9d2; }
.room-latest .rating { margin-right: .4rem; }
.room-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; }
.room-back { display: inline-flex; align-items: center; gap: .35rem; margin: 0 0 .5rem; border-radius: 999px; font: 700 1rem var(--f-ui); cursor: pointer; padding: .55rem 1.1rem; min-height: 46px; }
.room-hint { position: absolute; z-index: 2; left: 50%; bottom: 14px; transform: translateX(-50%); margin: 0; width: max-content; max-width: calc(100% - 32px); text-align: center; font: .86rem var(--f-type); color: #e8d9b8; background: rgba(0,0,0,.55); padding: .4rem .8rem; border-radius: 999px; transition: opacity .4s; pointer-events: none; }
.room.zoomed .room-hint { opacity: 0; }
.room-keys { position: absolute; z-index: 4; left: 12px; top: 12px; display: flex; flex-wrap: wrap; gap: .35rem; max-width: calc(100% - 24px); opacity: 0; pointer-events: none; }
.room-keys:focus-within { opacity: 1; pointer-events: auto; }
.room-keys button { font: 600 .8rem var(--f-ui); background: rgba(14,10,8,.9); color: #efe6d6; border: 1px solid #5a4636; border-radius: 6px; padding: .35rem .6rem; min-height: 36px; cursor: pointer; }
.room-nogl { display: none; position: absolute; inset: auto 16px 16px; color: #cbbfa6; font-family: var(--f-ui); }
.room.no-gl .room-gl, .room.no-gl .room-veil, .room.no-gl .room-hint { display: none; }
.room.no-gl { height: auto; min-height: 0; padding: 1rem 0 2.5rem; }
.room.no-gl .room-nogl { display: block; position: static; padding: 0 16px; }
@media (max-width: 700px) {
  .room-card { right: 10px; left: 10px; top: auto; bottom: 10px; width: auto; max-height: 62%; padding-top: .8rem; }
  .room-hint { bottom: 10px; font-size: .8rem; }
}
/* phones: More / Less in the card's corner when it's open as a drawer… */
.room-more { position: absolute; top: .7rem; right: .8rem; font: 700 .9rem var(--f-ui); color: #efe6d6; background: rgba(255,255,255,.08); border: 1px solid #5a4636; border-radius: 999px; padding: .45rem .9rem; min-height: 40px; cursor: pointer; }
.room-more[hidden] { display: none; }
.room-card:not(.compact) .room-back + .eyebrow { margin-right: 6.5rem; }
/* …and the slim bar it starts as: Back, the name, More, and the main link as a big green button underneath */
.room-card.compact { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .5rem .6rem; padding: .6rem; overflow: visible; max-height: none; }
.room-card.compact > :not(.room-back):not(h2):not(.room-actions):not(.room-more) { display: none; }
.room-card.compact .room-back { grid-row: 1; grid-column: 1; margin: 0; padding: .4rem .9rem; min-height: 42px; font-size: 1.2rem; }
.room-card.compact h2 { grid-row: 1; grid-column: 2; margin: 0; font-size: 1.1rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.room-card.compact .room-more { grid-row: 1; grid-column: 3; position: static; }
.room-card.compact .room-actions { grid-row: 2; grid-column: 1 / -1; }
.room-card.compact .room-actions > :not(.primary) { display: none; }
.room-card.compact .room-actions > .primary { flex: 1; min-width: 0; max-width: 100%; white-space: normal; justify-content: center; text-align: center; min-height: 46px; background: #2f8a4c; border-color: #4fbf74; color: #fff; }
.room-card.compact:not(.has-primary) .room-actions { display: none; }

.room-bar { position: absolute; z-index: 4; right: 14px; top: 14px; display: flex; gap: .5rem; align-items: center; }
.room-skip { font: 600 .86rem var(--f-ui); color: #1b1712; background: #e9e1cd; border: 1px solid #fff6dc; border-radius: 3px; padding: .45rem .8rem; text-decoration: none; box-shadow: 0 6px 18px rgba(0,0,0,.5); transition: opacity .3s; }
.room-skip:hover { background: #fff6dc; color: #000; }
.room.zoomed .room-bar, .room.no-gl .room-bar { display: none; }
/* inside the room: turn a quarter to face the next wall (or drag); hidden outside, while walking and when zoomed in */
.room.dragging .room-gl { cursor: grabbing; }
.room.walking .room-gl { cursor: progress; }
/* the turn buttons: the key fob's green with the laptop screen's glow, so they're easy to spot */
.room-turn { position: absolute; z-index: 3; top: 50%; transform: translateY(-50%); width: 54px; height: 76px; display: grid; place-items: center; padding: 0 0 5px; border: 2px solid #39FF88; border-radius: 12px; background: rgba(13,74,42,.88); color: #eafff2; font: 700 2.6rem/1 var(--f-ui); cursor: pointer; box-shadow: 0 0 14px rgba(57,255,136,.45), 0 2px 10px rgba(0,0,0,.5); text-shadow: 0 0 8px rgba(57,255,136,.7); transition: background .2s, box-shadow .2s; }
.room-turn:hover, .room-turn:focus-visible { background: #12623a; box-shadow: 0 0 22px rgba(57,255,136,.8), 0 2px 10px rgba(0,0,0,.5); outline: none; }
.room-turn:active { background: #0d4a2a; }
.room-turn.l { left: 12px; }
.room-turn.r { right: 12px; }
.room:not(.inside) .room-turn, .room.zoomed .room-turn, .room.no-gl .room-turn { display: none; }
@media (max-width: 700px) { .room-turn { width: 44px; height: 62px; font-size: 2.1rem; } .room-turn.l { left: 6px; } .room-turn.r { right: 6px; } }
@media (max-width: 700px) { .room-bar { right: 10px; top: 10px; gap: .4rem; } .room-skip { font-size: .8rem; padding: .4rem .65rem; } }

/* ---------- the paper (/news): the sober way in. A newsprint sheet under the motel's dark header. */
body.paper-page main { background: #ece5d3; color: #1b1814; padding-bottom: 2.5rem;
  background-image: radial-gradient(rgba(80,60,30,.07) 1px, transparent 1.2px), linear-gradient(180deg, rgba(255,255,255,.35), rgba(120,90,40,.08));
  background-size: 4px 4px, 100% 100%; }
body.paper-page .foot { margin-top: 0; }
.np { --np-ink: #1b1814; --np-ink-2: #3d362c; --np-muted: #6b6253; --np-rule: #1b1814; --np-hair: #b9ae96; --np-red: #a3221a; }
.np a { color: var(--np-ink); }
.np a:hover { color: var(--np-red); }
.np .rating { background: rgba(255,255,255,.35); }
.np .r-documented { color: #1E7A45; } .np .r-plausible { color: #4E7A12; } .np .r-disputed { color: #7d5f00; } .np .r-speculative { color: #A2520F; } .np .r-tinfoil { color: #6B3FB0; }
.np .chip.warn { background: #f3dfb0; color: #6d4300; }
.np .btn { background: #f6f1e4; border-color: #8f846d; color: var(--np-ink); }
.np .btn:hover { border-color: var(--np-ink); }
.np :focus-visible { outline-color: var(--np-red); }

.np-mast { padding: 1rem 0 0; text-align: center; }
.np-ears { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.np-ear { margin: 0; font: .78rem var(--f-type); letter-spacing: .06em; color: var(--np-muted); border: 1px solid var(--np-hair); padding: .35rem .6rem; max-width: 19rem; text-align: left; }
.np a.np-back { font: 700 1rem var(--f-ui); padding: .5rem 1.1rem; letter-spacing: 0; text-decoration: none; border-radius: 999px; min-height: 46px; display: inline-flex; align-items: center; }
.np-motto { font: italic .95rem var(--f-body); color: var(--np-ink-2); margin: 0 0 .1rem; }
.np-title { font: 900 clamp(2.1rem, 9vw, 5.4rem)/0.95 var(--f-body); letter-spacing: -.01em; margin: 0; text-transform: uppercase; color: var(--np-ink); white-space: nowrap; }
.np-title span { font-size: .45em; vertical-align: .55em; font-style: italic; text-transform: none; margin-right: .1em; }
.np-dateline { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem 1rem; margin: .6rem 0 0; padding: .35rem 0; border-top: 3px double var(--np-rule); border-bottom: 1px solid var(--np-rule); font: .78rem var(--f-type); letter-spacing: .08em; text-transform: uppercase; color: var(--np-ink-2); }
@media (max-width: 640px) { .np-ear:not(.np-back) { display: none; } .np-dateline { justify-content: center; } }

.np-sections { border-bottom: 1px solid var(--np-hair); }
.np-sections .wrap { display: flex; flex-wrap: wrap; gap: .2rem .1rem; padding-top: .3rem; padding-bottom: .3rem; }
@media (max-width: 640px) { .np-sections .wrap { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } }
.np .np-sections a { flex: none; font: 600 .86rem var(--f-ui); color: var(--np-ink-2); text-decoration: none; padding: .45rem .6rem; border-radius: 3px; white-space: nowrap; }
.np-sections a small { font: .72rem var(--f-mono); color: var(--np-muted); margin-left: .15rem; }
.np .np-sections a:hover { background: rgba(0,0,0,.06); color: var(--np-ink); }
.np .np-sections a.on { background: var(--np-ink); color: #f6f1e4; }
.np-sections a.on small { color: #cfc6b2; }

.np-tools { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .9rem 0 0; font-family: var(--f-ui); }
.np-tools input, .np-tools select { font: .95rem var(--f-ui); color: var(--np-ink); background: #f8f4ea; border: 1px solid #8f846d; border-radius: 3px; min-height: 38px; padding: 0 .6rem; }
.np-search { flex: 1 1 14rem; display: flex; }
.np-search input { width: 100%; }
.np-tools input:focus, .np-tools select:focus { outline: 2px solid var(--np-red); outline-offset: 1px; }
.np a.np-clear { font-size: .9rem; color: var(--np-red); }

.np-front { display: grid; grid-template-columns: 1.7fr 1fr; gap: 0 1.6rem; margin-top: 1.2rem; padding-bottom: 1.2rem; border-bottom: 3px double var(--np-rule); }
.np-lead { padding-right: 1.6rem; border-right: 1px solid var(--np-hair); }
.np-lead h2 { font: 800 clamp(1.7rem, 3.6vw, 2.5rem)/1.06 var(--f-body); margin: .1rem 0 .5rem; }
.np-lead h2 a, .np-seconds h3 a, .np-rows h3 a { text-decoration: none; }
.np-lead h2 a:hover, .np-seconds h3 a:hover, .np-rows h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.np-lead .np-dek { font-size: 1.15rem; }
.np-kicker { font: .74rem var(--f-type); letter-spacing: .14em; text-transform: uppercase; color: var(--np-red); margin: 0; }
.np-dek { color: var(--np-ink-2); margin: 0 0 .45rem; line-height: 1.45; }
.np-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .7rem; margin: 0; font: .8rem var(--f-ui); color: var(--np-muted); }
.np .np-meta a:not(.rating) { color: var(--np-muted); }
.np a.np-more { font: 700 .92rem var(--f-ui); color: var(--np-red); }
.np-r33 { display: grid; grid-template-columns: 54px 1fr; gap: .8rem; align-items: start; margin: 1rem 0 .7rem; padding: .7rem; background: #1a120d; color: #e6d9c0; border-radius: 3px; box-shadow: inset 0 0 30px rgba(242,166,84,.08); }
.np-r33-art { width: 54px; height: auto; display: block; border-radius: 2px; }
.np-r33 p { margin: 0; font-style: italic; font-size: .95rem; line-height: 1.5; }
.np-r33 b { font: normal .74rem var(--f-type); letter-spacing: .12em; text-transform: uppercase; color: #e8b878; display: block; margin-bottom: .2rem; }
.np-seconds { display: grid; gap: 0; align-content: start; }
.np-seconds article { padding: .2rem 0 .9rem; margin-bottom: .9rem; border-bottom: 1px solid var(--np-hair); }
.np-seconds article:last-child { border-bottom: 0; margin-bottom: 0; }
.np-seconds h3 { font: 700 1.2rem/1.15 var(--f-body); margin: .15rem 0 .35rem; }
.np-seconds .np-dek { font-size: .95rem; }
@media (max-width: 820px) { .np-front { grid-template-columns: 1fr; } .np-lead { padding-right: 0; border-right: 0; border-bottom: 1px solid var(--np-hair); padding-bottom: 1rem; margin-bottom: 1rem; } }

.np-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.6rem; margin-top: 1.4rem; }
@media (max-width: 900px) { .np-body { grid-template-columns: 1fr; } }
.np-rule { font: .8rem var(--f-type); letter-spacing: .14em; text-transform: uppercase; color: var(--np-ink); border-top: 2px solid var(--np-rule); border-bottom: 1px solid var(--np-rule); padding: .3rem 0; margin: 0 0 .6rem; }
.np-rows { list-style: none; margin: 0; padding: 0; }
.np-rows li { display: grid; grid-template-columns: 6.2rem 1fr; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--np-hair); }
.np-rows time { font: .78rem/1.9 var(--f-mono); color: var(--np-muted); }
.np-rows h3 { font: 700 1.08rem/1.22 var(--f-body); margin: 0 0 .2rem; }
.np-rows .np-dek { font-size: .93rem; }
@media (max-width: 520px) { .np-rows li { grid-template-columns: 1fr; gap: .1rem; } .np-rows time { line-height: 1.3; } }
.np-empty { font-family: var(--f-ui); color: var(--np-muted); border: 1px dashed var(--np-hair); padding: 1rem; text-align: center; }

.np-side { display: grid; gap: 1.4rem; align-content: start; font-family: var(--f-ui); }
.np-side .np-rule { margin-bottom: .5rem; }
.np-scale { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.np-scale li { display: grid; grid-template-columns: auto 1fr; gap: .1rem .5rem; align-items: center; }
.np-scale .rating { text-decoration: none; justify-self: start; }
.np-scale span { font: .78rem var(--f-mono); color: var(--np-muted); }
.np-scale p { grid-column: 1 / -1; margin: 0; font-size: .8rem; line-height: 1.35; color: var(--np-ink-2); }
.np-threads { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; font-size: .9rem; }
.np-threads a { font-family: var(--f-mono); font-size: .85rem; }
.np-threads a::before { content: '> '; color: #1d7a48; }
.np-threads span { display: block; font-size: .75rem; color: var(--np-muted); }
.np-small { font-size: .85rem; margin: .5rem 0 0; }
.np-box { border: 2px solid var(--np-ink); padding: .8rem .9rem; background: #f6f1e4; }
.np-box h2 { font: 400 1.6rem/1 'Bebas', var(--f-ui); letter-spacing: .04em; margin: 0 0 .3rem; color: var(--np-red); }
.np-box p { font-size: .88rem; margin: 0 0 .5rem; }
.np-box p:last-child { margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }

/* ----- ad spots (always labelled; see lib/ads.js) */
.ad { margin: 2rem 0; font-family: var(--f-ui); }
.ad-label { font: .72rem var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 .35rem; }
.ad-body { display: block; text-decoration: none; color: inherit; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--paper); }
a.ad-body:hover { border-color: var(--ink-2); }
.ad-body img { display: block; width: 100%; height: auto; object-fit: contain; }
/* a picture of the wrong shape for its spot is letterboxed, never allowed to take over the page */
.ad-wide .ad-body img { max-height: 320px; }
.ad-box .ad-body img { max-height: 420px; }
.ad-wide.ad-pic .ad-body { max-width: 1200px; }
.ad-box { max-width: 300px; }
.ad-words .ad-body { padding: .9rem 1rem; display: grid; gap: .25rem; }
.ad-who { font: .78rem var(--f-type); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ad-head { font: 700 1.15rem/1.25 var(--f-body); }
.ad-line { color: var(--ink-2); font-size: .95rem; }
.ad-cta { font-weight: 600; color: var(--accent-dark); margin-top: .2rem; }
.ad-foot { font-size: .78rem; margin: .35rem 0 0; text-align: right; }
.ad-foot a { color: var(--muted); }
.ad-empty { border: 1px dashed var(--line); border-radius: 8px; padding: .8rem 1rem; }
.ad-empty .ad-pitch { margin: 0 0 .5rem; color: var(--ink-2); font-size: .95rem; }
.ad-empty p:last-child { margin: 0; }
.np .ad { margin: 1.2rem 0; }
.np .ad-body, .np .ad-empty { border-color: var(--np-ink); border-radius: 0; background: #f6f1e4; color: var(--np-ink); }
.np .ad-label, .np .ad-who, .np .ad-foot a { color: #6b6253; }
.np .ad-line { color: var(--np-ink); }
.np .ad-cta { color: var(--np-red); }
.np-side .ad { margin: 0; }

/* ----- advertise with us */
.ad-spots { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .8rem; margin: 1rem 0 1.4rem; }
.ad-spot { border: 1px solid var(--line); border-radius: 10px; padding: .8rem .9rem; background: var(--paper); }
.ad-spot h3 { margin: .1rem 0 .35rem; font-size: 1.08rem; }
.ad-spot p { margin: 0 0 .4rem; font-size: .93rem; }
.ad-spot-fmt { font: .72rem var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-dark); }

/* ----- text size (the A− A+ pill; public/js/textsize.js). Everything is sized in rem, so it all scales. */
html[data-fs="-1"] { font-size: 90%; }
html[data-fs="1"] { font-size: 112.5%; }
html[data-fs="2"] { font-size: 125%; }
html[data-fs="3"] { font-size: 140%; }
.fs-pill { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--paper); flex: none; }
.fs-pill button { font: 600 15px/1 var(--f-ui); color: var(--ink-2); background: none; border: 0; min-width: 44px; min-height: 38px; padding: 0 .55rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 1px; }
.fs-pill button + button { border-left: 1.5px solid var(--line); }
.fs-pill button:hover:not(:disabled) { color: var(--ink); background: var(--line-2); }
.fs-pill button:disabled { opacity: .35; cursor: default; }
.fs-pill button:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.fs-pill .fs-a { font-size: 13px; }
.fs-pill .fs-big { font-size: 18px; }
/* the header stays the same size at every text size (the pill is for reading, not for the menu) */
html[data-fs] .top-nav a { font-size: 15px; white-space: nowrap; }
html[data-fs] .top-a .btn.small { font-size: 14.5px; min-height: 38px; }

/* ----- phones: the header is a thin strip (pinned at the top, like everywhere) */
@media (max-width: 640px) {
  .top { box-shadow: 0 2px 10px rgba(0,0,0,.35); }
  html { scroll-padding-top: 66px; }
  .top-in { min-height: 54px; gap: .4rem; }
  .brand .logo { height: 34px; }
  .top-a { gap: .4rem; }
  .top-a .btn.small { min-height: 36px; padding: 0 .6rem; max-width: 7.5rem; overflow: hidden; text-overflow: ellipsis; }
  .fs-pill button { min-width: 36px; min-height: 36px; padding: 0 .35rem; }
  .room { height: calc(100svh - 54px); }
}
@media (max-width: 370px) { .brand .logo { height: 30px; } .go-lbl { display: none; } }

/* ----- the Talk menu (phones): the laptop in the room, the plain terminal, or a tip. A <details>, so it works without JS. */
.go { position: relative; display: none; }
@media (max-width: 640px) { .go { display: block; } }
.go-btn { list-style: none; display: inline-flex; align-items: center; gap: .3rem; min-height: 36px; padding: 0 .6rem; border: 1.5px solid var(--glow); border-radius: 999px; color: var(--glow); background: #0b0f0c; font: 600 14px var(--f-ui); cursor: pointer; text-shadow: 0 0 6px rgba(57,255,136,.4); }
.go-btn::-webkit-details-marker { display: none; }
.go-btn svg { width: 18px; height: 18px; }
.go[open] .go-btn { background: #12301d; }
.go-btn:focus-visible { outline: 2px solid var(--glow); outline-offset: 2px; }
.go-panel { position: fixed; left: 12px; right: 12px; top: 60px; z-index: 60; background: #0b0f0c; border: 1px solid #1f3a28; border-radius: 14px; padding: .8rem; box-shadow: 0 18px 40px rgba(0,0,0,.6); font-family: var(--f-ui); }
.go-h { font: 12px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: #6fa984; margin: 0 0 .5rem .2rem; }
.go-item { display: flex; gap: .75rem; align-items: center; padding: .7rem .6rem; border-radius: 10px; color: #c8f7d6; text-decoration: none; }
.go-item + .go-item { margin-top: .2rem; }
.go-item:hover, .go-item:focus-visible { background: #132018; color: var(--glow); }
.go-item svg { flex: none; width: 26px; height: 26px; color: var(--glow); }
.go-item strong { display: block; font-size: 15px; }
.go-item small { display: block; font-size: 13px; color: #8fc4a2; }
.go-more { display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin: .6rem .2rem 0; padding-top: .6rem; border-top: 1px solid #1f3a28; font-size: 14px; }
.go-more a { color: #9ddcb0; }

/* ----- support the motel (shown only once a PayPal link is saved in Admin → Support button) */
.sup-top { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; flex: none; min-height: 38px; padding: 0 .85rem; border-radius: 999px; border: 1.5px solid #f2a654; background: linear-gradient(180deg, #f7bd6e, #e38a3b); color: #2a1305; font: 700 .93rem var(--f-ui); text-decoration: none; white-space: nowrap; box-shadow: 0 0 14px rgba(242,166,84,.35); }
.sup-top svg, .sup-big svg, .sup-box-t svg { fill: currentColor; }
.sup-top svg { width: 18px; height: 18px; color: #a3221a; }
.sup-top:hover, .sup-top.on { color: #2a1305; filter: brightness(1.08); box-shadow: 0 0 20px rgba(242,166,84,.55); }
.sup-top:focus-visible { outline: 2px solid #f2a654; outline-offset: 2px; }
html[data-fs] .sup-top { font-size: 14.5px; }
@media (max-width: 640px) {
  .sup-top { min-height: 36px; width: 36px; padding: 0; }
  .sup-lbl { display: none; }
  /* with the extra button the strip is tight: the logo keeps its size and a long handle gets trimmed instead */
  .top-in > .brand { flex: none; }
  .top-a { min-width: 0; }
  .top-a .btn.small { flex: 0 1 auto; min-width: 2.75rem; display: block; line-height: 36px; text-align: center; text-overflow: ellipsis; }
}
/* below ~440px the strip tightens up to make room for the heart (only while the heart is shown):
   the Talk button drops its label, the logo and the text-size pill get a little smaller */
@media (max-width: 440px) {
  .top:has(.sup-top) .go-lbl { display: none; }
  .top:has(.sup-top) .top-in, .top:has(.sup-top) .top-a { gap: .25rem; }
  .top:has(.sup-top) .brand .logo { height: 30px; }
  .top:has(.sup-top) .top-a .btn.small { padding: 0 .4rem; max-width: 5.6rem; }
  .top:has(.sup-top) .fs-pill button { min-width: 30px; padding: 0 .2rem; }
  .sup-top { width: 34px; }
}
@media (max-width: 370px) { .top:has(.sup-top) .brand .logo { height: 28px; } }
/* the page */
.sup-head .lede { margin-bottom: 1.4rem; }
.sup-cta { margin: 0 0 .5rem; }
.btn.sup-big { min-height: 58px; padding: 0 1.7rem; font-size: 1.15rem; border-radius: 999px; border-color: #f2a654; background: linear-gradient(180deg, #f7bd6e, #e38a3b); color: #2a1305; box-shadow: 0 0 22px rgba(242,166,84,.4); white-space: normal; text-align: center; }
.btn.sup-big:hover { color: #2a1305; filter: brightness(1.08); }
.btn.sup-big svg { width: 24px; height: 24px; color: #a3221a; flex: none; }
.sup-ways { padding-left: 1.2rem; }
.sup-ways li { margin-bottom: .45rem; }
/* the small box after stories (dark pages) and on the paper (newsprint) */
.sup-box { margin: 2rem 0 0; padding: .9rem 1rem; border: 1px solid rgba(242,166,84,.5); border-radius: var(--radius); background: linear-gradient(135deg, rgba(242,166,84,.13), rgba(224,83,63,.07)); font-family: var(--f-ui); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; }
.sup-box p { margin: 0; }
.sup-box-t { display: flex; gap: .6rem; align-items: flex-start; color: var(--ink-2); font-size: .97rem; flex: 1 1 18rem; }
.sup-box-t b { color: var(--ink); }
.sup-box-t svg { flex: none; width: 22px; height: 22px; margin-top: .1rem; color: #f2a654; }
.btn.sup-btn { border-color: #f2a654; color: #f7bd6e; }
.btn.sup-btn:hover { background: #f2a654; color: #2a1305; }
.np .sup-np { margin: 0; display: block; border: 2px solid var(--np-ink); border-radius: 0; background: #f6f1e4; padding: .8rem .9rem; }
.np .sup-np p { margin: 0 0 .5rem; }
.np .sup-np p:last-child { margin: 0; }

/* the case files (/files): the master directory of sources */
.files-jump { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }
.case-files h2 { padding-top: .4rem; border-top: 1px solid var(--line, rgba(127,127,127,.3)); }
.case-files h3 { font-size: 1.05rem; margin: 1.2em 0 .3em; }
.case-files h3 .rating { font-size: .75rem; margin-left: .4rem; vertical-align: middle; }
.case-files .sources { margin-top: .2em; }

/* the man in room 33, inside a room card (the smoke detector) */
.room-card .room-r33 { margin: .5rem 0 .9rem; grid-template-columns: 64px 1fr; gap: .7rem; padding: .7rem; }
.room-card .room-r33 .r33-art { width: 64px; }
.room-card .room-r33[hidden] { display: none; }

/* the special case file: the Cross of Lorraine (/files/cross-of-lorraine) */
.files-special a { display: grid; gap: .2rem; margin-top: 1rem; padding: .8rem 1rem; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; text-decoration: none; color: inherit; }
.files-special a:hover, .files-special a:focus-visible { border-color: var(--accent); }
.files-special span { font-size: .92rem; opacity: .85; }
.lx-title { display: grid; grid-template-columns: 84px 1fr; gap: 1.2rem; align-items: center; }
.lx-cross { width: 84px; height: auto; fill: #c21d2b; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.lx-jump { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.lx-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .6rem; }
.lx-grid li { margin: 0; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 10px; display: grid; gap: .25rem; }
.lx-grid b { font-family: var(--f-type); letter-spacing: .04em; color: var(--accent); }
.lx-grid span { font-size: .93rem; }
.lx-time { list-style: none; padding: 0 0 0 1.4rem; border-left: 3px solid #c21d2b; }
.lx-time li { position: relative; margin: 0 0 1.4rem; }
.lx-time li::before { content: ""; position: absolute; left: calc(-1.4rem - 8px); top: .35rem; width: 13px; height: 13px; border-radius: 50%; background: #c21d2b; box-shadow: 0 0 0 3px var(--paper); }
.lx-when { font: .85rem var(--f-type); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 0; }
.lx-time h3 { margin: .1rem 0 .3rem; }
.lx-time p { margin: 0 0 .4rem; }
.lx-prague { border-top: 1px solid var(--line); margin-top: 1.5rem; }
.lx-myths li { margin-bottom: .7rem; }
@media (max-width: 520px) { .lx-title { grid-template-columns: 56px 1fr; gap: .8rem; } .lx-cross { width: 56px; } }

/* "Back to the room", wherever it appears: the key fob's green with the laptop screen's glow, pulsing gently so it's
   easy to find (like the room's turn buttons). The pulse stops for people who ask their device for less motion. */
.room-back, .np a.np-back, .btn.btn-room { background: #12623a; color: #eafff2; border: 2px solid #39FF88; text-shadow: 0 0 6px rgba(57,255,136,.55); box-shadow: 0 0 10px rgba(57,255,136,.45), 0 3px 10px rgba(0,0,0,.4); animation: room-glow 2.4s ease-in-out infinite; }
.room-back:hover, .room-back:focus-visible, .np a.np-back:hover, .np a.np-back:focus-visible, .btn.btn-room:hover, .btn.btn-room:focus-visible { background: #17804b; color: #fff; border-color: #7dffb0; outline: none; box-shadow: 0 0 24px rgba(57,255,136,.9), 0 3px 10px rgba(0,0,0,.4); }
@keyframes room-glow {
  0%, 100% { box-shadow: 0 0 6px rgba(57,255,136,.3), 0 3px 10px rgba(0,0,0,.4); }
  50% { box-shadow: 0 0 20px rgba(57,255,136,.85), 0 3px 10px rgba(0,0,0,.4); }
}
@media (prefers-reduced-motion: reduce) { .room-back, .np a.np-back, .btn.btn-room { animation: none; } }

/* ---- the colleague's boxes (/files/the-labyrinth, /files/the-relic-hunters): src/views/dossier.js */
.dz { --dz-ink: #1d1912; --dz-hand: #1f3a7a; --dz-red: #a3291f; --dz-paper: #f5f1e6; padding-bottom: 2rem; }
.dz h2 { font: 400 1.5rem/1.2 var(--f-type); letter-spacing: .02em; -webkit-text-stroke: .3px currentColor; }
.dz-hand { font-family: 'Hand', 'Segoe Print', cursive; font-weight: 500; color: var(--dz-hand); }
/* the end of the box: kraft board, a hand hole, the label plate and the seal */
.dz-end { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.2rem; align-items: center; margin-top: 1.4rem; padding: 3.2rem 1.6rem 1.6rem; border-radius: 6px; color: var(--dz-ink);
  background: radial-gradient(circle at 20% 30%, rgba(255,255,255,.14), transparent 60%), repeating-linear-gradient(90deg, rgba(90,60,25,.06) 0 2px, transparent 2px 7px) #c7a066;
  box-shadow: inset 0 0 0 2px rgba(80,55,20,.35), inset 0 -18px 30px -18px rgba(60,35,10,.45), 0 14px 30px rgba(0,0,0,.35); }
.dz-hole { position: absolute; top: 1rem; left: 50%; width: 7.5rem; height: 1.3rem; margin-left: -3.75rem; border-radius: 999px; background: #2a1d10; box-shadow: inset 0 3px 6px rgba(0,0,0,.7), 0 1px 0 rgba(255,240,210,.35); }
.dz-plate { position: relative; padding: 1.1rem 1.3rem 1rem; background: var(--dz-paper); border: 2px solid #2b241a; outline: 1px solid #2b241a; outline-offset: 3px; box-shadow: 0 2px 5px rgba(0,0,0,.25); transform: rotate(-.5deg); }
.dz-boxno { margin: 0; font: .78rem var(--f-type); letter-spacing: .14em; text-transform: uppercase; color: var(--dz-red); }
.dz-plate h1 { margin: .2rem 0 .1rem; font: 700 clamp(2.3rem, 6vw, 3.6rem)/1 'Hand', cursive; color: #15120d; }
.dz-sub { margin: 0; font: 1rem/1.4 var(--f-type); color: #3d362a; }
.dz-stamps { display: flex; flex-wrap: wrap; gap: .5rem; margin: .7rem 0 0; }
.dz-stamps .stk { margin-left: 0; }
.dz-seal { width: 8.5rem; height: 8.5rem; color: #6b1d16; opacity: .78; transform: rotate(-9deg); font-family: var(--f-type); }
.dz-relics .dz-seal { color: #1d3a6b; transform: rotate(7deg); }
/* the note taped inside the lid, and the contents sheet */
.dz-lid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 1.6rem; align-items: start; margin-top: 1.8rem; }
.dz-card { position: relative; margin: 0; padding: 1.1rem 1.3rem 1.1rem; background: #fbfaf4 repeating-linear-gradient(transparent 0 29px, rgba(70,110,170,.25) 29px 30px); background-position: 0 2.75rem; color: var(--dz-ink); box-shadow: 0 6px 16px rgba(0,0,0,.3); transform: rotate(-1.4deg); }
.dz-card::before { content: ""; position: absolute; top: 2.5rem; left: 0; right: 0; height: 2px; background: rgba(200,60,60,.45); }
.dz-clip { position: absolute; top: -.9rem; left: 1.4rem; width: 1.1rem; height: 3rem; border: 3px solid #8d9399; border-radius: 999px; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.dz-card figcaption { margin: 0 0 .9rem 2rem; font: .72rem var(--f-type); letter-spacing: .12em; text-transform: uppercase; color: #7a7262; }
.dz-card blockquote { margin: 0; font-size: 1.45rem; line-height: 30px; }
.dz-index { padding: 1.3rem 1.4rem; background: var(--dz-paper); color: var(--dz-ink); box-shadow: 0 2px 6px rgba(0,0,0,.25); transform: rotate(.5deg); }
.dz-index h2 { margin: 0 0 .7rem; font-size: 1.05rem; letter-spacing: .14em; text-transform: uppercase; }
.dz-index ol { list-style: none; margin: 0; padding: 0; }
.dz-index li { border-bottom: 1px dotted rgba(0,0,0,.25); }
.dz-index a { display: flex; gap: .8rem; padding: .32rem 0; font: .93rem/1.35 var(--f-type); color: inherit; text-decoration: none; }
.dz-index a:hover, .dz-index a:focus-visible { color: var(--dz-red); }
.dz-index span { flex: none; width: 1.6rem; color: var(--dz-red); }
/* the folios: typed sheets, punched, with handwriting in the margin */
.dz-folios { display: grid; gap: 1.6rem; margin-top: 2rem; }
.dz-sheet { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 14rem; background: var(--dz-paper); color: var(--dz-ink); box-shadow: 0 2px 8px rgba(0,0,0,.28);
  background-image: radial-gradient(circle at 1.1rem 4rem, #1a1610 .42rem, transparent .46rem), radial-gradient(circle at 1.1rem 50%, #1a1610 .42rem, transparent .46rem), radial-gradient(circle at 1.1rem calc(100% - 4rem), #1a1610 .42rem, transparent .46rem); }
.dz-sheet:nth-child(odd) { transform: rotate(-.25deg); } .dz-sheet:nth-child(even) { transform: rotate(.2deg); }
.dz-typed { padding: 1.6rem 1.6rem 1.4rem 2.8rem; border-right: 2px solid rgba(200,60,60,.4); }
.dz-typed h2 { margin: .1rem 0 .9rem; }
.dz-typed p { margin: 0 0 .85rem; }
.dz-folio { font: .78rem var(--f-type); letter-spacing: .16em; text-transform: uppercase; color: var(--dz-red); }
.dz-cite { font: .82rem var(--f-type); color: #6a6252; }
.dz-cite a, .dz-sources a { color: var(--dz-red); }
.dz-margin { padding: 2.6rem 1rem 1rem 1.1rem; }
.dz-margin p { margin: 0; font-size: 1.32rem; line-height: 1.25; transform: rotate(-2deg); }
.dz-sheet:nth-child(3n+2) .dz-margin p { transform: rotate(1.5deg); color: #333; }
/* chronology: a ruled ledger */
.dz-chron, .dz-exhibits, .dz-ledger, .dz-sources, .dz-stands, .dz-pad { margin-top: 2.4rem; }
.dz-chron ol { list-style: none; margin: 0; padding: 0; background: #fbf9f1; color: var(--dz-ink); box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.dz-chron li { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1rem; padding: .8rem 1.2rem; border-bottom: 1px solid rgba(70,110,170,.25); }
.dz-when { margin: 0; font: .86rem var(--f-type); letter-spacing: .06em; color: var(--dz-red); }
.dz-chron h3 { margin: 0 0 .15rem; font: 1rem var(--f-type); }
.dz-chron li p:last-child { margin: 0; font-size: .97rem; }
/* exhibits: manila evidence tags */
.dz-exhibits ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1.2rem; }
.dz-tag { position: relative; margin: 0; padding: 1.4rem 1.1rem 1rem; background: #dcbd7c linear-gradient(170deg, rgba(255,255,255,.18), rgba(0,0,0,.06)); color: #2a2116; clip-path: polygon(1.6rem 0, calc(100% - 1.6rem) 0, 100% 1.6rem, 100% 100%, 0 100%, 0 1.6rem); }
.dz-tag:nth-child(3n) { transform: rotate(.6deg); } .dz-tag:nth-child(3n+1) { transform: rotate(-.5deg); }
.dz-eyelet { position: absolute; top: .55rem; left: 50%; width: .9rem; height: .9rem; margin-left: -.45rem; border-radius: 50%; background: #3a2c18; box-shadow: 0 0 0 .22rem #b8914f; }
.dz-exno { margin: .4rem 0 .1rem; font: .74rem var(--f-type); letter-spacing: .16em; text-transform: uppercase; color: #7e241e; }
.dz-tag h3 { margin: 0 0 .2rem; font: 1.08rem/1.25 var(--f-type); }
.dz-where { margin: 0 0 .6rem; font: italic .9rem var(--f-body); color: #5a4c34; }
.dz-tag p { font-size: .94rem; margin: 0 0 .45rem; }
.dz-tag .rating { background: rgba(255,255,255,.55); }
.dz-tag .r-documented { color: #1E7A45; } .dz-tag .r-plausible { color: #4E7A12; } .dz-tag .r-disputed { color: #7d5f00; } .dz-tag .r-speculative { color: #A2520F; } .dz-tag .r-tinfoil { color: #6B3FB0; }
/* what's said and what's on file: green ledger paper */
.dz-ledger table { width: 100%; border-collapse: collapse; background: #eef3e6; color: var(--dz-ink); box-shadow: 0 2px 8px rgba(0,0,0,.25); font-size: .97rem; }
.dz-ledger th { padding: .7rem 1rem; font: .8rem var(--f-type); letter-spacing: .12em; text-transform: uppercase; text-align: left; background: #d6e2c8; border-bottom: 2px solid #8fa878; }
.dz-ledger td { padding: .75rem 1rem; vertical-align: top; border-bottom: 1px solid #b9c9a6; width: 50%; }
.dz-ledger td:first-child { border-right: 2px solid #c98b8b; font-family: var(--f-type); }
/* still open: a yellow legal pad */
.dz-pad { position: relative; padding: 1.2rem 1.6rem 1.2rem 3.6rem; background: #fbf1a0 repeating-linear-gradient(transparent 0 33px, rgba(70,110,170,.35) 33px 34px); background-position: 0 4.1rem; color: #1b1b3a; box-shadow: 0 4px 12px rgba(0,0,0,.3); border-top: .9rem solid #8e2a20; }
.dz-pad::before { content: ""; position: absolute; top: 0; bottom: 0; left: 2.6rem; width: 2px; background: rgba(200,60,60,.55); }
.dz-pad h2 { margin: .1rem 0 .6rem; font: 700 2rem/1.2 'Hand', cursive; -webkit-text-stroke: 0; color: #8e2a20; }
.dz-pad ul { margin: 0; padding-left: 1.1rem; }
.dz-pad li { font: 500 1.34rem/34px 'Hand', cursive; color: #1b2d6b; }
/* where it stands */
.dz-verdict { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; }
.dz-rstamp { display: inline-block; padding: .2rem .9rem; border: 3px solid currentColor; border-radius: 4px; font: 2rem/1.1 'Bebas', sans-serif; letter-spacing: .08em; text-transform: uppercase; transform: rotate(-4deg); opacity: .9; }
.dz-rstamp.r-documented { color: #2a9a5a; } .dz-rstamp.r-plausible { color: #6a9a22; } .dz-rstamp.r-disputed { color: #b38a10; } .dz-rstamp.r-speculative { color: #c46a1d; } .dz-rstamp.r-tinfoil { color: #8a5ad0; }
.dz-stands > p:last-child { max-width: 46rem; font-size: 1.08rem; }
/* sources: a typed bibliography */
.dz-sources ol { margin: 0; padding: 1.3rem 1.4rem 1.3rem 3.2rem; background: var(--dz-paper); color: var(--dz-ink); box-shadow: 0 2px 8px rgba(0,0,0,.25); font: .9rem/1.45 var(--f-type); }
.dz-sources li { margin-bottom: .45rem; scroll-margin-top: 5rem; }
.dz-sources li:target { background: #fbf1a0; }
.dz-sources span { color: #6a6252; }
.dz-about { margin-top: 2rem; }
.dz-nav { display: flex; flex-wrap: wrap; gap: .6rem; }
.dz-sheet, .dz-chron, .dz-exhibits, .dz-ledger, .dz-pad { scroll-margin-top: 5rem; }
@media (max-width: 760px) {
  .dz-end { grid-template-columns: 1fr; padding: 2.8rem 1rem 1.2rem; }
  .dz-seal { position: absolute; right: .4rem; bottom: -1.6rem; width: 5.5rem; height: 5.5rem; }
  .dz-lid { grid-template-columns: 1fr; }
  .dz-sheet { grid-template-columns: 1fr; }
  .dz-typed { padding: 1.3rem 1.1rem 1rem 2.4rem; border-right: 0; }
  .dz-margin { padding: 0 1.1rem 1.2rem 2.4rem; }
  .dz-margin p { padding: .6rem .8rem; background: #fdf6b8; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
  .dz-chron li { grid-template-columns: 1fr; gap: .2rem; }
  .dz-ledger thead { display: none; }
  .dz-ledger tr { display: block; border-bottom: 2px solid #8fa878; }
  .dz-ledger td { display: block; width: auto; border-right: 0 !important; }
  .dz-ledger td:first-child { padding-bottom: .2rem; border-bottom: 0; }
  .dz-pad { padding-left: 2.6rem; } .dz-pad::before { left: 1.8rem; }
}

/* ---- petitions (/petition/old-milwaukee): the letter on a sheet, the count as a stamp, the latest names */
.pet-letter { background: var(--paper); border: 1px solid var(--line); border-left: 6px solid var(--accent); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; margin: 8px 0 18px; font-size: 1.08rem; }
.pet-letter p { margin: 0 0 .8em; }
.pet-letter p:first-child { font-family: var(--f-type); font-size: .95rem; color: var(--ink-2); }
.pet-letter p:last-child { margin: 0; font-weight: 700; font-size: 1.2rem; color: var(--accent); }
.pet-count { font-family: var(--f-type); font-size: 1.05rem; margin: 0 0 14px; }
.pet-count b { display: inline-block; font-family: 'Bebas', var(--f-ui); font-size: 2.6rem; line-height: 1; color: var(--accent); border: 3px solid var(--accent); border-radius: 6px; padding: 2px 10px 0; margin-right: 8px; transform: rotate(-3deg); vertical-align: middle; }
.pet-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .pet-fields { grid-template-columns: 1fr; } }
.pet-names { margin: 26px 0 18px; }
.pet-names ol { list-style: none; padding: 0; margin: 0; columns: 2 220px; column-gap: 24px; }
.pet-names li { break-inside: avoid; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.pet-names li span { color: var(--ink-2); }
.pet-names li time { display: block; font-family: var(--f-mono); font-size: .75rem; color: var(--muted); }

/* the crack by the map in room 33: the light from the other side fills the screen as you squeeze through */
.room-through { position: absolute; inset: 0; z-index: 6; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at 50% 45%, #fff6cf 0%, #f3df8a 45%, #c9b25a 100%); transition: opacity 1s ease-in .15s; }
.room-through.on { opacity: 1; }

/* ---------- the backrooms (/backrooms): through the crack in room 33. The 3D walk fills the screen under the header. */
.br { position: relative; height: calc(100svh - 64px); min-height: 480px; max-height: 1050px; background: #3e3720; overflow: hidden; isolation: isolate; touch-action: none; user-select: none; -webkit-user-select: none; }
.br-gl { display: block; width: 100%; height: 100%; cursor: grab; }
.br.dragging .br-gl { cursor: grabbing; }
.br-veil { position: absolute; inset: 0; z-index: 6; pointer-events: none; background: radial-gradient(ellipse at 50% 45%, #fff6cf 0%, #f3df8a 45%, #c9b25a 100%); transition: opacity 1.4s ease-out; }
.br-veil.gone { opacity: 0; }
.br-veil.warm { opacity: 1; transition: opacity .7s ease-in; background: radial-gradient(ellipse at 50% 45%, #ffd9a0 0%, #c9783a 55%, #2a140a 100%); }
.br-tip { position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none; background: rgba(20,17,8,.88); border: 1px solid #7a6a3a; border-radius: 6px; padding: .4rem .7rem; color: #f3e9c8; font: .9rem var(--f-type); }
.br-card { z-index: 5; }
.br-bar { position: absolute; z-index: 4; right: 14px; top: 14px; display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.br-btn { font: 600 .86rem var(--f-ui); color: #1b1712; background: #e9dfb8; border: 1px solid #fff6d0; border-radius: 3px; padding: .45rem .8rem; min-height: 40px; display: inline-flex; align-items: center; text-decoration: none; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.br-btn:hover, .br-btn:focus-visible { background: #fff6d0; color: #000; }
.br-hint { position: absolute; z-index: 2; left: 50%; bottom: 14px; transform: translateX(-50%); margin: 0; width: max-content; max-width: calc(100% - 32px); text-align: center; font: .86rem var(--f-type); color: #f3e9c8; background: rgba(20,17,8,.6); padding: .4rem .8rem; border-radius: 999px; transition: opacity .8s; pointer-events: none; }
.br-hint.gone, .br.carded .br-hint { opacity: 0; }
.br-stick { display: none; position: absolute; z-index: 3; left: 18px; bottom: 54px; width: 116px; height: 116px; border-radius: 50%; background: rgba(20,17,8,.35); border: 2px solid rgba(243,233,200,.45); touch-action: none; }
.br-stick span { position: absolute; left: 50%; top: 50%; width: 50px; height: 50px; margin: -25px 0 0 -25px; border-radius: 50%; background: rgba(243,233,200,.75); box-shadow: 0 2px 10px rgba(0,0,0,.4); pointer-events: none; }
.br.touch .br-stick { display: block; }
.br.carded .br-stick { display: none; }
.br-nogl { display: none; }
.br.no-gl { height: auto; min-height: 0; padding: 1rem 0 0; }
.br.no-gl .br-gl, .br.no-gl .br-veil, .br.no-gl .br-hint, .br.no-gl .br-stick, .br.no-gl .br-bar { display: none; }
.br.no-gl .br-nogl { display: block; padding: 0 16px; color: #e9dfb8; font-family: var(--f-ui); }
.br-words { padding-top: 1.5rem; padding-bottom: 2rem; }
@media (max-width: 700px) {
  .br { height: calc(100svh - 54px); }
  .br-bar { right: 10px; top: 10px; gap: .4rem; }
  .br-btn { font-size: .8rem; padding: .35rem .6rem; min-height: 38px; }
  .br-hint { bottom: 10px; font-size: .8rem; }
}
@media (prefers-reduced-motion: reduce) { .br-veil, .br-hint { transition: none; } }
