/* ==========================================================================
   MONKEY SQUAD - NEON CANOPY CSS
   Optimized Static CSS (2026 Ready)
   Zero Framework Dependencies (No Tailwind)
   ========================================================================== */

:root {
  --color-lime: #aef359;
  --color-mango: #ff9a00;
  --color-purple: #644af1;
  --color-green-dark: #01160d;
  --color-bg-dark: #020504;
  --color-bg-panel: #020c08;
  --color-text-light: #f8fafc;
  --color-text-muted: #94a3b8;
  --font-plus: 'Plus Jakarta Sans', sans-serif;
  --font-outfit: 'Outfit', sans-serif;
  --font-syne: 'Syne', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-sans: 'Inter', sans-serif;
}

/* Base resets & setups */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  scroll-behavior: smooth;
  background-color: var(--color-bg-dark);
  color: var(--color-text-light);
  overflow-x: hidden;
  font-size: 16px;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  user-select: none;
}

/* Background Setup */
#canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
}

#bg-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.blur-spot {
  position: absolute;
  top: 50%;
  left: 25%;
  transform: translateY(-50%);
  width: 350px;
  height: 350px;
  background: rgba(2, 44, 34, 0.2);
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 2;
}

.neon-vines-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(174, 243, 89, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 2;
}

.blueprint-grid-overlay {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(rgba(174, 243, 89, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(174, 243, 89, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center top;
  pointer-events: none;
  z-index: 2;
}

.top-scanning-line {
  position: absolute;
  inset-x: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,154,0,0.3) 50%, transparent);
  box-shadow: 0 0 10px var(--color-mango);
  pointer-events: none;
  z-index: 10;
  width: 100%;
  animation: scan-horizontal 4s linear infinite;
}

@keyframes scan-horizontal {
  0% { transform: translateY(0); opacity: 0.3; }
  50% { transform: translateY(10px); opacity: 0.8; }
  100% { transform: translateY(0); opacity: 0.3; }
}

/* Typography elements */
h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: var(--font-plus);
  font-weight: 800;
  letter-spacing: -0.02em;
}

p {
  line-height: 1.625;
  color: var(--color-text-muted);
}

a {
  color: inherit;
  text-decoration: none;
}

/* Common containers */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  z-index: 10;
  position: relative;
}

/* Header style styling */
header.site-header {
  height: 5.5rem;
  border-bottom: 1px solid rgba(174, 243, 89, 0.1);
  background-color: rgba(2, 5, 4, 0.75);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-outfit);
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--color-text-light);
  text-transform: uppercase;
}

.brand-logo .mascot-svg {
  width: 2.75rem;
  height: 2.75rem;
  color: var(--color-lime);
  transition: transform 0.3s ease;
}

.brand-logo:hover .mascot-svg {
  transform: rotate(12deg);
}

.brand-logo .highlight-dot,
.footer-logo .highlight-dot,
.portal-brand .highlight-dot {
  color: var(--color-lime);
  margin: 0 0.125rem;
}

/* Pulse indicator hud badge */
.pulse-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(90deg, rgba(2, 31, 24, 0.9), rgba(2, 5, 4, 0.95));
  border: 1px solid rgba(174, 243, 89, 0.2);
  box-shadow: 0 4px 20px rgba(174, 243, 89, 0.1);
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #cbd5e1;
}

.pulse-dot {
  width: 0.5rem;
  height: 0.5rem;
  background: var(--color-lime);
  border-radius: 50%;
  animation: pulse-bloom 1.5s infinite ease-in-out;
}

@keyframes pulse-bloom {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.3); opacity: 1; }
}

.active-count {
  color: var(--color-mango);
  font-weight: 800;
}

/* Main Gatekeeper wrapper */
#gatekeeper-view {
  display: block;
  width: 100%;
  max-width: 100%;
  position: relative;
  z-index: 5;
}

/* Main Gatekeeper layout grid */
.gatekeeper-section {
  padding: 4rem 0;
  min-height: 85vh;
  display: flex;
  align-items: center;
}

.gatekeeper-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .gatekeeper-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
  .gatekeeper-left {
    grid-column: span 7;
  }
  .gatekeeper-right {
    grid-column: span 5;
  }
}

.cyber-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background-color: rgba(2, 44, 34, 0.9);
  border: 1px solid rgba(174, 243, 89, 0.35);
  border-radius: 9999px;
  color: var(--color-lime);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.cyber-badge-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background-color: var(--color-lime);
  animation: ping-anim 1s infinite alternate;
}

@keyframes ping-anim {
  0% { transform: scale(0.8); opacity: 0.5; }
  100% { transform: scale(1.3); opacity: 1; }
}

/* Optimized 1H Title styles */
h1.hero-title {
  font-family: var(--font-plus);
  font-size: 2.25rem;
  line-height: 1.2;
  font-weight: 900;
  color: var(--color-text-light);
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  h1.hero-title {
    font-size: 3rem;
  }
}

.neon-glow-gradient {
  background: linear-gradient(90deg, var(--color-lime), var(--color-mango) 50%, var(--color-purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 2px 10px rgba(174,243,89,0.25));
}

p.hero-desc {
  font-size: 1rem;
  line-height: 1.7;
  color: #cbd5e1;
  max-width: 36rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  p.hero-desc {
    font-size: 1.125rem;
  }
}

/* Diagnostic elements */
.diagnostic-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.diag-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background-color: rgba(4, 15, 9, 0.85);
  border-radius: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
}

.diag-lime {
  border: 1px solid rgba(174, 243, 89, 0.15);
  color: var(--color-lime);
}

.diag-mango {
  border: 1px solid rgba(255, 154, 0, 0.15);
  color: var(--color-mango);
}

.diag-purple {
  border: 1px solid rgba(100, 74, 241, 0.15);
  color: var(--color-purple);
}

.diag-dot-pulse {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: var(--color-lime);
  animation: pulse-bloom 1.5s infinite ease-in-out;
}

/* Glass Terminal Card container */
.terminal-card {
  background: linear-gradient(135deg, rgba(2, 28, 21, 0.7) 0%, rgba(2, 5, 4, 0.95) 100%);
  border: 1px solid rgba(174, 243, 89, 0.15);
  border-radius: 1.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(174, 243, 89, 0.05);
  padding: 2rem;
  position: relative;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@media (min-width: 640px) {
  .terminal-card {
    padding: 2.5rem;
  }
}

/* Floating elements */
.floating-leaf-1 {
  position: absolute;
  top: 15%;
  left: 5%;
  font-size: 2rem;
  opacity: 0.25;
  animation: float-slow 8s infinite ease-in-out;
  pointer-events: none;
}

.floating-palm-2 {
  position: absolute;
  bottom: 12%;
  right: 5%;
  font-size: 2.25rem;
  opacity: 0.2;
  animation: float-slow 12s infinite alternate ease-in-out;
  pointer-events: none;
}

@keyframes float-slow {
  0% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(15deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

/* Glitch Shake structure */
.terminal-card.glitch-shake,
.terminal-card.habitat-glitch-shake {
  animation: trigger-shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes trigger-shake {
  10%, 90% { transform: translate3d(-1px, 0, 0) scale(1.002); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(174, 243, 89, 0.1);
  margin-bottom: 1.5rem;
}

.terminal-meta {
  display: flex;
  flex-col: column;
  gap: 0.25rem;
}

.terminal-title {
  font-family: var(--font-outfit);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-light);
  letter-spacing: 0.05em;
}

.terminal-subtitle {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--color-lime);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.terminal-ping-hud {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--color-mango);
  background-color: rgba(255, 154, 0, 0.1);
  border: 1px solid rgba(255, 154, 0, 0.2);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-weight: 700;
}

/* Inputs structure */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.label-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #94a3b8;
  text-transform: uppercase;
}

.char-counter {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: rgba(148, 163, 184, 0.6);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-hashtag-icon {
  position: absolute;
  left: 1rem;
  color: var(--color-lime);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.125rem;
  pointer-events: none;
}

.terminal-input {
  width: 100%;
  background: rgba(2, 5, 4, 0.6);
  border: 1px solid rgba(174, 243, 89, 0.2);
  border-radius: 0.75rem;
  padding: 0.875rem 1rem 0.875rem 2.25rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--color-text-light);
  outline: none;
  transition: all 0.3s ease;
}

.terminal-input:focus {
  border-color: var(--color-lime);
  box-shadow: 0 0 15px rgba(174, 243, 89, 0.15);
  background-color: rgba(2, 5, 4, 0.85);
}

.terminal-input::placeholder {
  color: rgba(148, 163, 184, 0.4);
}

/* Preset pills */
.presets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.preset-pill {
  background-color: rgba(2, 21, 15, 0.8);
  border: 1px solid rgba(174, 243, 89, 0.1);
  border-radius: 0.5rem;
  padding: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  color: #cbd5e1;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.preset-pill:hover {
  background-color: rgba(2, 44, 34, 0.7);
  border-color: var(--color-lime);
  color: var(--color-lime);
}

.preset-pill.active-pill {
  background: rgba(174, 243, 89, 0.1);
  border-color: var(--color-lime);
  color: var(--color-lime);
  box-shadow: 0 0 8px rgba(174, 243, 89, 0.1);
}

/* Warning block notification */
.warning-box {
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 0.75rem;
  padding: 0.85rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.warning-icon {
  margin-top: 0.125rem;
  color: #f87171;
  font-size: 1rem;
}

.warning-text {
  font-size: 0.75rem;
  color: #f87171;
  line-height: 1.4;
  font-weight: 500;
}

.warning-highlight {
  color: var(--color-text-light);
  font-weight: 700;
  text-decoration: underline;
}

/* Checkbox alignment */
.checkbox-container {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  position: relative;
  cursor: pointer;
  margin-bottom: 2rem;
  transition: transform 0.2s ease, text-shadow 0.2s ease, color 0.2s ease;
}

.checkbox-wrapper {
  position: relative;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.checkbox-input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 10;
}

.custom-checkbox {
  width: 1.25rem;
  height: 1.25rem;
  background-color: rgba(2, 5, 4, 0.7);
  border: 1px solid rgba(174, 243, 89, 0.3);
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkbox-input:checked + .custom-checkbox {
  background-color: var(--color-lime);
  border-color: var(--color-lime);
  box-shadow: 0 0 10px rgba(174, 243, 89, 0.4);
}

.custom-checkbox::after {
  content: "";
  width: 0.35rem;
  height: 0.6rem;
  border: solid #020504;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.2s ease;
  margin-bottom: 0.1rem;
}

.checkbox-input:checked + .custom-checkbox::after {
  transform: rotate(45deg) scale(1);
}

.checkbox-desc {
  font-size: 0.75rem;
  line-height: 1.4;
  color: #cbd5e1;
  font-weight: 500;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.checkbox-highlight {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--color-lime);
  cursor: pointer;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

/* GPU-Accelerated Red Glitch / Warning Glow Error State classes */
.checkbox-container.protocol-error,
.checkbox-container.validation-error {
  animation: protocol-shake 0.15s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite;
}

.checkbox-container.protocol-error .checkbox-desc,
.checkbox-container.validation-error .checkbox-desc,
.checkbox-container.protocol-error .checkbox-highlight,
.checkbox-container.validation-error .checkbox-highlight {
  color: #ef4444 !important;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.85);
}

.checkbox-container.protocol-error .custom-checkbox,
.checkbox-container.validation-error .custom-checkbox {
  border-color: #ef4444 !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
}

@keyframes protocol-shake {
  0%, 100% { transform: translate3d(0, 0, 0); }
  25% { transform: translate3d(-3px, 0, 0); }
  75% { transform: translate3d(3px, 0, 0); }
}

/* Floating error tooltip */
.warning-bubble {
  position: absolute;
  top: -3.5rem;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: #ef4444;
  color: var(--color-text-light);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
  white-space: nowrap;
  pointer-events: none;
  z-index: 50;
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.warning-bubble.bubble-active {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.warning-bubble::after {
  content: "";
  position: absolute;
  bottom: -0.25rem;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 0.5rem;
  height: 0.5rem;
  background-color: #ef4444;
}

/* Main CTA button style */
.cta-button {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(90deg, var(--color-lime), var(--color-mango));
  border: none;
  outline: none;
  border-radius: 0.75rem;
  font-family: var(--font-syne);
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #020504;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(174, 243, 89, 0.3);
  transition: all 0.3s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-button:hover {
  background: linear-gradient(90deg, var(--color-mango), var(--color-lime));
  box-shadow: 0 4px 22px rgba(255, 154, 0, 0.5);
  transform: translateY(-1px);
}

.cta-button:active {
  transform: translateY(1px);
}

/* Habitat Intel Core & Accordions Layout */
.habitat-intel-core {
  padding: 6rem 0;
  border-top: 1px solid rgba(174, 243, 89, 0.1);
  background: rgba(2, 5, 4, 0.5);
}

.panel-header {
  max-width: 42rem;
  margin: 0 auto 4rem auto;
  text-align: center;
}

.panel-sub {
  color: var(--color-lime);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  font-weight: 800;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.75rem;
}

.panel-title {
  font-family: var(--font-plus);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: var(--color-text-light);
}

@media (min-width: 640px) {
  .panel-title {
    font-size: 2.5rem;
  }
}

.panel-desc {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  text-align: center;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

/* Feature grid layout */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 5rem;
}

@media (min-width: 768px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  background: linear-gradient(135deg, rgba(2, 28, 21, 0.3) 0%, rgba(2, 5, 4, 0.6) 100%);
  border: 1px solid rgba(174, 243, 89, 0.1);
  border-radius: 1.5rem;
  padding: 2rem;
}

.feature-icon-box {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
}

.icon-lime {
  background-color: rgba(174, 243, 89, 0.1);
  color: var(--color-lime);
  border: 1px solid rgba(174, 243, 89, 0.2);
}

.icon-mango {
  background-color: rgba(255, 154, 0, 0.1);
  color: var(--color-mango);
  border: 1px solid rgba(255, 154, 0, 0.2);
}

.icon-purple {
  background-color: rgba(100, 74, 241, 0.1);
  color: var(--color-purple);
  border: 1px solid rgba(100, 74, 241, 0.2);
}

.feature-title {
  font-family: var(--font-plus);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text-light);
  margin-bottom: 0.5rem;
}

.feature-desc {
  font-size: 0.8125rem;
  line-height: 1.6;
}

/* Comparison structure */
.comparison-section {
  margin-bottom: 5rem;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: 1.5rem;
  border: 1px solid rgba(174, 243, 89, 0.1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

table.comp-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

table.comp-table th {
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-light);
  border-bottom: 1px solid rgba(174, 243, 89, 0.1);
}

table.comp-table th.col-param {
  color: var(--color-lime);
  background-color: rgba(2, 31, 24, 0.6);
}

table.comp-table th.col-squad {
  color: var(--color-mango);
}

table.comp-table tbody tr {
  border-bottom: 1px solid rgba(174, 243, 89, 0.05);
}

table.comp-table tbody tr:last-child {
  border-bottom: none;
}

table.comp-table td {
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

table.comp-table td.cell-param {
  color: var(--color-text-light);
  font-weight: 600;
  background-color: rgba(2, 31, 24, 0.2);
}

table.comp-table td.cell-squad {
  color: var(--color-lime);
  font-weight: 700;
}

/* Two-column layout */
.editorial-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .editorial-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
  .editorial-left {
    grid-column: span 8;
  }
  .editorial-right {
    grid-column: span 4;
  }
}

.editorial-article {
  background: linear-gradient(180deg, #021c15 0%, #020504 100%);
  border: 1px solid rgba(174, 243, 89, 0.15);
  border-radius: 1.5rem;
  box-shadow: 0 15px 40px rgba(0,0,0,0.8);
  padding: 2.25rem;
}

@media (min-width: 640px) {
  .editorial-article {
    padding: 3rem;
  }
}

.editorial-tag {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--color-mango);
  margin-bottom: 1.25rem;
}

.editorial-title {
  font-family: var(--font-plus);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text-light);
  line-height: 1.35;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .editorial-title {
    font-size: 1.875rem;
  }
}

.editorial-divider {
  height: 1px;
  background-color: rgba(174, 243, 89, 0.10);
  margin: 1.5rem 0;
}

.editorial-section-title {
  font-family: var(--font-plus);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text-light);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.editorial-indicator {
  width: 0.35rem;
  height: 1rem;
  border-radius: 0.125rem;
  flex-shrink: 0;
}

.editorial-p {
  font-size: 0.875rem;
  line-height: 1.7;
  color: #cbd5e1;
  margin-bottom: 1.5rem;
}

.bg-editor-lime { background-color: var(--color-lime); }
.bg-editor-mango { background-color: var(--color-mango); }
.bg-editor-purple { background-color: var(--color-purple); }

/* Editorial Sidebar Widgets */
.sidebar-widget {
  background: linear-gradient(180deg, #021c15 0%, #020504 100%);
  border: 1px solid rgba(174, 243, 89, 0.15);
  border-radius: 1.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.sidebar-widget-purple {
  border: 1px solid rgba(255, 154, 0, 0.3);
  animation: visual-pulse 2s infinite alternate;
}

@keyframes visual-pulse {
  0% { box-shadow: 0 0 10px rgba(255, 154, 0, 0.05); }
  100% { box-shadow: 0 0 20px rgba(255, 154, 0, 0.15); }
}

.sidebar-heading {
  font-family: var(--font-plus);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--color-text-light);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(174, 243, 89, 0.1);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-tag-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: var(--color-lime);
}

.sidebar-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sidebar-item {
  display: flex;
  gap: 0.75rem;
  align-items: start;
}

.sidebar-icon {
  margin-top: 0.125rem;
  font-size: 1rem;
}

.sidebar-item-title {
  font-family: var(--font-plus);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text-light);
  margin-bottom: 0.25rem;
}

.sidebar-item-desc {
  font-size: 0.75rem;
  line-height: 1.5;
  color: #cbd5e1;
}

.sidebar-diag-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sidebar-diag-block {
  text-align: left;
}

.sidebar-diag-num {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-lime);
}

.sidebar-diag-num-alt {
  color: var(--color-mango);
}

.sidebar-diag-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
  margin-top: 0.25rem;
  font-weight: bold;
}

/* FAQ Panel Layout */
.faq-panel {
  padding: 6rem 0;
  border-top: 1px solid rgba(174, 243, 89, 0.1);
  background: rgba(2, 5, 4, 0.45);
}

.faq-list {
  max-width: 48rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: rgba(2, 21, 15, 0.6);
  border: 1px solid rgba(174, 243, 89, 0.1);
  border-radius: 1rem;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.faq-item:hover {
  border-color: rgba(174, 243, 89, 0.3);
  box-shadow: 0 4px 20px rgba(174, 243, 89, 0.05);
}

.faq-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  color: var(--color-text-light);
  cursor: pointer;
  text-align: left;
  outline: none;
  transition: color 0.2s ease;
}

.faq-question-text {
  font-family: var(--font-plus);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
  transition: color 0.2s ease;
}

@media (min-width: 640px) {
  .faq-question-text {
    font-size: 0.875rem;
  }
}

.faq-trigger:hover .faq-question-text {
  color: var(--color-lime);
}

.faq-chevron {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--color-text-muted);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
}

.faq-trigger:hover .faq-chevron {
  color: var(--color-lime);
}

.faq-item.active .faq-chevron {
  transform: rotate(180deg);
  color: var(--color-lime);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.faq-answer-inner {
  padding: 0 1.5rem 1.25rem 1.5rem;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: #cbd5e1;
}

@media (min-width: 640px) {
  .faq-answer-inner {
    font-size: 0.875rem;
  }
}

/* Footer Section */
footer.site-footer {
  border-top: 1px solid rgba(174, 243, 89, 0.1);
  background-color: rgba(2, 5, 4, 0.95);
  padding: 5rem 0 3rem 0;
  color: var(--color-text-muted);
  position: relative;
  overflow: hidden;
}

.footer-watermark {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  color: rgba(174, 243, 89, 0.2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-outfit);
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--color-text-light);
  text-transform: uppercase;
}

.footer-logo .mascot-svg {
  width: 2rem;
  height: 2rem;
  color: var(--color-lime);
}

.footer-brand-desc {
  font-size: 0.75rem;
  line-height: 1.6;
  max-width: 24rem;
}

.footer-advisory {
  display: inline-flex;
  padding: 0.25rem 0.75rem;
  border: 1px solid rgba(255,154,0,0.3);
  color: var(--color-mango);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  border-radius: 9999px;
  max-width: max-content;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.footer-nav-title {
  font-family: var(--font-outfit);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-text-light);
  text-transform: uppercase;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.75rem;
}

.footer-link-item a {
  transition: color 0.2s ease;
}

.footer-link-item a:hover {
  color: var(--color-lime);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(174, 243, 89, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.625rem;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* Cinematic Shutter Doors for Portal Matches */
.shutter-plate {
  position: fixed;
  left: 0;
  width: 100vw;
  height: 50vh;
  background-color: #020c08;
  z-index: 1000;
  pointer-events: none;
  transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.shutter-top {
  top: 0;
  border-bottom: 2px solid rgba(174, 243, 89, 0.3);
  transform: translateY(-100%);
}

.shutter-bottom {
  bottom: 0;
  border-top: 2px solid rgba(174, 243, 89, 0.3);
  transform: translateY(100%);
}

.shutter-light-bar {
  position: absolute;
  width: 100%;
  height: 3px;
  background-color: var(--color-purple);
  box-shadow: 0 0 15px var(--color-purple);
  left: 0;
}

.shutter-top .shutter-light-bar { bottom: 0; }
.shutter-bottom .shutter-light-bar { top: 0; }

body.shutter-active .shutter-top {
  transform: translateY(0);
}
body.shutter-active .shutter-bottom {
  transform: translateY(0);
}

/* Chat Portal View */
#portal-view {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--color-bg-dark);
  z-index: 500;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

/* Header Inside Portal */
header.portal-header {
  height: 4.5rem;
  background-color: #020c08;
  border-bottom: 1px solid rgba(174, 243, 89, 0.2);
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 30px rgba(0,0,0,0.8);
  z-index: 30;
}

@media (min-width: 640px) {
  header.portal-header {
    padding: 0 2rem;
  }
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-outfit);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--color-text-light);
  text-transform: uppercase;
}

@media (min-width: 640px) {
  .portal-brand {
    font-size: 1rem;
    gap: 0.75rem;
  }
}

.portal-logo-svg {
  width: 2.25rem;
  height: 2.25rem;
  animation: logo-pulsing 2s infinite alternate;
}

@keyframes logo-pulsing {
  0% { color: var(--color-lime); filter: drop-shadow(0 0 2px rgba(174,243,89,0.3)); }
  100% { color: var(--color-mango); filter: drop-shadow(0 0 10px rgba(255,154,0,0.7)); }
}

.portal-hud {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .portal-hud {
    gap: 1.5rem;
  }
}

.portal-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  background-color: rgba(2, 44, 34, 0.4);
  border: 1px solid rgba(174, 243, 89, 0.2);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  border-radius: 9999px;
  color: var(--color-lime);
}

@media (min-width: 640px) {
  .portal-badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.85rem;
  }
}

.portal-badge-ping {
  width: 0.5rem;
  height: 0.5rem;
  background-color: var(--color-lime);
  border-radius: 50%;
  animation: ping-anim 1s infinite alternate;
}

.portal-badge-timer {
  border-color: rgba(255, 154, 0, 0.2);
  color: var(--color-mango);
}

.portal-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tag-badge-portal {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-mango);
  background-color: rgba(100, 74, 241, 0.1);
  border: 1px solid rgba(255, 154, 0, 0.15);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  text-transform: uppercase;
}

@media (min-width: 1200px) {
  .tag-badge-portal {
    display: inline-block;
  }
}

/* Connect button inside navigation block */
.btn-control {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  border-radius: 9999px;
  font-family: var(--font-syne);
  font-weight: 800;
  font-size: 0.625rem;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.25);
  border: none;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .btn-control {
    font-size: 0.75rem;
    padding: 0.6rem 1.25rem;
  }
}

.btn-next {
  background: linear-gradient(90deg, var(--color-lime), var(--color-mango));
  color: #020504;
  box-shadow: 0 4px 15px rgba(174, 243, 89, 0.3);
}

.btn-next:hover {
  background: linear-gradient(90deg, var(--color-mango), var(--color-lime));
  box-shadow: 0 4px 22px rgba(255, 154, 0, 0.5);
}

.btn-next:active { transform: scale(0.95); }

.btn-exit {
  background-color: rgba(127, 29, 29, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.btn-exit:hover {
  background-color: #ef4444;
  color: #020504;
  border-color: #ef4444;
}

.btn-exit:active { transform: scale(0.95); }

.btn-icon {
  width: 0.875rem;
  height: 0.875rem;
  stroke-width: 3.5;
}

/* Viewport frame section */
.portal-viewport {
  flex: 1;
  width: 100%;
  background-color: var(--color-bg-dark);
  position: relative;
  overflow: hidden;
}

.portal-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  background-color: var(--color-bg-dark);
  z-index: 10;
}

/* Preflight Telemetry loading screen overlay */
.loading-curtain {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #021c15 0%, #020504 100%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem;
}

.radar-hud {
  position: relative;
  width: 7rem;
  height: 7rem;
  border: 1px dashed rgba(174, 243, 89, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: radar-searching 20s linear infinite;
}

@keyframes radar-searching {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.radar-signal {
  position: absolute;
  top: 0.375rem;
  right: 0.375rem;
  width: 0.875rem;
  height: 0.875rem;
  background-color: var(--color-lime);
  border-radius: 50%;
  animation: ping-anim 1s infinite alternate;
}

.radar-ring {
  position: absolute;
  width: 5rem;
  height: 5rem;
  border: 1px solid rgba(255, 154, 0, 0.3);
  border-top-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  animation: pulse-bloom 1.5s infinite ease-in-out;
}

.radar-icon {
  font-size: 2rem;
  filter: drop-shadow(0 0 8px rgba(174,243,89,0.5));
}

.loading-text-stack {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 24rem;
}

.loading-title {
  font-family: var(--font-plus);
  color: var(--color-text-light);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
}

@media (min-width: 640px) {
  .loading-title {
    font-size: 1rem;
  }
}

.loading-log {
  font-family: var(--font-mono);
  color: var(--color-lime);
  font-size: 0.625rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
}

@media (min-width: 640px) {
  .loading-log {
    font-size: 0.75rem;
  }
}

.loading-diagnostics {
  position: absolute;
  bottom: 3rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  color: rgba(255, 154, 0, 0.65);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

/* Transitional sweep effect */
.transition-sweep {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #022c22, rgba(174, 243, 89, 0.15) 50%, transparent);
  z-index: 15;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.transition-sweep.sweep-active {
  opacity: 1;
}

.sweep-watermark {
  text-align: center;
  color: rgba(174, 243, 89, 0.2);
  font-size: 2.5rem;
  font-family: var(--font-syne);
  font-weight: 900;
  text-transform: uppercase;
  filter: blur(4px);
}

@media (min-width: 640px) {
  .sweep-watermark {
    font-size: 4.5rem;
  }
}

/* ==========================================================================
   GATEKEEPER VIEW ENTRANCE ANIMATION & PERFORMANCE STAGGERING
   ========================================================================== */
.gatekeeper-animate {
  opacity: 0;
  transform: translateY(15px);
  animation: gatekeeper-fade-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

@keyframes gatekeeper-fade-up {
  0% {
    opacity: 0;
    transform: translateY(15px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
