/* ============================================
   BRUTALIST / RAW STYLESHEET
   Monochromatic + Single Accent (#ff3c00)
   With Raw Mechanical Animations
   
   Updated: 2026-03-30
   Changes:
   - Added grain overlay animation
   - Added staggered section reveals
   - Added glitch hover effects on headers
   - Added terminal-style log animations
   - Added volume slider with static colors
   - Fixed loop badge with accent background
   - Added click-to-start overlay styles
   - Fixed header text glitch on hover
   - Added prefers-reduced-motion support
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;700&family=Space+Mono:wght@400;700&display=swap');

/* ── DEFAULT: DARK + ORANGE ── */
:root {
  --bg:        #0e0e0e;
  --surface:   #1a1a1a;
  --border:    #333333;
  --text:      #d4d4d4;
  --muted:     #666666;
  --accent:    #ff3c00;
  --white:     #f0f0f0;
  --player-h:  90px;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-head: 'Space Mono', monospace;
  
  /* Animation timing — raw, no easing */
  --snap: steps(1);
  --stagger: steps(2);
}

/* ── LIGHT MODE ── */
:root[data-theme="light"] {
  --bg:        #e8e8e8;
  --surface:   #d6d6d6;
  --border:    #b0b0b0;
  --text:      #1a1a1a;
  --muted:     #666666;
  --white:     #0e0e0e;
}

/* ── ACCENT THEMES ── */
:root[data-accent="orange"] { --accent: #ff3c00; }
:root[data-accent="green"]  { --accent: #00ff41; }
:root[data-accent="blue"]   { --accent: #0080ff; }
:root[data-accent="pink"]   { --accent: #ff2d7b; }
:root[data-accent="yellow"] { --accent: #ffd600; }

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  scroll-behavior: auto;
}

/* ─────────────────────────────────────────────────────────────
   SCROLLBAR
   ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ─────────────────────────────────────────────────────────────
   LAYOUT
   ───────────────────────────────────────────────────────────── */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
  padding: 0 0 calc(var(--player-h) + 20px) 0;
}

/* ─────────────────────────────────────────────────────────────
   NOISE GRAIN OVERLAY — ANIMATED
   ───────────────────────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-size: 128px 128px;
  animation: grain-shift 0.25s var(--snap) infinite;
}

@keyframes grain-shift {
  0%, 100% { background-position: 0 0; }
  25% { background-position: -15px 8px; }
  50% { background-position: 8px -15px; }
  75% { background-position: -8px 15px; }
}

/* ─────────────────────────────────────────────────────────────
   AUTOPLAY OVERLAY
   ───────────────────────────────────────────────────────────── */
#autoplay-overlay {
  font-family: 'IBM Plex Mono', monospace;
}

/* ─────────────────────────────────────────────────────────────
   NAVIGATION — SNAP IN
   ───────────────────────────────────────────────────────────── */
nav {
  border-bottom: 2px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
  
  animation: nav-snap 0.35s var(--snap) forwards;
  opacity: 0;
  transform: translateY(-100%);
}

@keyframes nav-snap {
  0% { opacity: 0; transform: translateY(-100%); }
  100% { opacity: 1; transform: translateY(0); }
}

nav .logo {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
}

nav .logo span {
  color: var(--accent);
  animation: accent-blink 3s var(--snap) infinite;
}

@keyframes accent-blink {
  0%, 85% { opacity: 1; }
  90% { opacity: 0.2; }
  95% { opacity: 1; }
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav ul li a {
  color: var(--muted);
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: none;
  position: relative;
  padding: 4px 0;
}

nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: none;
}

nav ul li a:hover,
nav ul li a.active {
  color: var(--accent);
}

nav ul li a:hover::after,
nav ul li a.active::after {
  width: 100%;
}

/* ── THEME CONTROLS ── */
.theme-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 8px;
  cursor: pointer;
  transition: none;
  white-space: nowrap;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: transparent;
}

.accent-swatches {
  display: flex;
  gap: 4px;
  align-items: center;
}

.accent-swatch {
  width: 14px;
  height: 14px;
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 0;
  transition: none;
  position: relative;
}

.accent-swatch:hover,
.accent-swatch.active {
  border-color: var(--white);
  outline: 2px solid var(--white);
  outline-offset: 1px;
}

.accent-swatch[data-color="orange"] { background: #ff3c00; }
.accent-swatch[data-color="green"]  { background: #00ff41; }
.accent-swatch[data-color="blue"]   { background: #0080ff; }
.accent-swatch[data-color="pink"]   { background: #ff2d7b; }
.accent-swatch[data-color="yellow"] { background: #ffd600; }

/* ─────────────────────────────────────────────────────────────
   PAGE HEADER — GLITCH REVEAL
   ───────────────────────────────────────────────────────────── */
.page-header {
  border-bottom: 1px solid var(--border);
  padding: 3rem 2rem 2rem;
  
  animation: header-reveal 0.5s var(--stagger) forwards;
  opacity: 0;
  transform: translateY(15px);
}

@keyframes header-reveal {
  0% { opacity: 0; transform: translateY(15px); }
  100% { opacity: 1; transform: translateY(0); }
}

.page-header .label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
  
  animation: label-type 0.15s var(--snap) forwards;
  animation-delay: 0.2s;
  opacity: 0;
}

@keyframes label-type {
  0% { opacity: 0; transform: translateX(-8px); }
  100% { opacity: 1; transform: translateX(0); }
}

.page-header h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--white);
  letter-spacing: -0.02em;
  
  animation: h1-snap 0.2s var(--snap) forwards;
  animation-delay: 0.3s;
  opacity: 0;
}

@keyframes h1-snap {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.page-header h1 .accent {
  color: var(--accent);
  display: inline-block;
  animation: accent-glitch 0.1s var(--snap) forwards;
  animation-delay: 0.4s;
  opacity: 0;
}

@keyframes accent-glitch {
  0% { opacity: 0; transform: translateX(3px); }
  50% { opacity: 1; transform: translateX(-1px); }
  100% { opacity: 1; transform: translateX(0); }
}

/* Glitch hover effect on h1 */
.page-header h1:hover {
  animation: text-glitch 0.12s var(--snap);
}

@keyframes text-glitch {
  0%, 100% { 
    transform: translateX(0); 
    text-shadow: none;
    opacity: 1;
  }
  20% { 
    transform: translateX(-3px); 
    text-shadow: 3px 0 var(--accent);
    opacity: 1;
  }
  40% { 
    transform: translateX(3px); 
    text-shadow: -3px 0 cyan;
    opacity: 1;
  }
  60% { 
    transform: translateX(-1px); 
    text-shadow: 2px 0 var(--accent);
    opacity: 1;
  }
  80% { 
    transform: translateX(1px); 
    text-shadow: -1px 0 var(--accent);
    opacity: 1;
  }
}

/* ── CENTERED HEADER VARIANT ── */
.page-header.centered {
  text-align: center;
}

.page-header.centered .label {
  justify-content: center;
}

/* ─────────────────────────────────────────────────────────────
   CONTENT SECTIONS — STAGGERED LOAD
   ───────────────────────────────────────────────────────────── */
.section {
  padding: 2.5rem 2rem;
  border-bottom: 1px solid var(--border);
  
  opacity: 0;
  transform: translateY(20px);
  animation: section-reveal 0.4s var(--snap) forwards;
}

.section:nth-of-type(1) { animation-delay: 0.15s; }
.section:nth-of-type(2) { animation-delay: 0.25s; }
.section:nth-of-type(3) { animation-delay: 0.35s; }
.section:nth-of-type(4) { animation-delay: 0.45s; }
.section:nth-of-type(5) { animation-delay: 0.55s; }
.section:nth-of-type(6) { animation-delay: 0.65s; }

@keyframes section-reveal {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.section-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  
  animation: line-extend 0.3s var(--snap) forwards;
  transform-origin: left;
}

@keyframes line-extend {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

p {
  max-width: 68ch;
  color: var(--text);
  margin-bottom: 1rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: none;
}

a:hover {
  border-bottom-color: var(--accent);
}

/* ─────────────────────────────────────────────────────────────
   DATA/STAT BLOCKS — NUMBER DROP
   ───────────────────────────────────────────────────────────── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0;
  border: 1px solid var(--border);
  margin-top: 1.5rem;
}

.stat {
  padding: 1.25rem;
  border-right: 1px solid var(--border);
  position: relative;
}

.stat:last-child {
  border-right: none;
}

.stat .num {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  
  animation: num-drop 0.35s var(--stagger) forwards;
  opacity: 0;
  transform: translateY(-25px);
}

@keyframes num-drop {
  0% { opacity: 0; transform: translateY(-25px); }
  60% { opacity: 1; transform: translateY(4px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Stagger stats */
.stat:nth-child(1) .num { animation-delay: 0.25s; }
.stat:nth-child(2) .num { animation-delay: 0.35s; }
.stat:nth-child(3) .num { animation-delay: 0.45s; }
.stat:nth-child(4) .num { animation-delay: 0.55s; }

.stat .num .accent {
  color: var(--accent);
  animation: accent-pulse 2.5s var(--snap) infinite;
}

@keyframes accent-pulse {
  0%, 92% { opacity: 1; }
  95% { opacity: 0.4; }
  97% { opacity: 1; }
  99% { opacity: 0.4; }
}

.stat .key {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.25rem;
  
  animation: key-slide 0.25s var(--snap) forwards;
  animation-delay: 0.4s;
  opacity: 0;
}

@keyframes key-slide {
  0% { opacity: 0; transform: translateX(-10px); }
  100% { opacity: 1; transform: translateX(0); }
}

.stat:nth-child(1) .key { animation-delay: 0.35s; }
.stat:nth-child(2) .key { animation-delay: 0.45s; }
.stat:nth-child(3) .key { animation-delay: 0.55s; }
.stat:nth-child(4) .key { animation-delay: 0.65s; }

/* ─────────────────────────────────────────────────────────────
   LIST/LOG STYLE — TERMINAL OUTPUT
   ───────────────────────────────────────────────────────────── */
.log-list {
  list-style: none;
}

.log-list li {
  display: flex;
  gap: 1.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
  position: relative;
  
  opacity: 0;
  animation: log-type 0.1s var(--snap) forwards;
}

.log-list li:nth-child(1) { animation-delay: 0.2s; }
.log-list li:nth-child(2) { animation-delay: 0.28s; }
.log-list li:nth-child(3) { animation-delay: 0.36s; }
.log-list li:nth-child(4) { animation-delay: 0.44s; }
.log-list li:nth-child(5) { animation-delay: 0.52s; }

@keyframes log-type {
  0% { opacity: 0; transform: translateX(-6px); }
  100% { opacity: 1; transform: translateX(0); }
}

.log-list li:last-child {
  border-bottom: none;
}

/* Hover highlight */
.log-list li::before {
  content: '';
  position: absolute;
  left: -1rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  opacity: 0;
  transition: none;
}

.log-list li:hover::before {
  opacity: 1;
}

.log-list li:hover {
  background: var(--surface);
  margin-left: -0.5rem;
  padding-left: 0.5rem;
  margin-right: -0.5rem;
  padding-right: 0.5rem;
}

.log-list .ts {
  font-size: 11px;
  color: var(--accent);
  min-width: 80px;
  letter-spacing: 0.05em;
}

.log-list .entry {
  color: var(--text);
}

/* ─────────────────────────────────────────────────────────────
   404 PAGE — GLITCH ERROR
   ───────────────────────────────────────────────────────────── */
.not-found-wrap {
  padding: 4rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.not-found-wrap .code {
  font-family: var(--font-head);
  font-size: clamp(6rem, 20vw, 14rem);
  font-weight: 700;
  color: var(--border);
  line-height: 1;
  letter-spacing: -0.05em;
  position: relative;
  
  animation: none;
}

.not-found-wrap .code:hover {
  animation: code-glitch 0.12s var(--snap) infinite;
}

@keyframes code-glitch {
  0%, 100% { transform: translateX(0); text-shadow: none; }
  20% { transform: translateX(-4px); text-shadow: 3px 0 var(--accent); }
  40% { transform: translateX(4px); text-shadow: -3px 0 cyan; }
  60% { transform: translateX(-2px); text-shadow: 2px 0 var(--accent), -2px 0 cyan; }
  80% { transform: translateX(2px); text-shadow: -2px 0 var(--accent); }
}

.not-found-wrap .code .accent {
  color: var(--accent);
}

.not-found-wrap .msg {
  font-size: 1.1rem;
  color: var(--white);
  max-width: 40ch;
}

/* ── BUTTON ── */
.btn {
  display: inline-block;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.6rem 1.2rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: none;
  width: fit-content;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform: translateX(-100%);
  z-index: -1;
  transition: none;
}

.btn:hover {
  color: #000;
}

.btn:hover::before {
  animation: btn-fill 0.2s var(--snap) forwards;
}

@keyframes btn-fill {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(0); }
}

/* ─────────────────────────────────────────────────────────────
   PERSISTENT AUDIO PLAYER — MECHANICAL
   ───────────────────────────────────────────────────────────── */
#player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--player-h);
  background: var(--surface);
  border-top: 2px solid var(--accent);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0 2rem;
  z-index: 999;
  font-family: var(--font-mono);
  
  animation: player-snap 0.45s var(--snap) forwards;
  opacity: 0;
  transform: translateY(100%);
}

@keyframes player-snap {
  0% { opacity: 0; transform: translateY(100%); }
  100% { opacity: 1; transform: translateY(0); }
}

/* track info */
#player-bar .track-info {
  display: flex;
  flex-direction: column;
  min-width: 180px;
}

#player-bar .track-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

#player-bar .track-sub {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

/* play/pause button */
#play-btn,
#prev-btn,
#next-btn {
  width: 42px;
  height: 42px;
  border: 2px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: none;
  font-size: 14px;
}

#prev-btn,
#next-btn {
  width: 32px;
  height: 32px;
  border-color: var(--border);
  color: var(--muted);
}

#play-btn:hover,
#prev-btn:hover,
#next-btn:hover {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

#play-btn:active,
#prev-btn:active,
#next-btn:active {
  transform: scale(0.92);
}

/* seek bar */
.seek-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 100px;
}

.time-row {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
}

input[type="range"].seek-bar,
input[type="range"].vol-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  background: var(--border);
  outline: none;
  cursor: pointer;
  border-radius: 0;
}

input[type="range"].seek-bar::-webkit-slider-thumb,
input[type="range"].vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 0;
  cursor: pointer;
  border: none;
}

input[type="range"].seek-bar::-moz-range-thumb,
input[type="range"].vol-slider::-moz-range-thumb {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 0;
  border: none;
  cursor: pointer;
}

/* ── VOLUME SLIDER WITH DISPLAY ── */
.vol-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.vol-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vol-label {
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.vol-display {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text);
  min-width: 28px;
  text-align: right;
}

.vol-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 6px;
  background: var(--border);
  outline: none;
  cursor: pointer;
  border-radius: 0;
  border: 1px solid var(--border);
}

.vol-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  background: transparent;
  border-radius: 0;
}

.vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: var(--text);
  border-radius: 0;
  cursor: pointer;
  border: none;
  margin-top: -4px;
  transition: none;
}

.vol-slider::-webkit-slider-thumb:hover {
  background: var(--white);
}

.vol-slider::-moz-range-track {
  width: 100%;
  height: 6px;
  background: transparent;
  border-radius: 0;
}

.vol-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: var(--text);
  border-radius: 0;
  cursor: pointer;
  border: none;
}

.vol-slider::-moz-range-thumb:hover {
  background: var(--white);
}

.vol-slider:focus {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .vol-section {
    display: none;
  }
}

/* loop indicator */
.loop-badge {
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #0e0e0e;
  background: var(--accent);
  border: 1px solid var(--accent);
  padding: 4px 8px;
  flex-shrink: 0;
}

.loop-badge:hover {
  opacity: 0.8;
}

/* ── VISUALIZER ── */
.viz-wrap {
  flex-shrink: 0;
  border: 1px solid var(--border);
  line-height: 0;
  overflow: hidden;
}

#viz-canvas {
  display: block;
  image-rendering: pixelated;
}

/* ─────────────────────────────────────────────────────────────
   SITE FOOTER
   ───────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 2rem calc(var(--player-h) + 2rem);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  
  animation: footer-reveal 0.3s var(--snap) forwards;
  animation-delay: 0.6s;
  opacity: 0;
}

@keyframes footer-reveal {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.site-footer .footer-date {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0;
}

.site-footer .footer-copy {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0;
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  nav {
    padding: 0.5rem 1rem;
  }
  
  nav ul {
    gap: 1rem;
  }
  
  nav .logo {
    font-size: 11px;
  }
  
  nav ul li a {
    font-size: 10px;
  }
  
  #player-bar {
    gap: 0.75rem;
    padding: 0 1rem;
  }
  
  .track-info {
    min-width: 100px;
  }
  
  .track-title {
    max-width: 100px;
  }
  
  .accent-swatches {
    display: none;
  }
  
  .theme-controls {
    gap: 0.4rem;
  }
  
  .stat-row {
    grid-template-columns: 1fr 1fr;
  }
  
  .log-list li {
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .log-list .ts {
    min-width: unset;
  }
}

@media (max-width: 400px) {
  .stat-row {
    grid-template-columns: 1fr;
  }
  
  .stat {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  
  .stat:last-child {
    border-bottom: none;
  }
}

/* ─────────────────────────────────────────────────────────────
   ACCESSIBILITY — REDUCED MOTION
   ───────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
  
  .section,
  .page-header,
  .stat .num,
  .stat .key,
  .log-list li,
  nav,
  #player-bar,
  .site-footer {
    opacity: 1 !important;
    transform: none !important;
  }
  
  body::before {
    animation: none;
  }
}

/* ─────────────────────────────────────────────────────────────
   FOCUS STATES
   ───────────────────────────────────────────────────────────── */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ─────────────────────────────────────────────────────────────
   SELECTION
   ───────────────────────────────────────────────────────────── */
::selection {
  background: var(--accent);
  color: #000;
}

/* ─────────────────────────────────────────────────────────────
   SCREEN READER ONLY
   ───────────────────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─────────────────────────────────────────────────────────────
   PRINT STYLES
   ───────────────────────────────────────────────────────────── */
@media print {
  nav,
  #player-bar,
  .site-footer,
  body::before,
  #autoplay-overlay {
    display: none !important;
  }
  
  main {
    padding: 0;
  }
  
  body {
    background: white;
    color: black;
  }
}
