@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@700;800&family=Roboto+Mono:wght@400;500&display=swap');

:root {
  --bg: #050811;
  --bg2: #090e1a;
  --bg-deep: #050811;
  --bg-surface: #090e1a;
  --bg-panel: #0a1222;
  --gold: #D4AF37;
  --accent-gold: #D4AF37;
  --gold-glow: rgba(212, 175, 55, 0.25);
  --accent-glow: rgba(212, 175, 55, 0.25);
  --cyan: #00F0FF;
  --red: #E11D48;
  --text1: #FFFFFF;
  --text2: #94A3B8;
  --text3: #64748B;
  --text-main: #FFFFFF;
  --text-dim: #94A3B8;
  --border: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.12);
  --border-heavy: rgba(212, 175, 55, 0.4);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 6px;
  --font-brand: 'JetBrains Mono', monospace;
  --font-ui: 'Roboto Mono', monospace;
  --mono: 'JetBrains Mono', 'Roboto Mono', monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Level 9 Override Overlay */
#level-9-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1000000;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: var(--font-brand);
  color: var(--accent-gold);
  text-align: center;
  pointer-events: none;
}

#level-9-overlay.active {
  display: flex;
  pointer-events: all;
  animation: level9-in 0.1s steps(2) infinite;
}

@keyframes level9-in {
  0% { filter: hue-rotate(0deg) contrast(1); }
  50% { filter: hue-rotate(90deg) contrast(2); transform: skewX(2deg); }
  100% { filter: hue-rotate(0deg) contrast(1); }
}

.glitch-text {
  font-size: 5rem;
  font-weight: 900;
  text-transform: uppercase;
  margin: 0;
  letter-spacing: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text1);
  font-family: var(--sans);
  overflow-x: hidden;
}

/* Standardized Topbar Navigation */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 48px;
  background: rgba(5, 8, 17, 0.92); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.topbar-brand, .brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 13px; font-weight: 800;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); text-decoration: none;
  text-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
}

.topbar-brand img, .brand-logo {
  height: 28px; width: auto; max-height: 28px;
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.4));
}

.topbar-nav {
  display: flex; align-items: center; gap: 28px;
  margin: 0 auto;
}

.topbar-nav a {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--text2); text-decoration: none; transition: all 0.2s ease;
  position: relative; padding: 4px 0;
}

.topbar-nav a:hover, .topbar-nav a.active {
  color: #FFFFFF;
}

.topbar-nav a.active::after, .topbar-nav a:hover::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px;
  background: var(--cyan); box-shadow: 0 0 8px var(--cyan);
}

.topbar-cta, .btn-primary {
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; padding: 10px 22px; border-radius: 6px;
  background: linear-gradient(135deg, var(--red) 0%, #c2133a 100%);
  color: #FFF; text-decoration: none; border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 0 20px rgba(225,29,72,0.3); transition: all 0.25s ease;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}

.topbar-cta:hover, .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 25px rgba(225,29,72,0.5), 0 0 10px var(--cyan);
  border-color: var(--cyan);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text-main);
  font-family: var(--sans);
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(circle at 20% 20%, rgba(255, 204, 0, 0.05), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(255, 204, 0, 0.03), transparent 40%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .brand, .nav, .button, .eyebrow, .terminal-header-bar, .scanner-terminal, .utc-clock, .footer-clock, .terminal-status-item, .bypass-vector, .grid-col-header, .crucible-title {
  font-family: var(--font-brand);
}

/* CRT Scanline Overlay - Disabled on body to prevent text zebra-striping (5% restraint rule) */
body::after {
  display: none !important;
}

/* Remove dotted focus outline inside buttons on click/focus */
button:focus, select:focus, input:focus, a:focus, .btn:focus, .pulse-btn:focus {
  outline: none !important;
}

/* SVG Noise Filter */
html::after {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.04;
  pointer-events: none;
  z-index: 99998;
}

body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(rgba(255, 204, 0, 0.015) 50%, transparent 50%);
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 99999;
}

a {
  color: inherit;
  text-decoration: none;
  transition: 0.2s;
}

.site-shell {
  width: min(1280px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 40px 0 100px;
}

.topbar,
.footer,
.hero,
.section,
.page-hero,
.legal-page {
  backdrop-filter: blur(20px);
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 16px 24px;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  background: rgba(10, 18, 34, 0.85);
  position: sticky;
  top: 20px;
  z-index: 10000;
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-brand);
  font-weight: 800;
  letter-spacing: 1px;
}

.brand-logo {
  height: 40px;
  width: auto;
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.brand-text {
  font-size: 1.2rem;
  color: var(--accent-gold);
  min-width: 130px;
  display: inline-block;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 4px;
  background: var(--accent-gold);
  color: var(--bg-deep);
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 900;
  box-shadow: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 500;
}

.nav a:hover {
  color: var(--accent-gold);
  text-shadow: 0 0 8px var(--accent-glow);
}

.nav-cta {
  justify-self: end;
  padding: 10px 20px;
  border-radius: 4px;
  background: var(--accent-gold);
  color: var(--bg-deep);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 1px;
}

.hero,
.page-hero,
.section,
.legal-page {
  margin-top: 32px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: start;
  gap: 60px;
  padding: 100px 60px;
  border-color: var(--border-heavy);
  background: linear-gradient(135deg, var(--bg-surface) 0%, #050c1b 100%);
  position: relative;
  perspective: 1500px;
}

/* Tactical HUD Elements */
.hud-corners {
  position: absolute;
  top: 20px; left: 20px; right: 20px; bottom: 20px;
  pointer-events: none;
  z-index: 10;
}
.corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: var(--accent-gold);
  border-style: solid;
  opacity: 0.4;
}
.top-left { top: 0; left: 0; border-width: 2px 0 0 2px; }
.top-right { top: 0; right: 0; border-width: 2px 2px 0 0; }
.bottom-left { bottom: 0; left: 0; border-width: 0 0 2px 2px; }
.bottom-right { bottom: 0; right: 0; border-width: 0 2px 2px 0; }

.utc-clock {
  position: absolute;
  top: 32px;
  right: 60px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 2px;
  z-index: 10;
  text-shadow: 0 0 8px rgba(255,255,255,0.2);
}

.hero-copy {
  max-width: 600px;
  width: 100%;
  position: relative;
  z-index: 2;
  padding-top: 40px;
}

.hero-copy h1 {
  margin: 0;
  line-height: 0.95;
  letter-spacing: -0.05em;
  font-size: clamp(3rem, 6vw, 6rem);
  font-weight: 800;
  text-transform: uppercase;
  text-shadow: 0 0 40px rgba(255, 255, 255, 0.1);
}

.lede {
  margin-top: 32px;
  color: var(--text-dim);
  font-size: 1.15rem;
  line-height: 1.7;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 40px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 32px;
  border-radius: 2px;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 2px;
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
  background: rgba(255, 204, 0, 0.05);
}

.button::before { content: "["; position: absolute; left: 12px; opacity: 0.5; transition: 0.3s; }
.button::after { content: "]"; position: absolute; right: 12px; opacity: 0.5; transition: 0.3s; }

.button-primary {
  box-shadow: inset 0 0 10px rgba(255, 204, 0, 0.15);
}

.button-secondary {
  border-color: var(--border-heavy);
  background: transparent;
  color: var(--text-dim);
}

.button:hover {
  background: rgba(255, 204, 0, 0.15);
  color: #fff;
  box-shadow: 0 0 20px rgba(255, 204, 0, 0.2);
}

.button:hover::before { left: 8px; opacity: 1; }
.button:hover::after { right: 8px; opacity: 1; }

.hero-points {
  margin-top: 40px;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.hero-points li {
  color: var(--text-dim);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-points li::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent-gold);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-gold);
}

.hero-panel {
  display: grid;
  gap: 24px;
}

.signal-card,
.grid-card,
.card,
.path-card,
.briefing-panel,
.wide-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
}

.signal-card {
  padding: 24px;
  border-left: 4px solid var(--accent-gold);
}

.forensic-heartbeat {
  background: rgba(0, 240, 255, 0.03);
  position: relative;
}

.heartbeat-data {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

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

.data-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.data-item strong {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--accent-gold);
  text-shadow: 0 0 10px var(--accent-glow);
}

.heartbeat-vitals {
  margin-bottom: 16px;
}

.vitals-bar {
  height: 2px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}

.vitals-progress {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
  position: absolute;
  transform: translateX(-100%);
  animation: vitals-sweep 3s infinite linear;
}

@keyframes vitals-sweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Synthesis Path Visual */
.visual-container {
  display: grid;
  place-items: center;
  padding: 40px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.synthesis-path {
  width: 100%;
  max-width: 800px;
  height: auto;
}

.animate-path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: path-draw 4s infinite linear;
}

@keyframes path-draw {
  0% { stroke-dashoffset: 1000; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -1000; }
}

.ping {
  transform-origin: center;
  animation: ping-pulse 2s infinite ease-out;
}

@keyframes ping-pulse {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(1.5); opacity: 0; }
}

.node {
  transition: 0.3s;
}

.node:hover {
  filter: drop-shadow(0 0 10px var(--accent-gold));
}

.data-note {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin: 0;
  opacity: 0.8;
}

.signal-card strong {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: #fff;
}

.signal-label {
  font-family: var(--mono);
  color: var(--accent-gold);
  font-size: 0.75rem;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}

.grid-card {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border-light);
}

.grid-card > div {
  padding: 24px;
  background: var(--bg-surface);
}

.grid-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.grid-card strong {
  color: var(--accent-gold);
  font-size: 0.95rem;
}

.page-hero,
.legal-page {
  padding: 80px 60px;
  position: relative;
  background: linear-gradient(135deg, var(--bg-surface) 0%, #050c1b 100%);
}

.page-hero h1 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.04em;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  position: relative;
  z-index: 2;
}

.page-hero .lede {
  position: relative;
  z-index: 2;
}

.section {
  padding: 60px;
}

.accent-section {
  background: radial-gradient(circle at bottom right, rgba(0, 240, 255, 0.05), transparent 50%), var(--bg-surface);
}

.section-heading {
  margin-bottom: 40px;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
}

.three-up, .two-up, .path-grid {
  display: grid;
  gap: 24px;
}

.three-up { grid-template-columns: repeat(3, 1fr); }
.two-up { grid-template-columns: repeat(2, 1fr); }
.path-grid { grid-template-columns: repeat(3, 1fr); }

.card, .path-card {
  padding: 32px;
  transition: 0.3s;
}

.card:hover, .path-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--accent-gold);
}

@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 60px 30px;
    gap: 40px;
  }
  .two-up, .three-up, .path-grid {
    grid-template-columns: 1fr;
  }
  .page-hero, .legal-page {
    padding: 60px 30px;
  }
  .closing-band {
    flex-direction: column;
    padding: 60px 30px;
    align-items: flex-start;
  }
}

.card h3, .path-card h3 {
  color: var(--accent-gold);
  font-size: 1.25rem;
  margin-bottom: 16px;
  font-weight: 800;
}

.list {
  padding-left: 0;
  list-style: none;
}

.list li {
  margin-bottom: 12px;
  color: var(--text-dim);
  padding-left: 20px;
  position: relative;
}

.list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent-gold);
}

.feature-stack {
  display: grid;
  gap: 20px;
}

.feature {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  padding: 32px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.01);
}

.feature-index {
  color: var(--accent-gold);
  font-size: 1.5rem;
  font-weight: 900;
  font-family: var(--mono);
  opacity: 0.5;
}

.closing-band {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  padding: 80px 60px;
  background: linear-gradient(135deg, #050c1b 0%, var(--bg-deep) 100%);
  border-color: var(--border-heavy);
}

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 12px 40px;
  color: var(--text-dim);
  border-top: 1px solid var(--border-heavy);
  background: rgba(3, 8, 20, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  font-size: 0.75rem;
  font-family: var(--mono);
  z-index: 9000;
  margin: 0;
}

.footer > div {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer .brand-text {
  font-size: 0.9rem;
  letter-spacing: 2px;
}

.footer p {
  margin: 0;
  opacity: 0.6;
}

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

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

/* Redacted Content */
.redacted {
  background: #000;
  color: transparent !important;
  user-select: none;
  cursor: help;
  transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 4px;
  border-radius: 2px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.3);
}

.redacted:hover {
  background: rgba(0, 240, 255, 0.15);
  color: var(--accent-gold) !important;
  user-select: auto;
  text-shadow: 0 0 10px var(--accent-glow);
}

/* Unified Terminal & Status Layout (Glass-Vault) -> Now Live Interception Scanner */
.live-scanner-panel {
  background: rgba(5, 5, 5, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 80px rgba(0,0,0,0.9), inset 0 0 0 1px rgba(0, 240, 255, 0.05), 0 0 30px rgba(0,0,0,0.5);
  overflow: hidden;
  margin-top: 0;
  transform: rotateY(-8deg) rotateX(4deg) translateZ(20px);
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.4s ease;
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
}

.live-scanner-panel:hover {
  transform: rotateY(-4deg) rotateX(2deg) translateZ(40px);
}

.live-scanner-panel::before {
  content: "";
  position: absolute;
  top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.03), transparent);
  transform: skewX(-20deg);
  animation: glass-shine 8s infinite linear;
  pointer-events: none;
}

.scanner-header {
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.6);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  transition: background 0.3s ease;
  position: relative;
  z-index: 10;
}

.scanner-header:hover {
  background: rgba(0, 240, 255, 0.08);
}

.scanner-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 1px;
  background: rgba(255,255,255,0.05);
}

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

.scanner-quadrant {
  background: rgba(5, 5, 5, 0.9);
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.quad-title {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: #fff;
  letter-spacing: 1px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quad-title .icon {
  color: var(--accent-cyan);
  opacity: 0.7;
}

.quad-data {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.quad-status {
  font-family: var(--mono);
  font-size: 0.85rem;
  margin-top: auto;
  padding-top: 12px;
}

.quad-chart {
  margin-top: 16px;
  height: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  position: relative;
  overflow: hidden;
}

.chart-line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
  opacity: 0.5;
  animation: chart-breathe 3s ease-in-out infinite alternate;
}

.amber-chart {
  background: #ff9900;
  box-shadow: 0 0 8px #ff9900;
  animation: chart-breathe-amber 2s ease-in-out infinite alternate;
}

@keyframes chart-breathe {
  0% { transform: translateY(0) scaleY(1); opacity: 0.4; }
  100% { transform: translateY(-4px) scaleY(1.5); opacity: 0.8; }
}

@keyframes chart-breathe-amber {
  0% { transform: translateY(0) scaleY(1); opacity: 0.5; }
  100% { transform: translateY(-8px) scaleY(2); opacity: 1; }
}

.side-channel-terminal {
  background: rgba(0,0,0,0.8);
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
}

.terminal-title {
  padding: 8px 20px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: #ff4d00;
  background: rgba(255, 77, 0, 0.1);
  border-bottom: 1px solid rgba(255, 77, 0, 0.2);
  letter-spacing: 1px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  transition: background 0.3s ease;
  position: relative;
  z-index: 10;
}

.terminal-title:hover {
  background: rgba(255, 77, 0, 0.18);
}

.terminal-log {
  padding: 12px 20px;
  height: 280px;
  max-height: 280px;
  opacity: 1;
  overflow-y: hidden;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1), padding 0.5s ease, opacity 0.4s ease;
}

/* --- TERMINAL & SCANNER COLLAPSE CONTROLS --- */
.terminal-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.terminal-action-btn {
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.35);
  color: #00f0ff;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.terminal-action-btn:hover {
  background: rgba(0, 240, 255, 0.28);
  border-color: #00f0ff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  transform: translateY(-1px);
}

.terminal-action-btn:active {
  transform: translateY(0);
}

/* Orange/Red styling for probes terminal button */
.terminal-title .terminal-action-btn {
  background: rgba(255, 77, 0, 0.15);
  border-color: rgba(255, 77, 0, 0.4);
  color: #ff6a00;
}
.terminal-title .terminal-action-btn:hover {
  background: rgba(255, 77, 0, 0.3);
  border-color: #ff6a00;
  box-shadow: 0 0 10px rgba(255, 77, 0, 0.5);
}

/* Button visibility switching */
.btn-collapse { display: inline-flex; }
.btn-expand { display: none; }

.live-scanner-panel.collapsed .btn-collapse,
.side-channel-terminal.collapsed .btn-collapse {
  display: none;
}

.live-scanner-panel.collapsed .btn-expand {
  display: inline-flex;
  background: rgba(255, 180, 0, 0.15);
  border-color: rgba(255, 180, 0, 0.5);
  color: #ffb400;
}
.live-scanner-panel.collapsed .btn-expand:hover {
  background: rgba(255, 180, 0, 0.3);
  border-color: #ffb400;
  box-shadow: 0 0 15px rgba(255, 180, 0, 0.6);
}

.side-channel-terminal.collapsed .btn-expand {
  display: inline-flex;
  background: rgba(0, 255, 170, 0.15);
  border-color: rgba(0, 255, 170, 0.5);
  color: #00ffaa;
}
.side-channel-terminal.collapsed .btn-expand:hover {
  background: rgba(0, 255, 170, 0.3);
  border-color: #00ffaa;
  box-shadow: 0 0 12px rgba(0, 255, 170, 0.6);
}

/* Body and Log Collapse Transitions */
.scanner-body {
  max-height: 2500px;
  opacity: 1;
  transition: max-height 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  overflow: hidden;
}

.live-scanner-panel.collapsed .scanner-body {
  max-height: 0 !important;
  opacity: 0 !important;
  pointer-events: none;
}

.live-scanner-panel.collapsed .scanner-header {
  border-bottom: none;
  background: rgba(10, 18, 34, 0.95);
}

.side-channel-terminal.collapsed .terminal-log {
  max-height: 0 !important;
  height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  opacity: 0 !important;
  pointer-events: none;
}

.side-channel-terminal.collapsed .terminal-title {
  border-bottom: none;
}

.terminal-log::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 40px;
  background: linear-gradient(to bottom, rgba(0,0,0,1), transparent);
  pointer-events: none;
}

.log-line {
  margin-top: 4px;
  opacity: 1;
  animation: log-slide-up 0.15s ease-out;
}

@keyframes log-slide-up {
  0% { transform: translateY(10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.override-container {
  padding: 24px;
  background: rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.override-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
  margin-bottom: 12px;
}

.override-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255,255,255,0.1);
  transition: .4s;
  border-radius: 34px;
  border: 1px solid rgba(255,255,255,0.2);
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-dim);
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: rgba(0, 240, 255, 0.2);
  border-color: var(--accent-cyan);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

input:checked + .slider:before {
  transform: translateX(26px);
  background-color: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
}

.override-label {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  letter-spacing: 1px;
  transition: 0.4s;
}

/* Secured State Modifiers */
.live-scanner-panel.secured {
  border-color: rgba(0, 240, 255, 0.5);
  box-shadow: 0 40px 80px rgba(0,0,0,0.9), inset 0 0 0 1px rgba(0, 240, 255, 0.3), 0 0 40px rgba(0, 240, 255, 0.1);
}

.live-scanner-panel.secured .override-label {
  color: var(--accent-cyan);
  text-shadow: 0 0 8px rgba(0,240,255,0.5);
}

.live-scanner-panel.secured .amber-chart {
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}


.scanner-line.warning { color: #ff9d00; }
.scanner-line.critical { color: #ff4d00; }
.scanner-line.success { color: var(--accent-gold); }

@keyframes scan-line-in {
  to { opacity: 1; transform: translateY(0); }
}

/* Architecture Grid */
.architecture-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.arch-node {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 16px;
  transition: 0.3s;
}

.arch-node:hover {
  background: rgba(255, 204, 0, 0.05);
  border-color: var(--accent-gold);
}

.node-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.node-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
}

.node-dot.active {
  background: var(--accent-gold);
  box-shadow: 0 0 8px var(--accent-gold);
  animation: blink 2s infinite;
}

.node-title {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

.node-val {
  display: block;
  font-size: 1rem;
  color: #fff;
  margin-bottom: 4px;
}

.node-meta {
  display: block;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--accent-gold);
}

/* Vault Ledger & Asset Tags */
.vault-ledger {
  display: grid;
  gap: 16px;
  margin-top: 32px;
}

.asset-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: 0.3s;
}

.asset-item:hover {
  border-color: var(--accent-gold);
  background: rgba(0, 240, 255, 0.05);
}

.asset-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid var(--border-heavy);
  border-radius: var(--radius-sm);
  color: var(--accent-gold);
  font-family: var(--mono);
  font-weight: 800;
}

.asset-info h3 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  color: #fff;
}

.asset-info p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.asset-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 4px 12px;
  border-radius: 99px;
  background: rgba(0, 240, 255, 0.15);
  color: var(--accent-gold);
  border: 1px solid var(--border-light);
  text-transform: uppercase;
}

/* Global Tactical Map */
.map-container {
  height: 400px;
  background: radial-gradient(circle at center, rgba(0, 240, 255, 0.05) 0%, transparent 70%), var(--bg-deep);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
  margin-top: 40px;
}

.map-svg {
  width: 100%;
  height: 100%;
  opacity: 0.4;
}

.map-node {
  fill: var(--accent-gold);
  filter: drop-shadow(0 0 5px var(--accent-gold));
  animation: node-ping 2s infinite ease-out;
}

@keyframes node-ping {
  0% { r: 2; opacity: 1; }
  100% { r: 8; opacity: 0; }
}

.map-line {
  stroke: var(--accent-gold);
  stroke-width: 0.5;
  stroke-dasharray: 2 4;
  opacity: 0.2;
}

/* Matrix Table for Technical Density */
.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.8rem;
}

.matrix-table th {
  text-align: left;
  padding: 12px;
  border-bottom: 2px solid var(--border-heavy);
  color: var(--accent-gold);
}

.matrix-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-light);
}

/* Scroll Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

@media (max-width: 960px) {
  .hero, .page-hero, .legal-page { grid-template-columns: 1fr; padding: 40px 24px; }
  .three-up, .two-up, .path-grid { grid-template-columns: 1fr; }
  .section { padding: 40px 24px; }
  .closing-band { flex-direction: column; align-items: flex-start; padding: 40px; }
}

/* Contact Form Styling */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 64px;
  align-items: start;
}

.contact-form {
  background: var(--bg-card);
  padding: 40px;
  border-radius: 8px;
  border: 1px solid rgba(0, 240, 255, 0.1);
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent-gold);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px;
  color: #fff;
  font-family: var(--sans);
  border-radius: 4px;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.form-note {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 16px;
  font-family: var(--mono);
}

/* Screenshot Styling */
.screenshot-container, .screenshot-card {
  margin-top: 32px;
  position: relative;
  background: #000;
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.screenshot {
  width: 100%;
  display: block;
  opacity: 0.9;
  filter: grayscale(20%) contrast(110%);
  transition: opacity 0.3s;
}

.screenshot:hover {
  opacity: 1;
}

.caption {
  padding: 12px 16px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent-gold);
  background: rgba(0,0,0,0.8);
  border-top: 1px solid rgba(0, 240, 255, 0.1);
}

@media (max-width: 850px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* New Styles for Interactivity & Authority */

/* Wall of Bypasses (Scrolling Ticker) */
.bypass-ticker {
  background: #000;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 12px 0;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  transition: all 0.4s ease;
  max-height: 100px;
}

.bypass-ticker.collapsed {
  padding: 2px 0;
  max-height: 24px;
}

.bypass-ticker.collapsed .ticker-content {
  opacity: 0;
}

.ticker-controls {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
}

#ticker-toggle-btn {
  background: rgba(0,0,0,0.8);
  border: 1px solid var(--border-light);
  color: var(--accent-gold);
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 6px;
  transition: all 0.2s ease;
}

#ticker-toggle-btn:hover {
  background: var(--border-light);
  color: #fff;
}

.ticker-content {
  display: inline-block;
  animation: ticker 30s linear infinite;
}

.ticker-item {
  display: inline-block;
  margin-right: 48px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.ticker-item span {
  color: var(--accent-gold);
  font-weight: 800;
  margin-right: 8px;
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Parity Scanner (Interactive Terminal) */
.scanner-terminal {
  background: #020612;
  border: 1px solid var(--border-heavy);
  border-radius: var(--radius-md);
  margin-top: 40px;
  padding: 24px;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent-gold);
  box-shadow: inset 0 0 20px rgba(0, 240, 255, 0.1);
}

.scanner-terminal .scanner-header {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 8px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  opacity: 0.8;
}

.scanner-line {
  margin-bottom: 6px;
  opacity: 0;
  transform: translateY(5px);
  animation: scan-line-in 0.3s forwards;
}

.scanner-line.warning { color: #ff9d00; }
.scanner-line.critical { color: #ff4d00; }
.scanner-line.success { color: #00ffaa; }

@keyframes scan-line-in {
  to { opacity: 1; transform: translateY(0); }
}

/* Identity Lifecycle (Step Visual) */
.lifecycle-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.lifecycle-step {
  padding: 24px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.01);
  position: relative;
}

.lifecycle-step::after {
  content: "→";
  position: absolute;
  right: -15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--border-light);
  font-size: 1.5rem;
}

.lifecycle-step:last-child::after { content: ""; }

.step-num {
  font-family: var(--mono);
  font-weight: 800;
  color: var(--accent-gold);
  opacity: 0.3;
  margin-bottom: 12px;
  display: block;
}

/* Kinematics Card */
.kinematics-card {
  background: radial-gradient(circle at top right, rgba(0, 240, 255, 0.08), transparent);
  border-color: var(--accent-gold);
}

.kinematics-visual {
  height: 100px;
  width: 100%;
  background: url("data:image/svg+xml,%3Csvg width='400' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 50 Q 50 10, 100 50 T 200 50 T 300 50 T 400 50' stroke='%2300f0ff' fill='none' opacity='0.4'/%3E%3C/svg%3E");
  background-size: 200% 100%;
  animation: wave 10s linear infinite;
  margin-bottom: 16px;
  border-radius: var(--radius-sm);
}

@keyframes wave {
  from { background-position: 0% 0; }
  to { background-position: 200% 0; }
}

@media (max-width: 960px) {
  .lifecycle-grid { grid-template-columns: 1fr; }
  .lifecycle-step::after { content: "↓"; bottom: -15px; right: 50%; transform: translateX(50%); top: auto; }
}

/* Accessibility: Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  body::after {
    display: none; /* Disable CRT Scanlines for reduced motion */
  }
  
  body::before {
    display: none;
  }
}

/* Form Status */
.form-status {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 12px;
  border-radius: 4px;
  display: none;
  border: 1px solid transparent;
}
.form-status.success {
  display: block;
  background: rgba(0, 255, 170, 0.1);
  border-color: #00ffaa;
  color: #00ffaa;
}
.form-status.error {
  display: block;
  background: rgba(255, 50, 50, 0.1);
  border-color: #ff3232;
  color: #ff3232;
}
.form-status.loading {
  display: block;
  background: rgba(255, 204, 0, 0.1);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}


/* CSS for New Proving Grounds Modules (13-43) */
.test-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.test-card:hover {
  border-color: rgba(255, 204, 0, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 12px;
}
.card-header h2 {
  margin: 0;
  font-family: var(--font-brand);
  font-size: 1.15rem;
  color: var(--accent-gold);
}
.diagnostic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  background: rgba(0,0,0,0.3);
  padding: 16px;
  border-radius: 4px;
  border: 1px solid var(--border-light);
}
.metric-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.metric-label {
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
}
.metric-value {
  font-size: 0.85rem;
  font-weight: bold;
  word-break: break-all;
}
.test-actions {
  display: flex;
  gap: 16px;
}
.btn-primary, .btn-secondary {
  flex: 1;
  padding: 12px 20px;
  font-family: var(--font-brand);
  font-weight: bold;
  font-size: 0.8rem;
  text-transform: uppercase;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: #fff;
  transition: all 0.2s;
}
.btn-primary:hover, .btn-secondary:hover {
  border-color: var(--accent-gold);
  box-shadow: 0 0 10px rgba(255, 204, 0, 0.1);
}
.btn-primary.active, .btn-secondary.active {
  background: var(--accent-gold);
  color: #000;
  border-color: var(--accent-gold);
  box-shadow: none;
}
.exp-panel {
  color: var(--text-dim);
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0;
  background: rgba(0,0,0,0.2);
  padding: 12px;
  border-left: 3px solid var(--accent-gold);
  border-radius: 2px;
}
.exp-title {
  font-weight: bold;
  color: #fff;
  margin-bottom: 4px;
}
.exp-desc {
  color: var(--text-dim);
}


.pg-controls {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--bg-panel);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px 32px;
}
.search-box input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: #fff;
    font-family: var(--font-ui);
    font-size: 1rem;
}
.search-box input:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.2);
}
.category-tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.cat-tab {
    padding: 8px 16px;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    cursor: pointer;
    font-family: var(--font-brand);
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: bold;
    transition: all 0.2s;
}
.cat-tab:hover {
    border-color: var(--accent-gold);
    color: #fff;
}
.cat-tab.active {
    background: var(--accent-gold);
    color: #000;
    border-color: var(--accent-gold);
    box-shadow: none;
}


/* Dropdown Menu */
.dropdown {
  position: relative;
  display: inline-block;
}
.dropdown .dropbtn {
  background: transparent;
  color: var(--text-dim);
  text-transform: uppercase;
  font-family: var(--font-brand);
  font-size: 0.8rem;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.3s;
}
.dropdown:hover .dropbtn {
  color: var(--accent-gold);
}
.dropdown-content {
  display: none;
  position: absolute;
  background-color: var(--bg-panel);
  min-width: 200px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  z-index: 1000;
  top: 100%;
  left: 0;
}
.dropdown-content a {
  color: var(--text-dim);
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  font-family: var(--font-brand);
  font-size: 0.75rem;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.dropdown-content a:last-child {
  border-bottom: none;
}
.dropdown-content a:hover {
  background-color: rgba(255,204,0,0.1);
  color: var(--accent-gold);
}
.dropdown:hover .dropdown-content {
  display: block;
}

/* Proving Grounds Full-Width Module */
.span-full { grid-column: 1 / -1; }

/* Proving Grounds UI Layout */
.pg-dashboard-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 32px;
  min-height: calc(100vh - 280px);
  margin-top: 24px;
}

.pg-sidebar {
  background: rgba(10, 18, 34, 0.45);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-self: start;
}

.sidebar-header h3 {
  margin: 0 0 6px 0;
  font-family: var(--font-brand);
  font-size: 1rem;
  letter-spacing: 2px;
  color: var(--text-main);
}

.status-indicator {
  font-size: 0.65rem;
  color: #00ff00;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
}

.status-indicator::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #00ff00;
  border-radius: 50%;
  box-shadow: 0 0 6px #00ff00;
}

.category-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cat-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 204, 0, 0.1);
  border-radius: var(--radius-md);
  color: var(--text-dim);
  cursor: pointer;
  text-align: left;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.cat-btn:hover {
  background: rgba(255, 204, 0, 0.05);
  border-color: rgba(255, 204, 0, 0.2);
  color: var(--text-main);
  transform: translateX(3px);
}

.cat-btn.active {
  background: rgba(255, 204, 0, 0.08);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  box-shadow: 0 0 15px rgba(255, 204, 0, 0.05);
}

.cat-icon {
  font-size: 1.5rem;
}

.cat-info {
  display: flex;
  flex-direction: column;
}

.cat-title {
  font-family: var(--font-brand);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.cat-meta {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 2px;
}

.sidebar-sub-menu {
  border-top: 1px solid var(--border-light);
  padding-top: 20px;
}

.sidebar-sub-menu h4 {
  margin: 0 0 12px 0;
  font-family: var(--font-brand);
  font-size: 0.75rem;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.5);
}

.test-item-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 250px;
  overflow-y: auto;
}

.test-item-list li {
  padding: 8px 12px;
  font-size: 0.75rem;
  color: var(--text-dim);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  font-family: var(--font-ui);
}

.test-item-list li:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
}

.test-item-list li.active-test-item {
  color: var(--accent-gold);
  background: rgba(255, 204, 0, 0.04);
  font-weight: bold;
  border-left: 2px solid var(--accent-gold);
  padding-left: 10px;
}

.pg-workspace {
  display: flex;
  align-items: center;
  position: relative;
  gap: 20px;
  background: rgba(10, 18, 34, 0.2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  overflow: hidden;
}

.test-viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
  width: 100%;
  transition: height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.test-slides-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  width: 100%;
  align-items: flex-start;
}

.test-card {
  flex: 0 0 100%;
  width: 100%;
  box-sizing: border-box;
  background: linear-gradient(135deg, rgba(10, 16, 32, 0.7) 0%, rgba(5, 9, 18, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: none;
  flex-direction: column;
  gap: 24px;
  position: relative;
  opacity: 0.3;
  transform: scale(0.98);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px);
}

.test-card.active {
  display: flex;
  opacity: 1;
  transform: scale(1);
  border-color: rgba(255, 204, 0, 0.25);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 204, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.test-card h2 {
  font-family: var(--font-brand);
  font-size: 1.3rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.test-card h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 18px;
  background: var(--accent-gold);
  box-shadow: 0 0 8px var(--accent-gold);
  border-radius: 2px;
}

.nav-arrow {
  background: rgba(10, 18, 34, 0.85);
  border: 1px solid var(--border-light);
  color: var(--text-dim);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.25s ease;
  z-index: 10;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.nav-arrow:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  box-shadow: 0 0 15px rgba(255, 204, 0, 0.2);
  background: rgba(255, 204, 0, 0.05);
}

.arrow-icon {
  font-size: 0.9rem;
}

/* Custom Scrollbar for side list */
.test-item-list::-webkit-scrollbar {
  width: 4px;
}
.test-item-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
.test-item-list::-webkit-scrollbar-thumb {
  background: rgba(255, 204, 0, 0.2);
  border-radius: 2px;
}
.test-item-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 204, 0, 0.4);
}

@media (max-width: 1024px) {
  .pg-dashboard-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 600px) {
  .pg-workspace {
    padding: 10px;
    gap: 10px;
  }
  .nav-arrow {
    width: 36px;
    height: 36px;
  }
}

/* ==========================================================================
   PROVING GROUNDS TEST INTERACTIVE COMPONENT STYLES
   ========================================================================== */

/* Buttons & Inputs */
.btn-pg {
  flex: 1;
  padding: 10px 18px;
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 204, 0, 0.15);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.btn-pg:hover:not(:disabled) {
  border-color: var(--accent-gold);
  background: rgba(255, 204, 0, 0.05);
  box-shadow: 0 0 10px rgba(255, 204, 0, 0.15);
  transform: translateY(-1px);
}

.btn-pg:active:not(:disabled) {
  transform: translateY(0);
}

.btn-pg.active {
  background: var(--accent-gold);
  color: #050b14;
  border-color: var(--accent-gold);
  box-shadow: 0 0 15px rgba(255, 204, 0, 0.35);
}

.btn-pg:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.05);
}

.controls-row {
  display: flex;
  gap: 16px;
  margin-top: auto;
}

/* Oscilloscope / Canvas Visualizer */
.oscilloscope-wrapper {
  position: relative;
  background: #050914;
  border: 1px solid rgba(255, 204, 0, 0.08);
  border-radius: var(--radius-md);
  height: 160px;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}

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

.oscilloscope-hud {
  position: absolute;
  top: 10px;
  left: 10px;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.5px;
  pointer-events: none;
  z-index: 5;
  text-transform: uppercase;
}

/* Stats and Readout Grids */
.register-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fpu-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  background: rgba(4, 7, 15, 0.5);
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
}

.fpu-stat-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fpu-stat-label {
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.fpu-stat-val {
  font-size: 1rem;
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  color: #ffffff;
  word-break: break-all;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
}

/* Bit / Register Displays (Silicon Lattice) */
.bit-display {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(5, 9, 18, 0.4);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.bit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  font-family: var(--font-ui);
}

.bit-cell {
  width: 15px;
  height: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.65rem;
  font-weight: bold;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 2px;
  color: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.bit-cell:hover {
  background: rgba(255, 204, 0, 0.15);
  color: var(--text-main);
}

.bit-cell.val-1 {
  background: rgba(255, 204, 0, 0.12);
  color: var(--accent-gold);
  box-shadow: 0 0 5px rgba(255, 204, 0, 0.15);
}

.bit-cell.sign { border: 1px solid rgba(255, 50, 50, 0.3); }
.bit-cell.exponent { border: 1px solid rgba(0, 255, 170, 0.3); }
.bit-cell.mantissa { border: 1px solid rgba(255, 255, 255, 0.08); }

.bit-legend {
  display: flex;
  gap: 16px;
  font-size: 0.65rem;
  margin-top: 4px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
}

.legend-box {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.legend-box.sign { background: rgba(255, 50, 50, 0.2); border: 1px solid rgba(255, 50, 50, 0.6); }
.legend-box.exponent { background: rgba(0, 255, 170, 0.2); border: 1px solid rgba(0, 255, 170, 0.6); }
.legend-box.mantissa { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.2); }

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid transparent;
}

.status-badge.pass {
  background: rgba(0, 255, 170, 0.06);
  border-color: rgba(0, 255, 170, 0.25);
  color: #00ffaa;
  box-shadow: 0 0 10px rgba(0, 255, 170, 0.05);
}

.status-badge.fail {
  background: rgba(255, 50, 50, 0.06);
  border-color: rgba(255, 50, 50, 0.25);
  color: #ff3232;
  box-shadow: 0 0 10px rgba(255, 50, 50, 0.05);
}

.status-badge.warn {
  background: rgba(255, 150, 0, 0.06);
  border-color: rgba(255, 150, 0, 0.25);
  color: #ff9600;
  box-shadow: 0 0 10px rgba(255, 150, 0, 0.05);
}

/* Diagnostic Monitor / Explanation Box */
.demo-exp-box {
  background: rgba(3, 5, 12, 0.85);
  border: 1px dashed rgba(255, 204, 0, 0.15);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--text-dim);
  font-family: var(--font-mono, monospace);
  position: relative;
  overflow: hidden;
  min-height: 76px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
}

.demo-exp-box.active {
  border: 1px solid rgba(0, 255, 170, 0.25);
  background: rgba(0, 255, 170, 0.02);
  color: #00ffaa;
  box-shadow: inset 0 0 20px rgba(0, 255, 170, 0.03), 0 0 15px rgba(0, 255, 170, 0.02);
}

.demo-exp-box.error {
  border: 1px solid rgba(255, 50, 50, 0.25);
  background: rgba(255, 50, 50, 0.02);
  color: #ff5555;
  box-shadow: inset 0 0 20px rgba(255, 50, 50, 0.03), 0 0 15px rgba(255, 50, 50, 0.02);
}
  color: #ffb3b3;
  box-shadow: inset 0 0 15px rgba(255, 50, 50, 0.03);
}

.demo-exp-title {
  font-size: 0.65rem;
  color: var(--accent-gold);
  text-transform: uppercase;
  margin-bottom: 6px;
  font-weight: 700;
  letter-spacing: 1px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.demo-exp-spinner {
  display: inline-block;
  width: 8px;
  height: 8px;
  border: 2px solid rgba(255, 204, 0, 0.2);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

/* TLS / Comparative List Panels */
.tls-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.tls-panel {
  background: rgba(5, 9, 18, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 0.7rem;
  font-family: var(--font-mono, monospace);
  overflow-y: auto;
  height: 120px;
}

.tls-title {
  font-size: 0.65rem;
  color: var(--accent-gold);
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.tls-item {
  margin-bottom: 4px;
  color: var(--text-dim);
}

.tls-item.diff {
  color: #ff3232;
  background: rgba(255, 50, 50, 0.05);
  padding: 2px 4px;
  border-radius: 2px;
}

.tls-item.match {
  color: #00ffaa;
  background: rgba(0, 255, 170, 0.05);
  padding: 2px 4px;
  border-radius: 2px;
}

/* History / Dropdowns config grids */
.history-config-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  background: rgba(5, 9, 18, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  padding: 20px;
}

.history-config-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-select {
  background: rgba(5, 9, 18, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 8px 12px;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.history-select:focus {
  border-color: var(--accent-gold);
}

.history-select option {
  background: #0a0f1e;
}

/* Custom Collapsible Category Sidebar layout tweaks */
.category-menu.collapsed {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.category-menu.collapsed .cat-btn {
  padding: 8px 6px;
  gap: 0;
  justify-content: center;
  text-align: center;
  flex-direction: column;
  min-height: 40px;
}

.category-menu.collapsed .cat-icon {
  display: none !important;
}

.category-menu.collapsed .cat-meta {
  display: none !important;
}

.category-menu.collapsed .cat-title {
  font-size: 0.65rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-align: center;
}

.pg-sidebar.menu-collapsed {
  gap: 16px;
}

.pg-sidebar.menu-collapsed .sidebar-sub-menu {
  border-top: 1px solid rgba(255, 204, 0, 0.15);
  padding-top: 16px;
}

.pg-sidebar.menu-collapsed .test-item-list {
  max-height: 450px;
}

/* Custom Dropdown in Proving Grounds */
.custom-dropdown {
  position: relative;
  display: inline-block;
  flex: 1;
}

.dropdown-selected {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 20px;
  font-family: var(--font-brand);
  font-weight: bold;
  font-size: 0.8rem;
  text-transform: uppercase;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: #fff;
  text-align: center;
  transition: all 0.2s;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropdown-selected:hover {
  border-color: var(--accent-gold);
  box-shadow: 0 0 10px rgba(255, 204, 0, 0.1);
}

.dropdown-options {
  position: absolute !important;
  bottom: calc(100% + 4px) !important;
  top: auto !important;
  left: 0;
  right: 0;
  background: #0c1324 !important;
  border: 1px solid rgba(255, 204, 0, 0.3) !important;
  border-radius: var(--radius-sm) !important;
  max-height: 180px !important;
  overflow-y: auto !important;
  z-index: 10000 !important;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.8) !important;
}

/* ==========================================================================
   INLINE FORENSIC PROOF CARDS (WIDGET INTEGRATION)
   ========================================================================== */
.inline-proof-card {
  background: linear-gradient(135deg, rgba(10, 16, 32, 0.85) 0%, rgba(5, 9, 18, 0.95) 100%);
  border: 1px solid rgba(255, 204, 0, 0.25);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 24px 0;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(255, 204, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  font-family: var(--font-ui, monospace);
  color: #fff;
}

.proof-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.proof-title {
  font-family: var(--font-brand);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}

.proof-meta {
  font-size: 0.7rem;
  font-family: var(--font-mono, monospace);
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  letter-spacing: 0.5px;
}

.proof-card-body {
  display: flex;
  flex-direction: column;
}

.proof-controls-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  background: rgba(0, 0, 0, 0.3);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.proof-select-wrapper {
  flex: 1;
  min-width: 280px;
}

.proof-select-wrapper label {
  font-size: 0.65rem;
  color: var(--text-dim);
  font-weight: 700;
  letter-spacing: 1px;
}

.proof-card-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  font-family: var(--font-mono, monospace);
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 12px;
}

.proof-footer-link {
  color: var(--accent-gold);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: all 0.2s;
}

.proof-footer-link:hover {
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
}

@media (max-width: 768px) {
  .proof-controls-row {
    flex-direction: column;
    align-items: stretch;
  }
  .proof-card-header, .proof-card-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   SOMATIC HARDWARE MATRIX PULSE CONTROLLER (PHASE 2 - INDEX.HTML)
   ========================================================================== */
.somatic-pulse-container {
  margin: 16px 20px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(10, 16, 32, 0.95) 100%);
  border: 1px solid rgba(255, 204, 0, 0.3);
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 0 15px rgba(255, 204, 0, 0.05);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.somatic-pulse-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-gold, #FFCC00), transparent);
  transition: left 0.7s ease;
}

.somatic-pulse-container.pulsing::before {
  left: 100%;
}

.somatic-pulse-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 204, 0, 0.15);
  flex-wrap: wrap;
  gap: 8px;
}

.pulse-title {
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-gold, #FFCC00);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pulse-badge {
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  font-weight: 700;
  color: #00ffaa;
  background: rgba(0, 255, 170, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(0, 255, 170, 0.3);
}

.somatic-pulse-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.somatic-pulse-controls label {
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  color: #a0aec0;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.somatic-select {
  flex: 1;
  min-width: 260px;
  background: #050912;
  color: #fff;
  border: 1px solid rgba(255, 204, 0, 0.4);
  padding: 8px 12px;
  border-radius: 4px;
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.somatic-select:focus, .somatic-select:hover {
  border-color: var(--accent-gold, #FFCC00);
  box-shadow: 0 0 10px rgba(255, 204, 0, 0.2);
}

.pulse-btn {
  font-family: var(--font-mono, monospace) !important;
  font-size: 0.75rem !important;
  padding: 8px 16px !important;
  white-space: nowrap;
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--accent-gold, #FFCC00), #e6b800) !important;
  color: #000 !important;
  font-weight: 800 !important;
  border: none !important;
  border-radius: 4px !important;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s !important;
}

.pulse-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(255, 204, 0, 0.4) !important;
}

@media (max-width: 768px) {
  .somatic-pulse-controls {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ==========================================================================
   FORENSIC TRIGGER CARDS & MINI-CONSOLE (PHASE 3 - MATRIX.HTML)
   ========================================================================== */
.forensic-trigger-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.forensic-trigger-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 204, 0, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(255, 204, 0, 0.05);
}

.bypass-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
  gap: 12px;
}

.probe-btn {
  font-family: var(--font-mono, monospace) !important;
  font-size: 0.65rem !important;
  padding: 6px 12px !important;
  background: rgba(255, 204, 0, 0.1) !important;
  color: var(--accent-gold, #FFCC00) !important;
  border: 1px solid rgba(255, 204, 0, 0.4) !important;
  border-radius: 4px !important;
  cursor: pointer;
  font-weight: 700 !important;
  letter-spacing: 1px;
  transition: all 0.2s !important;
  width: 140px !important;
  min-width: 140px !important;
  text-align: center !important;
  display: inline-flex !important;
  justify-content: center !important;
  align-items: center !important;
}

.probe-btn:hover:not(:disabled) {
  background: var(--accent-gold, #FFCC00) !important;
  color: #000 !important;
  box-shadow: 0 0 10px rgba(255, 204, 0, 0.4) !important;
}

.probe-btn:disabled, .probe-btn.probing {
  opacity: 0.7;
  cursor: wait;
  border-color: #00ffaa !important;
  color: #00ffaa !important;
  background: rgba(0, 255, 170, 0.1) !important;
}

.mini-console {
  margin-top: 14px;
  background: #050912;
  border: 1px solid rgba(0, 255, 170, 0.3);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
  animation: consoleSlideIn 0.3s ease-out;
}

@keyframes consoleSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.console-header {
  background: rgba(0, 255, 170, 0.1);
  padding: 4px 10px;
  font-family: var(--font-mono, monospace);
  font-size: 0.6rem;
  font-weight: 700;
  color: #00ffaa;
  border-bottom: 1px solid rgba(0, 255, 170, 0.2);
  letter-spacing: 1px;
}

.console-log {
  padding: 10px;
  max-height: 140px;
  overflow-y: auto;
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  line-height: 1.5;
  color: #a0aec0;
}

.console-line {
  margin-bottom: 4px;
  word-break: break-word;
}

.console-line.line-warn {
  color: var(--accent-gold, #FFCC00);
  font-weight: 600;
}

.console-line.line-success {
  color: #00ffaa;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(0, 255, 170, 0.3);
}

/* ==========================================
   FOREGROUND PROVING GROUNDS LABS MODAL
   ========================================== */
.interactive-lab-card {
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 204, 0, 0.15) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
}

.interactive-lab-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 204, 0, 0.6) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 204, 0, 0.15);
}

.lab-trigger-btn {
  margin-top: 20px;
  width: 100%;
  text-align: center;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  letter-spacing: 1.5px;
  padding: 10px 16px !important;
  border-color: rgba(255, 204, 0, 0.4) !important;
  color: var(--accent-gold, #FFCC00) !important;
  background: rgba(10, 15, 25, 0.8) !important;
  transition: all 0.25s ease;
}

.interactive-lab-card:hover .lab-trigger-btn {
  background: var(--accent-gold, #FFCC00) !important;
  color: #050912 !important;
  box-shadow: 0 0 15px rgba(255, 204, 0, 0.4);
}

.lab-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(2, 6, 14, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  padding: 20px;
}

.lab-modal-overlay.visible {
  opacity: 1;
}

.lab-modal-container {
  width: 100%;
  max-width: 920px;
  background: #060a14;
  border: 1px solid rgba(255, 204, 0, 0.4);
  border-radius: 12px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 204, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  transform: scale(0.96);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.lab-modal-overlay.visible .lab-modal-container {
  transform: scale(1);
}

.lab-modal-header {
  padding: 18px 24px;
  background: linear-gradient(90deg, #080f20, #0a1428);
  border-bottom: 1px solid rgba(255, 204, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lab-modal-title {
  font-family: var(--font-mono, monospace);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-gold, #FFCC00);
  letter-spacing: 1px;
}

.lab-modal-close {
  background: transparent;
  border: none;
  color: #7a94b5;
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}

.lab-modal-close:hover {
  color: #ff3232;
}

.lab-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.lab-desc {
  margin-bottom: 20px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #c5d2e0;
}

.lab-badge-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.lab-badge {
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #a0aec0;
  letter-spacing: 0.5px;
}

.lab-badge.gold {
  background: rgba(255, 204, 0, 0.1);
  border-color: rgba(255, 204, 0, 0.3);
  color: var(--accent-gold, #FFCC00);
}

.lab-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #080d1a;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.lab-control-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lab-control-group label {
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  color: #7a94b5;
  font-weight: 600;
}

.lab-select {
  background: #04070e;
  color: #FFCC00;
  border: 1px solid rgba(255, 204, 0, 0.3);
  border-radius: 6px;
  padding: 6px 12px;
  font-family: var(--font-mono, monospace);
  font-size: 0.8rem;
  outline: none;
  cursor: pointer;
}

.lab-btn-group {
  display: flex;
  gap: 10px;
}

.lab-action-btn {
  font-family: var(--font-mono, monospace) !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  letter-spacing: 1px;
  padding: 8px 16px !important;
  width: 100% !important;
  max-width: 460px !important;
  text-align: center !important;
  display: inline-flex !important;
  justify-content: center !important;
  align-items: center !important;
}

.lab-run-btn {
  font-family: var(--font-mono, monospace) !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  letter-spacing: 1px;
  padding: 8px 16px !important;
  background: rgba(255, 204, 0, 0.15) !important;
  border-color: #FFCC00 !important;
  color: #FFCC00 !important;
  width: 240px !important;
  min-width: 240px !important;
  text-align: center !important;
  display: inline-flex !important;
  justify-content: center !important;
  align-items: center !important;
}

.lab-sandbox-area {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
}

@media (max-width: 850px) {
  .lab-sandbox-area {
    grid-template-columns: 1fr;
  }
  .lab-action-btn, .lab-run-btn {
    width: 100% !important;
    min-width: 100% !important;
  }
}

.lab-canvas-wrapper {
  background: #04070e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 260px;
}

.canvas-instruction {
  position: absolute;
  top: 10px;
  left: 12px;
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.3);
  pointer-events: none;
  letter-spacing: 1px;
}

.lab-canvas-wrapper canvas {
  width: 100%;
  height: 260px;
  cursor: crosshair;
}

.lab-telemetry-panel {
  background: #080d1a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.lab-telemetry-panel .panel-title {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  font-weight: 700;
  color: #FFCC00;
  letter-spacing: 1px;
}

.telemetry-grid {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.t-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
}

.t-label {
  color: #7a94b5;
}

.t-val {
  color: #e2e8f0;
  font-weight: 600;
  text-align: right;
}

.t-val.gold {
  color: #FFCC00;
  font-weight: 700;
}

.t-val.success {
  color: #00ffaa;
  font-weight: 700;
}

.t-val.error {
  color: #ff3232;
  font-weight: 700;
}

.telemetry-log {
  padding: 12px 16px;
  flex: 1;
  max-height: 140px;
  overflow-y: auto;
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  line-height: 1.5;
  color: #a0aec0;
}

.telemetry-log .log-line {
  margin-bottom: 4px;
}





/* --- Strict OS Bifurcation Showcase --- */
.os-bifurcation-showcase {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 20px;
  max-width: 1000px;
  margin: 40px auto 0;
  padding: 20px;
}

.os-pane {
  flex: 1;
  background: rgba(20, 25, 40, 0.6);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 40px 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  transition: transform 0.4s ease, border-color 0.4s ease;
}

.os-pane:hover {
  transform: translateY(-5px);
}

.linux-pane {
  border-left: 3px solid #ff7b00;
}
.linux-pane:hover {
  border-color: #ff7b00;
}
.linux-pane .os-icon { color: #ff7b00; }

.windows-pane {
  border-right: 3px solid #00a4ef;
}
.windows-pane:hover {
  border-color: #00a4ef;
}
.windows-pane .os-icon { color: #00a4ef; }

.os-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 15px currentColor);
}

.os-pane h3 {
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 24px;
}

.os-pane ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.os-pane ul li {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: var(--text-dim);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.os-pane ul li:last-child {
  border-bottom: none;
}

.os-pane ul li::before {
  content: '→';
  color: currentColor;
  font-weight: bold;
  opacity: 0.5;
}

.bifurcation-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 150px;
  position: relative;
}

.connector-line {
  position: absolute;
  top: 50%;
  left: -50px;
  right: -50px;
  height: 2px;
  background: linear-gradient(90deg, #ff7b00, var(--accent-gold), #00a4ef);
  z-index: 1;
}

.connector-pulse {
  background: var(--bg-deep);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  padding: 10px 20px;
  border-radius: 30px;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 800;
  z-index: 2;
  box-shadow: none;
  text-align: center;
  position: relative;
}

.connector-pulse::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 30px;
  border: 2px solid var(--accent-gold);
  animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  75%, 100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

@media (max-width: 850px) {
  .os-bifurcation-showcase {
    flex-direction: column;
  }
  .connector-line {
    top: -50px;
    bottom: -50px;
    left: 50%;
    width: 2px;
    height: auto;
    background: linear-gradient(180deg, #ff7b00, var(--accent-gold), #00a4ef);
  }
  .bifurcation-connector {
    height: 100px;
    width: auto;
  }
}

/* --- Evasion Matrix --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  width: 100%;
  margin-top: 30px;
}

.feature-card {
  background: rgba(20, 28, 45, 0.4);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(230, 194, 122, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(230, 194, 122, 0.1);
  background: rgba(25, 35, 55, 0.6);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.feature-name {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.feature-status {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent-gold);
  padding: 4px 8px;
  background: rgba(230, 194, 122, 0.1);
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.feature-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0;
}

/* --- Bypass Grid (Hardware & Anomalies) --- */
.bypass-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 32px;
  width: 100%;
  margin-top: 30px;
}

.bypass-item {
  background: rgba(12, 18, 30, 0.7);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.bypass-item:hover {
  border-color: rgba(255,255,255,0.2);
  box-shadow: inset 0 0 40px rgba(0,0,0,0.3), 0 8px 30px rgba(0,0,0,0.4);
}

.bypass-vector {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.bypass-vector::before {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  background: var(--accent-glow);
  border-radius: 50%;
  box-shadow: none;
}

.bypass-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.7);
  margin-bottom: 24px;
  flex-grow: 1;
}

.bypass-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px dashed rgba(255,255,255,0.1);
}

.bypass-status {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: #4ade80; 
  text-shadow: 0 0 8px rgba(74, 222, 128, 0.4);
  background: rgba(74, 222, 128, 0.1);
  padding: 6px 12px;
  border-radius: 4px;
}

/* --- Tech Page Enhancements --- */
.ambient-orb {
  position: fixed;
  top: 50%; left: 50%;
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(230, 194, 122, 0.08) 0%, rgba(10, 18, 34, 0) 60%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: -1;
  transition: top 0.4s ease-out, left 0.4s ease-out;
}

.tech-layout-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 60px;
  max-width: min(1400px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 40px 0;
  position: relative;
}

.toc-sidebar {
  position: sticky;
  top: 120px;
  height: max-content;
  background: rgba(10, 15, 25, 0.6);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 24px;
  backdrop-filter: blur(20px);
}

.toc-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toc-link {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 2px solid transparent;
  padding-left: 12px;
}

.toc-link:hover, .toc-link.active {
  color: var(--accent-gold);
  border-left-color: var(--accent-gold);
  text-shadow: 0 0 8px var(--accent-glow);
}

.tech-content-wrapper {
  min-width: 0;
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Faux IDE / Terminal Blocks */
.ide-block, .fleet-terminal {
  background: #0d1117;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  max-width: 800px;
  margin-left: auto; margin-right: auto;
}

.ide-header {
  background: #161b22;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.ide-dots {
  display: flex;
  gap: 6px;
  margin-right: 16px;
}

.ide-dots .dot {
  width: 12px; height: 12px; border-radius: 50%;
}
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.ide-title {
  color: #8b949e;
  font-family: var(--mono);
  font-size: 0.8rem;
}

.ide-block pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
}

.ide-block code {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: #e6edf3;
  line-height: 1.5;
}

.terminal-body {
  padding: 20px;
  font-family: var(--mono);
  font-size: 0.9rem;
  color: #4ade80;
  min-height: 250px;
}

.term-line {
  margin-bottom: 8px;
}
.term-line.prompt { color: #8b949e; }
.cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: #4ade80;
  animation: blink 1s infinite;
  vertical-align: middle;
}
@keyframes blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }

@media (max-width: 960px) {
  .tech-layout-grid {
    grid-template-columns: 1fr;
  }
  .toc-sidebar {
    display: none;
  }
}

.in-depth-explanation {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed rgba(255,255,255,0.1);
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.65);
}
.in-depth-explanation strong {
  color: var(--accent-gold);
  font-weight: 600;
}
.in-depth-explanation h4 {
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 8px;
  font-family: var(--mono);
}


/* ==========================================================================
   APEX-TIER VISUAL & INTERACTIVE OVERHAUL (THE "5% RESTRAINT RULE")
   ========================================================================== */

/* 1. EXECUTIVE TYPOGRAPHY & STAGGERED CONTRAST */
h1, h2, h3, h4 {
  letter-spacing: -0.03em !important;
}

p, .demo-desc, .feature-desc, .lab-desc {
  color: #94A3B8 !important; /* Muted Slate Secondary Contrast */
}

/* 2. SPOTLIGHT MOUSE TRACKING & GLASS 2.0 */
.demo-card, .card, .feature-card, .grid-item, .bento-card, .in-depth-explanation {
  position: relative;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.12), 0 4px 20px rgba(0,0,0,0.4);
}

.demo-card:hover, .card:hover, .feature-card:hover, .grid-item:hover, .bento-card:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 0 rgba(255, 204, 0, 0.3), 0 8px 30px rgba(0,0,0,0.6);
}

.demo-card::before, .card::before, .feature-card::before, .grid-item::before, .bento-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(
    250px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 204, 0, 0.25),
    rgba(0, 195, 255, 0.15) 40%,
    transparent 80%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.demo-card:hover::before, .card:hover::before, .feature-card:hover::before, .grid-item:hover::before, .bento-card:hover::before {
  opacity: 1;
}

/* 3. MILITARY-GRADE DIAGNOSTICS (SCANLINES & PHOSPHOR BLOOM) */
canvas {
  filter: drop-shadow(0 0 4px rgba(255, 204, 0, 0.18));
}

.canvas-container, .demo-canvas-box, div[style*="position:relative"] > canvas, .lab-canvas-wrapper {
  position: relative;
}

.canvas-wrap, .demo-card > div[style*="background:#0a0a"], .demo-card > div[style*="background:#111"], .lab-canvas-wrapper {
  position: relative;
  overflow: hidden;
}

.canvas-wrap::after, .demo-card > div[style*="background:#0a0a"]::after, .demo-card > div[style*="background:#111"]::after, .lab-canvas-wrapper::after {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15) 0px,
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  opacity: 0.35;
  z-index: 5;
}

/* 4. FLOATING PILL DOCK NAVBAR */
.floating-dock {
  position: fixed !important;
  top: 15px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 92% !important;
  max-width: 1200px !important;
  border-radius: 50px !important;
  background: rgba(10, 10, 15, 0.8) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.2) !important;
  padding: 8px 24px !important;
  z-index: 10000 !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* 5. LIVE TELEMETRY TICKER */
.telemetry-ticker {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 28px;
  background: rgba(5, 5, 8, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  color: #64748B;
  z-index: 9999;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  user-select: none;
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ticker-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #00FF66;
  box-shadow: 0 0 8px #00FF66;
  animation: pulse-dot 1.5s infinite;
}

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

/* 6. SOVEREIGN COMMAND PALETTE (Ctrl+K / /) */
.cmd-palette-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100000;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 18vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.cmd-palette-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.cmd-palette-box {
  width: 90%; max-width: 620px;
  background: rgba(12, 16, 28, 0.96);
  border: 1px solid rgba(255, 204, 0, 0.35);
  border-radius: 12px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.85), inset 0 1px 0 rgba(255,255,255,0.15);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cmd-palette-backdrop.active .cmd-palette-box {
  transform: scale(1);
}

.cmd-input {
  width: 100%;
  background: transparent;
  border: none;
  padding: 16px 20px;
  font-size: 1rem;
  color: #fff;
  font-family: inherit;
  outline: none;
}

.cmd-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px 0;
}

.cmd-item {
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  color: #94A3B8;
  font-size: 0.9rem;
  transition: all 0.15s ease;
  border-left: 3px solid transparent;
}

.cmd-item:hover, .cmd-item.selected {
  background: rgba(255, 204, 0, 0.1);
  color: #fff;
  padding-left: 24px;
  border-left-color: var(--accent-gold);
}

.cmd-badge {
  font-family: monospace;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  font-weight: bold;
}

/* 7. POWER-UP INITIALIZATION SCAN */
@keyframes powerup-scan {
  0% { transform: translateY(-100%); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateY(100vh); opacity: 0; }
}

.powerup-line {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), #00ff88, transparent);
  box-shadow: 0 0 15px var(--accent-gold);
  z-index: 999999;
  pointer-events: none;
  animation: powerup-scan 0.8s ease-out forwards;
}

/* 8. TACTILE BUTTON COMPRESSION */
button, .btn, .btn-primary, .btn-secondary, .lab-action-btn, .lab-run-btn {
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s cubic-bezier(0.16, 1, 0.3, 1), background 0.15s !important;
}

button:active, .btn:active, .btn-primary:active, .btn-secondary:active {
  transform: translateY(1px) scale(0.98) !important;
}

/* ========================================= */
/* APEX TIER FORENSIC PROVING GROUNDS OVERRIDES */
/* ========================================= */

/* 1. Terminal Overhaul */
.demo-exp-box {
  background: rgba(5, 7, 15, 0.85) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 240, 255, 0.2) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8), inset 0 0 15px rgba(0,240,255,0.05) !important;
  border-radius: var(--radius-md) !important;
  position: relative;
  overflow: visible !important;
  margin-top: 30px;
}

.demo-exp-title {
  background: rgba(0, 0, 0, 0.9) !important;
  border-bottom: 1px solid rgba(0, 240, 255, 0.3) !important;
  padding: 8px 16px !important;
  font-family: var(--mono) !important;
  font-size: 0.7rem !important;
  color: var(--accent-cyan, #00f0ff) !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin: -18px -22px 16px -22px !important;
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
  letter-spacing: 2px;
}

.demo-exp-title::before {
  content: "● ● ● [SYS.EXEC // NOCTUA VTC]";
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 2px;
}

.demo-exp-title > span:first-child {
  display: none; /* Hide old title text */
}

.demo-exp-text {
  font-family: var(--mono) !important;
  color: #00ffaa !important;
  text-shadow: 0 0 5px rgba(0,255,170,0.3) !important;
  position: relative;
}

/* Simulate typing CRT effect */
.demo-exp-box.active .demo-exp-text::after {
  content: "█";
  animation: blink 1s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* 2. Stateful Buttons */
.btn-pg {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn-pg:active, .btn-pg.executing {
  background: rgba(255, 204, 0, 0.15) !important;
  border-color: var(--accent-gold) !important;
  color: #fff !important;
  box-shadow: inset 0 0 10px rgba(255, 204, 0, 0.2), 0 0 15px rgba(255, 204, 0, 0.3) !important;
  transform: scale(0.98);
}

.btn-pg:hover {
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.05);
}

/* 3. Category Segmented Controls */
.category-menu {
  background: rgba(0, 0, 0, 0.3);
  padding: 8px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.cat-btn {
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: var(--radius-md) !important;
  transition: all 0.3s ease !important;
}

.cat-btn.active {
  background: rgba(255, 204, 0, 0.1) !important;
  border-color: rgba(255, 204, 0, 0.3) !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5) !important;
}

/* 4. Active Test Sidebar Styling */
#test-list-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

#test-list-nav li {
  padding: 12px 16px;
  margin-bottom: 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.02);
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

#test-list-nav li:hover {
  background: rgba(255,255,255,0.05);
}

#test-list-nav li.active-test-item {
  background: rgba(255, 204, 0, 0.08);
  border-left: 3px solid var(--accent-gold);
  color: var(--accent-gold);
  text-shadow: 0 0 8px rgba(255, 204, 0, 0.3);
}

/* 5. Main Glassmorphism Container */
.test-viewport {
  background: rgba(10, 15, 25, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 204, 0, 0.1);
  border-radius: var(--radius-lg);
  padding: 0;
  box-shadow: 0 25px 50px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.test-card {
  padding: 40px;
}

.test-slides-track {
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Mobile Navigation Button */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid rgba(0, 240, 255, 0.2);
  cursor: pointer;
  padding: 10px;
  border-radius: 4px;
  z-index: 9999;
  position: absolute;
  top: 15px;
  right: 15px;
}
.mobile-menu-btn .hamburger-box {
  width: 24px;
  height: 24px;
  display: inline-block;
  position: relative;
}
.mobile-menu-btn .hamburger-inner,
.mobile-menu-btn .hamburger-inner::before,
.mobile-menu-btn .hamburger-inner::after {
  width: 24px;
  height: 2px;
  background-color: var(--accent-gold);
  position: absolute;
  transition: transform 0.15s ease;
}
.mobile-menu-btn .hamburger-inner { top: 50%; margin-top: -1px; }
.mobile-menu-btn .hamburger-inner::before { content: ""; top: -8px; }
.mobile-menu-btn .hamburger-inner::after { content: ""; bottom: -8px; }
.mobile-menu-btn.is-active .hamburger-inner { background-color: transparent; }
.mobile-menu-btn.is-active .hamburger-inner::before { transform: translateY(8px) rotate(45deg); }
.mobile-menu-btn.is-active .hamburger-inner::after { transform: translateY(-8px) rotate(-45deg); }

/* ═══════════════════════════════════════════════════════════
   MOBILE NAV BREAKPOINT (960px)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
  .mobile-menu-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: relative !important;
    top: auto !important;
    right: auto !important;
  }
  .topbar {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 14px 20px !important;
    border-radius: 20px !important;
    position: sticky !important;
    top: 12px !important;
    z-index: 10000 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .topbar.is-open {
    border-radius: 16px !important;
    background: var(--bg-surface) !important;
  }
  .nav {
    display: none !important;
    flex-direction: column !important;
    flex-basis: 100% !important;
    order: 3;
    width: 100% !important;
    gap: 14px !important;
    padding: 16px 0 !important;
    border-top: 1px solid rgba(255, 204, 0, 0.15) !important;
    margin-top: 12px !important;
  }
  .nav a { font-size: 15px !important; padding: 4px 0 !important; }
  .nav-cta {
    display: none !important;
    flex-basis: 100% !important;
    order: 4;
    width: 100% !important;
    text-align: center !important;
    margin-top: 8px !important;
    justify-self: auto !important;
  }
  .topbar.is-open .nav { display: flex !important; }
  .topbar.is-open .nav-cta { display: block !important; }

  /* Scanner panel: remove 3D transform on medium screens */
  .live-scanner-panel { transform: none !important; }

  /* Hero: stack columns */
  .hero {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
    padding: 60px 32px !important;
  }
  .hero-visual { width: 100% !important; }
}

/* ═══════════════════════════════════════════════════════════
   FULL MOBILE OVERHAUL (768px and below)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ─── Global ─────────────────────────────────────────── */
  html, body {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    height: auto !important;
    min-height: 100vh !important;
  }
  *, *::before, *::after { box-sizing: border-box !important; }

  /* ─── Site shell ─────────────────────────────────────── */
  .site-shell {
    width: 100% !important;
    max-width: 100vw !important;
    padding: 16px 0 60px !important;
    margin: 0 !important;
  }

  /* ─── Bypass ticker ──────────────────────────────────── */
  .bypass-ticker {
    font-size: 10px !important;
    padding: 6px 10px !important;
  }

  /* ─── Topbar ─────────────────────────────────────────── */
  .topbar {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 16px !important;
    border-radius: 14px !important;
    position: sticky !important;
    top: 8px !important;
    z-index: 10000 !important;
    width: 100% !important;
    margin: 0 !important;
  }
  .brand-logo { height: 28px !important; }
  .brand-text { font-size: 14px !important; min-width: 0 !important; }

  /* ─── Hero ───────────────────────────────────────────── */
  .hero {
    display: flex !important;
    flex-direction: column !important;
    padding: 44px 20px 36px !important;
    gap: 28px !important;
    margin-top: 16px !important;
    border-radius: 12px !important;
  }
  .hero-copy {
    max-width: 100% !important;
    width: 100% !important;
    padding-top: 0 !important;
  }
  .hero-copy h1 {
    font-size: clamp(28px, 9vw, 48px) !important;
    line-height: 1.1 !important;
    letter-spacing: -0.02em !important;
  }
  .lede { font-size: 15px !important; margin-top: 16px !important; }
  .cta-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin-top: 24px !important;
    width: 100% !important;
  }
  .button, .btn, .cta-row a {
    width: 100% !important;
    text-align: center !important;
    padding: 14px 20px !important;
    min-height: 48px !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .utc-clock { top: 12px !important; right: 16px !important; font-size: 10px !important; }
  .hud-corners { display: none !important; }
  .ambient-orb { display: none !important; }

  /* ─── Hero visual / scanner panel ───────────────────── */
  .hero-visual {
    width: 100% !important;
    max-width: 100% !important;
  }
  .live-scanner-panel {
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    font-size: 11px !important;
    overflow-x: hidden !important;
  }
  .scanner-header { flex-wrap: wrap !important; gap: 8px !important; }
  .scanner-title-text { font-size: 10px !important; flex: 1 1 auto !important; }
  .scanner-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    padding: 12px !important;
  }
  .scanner-quadrant { padding: 10px !important; }
  .quad-title { font-size: 10px !important; }
  .quad-data { font-size: 10px !important; word-break: break-all !important; }
  .somatic-pulse-container {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
  .somatic-pulse-controls {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }
  .somatic-select { width: 100% !important; font-size: 12px !important; }
  .pulse-btn { width: 100% !important; }
  .side-channel-terminal {
    max-width: 100% !important;
    font-size: 11px !important;
    overflow-x: auto !important;
  }
  .override-container { flex-direction: column !important; gap: 8px !important; text-align: center !important; }

  /* ─── Sections ───────────────────────────────────────── */
  .section, .page-hero, .legal-page {
    margin-top: 12px !important;
    border-radius: 10px !important;
    padding: 36px 18px !important;
  }
  .section-heading h2, h2 { font-size: 22px !important; line-height: 1.25 !important; }
  h1 { font-size: clamp(26px, 8vw, 44px) !important; }
  h3 { font-size: 16px !important; }
  p { font-size: 14px !important; line-height: 1.6 !important; }

  /* ─── Grids → single column ─────────────────────────── */
  .grid, .grid-2, .grid-3, .card-grid,
  .features-grid, .metrics-grid, .tech-grid,
  .closing-band {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    width: 100% !important;
  }
  .grid-col { width: 100% !important; }
  .closing-band { padding: 32px 18px !important; align-items: flex-start !important; }
  .closing-actions { width: 100% !important; }
  .closing-actions .button { width: 100% !important; }

  /* ─── Tables, code, pre ──────────────────────────────── */
  table, pre, code, .terminal-log, .probe-log {
    max-width: 100% !important;
    overflow-x: auto !important;
    font-size: 11px !important;
    word-break: break-all !important;
  }

  /* ─── Footer ─────────────────────────────────────────── */
  .footer {
    position: static !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 16px !important;
    padding: 24px 18px !important;
    text-align: center !important;
    border-radius: 10px !important;
    margin-top: 12px !important;
  }
  .footer > div { flex-direction: column !important; gap: 10px !important; }
  .footer-links {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 14px !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   NARROW PHONES (480px and below)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .scanner-grid {
    grid-template-columns: 1fr !important;
  }
  .site-shell { padding: 10px 0 40px !important; }
  .hero { padding: 32px 14px 28px !important; }
  .section, .page-hero { padding: 28px 14px !important; }
  .hero-copy h1 { font-size: clamp(24px, 10vw, 36px) !important; }
  .brand-text { display: none !important; } /* just show logo on very small screens */
}

/* Global Mobile Touch Target Accessibility (WCAG AAA >= 44px) */
@media (max-width: 768px) {
  button, .btn, .topbar-cta, .btn-pg, .cat-btn, .btn-decrypt, .topbar-toggle, .pulse-btn, .button {
    min-height: 44px !important;
    min-width: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

/* End of styles.css */
