/* ==========================================================================
   Friendly Steps Wiki - Game-Native Asset-Driven Design System
   Samplings: Midnight Neon Urban Asphalt, Warning Yellow, Rope Amber, Vomit Green
   ========================================================================== */

:root {
  --color-bg: #0d111a;
  --color-bg-alt: #131a29;
  --color-surface: #182236;
  --color-surface-card: #1f2c45;
  --color-surface-hover: #273756;
  --color-surface-subtle: rgba(24, 34, 54, 0.7);

  --color-brand: #facc15;
  --color-brand-light: #fef08a;
  --color-brand-dark: #ca8a04;
  --color-brand-glow: rgba(250, 204, 21, 0.35);

  --color-accent-pink: #f43f5e;
  --color-accent-pink-glow: rgba(244, 63, 94, 0.3);
  --color-accent-purple: #a855f7;
  --color-accent-purple-glow: rgba(168, 85, 247, 0.3);
  --color-accent-green: #22c55e;
  --color-accent-green-glow: rgba(34, 197, 94, 0.3);
  --color-accent-blue: #38bdf8;
  --color-accent-blue-glow: rgba(56, 189, 248, 0.3);
  --color-rope: #d97706;
  --color-rope-glow: rgba(217, 119, 6, 0.35);

  --color-text-main: #f8fafc;
  --color-text-muted: #94a3b8;
  --color-text-dim: #64748b;
  --color-border: rgba(250, 204, 21, 0.2);
  --color-border-subtle: rgba(255, 255, 255, 0.1);

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-neon-yellow: 0 0 20px rgba(250, 204, 21, 0.25);
  --shadow-neon-pink: 0 0 20px rgba(244, 63, 94, 0.25);
  --shadow-neon-green: 0 0 20px rgba(34, 197, 94, 0.25);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text-main);
  line-height: 1.6;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(250, 204, 21, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(244, 63, 94, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(56, 189, 248, 0.04) 0%, transparent 50%);
  background-attachment: fixed;
}

a {
  color: var(--color-brand);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--color-brand-light);
  text-decoration: underline;
}

/* ==========================================================================
   Header & Mega Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(13, 17, 26, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  text-decoration: none;
}

.brand-logo:hover {
  text-decoration: none;
}

.logo-beer {
  font-size: 1.6rem;
  display: inline-block;
  animation: beer-wobble 3s infinite ease-in-out;
}

@keyframes beer-wobble {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-8deg) scale(1.05); }
  75% { transform: rotate(8deg) scale(0.98); }
}

.brand-text {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.brand-badge {
  background: linear-gradient(135deg, var(--color-brand), var(--color-brand-dark));
  color: #000;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.meta-appid {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-item {
  position: relative;
}

.nav-link {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
  text-decoration: none;
}

.nav-link:hover, .nav-item:hover .nav-link {
  color: #fff;
  background: var(--color-surface-hover);
  text-decoration: none;
}

/* Mega Dropdown */
.mega-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 720px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg), var(--shadow-neon-yellow);
  padding: 1.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1100;
}

.nav-item:hover .mega-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.mega-column h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-brand);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border-bottom: 1px solid rgba(250, 204, 21, 0.2);
  padding-bottom: 0.4rem;
}

.mega-column ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.mega-column a {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  display: block;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius-xs);
  text-decoration: none;
  transition: all 0.15s ease;
}

.mega-column a:hover {
  color: #fff;
  background: var(--color-surface-card);
  transform: translateX(4px);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #facc15, #eab308);
  color: #000;
  box-shadow: 0 4px 14px rgba(250, 204, 21, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #fde047, #facc15);
  box-shadow: 0 6px 20px rgba(250, 204, 21, 0.5);
  color: #000;
}

.btn-secondary {
  background: var(--color-surface-card);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-brand);
  color: var(--color-brand);
}

/* ==========================================================================
   Ad Surface Container
   ========================================================================== */

.ad-surface-container {
  max-width: 1360px;
  margin: 1rem auto 0;
  padding: 0 1.5rem;
}

.ad-banner {
  background: linear-gradient(90deg, rgba(24, 34, 54, 0.9), rgba(31, 44, 69, 0.9));
  border: 1px dashed rgba(250, 204, 21, 0.3);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.ad-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-brand);
  background: rgba(250, 204, 21, 0.12);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-xs);
  font-weight: 800;
}

.ad-content {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.ad-content strong {
  color: #fff;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
  max-width: 1360px;
  margin: 1.5rem auto 2.5rem;
  padding: 0 1.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: center;
  background: linear-gradient(135deg, rgba(24, 34, 54, 0.8) 0%, rgba(19, 26, 41, 0.95) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg), var(--shadow-neon-yellow);
  position: relative;
  overflow: hidden;
}

.hero-grid::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(250, 204, 21, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.tag-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-physics {
  background: rgba(250, 204, 21, 0.15);
  color: var(--color-brand);
  border: 1px solid rgba(250, 204, 21, 0.35);
}

.badge-coop {
  background: rgba(244, 63, 94, 0.15);
  color: var(--color-accent-pink);
  border: 1px solid rgba(244, 63, 94, 0.35);
}

.badge-release {
  background: rgba(34, 197, 94, 0.15);
  color: var(--color-accent-green);
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 1rem;
}

.hero-title .highlight {
  color: var(--color-brand);
  text-shadow: 0 0 25px rgba(250, 204, 21, 0.4);
}

.hero-lead {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-val {
  font-size: 1.4rem;
  font-weight: 900;
  color: #fff;
  font-family: var(--font-mono);
}

.stat-val.gold { color: var(--color-brand); }
.stat-val.pink { color: var(--color-accent-pink); }
.stat-val.green { color: var(--color-accent-green); }
.stat-val.blue { color: var(--color-accent-blue); }

.stat-lbl {
  font-size: 0.75rem;
  color: var(--color-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.hero-media {
  position: relative;
}

.hero-img-wrap {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--color-brand);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(250, 204, 21, 0.3);
}

.hero-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.hero-img-wrap:hover img {
  transform: scale(1.03);
}

.hero-overlay-tag {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(250, 204, 21, 0.5);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ==========================================================================
   Layout Main & Sidebar
   ========================================================================== */

.main-layout {
  max-width: 1360px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
}

/* Sticky TOC */
.sidebar-toc {
  position: sticky;
  top: 5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
}

.toc-title {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-brand);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.toc-link {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-xs);
  display: block;
  transition: all 0.2s ease;
  border-left: 2px solid transparent;
}

.toc-link:hover {
  color: #fff;
  background: var(--color-surface-card);
  border-left-color: var(--color-brand);
  text-decoration: none;
  transform: translateX(3px);
}

/* Content Area */
.content-area {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* ==========================================================================
   Direct Answer Component (data-role="direct-answer")
   ========================================================================== */

.direct-answer-card {
  background: linear-gradient(135deg, rgba(31, 44, 69, 0.95), rgba(24, 34, 54, 0.98));
  border: 2px solid var(--color-brand);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg), var(--shadow-neon-yellow);
  position: relative;
}

.direct-answer-badge {
  position: absolute;
  top: -14px;
  left: 24px;
  background: linear-gradient(135deg, #facc15, #eab308);
  color: #000;
  font-weight: 900;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.85rem;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 12px rgba(250, 204, 21, 0.4);
}

.direct-answer-header h2 {
  font-size: 1.65rem;
  font-weight: 900;
  color: #fff;
  margin-top: 0.25rem;
  margin-bottom: 0.75rem;
}

.direct-answer-header p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.strategy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.strategy-item {
  background: var(--color-surface-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: all 0.2s ease;
}

.strategy-item:hover {
  border-color: var(--color-brand);
  transform: translateY(-2px);
}

.strat-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--color-brand);
  background: rgba(250, 204, 21, 0.12);
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-xs);
  margin-bottom: 0.5rem;
}

.strategy-item h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.4rem;
}

.strategy-item p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   Reverse-Engineered HUD 1: Sobriety & Balance Meter
   ========================================================================== */

.hud-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.hud-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.hud-title-wrap h2 {
  font-size: 1.5rem;
  font-weight: 900;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hud-pill-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: rgba(250, 204, 21, 0.12);
  color: var(--color-brand);
  border: 1px solid rgba(250, 204, 21, 0.3);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}

.balance-meter-container {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1.75rem;
  background: var(--color-bg-alt);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

/* In-game HUD Mockups */
.hud-telemetry-box {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.biped-control-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.leg-card {
  background: var(--color-surface-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
  position: relative;
  transition: all 0.2s ease;
}

.leg-card.active {
  border-color: var(--color-brand);
  box-shadow: 0 0 15px rgba(250, 204, 21, 0.25);
}

.key-badge {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 900;
  color: #000;
  background: var(--color-brand);
  width: 40px;
  height: 40px;
  line-height: 40px;
  border-radius: var(--radius-sm);
  margin: 0 auto 0.5rem;
  display: block;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.leg-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
}

.leg-sub {
  font-size: 0.75rem;
  color: var(--color-text-dim);
}

/* Center of Gravity Tilt Gauge */
.cog-gauge-wrap {
  background: var(--color-surface-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
}

.cog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.tilt-meter-bar {
  height: 16px;
  background: #090d14;
  border-radius: var(--radius-full);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.tilt-zone-danger-left {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 25%;
  background: rgba(244, 63, 94, 0.4);
}

.tilt-zone-safe {
  position: absolute;
  left: 25%;
  top: 0;
  bottom: 0;
  width: 50%;
  background: rgba(34, 197, 94, 0.3);
}

.tilt-zone-danger-right {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 25%;
  background: rgba(244, 63, 94, 0.4);
}

.tilt-needle {
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: 52%;
  width: 6px;
  background: #fff;
  border-radius: var(--radius-full);
  box-shadow: 0 0 8px #fff;
  transition: left 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tilt-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--color-text-dim);
  margin-top: 0.4rem;
}

/* Stumble & Fall Counter HUD */
.ingame-capsules-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.stumble-capsule {
  background: #000;
  border: 2px solid #fff;
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 1.1rem;
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.speedrun-timer-capsule {
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xs);
  padding: 0.35rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-accent-pink);
}

.checkpoint-badge {
  background: #dc2626;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
}

/* Interactive Sandbox */
.interactive-sandbox {
  background: var(--color-surface-card);
  border: 1px solid rgba(250, 204, 21, 0.3);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sandbox-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--color-brand);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ragdoll-stage {
  height: 120px;
  background: #090d14;
  border-radius: var(--radius-xs);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ragdoll-avatar {
  font-size: 3rem;
  display: inline-block;
  transform-origin: bottom center;
  transition: transform 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.sandbox-status-text {
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  color: var(--color-accent-green);
  font-family: var(--font-mono);
}

.sandbox-controls-row {
  display: flex;
  gap: 0.75rem;
}

.btn-sandbox {
  flex: 1;
  padding: 0.6rem;
  font-size: 0.85rem;
  font-weight: 800;
  border-radius: var(--radius-xs);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--color-surface);
  color: #fff;
  transition: all 0.15s ease;
}

.btn-sandbox:hover {
  background: var(--color-brand);
  color: #000;
  border-color: var(--color-brand);
}

/* ==========================================================================
   Reverse-Engineered HUD 2: 1-4 Player Co-op Team Tether HUD
   ========================================================================== */

.tether-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.player-tether-card {
  background: var(--color-bg-alt);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
}

.player-tether-card.p1 { border-top: 4px solid #facc15; }
.player-tether-card.p2 { border-top: 4px solid #22c55e; }
.player-tether-card.p3 { border-top: 4px solid #ef4444; }
.player-tether-card.p4 { border-top: 4px solid #38bdf8; }

.p-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.p-name {
  font-weight: 800;
  font-size: 0.9rem;
  color: #fff;
}

.p-tag {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
}

.p1 .p-tag { background: rgba(250, 204, 21, 0.2); color: #facc15; }
.p2 .p-tag { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.p3 .p-tag { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.p4 .p-tag { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }

.p-skin-desc {
  font-size: 0.75rem;
  color: var(--color-text-dim);
}

.tether-state-pill {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius-xs);
  background: var(--color-surface-card);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.rope-tension-wrap {
  background: var(--color-bg-alt);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1.5rem;
  align-items: center;
}

.tension-bar-box h4 {
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
}

.rope-bar {
  height: 14px;
  background: #090d14;
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid rgba(217, 119, 6, 0.4);
}

.rope-fill {
  height: 100%;
  width: 82%;
  background: linear-gradient(90deg, #d97706, #f59e0b, #ef4444);
  border-radius: var(--radius-full);
  box-shadow: 0 0 10px rgba(217, 119, 6, 0.6);
}

.checkpoint-vote-hud {
  background: var(--color-surface-card);
  border: 1px solid rgba(244, 63, 94, 0.3);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vote-text {
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
}

.vote-badge {
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 1rem;
  color: var(--color-accent-pink);
  background: rgba(244, 63, 94, 0.15);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-xs);
}

/* ==========================================================================
   Hazard & Route Matrix
   ========================================================================== */

.hazard-matrix-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.hazard-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.hazard-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-brand);
  box-shadow: var(--shadow-md), var(--shadow-neon-yellow);
}

.hazard-img-wrap {
  height: 180px;
  position: relative;
  overflow: hidden;
}

.hazard-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.hazard-card:hover .hazard-img-wrap img {
  transform: scale(1.05);
}

.hazard-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  color: var(--color-brand);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(250, 204, 21, 0.4);
}

.hazard-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hazard-body h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.4rem;
}

.hazard-body p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.hazard-countermeasure {
  margin-top: auto;
  font-size: 0.75rem;
  color: var(--color-accent-green);
  background: rgba(34, 197, 94, 0.1);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-xs);
  border-left: 3px solid var(--color-accent-green);
}

/* ==========================================================================
   YouTube Facade Component
   ========================================================================== */

.yt-facade-container {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.yt-facade {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  cursor: pointer;
  border: 2px solid rgba(250, 204, 21, 0.3);
  box-shadow: var(--shadow-lg);
}

.yt-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.yt-facade:hover img {
  transform: scale(1.02);
  filter: brightness(1.1);
}

.yt-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #facc15, #eab308);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px rgba(250, 204, 21, 0.6);
  transition: all 0.2s ease;
}

.yt-facade:hover .yt-play-btn {
  transform: translate(-50%, -50%) scale(1.12);
  box-shadow: 0 0 40px rgba(250, 204, 21, 0.9);
}

.yt-play-icon {
  width: 0;
  height: 0;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-left: 22px solid #000;
  margin-left: 4px;
}

.yt-title-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
  padding: 1.5rem;
  color: #fff;
}

.yt-title-overlay h3 {
  font-size: 1.2rem;
  font-weight: 800;
}

.yt-title-overlay p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ==========================================================================
   HD Asset Matrix & Gallery
   ========================================================================== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.gallery-item {
  background: var(--color-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.25s ease;
  position: relative;
}

.gallery-item:hover {
  transform: translateY(-4px);
  border-color: var(--color-brand);
  box-shadow: var(--shadow-md), var(--shadow-neon-yellow);
}

.gallery-img-wrap {
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
}

.gallery-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-img-wrap img {
  transform: scale(1.04);
}

.gallery-caption {
  padding: 0.85rem 1rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gallery-caption strong {
  color: #fff;
}

.gallery-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: rgba(250, 204, 21, 0.12);
  color: var(--color-brand);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */

.faq-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.2s ease;
}

.faq-item:hover {
  border-color: var(--color-brand);
}

.faq-item summary {
  padding: 1.25rem;
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--color-brand);
  font-weight: 700;
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  content: '−';
  transform: rotate(180deg);
}

.faq-item[open] {
  border-color: var(--color-brand);
  box-shadow: 0 0 15px rgba(250, 204, 21, 0.15);
}

.faq-content {
  padding: 0 1.25rem 1.25rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: -0.25rem;
  padding-top: 0.75rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  margin-top: auto;
  background: #090d14;
  border-top: 1px solid var(--color-border);
  padding: 2.5rem 1.5rem;
}

.footer-container {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-dim);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--color-text-muted);
}

.footer-links a:hover {
  color: var(--color-brand);
}

.footer-disclaimer {
  max-width: 760px;
  margin: 0;
  color: var(--color-text-dim);
  font-size: 0.75rem;
  line-height: 1.6;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  cursor: pointer;
}
.menu-toggle span { width: 100%; height: 2px; border-radius: 2px; background: var(--color-brand); }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Policy page styles */
.policy-page .policy-main {
  max-width: 860px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}

.policy-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.policy-card h1 {
  font-size: 2rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.meta-date {
  color: var(--color-text-dim);
  font-size: 0.85rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.75rem;
}

.policy-card section {
  margin-bottom: 1.75rem;
}

.policy-card h2 {
  font-size: 1.25rem;
  color: var(--color-brand);
  margin-bottom: 0.5rem;
}

.policy-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.back-home-wrap {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .main-layout {
    grid-template-columns: 1fr;
  }
  .sidebar-toc {
    display: none;
  }
  .mega-dropdown {
    width: 90vw;
    left: 5vw;
    transform: none;
  }
  .hazard-matrix-grid, .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tether-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .header-container {
    flex-wrap: wrap;
  }
  .nav-links {
    display: none;
    order: 5;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
  }
  .nav-links.open { display: flex; }
  .nav-item, .nav-link { width: 100%; }
  .menu-toggle { display: flex; margin-left: auto; }
  .header-actions { display: none; }
  .meta-appid { display: none; }
  .mega-dropdown { position: static; width: 100%; opacity: 1; visibility: visible; pointer-events: auto; transform: none; grid-template-columns: 1fr; margin-top: 0.5rem; }
  .hero-title {
    font-size: 2rem;
  }
  .hero-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .strategy-grid, .balance-meter-container, .rope-tension-wrap {
    grid-template-columns: 1fr;
  }
  .hazard-matrix-grid, .gallery-grid, .tether-grid {
    grid-template-columns: 1fr;
  }
  .biped-control-row {
    grid-template-columns: 1fr;
  }
  .ad-surface-container { padding-inline: 0.75rem; }
  .ad-banner { width: 100%; min-width: 0; }
  .footer-links { justify-content: center; flex-wrap: wrap; gap: 0.75rem 1rem; }
}
