/* Core Design Tokens & Variables */
:root {
  --font-sans: 'Barlow', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Noto Serif SC', 'Songti SC', 'STSong', serif;
  --font-mono: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace;

  /* Light Theme (Default) */
  --color-bg-raw: 255, 252, 245;
  --color-bg: rgba(var(--color-bg-raw), 1);
  --color-bg-trans: rgba(var(--color-bg-raw), 0.88);
  --color-txt: #141414;
  --color-gray: #66645f;
  --color-light: #e6e4dc;
  --color-hazy-gray: rgba(230, 228, 220, 0.5);
  --color-grid-dot: rgba(20, 20, 20, 0.05);
  
  --color-btn-bg: #141414;
  --color-btn-txt: #fffcf5;
  --color-btn-hover: #313133;
  --color-btn-hover-invert: #e6e4dc;
  
  --color-border: rgba(20, 20, 20, 0.1);
  --color-border-soft: rgba(20, 20, 20, 0.05);
  --color-card-bg: rgba(20, 20, 20, 0.02);
  --color-accent: #ff3b30;
  
  --color-noise-opacity: 0.04;
  --color-console-bg: #101011;
  --color-console-txt: #39ff14; /* Matrix Green */

  --neon-cyan: #00f0ff;
  --cyber-yellow: #fee801;
  --cyber-red: #ff003c;
  --boot-bg: #080808;
  
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 4px;
  --max: 1320px;

  /* Unified Layering System (Z-Index Map) */
  --z-bg-grid: -3;
  --z-bg-canvas: -2;
  --z-bg-scanline: -1;
  --z-zero: 0;
  --z-interactive: 2;
  --z-base-content: 3;
  --z-sim-status: 4;
  --z-base-content-overlay: 5;
  --z-sim-toggle: 5;
  --z-loader-col: 10;
  --z-loader-video: 11;
  --z-loader-noise: 15;
  --z-loader-content: 20;
  --z-nav: 15;
  --z-header: 100;
  --z-loader-interactive: 100;
  --z-modal: 1000;
  --z-loader: 10000;
  --z-flash-overlay: 99999;
  --z-custom-cursor: 999999;
}

[data-theme="dark"] {
  /* Dark Theme */
  --color-bg-raw: 16, 16, 17;
  --color-bg: rgba(var(--color-bg-raw), 1);
  --color-bg-trans: rgba(var(--color-bg-raw), 0.85);
  --color-txt: #fcfbfa;
  --color-gray: #a6a49f;
  --color-light: #333230;
  --color-hazy-gray: rgba(33, 32, 31, 0.5);
  --color-grid-dot: rgba(255, 255, 255, 0.05);
  
  --color-btn-bg: #fcfbfa;
  --color-btn-txt: #101011;
  --color-btn-hover: #e0ded9;
  --color-btn-hover-invert: #262524;
  
  --color-border: rgba(255, 255, 255, 0.1);
  --color-border-soft: rgba(255, 255, 255, 0.05);
  --color-card-bg: rgba(255, 255, 255, 0.02);
  --color-accent: #ff453a;
  
  --color-noise-opacity: 0.07;
  --color-console-bg: #09090a;
}

/* Global Reset & Base */
* {
  box-sizing: border-box;
}

html {
  background-color: #000;
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background-color: transparent;
  color: #fff;
  font-family: var(--font-sans);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

/* Premium Keyboard Focus States */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--neon-cyan, #00f0ff);
  outline-offset: 4px;
  box-shadow: 0 0 12px var(--neon-cyan, #00f0ff);
}

/* Staggered Opening Loader & Cyberpunk Neural Boot Sequence */
.opening-grid-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-loader);
  display: flex;
  pointer-events: auto; /* Allow blocking clicks while booting */
  transition: visibility 0s linear;
}

.opening-grid-overlay.is-loaded {
  pointer-events: none; /* Let clicks pass through after slide up */
  visibility: hidden;
  transition-delay: 1.5s;
}

.opening-grid-overlay.is-loaded * {
  animation: none !important;
  transition: none !important;
}

.opening-grid-overlay.is-loaded-instant {
  display: none !important;
}

.cyberpunk-boot {
  /* Variables inherited from global :root */
}

#loader-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 11;
  opacity: 0.85;
  pointer-events: none;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  transform: scale(1);
  
  /* Cyber fluid color flow animation (zero-network replacement for large mp4) - translucent to show background canvas */
  background: linear-gradient(125deg, rgba(8, 8, 8, 0.62), rgba(5, 22, 42, 0.38), rgba(48, 3, 10, 0.38), rgba(8, 8, 8, 0.62));
  background-size: 400% 400%;
  animation: liquid-gradient-flow 15s ease infinite;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

@keyframes liquid-gradient-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.opening-grid-overlay.is-loaded #loader-video {
  opacity: 0;
  transform: scale(1.06);
}

/* Click overlay to authorize Audio and Video - translucent with blur */
.boot-click-overlay {
  position: absolute;
  inset: 0;
  z-index: 100;
  background-color: rgba(4, 4, 6, 0.82);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  gap: 40px;
}

.boot-click-overlay.is-dismissed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Ocular Scanner HUD Styles */
.ocular-scanner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  pointer-events: none;
  transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.6s;
}

.ocular-scanner-svg {
  width: 170px;
  height: 170px;
  filter: drop-shadow(0 0 12px rgba(0, 240, 255, 0.35));
  transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.scan-ring {
  transform-origin: center;
  will-change: transform;
}

.ring-outer {
  animation: scan-rotate-clockwise 16s linear infinite;
}

.ring-middle {
  animation: scan-rotate-counter 8s linear infinite;
}

.ring-inner {
  animation: scan-breath 3.5s ease-in-out infinite alternate;
}

.scan-dot {
  transform-origin: center;
  animation: scan-pulse-dot 1.2s ease-in-out infinite alternate;
}

.scanner-telemetry-text {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--neon-cyan);
  letter-spacing: 0.15em;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.6);
  opacity: 0.85;
  animation: flash-warning-text 2s steps(2) infinite;
}

/* Keyframes for Ocular Scan */
@keyframes scan-rotate-clockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes scan-rotate-counter {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

@keyframes scan-breath {
  0% { transform: scale(0.92); opacity: 0.6; }
  100% { transform: scale(1.04); opacity: 0.95; }
}

@keyframes scan-pulse-dot {
  0% { transform: scale(0.85); fill: rgba(0, 240, 255, 0.7); }
  100% { transform: scale(1.2); fill: rgba(255, 0, 60, 1); }
}

/* Burst outward and fade on dismiss */
.boot-click-overlay.is-dismissed .ocular-scanner-container {
  transform: scale(2.2);
  opacity: 0;
}

/* Premium High-Tech Skip Intro Button */
.boot-skip-btn {
  position: absolute;
  top: 30px;
  right: 36px;
  z-index: 95; /* Above boot container (20) but below click overlay (100) */
  background: rgba(8, 8, 8, 0.75);
  border: 1px solid rgba(0, 240, 255, 0.35);
  color: var(--neon-cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  padding: 8px 16px;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.08);
  display: none; /* Controlled dynamically and by CSS sibling selector */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.boot-click-overlay.is-dismissed ~ .boot-skip-btn {
  display: block;
}

.opening-grid-overlay.is-loaded .boot-skip-btn {
  opacity: 0;
  pointer-events: none;
}

.boot-skip-btn:hover {
  background: var(--neon-cyan);
  color: #000;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.45);
}

.boot-click-band {
  background-color: var(--cyber-yellow);
  color: #000;
  font-family: var(--font-mono);
  font-size: clamp(11px, 2vw, 15px);
  font-weight: 900;
  padding: 20px 40px;
  width: 100%;
  text-align: center;
  letter-spacing: 0.15em;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  box-shadow: 0 0 40px rgba(254, 232, 1, 0.35);
  border-top: 3px solid #000;
  border-bottom: 3px solid #000;
  transform: skewX(-6deg);
}

.blinking-band-text {
  animation: flash-warning-text 1.5s steps(2) infinite;
}

.warning-icon {
  font-size: 20px;
  animation: pulse-dot 1s ease-in-out infinite;
}

.boot-container {
  position: absolute;
  inset: 0;
  z-index: 20;
  background-color: rgba(8, 8, 8, 0.42);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: clamp(20px, 5vw, 60px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: var(--font-mono);
  color: var(--neon-cyan);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 0 100px rgba(0, 240, 255, 0.15);
  overflow: hidden;
}

.opening-grid-overlay.is-loaded .boot-container {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.95) translateY(-20px);
}

.boot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--neon-cyan);
  padding-bottom: 15px;
  letter-spacing: 0.15em;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

.boot-status {
  background-color: var(--cyber-yellow);
  color: #000;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 900;
  animation: flash-yellow 1s steps(2) infinite;
  text-shadow: none;
}

@keyframes flash-yellow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.boot-grid-layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1.35fr;
  gap: 25px;
  flex-grow: 1;
  margin: 30px 0;
  min-height: 0; /* allows grid children to shrink and scroll */
}

.boot-middle-hud {
  display: grid;
  grid-template-rows: 1.15fr 0.85fr;
  gap: 20px;
  min-height: 0;
}

.hud-label {
  display: block;
  font-size: 8px;
  color: var(--color-gray);
  letter-spacing: 0.15em;
  font-weight: 700;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.excitation-panel, .hex-stream-panel {
  border: 1px solid rgba(0, 240, 255, 0.15);
  background-color: rgba(0, 0, 0, 0.4);
  padding: 15px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.excitation-spectrum-dynamic {
  width: 100%;
  height: 100%;
  min-height: 120px;
  background: repeating-linear-gradient(to right, var(--neon-cyan) 0px, var(--neon-cyan) 4px, transparent 4px, transparent 8px);
  background-size: 100% 100%;
  background-position: bottom;
  will-change: clip-path;
  animation: spectrum-fake-bounce 2.2s ease-in-out infinite alternate;
}

@keyframes spectrum-fake-bounce {
  0% { clip-path: polygon(0 80%, 20% 40%, 40% 70%, 60% 15%, 80% 90%, 100% 30%, 100% 100%, 0 100%); }
  25% { clip-path: polygon(0 30%, 20% 90%, 40% 20%, 60% 85%, 80% 10%, 100% 70%, 100% 100%, 0 100%); }
  50% { clip-path: polygon(0 90%, 20% 15%, 40% 75%, 60% 40%, 80% 80%, 100% 25%, 100% 100%, 0 100%); }
  75% { clip-path: polygon(0 40%, 20% 70%, 40% 10%, 60% 90%, 80% 30%, 100% 85%, 100% 100%, 0 100%); }
  100% { clip-path: polygon(0 75%, 20% 30%, 40% 85%, 60% 20%, 80% 75%, 100% 40%, 100% 100%, 0 100%); }
}

@keyframes spectrum-bounce {
  0% {
    height: 6%;
  }
  100% {
    height: 94%;
  }
}

.hex-stream-container {
  flex-grow: 1;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.5;
  color: rgba(0, 240, 255, 0.65);
  display: flex;
  flex-direction: column;
}

.hex-line {
  margin: 0;
  white-space: nowrap;
  opacity: 0.8;
  animation: hex-fade-in 0.1s ease forwards;
}

.hex-line.alert {
  color: var(--cyber-yellow);
  font-weight: 700;
}

@keyframes hex-fade-in {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 0.8; transform: translateY(0); }
}

@media (max-width: 1024px) {
  .boot-grid-layout {
    grid-template-columns: 1fr 1.2fr;
    grid-template-rows: auto auto;
    gap: 20px;
  }
  .boot-middle-hud {
    grid-column: span 2;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
  }
}

@media (max-width: 768px) {
  .boot-grid-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 15px;
  }
  .boot-middle-hud {
    grid-column: span 1;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }
}

.calibration-box {
  position: relative;
  border: 1px solid rgba(0, 240, 255, 0.25);
  background-color: rgba(0, 240, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  max-height: 320px;
  align-self: center;
  justify-self: center;
  width: 100%;
}

.tech-telemetry {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 8px;
  color: var(--neon-cyan);
  opacity: 0.5;
  pointer-events: none;
  line-height: 1.2;
  font-family: var(--font-mono);
}

.telemetry-left {
  bottom: 12px;
  left: 12px;
}

.telemetry-right {
  top: 12px;
  right: 12px;
  text-align: right;
}

.calibration-box::before, .calibration-box::after,
.calibration-graphic::before, .calibration-graphic::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid var(--neon-cyan);
  pointer-events: none;
}
.calibration-box::before { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.calibration-box::after { bottom: -2px; right: -2px; border-left: none; border-top: none; }
.calibration-graphic::before { top: -2px; right: -2px; border-left: none; border-bottom: none; }
.calibration-graphic::after { bottom: -2px; left: -2px; border-right: none; border-top: none; }

.calibration-graphic {
  width: 82%;
  height: 82%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calibration-hologram-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.18), inset 0 0 15px rgba(0, 240, 255, 0.1);
  background-color: #050505;
  border: 1px solid rgba(0, 240, 255, 0.25);
  will-change: transform;
}

.hologram-bg-hud {
  position: absolute;
  inset: 0;
  background-image: url('omni_neural_eye.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.15; /* Dimmer for background */
  filter: contrast(1.1) brightness(0.65) saturate(0.85);
  animation: hologram-flicker 4s linear infinite;
  image-rendering: -webkit-optimize-contrast;
}

.hologram-eye-container {
  position: absolute;
  width: 165px; /* Slightly larger */
  height: 165px;
  top: 50%;
  left: 50%;
  transform: translate3d(-50%, -50%, 0);
  pointer-events: none;
}

/* Outer eye element rotating */
.hologram-eye-outer {
  position: absolute;
  inset: 0;
  background-image: url('omni_neural_eye.jpg');
  background-size: 100% 100%;
  background-position: center;
  border-radius: 50%; /* Make it perfectly circular */
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.35), inset 0 0 20px rgba(0, 240, 255, 0.3);
  transform: translate3d(0, 0, 0);
  animation: hologram-rotate-clockwise 20s linear infinite; /* Smooth slow rotation */
  opacity: 0.95;
  will-change: transform;
  image-rendering: -webkit-optimize-contrast;
}

/* 顺时针自转 Keyframes */
@keyframes hologram-rotate-clockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Hologram Scanning Line - upgraded with high-end cyan/red dual laser sweep */
.hologram-scanner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 8px;
  background: linear-gradient(to bottom, rgba(0, 240, 255, 0) 0%, rgba(0, 240, 255, 0.7) 40%, rgba(255, 0, 60, 0.9) 50%, rgba(0, 240, 255, 0.7) 60%, rgba(0, 240, 255, 0) 100%);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.5), 0 0 4px rgba(255, 0, 60, 0.6);
  pointer-events: none;
  animation: hologram-scan 4s cubic-bezier(0.25, 1, 0.5, 1) infinite;
  will-change: transform;
}

/* Biomechanical Scan Grid Overlay */
.hologram-overlay {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0.25) 2px,
    rgba(0, 0, 0, 0) 4px
  );
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: 0.8;
}

/* Pulsing High-Entropy Aura */
.hologram-pulse {
  position: absolute;
  inset: 0;
  pointer-events: none;
  animation: hologram-pulse-glow 2.5s ease-in-out infinite;
}

/* Keyframe animations for calibration hologram */
@keyframes hologram-flicker {
  0%, 100% { opacity: 0.85; filter: contrast(1.1) brightness(1.0); }
  45% { opacity: 0.85; }
  46% { opacity: 0.70; filter: contrast(1.25) brightness(1.25) saturate(1.2); }
  47% { opacity: 0.88; }
  48% { opacity: 0.78; }
  49% { opacity: 0.90; filter: contrast(1.1) brightness(1.0); }
  93% { opacity: 0.85; }
  94% { opacity: 0.60; filter: contrast(1.4) brightness(1.3) hue-rotate(-5deg); }
  95% { opacity: 0.88; }
  96% { opacity: 0.85; }
}

@keyframes hologram-scan {
  0% { transform: translate3d(0, -10px, 0); }
  100% { transform: translate3d(0, 260px, 0); }
}

@keyframes hologram-pulse-glow {
  0%, 100% { box-shadow: inset 0 0 25px rgba(0, 240, 255, 0.25); }
  50% { box-shadow: inset 0 0 45px rgba(0, 240, 255, 0.5); }
}

.boot-terminal {
  border: 1px solid rgba(0, 240, 255, 0.15);
  background-color: rgba(0, 0, 0, 0.5);
  padding: 20px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.6;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 300px;
}

.terminal-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  overflow-y: hidden;
  padding-top: 20px;
}

.terminal-line {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
  position: relative;
}

.terminal-lines .terminal-line:last-child::after {
  content: "█";
  margin-left: 6px;
  color: var(--neon-cyan);
  animation: terminal-cursor-blink 0.6s steps(2) infinite;
}

@keyframes terminal-cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.terminal-line.success {
  color: var(--cyber-yellow);
}

.terminal-line.warning {
  color: var(--cyber-red);
  font-weight: 700;
  animation: blink-warning 0.5s steps(2) infinite;
}

@keyframes blink-warning {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.boot-footer {
  display: flex;
  flex-direction: column;
  gap: 15px;
  border-top: 1px solid rgba(0, 240, 255, 0.25);
  padding-top: 20px;
}

.progress-bar-container {
  width: 100%;
  height: 6px;
  background-color: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.25);
  position: relative;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background-color: var(--neon-cyan);
  box-shadow: 0 0 10px var(--neon-cyan);
  transition: width 0.1s ease;
}

.progress-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.percentage {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-shadow: 0 0 5px var(--neon-cyan);
}

.boot-hex-ticker {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-gray);
  opacity: 0.6;
  letter-spacing: 0.05em;
}

.warning-text {
  font-size: 11px;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.flashing-warning {
  color: var(--cyber-yellow);
  animation: flash-warning-text 1s steps(2) infinite;
}

@keyframes flash-warning-text {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Loader System Interference Twitching */
.loader-twitch {
  animation: loader-twitch-anim 0.15s linear infinite;
}

@keyframes loader-twitch-anim {
  0% { transform: translate(0, 0) skewX(0deg); filter: hue-rotate(0deg); }
  20% { transform: translate(-3px, 2px) skewX(3deg); filter: hue-rotate(30deg); }
  40% { transform: translate(4px, -1px) skewX(-3deg) scaleY(0.98); }
  60% { transform: translate(-2px, -3px) skewX(1.5deg); filter: invert(0.04); }
  80% { transform: translate(3px, 2px) skewX(-1.5deg); }
  100% { transform: translate(0, 0) skewX(0deg); filter: hue-rotate(0deg); }
}

/* Premium Digital Tearing Collapse Glitch - Heavy Flash */
.crash-flash-glitch {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  background-color: var(--cyber-red);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  animation: crash-heavy-flash 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;
  overflow: hidden;
}

@keyframes crash-heavy-flash {
  0% { background-color: var(--cyber-red); filter: invert(0) brightness(2.5); }
  12% { background-color: #ffffff; filter: invert(1) brightness(2) contrast(1.5); }
  24% { background-color: #000000; filter: invert(0) scale(1.02); }
  36% { background-color: var(--neon-cyan); filter: invert(1) contrast(2); }
  48% { background-color: var(--cyber-yellow); filter: invert(0) skewX(5deg); }
  60% { background-color: var(--cyber-red); filter: invert(1); }
  72% { background-color: #000000; filter: invert(0) brightness(2); }
  85% { background-color: #ffffff; filter: invert(1); }
  100% { background-color: transparent; opacity: 0; filter: invert(0); }
}

/* Decrypting Glowing Motifs */
.scrambling-active {
  color: #ffffff !important;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.85), 0 0 16px rgba(0, 240, 255, 0.5);
  transition: text-shadow 0.1s ease;
  will-change: contents;
  display: inline-block;
}

.scrambling-cyan {
  color: #00f0ff !important;
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.8), 0 0 12px rgba(0, 240, 255, 0.4);
}

.scrambling-magenta {
  color: #ff00f0 !important;
  text-shadow: 0 0 6px rgba(255, 0, 240, 0.8), 0 0 12px rgba(255, 0, 240, 0.4);
}

.scramble-phosphor-glow {
  color: #ffffff !important;
  text-shadow: 0 0 12px #ffffff, 0 0 24px var(--neon-cyan);
  animation: phosphor-fade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes phosphor-fade {
  to {
    text-shadow: none;
    color: inherit;
  }
}

.glitch-slice {
  position: absolute;
  left: 0;
  width: 100%;
  height: 33.33%;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 0, 60, 0.15),
    rgba(255, 0, 60, 0.15) 2px,
    transparent 2px,
    transparent 4px
  );
  mix-blend-mode: color-dodge;
  pointer-events: none;
}

.glitch-slice:nth-child(1) { top: 0; animation: slice-slide-1 0.45s steps(4) infinite; }
.glitch-slice:nth-child(2) { top: 33.33%; animation: slice-slide-2 0.45s steps(4) infinite; }
.glitch-slice:nth-child(3) { top: 66.66%; animation: slice-slide-3 0.45s steps(4) infinite; }

@keyframes slice-slide-1 {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-15px); background-color: #00f0ff; }
}
@keyframes slice-slide-2 {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(20px); background-color: #fee801; }
}
@keyframes slice-slide-3 {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-25px); }
}

.glitch-warning-band {
  background-color: var(--cyber-yellow);
  color: #000;
  font-family: var(--font-mono);
  font-size: clamp(14px, 3.5vw, 24px);
  font-weight: 900;
  padding: 15px 40px;
  border-top: 4px solid #000;
  border-bottom: 4px solid #000;
  transform: rotate(-3deg);
  letter-spacing: 0.15em;
  text-align: center;
  box-shadow: 0 10px 40px rgba(255, 0, 60, 0.5);
  animation: warning-band-heavy-glitch 0.12s steps(2) infinite;
}

@keyframes warning-band-heavy-glitch {
  0% { transform: rotate(-3deg) scale(1) translate(0, 0); filter: hue-rotate(0deg) invert(0); }
  50% { transform: rotate(2deg) scale(1.08) translate(-6px, 4px) skewX(-6deg); filter: hue-rotate(180deg) invert(1); }
}

.screen-shake {
  animation: violent-shake 0.35s linear infinite;
}

@keyframes violent-shake {
  0% { transform: translate(0, 0) rotate(0deg); }
  10% { transform: translate(-4px, -2px) rotate(-0.5deg); }
  20% { transform: translate(3px, 4px) rotate(1deg); }
  30% { transform: translate(-3px, 3px) rotate(-1deg); }
  40% { transform: translate(4px, -3px) rotate(0.5deg); }
  50% { transform: translate(-4px, 2px) rotate(-0.5deg); }
  60% { transform: translate(3px, -2px) rotate(1deg); }
  70% { transform: translate(-2px, 4px) rotate(-1deg); }
  80% { transform: translate(4px, 3px) rotate(0.5deg); }
  90% { transform: translate(-3px, -3px) rotate(-0.5deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

/* Hero Chromatic Glitch text styles */
.glitch-text {
  position: relative;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  clip: rect(0, 0, 0, 0); 
}

body.is-glitching .glitch-text::before {
  left: 3px;
  text-shadow: -2px 0 var(--neon-cyan);
  clip: rect(10px, 9999px, 85px, 0);
  animation: glitch-anim-1 1s infinite linear alternate-reverse;
}

body.is-glitching .glitch-text::after {
  left: -3px;
  text-shadow: -2px 0 var(--cyber-red);
  clip: rect(15px, 9999px, 115px, 0);
  animation: glitch-anim-2 1.2s infinite linear alternate-reverse;
}

/* Full screen crash glitch visual effects */
body.is-glitching .boot-container {
  animation: screen-crash-glitch 0.4s steps(2) infinite;
  background-color: rgba(12, 12, 16, 0.98);
  box-shadow: inset 0 0 100px rgba(255, 0, 60, 0.35);
}

body.is-glitching .opening-col {
  border-left: 2px solid var(--neon-cyan);
  border-right: 2px solid var(--neon-cyan);
  box-shadow: 0 0 30px var(--neon-cyan), 0 0 10px var(--neon-cyan);
  animation: col-flicker 0.08s steps(2) infinite;
}

@keyframes screen-crash-glitch {
  0%, 100% { filter: invert(0) hue-rotate(0deg) contrast(1); transform: translate(0, 0) skewX(0deg); }
  20% { filter: invert(1) hue-rotate(90deg) contrast(2); transform: translate(-8px, 4px) skewX(-4deg); }
  40% { filter: invert(0) hue-rotate(-90deg) contrast(3) brightness(1.4); transform: translate(6px, -6px) skewX(5deg); }
  60% { filter: invert(0) contrast(1.5) saturate(1.8); transform: translate(-3px, -2px) skewX(2deg); }
  80% { filter: invert(1) hue-rotate(180deg) brightness(0.9); transform: translate(5px, 3px) skewX(-3deg); }
}

@keyframes col-flicker {
  0%, 100% { border-color: var(--neon-cyan); box-shadow: 0 0 30px var(--neon-cyan); }
  50% { border-color: var(--cyber-red); box-shadow: 0 0 30px var(--cyber-red); }
}

@keyframes glitch-anim-1 {
  0% { clip: rect(20px, 9999px, 60px, 0); }
  20% { clip: rect(80px, 9999px, 10px, 0); }
  40% { clip: rect(50px, 9999px, 90px, 0); }
  60% { clip: rect(10px, 9999px, 40px, 0); }
  80% { clip: rect(70px, 9999px, 100px, 0); }
  100% { clip: rect(30px, 9999px, 80px, 0); }
}

@keyframes glitch-anim-2 {
  0% { clip: rect(40px, 9999px, 110px, 0); }
  20% { clip: rect(10px, 9999px, 50px, 0); }
  40% { clip: rect(90px, 9999px, 30px, 0); }
  60% { clip: rect(30px, 9999px, 80px, 0); }
  80% { clip: rect(110px, 9999px, 10px, 0); }
  100% { clip: rect(60px, 9999px, 90px, 0); }
}

/* Background Blueprint Grid Lines */
.grid-background-lines {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  opacity: 0.28;
  background-image: 
    linear-gradient(to right, var(--color-border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--color-border) 1px, transparent 1px);
  background-size: 8% 10%;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

/* WebGL Background Canvas */
#webgl-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
  display: block;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

/* CRT Screen Scanlines filter overlay */
.scanlines-overlay {
  display: none; /* Weight Reduction: Removed for a cleaner visual */
}

@keyframes scanline-roll {
  from { background-position: 0 0; }
  to { background-position: 0 100%; }
}

/* CRT Collapse Transitions */
.opening-grid-overlay.is-collapsing {
  animation: crt-collapse-outer 0.45s cubic-bezier(0.19, 1, 0.22, 1) forwards;
  pointer-events: none;
}

.opening-grid-overlay.is-collapsing .boot-container {
  animation: crt-collapse-inner 0.45s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

@keyframes crt-collapse-outer {
  0% {
    transform: scale(1);
    filter: brightness(1) contrast(1) saturate(1);
  }
  30% {
    transform: scaleY(0.004) scaleX(1.15);
    background-color: #ffffff;
    filter: brightness(6) contrast(3) saturate(0);
    box-shadow: 0 0 50px #ffffff, 0 0 120px var(--neon-cyan);
  }
  75% {
    transform: scaleY(0.004) scaleX(0.004);
    background-color: #ffffff;
    filter: brightness(10) saturate(0);
    box-shadow: 0 0 25px #ffffff;
    opacity: 1;
  }
  100% {
    transform: scale(0);
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes crt-collapse-inner {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  30% {
    opacity: 0.8;
    transform: scaleY(0.01) scaleX(1.1);
    filter: brightness(4) contrast(2);
  }
  75% {
    opacity: 0;
    transform: scale(0);
  }
  100% {
    opacity: 0;
    transform: scale(0);
  }
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

/* Container limits */
.wrap {
  width: min(calc(100% - 72px), var(--max));
  margin: 0 auto;
}

/* 1. Header Styles */
.header {
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: var(--z-header);
  padding: 30px 0 0;
  opacity: 0;
  transition: opacity 0.8s ease 0.6s;
}

body.is-initialized .header {
  opacity: 1;
}

.header__inner {
  width: min(calc(100% - 72px), var(--max));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.header__abLogo a {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-text-large {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-txt);
}

.logo-text-small {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-gray);
  margin-top: 4px;
}

.header__abTime {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-gray);
  letter-spacing: 0.05em;
  line-height: 1.5;
}

.header__abTime p {
  margin: 0;
}

.header__abTime .node-label {
  text-transform: uppercase;
  opacity: 0.8;
  font-size: 10px;
}

.header__abRight {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Theme Switcher */
.Colorbtns {
  display: flex;
  background-color: var(--color-hazy-gray);
  padding: 4px;
  border-radius: 99px;
  position: relative;
  border: 1px solid var(--color-border-soft);
  height: 38px;
  backdrop-filter: blur(8px);
}

.Colorbtns__btn {
  background: none;
  border: none;
  color: var(--color-gray);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  padding: 0 16px;
  cursor: pointer;
  z-index: 2;
  border-radius: 99px;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.Colorbtns__btn.is-active {
  color: var(--color-btn-txt);
  background-color: var(--color-btn-bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Small contact button in header */
.Btn.type-contact a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 20px;
  border-radius: 99px;
  background-color: var(--color-btn-bg);
  color: var(--color-btn-txt);
  font-size: 13px;
  font-weight: 500;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.Btn.type-contact a:hover {
  transform: translateY(-1px);
  background-color: var(--color-btn-hover);
}

/* Sub-header Navigation Bar */
.header__bar {
  width: min(calc(100% - 72px), var(--max));
  margin: 20px auto 0;
  border-top: 1px solid var(--color-border);
  padding: 12px 0;
}

.header__barLinks nav {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.nav-item {
  font-size: 13px;
  color: var(--color-txt);
  letter-spacing: 0.05em;
  padding-bottom: 2px;
  position: relative;
}

.nav-item .txt p.ja {
  font-size: 10px;
  color: var(--color-gray);
  margin-top: 2px;
  line-height: 1;
}

.nav-item::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background-color: var(--color-txt);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s cubic-bezier(0.09, 1, 0.36, 1);
}

.nav-item:hover::after {
  transform: scaleX(1);
}

/* Staggered Split-Line Revealer */
.split-line {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  line-height: 1.2;
}

.split-word {
  display: inline-block;
  transform: translate3d(0, 110%, 0);
  opacity: 0;
  transition: transform 0.8s cubic-bezier(0.09, 1, 0.36, 1), opacity 0.8s ease;
}

/* Stagger reveals based on body class setup */
body.is-initialized .hero .split-word {
  transform: translate3d(0, 0, 0);
  opacity: 1;
}

/* Stagger delays for hero texts */
.hero-title .split-line:nth-of-type(1) .split-word { transition-delay: 0.3s; }
.hero-title .split-line:nth-of-type(2) .split-word { transition-delay: 0.45s; }
.hero-title .split-line:nth-of-type(3) .split-word { transition-delay: 0.6s; }
.hero-subtitle .split-word { transition-delay: 0.75s; }

/* Stagger reveal delay for elements on scroll */
.scroll-reveal-section.is-visible .split-word {
  transform: translate3d(0, 0, 0);
  opacity: 1;
}

/* 2. Hero Section */
.hero {
  position: relative;
  padding: 190px 0 0;
}

.hero-shell {
  position: relative;
  width: min(calc(100% - 56px), var(--max));
  margin: 0 auto;
  min-height: 80vh;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--color-bg-trans);
  box-shadow: 0 35px 90px rgba(0,0,0,0.06);
  isolation: isolate;
  border: 1px solid var(--color-border-soft);
  transition: background-color 0.4s ease;
  backdrop-filter: blur(12px);
}

.hero-backdrop-tint {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(circle at 50% 50%, rgba(var(--color-bg-raw), 0) 20%, var(--color-bg) 80%);
}

.hero-stamp {
  position: absolute;
  top: 112px;
  right: 54px;
  z-index: 3;
  border: 1px solid var(--color-border);
  padding: 12px 14px;
  color: var(--color-txt);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  background: var(--color-card-bg);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-sm);
}

.hero-vertical {
  position: absolute;
  left: 42px;
  top: 154px;
  z-index: 3;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  display: flex;
  gap: 24px;
  color: var(--color-gray);
  font-family: var(--font-serif);
  font-size: 16px;
  letter-spacing: 0.24em;
  opacity: 0.4;
}

.hero-copy {
  position: absolute;
  left: 118px;
  bottom: 68px;
  z-index: 3;
  width: min(780px, calc(100% - 220px));
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 36px;
  align-items: center;
}

/* Premium sliding button styles (.Arrowbtn) */
.Arrowbtn {
  display: inline-flex;
  border-radius: 2px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s ease;
  border: 1px solid var(--color-txt);
  background-color: var(--color-btn-bg);
}

.Arrowbtn a, .Arrowbtn button {
  display: flex;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  align-items: stretch;
}

.Arrowbtn .txt {
  background-color: var(--color-btn-bg);
  color: var(--color-btn-txt);
  padding: 16px 28px;
  position: relative;
  display: flex;
  align-items: center;
  transition: background-color 0.4s cubic-bezier(0.09, 1, 0.36, 1);
}

.Arrowbtn .txt__inner {
  height: 20px;
  line-height: 20px;
  overflow: hidden;
  position: relative;
}

.Arrowbtn .txt__inner p {
  margin: 0;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: transform 0.4s cubic-bezier(0.09, 1, 0.36, 1);
}

.Arrowbtn .txt__inner p:nth-of-type(2) {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate3d(0, 120%, 0);
}

.Arrowbtn .arrow {
  background-color: var(--color-btn-bg);
  border-left: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  position: relative;
  transition: background-color 0.4s cubic-bezier(0.09, 1, 0.36, 1);
}

.Arrowbtn .Arrow {
  position: relative;
  width: 16px;
  height: 16px;
  overflow: hidden;
}

.Arrowbtn .Arrow picture {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.09, 1, 0.36, 1);
}

.Arrowbtn .Arrow picture img {
  width: 16px;
  height: 16px;
}

.Arrowbtn .Arrow picture:nth-of-type(2) {
  transform: translate3d(-110%, 0, 0);
}

/* Hover effects for primary .Arrowbtn */
.Arrowbtn:hover {
  transform: translateY(-1px);
}

.Arrowbtn:hover .txt {
  background-color: var(--color-btn-hover);
}

.Arrowbtn:hover .arrow {
  background-color: var(--color-btn-hover);
}

.Arrowbtn:hover .txt__inner p:nth-of-type(1) {
  transform: translate3d(0, -120%, 0);
}

.Arrowbtn:hover .txt__inner p:nth-of-type(2) {
  transform: translate3d(0, 0, 0);
}

.Arrowbtn:hover .Arrow picture:nth-of-type(1) {
  transform: translate3d(110%, 0, 0);
}

.Arrowbtn:hover .Arrow picture:nth-of-type(2) {
  transform: translate3d(0%, 0, 0);
}

/* Light background/Inverted button variant */
.Arrowbtn.type-connected {
  border: 1px solid var(--color-border);
  background-color: var(--color-bg);
}

.Arrowbtn.type-connected .txt {
  background-color: transparent;
  color: var(--color-txt);
}

.Arrowbtn.type-connected .arrow {
  background-color: transparent;
  border-left: 1px solid var(--color-border);
}

.Arrowbtn.type-connected:hover .txt {
  background-color: var(--color-btn-hover-invert);
}

.Arrowbtn.type-connected:hover .arrow {
  background-color: var(--color-btn-hover-invert);
}

/* 3. Strains Section */
.section-strains {
  background-color: var(--color-bg-trans);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border-soft);
  margin-top: 40px;
  padding: 80px 0;
  
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.09, 1, 0.36, 1);
}

.section-strains.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.strains-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
  margin-top: 20px;
}

.strain-card {
  cursor: pointer;
  outline: none;
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: 
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
    border-color 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
    box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.strain-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 240, 255, 0.45) !important; /* Cyberpunk Cyan border on hover */
  box-shadow: 0 15px 35px rgba(0, 240, 255, 0.08);
}

.strain-card:focus-visible {
  border-color: var(--color-accent) !important;
}

.strain-card.is-active {
  border-color: var(--color-accent) !important;
  box-shadow: 0 15px 30px rgba(255, 59, 48, 0.1);
}

.strain-visual-container {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  position: relative;
  background-color: #0b0b0c;
  border-bottom: 1px solid var(--color-border-soft);
}

/* CSS-drawn visual indicators for cards */
.static-tessellation-bg, .static-peachfog-bg, .static-pagoda-bg, .static-adversarial-bg {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  background-size: cover;
  opacity: 0.7;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.strain-card:hover .static-tessellation-bg,
.strain-card:hover .static-peachfog-bg,
.strain-card:hover .static-pagoda-bg,
.strain-card:hover .static-adversarial-bg {
  transform: scale(1.08);
  opacity: 0.9;
}

.static-tessellation-bg {
  background-image: url('strain_tessellation.jpg');
  background-position: center;
}

.static-peachfog-bg {
  background-image: url('strain_peachfog.jpg');
  background-position: center;
}

.static-pagoda-bg {
  background-image: url('strain_pagoda.jpg');
  background-position: center;
}

.static-adversarial-bg {
  background-image: url('strain_adversarial.jpg');
  background-position: center;
}

.strain-copy {
  padding: 30px;
}

.strain-name {
  font-family: var(--font-serif);
  display: block;
  font-size: 26px;
  line-height: 1.35;
  font-weight: 700;
}

.strain-meta {
  font-family: var(--font-mono);
  display: block;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  text-transform: uppercase;
  margin-top: 6px;
}

.strain-desc {
  margin: 14px 0 0;
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-gray);
}

/* 4. Methodology Section */
.section-methodology {
  background-color: var(--color-bg-trans);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border-soft);
  margin-top: 40px;
  padding: 80px 0;
  
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.09, 1, 0.36, 1);
}

.section-methodology.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.methodology-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  margin-top: 20px;
}

.methodology-quote {
  background-color: var(--color-txt);
  color: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: 50px;
  min-height: 420px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: background-color 0.4s ease, color 0.4s ease;
}

.methodology-quote::before {
  content: "“";
  position: absolute;
  top: 10px;
  left: 30px;
  font-family: var(--font-serif);
  font-size: 220px;
  line-height: 1;
  color: var(--color-gray);
  opacity: 0.15;
  pointer-events: none;
}

.quote-main {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3.5vw, 34px);
  line-height: 1.6;
  font-weight: 600;
  position: relative;
  z-index: 2;
}

.quote-sub {
  margin-top: 20px;
  font-size: 14px;
  letter-spacing: 0.05em;
  color: var(--color-gray);
  position: relative;
  z-index: 2;
  text-transform: uppercase;
}

.methodology-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.methodology-item {
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: border-color 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.methodology-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 0;
  background-color: var(--color-accent);
  transition: height 0.3s ease;
}

.methodology-item:hover {
  border-color: var(--color-border);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .methodology-item:hover {
  box-shadow: 0 10px 30px rgba(0, 240, 255, 0.05);
}

.methodology-item:hover::before {
  height: 100%;
}

.methodology-item-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-txt);
}

.methodology-item-desc {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-gray);
  flex-grow: 1;
}

.methodology-item-telemetry {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-accent);
  letter-spacing: 0.05em;
  opacity: 0.6;
  border-top: 1px dashed var(--color-border-soft);
  padding-top: 12px;
  transition: opacity 0.3s ease;
}

.methodology-item:hover .methodology-item-telemetry {
  opacity: 1;
}

/* 5. Toxicity Stats Dashboard */
.section-toxicity {
  background-color: var(--color-bg-trans);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border-soft);
  margin-top: 40px;
  padding: 80px 0;
  
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.09, 1, 0.36, 1);
}

.section-toxicity.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.toxicity-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}

.toxicity-hero-card {
  background: linear-gradient(180deg, var(--color-hazy-gray), var(--color-bg));
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: 0 15px 45px rgba(0,0,0,0.02);
}

.stat-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--color-accent);
}

.stat-value {
  font-family: var(--font-serif);
  font-size: clamp(48px, 6.5vw, 84px);
  line-height: 1;
  font-weight: 700;
  margin: 14px 0 20px;
  letter-spacing: -0.02em;
  color: var(--color-txt);
}

.stat-note {
  font-size: 15px;
  color: var(--color-gray);
  line-height: 1.7;
  margin-bottom: 24px;
}

.stat-pills {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: 99px;
  border: 1px solid var(--color-border);
  background-color: var(--color-bg);
  font-size: 13px;
  color: var(--color-gray);
}

.stat-dot {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background-color: var(--color-accent);
}

.toxicity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.toxicity-card {
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  padding: 24px;
}

.t-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--color-gray);
  text-transform: uppercase;
}

.t-value {
  font-family: var(--font-mono);
  display: block;
  font-size: 26px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--color-txt);
  margin-top: 10px;
}

.t-desc {
  display: block;
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-gray);
  margin-top: 8px;
}

/* 6. Feature Activator Simulator Console */
.section-simulator {
  background-color: var(--color-bg-trans);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border-soft);
  margin-top: 40px;
  padding: 80px 0;
  
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.09, 1, 0.36, 1);
}

.section-simulator.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.simulator-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  margin-top: 20px;
}

.simulator-controls {
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.control-group {
  margin-bottom: 30px;
}

.control-group label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.control-group label .val-display {
  font-family: var(--font-mono);
  color: var(--color-accent);
  font-size: 13px;
  font-weight: 500;
}

.control-group input[type="range"] {
  width: 100%;
  height: 4px;
  background-color: var(--color-light);
  border-radius: 99px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 99px;
  background-color: var(--color-txt);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.control-group input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--color-gray);
  margin-top: 8px;
}

.simulator-actions {
  margin-top: 10px;
}

/* Visualizer Display & Console */
.simulator-display {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.visualizer-canvas {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
  background-color: #0b0b0c;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.09, 1, 0.36, 1);
}

.visualizer-canvas canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.visualizer-canvas.is-running .noise-overlay {
  animation: noise-dance 0.1s steps(2) infinite;
  opacity: 0.15;
}

@keyframes noise-dance {
  0% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-2px, 3px, 0); }
  100% { transform: translate3d(1px, -1px, 0); }
}

.canvas-text-status {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 4;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.1em;
}

.fullscreen-toggle {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 5;
  width: 38px;
  height: 38px;
  background-color: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.fullscreen-toggle:hover {
  background-color: rgba(0,0,0,0.8);
}

/* Fullscreen visualizer state */
.visualizer-canvas.is-fullscreen {
  position: fixed;
  inset: 30px;
  width: auto;
  height: auto;
  z-index: var(--z-modal);
  box-shadow: 0 40px 100px rgba(0,0,0,0.6);
  border: 1px solid var(--color-txt);
}

/* Console Terminal styled inside card */
.console-terminal {
  background-color: var(--color-console-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12px;
  box-shadow: inset 0 4px 20px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
}

.console-header {
  background-color: rgba(255, 255, 255, 0.03);
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.console-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background-color: rgba(255, 255, 255, 0.2);
}

.console-header .console-dot:nth-of-type(1) { background-color: var(--color-accent); }
.console-header .console-dot:nth-of-type(2) { background-color: #ffcc00; }

.console-title {
  color: rgba(255, 255, 255, 0.4);
  font-size: 10px;
  letter-spacing: 0.1em;
  margin-left: 6px;
}

.console-body {
  height: 120px;
  padding: 14px 18px;
  overflow-y: auto;
  color: var(--color-console-txt);
  line-height: 1.6;
}

.console-log-line {
  margin: 0 0 6px;
}

.console-log-line.system-msg {
  color: rgba(255, 255, 255, 0.4);
}

.console-log-line.step-msg {
  color: var(--color-console-txt);
}

.console-log-line.success-msg {
  color: #00e5ff;
}

/* 7. Careers Section (Accordion) */
.section-careers {
  background-color: var(--color-bg-trans);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border-soft);
  margin-top: 40px;
  padding: 80px 0;
  
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.09, 1, 0.36, 1);
}

.section-careers.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.accordion-container {
  margin-top: 30px;
  border-top: 1px solid var(--color-border);
}

.acc-item {
  border-bottom: 1px solid var(--color-border);
}

.acc__txt {
  width: 100%;
  background: none;
  border: none;
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--color-txt);
  cursor: pointer;
  outline: none;
}

.acc-title-wrapper {
  display: flex;
  align-items: center;
  width: 100%;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-border);
  margin-right: 15px;
  flex-shrink: 0;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.status-text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--color-gray);
  margin-right: 20px;
  flex-shrink: 0;
  transition: color 0.3s ease;
}

.acc-title-main {
  font-size: clamp(15px, 2vw, 20px);
  line-height: 1.3;
  transition: transform 0.3s ease;
}

.acc__txt:hover .acc-title-main {
  transform: translateX(6px);
}

.acc-item.is-on .status-dot {
  background-color: #39ff14; /* Matrix Cyber Green */
  box-shadow: 0 0 8px #39ff14, 0 0 15px #39ff14;
  animation: status-pulse 1.2s infinite alternate;
}

.acc-item.is-on .status-text {
  color: #39ff14;
  text-shadow: 0 0 8px rgba(57, 255, 20, 0.3);
}

@keyframes status-pulse {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}

.acc-arrow {
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: 300;
  transition: transform 0.3s ease;
}

.acc-item.is-on .acc-arrow {
  transform: rotate(45deg);
}

.acc-content {
  height: 0;
  overflow: hidden;
  transition: height 0.3s cubic-bezier(0.09, 1, 0.36, 1);
}

.acc-content-inner {
  padding: 0 0 28px 48px;
  max-width: 800px;
}

.acc-meta-row {
  margin-bottom: 20px;
}

.acc-meta-row:last-of-type {
  margin-bottom: 0;
}

.acc-meta-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-accent);
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: 6px;
}

.acc-scramble-target {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-txt);
  opacity: 0.88;
}

/* 8. Footer Section */
.footer {
  padding: 110px 0 48px;
  background-color: var(--color-hazy-gray);
  border-top: 1px solid var(--color-border-soft);
  margin-top: 100px;
}

.footer-layout {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--color-border);
}

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

.footer-brand-large {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--color-txt);
}

.footer-brand-small {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-gray);
  margin-top: 8px;
  letter-spacing: 0.1em;
}

.footer-links {
  display: flex;
  gap: 80px;
  flex-wrap: wrap;
}

.footer-links-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.group-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--color-accent);
  text-transform: uppercase;
}

.group-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link {
  font-size: 13px;
  color: var(--color-gray);
  width: fit-content;
}

.footer-link:hover {
  color: var(--color-txt);
  text-decoration: underline;
}

.footer-static-info {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-gray);
}

.footer-bottom {
  padding-top: 28px;
}

.copyright {
  font-size: 12px;
  color: var(--color-gray);
  line-height: 1.8;
  margin: 0;
}

/* Responsive Breakpoints (<1024px) */
@media screen and (max-width: 1024px) {
  .wrap, .header__inner, .header__bar, .hero-shell, .marquee-ticker, .section-strains, .section-methodology, .section-toxicity, .section-simulator, .section-careers {
    width: min(calc(100% - 30px), var(--max));
  }
  
  .header__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .header__bar nav {
    gap: 16px 24px;
  }
  
  .hero-shell {
    min-height: 90vh;
  }
  
  .hero-stamp {
    top: 144px;
    right: 20px;
    font-size: 10px;
  }
  
  .hero-vertical {
    left: 20px;
    top: 198px;
    font-size: 13px;
  }
  
  .hero-copy {
    left: 48px;
    right: 20px;
    bottom: 40px;
    width: auto;
  }
  
  .strains-layout, .methodology-panel, .toxicity-layout, .simulator-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .methodology-grid, .toxicity-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .acc-content-inner {
    padding-left: 20px;
  }
  
  .acc__txt {
    font-size: 18px;
  }
  
  .footer-layout {
    flex-direction: column;
    gap: 32px;
  }
  
  .footer-links {
    gap: 40px;
    flex-direction: column;
  }
}

/* Staggered Blueprint Grid Coordinates */
.grid-line-col {
  position: relative;
}

.grid-col-coord {
  position: absolute;
  top: 15%;
  right: 8px;
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--color-gray);
  opacity: 0.25;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.15em;
  pointer-events: none;
  will-change: transform;
}

.grid-line-col:nth-child(2) .grid-col-coord { top: 45%; }
.grid-line-col:nth-child(3) .grid-col-coord { top: 75%; }
.grid-line-col:nth-child(4) .grid-col-coord { top: 30%; }

/* Custom HUD Cursor - disabled for zero-latency default browser cursor */
.custom-cursor {
  display: none !important;
  position: fixed;
  top: 0;
  left: 0;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(0, 240, 255, 0.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: var(--z-custom-cursor);
  transform: translate3d(-50%, -50%, 0);
  will-change: transform;
  transition: 
    width 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
    height 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
    border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
    background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 8px;
  color: #00f0ff; /* --neon-cyan variable is defined in loader, let's use raw here */
  opacity: 0;
}

body.is-initialized .custom-cursor {
  opacity: 1;
}

.cursor-crosshair {
  position: absolute;
  width: 60%;
  height: 60%;
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 50%;
  border-top-color: transparent;
  border-bottom-color: transparent;
  animation: rotate-spin 4s linear infinite;
}

.cursor-coords {
  position: absolute;
  top: -18px;
  left: 26px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  white-space: nowrap;
  font-size: 7px;
  color: var(--color-gray);
  opacity: 0.6;
}

.cursor-label {
  position: absolute;
  bottom: -14px;
  left: 26px;
  white-space: nowrap;
  font-size: 7px;
  letter-spacing: 0.08em;
  color: #00f0ff;
  text-transform: uppercase;
  opacity: 0.8;
}

/* Hover state changes for cursor */
.custom-cursor.is-hovering {
  width: 64px;
  height: 64px;
  border-color: #ff3b30; /* --color-accent red */
  background-color: rgba(255, 59, 48, 0.06);
}

.custom-cursor.is-hovering .cursor-crosshair {
  width: 80%;
  height: 80%;
  border-color: #ff3b30;
  border-top-color: transparent;
  border-bottom-color: transparent;
  animation-duration: 1.5s;
}

.custom-cursor.is-hovering .cursor-label {
  color: #ff3b30;
}

/* Card locking & injection calibration styles */
.strain-card {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.5s ease, 
              box-shadow 0.5s ease;
  position: relative;
  overflow: hidden;
}

/* Locked state style */
.strain-card.is-locked {
  border-color: #ff3b30 !important; /* --color-accent red */
  box-shadow: 0 0 25px rgba(255, 59, 48, 0.35), inset 0 0 15px rgba(255, 59, 48, 0.18) !important;
  transform: translateY(-8px) scale(1.02) !important;
}

/* Injecting diagnostic layout overlay */
.strain-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(255, 232, 1, 0.12) 0%, transparent 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 5;
}

.strain-card.is-injecting::after {
  opacity: 1;
  animation: card-inject-scan 0.35s linear infinite;
}

.strain-card.is-injecting {
  border-color: #fee801 !important; /* Cyber Yellow */
  box-shadow: 0 0 20px rgba(254, 232, 1, 0.3), inset 0 0 10px rgba(254, 232, 1, 0.15) !important;
  animation: card-inject-flash 0.15s linear infinite;
}

@keyframes card-inject-scan {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

@keyframes card-inject-flash {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.25) contrast(1.15); }
}

/* Background Shader Chromatic Shockwave shake */
#webgl-canvas.bg-shockwave {
  animation: shader-shockwave-anim 0.38s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}

@keyframes shader-shockwave-anim {
  0% { transform: scale(1) translate(0, 0); filter: contrast(1) saturate(1) hue-rotate(0deg); }
  25% { transform: scale(1.04) translate(-10px, 6px); filter: contrast(1.5) saturate(2.0) hue-rotate(20deg); }
  50% { transform: scale(1.02) translate(8px, -4px); filter: contrast(1.3) saturate(1.4) hue-rotate(-15deg); }
  75% { transform: scale(1.01) translate(-3px, 2px); filter: contrast(1.08) saturate(1.15); }
  100% { transform: scale(1) translate(0, 0); filter: contrast(1) saturate(1) hue-rotate(0deg); }
}

/* Theme Overload Switch Glitch Transition */
body.theme-transition-glitch {
  animation: theme-shutdown-restart 0.2s cubic-bezier(0.19, 1, 0.22, 1) forwards;
  pointer-events: none; /* Block clicks during flash */
  overflow: hidden;
}

@keyframes theme-shutdown-restart {
  0% {
    filter: invert(0) brightness(2) contrast(1.2);
    transform: scale(1);
  }
  20% {
    filter: invert(1) brightness(1.5) contrast(2) saturate(2.5);
    background-color: #00f0ff;
    transform: scale(1.01) skewX(1deg);
  }
  40% {
    filter: invert(0) contrast(1.8) saturate(0.5);
    background-color: #ff003c;
    transform: scale(0.99) skewX(-1deg);
  }
  60% {
    filter: invert(1) brightness(2.0) contrast(1.5);
    background-color: #fee801;
    transform: scale(1.005);
  }
  80% {
    filter: invert(0) brightness(1.3);
    transform: scale(0.995);
  }
  100% {
    filter: invert(0) brightness(1) contrast(1);
    transform: scale(1);
  }
}

/* ==========================================================================
   11. Accessibility (A11y) & Coarse Pointer Performance Fallbacks
   ========================================================================== */

/* Photosensitive Epilepsy (A11y) Reduced Motion Media Query */
@media (prefers-reduced-motion: reduce) {
  .crash-flash-glitch,
  .theme-transition-glitch,
  .loader-twitch,
  .glitch-text,
  .spin-circle,
  .spin-circle-reverse,
  .pulse-center,
  .calibration-crosshair,
  .radar-line,
  .blinking-band-text,
  .noise-overlay,
  .custom-cursor {
    animation: none !important;
    transition: none !important;
    filter: none !important;
  }
}

/* Coarse Pointer Devices (Touchscreens/Mobile) Performance & Usability Fallbacks */
@media (pointer: coarse) {
  /* Disable heavy CPU/GPU background blur filters on mobile to mitigate overheating bottlenecks */
  .hero-stamp,
  .acc-content,
  .visualizer-canvas,
  .Colorbtns,
  .header,
  .boot-click-overlay,
  .console-terminal {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background-color: var(--color-bg-trans) !important;
  }

  /* Force hide custom HUD cursor elements on touch devices to prevent residues */
  .custom-cursor {
    display: none !important;
  }
  
  /* Fallback to system default pointer cursors for touch screen links and elements */
  body, a, button, [role='button'], input, select, textarea, .strain-card, .acc__txt {
    cursor: auto !important;
  }
}

/* Immersive Hallucination Overlay */
.hallucination-overlay {
  position: fixed;
  top: 0;
  display: none;
}

.vignette-overlay {
  display: none; /* Weight Reduction: Removed for a cleaner visual */
}

@keyframes slowZoom {
  0% { transform: scale(1.05); }
  100% { transform: scale(1.2); }
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 5px var(--color-accent); transform: scale(1); }
  50% { box-shadow: 0 0 20px var(--color-accent), 0 0 30px var(--color-accent); transform: scale(1.2); }
  100% { box-shadow: 0 0 5px var(--color-accent); transform: scale(1); }
}

.strain-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 8s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: opacity, transform;
}

.strain-layer.is-active {
  opacity: 0.8; /* Higher opacity for stronger hallucinations, screen mode keeps it from blocking WebGL entirely */
  animation: slowZoom 20s linear infinite alternate;
}

/* Minimal Nav Dots */
.minimal-nav {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  gap: 16px;
  align-items: center;
}

.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  cursor: none;
  padding: 0;
  margin: 0;
  transition: all 0.5s ease;
}

.nav-dot.is-active {
  width: 12px;
  height: 12px;
  background: var(--color-accent);
  box-shadow: 0 0 10px var(--color-accent);
  animation: pulseDot 3s ease-in-out infinite;
}

.nav-dot:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.5);
}

/* ==========================================================================
   ACADEMIC + PSYCHEDELIC MINIMAL CONTENT (ScolV Archive)
   ========================================================================== */
.academic-psychedelic-content {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: center;
  z-index: 50;
  color: #fffcf5;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 60px 20px;
  text-align: left; /* Shift from center to left-aligned military layout */
  pointer-events: none; /* Let clicks pass through to WebGL unless on links */
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 2s ease-in-out;
}

.top-secret-watermark {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-10deg);
  font-family: var(--font-mono);
  font-size: 80px;
  font-weight: 900;
  color: rgba(255, 0, 60, 0.04);
  white-space: nowrap;
  pointer-events: none;
  z-index: -1;
  letter-spacing: -0.05em;
  border: 4px solid rgba(255, 0, 60, 0.04);
  padding: 10px 40px;
}

.academic-nav {
  display: flex;
  justify-content: center;
  gap: 30px;
  pointer-events: auto; /* Enable clicking on links */
}

.academic-header {
  margin-bottom: 40px;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  opacity: 0.7;
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 0, 0, 0.5);
}

.serif-title {
  font-family: var(--font-mono); /* Force monospace for military feel */
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin: 0;
  line-height: 1.3;
  text-shadow: 0 4px 20px rgba(0, 240, 255, 0.4), 0 1px 3px rgba(0, 0, 0, 0.5);
  color: #fff;
  border-left: 4px solid var(--neon-cyan);
  padding-left: 16px;
}

.academic-article {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 2.2;
  letter-spacing: 0.06em;
  opacity: 0.85;
  margin-bottom: 60px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9), 0 1px 2px rgba(0, 0, 0, 0.6);
}

.academic-nav {
  display: flex;
  gap: 30px;
  pointer-events: auto; /* Enable clicking on links */
  margin-top: 10px;
}

.academic-nav a {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.15em;
  color: #fffcf5;
  text-decoration: none;
  opacity: 0.6;
  transition: all 0.4s ease;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.academic-nav a:hover,
.academic-nav a.active {
  opacity: 1;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.6), 0 2px 10px rgba(0, 0, 0, 0.9);
  transform: translateY(-2px);
}

/* ==========================================================================
   SUB-PAGES CONTENT SECTIONS
   ========================================================================== */
.content-pages {
  width: 100%;
  margin-bottom: 40px;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-section {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.page-section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.section-paragraph {
  font-family: var(--font-mono); /* Force monospace */
  font-size: 13px;
  line-height: 2.0;
  letter-spacing: 0.12em;
  opacity: 0.75;
  margin-bottom: 30px;
  color: #b0c4de;
  text-align: justify;
}

.theory-quote {
  font-family: var(--font-serif);
  font-size: 15px;
  font-style: italic;
  color: var(--cyber-yellow);
  opacity: 0.9;
  border-left: 2px solid var(--cyber-yellow);
  padding-left: 20px;
  margin: 20px auto;
  max-width: 560px;
  text-align: left;
  line-height: 1.8;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.quote-symbol {
  font-size: 24px;
  line-height: 0;
  vertical-align: middle;
  margin: 0 4px;
  font-family: Georgia, serif;
}

/* ==========================================================================
   HALLUCINATION ARCHIVE (Grid Layout)
   ========================================================================== */
.archive-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

@media (max-width: 680px) {
  .archive-grid {
    grid-template-columns: 1fr;
  }
}

.archive-card {
  background: rgba(8, 8, 10, 0.65);
  border: 1px solid rgba(0, 240, 255, 0.15);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4), inset 0 0 15px rgba(0, 240, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
  pointer-events: auto;
  text-align: left;
  transform-style: preserve-3d;
}

.archive-card:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(0, 240, 255, 0.08);
  animation: card-glitch-hover 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
}

@keyframes card-glitch-hover {
  0% { transform: translate(0); filter: drop-shadow(0 0 0 transparent); }
  20% { transform: translate(-2px, 1px); filter: drop-shadow(-3px 0 0 rgba(255,0,60,0.5)) drop-shadow(3px 0 0 rgba(0,240,255,0.5)); }
  40% { transform: translate(-1px, -1px); }
  60% { transform: translate(2px, 1px); filter: drop-shadow(3px 0 0 rgba(255,0,60,0.5)) drop-shadow(-3px 0 0 rgba(0,240,255,0.5)); }
  80% { transform: translate(1px, -1px); }
  100% { transform: translate(0); filter: drop-shadow(0 0 0 transparent); }
}

/* Acceleration of scanning line speed on hover */
.archive-card:hover .card-image-wrapper::after {
  animation-duration: 1.2s;
}

/* Customized premium neon glow matching status colors */
.archive-card[data-strain="0"]:hover {
  border-color: rgba(0, 240, 255, 0.7);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.25), 0 0 50px rgba(0, 240, 255, 0.1), inset 0 0 15px rgba(0, 240, 255, 0.15);
}

.archive-card[data-strain="1"]:hover {
  border-color: rgba(255, 0, 240, 0.7);
  box-shadow: 0 0 25px rgba(255, 0, 240, 0.25), 0 0 50px rgba(255, 0, 240, 0.1), inset 0 0 15px rgba(255, 0, 240, 0.15);
}

.archive-card[data-strain="2"]:hover {
  border-color: rgba(157, 78, 221, 0.7);
  box-shadow: 0 0 25px rgba(157, 78, 221, 0.25), 0 0 50px rgba(157, 78, 221, 0.1), inset 0 0 15px rgba(157, 78, 221, 0.15);
}

.archive-card[data-strain="3"]:hover {
  border-color: rgba(254, 232, 1, 0.7);
  box-shadow: 0 0 25px rgba(254, 232, 1, 0.25), 0 0 50px rgba(254, 232, 1, 0.1), inset 0 0 15px rgba(254, 232, 1, 0.15);
}

.card-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1.6;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: #000;
}

.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.archive-card:hover .card-image-wrapper img {
  transform: scale(1.05);
  opacity: 1;
}

.card-glitch-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 240, 255, 0.08) 0%, transparent 100%);
  pointer-events: none;
}

.card-details {
  padding: 16px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.card-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
}

.card-status {
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  letter-spacing: 0.05em;
}

.text-cyan { color: var(--neon-cyan); border: 1px solid rgba(0, 240, 255, 0.3); }
.text-magenta { color: #ff00f0; border: 1px solid rgba(255, 0, 240, 0.3); }
.text-purple { color: #9d4edd; border: 1px solid rgba(157, 78, 221, 0.3); }
.text-yellow { color: var(--cyber-yellow); border: 1px solid rgba(254, 232, 1, 0.3); }

.card-desc {
  font-family: var(--font-serif);
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255, 252, 245, 0.7);
  margin: 0 0 16px 0;
  height: 38px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.calibrate-btn {
  width: 100%;
  background: transparent;
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.25s ease;
  border-radius: 2px;
  text-align: center;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.05);
}

.calibrate-btn:hover {
  background: var(--neon-cyan);
  color: #000;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.35);
}

.calibrate-btn:active {
  transform: scale(0.96);
  transition: transform 0.1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   CONTACT FREQUENCY (Terminal Panel)
   ========================================================================== */
.terminal-panel {
  background: rgba(4, 10, 6, 0.85);
  border: 1px solid rgba(57, 255, 20, 0.4);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(57, 255, 20, 0.15), inset 0 0 20px rgba(57, 255, 20, 0.05);
  border-radius: 2px;
  overflow: hidden;
  max-width: 680px;
  margin: 0 auto;
  text-align: left;
  pointer-events: auto;
  position: relative;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Authentic CRT Scanline overlay */
.terminal-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.25) 50%
  );
  background-size: 100% 4px;
  z-index: 10;
  pointer-events: none;
  opacity: 0.6;
}

.terminal-panel::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 10%;
  background: rgba(57, 255, 20, 0.08);
  opacity: 0;
  z-index: 10;
  pointer-events: none;
  animation: scanline-sweep 6s linear infinite;
}

@keyframes scanline-sweep {
  0% { transform: translateY(-100%); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(1000%); opacity: 0; }
}

.terminal-panel-header {
  background: rgba(57, 255, 20, 0.1);
  border-bottom: 1px solid rgba(57, 255, 20, 0.3);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 11;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 5px currentColor;
}

.terminal-dot.red { background: #ff3b30; color: #ff3b30; }
.terminal-dot.yellow { background: #ffcc00; color: #ffcc00; }
.terminal-dot.green { background: #39ff14; color: #39ff14; }

.terminal-panel-title {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #39ff14;
  letter-spacing: 0.15em;
  margin-left: 8px;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(57, 255, 20, 0.6);
}

.terminal-panel-body {
  padding: 16px;
  max-height: 320px;
  overflow-y: auto;
}

/* Custom terminal scrollbar */
.terminal-panel-body::-webkit-scrollbar {
  width: 4px;
}
.terminal-panel-body::-webkit-scrollbar-track {
  background: transparent;
}
.terminal-panel-body::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.3);
  border-radius: 2px;
}

.terminal-output {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: 'Courier New', Courier, monospace; /* Hardcore old-school monospace */
  font-size: 12px;
  line-height: 1.5;
  text-shadow: 0 0 4px rgba(57, 255, 20, 0.4);
}

.output-line {
  color: #39ff14; /* Matrix green default */
  word-break: break-all;
  white-space: pre-wrap;
}

.output-line.green { color: #39ff14; text-shadow: 0 0 6px rgba(57, 255, 20, 0.6); }
.output-line.yellow { color: var(--cyber-yellow); text-shadow: 0 0 6px rgba(254, 232, 1, 0.6); }
.output-line.red { color: #ff3b30; text-shadow: 0 0 6px rgba(255, 59, 48, 0.8); font-weight: bold; }

/* Blinking cursor for the last active line */
.output-line.typing-active::after {
  content: "█";
  display: inline-block;
  margin-left: 4px;
  animation: blink-cursor 1s step-end infinite;
  color: #39ff14;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.brief-box {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 12px;
  border-radius: 3px;
  margin: 4px 0 10px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.brief-box code {
  flex-grow: 1;
  color: rgba(255, 252, 245, 0.85);
  font-size: 10px;
  line-height: 1.5;
  word-break: break-all;
}

.copy-brief-btn {
  background: rgba(0, 240, 255, 0.06);
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: var(--neon-cyan);
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 4px 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 2px;
  flex-shrink: 0;
}

.copy-brief-btn:hover {
  background: var(--neon-cyan);
  color: #000;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

.copy-brief-btn.copied {
  background: #34c759;
  border-color: #34c759;
  color: #000;
}

/* ==========================================================================
   CYBERPUNK HUD OVERLAYS (Irregular Official Color Blocks)
   ========================================================================== */
.hud-layer {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none; /* Let all mouse interactions fall through */
}

/* Global Targeting Crosshairs */
.global-crosshair {
  position: absolute;
  background: rgba(255, 255, 255, 0.05); /* Tone down from cyan to subtle white */
  pointer-events: none;
  z-index: -1;
  transition: transform 0.1s ease-out;
}

.global-crosshair.x {
  top: 50%;
  left: 0;
  width: 100vw;
  height: 1px;
}

.global-crosshair.y {
  left: 50%;
  top: 0;
  height: 100vh;
  width: 1px;
}

.crosshair-center-reticle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.08); /* Fainter border */
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease-out;
}

.crosshair-center-reticle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2); /* Fainter dot */
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.hud-element {
  position: absolute;
  font-family: var(--font-mono);
  color: rgba(255, 255, 255, 0.5);
  font-size: 9px;
  letter-spacing: 0.15em;
  pointer-events: auto; /* Allow hovering info panels if wanted */
  background: transparent; /* Remove heavy gradient blocks */
  border: none; /* Remove heavy borders */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

.top-left-hud {
  top: 24px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.2); /* Clean subtle border */
  padding-left: 8px;
}

.hud-status-led-blink {
  width: 6px;
  height: 6px;
  background: #39ff14;
  border-radius: 50%;
  box-shadow: 0 0 8px #39ff14;
  animation: ledPulse 1.5s steps(2) infinite;
}

.hud-status-led-blink.red {
  background: #ff003c;
  box-shadow: 0 0 8px #ff003c;
  animation: ledPulse 0.8s steps(2) infinite;
}

@keyframes ledPulse {
  0%, 100% { opacity: 1; filter: brightness(1.2); }
  50% { opacity: 0.2; }
}

.hud-label-text {
  font-weight: 700;
  text-shadow: 0 0 5px rgba(0, 240, 255, 0.3);
}

/* Barcode Sticker */
.top-right-hud {
  top: 24px;
  right: 24px;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.2); /* Clean subtle border */
  padding-right: 8px;
}

.hud-barcode-block {
  background: rgba(255, 255, 255, 0.95);
  color: #000;
  padding: 8px 12px;
  transform: rotate(2deg);
  border-radius: 1px;
  box-shadow: 3px 3px 0px rgba(0, 240, 255, 0.2);
  width: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.barcode-lines {
  width: 100%;
  height: 20px;
  background: repeating-linear-gradient(
    90deg,
    #000 0px,
    #000 1px,
    transparent 1px,
    transparent 3px,
    #000 3px,
    #000 5px,
    transparent 5px,
    transparent 6px,
    #000 6px,
    #000 9px
  );
  margin-bottom: 4px;
}

.barcode-text {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.15em;
  font-family: monospace;
}

.hud-telemetry-block {
  font-size: 8px;
  line-height: 1.4;
  text-align: right;
  opacity: 0.7;
}

.ticker-label {
  color: #888;
}

.ticker-val {
  color: var(--neon-cyan);
  font-weight: 700;
}

/* Calibration coordinates bottom left */
.bottom-left-hud {
  bottom: 24px;
  left: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.2); /* Clean subtle border */
  padding-left: 8px;
}

.hud-coords {
  opacity: 0.8;
}

.coords-label {
  color: #888;
}

.coords-val {
  color: var(--neon-cyan);
  font-weight: 700;
}

.hud-indicator-block {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ind-box {
  width: 10px;
  height: 6px;
  border-radius: 1px;
}
.ind-box.cyan { background: var(--neon-cyan); }
.ind-box.magenta { background: #ff00f0; }
.ind-box.yellow { background: var(--cyber-yellow); }

.ind-label {
  font-size: 8px;
  color: #666;
  margin-left: 4px;
}

/* Hazard strip bottom right */
.bottom-right-hud {
  bottom: 24px;
  right: 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.2); /* Clean subtle border */
  padding-right: 8px;
}

.hud-hazard-strip {
  background: var(--cyber-yellow);
  color: #000;
  padding: 6px 16px;
  font-weight: 900;
  font-size: 9px;
  transform: skewX(-15deg);
  box-shadow: 0 0 15px rgba(254, 232, 1, 0.25);
  border: 1px solid #000;
}

.hazard-text {
  letter-spacing: 0.1em;
  display: block;
}

/* Center Crosshair Target */
.hud-crosshair {
  position: absolute;
  pointer-events: none;
}

.target-reticle {
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.target-reticle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.45;
}

.target-reticle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 1px;
  background: rgba(0, 240, 255, 0.25);
  transform: translate(-50%, -50%);
}

/* Page fade transitions */
.page-transition-glitch {
  animation: visualGlitch 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes visualGlitch {
  0% { transform: scale(1) translate3d(0, 0, 0) skewX(0deg); opacity: 1; }
  20% { transform: scale(1.01) translate3d(-4px, 2px, 0) skewX(1.5deg); opacity: 0.9; }
  40% { transform: scale(0.99) translate3d(3px, -3px, 0) skewX(-1.5deg); opacity: 0.85; }
  60% { transform: scale(1.005) translate3d(-2px, -1px, 0) skewX(1deg); opacity: 0.95; }
  80% { transform: scale(0.995) translate3d(2px, 3px, 0) skewX(-0.5deg); opacity: 0.9; }
  100% { transform: scale(1) translate3d(0, 0, 0) skewX(0deg); opacity: 1; }
}

/* Responsive Scrolling Refinements for Small Viewports */
@media (max-width: 768px) {
  .academic-psychedelic-content {
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    pointer-events: auto; /* Enable touch-scrolling */
    padding: 48px 16px 40px;
  }
  /* Custom scrollbar for main content */
  .academic-psychedelic-content::-webkit-scrollbar {
    width: 3px;
  }
  .academic-psychedelic-content::-webkit-scrollbar-track {
    background: transparent;
  }
  .academic-psychedelic-content::-webkit-scrollbar-thumb {
    background: rgba(0, 240, 255, 0.25);
    border-radius: 2px;
  }
  /* Reposition HUD elements so they don't block mobile tap areas */
  .hud-element {
    opacity: 0.35;
    transition: opacity 0.3s ease;
  }
  .hud-element:hover {
    opacity: 0.9;
  }
}

@media (min-width: 769px) and (max-height: 850px) {
  .academic-psychedelic-content {
    max-height: none;
    overflow-y: visible;
  }
}

/* ==========================================================================
   IMAGE CARD SCANNER SWEEP ANIMATION
   ========================================================================== */
.card-image-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-color, var(--neon-cyan)), transparent);
  box-shadow: 0 0 10px var(--accent-color, var(--neon-cyan)), 0 0 4px var(--accent-color, var(--neon-cyan));
  animation: cardScanSweep 4s ease-in-out infinite;
  opacity: 0.7;
  pointer-events: none;
}

@keyframes cardScanSweep {
  0% { transform: translateY(-10px); }
  50% { transform: translateY(180px); }
  100% { transform: translateY(-10px); }
}



/* ==========================================================================
   NEURAL STATE DIAGNOSTIC PANEL STYLES
   ========================================================================== */
.neural-state-panel {
  background: rgba(10, 10, 14, 0.75);
  border: 1px solid rgba(0, 240, 255, 0.25);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(0, 240, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 4px;
  padding: 20px;
  max-width: 360px;
  margin: 15px auto 25px auto;
  text-align: left;
  pointer-events: auto;
  animation: slidePanelDown 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slidePanelDown {
  from { opacity: 0; transform: translateY(-10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.state-bar-wrapper {
  margin-bottom: 16px;
}

.state-bar-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  color: #ddd;
}

.state-bar-progress {
  height: 8px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 1px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.state-bar-progress.led-array {
  background: repeating-linear-gradient(
    90deg,
    rgba(0,0,0,0.8) 0px,
    rgba(0,0,0,0.8) 2px,
    transparent 2px,
    transparent 6px
  );
  z-index: 2; /* Draw grid lines ON TOP of the fill */
}

.state-bar-fill {
  height: 100%;
  width: 0%;
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px currentColor;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1; /* Below the led-array overlay */
}

.state-bar-fill.cyan {
  background: var(--neon-cyan);
  box-shadow: 0 0 8px var(--neon-cyan);
}

.state-bar-fill.magenta {
  background: #ff00f0;
  box-shadow: 0 0 8px #ff00f0;
}

.state-bar-fill.red {
  background: #ff003c;
  box-shadow: 0 0 8px #ff003c;
}

.state-diagnostic-ticker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  color: #888;
  margin-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
}

.diagnostic-led-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.diagnostic-led-dot.green {
  background: #39ff14;
  box-shadow: 0 0 8px #39ff14;
}

.diagnostic-led-dot.red {
  background: #ff003c;
  box-shadow: 0 0 8px #ff003c;
  animation: ledPulse 0.8s steps(2) infinite;
}

.danger-override-btn {
  border-color: rgba(255, 0, 60, 0.4) !important;
  color: #ff003c !important;
}

.danger-override-btn:hover {
  background: #ff003c !important;
  color: #000 !important;
  box-shadow: 0 0 15px rgba(255, 0, 60, 0.45) !important;
}

/* ==========================================================================
   TRANSIENT SCREEN OVERRIDE SHAKE KEYFRAMES
   ========================================================================== */
@keyframes contentGlitchShake {
  0% { transform: translate3d(0px, 0px, 0) skewX(0deg); }
  10% { transform: translate3d(-6px, 4px, 0) skewX(-2deg); }
  20% { transform: translate3d(8px, -3px, 0) skewX(4deg); }
  30% { transform: translate3d(-4px, -5px, 0) skewX(-1deg); }
  40% { transform: translate3d(5px, 3px, 0) skewX(3deg); }
  50% { transform: translate3d(-3px, -2px, 0) skewX(0deg); }
  60% { transform: translate3d(3px, 4px, 0) skewX(-1deg); }
  70% { transform: translate3d(-2px, -3px, 0) skewX(2deg); }
  80% { transform: translate3d(2px, 1px, 0) skewX(0deg); }
  90% { transform: translate3d(-1px, -1px, 0) skewX(0deg); }
  100% { transform: translate3d(0px, 0px, 0) skewX(0deg); }
}

@keyframes contentGlitchShakeCentered {
  0% { transform: translate3d(0px, 0px, 0) skewX(0deg); }
  10% { transform: translate3d(-6px, 4px, 0) skewX(-2deg); }
  20% { transform: translate3d(8px, -3px, 0) skewX(4deg); }
  30% { transform: translate3d(-4px, -5px, 0) skewX(-1deg); }
  40% { transform: translate3d(5px, 3px, 0) skewX(3deg); }
  50% { transform: translate3d(-3px, -2px, 0) skewX(0deg); }
  60% { transform: translate3d(3px, 4px, 0) skewX(-1deg); }
  70% { transform: translate3d(-2px, -3px, 0) skewX(2deg); }
  80% { transform: translate3d(2px, 1px, 0) skewX(0deg); }
  90% { transform: translate3d(-1px, -1px, 0) skewX(0deg); }
  100% { transform: translate3d(0px, 0px, 0) skewX(0deg); }
}

.content-shake-active {
  animation: contentGlitchShake 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@media (min-height: 851px) and (min-width: 769px) {
  .content-shake-active {
    animation: contentGlitchShakeCentered 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
}

/* Staggered Reveal Animation for content sections */
@keyframes section-slide-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Base states for active animation targets */
.page-section.active .section-paragraph,
.page-section.active .theory-quote,
.page-section.active .decryption-core-container,
.page-section.active .archive-card,
.page-section.active .terminal-panel {
  opacity: 0;
  animation: section-slide-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Stagger delay offsets for staggered entry feel */
.page-section.active .section-paragraph { animation-delay: 0.08s; }
.page-section.active .theory-quote { animation-delay: 0.18s; }
.page-section.active .decryption-core-container { animation-delay: 0.28s; }

.page-section.active .archive-card:nth-child(1) { animation-delay: 0.06s; }
.page-section.active .archive-card:nth-child(2) { animation-delay: 0.14s; }
.page-section.active .archive-card:nth-child(3) { animation-delay: 0.22s; }
.page-section.active .archive-card:nth-child(4) { animation-delay: 0.30s; }

.page-section.active .terminal-panel { animation-delay: 0.08s; }

#decrypt-core-btn {
  max-width: 280px;
  margin: 25px auto;
  display: block;
  pointer-events: auto;
}

#trigger-override-btn {
  max-width: 220px;
  margin: 15px auto 0 auto;
  display: block;
  pointer-events: auto;
}

.neural-state-panel {
  display: none;
}

/* Desktop Only Premium Glassmorphism Blurs */
@media (min-width: 1024px) {
  #loader-video {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  .boot-click-overlay {
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
  }
  .boot-container {
    backdrop-filter: blur(8px) saturate(140%);
    -webkit-backdrop-filter: blur(8px) saturate(140%);
  }
  .archive-card {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  .neural-state-panel {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}

/* ==========================================================================
   NEURAL TOPOLOGY 3D GRAPH STYLING
   ========================================================================== */
.topology-wrapper {
  position: relative;
  width: 100%;
  height: 620px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg, 8px);
  background: radial-gradient(circle at 50% 50%, rgba(15, 15, 22, 0.6) 0%, rgba(5, 5, 8, 0.85) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  box-shadow: 
    inset 0 0 60px rgba(0, 0, 0, 0.9),
    0 10px 30px rgba(0, 0, 0, 0.5);
  margin-top: 20px;
}

.topology-container {
  width: 100%;
  height: 100%;
  outline: none;
  cursor: grab;
}

.topology-container:active {
  cursor: grabbing;
}

.topology-hud {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  box-sizing: border-box;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 5;
}

.topology-hud-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.8);
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 240, 255, 0.05) 100%);
  padding: 8px 16px;
  border-radius: 2px;
  border-left: 3px solid var(--neon-cyan, #00f0ff);
  border-bottom: 1px solid rgba(0, 240, 255, 0.1);
  align-self: flex-start;
  pointer-events: none;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.topology-hud-header *,
.topology-hud-title,
.topology-hud-body,
.header-main-title,
.hud-label-text {
  pointer-events: none;
}

.topology-hud-close {
  pointer-events: auto;
}

.topology-detail-card {
  width: 340px;
  background: linear-gradient(145deg, rgba(15, 15, 20, 0.85) 0%, rgba(5, 5, 8, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-top: 1px solid var(--accent-color, rgba(0, 240, 255, 0.3));
  border-radius: 6px;
  overflow: hidden;
  pointer-events: auto;
  align-self: flex-end;
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.8), 
    0 0 30px var(--accent-color, rgba(0, 240, 255, 0.03)),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color 0.3s ease, border-top-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(0);
}

.topology-detail-card:hover {
  border-color: var(--accent-color, rgba(0, 240, 255, 0.35));
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.8), 0 0 25px var(--accent-color, rgba(0, 240, 255, 0.1));
  transform: translateY(-2px);
}

.topology-detail-card .card-title-band {
  background: rgba(0, 240, 255, 0.06);
  border-bottom: 1px solid rgba(0, 240, 255, 0.15);
  padding: 10px 18px;
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent-color, var(--neon-cyan, #00f0ff));
  text-transform: uppercase;
}

.topology-detail-card .card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.topology-detail-card .detail-row {
  display: flex;
  font-size: 12.5px;
  line-height: 1.6;
}

.topology-detail-card .detail-row .label {
  width: 80px;
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  color: #777;
  flex-shrink: 0;
}

.topology-detail-card .detail-row .value {
  color: #dfdfdf;
  word-break: break-all;
  font-family: var(--font-serif, serif);
}

.topology-detail-card .detail-row .value.monospace {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
}

.topology-detail-card .detail-row .value.text-cyan {
  color: var(--neon-cyan, #00f0ff);
  font-family: var(--font-mono, monospace);
  font-size: 11px;
}

.topology-detail-card .card-footer-band {
  background: rgba(255, 255, 255, 0.015);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding: 8px 18px;
  font-family: var(--font-mono, monospace);
  font-size: 8.5px;
  color: #555;
  text-align: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-section.active .topology-wrapper {
  animation: section-slide-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.12s;
  opacity: 0;
}

@media (max-width: 768px) {
  .topology-wrapper {
    height: 480px;
  }
  .topology-hud {
    padding: 15px;
  }
  .topology-detail-card {
    width: calc(100% - 30px);
    align-self: center;
    position: absolute;
    bottom: 15px;
    transform: translateY(120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  }
  .topology-detail-card.is-active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .topology-reader-panel {
    width: 100% !important;
  }
  .topology-hud-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: calc(100% - 30px) !important;
  }
  #topology-search-input {
    width: 100% !important;
  }
}

/* ==========================================================================
   NEURAL SEARCH AND SLIDING READER PANEL STYLING
   ========================================================================== */
.topology-hud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: calc(100% - 48px);
  gap: 20px;
}
.header-main-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.topology-search-wrapper {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  padding: 2px 10px;
  gap: 8px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  pointer-events: none;
}
.topology-search-wrapper > * {
  pointer-events: auto;
}
.topology-search-wrapper:focus-within {
  border-color: rgba(0, 240, 255, 0.4);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}
.topology-search-wrapper .search-icon {
  font-size: 10px;
  color: var(--neon-cyan, #00f0ff);
  animation: ledPulse 1.5s ease-in-out infinite;
}
#topology-search-input {
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  width: 160px;
  letter-spacing: 0.05em;
  padding: 4px 0;
}
#topology-search-input::placeholder {
  color: #555;
}

.topology-reader-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  max-width: 90%;
  height: auto;
  max-height: 85vh;
  background: linear-gradient(135deg, rgba(8, 8, 12, 0.82) 0%, rgba(3, 3, 5, 0.88) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-top: 1px solid var(--accent-color, rgba(0, 240, 255, 0.5));
  border-bottom: 1px solid color-mix(in srgb, var(--accent-color, #ff00f0) 30%, transparent);
  border-radius: 6px;
  transform: translate3d(-50%, -42%, 0) scale(0.96);
  opacity: 0;
  pointer-events: none;
  z-index: 20;
  display: flex;
  flex-direction: column;
  will-change: transform, opacity;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 
    0 30px 80px rgba(0, 0, 0, 0.9), 
    0 0 40px color-mix(in srgb, var(--accent-color, #00f0ff) 10%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.topology-reader-panel.is-open {
  transform: translate3d(-50%, -50%, 0) scale(1);
  opacity: 1;
  pointer-events: auto;
  border-color: var(--accent-color, rgba(0, 240, 255, 0.7));
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.9), 0 0 30px color-mix(in srgb, var(--accent-color, #00f0ff) 25%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

@keyframes modalGlitchIn {
  0% { transform: translate3d(-50%, -46%, 0) scale(0.96) skewX(3deg); }
  15% { transform: translate3d(-49%, -49%, 0) scale(0.99) skewX(-3deg); }
  30% { transform: translate3d(-51%, -51%, 0) scale(1.01) skewX(1.5deg); }
  45% { transform: translate3d(-50%, -50%, 0) scale(1) skewX(0deg); }
  100% { transform: translate3d(-50%, -50%, 0) scale(1); }
}

.topology-container,
.topology-hud,
.topology-skeleton-loader {
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.topology-wrapper.is-reading .topology-container {
  opacity: 0.15;
  transform: scale(0.95);
  pointer-events: none;
}

.topology-wrapper.is-reading .topology-hud,
.topology-wrapper.is-reading .topology-skeleton-loader {
  opacity: 0;
  pointer-events: none;
}

.reader-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.015);
}

.reader-led-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-color, var(--neon-cyan));
  box-shadow: 0 0 8px var(--accent-color, var(--neon-cyan));
  margin-right: 8px;
  display: inline-block;
}

.reader-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #aaa;
  flex-grow: 1;
}

.reader-close-btn {
  background: none;
  border: none;
  color: #666;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.reader-close-btn:hover {
  color: #ff003c;
  transform: scale(1.15);
}

.reader-meta {
  padding: 15px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px 25px;
  background: rgba(0, 0, 0, 0.15);
  font-size: 11px;
}

.meta-item {
  display: flex;
  align-items: center;
}

.reader-meta .label {
  font-family: var(--font-mono, monospace);
  font-size: 9px;
  color: #666;
  margin-right: 6px;
  text-transform: uppercase;
}

.reader-meta .value {
  color: #ddd;
  font-family: var(--font-mono, monospace);
}

.reader-meta .value.text-cyan {
  color: var(--neon-cyan, #00f0ff);
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.2);
}

.reader-divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.15) 0%, transparent 100%);
}

.reader-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: 24px;
  box-sizing: border-box;
  font-family: var(--font-serif, serif);
  font-size: 14.5px;
  line-height: 1.9;
  color: #ccc;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.reader-content::-webkit-scrollbar {
  width: 6px;
}

.reader-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.reader-content::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 240, 255, 0.3);
}

.reader-content h1, .reader-content h2, .reader-content h3 {
  font-family: var(--font-mono, monospace);
  color: #fff;
  margin-top: 24px;
  margin-bottom: 12px;
  font-weight: 700;
}

.reader-content h1 {
  font-size: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
  margin-top: 10px;
}

.reader-content h2 {
  font-size: 15px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
  padding-bottom: 4px;
}

.reader-content h3 {
  font-size: 13.5px;
}

.reader-content p {
  margin-bottom: 16px;
}

.reader-content strong {
  color: #fff;
  font-weight: 600;
}

.reader-content code {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 6px;
  border-radius: 3px;
  color: #ff00f0;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.reader-content pre {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 4px;
  overflow-x: auto;
  margin-bottom: 18px;
}

.reader-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: #dfdfdf;
}

.reader-content blockquote {
  border-left: 3px solid var(--neon-cyan, #00f0ff);
  background: rgba(0, 240, 255, 0.02);
  padding: 10px 18px;
  margin: 0 0 16px 0;
  font-style: italic;
  color: #aaa;
}

.reader-content ul, .reader-content ol {
  margin-left: 20px;
  margin-bottom: 16px;
}

.reader-content li {
  margin-bottom: 6px;
}

.reader-content a {
  color: var(--neon-cyan, #00f0ff);
  text-decoration: none;
  border-bottom: 1px dashed rgba(0, 240, 255, 0.4);
  transition: color 0.2s, border-bottom-color 0.2s;
}

.reader-content a:hover {
  color: #fff;
  border-bottom-color: #fff;
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.6);
}

/* ==========================================================================
   NEURAL GRAPH SKELETON LOADER STYLING (GPU Accelerated)
   ========================================================================== */
.topology-skeleton-loader {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 8, 0.96);
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  transform: scale3d(1, 1, 1);
  opacity: 1;
  pointer-events: auto;
}

.topology-skeleton-loader.is-loaded {
  opacity: 0;
  transform: scale3d(1.02, 1.02, 1);
  pointer-events: none;
}

.skeleton-glow-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 120px;
  border: 2px dashed rgba(0, 240, 255, 0.25);
  border-radius: 50%;
  transform: translate3d(-50%, -50%, 0) scale3d(1, 1, 1);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.05);
  animation: ringBreath 2.5s ease-in-out infinite;
  pointer-events: none;
  will-change: transform, opacity;
}

@keyframes ringBreath {
  0% { transform: translate3d(-50%, -50%, 0) scale3d(0.85, 0.85, 1); opacity: 0.35; }
  50% { transform: translate3d(-50%, -50%, 0) scale3d(1.15, 1.15, 1); opacity: 0.85; }
  100% { transform: translate3d(-50%, -50%, 0) scale3d(0.85, 0.85, 1); opacity: 0.35; }
}

.skeleton-scanline {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent 0%, var(--neon-cyan, #00f0ff) 50%, transparent 100%);
  box-shadow: 0 0 12px var(--neon-cyan, #00f0ff);
  opacity: 0.7;
  animation: scanlineMove 2.2s linear infinite;
  pointer-events: none;
  will-change: transform;
}

@keyframes scanlineMove {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(0, 620px, 0); }
}

.skeleton-telemetry {
  position: absolute;
  bottom: 40px;
  left: 45px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 11px;
  color: #555;
  letter-spacing: 0.05em;
  pointer-events: none;
}

.telemetry-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.telemetry-row.alert {
  color: var(--neon-cyan, #00f0ff);
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.2);
}

.telemetry-row.warning {
  color: #ff003c;
  animation: warningFlicker 1.5s steps(2) infinite;
  will-change: opacity;
}

@keyframes warningFlicker {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.led-blink {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.led-blink.red {
  background: #ff003c;
  box-shadow: 0 0 8px #ff003c;
  animation: ledPulse 0.8s steps(2) infinite;
  will-change: opacity;
}





/* ==========================================================================
   READER CONTENT STAGGERED FADE-IN (CYBERPUNK REVEAL)
   ========================================================================== */
.reader-content > * {
  opacity: 0;
  transform: translateY(10px);
  animation: contentFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes contentFadeIn {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

.reader-content > *:nth-child(1) { animation-delay: 0.05s; }
.reader-content > *:nth-child(2) { animation-delay: 0.10s; }
.reader-content > *:nth-child(3) { animation-delay: 0.15s; }
.reader-content > *:nth-child(4) { animation-delay: 0.20s; }
.reader-content > *:nth-child(5) { animation-delay: 0.25s; }
.reader-content > *:nth-child(6) { animation-delay: 0.30s; }
.reader-content > *:nth-child(7) { animation-delay: 0.35s; }
.reader-content > *:nth-child(8) { animation-delay: 0.40s; }
.reader-content > *:nth-child(9) { animation-delay: 0.45s; }
.reader-content > *:nth-child(10) { animation-delay: 0.50s; }
.reader-content > *:nth-child(n+11) { animation-delay: 0.55s; }

/* Custom Scrollbar for the Reader */
.topology-reader-panel::-webkit-scrollbar {
  width: 6px;
}
.topology-reader-panel::-webkit-scrollbar-track {
  background: rgba(8, 8, 10, 0.8);
  border-left: 1px solid rgba(0, 240, 255, 0.1);
}
.topology-reader-panel::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.4);
  border-radius: 3px;
}
.topology-reader-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 240, 255, 0.8);
}

/* Refined Markdown Elements */
.reader-content h1, .reader-content h2, .reader-content h3 {
  border-left: 4px solid #00f0ff;
  padding-left: 12px;
  color: #fff;
  margin-top: 1.5em;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}
.reader-content h1 { font-size: 1.6rem; }
.reader-content h2 { font-size: 1.3rem; }
.reader-content h3 { font-size: 1.1rem; }

.reader-content blockquote {
  border-left: 2px dashed #ff00f0;
  padding-left: 16px;
  margin-left: 0;
  color: #aaa;
  background: rgba(255, 0, 240, 0.05);
  padding: 12px 16px;
  font-family: 'Courier New', Courier, monospace;
}
.reader-content pre {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px;
  overflow-x: auto;
  border-radius: 4px;
}

/* Internal WikiLinks style */
.reader-content a.internal-wikilink {
  color: var(--accent-color, #00f0ff);
  text-decoration: none;
  border-bottom: 1px dashed var(--accent-color, rgba(0, 240, 255, 0.5));
  padding-bottom: 1px;
  transition: all 0.2s ease;
}
.reader-content a.internal-wikilink:hover {
  color: #fff;
  border-bottom-style: solid;
  text-shadow: 0 0 8px var(--accent-color, #00f0ff);
}

/* Neighbor Synapses Panel & Buttons */
.reader-synapse-panel {
  animation: synapse-fade-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes synapse-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.synapse-link-btn {
  background: rgba(8, 8, 10, 0.5);
  font-size: 10px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 2px;
  border: 1px solid transparent;
}

.synapse-link-btn:hover {
  background: var(--node-accent, #00f0ff) !important;
  color: #000 !important;
  box-shadow: 0 0 12px var(--node-accent, #00f0ff);
  border-color: var(--node-accent, #00f0ff) !important;
}

/* Critical Meltdown Glitch */
.critical-glitch {
  animation: critical-glitch-shake 0.15s infinite;
  position: relative;
}
.critical-glitch::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 0, 60, 0.08);
  pointer-events: none;
  z-index: 99999;
}
@keyframes critical-glitch-shake {
  0% { transform: translate(1px, 1px) rotate(0deg); filter: hue-rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); filter: hue-rotate(15deg) contrast(1.2); }
  20% { transform: translate(-3px, 0px) rotate(1deg); }
  30% { transform: translate(0px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); filter: hue-rotate(-10deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(2px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(2px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); filter: hue-rotate(0deg); }
}

/* CRT Shutdown Screen Collapse Overlay */
.screen-collapse-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  z-index: 100000;
  pointer-events: none;
}

.screen-collapse-overlay.shutdown-collapse {
  animation: crt-shutdown 0.4s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

.screen-collapse-overlay.startup-expand {
  animation: crt-startup 0.4s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

@keyframes crt-shutdown {
  0% {
    transform: scaleY(1) scaleX(1);
    background: rgba(255, 255, 255, 0.1);
    filter: brightness(1) blur(0px);
  }
  50% {
    transform: scaleY(0.004) scaleX(1);
    background: rgba(255, 255, 255, 0.8);
    filter: brightness(3) blur(1px);
  }
  100% {
    transform: scaleY(0.004) scaleX(0);
    background: #ffffff;
    filter: brightness(10) blur(2px);
    opacity: 1;
  }
}

@keyframes crt-startup {
  0% {
    transform: scaleY(0.004) scaleX(0);
    background: #ffffff;
    opacity: 1;
  }
  50% {
    transform: scaleY(0.004) scaleX(1);
    background: rgba(0, 240, 255, 0.8);
    opacity: 1;
  }
  100% {
    transform: scaleY(1) scaleX(1);
    background: transparent;
    opacity: 0;
  }
}

/* Reader Panel Decryption Shiver */
@keyframes shiver-decryption {
  0% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
  100% { transform: translateX(0); }
}
#topology-reader-panel.shiver-active {
  animation: shiver-decryption 0.3s cubic-bezier(.36,.07,.19,.97) both;
}

/* Fullscreen archive reading mode */
body.reader-fullscreen-active {
  overflow: hidden;
}

.topology-reader-panel.archive-fullscreen-reader {
  position: absolute;
  inset: 0;
  top: 0;
  left: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  border-radius: 0;
  border: none;
  border-top: 1px solid color-mix(in srgb, var(--accent-color, #00f0ff) 65%, transparent);
  transform: none;
  z-index: 10000;
  overflow: hidden;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent-color, #00f0ff) 16%, transparent) 0 1px, transparent 1px calc(100% - 1px), color-mix(in srgb, var(--accent-color, #00f0ff) 16%, transparent) calc(100% - 1px)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 18%),
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--accent-color, #00f0ff) 18%, transparent), transparent 42%),
    rgba(4, 7, 10, 0.96);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.topology-reader-panel.archive-fullscreen-reader.is-open {
  transform: translate3d(0, 0, 0) scale(1);
  animation: archiveReaderIn 0.48s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  backdrop-filter: blur(22px) saturate(1.08);
  -webkit-backdrop-filter: blur(22px) saturate(1.08);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.45);
}

body.reader-fullscreen-active #topology-reader-panel.archive-fullscreen-reader {
  position: fixed !important;
  inset: 24px !important;
  top: 24px !important;
  right: 24px !important;
  bottom: 24px !important;
  left: 24px !important;
  width: calc(100vw - 48px) !important;
  height: calc(100vh - 48px) !important;
  max-width: none !important;
  max-height: none !important;
  z-index: 10000 !important;
  
  /* GPU acceleration and transition rules */
  will-change: transform, opacity;
  backface-visibility: hidden;
  
  /* Closed State: slide down slightly and fade out */
  opacity: 0 !important;
  transform: translate3d(0, 20px, 0) scale(0.99) !important;
  pointer-events: none !important;
  transition: transform 0.3s cubic-bezier(0.15, 0.85, 0.35, 1) !important, opacity 0.3s cubic-bezier(0.15, 0.85, 0.35, 1) !important;
  
  /* Backdrop blur always active (fades in/out smoothly with opacity) */
  backdrop-filter: blur(22px) saturate(1.08) !important;
  -webkit-backdrop-filter: blur(22px) saturate(1.08) !important;
}

body.reader-fullscreen-active #topology-reader-panel.archive-fullscreen-reader.is-open {
  opacity: 1 !important;
  transform: translate3d(0, 0, 0) scale(1) !important;
  pointer-events: auto !important;
  animation: none !important; /* Disable conflicting keyframe animations */
}

@keyframes archiveReaderIn {
  0% {
    opacity: 0;
    transform: translate3d(0, 24px, 0) scale(0.985);
    filter: blur(10px);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

.topology-reader-panel.archive-fullscreen-reader::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, transparent 0, rgba(255, 255, 255, 0.025) 50%, transparent 100%);
  background-size: 100% 4px, 260px 100%;
  mix-blend-mode: screen;
  opacity: 0.28;
}

.topology-reader-panel.archive-fullscreen-reader .reader-header,
.topology-reader-panel.archive-fullscreen-reader .reader-meta,
.topology-reader-panel.archive-fullscreen-reader .reader-divider {
  width: min(1120px, calc(100vw - 48px));
  margin-left: auto;
  margin-right: auto;
  flex-shrink: 0;
}

.topology-reader-panel.archive-fullscreen-reader .reader-header {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 68px;
  padding: 18px 0;
  background:
    linear-gradient(180deg, rgba(4, 7, 10, 0.98), rgba(4, 7, 10, 0.82));
  border-bottom: 1px solid color-mix(in srgb, var(--accent-color, #00f0ff) 22%, transparent);
}

.topology-reader-panel.archive-fullscreen-reader .reader-title {
  color: #f4fbff;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-shadow: 0 0 18px color-mix(in srgb, var(--accent-color, #00f0ff) 38%, transparent);
}

.topology-reader-panel.archive-fullscreen-reader .reader-edit-btn {
  border-color: color-mix(in srgb, var(--accent-color, #00f0ff) 48%, transparent) !important;
  background: rgba(255, 255, 255, 0.035) !important;
}

.topology-reader-panel.archive-fullscreen-reader .reader-close-btn {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.topology-reader-panel.archive-fullscreen-reader .reader-meta {
  padding: 14px 0 12px;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.topology-reader-panel.archive-fullscreen-reader .reader-content {
  width: min(920px, calc(100vw - 48px));
  margin: 0 auto;
  padding: clamp(28px, 5vh, 56px) 0 72px;
  font-size: clamp(16px, 1.15vw, 19px);
  line-height: 1.92;
  color: rgba(240, 246, 248, 0.9);
}

.topology-reader-panel.archive-fullscreen-reader .reader-content h1 {
  font-size: clamp(2rem, 4.6vw, 4.5rem);
  line-height: 1.05;
  border-left: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--accent-color, #00f0ff) 32%, transparent);
  padding-left: 0;
  padding-bottom: 18px;
  margin: 0 0 32px;
  letter-spacing: 0;
}

.topology-reader-panel.archive-fullscreen-reader .reader-content h2 {
  font-size: clamp(1.35rem, 2vw, 2rem);
  border-left: 0;
  padding-left: 0;
  margin-top: 2.1em;
}

.topology-reader-panel.archive-fullscreen-reader .reader-content h3 {
  border-left: 0;
  padding-left: 0;
}

.topology-reader-panel.archive-fullscreen-reader .reader-content p {
  margin-bottom: 1.25em;
}

.topology-reader-panel.archive-fullscreen-reader .reader-content blockquote {
  margin: 2em 0;
  padding: 18px 24px;
  border-left: 3px solid var(--accent-color, #00f0ff);
  background: color-mix(in srgb, var(--accent-color, #00f0ff) 7%, transparent);
}

@media (max-width: 720px) {
  .topology-reader-panel.archive-fullscreen-reader .reader-header,
  .topology-reader-panel.archive-fullscreen-reader .reader-meta,
  .topology-reader-panel.archive-fullscreen-reader .reader-divider,
  .topology-reader-panel.archive-fullscreen-reader .reader-content {
    width: min(100% - 28px, 920px);
  }

  .topology-reader-panel.archive-fullscreen-reader .reader-header {
    min-height: 62px;
  }

  .topology-reader-panel.archive-fullscreen-reader .reader-title {
    font-size: 10px;
    letter-spacing: 0.11em;
  }

  .topology-reader-panel.archive-fullscreen-reader .reader-edit-btn {
    display: none;
  }
}

/* Ingest Telemetry HUD Badge Styles */
.ingest-hud-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: monospace;
  font-size: 11px;
  font-weight: bold;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid var(--neon-cyan, #00f0ff);
  padding: 2px 10px;
  border-radius: 2px;
  box-shadow: 0 0 4px rgba(0, 240, 255, 0.2);
  animation: ingest-pulse-border 1.5s ease-in-out infinite;
}

.ingest-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon-cyan, #00f0ff);
  box-shadow: 0 0 6px var(--neon-cyan, #00f0ff);
  animation: led-blink 0.8s ease-in-out infinite alternate;
}

.ingest-label {
  color: var(--neon-cyan, #00f0ff);
  text-shadow: 0 0 3px var(--neon-cyan, #00f0ff);
}

@keyframes ingest-pulse-border {
  0%, 100% {
    border-color: rgba(0, 240, 255, 0.4);
    box-shadow: 0 0 4px rgba(0, 240, 255, 0.1);
  }
  50% {
    border-color: rgba(0, 240, 255, 1.0);
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
  }
}

@keyframes led-blink {
  0% {
    opacity: 0.3;
  }
  100% {
    opacity: 1.0;
    box-shadow: 0 0 10px var(--neon-cyan, #00f0ff);
  }
}

/* ==========================================================================
   Phase 2.5B — Ambient Neural Index Layer (Background-Integrated)
   ========================================================================== */

/* Override panel styles when displaying time index to merge with background */
.topology-reader-panel.time-index-active {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  left: auto !important;
  width: 480px !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  transform: translate3d(0, 0, 0) !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.3) !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Ensure open state handles layout class parameters with no transition jumps */
.topology-reader-panel.time-index-active.is-open {
  transform: translate3d(0, 0, 0) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.topology-reader-panel.time-index-active .reader-content {
  padding: 0 !important;
  height: 100% !important;
  overflow-y: auto !important;
}

.topology-reader-panel.time-index-active .reader-meta,
.topology-reader-panel.time-index-active .reader-divider {
  display: none !important;
}

.topology-reader-panel.time-index-active .reader-header {
  border-bottom: none !important;
  background: transparent !important;
  padding: 0 !important;
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
}

.topology-reader-panel.time-index-active .reader-title,
.topology-reader-panel.time-index-active .reader-led-indicator,
.topology-reader-panel.time-index-active #reader-edit-btn {
  display: none !important;
}

.topology-reader-panel.time-index-active .reader-close-btn {
  color: rgba(255, 255, 255, 0.4) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border-radius: 50% !important;
  width: 32px !important;
  height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 20px !important;
  cursor: pointer !important;
  border: none !important;
  transition: background 0.2s, color 0.2s !important;
}

.topology-reader-panel.time-index-active .reader-close-btn:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #fff !important;
}

/* Keep the WebGL background visible when time index is active */
.topology-wrapper.time-index-mode .topology-container,
.topology-wrapper:has(.time-index-active) .topology-container {
  opacity: 0.75 !important;
  transform: none !important;
  pointer-events: auto !important;
}

.topology-wrapper.time-index-mode .topology-hud,
.topology-wrapper:has(.time-index-active) .topology-hud {
  opacity: 0.4 !important;
  pointer-events: none !important;
}

[hidden] {
  display: none !important;
}

.time-index-tag-filter option,
.time-index-sort option {
  background-color: #0c0a12;
  color: #fff;
}

.time-index-search::placeholder {
  color: rgba(245, 247, 255, 0.35);
}

.time-index-layer {
  position: relative;
  min-height: 100%;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(
      90deg,
      transparent 0%,
      rgba(5, 6, 12, 0.44) 28%,
      rgba(3, 4, 8, 0.84) 100%
    );
  backdrop-filter: blur(10px);
}

.time-index-layer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.15;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.03) 0,
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px,
      transparent 7px
    );
  mix-blend-mode: screen;
}

.time-index-ambient-field {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.time-index-radial-memory {
  position: absolute;
  width: 42rem;
  height: 42rem;
  left: 50%;
  top: 8%;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(254, 232, 1, 0.06), transparent 58%);
  filter: blur(10px);
  opacity: 0.72;
  animation: timeMemoryBreath 9s ease-in-out infinite;
}

.time-index-neural-atom {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(254, 232, 1, 0.65);
  box-shadow: 0 0 10px rgba(254, 232, 1, 0.24);
  opacity: 0.18;
  transform: translate3d(0, 0, 0) scale(var(--s));
  animation: timeAtomDrift var(--d) ease-in-out infinite alternate;
}

.time-index-pulse-line {
  position: absolute;
  left: -15%;
  top: calc(var(--y) * 1%);
  width: 130%;
  height: 1px;
  opacity: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(254, 232, 1, 0.12),
    rgba(255, 127, 39, 0.08),
    transparent
  );
  transform: translate3d(-12%, 0, 0);
  animation: timePulseSweep var(--d) linear infinite;
}

.time-index-content {
  position: relative;
  z-index: 1;
}

.time-index-hero {
  margin-bottom: 1.4rem;
}

.time-index-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: rgba(254, 232, 1, 0.72);
  text-transform: uppercase;
}

.time-index-title {
  margin: 0.25rem 0 0;
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  line-height: 1.1;
  font-weight: 700;
  color: rgba(255, 245, 183, 0.96);
  text-shadow: 0 0 26px rgba(254, 232, 1, 0.12);
}

.time-index-subtitle {
  margin: 0.55rem 0 0;
  max-width: 40rem;
  color: rgba(230, 233, 245, 0.55);
  font-size: 0.85rem;
}

.time-index-subtitle span {
  color: rgba(254, 232, 1, 0.82);
}

/* De-cardified Stats Bar */
.time-index-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.time-index-stat {
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.time-index-stat strong {
  display: inline;
  font-size: 1.05rem;
  color: rgba(254, 232, 1, 0.9);
  margin-right: 0.35rem;
  font-family: var(--font-mono, monospace);
}

.time-index-stat span {
  display: inline;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: rgba(230, 233, 245, 0.45);
}

/* Minimalist Underline Controls */
.time-index-toolbar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.8rem;
  margin: 1.2rem 0 1.5rem;
}

.time-index-search,
.time-index-tag-filter,
.time-index-sort {
  min-height: 2.2rem;
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 0 !important;
  outline: none !important;
  color: rgba(245, 247, 255, 0.86) !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  font-family: var(--font-mono, monospace);
  font-size: 0.78rem;
  transition: border-bottom-color 200ms ease !important;
}

.time-index-search {
  padding: 0 0.5rem 0 0 !important;
}

.time-index-tag-filter,
.time-index-sort {
  padding: 0 1.2rem 0 0.2rem !important;
  cursor: pointer;
}

.time-index-search:focus,
.time-index-tag-filter:focus,
.time-index-sort:focus {
  border-bottom-color: rgba(254, 232, 1, 0.6) !important;
}

.time-index-stream {
  display: grid;
  gap: 1.5rem;
}

.time-index-day-group {
  position: relative;
  display: grid;
  gap: 0.5rem;
  padding-left: 1.2rem;
}

.time-index-day-group::before {
  content: "";
  position: absolute;
  left: 0.18rem;
  top: 1.4rem;
  bottom: 0.25rem;
  width: 1px;
  background: linear-gradient(
    180deg,
    rgba(254, 232, 1, 0.25),
    rgba(254, 232, 1, 0.03)
  );
}

.time-index-date-marker {
  color: rgba(254, 232, 1, 0.76);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-family: var(--font-mono, monospace);
}

/* De-cardified Memory Signal Row */
.time-index-memory-shard {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1.2rem 0.5rem;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  transform: none;
  transition: background-color 220ms ease, border-bottom-color 220ms ease, padding-left 220ms ease;
}

.time-index-memory-shard::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(254, 232, 1, 0.06),
    transparent
  );
  transform: translateX(-100%);
  transition: opacity 220ms ease;
}

.time-index-memory-shard:hover {
  transform: none;
  background-color: rgba(254, 232, 1, 0.02);
  border-bottom-color: rgba(254, 232, 1, 0.2);
  padding-left: 0.9rem;
  box-shadow: none;
}

.time-index-memory-shard:hover::before {
  opacity: 1;
  animation: memoryShardSweep 780ms ease forwards;
}

.time-index-memory-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(250, 251, 255, 0.92);
  transition: color 220ms ease;
}

.time-index-memory-shard:hover .time-index-memory-title {
  color: rgba(254, 232, 1, 0.95);
}

.time-index-memory-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.4rem;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: rgba(230, 233, 245, 0.42);
  font-family: var(--font-mono, monospace);
}

.time-index-memory-excerpt {
  margin: 0.5rem 0 0;
  color: rgba(230, 233, 245, 0.52);
  font-size: 0.8rem;
  line-height: 1.6;
}

.time-index-memory-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.time-index-memory-tags span {
  padding: 0.12rem 0.4rem;
  border-radius: 2px;
  background: rgba(254, 232, 1, 0.05);
  color: rgba(255, 245, 183, 0.65);
  font-size: 0.62rem;
  font-family: var(--font-mono, monospace);
  transition: background 220ms ease, color 220ms ease;
}

.time-index-memory-shard:hover .time-index-memory-tags span {
  background: rgba(254, 232, 1, 0.1);
  color: rgba(255, 245, 183, 0.85);
}

/* Academic Monospace Decryption Button */
.focus-node-btn {
  border: 1px solid rgba(254, 232, 1, 0.3) !important;
  border-radius: 3px !important;
  padding: 0.45rem 0.8rem !important;
  color: rgba(254, 232, 1, 0.88) !important;
  background: transparent !important;
  font-family: var(--font-mono, monospace) !important;
  font-size: 0.72rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.06em !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  box-shadow: none !important;
  transform: none !important;
  transition: all 200ms ease !important;
}

.focus-node-btn:hover {
  background: rgba(254, 232, 1, 0.12) !important;
  border-color: rgba(254, 232, 1, 0.85) !important;
  color: #fff !important;
  box-shadow: 0 0 10px rgba(254, 232, 1, 0.25) !important;
  transform: none !important;
  filter: none !important;
}

@keyframes timeMemoryBreath {
  0%, 100% { transform: translateX(-50%) scale(0.96); opacity: 0.48; }
  50% { transform: translateX(-50%) scale(1.04); opacity: 0.76; }
}

@keyframes timeAtomDrift {
  0% { transform: translate3d(-4px, 3px, 0) scale(var(--s)); opacity: 0.12; }
  100% { transform: translate3d(5px, -5px, 0) scale(calc(var(--s) * 1.2)); opacity: 0.32; }
}

@keyframes timePulseSweep {
  0% { transform: translate3d(-18%, 0, 0); opacity: 0; }
  12% { opacity: 0.18; }
  48% { opacity: 0.12; }
  100% { transform: translate3d(18%, 0, 0); opacity: 0; }
}

@keyframes memoryShardSweep {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

@media (max-width: 720px) {
  .topology-reader-panel.time-index-active {
    width: 100% !important;
    height: 100% !important;
    max-height: 100vh !important;
    top: 0 !important;
    right: 0 !important;
    transform: translate3d(0, 0, 0) !important;
  }

  .time-index-layer {
    padding: 1.2rem;
  }

  .time-index-stats {
    flex-direction: column;
    gap: 0.5rem;
  }

  .time-index-toolbar {
    grid-template-columns: 1fr;
  }

  .time-index-memory-shard {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .focus-node-btn {
    width: 100%;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .time-index-radial-memory,
  .time-index-neural-atom,
  .time-index-pulse-line,
  .time-index-memory-shard::before {
    animation: none !important;
  }

  .time-index-memory-shard,
  .focus-node-btn {
    transition: none !important;
  }
}

/* ==========================================================================
   ORGANIC & ANTI-MECHANICAL VISUAL REFINEMENTS (ROUND 15)
   ========================================================================== */

/* 1. Drift Pulse Indicator - Soft Breathing Halo */
.neural-drift-pulse-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: radial-gradient(circle, rgba(254, 232, 1, 0.08) 0%, rgba(0, 0, 0, 0.4) 100%);
  border: 1px dashed rgba(254, 232, 1, 0.35);
  padding: 3px 12px;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(254, 232, 1, 0.1);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
  user-select: none;
}

.neural-drift-pulse-button:hover {
  background: radial-gradient(circle, rgba(254, 232, 1, 0.18) 0%, rgba(254, 232, 1, 0.04) 100%);
  border-color: rgba(254, 232, 1, 0.8);
  box-shadow: 0 0 18px rgba(254, 232, 1, 0.25);
  transform: translateY(-1px);
}

.drift-pulse-orb {
  position: relative;
  width: 6px;
  height: 6px;
  background-color: var(--cyber-yellow);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--cyber-yellow);
}

.drift-pulse-orb::before,
.drift-pulse-orb::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border: 1px solid var(--cyber-yellow);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.8;
  pointer-events: none;
}

.drift-pulse-orb::before {
  animation: drift-ripple-ring 2.4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.drift-pulse-orb::after {
  animation: drift-ripple-ring 2.4s cubic-bezier(0.16, 1, 0.3, 1) infinite;
  animation-delay: 1.2s;
}

@keyframes drift-ripple-ring {
  0% {
    width: 6px;
    height: 6px;
    opacity: 0.8;
  }
  100% {
    width: 24px;
    height: 24px;
    opacity: 0;
  }
}

.drift-pulse-label {
  font-family: var(--font-serif), sans-serif;
  font-size: 10.5px;
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--cyber-yellow);
  text-shadow: 0 0 4px rgba(254, 232, 1, 0.3);
}

/* 2. Ingest Pulse Badge - Soft Purple/Pink Gradient Breathing Halo */
.ingest-pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: radial-gradient(circle, rgba(255, 0, 240, 0.06) 0%, rgba(0, 0, 0, 0.4) 100%);
  border: 1px solid rgba(255, 0, 240, 0.25);
  padding: 3px 12px;
  border-radius: 16px;
  box-shadow: 0 0 10px rgba(255, 0, 240, 0.08);
  pointer-events: none;
  animation: ingest-pulse-glow 3s ease-in-out infinite alternate;
}

@keyframes ingest-pulse-glow {
  0% {
    box-shadow: 0 0 8px rgba(255, 0, 240, 0.05);
    border-color: rgba(255, 0, 240, 0.2);
  }
  100% {
    box-shadow: 0 0 16px rgba(255, 0, 240, 0.15);
    border-color: rgba(255, 0, 240, 0.45);
  }
}

.ingest-pulse-ring {
  position: relative;
  width: 6px;
  height: 6px;
  background-color: var(--neon-pink);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--neon-pink);
}

.ingest-pulse-ring::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border: 1px solid var(--neon-pink);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.8;
  animation: drift-ripple-ring 2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.ingest-pulse-label {
  font-family: var(--font-serif), sans-serif;
  font-size: 10.5px;
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: #fce7f3;
  text-shadow: 0 0 4px rgba(255, 0, 240, 0.2);
}

.ingest-pulse-label .ingest-count {
  font-family: var(--font-mono), monospace;
  font-weight: 700;
}

/* 3. Skeleton Loader Refinement - Gentle Wave Interferences */
.skeleton-telemetry-organic {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  pointer-events: none;
  z-index: 10;
}

.skeleton-breathing-dot {
  position: relative;
  width: 8px;
  height: 8px;
  background-color: var(--neon-cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--neon-cyan);
  animation: dot-breath 2.5s ease-in-out infinite alternate;
}

@keyframes dot-breath {
  0% { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(1.2); opacity: 1; }
}

.loader-poetic-text {
  font-family: var(--font-serif), sans-serif;
  font-size: 12px;
  font-style: italic;
  letter-spacing: 0.06em;
  color: rgba(255, 252, 245, 0.8);
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.15);
  animation: text-pulse-opacity 2.5s ease-in-out infinite alternate;
}

@keyframes text-pulse-opacity {
  0% { opacity: 0.65; }
  100% { opacity: 0.95; }
}

/* Add an extra concentric ring to the skeleton loader for double water-ripple look */
.skeleton-glow-ring {
  border-style: solid;
  border-width: 1px;
  border-color: rgba(0, 240, 255, 0.15);
  animation: ringBreath 4s ease-in-out infinite !important;
}

.skeleton-glow-ring::after {
  content: "";
  position: absolute;
  inset: -15px;
  border: 1px dashed rgba(255, 0, 240, 0.12);
  border-radius: 50%;
  animation: spin-clockwise 20s linear infinite;
}

@keyframes spin-clockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 4. Synapse Canvas Animation Style */
#neural-diagnostic-canvas {
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
#neural-diagnostic-canvas.meltdown-active {
  border-color: rgba(255, 0, 60, 0.4) !important;
  box-shadow: 0 0 15px rgba(255, 0, 60, 0.15), inset 0 0 12px rgba(255, 0, 60, 0.1) !important;
}
