/* ============================================================
   griffithee.github.io — Design System
   ============================================================ */

:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --border: #30363d;
  --border-subtle: #21262d;

  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #484f58;

  --accent-blue: #58a6ff;
  --accent-green: #3fb950;
  --accent-orange: #d29922;
  --accent-red: #f85149;
  --accent-purple: #bc8cff;
  --accent-teal: #39d353;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', ui-monospace, monospace;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --max-width: 1100px;
  --nav-height: 64px;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}
body.game-page {
  background:
    radial-gradient(circle at top, rgba(88, 166, 255, 0.09), transparent 34%),
    radial-gradient(circle at 82% 12%, rgba(210, 153, 34, 0.08), transparent 30%),
    linear-gradient(180deg, #0a1018 0%, #0b1119 42%, #05070b 100%);
}
a { color: var(--accent-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
ul { list-style: none; }

/* ── Typography ───────────────────────────────────────────── */
h1 { font-size: 2.5rem; font-weight: 700; line-height: 1.2; }
h2 { font-size: 1.75rem; font-weight: 600; line-height: 1.3; }
h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.4; }
h4 { font-size: 1rem; font-weight: 600; }
p { color: var(--text-secondary); margin-bottom: var(--space-4); }
p:last-child { margin-bottom: 0; }
code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* ── Navigation ───────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(13, 17, 23, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.nav-logo span { color: var(--accent-blue); }

.nav-links {
  display: flex;
  gap: var(--space-6);
}
.nav-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: color 0.15s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text-primary);
  text-decoration: none;
}

/* ── Layout ───────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section {
  padding: var(--space-16) 0;
}

.section + .section {
  border-top: 1px solid var(--border-subtle);
}

.section-header {
  margin-bottom: var(--space-8);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-2);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.section-desc {
  color: var(--text-secondary);
  max-width: 60ch;
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
}

.card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-1px);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-4);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-3);
  gap: var(--space-2);
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-title a {
  color: var(--text-primary);
}
.card-title a:hover { color: var(--accent-blue); text-decoration: none; }

.card-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
  line-height: 1.5;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* ── Tags / Badges ────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 500;
  font-family: var(--font-mono);
  border: 1px solid currentColor;
  white-space: nowrap;
}
.tag-blue  { color: var(--accent-blue); }
.tag-green { color: var(--accent-green); }
.tag-orange { color: var(--accent-orange); }
.tag-red   { color: var(--accent-red); }
.tag-gray  { color: var(--text-secondary); }
.tag-purple { color: var(--accent-purple); }

.agent-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.65rem;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.agent-grok   { background: rgba(188, 140, 255, 0.12); color: var(--accent-purple); }
.agent-claude { background: rgba(88, 166, 255, 0.12); color: var(--accent-blue); }
.agent-codex  { background: rgba(63, 185, 80, 0.12); color: var(--accent-green); }
.agent-hermes { background: rgba(210, 153, 34, 0.12); color: var(--accent-orange); }

/* ── Status indicators ────────────────────────────────────── */
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.active     { background: var(--accent-green); box-shadow: 0 0 6px var(--accent-green); }
.status-dot.dispatched { background: var(--accent-blue); }
.status-dot.returning  { background: var(--accent-orange); }
.status-dot.closed     { background: var(--text-muted); }
.status-dot.blocked    { background: var(--accent-red); }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  padding: var(--space-24) 0 var(--space-16);
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-blue);
  margin-bottom: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--accent-blue);
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--space-6);
  letter-spacing: -0.02em;
}

.hero-title em {
  font-style: normal;
  color: var(--accent-blue);
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 52ch;
  margin-bottom: var(--space-8);
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
}

.btn-primary {
  background: var(--accent-blue);
  color: #0d1117;
}
.btn-primary:hover { background: #79b8ff; text-decoration: none; color: #0d1117; }

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}
.btn-secondary:hover {
  border-color: var(--text-secondary);
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding-left: 0;
  padding-right: 0;
}
.btn-ghost:hover { color: var(--text-primary); text-decoration: none; }

/* ── Chain Visualizer ─────────────────────────────────────── */
.visualizer-wrap {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.visualizer-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  background: var(--bg-tertiary);
  flex-wrap: wrap;
}

.visualizer-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  flex: 1;
}

.filter-btns {
  display: flex;
  gap: var(--space-1);
}

.filter-btn {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.filter-btn:hover { border-color: var(--text-secondary); color: var(--text-primary); }
.filter-btn.active { border-color: var(--accent-blue); color: var(--accent-blue); background: rgba(88, 166, 255, 0.08); }

.visualizer-body {
  padding: var(--space-4);
  min-height: 380px;
}

/* Chain tree view */
.chain-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.chain-root-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s;
}
.chain-root-item:hover { border-color: var(--border); }
.chain-root-item.selected { border-color: var(--accent-blue); }

.chain-root-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-tertiary);
  cursor: pointer;
  user-select: none;
}
.chain-root-header:hover { background: rgba(88, 166, 255, 0.04); }

.chain-toggle {
  color: var(--text-muted);
  font-size: 0.75rem;
  width: 14px;
  transition: transform 0.2s;
}
.chain-toggle.open { transform: rotate(90deg); }

.chain-root-slug {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-primary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chain-root-date {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.chain-delegations {
  display: none;
  border-top: 1px solid var(--border-subtle);
}
.chain-delegations.open { display: block; }

.delegation-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4) var(--space-2) 40px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: background 0.15s;
  cursor: pointer;
}
.delegation-item:last-child { border-bottom: none; }
.delegation-item:hover { background: rgba(88, 166, 255, 0.04); color: var(--text-primary); }
.delegation-item.selected { background: rgba(88, 166, 255, 0.06); color: var(--text-primary); }

.delegation-connector {
  color: var(--text-muted);
  flex-shrink: 0;
}

.delegation-slug {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.no-delegations {
  padding: var(--space-3) var(--space-4) var(--space-3) 40px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Detail panel */
.chain-detail-panel {
  margin-top: var(--space-4);
  padding: var(--space-4);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: none;
}
.chain-detail-panel.visible { display: block; }

.detail-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  word-break: break-all;
}

.detail-grid {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: var(--space-2) var(--space-4);
  font-size: 0.82rem;
}

.detail-label {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.detail-value {
  color: var(--text-secondary);
}

/* ── Stat Cards (mini) ────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--accent-blue);
  line-height: 1;
  margin-bottom: var(--space-1);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ── Timeline ─────────────────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: var(--space-6);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-6);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-6) - 4px);
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
}

.timeline-item.done::before { border-color: var(--accent-green); background: var(--accent-green); }
.timeline-item.active::before { border-color: var(--accent-blue); background: var(--accent-blue); }

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.timeline-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.timeline-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* ── Callout ──────────────────────────────────────────────── */
.callout {
  background: rgba(88, 166, 255, 0.06);
  border: 1px solid rgba(88, 166, 255, 0.2);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-6);
}

.callout-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-2);
}

/* ── Arcade Game ─────────────────────────────────────────── */
.game-header {
  position: relative;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.75fr);
  gap: var(--space-6);
  align-items: start;
}

.game-stage-card {
  position: relative;
  overflow: hidden;
  padding: var(--space-4);
  border-radius: 20px;
  border: 1px solid rgba(88, 166, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(22, 27, 34, 0.96), rgba(13, 17, 23, 0.94)),
    var(--bg-secondary);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.36);
}

.game-stage-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 12%, rgba(88, 166, 255, 0.12), transparent 28%),
    radial-gradient(circle at 88% 14%, rgba(210, 153, 34, 0.09), transparent 22%),
    radial-gradient(circle at 50% 102%, rgba(57, 211, 83, 0.08), transparent 28%);
  pointer-events: none;
}

.game-topbar {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.game-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(4, 7, 11, 0.46);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.game-pill strong {
  color: var(--text-primary);
  font-size: 0.78rem;
}

.game-pill-button {
  cursor: pointer;
  color: var(--text-primary);
  background: rgba(88, 166, 255, 0.08);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.game-pill-button:hover {
  border-color: rgba(88, 166, 255, 0.55);
  background: rgba(88, 166, 255, 0.14);
  text-decoration: none;
}

.game-pill-button.active {
  border-color: var(--accent-blue);
  background: rgba(88, 166, 255, 0.18);
  color: var(--accent-blue);
}

.game-canvas-shell {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(88, 166, 255, 0.16);
  background:
    radial-gradient(circle at top, rgba(88, 166, 255, 0.08), transparent 38%),
    linear-gradient(180deg, rgba(6, 10, 14, 0.55), rgba(4, 6, 9, 0.95));
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

.game-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  background: linear-gradient(180deg, rgba(4, 7, 11, 0.2), rgba(4, 7, 11, 0.88));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.game-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.game-overlay-panel {
  max-width: 420px;
  text-align: center;
}

.game-overlay-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: var(--space-3);
  color: var(--accent-blue);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.game-overlay-kicker::before {
  content: '';
  width: 18px;
  height: 1px;
  background: currentColor;
}

.game-overlay h2 {
  margin-bottom: var(--space-3);
  font-size: clamp(1.6rem, 3.5vw, 2.35rem);
  line-height: 1.08;
}

.game-overlay p {
  max-width: 38ch;
  color: var(--text-secondary);
  font-size: 0.96rem;
}

.game-overlay-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-4);
}

.game-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.game-note {
  background: rgba(22, 27, 34, 0.9);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: var(--space-5);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
}

.game-note-title {
  margin-bottom: var(--space-3);
  color: var(--accent-blue);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.game-list {
  display: grid;
  gap: var(--space-3);
}

.game-list-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.game-list-item p {
  margin-bottom: 0;
  font-size: 0.88rem;
}

.game-key {
  min-width: 2.2rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(88, 166, 255, 0.07);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-align: center;
  flex-shrink: 0;
}

.mobile-controls {
  display: none;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.touch-control {
  flex: 1;
  min-height: 52px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(88, 166, 255, 0.08), rgba(13, 17, 23, 0.68));
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}

.touch-control:hover,
.touch-control:active {
  transform: translateY(-1px);
  border-color: rgba(88, 166, 255, 0.58);
}

.touch-fire {
  background: linear-gradient(180deg, rgba(63, 185, 80, 0.12), rgba(13, 17, 23, 0.68));
}

/* ── Footer ───────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: var(--space-8) 0;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.footer-links {
  display: flex;
  gap: var(--space-4);
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--text-primary); text-decoration: none; }

/* ── Page header (inner pages) ────────────────────────────── */
.page-header {
  padding: var(--space-12) 0 var(--space-8);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-12);
}

.page-header-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-blue);
  margin-bottom: var(--space-3);
}

.page-header-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: var(--space-3);
  letter-spacing: -0.02em;
}

.page-header-desc {
  color: var(--text-secondary);
  max-width: 60ch;
  font-size: 1rem;
}

/* ── Highlight box ────────────────────────────────────────── */
.highlight-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: start;
}

/* ── Misc ─────────────────────────────────────────────────── */
.text-mono { font-family: var(--font-mono); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-primary-color { color: var(--accent-blue); }

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-8) 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .highlight-row { grid-template-columns: 1fr; }
  .game-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  nav { }
  .nav-inner { padding: 0 var(--space-4); }
  .nav-links { gap: var(--space-4); }
  .hero { padding: var(--space-16) 0 var(--space-12); }
  .hero-title { font-size: 2rem; }
  .container { padding: 0 var(--space-4); }
  .section { padding: var(--space-12) 0; }
  .card-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .mobile-controls { display: flex; }
  .game-stage-card { padding: var(--space-3); }
  .game-topbar { gap: var(--space-2); }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.75rem; }
  h2 { font-size: 1.4rem; }
  .nav-links { gap: var(--space-3); }
  .visualizer-toolbar { flex-direction: column; align-items: flex-start; }
  .game-pill { font-size: 0.66rem; padding: 0.34rem 0.58rem; }
  .game-overlay { padding: var(--space-4); }
  .game-overlay h2 { font-size: 1.4rem; }
}
