/* ==========================================================================
   Mr. Wide Awake — Case Files
   Night sky + declassified dossier. Plain CSS, no build step.
   ========================================================================== */

:root {
	--night: #0b0b1a;
	--night-2: #12122a;
	--night-3: #1a1a38;
	--line: rgba(236, 232, 245, 0.12);
	--ink: #ece8f5;
	--muted: #a9a5c0;
	--gold: #f5a524;
	--orange: #f0703a;
	--pink: #e0479e;
	--purple: #8b5cf6;
	--cyan: #22d3ee;
	--red: #e5484d;
	--paper: #eee2c4;
	--paper-2: #e4d5b0;
	--paper-ink: #2a2418;
	--cork: #1c1611;

	--t-documented: #34d399;
	--t-contested: #f5a524;
	--t-speculative: #b197fc;
	--t-unsupported: #8d8aa3;

	--f-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
	--f-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	--f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
	--f-script: "Pacifico", "Brush Script MT", cursive;

	--radius: 14px;
	--gutter: 20px;
	--maxw: 1180px;
	--grad: linear-gradient(90deg, var(--gold), var(--orange) 30%, var(--pink) 62%, var(--purple));
}

/* ---------- Base ---------- */

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--night);
	color: var(--ink);
	font-family: var(--f-body);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }

a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: #ffc35a; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 {
	font-family: var(--f-display);
	font-weight: 600;
	line-height: 1.12;
	margin: 0 0 0.5em;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
h3 { font-size: 1.5rem; }

p { margin: 0 0 1em; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}

.skip-link {
	position: absolute; left: 12px; top: -60px; z-index: 100;
	background: var(--gold); color: var(--night);
	padding: 10px 16px; border-radius: 8px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.starfield {
	position: fixed; inset: 0; z-index: -1; pointer-events: none;
	background:
		radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.55), transparent 60%),
		radial-gradient(1px 1px at 72% 12%, rgba(255,255,255,.4), transparent 60%),
		radial-gradient(1.5px 1.5px at 40% 66%, rgba(245,165,36,.5), transparent 60%),
		radial-gradient(1px 1px at 88% 52%, rgba(255,255,255,.45), transparent 60%),
		radial-gradient(1px 1px at 22% 82%, rgba(255,255,255,.35), transparent 60%),
		radial-gradient(1.5px 1.5px at 60% 34%, rgba(139,92,246,.55), transparent 60%),
		radial-gradient(900px 600px at 80% -10%, rgba(139,92,246,.14), transparent 70%),
		radial-gradient(800px 600px at -10% 30%, rgba(224,71,158,.08), transparent 70%),
		var(--night);
	background-size: 420px 420px, 520px 520px, 610px 610px, 380px 380px, 470px 470px, 560px 560px, auto, auto, auto;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: 780px; }

/* ---------- Shared bits ---------- */

.eyebrow {
	font-family: var(--f-mono);
	font-size: 0.78rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--cyan);
	margin: 0 0 0.9em;
}

.lede { font-size: 1.12rem; color: var(--muted); max-width: 62ch; }

.stamp {
	display: inline-block;
	font-family: var(--f-mono);
	font-size: 0.75rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--gold);
	border: 1.5px dashed rgba(245,165,36,.6);
	padding: 6px 12px;
	border-radius: 4px;
	transform: rotate(-2deg);
}
.stamp-red { color: var(--red); border-color: rgba(229,72,77,.7); }

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 12px 26px;
	border-radius: 999px;
	font-family: var(--f-body); font-weight: 700; font-size: 0.95rem;
	letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none;
	border: 2px solid transparent; cursor: pointer;
	transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(90deg, var(--purple), var(--pink)); color: #fff; box-shadow: 0 8px 30px rgba(224,71,158,.25); }
.btn-primary:hover { color: #fff; box-shadow: 0 10px 36px rgba(224,71,158,.4); }
.btn-ghost { background: transparent; color: var(--gold); border-color: var(--gold); }
.btn-ghost:hover { background: rgba(245,165,36,.1); color: var(--gold); }

.section { padding: clamp(64px, 9vw, 112px) 0; position: relative; }
.section-tight { padding-top: clamp(40px, 6vw, 72px); }
.section-head { margin-bottom: clamp(32px, 5vw, 52px); max-width: 820px; }

.redact {
	background: repeating-linear-gradient(-45deg, #1d1d33 0 6px, #2a2a46 6px 12px);
	box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
	color: transparent;
	border-radius: 2px;
	padding: 0 2px;
	cursor: help;
	transition: background .25s ease, color .25s ease;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}
.redact:hover, .redact:focus, .redact.is-open { background: rgba(229,72,77,.18); color: inherit; outline: none; }

/* ---------- Tier badges ---------- */

.aperture { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; }
.aperture polygon { fill: currentColor; fill-opacity: .18; }

.tier-badge {
	display: inline-flex; align-items: center; gap: 6px;
	font-family: var(--f-mono); font-size: 0.72rem; font-weight: 500;
	letter-spacing: 0.08em; text-transform: uppercase;
	padding: 4px 10px 4px 7px;
	border-radius: 999px;
	border: 1px solid currentColor;
	white-space: nowrap;
	line-height: 1.3;
}
.badge-focus { opacity: .72; text-transform: none; letter-spacing: 0; font-style: italic; }
.badge-focus::before { content: "· "; }

.tier-documented { color: var(--t-documented); }
.tier-contested { color: var(--t-contested); }
.tier-speculative { color: var(--t-speculative); }
.tier-unsupported { color: var(--t-unsupported); }
.tier-badge.tier-documented { background: rgba(52,211,153,.08); }
.tier-badge.tier-contested { background: rgba(245,165,36,.08); }
.tier-badge.tier-speculative { background: rgba(177,151,252,.08); }
.tier-badge.tier-unsupported { background: rgba(141,138,163,.08); }

/* ---------- Header ---------- */

.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(11,11,26,.78);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; }

.brand { display: inline-flex; align-items: baseline; gap: 6px; text-decoration: none; }
.brand-logo { width: 38px; height: 38px; border-radius: 50%; align-self: center; margin-right: 4px; }
.brand-mr { font-family: var(--f-script); color: var(--gold); font-size: 1.35rem; line-height: 1; }
.brand-name {
	font-family: var(--f-display); font-size: 1.55rem; font-weight: 600;
	background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav .menu { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.site-nav .menu a {
	color: var(--ink); text-decoration: none;
	font-size: 0.86rem; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase;
	padding: 6px 0; border-bottom: 2px solid transparent;
}
.site-nav .menu a:hover, .site-nav .current-menu-item > a { color: var(--gold); border-bottom-color: var(--gold); }

.nav-search input {
	width: 170px; min-height: 38px;
	background: rgba(255,255,255,.05); color: var(--ink);
	border: 1px solid var(--line); border-radius: 999px;
	padding: 6px 14px; font: inherit; font-size: 0.86rem;
}
.nav-search input::placeholder { color: var(--muted); }

.nav-toggle {
	display: none; background: none; border: 0; padding: 10px; cursor: pointer;
	width: 46px; height: 46px; flex-direction: column; justify-content: center; gap: 5px;
}
.nav-toggle .bar { display: block; height: 2px; width: 24px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero { padding: clamp(64px, 12vw, 140px) 0 clamp(48px, 8vw, 88px); text-align: center; }
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.wordmark { font-size: clamp(3.2rem, 11vw, 7.2rem); line-height: 1; margin: 28px 0 18px; letter-spacing: -0.02em; }
.wordmark .mr { font-family: var(--f-script); font-weight: 400; color: var(--gold); font-size: .8em; }
.wordmark .wa { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-tagline { line-height: 1.35; font-family: var(--f-display); font-style: italic; font-size: clamp(1.25rem, 2.6vw, 1.7rem); color: var(--ink); max-width: 36ch; }
.hero-rotator { font-family: var(--f-mono); font-size: 0.92rem; color: var(--muted); margin: 10px 0 34px; min-height: 1.6em; }
.rot-label { color: var(--cyan); margin-right: 6px; }
.rot-text { color: var(--ink); border-right: 2px solid var(--gold); padding-right: 4px; }
.hero-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.fineprint { margin-top: 22px; font-size: 0.8rem; color: var(--muted); font-style: italic; }

/* ---------- Ticker ---------- */

.ticker {
	display: flex; align-items: stretch;
	border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
	background: #08081299;
	font-family: var(--f-mono); font-size: 0.82rem;
	overflow: hidden;
}
.ticker-label {
	flex: none; display: flex; align-items: center;
	background: var(--red); color: #fff; text-decoration: none;
	padding: 12px 16px; text-transform: uppercase; letter-spacing: .12em; font-weight: 500; font-size: .74rem;
	position: relative; z-index: 1;
}
.ticker-label:hover { color: #fff; background: #f05a5f; }
.ticker-viewport { display: flex; overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-track {
	display: flex; flex: none; gap: 44px; list-style: none; margin: 0; padding: 12px 22px;
	animation: mwa-ticker 70s linear infinite;
	white-space: nowrap;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track li { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.ticker-track a { color: var(--ink); text-decoration: none; }
.ticker-track a:hover { color: var(--gold); }
.ticker-track em { font-style: normal; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; }
.tdot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
@keyframes mwa-ticker { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* ---------- Static Board ---------- */

.board {
	position: relative;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 40px 28px;
	padding: 48px 32px;
	border-radius: 20px;
	background:
		radial-gradient(circle at 20% 30%, rgba(255,255,255,.025) 0 1px, transparent 2px) 0 0 / 7px 7px,
		radial-gradient(circle at 70% 60%, rgba(0,0,0,.35) 0 1px, transparent 2px) 0 0 / 9px 9px,
		radial-gradient(1200px 500px at 50% 0%, rgba(245,165,36,.06), transparent 70%),
		var(--cork);
	border: 1px solid rgba(245,165,36,.18);
	box-shadow: inset 0 0 80px rgba(0,0,0,.6), 0 30px 80px rgba(0,0,0,.4);
}
.board-strings {
	position: absolute; inset: 0; width: 100%; height: 100%;
	pointer-events: none; z-index: 0; overflow: visible;
}
.board-strings path {
	fill: none; stroke: var(--red); stroke-width: 2; stroke-linecap: round;
	opacity: .9; filter: drop-shadow(0 2px 2px rgba(0,0,0,.5));
}
.board-strings path.draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: mwa-draw 1.4s ease forwards; }
@keyframes mwa-draw { to { stroke-dashoffset: 0; } }

.pin-card {
	position: relative; z-index: 1;
	background: linear-gradient(170deg, var(--paper), var(--paper-2));
	color: var(--paper-ink);
	padding: 26px 18px 18px;
	border-radius: 3px;
	transform: rotate(var(--tilt, 0deg));
	box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 14px 28px rgba(0,0,0,.45), 0 2px 4px rgba(0,0,0,.4);
	transition: transform .25s ease, box-shadow .25s ease;
	display: flex; flex-direction: column;
	min-height: 230px;
}
.pin-card:hover, .pin-card:focus-within { transform: rotate(0deg) translateY(-4px) scale(1.02); box-shadow: 0 22px 40px rgba(0,0,0,.55); z-index: 2; }
.pin {
	position: absolute; top: -9px; left: 50%; width: 18px; height: 18px; margin-left: -9px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, #ff8a8d, var(--red) 55%, #8f1d21);
	box-shadow: 0 3px 5px rgba(0,0,0,.5);
}
.card-no { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: .14em; color: #b2342f; margin: 0 0 6px; text-transform: uppercase; }
.card-title { font-size: 1.45rem; margin: 0 0 8px; line-height: 1.08; color: var(--paper-ink); }
.card-title a { color: inherit; text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .25s; }
.card-title a:hover { background-size: 100% 1px; color: inherit; }
.card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card-teaser { font-size: 0.92rem; line-height: 1.45; color: #4a4131; flex: 1; margin-bottom: 14px; }
.pin-card .redact { background: var(--paper-ink); position: relative; z-index: 2; }
.pin-card .redact:hover, .pin-card .redact:focus, .pin-card .redact.is-open { background: rgba(178,52,47,.15); color: var(--paper-ink); }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pin-card .tier-badge { background: rgba(255,255,255,.35); }
.pin-card .tier-documented { color: #0f7a55; }
.pin-card .tier-contested { color: #9a5a00; }
.pin-card .tier-speculative { color: #6b4bc6; }
.pin-card .tier-unsupported { color: #5f5c70; }
.card-myth { font-family: var(--f-display); font-style: italic; font-size: .95rem; color: #6a5d43; }
.sealed-stamp {
	position: absolute; right: 12px; top: 20px;
	font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: .14em; text-transform: uppercase;
	color: #b2342f; border: 1.5px solid #b2342f; padding: 3px 7px; border-radius: 3px;
	transform: rotate(4deg); opacity: .8; pointer-events: none; background: rgba(238,226,196,.85);
}
.board-cta { text-align: center; margin-top: 36px; }

/* ---------- How to read ---------- */

.tier-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.tier-tile {
	background: var(--night-2); border: 1px solid var(--line); border-top: 3px solid currentColor;
	border-radius: var(--radius); padding: 22px 20px;
}
.tier-tile h3 { color: var(--ink); font-size: 1.45rem; margin-bottom: 8px; }
.tier-tile p { color: var(--muted); font-size: .95rem; margin: 0; }
.tier-tile .tile-focus { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: currentColor; margin: 12px 0 4px; }
.tile-icon { width: 40px; height: 40px; stroke-width: 1.1; }

/* ---------- Essays ---------- */

.essay-section { border-top: 1px solid var(--line); }
.essay-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 80px); align-items: start; }
.essay-head { position: sticky; top: 100px; }
.pull {
	margin: 28px 0 0; padding-left: 18px; border-left: 3px solid var(--gold);
	font-family: var(--f-display); font-style: italic; font-size: 1.55rem; line-height: 1.3; color: var(--gold);
}
.prose { font-size: 1.1rem; line-height: 1.78; max-width: 66ch; color: #dcd8e8; }
.prose p:first-child::first-letter { font-family: var(--f-display); font-size: 3.4em; float: left; line-height: .82; padding: 6px 10px 0 0; color: var(--gold); }
.static-section .prose p:first-child::first-letter { all: unset; }
.static-section { background: linear-gradient(180deg, transparent, rgba(34,211,238,.035), transparent); }

/* ---------- They Were Right ---------- */

.proven-section { background: linear-gradient(180deg, rgba(52,211,153,.035), transparent 60%); border-top: 1px solid var(--line); }
.proven-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.proven-card {
	background: var(--night-2); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 24px 20px; display: flex; flex-direction: column; gap: 10px;
}
.proven-card h3 { margin: 0; font-size: 1.6rem; }
.proven-card p { margin: 0; color: #d6d2e3; font-size: .95rem; }
.proven-card .tier-badge { align-self: flex-start; }
.proven-years { font-family: var(--f-mono); color: var(--muted) !important; font-size: .78rem !important; letter-spacing: .12em; }
.proven-how { color: var(--muted) !important; }
.proven-how strong { color: var(--ink); }
.proven-src { margin-top: auto; font-family: var(--f-mono); font-size: .8rem; }
.more-proven { margin-top: 28px; }

/* ---------- Myth Mirror ---------- */

.myth-section {
	border-top: 1px solid var(--line);
	background:
		radial-gradient(2px 2px at 15% 20%, rgba(245,165,36,.5), transparent 60%),
		radial-gradient(2px 2px at 85% 30%, rgba(245,165,36,.4), transparent 60%),
		radial-gradient(2px 2px at 40% 80%, rgba(245,165,36,.35), transparent 60%),
		linear-gradient(180deg, rgba(139,92,246,.06), transparent);
}
.myth-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.myth-pair {
	position: relative; padding: 22px 20px;
	border: 1px solid rgba(245,165,36,.2); border-radius: var(--radius);
	background: rgba(18,18,42,.7);
}
.myth-modern { font-family: var(--f-mono); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0; }
.myth-arrow { display: block; color: var(--gold); font-size: 1.2rem; margin: 6px 0 2px; }
.myth-ancient { color: var(--gold); font-size: 1.5rem; margin: 0 0 8px; }
.myth-text { color: #d6d2e3; font-size: .93rem; margin: 0; }

/* ---------- Aperture Check ---------- */

.quiz-section { border-top: 1px solid var(--line); }
.quiz-wrap { max-width: 820px; }
.quiz {
	background: var(--night-2); border: 1px solid var(--line); border-radius: 20px;
	padding: clamp(22px, 4vw, 40px);
	box-shadow: 0 30px 80px rgba(0,0,0,.35);
}
.quiz-progress { height: 4px; background: var(--line); border-radius: 4px; margin-bottom: 26px; overflow: hidden; }
.quiz-progress-bar { display: block; height: 100%; width: 0; background: var(--grad); transition: width .3s ease; }
.quiz-q { border: 0; margin: 0; padding: 0; }
.quiz-q legend { font-family: var(--f-display); font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 600; line-height: 1.2; margin-bottom: 20px; padding: 0; }
.quiz-num { display: block; font-family: var(--f-mono); font-size: .76rem; font-weight: 400; letter-spacing: .14em; color: var(--cyan); margin-bottom: 8px; }
.quiz-opt {
	display: flex; align-items: center; gap: 14px;
	min-height: 56px; padding: 14px 18px; margin-bottom: 10px;
	border: 1px solid var(--line); border-radius: 12px; cursor: pointer;
	background: rgba(255,255,255,.02);
	transition: border-color .15s, background .15s, transform .15s;
}
.quiz-opt:hover { border-color: rgba(245,165,36,.6); background: rgba(245,165,36,.06); }
.quiz-opt input { accent-color: var(--gold); width: 18px; height: 18px; flex: none; }
.quiz-opt:has(input:checked) { border-color: var(--gold); background: rgba(245,165,36,.1); }
.quiz-result { text-align: center; }
.quiz-result-icon .aperture { width: 96px; height: 96px; color: var(--gold); stroke-width: .8; margin: 0 auto 14px; }
.quiz-result-name { font-size: clamp(2.2rem, 6vw, 3.2rem); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.quiz-result-text { font-size: 1.12rem; color: #dcd8e8; max-width: 52ch; margin: 0 auto 26px; }
.quiz-result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.quiz-noscript { color: var(--muted); }

/* ---------- Signup + Work ---------- */

.signup-section { border-top: 1px solid var(--line); }
.signup-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px; }
.signup-card, .work-card { border-radius: 20px; padding: clamp(24px, 4vw, 40px); border: 1px solid var(--line); }
.signup-card { background: linear-gradient(140deg, rgba(139,92,246,.18), rgba(224,71,158,.1) 60%, rgba(18,18,42,.9)); }
.signup-card h2, .work-card h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
.signup-card > p { color: #dcd8e8; }
.work-card { background: var(--night-2); }
.work-card .prose { font-size: 1rem; }
.work-card .prose p:first-child::first-letter { all: unset; }
.substack-embed { width: 100%; height: 150px; border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-top: 8px; }
.signup-soon { color: var(--muted); font-style: italic; }

/* ---------- About ---------- */

.about-section { border-top: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 72px); align-items: center; }
.about-photo { margin: 0; position: relative; }
.about-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 3px solid transparent; background: var(--grad) border-box; }
.about-quote { margin: 26px 0 0; padding: 20px 22px; border-radius: var(--radius); background: rgba(245,165,36,.07); border-left: 3px solid var(--gold); }
.about-quote p { font-family: var(--f-display); font-style: italic; font-size: 1.3rem; line-height: 1.4; margin: 0 0 8px; }
.about-quote cite { font-family: var(--f-mono); font-size: .78rem; color: var(--muted); font-style: normal; }
.about-copy .prose p:first-child::first-letter { all: unset; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); background: #08081a; padding: 64px 0 28px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 32px; }
.footer-motto { color: var(--muted); margin-top: 12px; font-style: italic; font-family: var(--f-display); font-size: 1.15rem; }
.footer-title { font-family: var(--f-mono); font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; color: var(--cyan); font-weight: 500; margin-bottom: 14px; }
.footer-col ul, .social-list { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a, .social-list a { color: var(--ink); text-decoration: none; font-size: .95rem; }
.footer-col a:hover, .social-list a:hover { color: var(--gold); }
.social-list { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; }
.footer-note p { color: var(--muted); font-size: .92rem; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.footer-base p { margin: 0; }
.footer-wink { font-style: italic; }

/* ---------- Archives + cards ---------- */

.archive-head h1 { margin-bottom: 10px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.card-grid-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.file-card { background: var(--night-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s, border-color .2s; }
.file-card:hover { transform: translateY(-3px); border-color: rgba(245,165,36,.4); }
.file-card-link { display: block; color: inherit; text-decoration: none; height: 100%; }
.file-card-link:hover { color: inherit; }
.file-card-img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.file-card-body { padding: 20px; }
.file-card .card-no { color: var(--red); }
.file-card-title { font-size: 1.6rem; margin-bottom: 8px; }
.file-card-excerpt { color: var(--muted); font-size: .95rem; }
.file-card .card-myth { color: var(--muted); }
.pagination { margin-top: 40px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; }
.pagination .page-numbers.current { background: var(--gold); color: var(--night); border-color: var(--gold); }

.empty-state, .notfound { text-align: center; }
.empty-state { padding: 60px 20px; border: 1px dashed var(--line); border-radius: 20px; }
.empty-state h2 { margin-top: 18px; }
.empty-state p { color: var(--muted); }
.notfound h1 { margin: 24px 0 14px; }
.notfound .lede { margin: 0 auto 18px; }
.notfound-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 26px 0 34px; }

.search-form { display: flex; gap: 10px; max-width: 520px; margin: 18px auto 0; }
.archive-head .search-form { margin-left: 0; }
.search-field { flex: 1; min-height: 48px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--ink); font: inherit; }

/* ---------- Single file ---------- */

.file-head { padding: clamp(48px, 8vw, 96px) 0 clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(139,92,246,.07), transparent); }
.file-meta-top { display: flex; flex-wrap: wrap; gap: 10px 18px; font-family: var(--f-mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.file-no { color: var(--red); }
.file-status { border: 1px solid currentColor; border-radius: 4px; padding: 1px 8px; color: var(--gold); }
.status-closed { color: var(--t-documented); }
.status-cold { color: var(--t-unsupported); }
.file-title { font-size: clamp(2.4rem, 6vw, 4.2rem); }
.file-dek { font-family: var(--f-display); font-style: italic; font-size: clamp(1.25rem, 2.4vw, 1.6rem); color: #d6d2e3; line-height: 1.35; }
.file-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 20px; font-size: .9rem; color: var(--muted); }
.file-overall { display: inline-flex; align-items: center; gap: 8px; }
.file-cat { font-family: var(--f-mono); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; }
.file-hero { margin: 32px auto 0; }
.file-hero img { width: 100%; border-radius: var(--radius); }

.file-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(28px, 5vw, 64px); padding-top: clamp(32px, 5vw, 56px); padding-bottom: 40px; align-items: start; }
.file-rail { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 18px; }
.rail-card { background: var(--night-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.rail-title { font-size: 1.35rem; margin-bottom: 10px; }
.rail-myth { border-color: rgba(245,165,36,.35); background: linear-gradient(160deg, rgba(245,165,36,.09), var(--night-2) 60%); }
.rail-myth .rail-title { color: var(--gold); }
.rail-myth p { color: #d6d2e3; font-size: .95rem; }
.rail-key ul, .rail-related ul { list-style: none; margin: 0; padding: 0; }
.rail-key li { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; font-size: .84rem; color: var(--muted); }
.rail-key .tier-badge { align-self: flex-start; }
.rail-related li { margin-bottom: 10px; }
.rail-related a { color: var(--ink); text-decoration: none; font-size: .95rem; }
.rail-related a:hover { color: var(--gold); }
.rail-related .card-no { display: block; color: var(--red); margin: 0; }

.entry-content { font-size: 1.12rem; line-height: 1.8; color: #dcd8e8; }
.entry-content > * { max-width: 70ch; }
.entry-content h2 { font-size: clamp(1.8rem, 3.4vw, 2.3rem); margin: 1.6em 0 .6em; color: var(--ink); }
.entry-content h3 { font-size: 1.55rem; margin: 1.4em 0 .5em; color: var(--ink); }
.entry-content a { color: var(--gold); }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: .4em; }
.entry-content blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--purple); font-family: var(--f-display); font-style: italic; font-size: 1.35rem; color: var(--ink); }
.entry-content img { border-radius: 10px; }
.entry-content figure { margin: 1.6em 0; }
.entry-content figcaption, .wp-caption-text { font-size: .85rem; color: var(--muted); margin-top: 8px; font-family: var(--f-mono); }
.entry-content hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.entry-content code { font-family: var(--f-mono); font-size: .9em; background: rgba(255,255,255,.06); padding: 2px 6px; border-radius: 4px; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.entry-content th, .entry-content td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; }
.alignwide { max-width: none !important; }
.alignfull { max-width: none !important; }

.claim {
	margin: 1.6em 0; padding: 18px 20px;
	border: 1px solid var(--line); border-left: 4px solid currentColor;
	border-radius: 0 12px 12px 0; background: rgba(255,255,255,.025);
}
.claim.tier-documented { background: rgba(52,211,153,.05); }
.claim.tier-contested { background: rgba(245,165,36,.05); }
.claim.tier-speculative { background: rgba(177,151,252,.05); }
.claim.tier-unsupported { background: rgba(141,138,163,.05); }
.claim-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.claim-source { font-family: var(--f-mono); font-size: .8rem; }
.claim-body { color: #e4e0ee; }
.claim-body p:last-child { margin-bottom: 0; }

.myth-callout {
	margin: 2em 0; padding: 22px 24px; border-radius: var(--radius);
	border: 1px solid rgba(245,165,36,.35);
	background: radial-gradient(2px 2px at 90% 20%, rgba(245,165,36,.6), transparent 60%), linear-gradient(160deg, rgba(245,165,36,.09), rgba(18,18,42,.6));
}
.myth-callout h3 { color: var(--gold); margin-top: 0; }
.myth-callout p:last-child { margin-bottom: 0; }

.file-tags { margin-top: 2.4em; font-family: var(--f-mono); font-size: .85rem; color: var(--muted); }
.file-tags a { margin-right: 10px; text-decoration: none; }
.file-nav { display: flex; justify-content: space-between; gap: 20px; padding-top: 28px; padding-bottom: 28px; border-top: 1px solid var(--line); }
.file-nav a { font-family: var(--f-display); font-size: 1.2rem; text-decoration: none; }
.file-nav div:last-child { text-align: right; }

/* ---------- Comments ---------- */

.file-comments { padding-bottom: 40px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { border-top: 1px solid var(--line); padding: 18px 0; }
.comment-respond label { display: block; font-size: .9rem; color: var(--muted); margin-bottom: 6px; }
.comment-respond input[type="text"], .comment-respond input[type="email"], .comment-respond input[type="url"], .comment-respond textarea {
	width: 100%; max-width: 100%; padding: 12px 14px; border-radius: 10px;
	border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--ink); font: inherit;
}
.comment-respond p { margin-bottom: 16px; }
.comment-form-cookies-consent { display: flex; gap: 10px; align-items: flex-start; }
.comment-form-cookies-consent label { display: inline; }
.comment-respond .submit {
	min-height: 48px; padding: 12px 26px; border: 0; border-radius: 999px; cursor: pointer;
	background: linear-gradient(90deg, var(--purple), var(--pink)); color: #fff; font: inherit; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
	.board { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.tier-grid, .proven-grid, .myth-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.nav-search { display: none; }
}

@media (max-width: 920px) {
	.nav-toggle { display: inline-flex; }
	.site-nav {
		position: absolute; top: 100%; left: 0; right: 0;
		flex-direction: column; align-items: stretch; gap: 0;
		background: rgba(11,11,26,.98); border-bottom: 1px solid var(--line);
		padding: 8px var(--gutter) 22px;
		display: none;
	}
	.site-nav.is-open { display: flex; }
	.site-nav .menu { flex-direction: column; gap: 0; }
	.site-nav .menu a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
	.nav-search { display: block; margin-top: 16px; }
	.nav-search input { width: 100%; min-height: 46px; }
	.essay-grid, .signup-grid, .about-grid, .file-layout { grid-template-columns: 1fr; }
	.essay-head, .file-rail { position: static; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.about-photo { max-width: 280px; }
}

@media (max-width: 760px) {
	.board { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 36px 18px; gap: 34px 16px; }
	.card-title { font-size: 1.25rem; }
}

@media (max-width: 560px) {
	body { font-size: 16px; }
	.board { grid-template-columns: 1fr; gap: 30px; padding: 32px 18px; }
	.board-strings { display: none; }
	.pin-card { min-height: 0; }
	.tier-grid, .proven-grid, .myth-grid { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: 1fr; }
	.hero-ctas { flex-direction: column; width: 100%; }
	.hero-ctas .btn { width: 100%; }
	.prose, .entry-content { font-size: 1.06rem; }
	.search-form { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
	.ticker-track { animation: none; }
	.ticker-viewport { overflow-x: auto; }
	.board-strings path.draw { stroke-dashoffset: 0; animation: none; }
}
