/* =====================================================================================
   DEAD WEEK JOURNAL - blog page styles (draft, 14/10/2026)
   Layout: a night desk under a painted Marrowgate sky. One paper sheet runs down the
   middle and grows with the text. Pinned evidence sits on the two side rails.
   ZONE A = top half (Dead Week, permanent). ZONE B = bottom half + footer (Dead Week
   for now, built to be handed to another game: see HANDOFF.md and the ZONE B block).
   ===================================================================================== */

/* ---------- fonts (all OFL, self-hosted: no call to Google from your site) ---------- */
@font-face { font-family: "Special Elite"; font-weight: 400; font-display: swap; src: url("fonts/special-elite-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Special Elite"; font-weight: 400; font-display: swap; src: url("fonts/special-elite-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Grenze Gotisch"; font-weight: 400; font-display: swap; src: url("fonts/grenze-gotisch-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Grenze Gotisch"; font-weight: 600; font-display: swap; src: url("fonts/grenze-gotisch-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Grenze Gotisch"; font-weight: 700; font-display: swap; src: url("fonts/grenze-gotisch-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC; }
@font-face { font-family: "Grenze Gotisch"; font-weight: 700; font-display: swap; src: url("fonts/grenze-gotisch-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+1E00-1EFF; }
@font-face { font-family: "IM Fell English"; font-weight: 400; font-display: swap; src: url("fonts/im-fell-english-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IM Fell English"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/im-fell-english-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "IM Fell English SC"; font-weight: 400; font-display: swap; src: url("fonts/im-fell-english-sc-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Anton"; font-weight: 400; font-display: swap; src: url("fonts/anton-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 800; font-display: swap; src: url("fonts/inter-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Caveat"; font-weight: 500; font-display: swap; src: url("fonts/caveat-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Caveat"; font-weight: 700; font-display: swap; src: url("fonts/caveat-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Mrs Saint Delafield"; font-weight: 400; font-display: swap; src: url("fonts/mrs-saint-delafield-latin-400-normal.woff2") format("woff2"); }

/* ---------- tokens ---------- */
:root {
	color-scheme: dark;
	/* the night (the game's own palette, game/css/main.css) */
	--night: #0b0a14;
	--night-2: #141022;
	--violet: #2a1f45;
	--fog: #35d0c4;
	--amber: #ffb766;
	--spark: #ff3b5c;            /* the logo's pink lightning */
	--moon: #f2ead8;             /* light text on the night */
	--moon-dim: rgba(242, 234, 216, .66);
	/* the paper (the Mission Report form, css/mission_report.css) */
	--paper: #f2eada;
	--paper-2: #e7dcc4;
	--typed: #2a2130;            /* typewriter ribbon */
	--typed-soft: #5a4a58;
	--ox: #8e2433;               /* oxblood: stamps, rules, links */
	--hand: #1c2a5e;             /* Deb's blue ballpoint */
	--rule-blue: rgba(66, 104, 168, .26);
	--margin-red: rgba(176, 48, 64, .42);
	--slip: #fffcf3;
	--tape: rgba(236, 226, 196, .62);
	/* type roles */
	--f-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--f-hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
	--f-sign: "Mrs Saint Delafield", "Caveat", cursive;
	--f-old: "IM Fell English", Georgia, "Times New Roman", serif;
	/* measures */
	--sheet-w: 800px;
	--gutter-l: max(16px, env(safe-area-inset-left, 0px));
	--gutter-r: max(16px, env(safe-area-inset-right, 0px));
}

/* =====================================================================================
   TEXT SIZE - the two knobs to turn (or use A- / A+ in the Draft panel, then copy its numbers here)
   --text-scale     body text, quotes, notes and line spacing on the sheet. 1 = default, 1.1 = 10 % bigger.
   --headline-scale the post title and section titles. 1 = default.
   The base sizes per font are just below (--fs-body: 1.125rem for the typewriter, etc.).
   ===================================================================================== */
.desk {
	--text-scale: 0.97;
	--headline-scale: 1;
	--lh: calc(2rem * var(--text-scale));   /* one ruled line: every vertical step on the sheet is a multiple */
}
:root {
}

/* draft switches (Draft panel, bottom right) - pick one of each and delete the others later */
.desk, .desk[data-body="type"] { --f-body: "Special Elite", "Courier Prime", "Courier New", monospace; --fs-body: calc(1.125rem * var(--text-scale)); --body-track: 0; }
.desk[data-body="fell"]  { --f-body: "IM Fell English", Georgia, serif; --fs-body: calc(1.3rem * var(--text-scale)); --body-track: 0; }
.desk[data-body="inter"] { --f-body: "Inter", system-ui, sans-serif; --fs-body: calc(1.0625rem * var(--text-scale)); --body-track: -.003em; }
.desk, .desk[data-title="gothic"] { --f-title: "Grenze Gotisch", "IM Fell English SC", Georgia, serif; --title-weight: 600; --title-case: none; --title-track: 0; --title-scale: 1; --f-drop: "IM Fell English", Georgia, serif; }
.desk[data-title="fell"]  { --f-title: "IM Fell English SC", "IM Fell English", Georgia, serif; --title-weight: 400; --title-case: none; --title-track: .01em; --title-scale: .92; --f-drop: "IM Fell English", Georgia, serif; }
.desk[data-title="anton"] { --f-title: "Anton", "Impact", "Arial Narrow", sans-serif; --title-weight: 400; --title-case: uppercase; --title-track: .02em; --title-scale: .9; --f-drop: "Anton", Impact, sans-serif; }

/* ---------- page ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
	margin: 0; background: var(--night); color: var(--moon);
	font-family: var(--f-ui); font-size: 16px; line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 3px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.desk {
	position: relative; overflow-x: clip; min-height: 100vh;
	background:
		radial-gradient(ellipse 80% 40% at 50% 0%, rgba(53, 208, 196, .08), transparent 70%),
		linear-gradient(180deg, var(--night-2) 0%, var(--night) 30%, var(--night) 100%);
}

/* =====================================================================================
   TOP: the crown (ZONE A) - Marrowgate at dusk, the logo, the nav
   ===================================================================================== */
.crown { position: relative; height: clamp(230px, 28vw, 420px); overflow: hidden; isolation: isolate; }
.crown__sky { position: absolute; inset: 0; z-index: -2; }
.crown__sky img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; animation: skyDrift 40s ease-out both; }
@keyframes skyDrift { from { transform: scale(1.07); } to { transform: scale(1); } }
.crown::before { /* night swallows the bottom; a lamp-dark vignette on the sides */
	content: ""; position: absolute; inset: 0; z-index: -1;
	background:
		linear-gradient(180deg, rgba(11, 10, 20, .55) 0%, rgba(11, 10, 20, 0) 26%, rgba(11, 10, 20, 0) 50%, rgba(11, 10, 20, .7) 78%, var(--night) 100%),
		radial-gradient(ellipse 75% 90% at 50% 40%, transparent 55%, rgba(11, 10, 20, .7) 100%);
}
.crown__fog { position: absolute; left: -20%; right: -20%; bottom: 8%; height: 40%; z-index: -1; pointer-events: none;
	background: radial-gradient(ellipse 40% 50% at 30% 60%, rgba(53, 208, 196, .16), transparent 70%), radial-gradient(ellipse 35% 45% at 72% 50%, rgba(124, 77, 255, .14), transparent 70%);
	animation: fogDrift 22s ease-in-out infinite alternate; }
@keyframes fogDrift { from { transform: translateX(-4%); } to { transform: translateX(4%); } }
.crown__bar {
	display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
	padding-left: var(--gutter-l); padding-right: var(--gutter-r); padding-block: calc(14px + env(safe-area-inset-top, 0px)) 0;
	max-width: 1500px; margin: 0 auto;
}
.crown__studio { font: 600 .72rem/1 var(--f-ui); letter-spacing: .26em; text-transform: uppercase; color: var(--moon); text-decoration: none; opacity: .85; text-shadow: 0 1px 8px rgba(0, 0, 0, .9); }
.crown__nav { margin-left: auto; display: flex; gap: clamp(12px, 2.4vw, 30px); flex-wrap: wrap; }
.crown__nav a { font: 400 .95rem/1 "Special Elite", "Courier New", monospace; letter-spacing: .08em; color: var(--moon); text-decoration: none; text-shadow: 0 1px 10px rgba(0, 0, 0, .95); padding-block: 6px; border-bottom: 1px solid transparent; }
.crown__nav a:hover, .crown__nav a[aria-current="page"] { border-bottom-color: var(--spark); }
.crown__logo { position: absolute; left: 50%; top: clamp(30px, 3.4vw, 54px); transform: translateX(-50%); width: clamp(96px, 9vw, 150px);
	filter: drop-shadow(0 0 22px rgba(0, 0, 0, .7)) drop-shadow(0 0 36px rgba(255, 59, 92, .22)); }
.crown__journal { position: absolute; left: 50%; top: calc(clamp(30px, 3.4vw, 54px) + clamp(96px, 9vw, 150px) + 4px); transform: translateX(-50%); white-space: nowrap;
	font: 600 .7rem/1 var(--f-ui); letter-spacing: .42em; text-transform: uppercase; color: var(--fog); text-shadow: 0 1px 8px rgba(0, 0, 0, .95); }
@media (max-width: 640px) {
	.crown__journal { display: none; }
	.crown__logo { top: 50px; width: clamp(84px, 24vw, 110px); }
}
@media (max-width: 520px) {
	.crown__studio { display: none; }
	.crown__nav { margin: 0 auto; }
	.crown__logo { top: 46px; }
	.crown__nav a { font-size: .85rem; }
}

/* =====================================================================================
   MIDDLE: the board - two zones of rails, the seam, and the sheet on top
   ===================================================================================== */
.board { position: relative; isolation: isolate; margin-top: calc(-1 * clamp(60px, 9vw, 160px)); padding-bottom: clamp(70px, 9vw, 140px); }

.zone { position: absolute; left: 0; right: 0; z-index: -1; }
.zone--a { top: 0; height: 50%; }
.zone--b { top: 50%; height: 50%; }

/* rails: hidden until there is room beside the sheet */
.rail { display: none; }
@media (min-width: 1160px) {
	.rail {
		position: absolute; top: 0; bottom: 0; width: calc((100% - var(--sheet-w)) / 2);
		display: flex; flex-direction: column; align-items: center; justify-content: space-around;
		gap: 40px; padding: clamp(130px, 11vw, 200px) 22px 90px;
	}
	.rail--l { left: 0; }
	.rail--r { right: 0; }
	.zone--b .rail { padding-top: 170px; padding-bottom: 40px; }
	/* the red string that ties the pins of one rail together */
	.rail::before { content: ""; position: absolute; top: 120px; bottom: 120px; left: 50%; width: 2px; z-index: -1;
		background: repeating-linear-gradient(180deg, rgba(176, 48, 64, .75) 0 18px, rgba(142, 36, 51, .55) 18px 36px);
		box-shadow: 0 0 6px rgba(255, 59, 92, .25); transform: rotate(1.4deg); opacity: .55; }
	.rail--r::before { transform: rotate(-1.2deg); }
}
@media (min-width: 1160px) and (max-width: 1380px) { .rail .opt { display: none; } }

/* ---- pinned things ---- */
.pin { position: relative; width: min(var(--w, 200px), 86%); transform: translate(var(--dx, 0), 0) rotate(var(--r, 0deg));
	transition: transform .35s cubic-bezier(.2, .8, .2, 1), filter .35s; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .55)); }
.pin:hover { transform: translate(var(--dx, 0), -6px) rotate(calc(var(--r, 0deg) * .4)) scale(1.04); filter: drop-shadow(0 22px 26px rgba(0, 0, 0, .6)); }
.pin img { width: 100%; }
.tack::before { /* a push-pin */
	content: ""; position: absolute; left: 50%; top: -7px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; z-index: 2;
	background: radial-gradient(circle at 35% 30%, #ff8a9b, var(--spark) 35%, #7a1020 75%); box-shadow: 0 3px 4px rgba(0, 0, 0, .55); }
.taped::before { /* a strip of tape across the top */
	content: ""; position: absolute; left: 50%; top: -10px; width: 46%; height: 22px; margin-left: -23%; z-index: 2;
	background: var(--tape); transform: rotate(-4deg); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.card img { border-radius: 9px; }
.polaroid { background: #f7f2e6; padding: 9px 9px 0; }
.polaroid img { aspect-ratio: 1 / 1; object-fit: cover; filter: saturate(.92) contrast(1.04); }
.polaroid figcaption { font: 600 1.25rem/1 var(--f-hand); color: var(--hand); padding: 10px 2px 12px; text-align: center; }
.polaroid, .polaroid figcaption { margin: 0; }
.cutout { filter: drop-shadow(0 18px 18px rgba(0, 0, 0, .65)); }
.peek-r { margin-right: -38%; }     /* the gargoyle mask leaning out of the right edge */
.peek-l { margin-left: -38%; }
.glow { animation: lanternGlow 4.5s ease-in-out infinite; }
@keyframes lanternGlow { 0%, 100% { filter: drop-shadow(0 0 10px rgba(53, 208, 196, .25)) drop-shadow(0 14px 18px rgba(0, 0, 0, .55)); } 50% { filter: drop-shadow(0 0 26px rgba(53, 208, 196, .55)) drop-shadow(0 14px 18px rgba(0, 0, 0, .55)); } }
.lean { align-self: flex-end; margin-right: -8px; }   /* a figure standing against the sheet's edge */
.rail--r .lean { align-self: flex-start; margin-left: -8px; margin-right: 0; }

/* ---- the seam: half height, a crack of pink light across the desk ---- */
.seam { position: absolute; left: 0; right: 0; top: 50%; height: clamp(200px, 24vw, 330px); transform: translateY(-50%); z-index: -1; pointer-events: none; }
.seam__art { position: absolute; inset: 0; background: url("media/seam_wall.webp") 50% 45% / cover no-repeat; opacity: .5;
	-webkit-mask-image: linear-gradient(180deg, transparent, #000 32%, #000 68%, transparent); mask-image: linear-gradient(180deg, transparent, #000 32%, #000 68%, transparent); }
.seam__crack { position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1px;
	background: linear-gradient(90deg, transparent 0%, rgba(255, 59, 92, .9) 18%, #ffd1da 50%, rgba(255, 59, 92, .9) 82%, transparent 100%);
	box-shadow: 0 0 12px rgba(255, 59, 92, .8), 0 0 40px rgba(255, 59, 92, .45); animation: crack 6s steps(1) infinite; }
@keyframes crack { 0%, 100% { opacity: 1; } 47% { opacity: .55; } 48% { opacity: 1; } 50% { opacity: .7; } 51% { opacity: 1; } }
.seam__keep { display: none; }
@media (min-width: 1160px) {
	.seam__keep { display: block; position: absolute; top: 50%; width: clamp(110px, 8vw, 150px); filter: drop-shadow(0 16px 20px rgba(0, 0, 0, .6)); pointer-events: auto; }
	.seam__keep--l { left: calc((100% - var(--sheet-w)) / 4); transform: translate(-50%, -50%) rotate(-8deg); }
	.seam__keep--r { right: calc((100% - var(--sheet-w)) / 4); width: clamp(90px, 6vw, 120px); transform: translate(50%, -50%) rotate(10deg); }
	.seam__keep--l img { border-radius: 8px; }
}

/* ---- ZONE B wallpaper (Dead Week placeholder: the crows-and-eye of the tarot backs) ---- */
.zone--b {
	--zb-tile: url("media/tile_crows.webp");
	--zb-tile-size: 150px;
	--zb-tile-opacity: .07;
}
.zone--b::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: var(--zb-tile-opacity);
	background: var(--zb-tile) 0 0 / var(--zb-tile-size) auto repeat;
	-webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 85%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 85%, transparent 100%); }
.zone--a::before { /* faint stars over zone A, the tarot backs' gold stars */
	content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5; pointer-events: none;
	background-image:
		radial-gradient(1.5px 1.5px at 12% 18%, rgba(255, 209, 102, .7), transparent 60%),
		radial-gradient(1px 1px at 82% 9%, rgba(242, 234, 216, .6), transparent 60%),
		radial-gradient(1.5px 1.5px at 64% 36%, rgba(255, 209, 102, .5), transparent 60%),
		radial-gradient(1px 1px at 30% 62%, rgba(242, 234, 216, .5), transparent 60%),
		radial-gradient(1.5px 1.5px at 90% 74%, rgba(255, 209, 102, .55), transparent 60%),
		radial-gradient(1px 1px at 7% 88%, rgba(242, 234, 216, .45), transparent 60%);
	background-size: 520px 520px;
	-webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 15%, #000 80%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0%, #000 15%, #000 80%, transparent 100%); }

/* =====================================================================================
   THE SHEET - grows with the text
   ===================================================================================== */
.sheet {
	--pad-t: clamp(52px, 5.5vw, 80px);
	--pad-l: clamp(26px, 7.5vw, 96px);
	--pad-r: clamp(22px, 6vw, 72px);
	position: relative; z-index: 1;
	width: calc(100% - var(--gutter-l) - var(--gutter-r)); max-width: var(--sheet-w);
	margin-left: auto; margin-right: auto;
	padding: var(--pad-t) var(--pad-r) clamp(64px, 8vw, 104px) var(--pad-l);
	color: var(--typed); font-family: var(--f-body); font-size: var(--fs-body); line-height: var(--lh); letter-spacing: var(--body-track);
	background-color: var(--paper);
	background-image:
		radial-gradient(ellipse 60% 30% at 18% 4%, rgba(255, 255, 255, .5), transparent 70%),
		radial-gradient(circle at 88% 21%, transparent 46px, rgba(120, 76, 40, .13) 48px, rgba(120, 76, 40, .05) 53px, transparent 56px),
		linear-gradient(180deg, var(--paper), var(--paper-2));
	box-shadow: 0 34px 70px rgba(0, 0, 0, .62), 0 3px 6px rgba(0, 0, 0, .45), inset 0 0 90px rgba(120, 90, 50, .16);
	border-radius: 2px;
	animation: sheetIn .9s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes sheetIn { from { transform: translateY(26px) rotate(.6deg); } to { transform: none; } }
.sheet::after { /* paper grain */
	content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55; mix-blend-mode: multiply; border-radius: inherit;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .45  0 0 0 0 .38  0 0 0 0 .28  0 0 0 .2 0'/></filter><rect width='180' height='180' filter='url(%23n)'/></svg>"); }
.sheet > * { position: relative; z-index: 1; }

/* paper 1: case file - a double red margin */
.desk[data-paper="case"] .sheet { background-image:
		linear-gradient(90deg, transparent calc(var(--pad-l) - 18px), var(--margin-red) calc(var(--pad-l) - 18px), var(--margin-red) calc(var(--pad-l) - 17px), transparent calc(var(--pad-l) - 17px), transparent calc(var(--pad-l) - 13px), var(--margin-red) calc(var(--pad-l) - 13px), var(--margin-red) calc(var(--pad-l) - 12px), transparent calc(var(--pad-l) - 12px)),
		radial-gradient(ellipse 60% 30% at 18% 4%, rgba(255, 255, 255, .5), transparent 70%),
		radial-gradient(circle at 88% 21%, transparent 46px, rgba(120, 76, 40, .13) 48px, rgba(120, 76, 40, .05) 53px, transparent 56px),
		linear-gradient(180deg, var(--paper), var(--paper-2)); }
/* paper 2: Deb's diary - ruled lines, a margin, punched holes */
.desk[data-paper="diary"] .sheet { --paper: #f6f1e4; --paper-2: #ece4cf;
	background-image:
		linear-gradient(90deg, transparent calc(var(--pad-l) - 14px), var(--margin-red) calc(var(--pad-l) - 14px), var(--margin-red) calc(var(--pad-l) - 12px), transparent calc(var(--pad-l) - 12px)),
		repeating-linear-gradient(180deg, transparent 0 calc(var(--lh) - 1px), var(--rule-blue) calc(var(--lh) - 1px) var(--lh)),
		radial-gradient(circle at 88% 21%, transparent 46px, rgba(120, 76, 40, .12) 48px, rgba(120, 76, 40, .05) 53px, transparent 56px),
		linear-gradient(180deg, var(--paper), var(--paper-2));
	background-position: 0 0, 0 calc(var(--pad-t) + 6px), 0 0, 0 0; }
.desk[data-paper="diary"] .sheet::before { /* the punched holes show the desk through the paper */
	content: ""; position: absolute; left: clamp(8px, 2vw, 22px); top: 0; bottom: 0; width: 22px; z-index: 2;
	background: radial-gradient(circle, var(--night) 0 7px, rgba(60, 40, 20, .35) 8px, transparent 9.5px) 50% 70px / 22px 180px repeat-y; }
/* paper 3: old tome - brighter parchment, foxing, a printed double frame */
.desk[data-paper="tome"] .sheet { --paper: #f7edd3; --paper-2: #eedfbb;
	background-image:
		radial-gradient(circle at 9% 14%, rgba(150, 100, 40, .10) 0 3px, transparent 14px),
		radial-gradient(circle at 93% 41%, rgba(150, 100, 40, .09) 0 4px, transparent 18px),
		radial-gradient(circle at 21% 77%, rgba(150, 100, 40, .08) 0 2px, transparent 12px),
		radial-gradient(ellipse 120% 60% at 50% 50%, transparent 60%, rgba(140, 95, 40, .16) 100%),
		linear-gradient(180deg, var(--paper), var(--paper-2)); }
.desk[data-paper="tome"] .sheet::before { content: ""; position: absolute; inset: clamp(10px, 1.6vw, 18px); z-index: 0; pointer-events: none;
	border: 1px solid rgba(110, 66, 36, .5); outline: 3px double rgba(110, 66, 36, .35); outline-offset: 5px; }

/* sheet hardware: wax seal, tape */
.sheet__seal { position: absolute !important; top: -30px; left: 50%; width: 66px; margin-left: -33px; z-index: 3 !important; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .5)); }
.sheet__tape { position: absolute !important; width: 120px; height: 30px; background: var(--tape); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); z-index: 3 !important; }
.sheet__tape--tl { top: 8px; left: -34px; transform: rotate(-38deg); }
.sheet__tape--br { bottom: 14px; right: -36px; transform: rotate(-34deg); }

/* ---------- the writing ---------- */
.sheet p { margin: 0 0 var(--lh); }
.file-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: calc(var(--lh) * .75);
	font: 600 .7rem/1.4 var(--f-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--ox); }
.file-row time { font: 400 .95rem/1 "Special Elite", "Courier New", monospace; letter-spacing: .08em; color: var(--typed); border: 1.5px solid var(--typed-soft); padding: 5px 9px 4px; }
.stamp { position: absolute !important; top: calc(var(--pad-t) + 2.4rem); right: clamp(10px, 4vw, 44px); transform: rotate(9deg);
	font: 400 1.05rem/1 "Special Elite", "Courier New", monospace; letter-spacing: .24em; color: rgba(176, 48, 64, .8);
	border: 3px solid rgba(176, 48, 64, .7); border-radius: 6px; padding: 7px 12px 6px; mix-blend-mode: multiply; }
.sheet h1 { margin: 0 0 calc(var(--lh) * .5); max-width: 18ch; text-wrap: balance;
	font-family: var(--f-title); font-weight: var(--title-weight); text-transform: var(--title-case); letter-spacing: var(--title-track);
	font-size: calc(clamp(2.5rem, 5.8vw, 4.3rem) * var(--title-scale) * var(--headline-scale)); line-height: 1.02; color: #1b1422; }
.sheet h1 em { font-style: normal; color: var(--ox); }
.deck { font-family: var(--f-old); font-style: italic; font-size: calc(1.3rem * var(--text-scale)); line-height: 1.5; color: var(--typed-soft); max-width: 36em; letter-spacing: 0; }
.byline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0 0 calc(var(--lh) * 1.5); padding-bottom: calc(var(--lh) * .5); border-bottom: 1px solid rgba(142, 36, 51, .35); }
.byline .hand { font: 700 1.6rem/1 var(--f-hand); color: var(--hand); }
.byline .meta { font: 600 .7rem/1 var(--f-ui); letter-spacing: .18em; text-transform: uppercase; color: var(--typed-soft); }

.lede::first-letter { float: left; font-family: var(--f-drop); font-weight: 400; text-transform: uppercase; font-size: calc(var(--lh) * 2.6); line-height: 1; padding: .02em .12em 0 0; color: var(--ox); }

.sheet h2 { margin: calc(var(--lh) * 1.5) 0 calc(var(--lh) * .5); text-wrap: balance;
	font-family: var(--f-title); font-weight: var(--title-weight); text-transform: var(--title-case); letter-spacing: var(--title-track);
	font-size: calc(2.15rem * var(--title-scale) * var(--headline-scale)); line-height: calc(2.5rem * var(--headline-scale)); color: #1b1422; }
.sheet h2::after { content: ""; display: block; width: 64px; height: 3px; margin-top: 8px; background: var(--ox); border-radius: 2px; transform: rotate(-1deg); }
.sheet h3 { margin: var(--lh) 0 0; font: 600 .78rem/var(--lh) var(--f-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--ox); }

.sheet a { color: var(--ox); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.sheet a:hover { text-decoration-thickness: 2px; }
.sheet strong { font-weight: inherit; background: linear-gradient(transparent 58%, rgba(255, 209, 102, .55) 58% 92%, transparent 92%); }  /* a highlighter pass */
.sheet em { font-style: italic; }
.desk[data-body="type"] .sheet em { font-style: normal; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

.sheet ul, .sheet ol { margin: 0 0 var(--lh); padding: 0 0 0 1.6em; }
.sheet ul { list-style: none; }
.sheet ul li { position: relative; }
.sheet ul li::before { content: "—"; position: absolute; left: -1.5em; color: var(--ox); }
.sheet ol li::marker { color: var(--ox); }

.sheet blockquote { margin: var(--lh) 0; padding: 0 0 0 1.3rem; border-left: 3px solid var(--ox);
	font-family: var(--f-old); font-style: italic; font-size: calc(1.32rem * var(--text-scale)); line-height: var(--lh); color: #33263a; letter-spacing: 0; }
.sheet blockquote p { margin-bottom: calc(var(--lh) * .5); }
.sheet blockquote cite { display: block; font: 600 .7rem/1.6 var(--f-ui); font-style: normal; letter-spacing: .18em; text-transform: uppercase; color: var(--typed-soft); }

.scrawl { margin: calc(var(--lh) * 1.25) auto; max-width: 30ch; text-align: center; text-wrap: balance;
	font: 700 clamp(1.7rem, 3.4vw, 2.3rem)/1.15 var(--f-hand); color: var(--hand); transform: rotate(-1.6deg); }
.scrawl::after { content: ""; display: block; width: 46%; height: 8px; margin: 6px auto 0;
	background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 8' preserveAspectRatio='none'><path d='M2 5 C40 1 80 7 120 3 S180 6 198 2' fill='none' stroke='%231c2a5e' stroke-width='2' stroke-linecap='round'/></svg>") center / 100% 100% no-repeat; }

/* a slip clipped beside the text (hangs into the rail on wide screens) */
.note { float: right; clear: right; width: min(46%, 230px); margin: 4px 0 calc(var(--lh) * .5) 1.4rem; padding: 12px 14px 14px;
	background: var(--slip); transform: rotate(var(--r, 2deg)); box-shadow: 0 2px 6px rgba(60, 40, 20, .28), 0 0 0 1px rgba(60, 40, 20, .1);
	font: 500 calc(1.3rem * var(--text-scale))/1.2 var(--f-hand); color: var(--hand); letter-spacing: 0; }
.note::before { content: ""; position: absolute; left: 50%; top: -11px; width: 64px; height: 20px; margin-left: -32px; background: var(--tape); transform: rotate(-3deg); }
.note b { font-weight: 700; }
.note--left { float: left; clear: left; margin: 4px 1.4rem calc(var(--lh) * .5) 0; --r: -2.5deg; }

/* a photo taped into the page */
.snap { float: left; width: min(48%, 290px); margin: 6px 1.6rem var(--lh) 0; padding: 9px 9px 0; background: #f7f2e6; transform: rotate(-2.5deg);
	box-shadow: 0 6px 14px rgba(40, 25, 10, .35); }
.snap::before { content: ""; position: absolute; left: 50%; top: -11px; width: 90px; height: 22px; margin-left: -45px; background: var(--tape); transform: rotate(3deg); }
.snap img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.snap figcaption { font: 600 1.2rem/1.1 var(--f-hand); color: var(--hand); padding: 8px 2px 10px; text-align: center; letter-spacing: 0; }
.snap--right { float: right; margin: 6px 0 var(--lh) 1.6rem; transform: rotate(2deg); }
.snap--card { width: min(34%, 190px); padding: 0; background: none; box-shadow: none; filter: drop-shadow(0 10px 14px rgba(40, 25, 10, .4)); }
.snap--card::before { display: none; }
.snap--card img { aspect-ratio: auto; border-radius: 8px; }
@media (min-width: 1160px) {
	.note { margin-right: calc(-1 * var(--pad-r) - 40px); }
	.note.note--left { margin-left: calc(-1 * var(--pad-l) - 30px); margin-right: 1.4rem; }
}
@media (min-width: 1440px) {
	.note { margin-right: calc(-1 * var(--pad-r) - 110px); }
	.note.note--left { margin-left: calc(-1 * var(--pad-l) - 96px); margin-right: 1.4rem; }   /* keep the text clear of a left slip */
	.snap { margin-left: calc(-1 * var(--pad-l) - 60px); }
	.snap--right { margin-left: 1.6rem; margin-right: calc(-1 * var(--pad-r) - 70px); }
}
@media (max-width: 560px) {
	.note, .note--left { float: none; width: auto; margin: 0 6px var(--lh); }
	.snap, .snap--right { float: none; width: 86%; margin: 0 auto var(--lh); }
	.snap--card { width: 56%; }
}
.clear { clear: both; }

/* section break: the eye seal between two typed rules */
.break { clear: both; border: 0; height: calc(var(--lh) * 2); margin: calc(var(--lh) * .5) 0 var(--lh);
	background:
		url("media/seal_eye_small.webp") center / 40px auto no-repeat,
		linear-gradient(90deg, transparent 8%, rgba(142, 36, 51, .45) 8% 42%, transparent 42% 58%, rgba(142, 36, 51, .45) 58% 92%, transparent 92%) center / 100% 1px no-repeat; }

/* sign-off */
.signoff { clear: both; margin-top: calc(var(--lh) * 2); display: grid; justify-items: end; gap: 2px; text-align: right; }
.signoff .sign { font: 400 clamp(2.6rem, 6vw, 3.6rem)/1 var(--f-sign); color: var(--hand); transform: rotate(-4deg); margin-right: 1rem; }
.signoff .who { font: 600 .7rem/1.6 var(--f-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--typed-soft); }
.signoff .eof { margin-top: var(--lh); font: 400 .95rem/1 "Special Elite", "Courier New", monospace; letter-spacing: .3em; color: var(--ox); }

/* previous / next entry: two index cards */
.entries { clear: both; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-top: calc(var(--lh) * 1.5); }
.entry { display: grid; gap: 4px; padding: 14px 16px 16px; text-decoration: none; background: var(--slip);
	background-image: repeating-linear-gradient(180deg, transparent 0 27px, var(--rule-blue) 27px 28px); background-position: 0 34px;
	box-shadow: 0 2px 6px rgba(60, 40, 20, .25); transform: rotate(var(--r, -1deg)); transition: transform .25s; }
.entry:nth-child(2) { --r: 1.2deg; text-align: right; }
.entry:hover { transform: rotate(0) translateY(-3px); }
.entry span { font: 600 .66rem/1.4 var(--f-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--ox); }
.entry b { font: 600 1.45rem/1.15 var(--f-hand); color: var(--hand); }

/* =====================================================================================
   BOTTOM: the plinth (ZONE B) - the fresco of the ages, the footer
   ===================================================================================== */
.plinth { position: relative; isolation: isolate; padding-top: clamp(20px, 4vw, 60px);
	background: radial-gradient(ellipse 70% 60% at 50% 35%, rgba(255, 183, 102, .07), transparent 70%), var(--night); }
.plinth::before { /* a crack of the seam's pink light above the frieze */
	content: ""; position: absolute; left: 10%; right: 10%; top: 0; height: 1px; z-index: -1;
	background: linear-gradient(90deg, transparent, rgba(255, 59, 92, .6), transparent); box-shadow: 0 0 14px rgba(255, 59, 92, .45); }
.frieze { max-width: 1500px; margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); padding-block: clamp(10px, 2vw, 30px) clamp(28px, 4vw, 56px); }
.frieze__title { margin: 0 0 clamp(18px, 2.4vw, 30px); text-align: center; text-wrap: balance;
	font: italic 400 clamp(1.15rem, 1.6vw, 1.6rem)/1.3 var(--f-old); color: var(--moon); opacity: .9; }
.frieze__row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 24px); }
@media (max-width: 900px) { .frieze__row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fresco { margin: 0; transform: rotate(var(--r, 0deg)); transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.fresco:hover { transform: rotate(0) translateY(-4px); }
.fresco > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 2px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .7), 0 18px 32px rgba(0, 0, 0, .6); }
.fresco { position: relative; }
.fresco::after { /* burnt plaster edge, the same on all four panels */
	content: ""; position: absolute; left: 0; right: 0; top: 0; aspect-ratio: 16 / 9; pointer-events: none; border-radius: 2px;
	box-shadow: inset 0 0 26px 6px rgba(11, 10, 20, .75), inset 0 0 0 3px rgba(60, 40, 25, .55); }
.fresco figcaption { margin-top: 10px; text-align: center; text-wrap: balance; font: italic 400 clamp(.9rem, 1vw, 1rem)/1.4 var(--f-old); color: var(--moon-dim); }
.plinth__inner { width: 100%; max-width: 1500px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px;
	padding-left: var(--gutter-l); padding-right: var(--gutter-r); padding-block: 0 calc(26px + env(safe-area-inset-bottom, 0px)); }
.plinth__mark { display: flex; align-items: center; gap: 14px; }
.plinth__mark img { width: 64px; }
.plinth__mark p { margin: 0; font: 400 .95rem/1.5 "Special Elite", "Courier New", monospace; color: var(--moon); text-shadow: 0 1px 8px #000; }
.plinth__mark small { display: block; font: 600 .66rem/1.6 var(--f-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--moon-dim); }
.plinth__links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.plinth__links a { font: 600 .72rem/1 var(--f-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--moon); text-decoration: none; padding-block: 8px; border-bottom: 1px solid rgba(53, 208, 196, .5); }
.plinth__links a:hover { color: var(--fog); }

/* =====================================================================================
   DRAFT PANEL (delete with blog.js's draft part once fonts and paper are chosen)
   ===================================================================================== */
.draft { position: fixed; right: calc(14px + env(safe-area-inset-right, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 50;
	font: 400 .8rem/1.4 var(--f-ui); color: var(--moon); }
.draft__toggle { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(242, 234, 216, .25); background: rgba(20, 16, 34, .92); color: var(--moon);
	font: 600 .7rem/1 var(--f-ui); letter-spacing: .18em; text-transform: uppercase; padding: 11px 14px; border-radius: 999px; cursor: pointer; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
.draft__toggle::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--spark); box-shadow: 0 0 8px var(--spark); }
.draft__panel { position: absolute; right: 0; bottom: calc(100% + 10px); width: min(320px, calc(100vw - 28px)); padding: 16px; border-radius: 12px;
	background: rgba(20, 16, 34, .97); border: 1px solid rgba(242, 234, 216, .16); box-shadow: 0 18px 50px rgba(0, 0, 0, .6); display: grid; gap: 14px; }
.draft__panel h2 { margin: 0; font: 600 .68rem/1 var(--f-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--fog); }
.draft__group { display: grid; gap: 6px; }
.draft__group > span { font-size: .72rem; color: var(--moon-dim); }
.draft__seg { display: flex; flex-wrap: wrap; gap: 6px; }
.draft__seg button { flex: 1 1 auto; border: 1px solid rgba(242, 234, 216, .2); background: transparent; color: var(--moon); padding: 8px 10px; border-radius: 7px; cursor: pointer; font: 400 .9rem/1.1 var(--sample, var(--f-ui)); }
.draft__seg button[aria-pressed="true"] { background: var(--moon); color: var(--night); border-color: var(--moon); }
.draft__step { display: flex; align-items: center; gap: 6px; }
.draft__step button { width: 38px; border: 1px solid rgba(242, 234, 216, .2); background: transparent; color: var(--moon); padding: 7px 0; border-radius: 7px; cursor: pointer; font: 600 .85rem/1 var(--f-ui); }
.draft__step button:hover { border-color: var(--moon); }
.draft__step output { min-width: 3.4em; text-align: center; font: 600 .85rem/1 var(--f-ui); font-variant-numeric: tabular-nums; }
.draft__check { display: flex; align-items: center; gap: 8px; font-size: .78rem; }
.draft__check input { accent-color: var(--spark); width: 16px; height: 16px; }
.draft__hint { margin: 0; font-size: .72rem; color: var(--moon-dim); }

/* "show halves": outlines the two zones */
.desk.show-zones .zone { outline: 2px dashed rgba(53, 208, 196, .7); outline-offset: -6px; }
.desk.show-zones .zone--b { outline-color: rgba(255, 59, 92, .8); }
.desk.show-zones .zone::after { content: attr(data-label); position: absolute; left: 14px; top: 14px; padding: 6px 10px; border-radius: 6px; z-index: 5;
	font: 600 .7rem/1 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; background: rgba(11, 10, 20, .85); color: var(--moon); }
.desk.show-zones .plinth { outline: 2px dashed rgba(255, 59, 92, .8); outline-offset: -6px; }

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