/* ============================================================================
   FONTS — self-hosted, no network dependency.
   Staatliches (SIL OFL 1.1) and Special Elite (Apache 2.0) both permit
   redistribution; see assets/fonts/LICENSE.txt. Subsets are the unmodified
   Google Fonts latin / latin-ext slices.
   ========================================================================== */
@font-face {
  font-family: 'Staatliches';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/staatliches-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Staatliches';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/staatliches-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Special Elite';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/special-elite-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Special Elite';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/special-elite-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --red: #b3242a;
  --red-bright: #d34643;
  --bone: #e8e0cb;
  --bone-soft: #c6bda7;
  --dim: #817b6d;
  --ink: #06070a;
  --page-bg: #06070a;
  --page-glow: rgba(110, 24, 24, 0.18);
  --surface: #0d0e11;
  --surface-soft: #111216;
  --surface-wash: rgba(13, 14, 17, 0.72);
  --surface-strong: rgba(8, 9, 11, 0.96);
  --text: #e8e0cb;
  --text-secondary: #d3cab7;
  --text-body: #bbb3a0;
  --text-muted: #a39b8a;
  --text-faint: #8c8577;
  --panel: rgba(12, 13, 16, 0.88);
  --panel-solid: #0d0e11;
  --line: rgba(220, 208, 178, 0.16);
  --line-strong: rgba(220, 208, 178, 0.3);
  --nav-bg: rgba(6, 7, 10, 0.94);
  --stage-bg: linear-gradient(135deg, rgba(19,20,23,.92), rgba(7,8,10,.97));
  --stage-grid: rgba(210, 200, 175, 0.08);
  --stage-vignette: rgba(0, 0, 0, 0.54);
  --active-bg: rgba(112, 25, 27, 0.22);
  --hover-bg: rgba(23, 23, 26, 0.92);
  --shadow: rgba(0, 0, 0, 0.7);
  --pap-text: #a899c9;
  --serif: 'Special Elite', 'Courier New', monospace;
  --display: 'Staatliches', 'Arial Narrow', sans-serif;
  --sans: 'Arial Narrow', Arial, sans-serif;
  color-scheme: dark;
}

:root[data-theme='light'] {
  --red: #9e2026;
  --red-bright: #a51f25;
  --bone: #191b1f;
  --bone-soft: #33363c;
  --dim: #565a61;
  --ink: #f4f5f6;
  --page-bg: #f4f5f6;
  --page-glow: rgba(158, 32, 38, 0.08);
  --surface: #ffffff;
  --surface-soft: #e9ebed;
  --surface-wash: rgba(255, 255, 255, 0.86);
  --surface-strong: rgba(255, 255, 255, 0.97);
  --text: #191b1f;
  --text-secondary: #32353b;
  --text-body: #454950;
  --text-muted: #595e66;
  --text-faint: #676c74;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-solid: #ffffff;
  --line: rgba(28, 31, 36, 0.16);
  --line-strong: rgba(28, 31, 36, 0.32);
  --nav-bg: rgba(244, 245, 246, 0.95);
  --stage-bg: linear-gradient(145deg, #eceff1, #ffffff);
  --stage-grid: rgba(23, 25, 29, 0.08);
  --stage-vignette: rgba(77, 81, 88, 0.12);
  --active-bg: rgba(158, 32, 38, 0.1);
  --hover-bg: #eef0f2;
  --shadow: rgba(22, 25, 29, 0.18);
  --pap-text: #67517e;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--page-bg); }
body {
  margin: 0; min-width: 320px; min-height: 100vh; overflow-x: hidden;
  background: radial-gradient(ellipse at 50% -8%, var(--page-glow), transparent 36rem), var(--page-bg);
  color: var(--text); font-family: var(--sans); user-select: text;
}
body::before {
  content: ''; position: fixed; inset: -80px; z-index: 20; pointer-events: none; opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: archive-grain .8s infinite steps(1);
}
body::after {
  content: ''; position: fixed; inset: 0; z-index: 19; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 48%, var(--stage-vignette) 100%);
}
[data-theme='light'] body::before { opacity: .025; }
@keyframes archive-grain {
  0% { transform: translate(0,0); } 25% { transform: translate(32px,-19px); }
  50% { transform: translate(-21px,28px); } 75% { transform: translate(17px,13px); }
}

a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--red-bright); outline-offset: 3px; }

.site-nav {
  position: sticky; top: 0; z-index: 30; height: 68px; display: flex; align-items: center;
  justify-content: space-between; gap: 28px; padding: 0 clamp(18px, 4vw, 64px);
  border-bottom: 1px solid var(--line); background: var(--nav-bg); backdrop-filter: blur(14px);
}
.site-brand { display: flex; align-items: baseline; gap: 13px; text-decoration: none; white-space: nowrap; }
.site-brand strong { font: 28px/1 var(--display); letter-spacing: 5px; font-weight: 400; }
.site-brand span { color: var(--red-bright); font: 9px/1 var(--serif); letter-spacing: 2px; }
.site-links { display: flex; align-items: center; gap: clamp(16px, 3vw, 34px); }
.site-links a, .site-feedback-link {
  position: relative; color: var(--text-muted); text-decoration: none; font: 11px/1 var(--serif);
  letter-spacing: 2px; text-transform: uppercase; white-space: nowrap;
}
.site-feedback-link { padding: 0; border: 0; background: transparent; cursor: pointer; }
.site-links a:hover, .site-links a[aria-current='page'], .site-feedback-link:hover { color: var(--bone); }
.site-links a[aria-current='page']::after { content: ''; position: absolute; left: 0; right: 2px; bottom: -12px; height: 2px; background: var(--red); }
.play-link { padding: 9px 13px; border: 1px solid var(--line-strong); }
.site-menu-toggle { display: none; }
.theme-toggle {
  display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 7px 10px;
  border: 1px solid var(--line); background: var(--surface-wash); color: var(--text-muted);
  font: 10px/1 var(--serif); letter-spacing: 1px; text-transform: uppercase; cursor: pointer;
}
.theme-toggle:hover { border-color: var(--line-strong); color: var(--text); }
.theme-toggle-icon { width: 13px; font: 15px/1 Arial, sans-serif; text-align: center; }
.theme-toggle-moon { display: none; }
[data-theme='light'] .theme-toggle-sun { display: none; }
[data-theme='light'] .theme-toggle-moon { display: inline-block; }

.site-main { position: relative; z-index: 2; }
.site-wrap { width: min(1460px, calc(100% - clamp(32px, 7vw, 112px))); margin: 0 auto; }
.route-hero { padding: clamp(74px, 9vw, 138px) 0 clamp(54px, 7vw, 94px); border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 18px; color: var(--red-bright); font: 11px/1 var(--serif); letter-spacing: 5px; text-transform: uppercase; }
.route-hero h1 { margin: 0; max-width: 14ch; font: 400 clamp(62px, 9.5vw, 152px)/.8 var(--display); letter-spacing: clamp(5px, 1vw, 16px); text-wrap: balance; text-shadow: 0 0 45px rgba(179,36,42,.28); }
.route-hero-copy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, 520px); gap: 30px; align-items: end; margin-top: 34px; }
.route-hero-copy p { grid-column: 2; margin: 0; color: var(--text-body); font: 14px/1.8 var(--serif); }
.route-index { align-self: end; color: var(--text-faint); font: 10px/1.6 var(--serif); letter-spacing: 2px; }
.section-nav { display: flex; align-items: center; gap: 24px; margin-top: clamp(30px, 4vw, 50px); padding-top: 24px; border-top: 1px solid var(--line); }
.section-nav > span { flex: 0 0 auto; color: var(--text-faint); font: 9px/1 var(--serif); letter-spacing: 2.5px; text-transform: uppercase; }
.section-nav-links { display: flex; flex-wrap: wrap; gap: 9px; }
.section-nav a {
  display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 8px 11px;
  border: 1px solid var(--line); background: var(--surface-wash); color: var(--text-muted);
  font: 9px/1 var(--serif); letter-spacing: 1.4px; text-decoration: none; text-transform: uppercase; white-space: nowrap;
}
.section-nav a::before { content: '#'; color: var(--red-bright); }
.section-nav a:hover { border-color: var(--line-strong); color: var(--text); }

.section { padding: clamp(62px, 8vw, 118px) 0; border-bottom: 1px solid var(--line); }
.section[id], .prose-grid[id] { scroll-margin-top: 92px; }
.section-heading { display: grid; grid-template-columns: minmax(220px, .72fr) minmax(0, 1.5fr); gap: 34px; margin-bottom: 38px; }
.section-heading h2 { margin: 0; font: 400 clamp(38px, 5vw, 70px)/.95 var(--display); letter-spacing: 4px; }
.section-heading p { max-width: 62ch; margin: 5px 0 0; color: var(--text-body); font: 13px/1.8 var(--serif); }
.section-no { display: block; margin-bottom: 14px; color: var(--red-bright); font: 10px/1 var(--serif); letter-spacing: 3px; }

.armory-browser {
  display: grid; grid-template-columns: minmax(270px, 330px) minmax(0, 1fr);
  height: min(720px, calc(100vh - 112px)); min-height: 600px;
  overflow: hidden; border: 1px solid var(--line); background: var(--surface);
}
.armory-browser > * { height: 100%; min-height: 0; }
.archive-sidebar { display: flex; min-width: 0; min-height: 0; flex-direction: column; overflow: hidden; border-right: 1px solid var(--line); background: var(--surface-soft); }
.archive-controls { display: grid; gap: 16px; padding: 18px; border-bottom: 1px solid var(--line); background: var(--surface); }
.filter-group { display: grid; gap: 9px; min-width: 0; }
.filter-label { color: var(--text-faint); font: 9px/1 var(--serif); letter-spacing: 2.2px; }
.filter-set { display: flex; flex-wrap: wrap; gap: 7px; }
#variant-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
#variant-filters .variant-button { min-width: 0; padding-inline: 6px; }
.filter-button, .sound-button, .weapon-card, .variant-button {
  appearance: none; border: 1px solid var(--line); background: var(--surface-wash); cursor: pointer;
}
.filter-button, .variant-button {
  min-height: 34px; padding: 8px 10px; color: var(--text-muted); font: 9px/1 var(--serif); letter-spacing: 1px; text-transform: uppercase;
}
.filter-button:hover, .variant-button:hover { color: var(--bone); border-color: var(--line-strong); }
.filter-button.active, .variant-button.active { color: var(--text); border-color: rgba(179,36,42,.7); background: var(--active-bg); }
.archive-search {
  width: 100%; min-width: 0; height: 38px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 0; background: var(--surface-wash); color: var(--text);
  font: 11px/1 var(--serif); letter-spacing: 1px;
}
.archive-search::placeholder { color: var(--text-muted); }
.archive-results-head { display: flex; justify-content: space-between; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line); color: var(--text-faint); font: 8px/1 var(--serif); letter-spacing: 1.5px; }
.archive-results-head strong { color: var(--text-muted); font-weight: 400; }

.weapon-stage { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(360px, .65fr); width: 100%; height: 100%; min-width: 0; min-height: 0; overflow: hidden; background: var(--stage-bg); }
.weapon-canvas-wrap { position: relative; min-width: 0; min-height: 0; overflow: hidden; touch-action: none; cursor: grab; }
.weapon-canvas-wrap:active { cursor: grabbing; }
.weapon-canvas-wrap::before { content: ''; position: absolute; left: 8%; right: 8%; bottom: 10%; height: 32%; background: radial-gradient(ellipse, rgba(179,36,42,.12), transparent 68%); filter: blur(18px); }
.weapon-canvas-wrap::after { content: 'CLICK + DRAG TO ROTATE'; position: absolute; left: 22px; bottom: 18px; color: var(--text-faint); font: 9px/1 var(--serif); letter-spacing: 2px; }
#weapon-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage-grid { position: absolute; inset: 0; pointer-events: none; opacity: .34; background-image: linear-gradient(var(--stage-grid) 1px, transparent 1px), linear-gradient(90deg, var(--stage-grid) 1px, transparent 1px); background-size: 50px 50px; mask-image: linear-gradient(to bottom, transparent, #000 28%, #000 72%, transparent); }
.weapon-status { position: absolute; top: 18px; left: 20px; max-width: calc(100% - 40px); padding: 7px 9px; border: 1px solid var(--line); background: var(--surface-strong); color: var(--text-muted); font: 8px/1.3 var(--serif); letter-spacing: 1.4px; pointer-events: none; }
.weapon-status.firing { color: var(--red-bright); border-color: rgba(179,36,42,.55); }
.weapon-info { display: flex; width: 100%; height: 100%; min-width: 0; min-height: 0; flex-direction: column; justify-content: center; overflow-x: hidden; overflow-y: auto; padding: clamp(22px, 2.3vw, 34px); border-left: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 90%, transparent); }
.weapon-class { color: var(--red-bright); font: 10px/1 var(--serif); letter-spacing: 4px; text-transform: uppercase; }
.weapon-info h3 { margin: 17px 0 4px; overflow-wrap: anywhere; font: 400 clamp(38px, 3.4vw, 52px)/.92 var(--display); letter-spacing: 3px; }
.pap-name { min-height: 22px; margin: 8px 0 20px; color: var(--pap-text); font: 12px/1.5 var(--serif); }
.finish-controls { margin: 0 0 18px; }
.finish-controls > span { display: block; margin-bottom: 8px; color: var(--text-faint); font: 9px/1 var(--serif); letter-spacing: 2px; }
.finish-controls > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.finish-button {
  width: 100%; min-height: 34px; padding: 7px 8px; border: 1px solid var(--line); background: var(--surface-wash);
  color: var(--text-muted); font: 9px/1 var(--serif); letter-spacing: .8px; cursor: pointer;
}
.finish-button:hover { color: var(--bone); border-color: var(--line-strong); }
.finish-button.active { color: var(--text); border-color: rgba(179,36,42,.7); background: var(--active-bg); }
.weapon-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; padding: 17px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.weapon-stats span { display: block; color: var(--text-faint); font: 9px/1 var(--serif); letter-spacing: 2px; }
.weapon-stats strong { display: block; margin-top: 6px; color: var(--text-secondary); font: 20px/1 var(--display); letter-spacing: 1px; font-weight: 400; }
.fire-instruction { margin: 14px 0 0; color: var(--text-muted); font: 9px/1.55 var(--serif); }
.stage-audio { display: grid; gap: 8px; margin-top: 18px; }
.stage-audio .sound-button { width: 100%; }
.stage-audio > .weapon-fire-button { display: flex; align-items: center; min-height: 54px; }
.weapon-action-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.weapon-action {
  min-height: 44px; padding: 9px 8px; border: 1px solid var(--line); background: var(--surface-wash);
  color: var(--text-body); font: 9px/1.25 var(--serif); letter-spacing: 1px; text-transform: uppercase; cursor: pointer;
}
.weapon-action:hover { color: var(--bone); border-color: var(--line-strong); }
.weapon-action.firing, .weapon-fire-button.firing { color: var(--text); border-color: rgba(179,36,42,.75); background: var(--active-bg); }

.weapon-grid { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.weapon-card { position: relative; display: block; width: 100%; min-height: 68px; padding: 13px 42px 12px 18px; border: 0; border-bottom: 1px solid var(--line); text-align: left; transition: background .15s, color .15s; }
.weapon-card::after { content: '›'; position: absolute; top: 50%; right: 18px; color: var(--text-faint); font: 22px/1 Arial, sans-serif; transform: translateY(-50%); }
.weapon-card:hover { background: var(--hover-bg); }
.weapon-card.active { background: var(--active-bg); box-shadow: inset 3px 0 var(--red); }
.weapon-card.active::after { color: var(--red-bright); }
.weapon-card b { display: block; color: var(--text-secondary); font: 18px/1 var(--display); letter-spacing: 1.3px; font-weight: 400; }
.weapon-card span { display: block; margin-top: 6px; overflow: hidden; color: var(--text-muted); font: 8px/1.35 var(--serif); letter-spacing: .8px; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }

.sound-groups { display: grid; gap: 18px; }
.sound-group { border-top: 1px solid var(--line); padding-top: 24px; }
.sound-group-head { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.sound-group h3 { margin: 0; font: 400 27px/1 var(--display); letter-spacing: 3px; }
.sound-group-count { color: var(--text-faint); font: 9px/1 var(--serif); letter-spacing: 2px; }
.sound-list { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 7px; }
.sound-button {
  position: relative; min-height: 48px; padding: 11px 34px 11px 13px; color: var(--text-body);
  text-align: left; font: 10px/1.35 var(--serif); letter-spacing: .7px; overflow: hidden;
}
.sound-button::after { content: '\25b6'; position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: #773033; font-size: 9px; }
.sound-button:hover { color: var(--bone); border-color: var(--line-strong); }
.sound-button.playing { color: var(--text); border-color: rgba(179,36,42,.7); background: var(--active-bg); }
.sound-button.playing::after { content: '\275a\275a'; color: var(--red-bright); letter-spacing: -2px; }

.music-credit-card {
  display: grid; grid-template-columns: minmax(260px,.8fr) minmax(0,1.2fr); gap: 1px;
  border: 1px solid var(--line); background: var(--line);
}
.music-credit-intro, .music-credit-list, .music-rights { background: var(--surface); }
.music-credit-intro { padding: clamp(28px,4vw,56px); }
.music-credit-kicker { color: var(--red-bright); font: 9px/1 var(--serif); letter-spacing: 3px; }
.music-credit-intro h3 { margin: 18px 0 0; font: 400 clamp(42px,5vw,74px)/.9 var(--display); letter-spacing: 4px; text-wrap: balance; }
.music-credit-intro p { margin: 20px 0 0; color: var(--text-body); font: 12px/1.8 var(--serif); }
.music-track-control { margin-top: 28px; }
.music-track-control .sound-button { width: 100%; min-height: 56px; }
.music-credit-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 0; padding: clamp(22px,3vw,42px); gap: 1px; }
.music-credit-list > div { padding: 18px; border: 1px solid var(--line); }
.music-credit-list dt { color: var(--text-faint); font: 9px/1.3 var(--serif); letter-spacing: 1.7px; text-transform: uppercase; }
.music-credit-list dd { margin: 9px 0 0; color: var(--text-secondary); font: 12px/1.65 var(--serif); }
.music-credit-list a { color: var(--text-secondary); text-decoration-color: var(--red); text-underline-offset: 4px; }
.music-credit-artists { grid-column: 1 / -1; }
.music-credit-artists dd { font-size: 14px; }
.music-credit-artists dd span { color: var(--text-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .7px; }
.music-rights { grid-column: 1 / -1; margin: 0; padding: 24px clamp(28px,4vw,56px); color: var(--text-muted); font: 10px/1.8 var(--serif); letter-spacing: .4px; }
.music-rights strong { color: var(--text-secondary); font-weight: 400; text-transform: uppercase; letter-spacing: 1px; }

.audio-dock {
  position: fixed; z-index: 40; left: 50%; bottom: 18px; width: min(720px, calc(100% - 28px));
  transform: translateX(-50%) translateY(calc(100% + 40px)); opacity: 0;
  display: grid; grid-template-columns: auto minmax(120px,1fr) auto; align-items: center; gap: 14px;
  padding: 12px 14px; border: 1px solid var(--line-strong); background: var(--surface-strong); backdrop-filter: blur(16px);
  box-shadow: 0 8px 8px var(--shadow); transition: transform .25s ease, opacity .25s ease;
}
.audio-dock.visible { transform: translateX(-50%) translateY(0); opacity: 1; }
.dock-toggle { width: 38px; height: 38px; border: 1px solid rgba(179,36,42,.6); background: rgba(123,27,29,.2); cursor: pointer; }
.dock-meta { min-width: 0; }
.dock-meta strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 12px/1.3 var(--serif); letter-spacing: 1px; }
.dock-progress { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.dock-progress input { min-width: 0; flex: 1; height: 3px; accent-color: var(--red); }
.dock-progress span, .dock-kind { color: var(--text-muted); font: 8px/1 var(--serif); letter-spacing: 1px; }

.prose-grid { display: grid; grid-template-columns: minmax(0,.75fr) minmax(0,1.25fr); gap: clamp(38px,7vw,110px); }
.prose-grid + .prose-grid { margin-top: clamp(60px,8vw,120px); }
.prose-aside { color: var(--text-muted); font: 10px/1.7 var(--serif); letter-spacing: 2px; text-transform: uppercase; }
.prose-aside .red-rule { width: 42px; height: 2px; margin-bottom: 18px; background: var(--red); }
.prose-body h2, .prose-body h3 { margin: 0; font-family: var(--display); font-weight: 400; letter-spacing: 3px; }
.prose-body h2 { font-size: clamp(43px,5.5vw,78px); line-height: .95; }
.prose-body h3 { margin-top: 42px; font-size: 28px; }
.prose-body p { margin: 22px 0 0; color: var(--text-body); font: 14px/1.9 var(--serif); }
.prose-body p.lede { color: var(--text-secondary); font-size: clamp(16px,2vw,21px); line-height: 1.75; }
.prose-body a { color: var(--text-secondary); text-decoration-color: var(--red); text-underline-offset: 4px; }
.credit-list, .feature-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; margin-top: 30px; background: var(--line); border: 1px solid var(--line); }
.credit-item, .feature-item { padding: 24px; background: var(--surface); }
.credit-item span, .feature-item span { display: block; color: var(--text-faint); font: 9px/1 var(--serif); letter-spacing: 2px; text-transform: uppercase; }
.credit-item strong, .feature-item strong { display: block; margin-top: 10px; color: var(--text-secondary); font: 16px/1.5 var(--serif); font-weight: 400; }

.control-table { width: 100%; margin-top: 28px; border-collapse: collapse; font: 12px/1.5 var(--serif); }
.control-table th { padding: 11px 14px; border-bottom: 1px solid var(--line-strong); color: var(--text-faint); font-weight: 400; text-align: left; letter-spacing: 2px; }
.control-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); color: var(--text-body); }
.control-table td:first-child { width: 34%; color: var(--text-secondary); }
.key { display: inline-block; min-width: 28px; margin: 2px 3px 2px 0; padding: 4px 7px; border: 1px solid var(--line-strong); color: var(--text-secondary); text-align: center; }

.legal-block { padding: clamp(30px,5vw,62px); border: 1px solid rgba(179,36,42,.38); background: rgba(97,22,24,.08); }
.legal-block h2 { margin: 0; font: 400 clamp(36px,5vw,66px)/1 var(--display); letter-spacing: 5px; }
.legal-block p { max-width: 90ch; margin: 18px 0 0; color: var(--text-body); font: 12px/1.8 var(--serif); }

.site-footer { position: relative; z-index: 2; padding: 48px clamp(18px,4vw,64px) 84px; color: var(--text-faint); }
.site-footer-inner { display: flex; justify-content: space-between; gap: 24px; padding-top: 22px; border-top: 1px solid var(--line); font: 9px/1.6 var(--serif); letter-spacing: 1.5px; }
.site-footer a { color: var(--text-muted); }

.empty-state { display: none; padding: 50px 20px; color: var(--text-muted); text-align: center; font: 10px/1.7 var(--serif); letter-spacing: 1.5px; }
.empty-state.visible { display: block; }

@media (max-width: 1320px) {
  .armory-browser { display: flex; height: auto; min-height: 0; flex-direction: column; overflow: hidden; }
  .armory-browser > *, .weapon-stage { height: auto; }
  .archive-sidebar { height: auto; max-height: 440px; border-right: 0; border-bottom: 1px solid var(--line); }
  .archive-controls { grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr); align-items: end; }
  .filter-group-classes { grid-column: 1 / -1; }
  .weapon-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 230px; }
  .weapon-card:nth-child(odd) { border-right: 1px solid var(--line); }
  .weapon-stage { grid-template-columns: 1fr; grid-template-rows: auto auto; overflow: visible; }
  .weapon-canvas-wrap { width: 100%; min-height: 0; aspect-ratio: 16 / 9; }
  .weapon-info { height: auto; justify-content: flex-start; overflow: visible; border-top: 1px solid var(--line); border-left: 0; }
  .weapon-info h3 { font-size: 43px; }
  .sound-list { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
/* The nav collapses on its OWN breakpoint, wider than the page grid's.
   The row is a single nowrap line — brand, tagline, links, theme toggle, Play
   game — so it does not degrade gracefully: it just runs off the right edge and
   gives the whole document a horizontal scrollbar. Measured on /leaderboard:
   the full six-link row needs 1155px, so the old 800px collapse point left
   801-1155px overflowing. That was true with five links too (~1015px needed) —
   the horizontal scrollbar predates the Public Codebase link, which only widened
   the gap by its own 124px.

   Rather than collapse to a hamburger at 1160px — which would hand a 1152px
   MacBook Air a mobile nav — the decorative tagline goes first. It is worth
   156px, which brings the row down to ~999px and lets the full nav survive to
   the 1024px collapse point with room to spare. Page-layout rules stay at 800px,
   where the prose grid actually wants to fold. */
@media (max-width: 1280px) {
  .site-brand span { display: none; }
}
@media (max-width: 1024px) {
  .site-nav { height: 64px; min-height: 64px; padding-block: 0; }
  .site-menu-toggle {
    position: relative; display: grid; place-content: center; gap: 5px; width: 48px; height: 48px; flex: 0 0 auto;
    border: 1px solid var(--line); background: var(--surface-wash); cursor: pointer;
  }
  .site-menu-toggle span { width: 21px; height: 1px; background: var(--text-secondary); transition: transform .2s ease, opacity .2s ease; }
  .menu-open .site-menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .menu-open .site-menu-toggle span:nth-child(2) { opacity: 0; }
  .menu-open .site-menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .site-links {
    position: absolute; top: 64px; left: 0; right: 0; display: none; gap: 0; padding: 8px clamp(18px, 4vw, 64px) 18px;
    border-bottom: 1px solid var(--line-strong); background: var(--surface-strong); box-shadow: 0 8px 8px var(--shadow);
  }
  .menu-open .site-links { display: grid; }
  .site-links a, .site-feedback-link { display: flex; align-items: center; min-height: 52px; border-bottom: 1px solid var(--line); font-size: 14px; letter-spacing: 2px; text-align: left; }
  .site-links a[aria-current='page']::after { left: auto; right: 0; bottom: 50%; width: 3px; height: 24px; transform: translateY(50%); }
  .play-link { margin-top: 10px; padding: 0 14px; border: 1px solid var(--line-strong) !important; }
  .theme-toggle { justify-content: flex-start; min-height: 52px; border: 0; border-bottom: 1px solid var(--line); background: transparent; font-size: 14px; }
}
@media (max-width: 800px) {
  .route-hero-copy, .section-heading, .prose-grid { grid-template-columns: 1fr; }
  .route-hero-copy p { grid-column: 1; }
  .route-index { display: none; }
  .section-nav { align-items: flex-start; flex-direction: column; gap: 13px; }
  .section-nav-links { width: 100%; flex-wrap: nowrap; overflow-x: auto; padding: 3px 3px 8px; scrollbar-width: thin; }
  .archive-controls { grid-template-columns: 1fr; }
  .filter-group-classes { grid-column: 1; }
  .archive-sidebar { max-height: 600px; }
  .weapon-grid { grid-template-columns: 1fr; max-height: 330px; }
  .weapon-card:nth-child(odd) { border-right: 0; }
  .weapon-stage { display: grid; grid-template-columns: 1fr; grid-template-rows: auto auto; }
  .music-credit-card { grid-template-columns: 1fr; }
  .music-rights { grid-column: 1; }
  .weapon-canvas-wrap { min-height: 0; aspect-ratio: 16 / 10; }
  .weapon-info { border-top: 1px solid var(--line); border-left: 0; }
  .sound-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 520px) {
  .site-nav { align-items: center; }
  .site-brand strong { font-size: 23px; letter-spacing: 3px; }
  .site-wrap { width: calc(100% - 28px); }
  .route-hero { padding-top: 64px; }
  .route-hero h1 { font-size: clamp(55px,18vw,84px); }
  .archive-controls { padding: 14px; }
  .archive-sidebar { max-height: 540px; }
  .weapon-canvas-wrap { min-height: 0; aspect-ratio: 4 / 3; }
  .weapon-info { padding: 26px 20px; }
  .sound-list { grid-template-columns: 1fr; }
  .music-credit-list { grid-template-columns: 1fr; }
  .music-credit-artists { grid-column: 1; }
  .weapon-card { min-height: 66px; }
  .credit-list, .feature-list { grid-template-columns: 1fr; }
  .control-table { font-size: 10px; }
  .control-table td, .control-table th { padding-inline: 8px; }
  .audio-dock { grid-template-columns: auto minmax(0,1fr); }
  .dock-kind { display: none; }
  .site-footer-inner { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
