/* ============================================================
   NEDOCS — "THE GRID" holographic / Tron sci-fi public theme
   ------------------------------------------------------------
   Applied only when <body class="theme-grid"> (public marketing
   pages). Layers on top of Bootstrap + UIKit + marketing.css and
   deliberately re-skins the per-page inline <style> families
   (fc-, eoi-, ag-, evidence-, tryit-, sim-, api-, pricing-,
   signup-, legal-, marketing-, ed-) so the whole public site
   reads as one glowing command deck.

   Behaviour: /js/scifi.js
   ============================================================ */

/* ---------- Palette / tokens ---------- */
.theme-grid {
  --grid-void: #03040a;
  --grid-void-2: #060a18;
  --grid-panel: rgba(10, 20, 40, 0.55);
  --grid-panel-solid: #08101f;
  --grid-line: rgba(34, 211, 238, 0.16);
  --grid-line-soft: rgba(34, 211, 238, 0.08);

  --neon-cyan: #22d3ee;
  --neon-blue: #3b82f6;
  --neon-indigo: #6366f1;
  --neon-magenta: #ff3df0;
  --neon-violet: #a855f7;
  --neon-green: #22e5a3;
  --neon-amber: #ffb020;
  --neon-red: #ff4d6d;

  --ink-100: #eaf6ff;
  --ink-200: #b8cce8;
  --ink-300: #8aa2c4;
  --ink-400: #5f7599;

  --glow-cyan: 0 0 18px rgba(34, 211, 238, 0.55);
  --glow-cyan-sm: 0 0 10px rgba(34, 211, 238, 0.45);
  --glow-magenta: 0 0 18px rgba(255, 61, 240, 0.5);
  --edge-cyan: 1px solid rgba(34, 211, 238, 0.45);

  /* Surge / threat colors (Tron-lit) */
  --sig-green: #22e5a3;
  --sig-yellow: #ffde3d;
  --sig-orange: #ff8f1f;
  --sig-red: #ff4d6d;
  --sig-black: #b30047;
}

/* ---------- Fonts ---------- */
.theme-grid,
.theme-grid .page-header-ui-text,
.theme-grid p,
.theme-grid li,
.theme-grid td,
.theme-grid label,
.theme-grid input,
.theme-grid select,
.theme-grid textarea {
  font-family: "Space Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
}
.theme-grid h1, .theme-grid h2, .theme-grid h3,
.theme-grid h4, .theme-grid h5, .theme-grid h6,
.theme-grid .h1, .theme-grid .h2, .theme-grid .h3,
.theme-grid .h4, .theme-grid .h5, .theme-grid .h6,
.theme-grid .navbar-brand,
.theme-grid .ed-h2,
.theme-grid .page-header-ui-title {
  font-family: "Orbitron", "Space Grotesk", system-ui, sans-serif;
  letter-spacing: 0.01em;
}
.theme-grid [data-count],
.theme-grid .ed-stat__num,
.theme-grid .ed-surge__readout,
.theme-grid .score-num,
.theme-grid .fc-mock-value,
.theme-grid .eoi-mock-value,
.theme-grid .sim-gauge .score,
.theme-grid .grid-mono,
.theme-grid code, .theme-grid pre {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ============================================================
   GLOBAL SURFACE — the void + perspective grid + scanlines
   ============================================================ */
.theme-grid {
  color: var(--ink-200);
  background-color: var(--grid-void);
  position: relative;
}

/* Fixed background layers injected by scifi.js (.grid-bg) or fallback */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 82% -12%, rgba(34, 211, 238, 0.14), transparent 60%),
    radial-gradient(1000px 620px at 8% 108%, rgba(168, 85, 247, 0.14), transparent 58%),
    linear-gradient(180deg, var(--grid-void) 0%, var(--grid-void-2) 55%, var(--grid-void) 100%);
}
/* perspective grid floor */
.grid-bg::before {
  content: "";
  position: absolute;
  left: -20%; right: -20%; bottom: -5%;
  height: 62%;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 46px 46px;
  transform: perspective(420px) rotateX(62deg);
  transform-origin: bottom center;
  -webkit-mask-image: linear-gradient(transparent, #000 55%);
  mask-image: linear-gradient(transparent, #000 55%);
  animation: grid-scroll 8s linear infinite;
}
/* faint top grid + scanlines */
.grid-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line-soft) 1px, transparent 1px),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 2px, transparent 2px 4px);
  background-size: 60px 60px, 60px 60px, 100% 4px;
  opacity: 0.6;
}

@keyframes grid-scroll { to { background-position: 0 46px, 46px 0; } }

/* Starfield canvas / node */
.grid-stars {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

/* ---------- Animations ---------- */
@keyframes grid-flicker {
  0%, 100% { opacity: 1; }
  8% { opacity: 0.72; }
  10% { opacity: 1; }
  62% { opacity: 0.9; }
  64% { opacity: 1; }
}
@keyframes grid-sweep {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}
@keyframes grid-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}
@keyframes grid-scan-y {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(1200%); }
}
@keyframes grid-radar {
  to { transform: rotate(360deg); }
}
@keyframes grid-float {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50% { transform: translateY(-14px) rotate(var(--rot, 0deg)); }
}
@keyframes grid-dash { to { stroke-dashoffset: -1000; } }
@keyframes grid-heartbeat {
  0%, 28%, 70%, 100% { transform: scale(1); }
  14% { transform: scale(1.16); }
  42% { transform: scale(1.08); }
}
@keyframes grid-boot-out {
  0% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}
@keyframes grid-siren {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 77, 109, 0.55); }
  50% { box-shadow: 0 0 0 12px rgba(255, 77, 109, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .theme-grid * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .grid-bg::before { animation: none; }
}

/* ============================================================
   TYPOGRAPHY / LINKS / UTILITIES
   ============================================================ */
.theme-grid h1, .theme-grid h2, .theme-grid h3,
.theme-grid h4, .theme-grid h5, .theme-grid h6,
.theme-grid .h1, .theme-grid .h2, .theme-grid .h3,
.theme-grid .h4, .theme-grid .h5, .theme-grid .h6 {
  color: var(--ink-100);
}
.theme-grid p, .theme-grid li { color: var(--ink-200); }
.theme-grid a { color: var(--neon-cyan); }
.theme-grid a:hover { color: #8ef0ff; text-shadow: var(--glow-cyan-sm); }

.theme-grid .text-muted,
.theme-grid .text-secondary,
.theme-grid small,
.theme-grid .small { color: var(--ink-300) !important; }
.theme-grid .text-dark { color: var(--ink-100) !important; }
.theme-grid .text-white,
.theme-grid .text-light { color: var(--ink-100) !important; }
.theme-grid .text-white-50 { color: var(--ink-300) !important; }
.theme-grid hr { border-color: rgba(34, 211, 238, 0.2); opacity: 1; }
.theme-grid code { color: #8ef0ff; background: rgba(34, 211, 238, 0.08); padding: 0.1em 0.35em; border-radius: 4px; }

/* Reusable glass panel + reticle brackets */
.theme-grid .grid-panel,
.grid-panel {
  position: relative;
  background: var(--grid-panel);
  border: var(--edge-cyan);
  border-radius: 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--glow-cyan-sm), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.grid-reticle::before, .grid-reticle::after {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid var(--neon-cyan);
  opacity: 0.8;
  pointer-events: none;
}
.grid-reticle::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.grid-reticle::after { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }

/* Eyebrow chip */
.theme-grid .ed-eyebrow,
.grid-eyebrow {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--neon-cyan);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.4);
  border-radius: 6px;
  padding: 0.2rem 0.7rem;
  box-shadow: var(--glow-cyan-sm);
}

/* ============================================================
   NAVBAR
   ============================================================ */
/* Keep the header (and its dropdowns) above transformed hero elements such
   as the rotated live-console card, which would otherwise paint over it. */
.theme-grid header {
  position: relative;
  z-index: 1050;
}
.theme-grid .navbar-marketing {
  background: rgba(4, 8, 18, 0.92) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(34, 211, 238, 0.28);
  box-shadow: 0 1px 0 rgba(34, 211, 238, 0.25), 0 8px 30px rgba(0, 0, 0, 0.5);
}
.theme-grid .navbar-marketing .navbar-brand,
.theme-grid .navbar-marketing .navbar-brand .fw-bold,
.theme-grid .navbar-marketing .navbar-brand .text-dark {
  color: var(--ink-100) !important;
  text-shadow: var(--glow-cyan-sm);
}
.theme-grid .navbar-brand-icon {
  filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.8));
  animation: grid-flicker 6s infinite;
}
.theme-grid .navbar-marketing .nav-link {
  color: var(--ink-100) !important;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  transition: color 0.15s ease, text-shadow 0.15s ease;
}
.theme-grid .navbar-marketing .nav-link:hover {
  color: var(--neon-cyan) !important;
  text-shadow: var(--glow-cyan-sm);
}
.theme-grid .navbar-toggler {
  border-color: rgba(34, 211, 238, 0.4);
  color: var(--neon-cyan);
}
.theme-grid .dropdown-menu {
  background: #060c1a;
  border: var(--edge-cyan);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), var(--glow-cyan-sm);
}
.theme-grid .dropdown-item { color: var(--ink-100); }
.theme-grid .dropdown-item:hover,
.theme-grid .dropdown-item:focus {
  background: rgba(34, 211, 238, 0.12);
  color: var(--neon-cyan);
}
.theme-grid .dropdown-divider { border-color: rgba(34, 211, 238, 0.2); }

/* ============================================================
   BUTTONS
   ============================================================ */
.theme-grid .btn {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 8px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.theme-grid .btn-primary {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
  border: 1px solid rgba(34, 211, 238, 0.6);
  color: #041018;
  box-shadow: var(--glow-cyan);
}
.theme-grid .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 26px rgba(34, 211, 238, 0.7);
  color: #041018;
}
.theme-grid .btn-outline-primary,
.theme-grid .btn-outline-secondary {
  color: var(--neon-cyan);
  border: 1px solid rgba(34, 211, 238, 0.55);
  background: rgba(34, 211, 238, 0.05);
}
.theme-grid .btn-outline-primary:hover,
.theme-grid .btn-outline-secondary:hover {
  background: rgba(34, 211, 238, 0.16);
  color: #8ef0ff;
  box-shadow: var(--glow-cyan-sm);
}
.theme-grid .btn-light {
  background: rgba(234, 246, 255, 0.92);
  color: #04121f;
  border: 1px solid rgba(34, 211, 238, 0.5);
}
.theme-grid .btn-light:hover { background: #fff; box-shadow: var(--glow-cyan); color: #04121f; }
.theme-grid .btn-outline-light {
  color: var(--ink-100);
  border-color: rgba(34, 211, 238, 0.5);
}
.theme-grid .btn-outline-light:hover {
  background: rgba(34, 211, 238, 0.16);
  color: var(--ink-100);
  border-color: var(--neon-cyan);
}

/* Chunky game buttons (front page) → neon capsules */
.theme-grid .btn-ed {
  border-radius: 8px;
  border: 1px solid rgba(34, 211, 238, 0.6);
  box-shadow: var(--glow-cyan-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.theme-grid .btn-ed:hover { transform: translateY(-2px); box-shadow: var(--glow-cyan); }
.theme-grid .btn-ed:active { transform: translateY(1px); }
.theme-grid .btn-ed--red {
  background: linear-gradient(135deg, var(--neon-magenta), #b30047);
  color: #fff; border-color: rgba(255, 61, 240, 0.6); box-shadow: var(--glow-magenta);
}
.theme-grid .btn-ed--white {
  background: rgba(10, 20, 40, 0.6); color: var(--neon-cyan); backdrop-filter: blur(6px);
}
.theme-grid .btn-ed--yellow {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue)); color: #041018;
}

/* ============================================================
   GENERIC CARDS / BADGES / FORMS  (Bootstrap + UIKit)
   ============================================================ */
.theme-grid .card,
.theme-grid .marketing-card {
  background: var(--grid-panel);
  border: var(--edge-cyan);
  border-radius: 14px;
  color: var(--ink-200);
  backdrop-filter: blur(10px);
  box-shadow: var(--glow-cyan-sm);
}
.theme-grid .card h3, .theme-grid .marketing-card h3,
.theme-grid .card .h6, .theme-grid .marketing-card .h6 { color: var(--ink-100); }
.theme-grid .marketing-card p { color: var(--ink-300); }

.theme-grid .badge.bg-light { background: rgba(34, 211, 238, 0.14) !important; color: var(--neon-cyan) !important; border: 1px solid rgba(34, 211, 238, 0.4); }
.theme-grid .badge.bg-primary { background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue)) !important; color: #041018 !important; }
.theme-grid .badge.text-primary { color: var(--neon-cyan) !important; }

.theme-grid .form-control,
.theme-grid .form-select,
.theme-grid input[type="text"],
.theme-grid input[type="email"],
.theme-grid input[type="password"],
.theme-grid input[type="number"],
.theme-grid textarea {
  background: rgba(6, 12, 26, 0.7);
  border: 1px solid rgba(34, 211, 238, 0.3);
  color: var(--ink-100);
}
.theme-grid .form-control::placeholder { color: var(--ink-400); }
.theme-grid .form-control:focus,
.theme-grid .form-select:focus {
  background: rgba(6, 12, 26, 0.9);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18);
  color: var(--ink-100);
}
.theme-grid .table { color: var(--ink-200); }
.theme-grid .table thead th { color: var(--ink-300); border-color: rgba(34, 211, 238, 0.2); }
.theme-grid .table td, .theme-grid .table th { border-color: rgba(34, 211, 238, 0.12); }

/* ============================================================
   UIKIT PAGE HEADER (pricing, misc)
   ============================================================ */
.theme-grid .page-header-ui-dark,
.theme-grid .page-header-ui {
  background: transparent !important;
  position: relative;
  overflow: hidden;
}
.theme-grid .page-header-ui-dark::before,
.theme-grid .page-header-ui::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 400px at 80% -20%, rgba(34, 211, 238, 0.16), transparent 60%),
    radial-gradient(700px 380px at 10% 120%, rgba(168, 85, 247, 0.16), transparent 60%);
  pointer-events: none;
}
.theme-grid .page-header-ui-title { text-shadow: var(--glow-cyan-sm); }
.theme-grid .page-header-ui-dark .page-header-ui-text { color: var(--ink-200) !important; }

/* ============================================================
   FOOTER — system status bar
   ============================================================ */
.theme-grid footer {
  background: rgba(4, 8, 18, 0.8);
  border-top: 1px solid rgba(34, 211, 238, 0.28) !important;
  color: var(--ink-300);
  backdrop-filter: blur(8px);
}
.theme-grid footer a { color: var(--ink-200); }
.theme-grid footer a:hover { color: var(--neon-cyan); }
.theme-grid .footer-brand a { color: var(--ink-100) !important; }
.theme-grid .grid-statusbar {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--neon-green);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.theme-grid .grid-statusbar .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--neon-green); box-shadow: 0 0 8px var(--neon-green);
  animation: grid-pulse 1.6s ease-in-out infinite;
}

/* ============================================================
   BOOT SEQUENCE OVERLAY
   ============================================================ */
.grid-boot {
  position: fixed;
  inset: 0;
  z-index: 99990;
  background: var(--grid-void);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  font-family: "JetBrains Mono", monospace;
  color: var(--neon-cyan);
  animation: grid-boot-out 2.1s ease forwards;
}
.grid-boot__logo {
  font-family: "Orbitron", sans-serif;
  font-weight: 900;
  font-size: clamp(1.6rem, 6vw, 3rem);
  letter-spacing: 0.3em;
  text-shadow: var(--glow-cyan);
  animation: grid-flicker 1.4s infinite;
}
.grid-boot__lines { font-size: 0.8rem; color: var(--neon-green); min-height: 5.5rem; text-align: left; }
.grid-boot__bar { width: min(320px, 70vw); height: 6px; border: 1px solid rgba(34,211,238,0.5); border-radius: 999px; overflow: hidden; }
.grid-boot__bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta)); box-shadow: var(--glow-cyan); animation: grid-boot-fill 1.7s ease forwards; }
@keyframes grid-boot-fill { to { width: 100%; } }

/* Red-alert mode */
.grid-alert::before {
  content: "";
  position: fixed; inset: 0; z-index: 99980; pointer-events: none;
  box-shadow: inset 0 0 120px 30px rgba(255, 77, 109, 0.55);
  animation: grid-pulse 0.9s ease-in-out infinite;
}

/* ============================================================
   FRONT PAGE — command deck (ed-* reskin + new components)
   ============================================================ */
.theme-grid .ed-hero {
  background:
    radial-gradient(1100px 480px at 82% -10%, rgba(34, 211, 238, 0.18), transparent 60%),
    radial-gradient(900px 480px at 8% 110%, rgba(168, 85, 247, 0.16), transparent 55%),
    linear-gradient(165deg, rgba(3,6,16,0.4) 0%, rgba(6,12,30,0.5) 55%, rgba(3,6,16,0.4) 100%);
  border-bottom: 1px solid rgba(34, 211, 238, 0.25);
}
.theme-grid .ed-ekg path {
  stroke: var(--neon-cyan);
  filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.9));
  animation: grid-dash 6s linear infinite;
}
/* emoji floaties → glowing holo glyphs */
.theme-grid .ed-floaty {
  filter: grayscale(0.2) drop-shadow(0 0 12px rgba(34, 211, 238, 0.7));
  animation: grid-float 6s ease-in-out infinite;
  opacity: 0.55;
}

.theme-grid .ed-hero__badge {
  background: rgba(34, 211, 238, 0.1);
  color: var(--neon-cyan);
  border: 1px solid rgba(34, 211, 238, 0.5);
  box-shadow: var(--glow-cyan-sm);
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.12em;
  animation: none;
}
.theme-grid .ed-hero__badge .ed-dot { background: var(--neon-cyan); box-shadow: 0 0 8px var(--neon-cyan); }
.theme-grid .ed-hero__title { color: var(--ink-100); text-shadow: 0 0 30px rgba(34, 211, 238, 0.25); }
.theme-grid .ed-hero__title .ed-mark { color: var(--neon-cyan); text-shadow: var(--glow-cyan); }
.theme-grid .ed-hero__title .ed-mark::after { background: rgba(255, 61, 240, 0.5); }

/* speech bubble → holo readout */
.theme-grid .ed-speech {
  background: rgba(6, 12, 26, 0.85);
  color: var(--ink-100);
  border: var(--edge-cyan);
  box-shadow: var(--glow-cyan-sm);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
}
.theme-grid .ed-speech::after { border-color: var(--neon-cyan) transparent transparent transparent; }
.theme-grid .ed-speech::before { border-color: rgba(6, 12, 26, 0.85) transparent transparent transparent; }

/* AEDA sentinel → hologram */
.theme-grid .ed-mascot {
  filter: drop-shadow(0 0 12px rgba(34, 211, 238, 0.6));
  animation: grid-flicker 5s infinite, ed-bob 3s ease-in-out infinite;
}
.theme-grid .ed-mascot__pupil {
  transform-origin: center;
  animation: aeda-scan 2.6s ease-in-out infinite;
}
.theme-grid .ed-mascot__ring { transform-origin: 42px 42px; animation: aeda-orbit 9s linear infinite; }
@keyframes aeda-scan {
  0%, 100% { transform: translateX(-9px); opacity: 0.75; }
  50% { transform: translateX(9px); opacity: 1; }
}
@keyframes aeda-orbit {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Live dashboard card (home-dash-card, from marketing.css) */
.theme-grid .home-dash-card {
  background: rgba(6, 12, 26, 0.72) !important;
  border: var(--edge-cyan) !important;
  box-shadow: var(--glow-cyan), 0 24px 48px rgba(0,0,0,0.5) !important;
  backdrop-filter: blur(12px);
}
.theme-grid .home-dash-card__top { background: rgba(34,211,238,0.06); border-bottom: 1px solid rgba(34,211,238,0.18); color: var(--ink-300); }
.theme-grid .home-dash-card__live { color: var(--neon-green); }
.theme-grid .home-dash-card__live-dot { background: var(--neon-green); box-shadow: 0 0 8px var(--neon-green); }
.theme-grid .home-dash-card__label { color: var(--ink-400); }
.theme-grid .home-dash-card__level { color: var(--neon-cyan); text-shadow: var(--glow-cyan-sm); }
.theme-grid .home-dash-card__trend-val { color: var(--neon-amber); }
.theme-grid .home-dash-card__metric { background: rgba(34,211,238,0.05); border: 1px solid rgba(34,211,238,0.16); }
.theme-grid .home-dash-card__metric-val { color: var(--ink-100); }
.theme-grid .home-dash-card__ai {
  background: linear-gradient(135deg, rgba(34,211,238,0.14) 0%, rgba(168,85,247,0.14) 100%);
  border: 1px solid rgba(34,211,238,0.35);
}
.theme-grid .home-dash-card__ai::before { background: linear-gradient(145deg, var(--neon-cyan), var(--neon-blue)); color: #041018; content: "AI"; }
.theme-grid .home-dash-card__ai-label { color: var(--neon-cyan); }
.theme-grid .home-dash-card__ai-text { color: var(--ink-100); }

/* Sections */
.theme-grid .ed-section--paper { background: rgba(6, 10, 24, 0.4); border-block: 1px solid rgba(34,211,238,0.08); }
.theme-grid .ed-h2 { color: var(--ink-100); }

/* Stat tiles */
.theme-grid .ed-stat {
  background: var(--grid-panel);
  border: var(--edge-cyan);
  box-shadow: var(--glow-cyan-sm);
  backdrop-filter: blur(8px);
}
.theme-grid .ed-stat:hover { transform: translateY(-4px); box-shadow: var(--glow-cyan); }
.theme-grid .ed-stat__num { color: var(--neon-cyan); text-shadow: var(--glow-cyan-sm); }
.theme-grid .ed-stat__label { color: var(--ink-100); }
.theme-grid .ed-stat__sub { color: var(--ink-400); }

/* Surge meter → reactor console */
.theme-grid .ed-surge {
  background: rgba(4, 8, 18, 0.7);
  border: var(--edge-cyan);
  border-radius: 16px;
  box-shadow: var(--glow-cyan), inset 0 0 40px rgba(34,211,238,0.06);
  backdrop-filter: blur(10px);
}
.theme-grid .ed-surge__readout { text-shadow: 0 0 30px currentColor; }
.theme-grid .ed-surge__band { border-color: rgba(255,255,255,0.2); }
.theme-grid .ed-meter { border: 1px solid rgba(34,211,238,0.5); box-shadow: 0 0 16px rgba(34,211,238,0.3); }
.theme-grid .ed-meter__needle { background: #fff; border: 1px solid var(--neon-cyan); box-shadow: 0 0 12px var(--neon-cyan); }
.theme-grid .ed-slider { background: rgba(34,211,238,0.12); border: 1px solid rgba(34,211,238,0.3); }
.theme-grid .ed-slider::-webkit-slider-thumb { background: var(--neon-cyan); border: 2px solid #041018; box-shadow: var(--glow-cyan-sm); }
.theme-grid .ed-slider::-moz-range-thumb { background: var(--neon-cyan); border: 2px solid #041018; }
.theme-grid .ed-preset {
  border: 1px solid rgba(34,211,238,0.35);
  background: rgba(34,211,238,0.06);
  color: var(--ink-200);
}
.theme-grid .ed-preset:hover { background: rgba(34,211,238,0.16); }
.theme-grid .ed-preset.is-active { background: var(--neon-cyan); color: #041018; border-color: var(--neon-cyan); }

/* Cards (power-ups / what's new) */
.theme-grid .ed-card {
  background: var(--grid-panel);
  border: var(--edge-cyan);
  box-shadow: var(--glow-cyan-sm);
  backdrop-filter: blur(10px);
  overflow: hidden;
}
.theme-grid .ed-card::after {
  /* light sweep on hover */
  content: "";
  position: absolute; top: 0; left: 0; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(34,211,238,0.14), transparent);
  transform: translateX(-150%);
  pointer-events: none;
}
.theme-grid .ed-card:hover { transform: translateY(-4px); box-shadow: var(--glow-cyan); }
.theme-grid .ed-card:hover::after { animation: grid-sweep 0.9s ease; }
.theme-grid .ed-card h3, .theme-grid .ed-card .h5, .theme-grid .ed-card .h6 { color: var(--ink-100); }
.theme-grid .ed-card p { color: var(--ink-300); }
.theme-grid .ed-card__icon {
  border: 1px solid rgba(34,211,238,0.5);
  box-shadow: var(--glow-cyan-sm);
  background: rgba(34,211,238,0.1) !important;
}
.theme-grid .ed-card__icon svg { filter: drop-shadow(0 0 5px currentColor); }
.theme-grid .ed-ribbon { background: var(--neon-magenta); border-color: rgba(255,61,240,0.6); box-shadow: var(--glow-magenta); }

/* Threat-level ladder */
.theme-grid .ed-level {
  background: var(--grid-panel);
  border: var(--edge-cyan);
  box-shadow: var(--glow-cyan-sm);
  backdrop-filter: blur(8px);
}
.theme-grid .ed-level__badge { border: 1px solid rgba(255,255,255,0.25); box-shadow: 0 0 14px currentColor; }
.theme-grid .ed-level__title { color: var(--ink-100); }
.theme-grid .ed-level__range { color: var(--ink-300); }

/* Achievements → tech-tree holo coins */
.theme-grid .ed-achv__coin {
  background: radial-gradient(circle at 35% 30%, rgba(34,211,238,0.35), rgba(6,12,26,0.9) 70%);
  border: 1px solid var(--neon-cyan);
  box-shadow: var(--glow-cyan);
}
.theme-grid .ed-achv__coin svg { stroke: var(--neon-cyan); filter: drop-shadow(0 0 6px var(--neon-cyan)); }
.theme-grid .ed-achv__name { color: var(--ink-100); }
.theme-grid .ed-achv__sub { color: var(--ink-400); }

/* Final CTA siren */
.theme-grid .ed-cta {
  background: linear-gradient(135deg, rgba(255,61,240,0.16), rgba(34,211,238,0.14));
  border: var(--edge-cyan);
  box-shadow: var(--glow-cyan);
  color: var(--ink-100);
  backdrop-filter: blur(10px);
}
.theme-grid .ed-cta::before, .theme-grid .ed-cta::after {
  background: var(--neon-magenta);
  border: 1px solid rgba(255,61,240,0.6);
  box-shadow: var(--glow-magenta);
  animation: grid-siren 1.6s ease-in-out infinite;
}

/* XP / mission progress bar (new component) */
.grid-xp {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: "JetBrains Mono", monospace;
}
.grid-xp__label { font-size: 0.72rem; letter-spacing: 0.08em; color: var(--ink-300); text-transform: uppercase; white-space: nowrap; }
.grid-xp__track { flex: 1; height: 10px; border-radius: 999px; background: rgba(34,211,238,0.12); border: 1px solid rgba(34,211,238,0.35); overflow: hidden; }
.grid-xp__fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta)); box-shadow: var(--glow-cyan); transition: width 0.5s cubic-bezier(.34,1.56,.64,1); }
.grid-xp__pct { font-size: 0.8rem; font-weight: 700; color: var(--neon-cyan); min-width: 3.2rem; text-align: right; }

/* Radar sweep decoration */
.grid-radar {
  position: relative;
  width: 120px; height: 120px;
  border-radius: 50%;
  border: 1px solid rgba(34,211,238,0.4);
  background: radial-gradient(circle, rgba(34,211,238,0.06), transparent 70%);
  overflow: hidden;
  flex-shrink: 0;
}
.grid-radar::before {
  content: "";
  position: absolute; inset: 0;
  background: conic-gradient(from 0deg, rgba(34,211,238,0.45), transparent 30%);
  animation: grid-radar 3.2s linear infinite;
}
.grid-radar::after {
  content: "";
  position: absolute; inset: 22%;
  border: 1px solid rgba(34,211,238,0.25);
  border-radius: 50%;
}

/* ============================================================
   PER-PAGE INLINE-STYLE OVERRIDES
   (fc- forecast · eoi- ops index · ag- integrations ·
    evidence- / study-card · tryit- · sim- · api- · pricing-
    · signup- · legal- · marketing-)
   Higher specificity than the page <style> blocks.
   ============================================================ */

/* --- Heroes (colored gradients → holo dark) --- */
.theme-grid .fc-hero,
.theme-grid .eoi-hero,
.theme-grid .ag-hero,
.theme-grid .evidence-hero,
.theme-grid .tryit-header,
.theme-grid .sim-hero,
.theme-grid .api-hero,
.theme-grid .api-cta,
.theme-grid .fc-cta,
.theme-grid .eoi-cta {
  background:
    radial-gradient(1000px 460px at 82% -14%, rgba(34,211,238,0.18), transparent 60%),
    radial-gradient(820px 440px at 6% 116%, rgba(168,85,247,0.16), transparent 58%),
    linear-gradient(165deg, rgba(4,8,18,0.6), rgba(6,12,30,0.55)) !important;
  border-block: 1px solid rgba(34,211,238,0.22);
  color: var(--ink-100) !important;
}
.theme-grid .fc-hero h1, .theme-grid .eoi-hero h1, .theme-grid .ag-hero h1,
.theme-grid .evidence-hero h1, .theme-grid .tryit-header h1, .theme-grid .sim-hero h1 {
  color: var(--ink-100) !important; text-shadow: 0 0 30px rgba(34,211,238,0.3);
}
.theme-grid .fc-hero p.lead, .theme-grid .eoi-hero p.lead, .theme-grid .ag-hero p.lead,
.theme-grid .evidence-hero p.lead, .theme-grid .tryit-header p, .theme-grid .sim-hero p,
.theme-grid .api-hero__lead { color: var(--ink-200) !important; }
.theme-grid .fc-hero .stat, .theme-grid .eoi-hero .stat, .theme-grid .evidence-hero .stat {
  background: rgba(34,211,238,0.08); border: 1px solid rgba(34,211,238,0.28);
}
.theme-grid .fc-hero .stat .num, .theme-grid .eoi-hero .stat .num, .theme-grid .evidence-hero .stat .num { color: var(--neon-cyan); }
.theme-grid .fc-hero .stat .lbl, .theme-grid .eoi-hero .stat .lbl, .theme-grid .evidence-hero .stat .lbl { color: var(--ink-300); }
.theme-grid .ag-hero .pill { background: rgba(34,211,238,0.1); color: var(--neon-cyan); border: 1px solid rgba(34,211,238,0.3); }
.theme-grid .api-hero__eyebrow, .theme-grid .api-hero__title { color: var(--ink-100); }

/* --- Alt/section backgrounds & wraps → transparent over the void --- */
.theme-grid .fc-section--alt,
.theme-grid .eoi-section--alt,
.theme-grid .ag-section--alt,
.theme-grid .marketing-section--alt,
.theme-grid .tryit-wrap,
.theme-grid .sim-wrap,
.theme-grid .signup-page {
  background: rgba(6, 10, 24, 0.4) !important;
}
.theme-grid .fc-section h2, .theme-grid .eoi-section h2, .theme-grid .ag-section h2 { color: var(--ink-100); }
.theme-grid .fc-section h2 + p, .theme-grid .eoi-section h2 + p, .theme-grid .ag-section h2 + p { color: var(--ink-300); }

/* --- White "mock"/preview + feature/step/panel cards → glass --- */
.theme-grid .fc-mock,
.theme-grid .eoi-mock,
.theme-grid .ag-flow,
.theme-grid .fc-feature,
.theme-grid .eoi-feature,
.theme-grid .ag-card,
.theme-grid .ag-step,
.theme-grid .eoi-band-card,
.theme-grid .fc-source,
.theme-grid .study-card,
.theme-grid .tryit-panel,
.theme-grid .sim-card,
.theme-grid .api-int-card,
.theme-grid .api-mock-card,
.theme-grid .pricing-tier,
.theme-grid .signup-fieldset,
.theme-grid .signup-complete,
.theme-grid .fc-moon,
.theme-grid .headline-card {
  background: var(--grid-panel) !important;
  border: var(--edge-cyan) !important;
  color: var(--ink-200) !important;
  backdrop-filter: blur(10px);
  box-shadow: var(--glow-cyan-sm) !important;
}
/* preserve meaningful colored headline bands (tryit) */
.theme-grid .headline-card.band-Green { background: linear-gradient(127deg,#0b6b41,#12b56a) !important; color:#eafff6 !important; }
.theme-grid .headline-card.band-Yellow { background: linear-gradient(127deg,#8a6a00,#e0b400) !important; color:#1b1400 !important; }
.theme-grid .headline-card.band-Orange { background: linear-gradient(127deg,#9a3608,#ff8f1f) !important; color:#1a0c00 !important; }
.theme-grid .headline-card.band-Red { background: linear-gradient(127deg,#8a0030,#ff4d6d) !important; color:#fff !important; }
.theme-grid .headline-card.band-Black { background: linear-gradient(127deg,#0a0f1c,#3a2140) !important; color:#fff !important; }

/* card headings/text inside those families */
.theme-grid .fc-mock-value, .theme-grid .eoi-mock-value { color: var(--neon-cyan) !important; text-shadow: var(--glow-cyan-sm); }
.theme-grid .fc-mock-eyebrow, .theme-grid .eoi-mock-eyebrow { color: var(--ink-300) !important; }
.theme-grid .fc-mock-range, .theme-grid .fc-mock-drivers li,
.theme-grid .fc-feature p, .theme-grid .eoi-feature p, .theme-grid .ag-card p,
.theme-grid .ag-card li, .theme-grid .ag-step p, .theme-grid .fc-source p,
.theme-grid .eoi-band-card p, .theme-grid .study-card .finding,
.theme-grid .study-card .authors { color: var(--ink-300) !important; }
.theme-grid .fc-feature h3, .theme-grid .eoi-feature h3, .theme-grid .ag-card h3,
.theme-grid .ag-step h4, .theme-grid .fc-source h4, .theme-grid .eoi-band-card h4,
.theme-grid .study-card h3, .theme-grid .fc-mock, .theme-grid .eoi-mock { color: var(--ink-100) !important; }
.theme-grid .fc-feature .label, .theme-grid .eoi-feature .label, .theme-grid .ag-card .label { color: var(--neon-cyan) !important; }
.theme-grid .fc-layer, .theme-grid .ag-flow .row-step { border-color: rgba(34,211,238,0.18) !important; }
.theme-grid .fc-layer .num, .theme-grid .ag-flow .num, .theme-grid .ag-step .num {
  background: rgba(34,211,238,0.15) !important; color: var(--neon-cyan) !important;
}

/* study-card meta chips */
.theme-grid .study-card .year { background: rgba(34,211,238,0.14); color: var(--neon-cyan); }
.theme-grid .study-card .journal { color: var(--ink-400); }
.theme-grid .study-card .feature { background: rgba(34,229,163,0.1); color: var(--neon-green); border-left: 3px solid var(--neon-green); }

/* evidence TOC + sections + funnel */
.theme-grid .evidence-section { border-bottom: 1px solid rgba(34,211,238,0.15); }
.theme-grid .evidence-toc a { color: var(--ink-300); }
.theme-grid .evidence-toc a:hover { color: var(--neon-cyan); border-left-color: var(--neon-cyan); }
.theme-grid .evidence-funnel { background: rgba(6,10,24,0.55) !important; border-block: 1px solid rgba(34,211,238,0.2); }

/* dark code/math blocks → cyan glass terminal */
.theme-grid .eoi-math,
.theme-grid .ag-format,
.theme-grid .api-code,
.theme-grid .api-mock-card__code {
  background: rgba(4,10,22,0.85) !important;
  border: 1px solid rgba(34,211,238,0.28) !important;
  color: #bfeeffe6 !important;
  box-shadow: inset 0 0 24px rgba(34,211,238,0.08);
}
.theme-grid .eoi-math .k, .theme-grid .ag-format .tag { color: var(--neon-green) !important; }

/* faq */
.theme-grid .fc-faq details, .theme-grid .eoi-faq details { border-bottom: 1px solid rgba(34,211,238,0.18); }
.theme-grid .fc-faq summary, .theme-grid .eoi-faq summary { color: var(--ink-100); }
.theme-grid .fc-faq p, .theme-grid .eoi-faq p { color: var(--ink-300); }
.theme-grid .pricing-faq__item { background: var(--grid-panel); border: var(--edge-cyan); }
.theme-grid .pricing-faq__item summary { color: var(--ink-100); }
.theme-grid .pricing-faq__answer p { color: var(--ink-300); }

/* pricing tier internals */
.theme-grid .pricing-tier__name, .theme-grid .pricing-tier__amount { color: var(--ink-100); }
.theme-grid .pricing-tier__eyebrow { color: var(--neon-cyan); }
.theme-grid .pricing-tier__tagline, .theme-grid .pricing-tier__period, .theme-grid .pricing-tier__features li { color: var(--ink-300); }
.theme-grid .pricing-tier__features li { border-bottom-color: rgba(34,211,238,0.12); }
.theme-grid .pricing-tier__features li::before { color: var(--neon-cyan); }
.theme-grid .pricing-tier--featured { border-color: var(--neon-cyan) !important; box-shadow: var(--glow-cyan) !important; }
.theme-grid .pricing-tier__badge { background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue)); color: #041018; }

/* signup form */
.theme-grid .signup-page__title, .theme-grid .signup-complete__title { color: var(--ink-100); }
.theme-grid .signup-page__subtitle, .theme-grid .signup-field__label, .theme-grid .signup-field__hint, .theme-grid .signup-complete__text { color: var(--ink-300); }
.theme-grid .signup-fieldset__legend { color: var(--neon-cyan); }
.theme-grid .signup-field__input {
  background: rgba(6,12,26,0.7); border: 1px solid rgba(34,211,238,0.3); color: var(--ink-100);
}
.theme-grid .signup-field__input:focus { border-color: var(--neon-cyan); box-shadow: 0 0 0 3px rgba(34,211,238,0.18); }
.theme-grid .signup-form__submit { background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue)); color: #041018; }
.theme-grid .signup-complete__icon { background: rgba(34,229,163,0.14); color: var(--neon-green); }

/* legal documents → readable dark parchment */
.theme-grid .legal-document { background: rgba(6,10,24,0.5) !important; }
.theme-grid .legal-document__title { color: var(--ink-100); }
.theme-grid .legal-document__updated { color: var(--ink-400); }
.theme-grid .legal-document__intro, .theme-grid .legal-document__section-body { color: var(--ink-200); }
.theme-grid .legal-document__section-heading { color: var(--neon-cyan); }
.theme-grid .legal-document__sections { border-top: 1px solid rgba(34,211,238,0.2); }

/* api page misc */
.theme-grid .api-toc a { color: var(--ink-300); }
.theme-grid .api-toc a:hover { color: var(--neon-cyan); border-left-color: var(--neon-cyan); }
.theme-grid .api-section { border-bottom: 1px solid rgba(34,211,238,0.15); }
.theme-grid .api-section__title, .theme-grid .api-endpoint__title { color: var(--ink-100); }
.theme-grid .api-section__eyebrow { color: var(--neon-cyan); }
.theme-grid .api-section__lead, .theme-grid .api-int-card__body { color: var(--ink-300); }
.theme-grid .api-int-card__name { color: var(--ink-100); }
.theme-grid .api-callout { background: rgba(34,211,238,0.08); border: 1px solid rgba(34,211,238,0.3); }
.theme-grid .api-endpoint-bar { background: rgba(6,12,26,0.7); border: 1px solid rgba(34,211,238,0.25); }
.theme-grid .api-endpoint-bar__url { color: var(--ink-100); }

/* tryit interactive internals */
.theme-grid .tryit-panel h6 { color: var(--ink-300); }
.theme-grid .tryit-input label { color: var(--ink-200); }
.theme-grid .tryit-input label .v { color: var(--neon-cyan); }
.theme-grid .tryit-input input[type=range] { background: rgba(34,211,238,0.15); accent-color: var(--neon-cyan); }
.theme-grid .scenario-pills button { background: rgba(34,211,238,0.06); border: 1px solid rgba(34,211,238,0.3); color: var(--ink-200); }
.theme-grid .scenario-pills button.active { background: var(--neon-cyan); color: #041018; border-color: var(--neon-cyan); }
.theme-grid .tile-grid .tile { background: rgba(34,211,238,0.05); border: 1px solid rgba(34,211,238,0.18); }
.theme-grid .tile-grid .tile .value { color: var(--ink-100); }
.theme-grid .tile-grid .tile .label, .theme-grid .tile-grid .tile .sub { color: var(--ink-300); }
.theme-grid .decomp-row .bar-track { background: rgba(34,211,238,0.12); }
.theme-grid .decomp-row .bar-fill { background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta)); }
.theme-grid .funnel-bar { background: linear-gradient(135deg, rgba(34,211,238,0.16), rgba(168,85,247,0.16)) !important; border: var(--edge-cyan); }
.theme-grid .score-num { color: currentColor; }

/* inner dark-text fixes for now-glass panels */
.theme-grid .ag-flow h3,
.theme-grid .ag-flow .body strong,
.theme-grid .eoi-mock-row strong { color: var(--ink-100) !important; }
.theme-grid .ag-flow .body span,
.theme-grid .fc-layer p,
.theme-grid .eoi-mock-row { color: var(--ink-300) !important; }
.theme-grid .ag-flow .row-step { border-bottom-color: rgba(34,211,238,0.16) !important; }
.theme-grid .eoi-mock-row { border-top-color: rgba(34,211,238,0.14) !important; }
.theme-grid .eoi-mock-row .pos { color: var(--neon-red) !important; }
.theme-grid .eoi-mock-meter { background: rgba(34,211,238,0.12) !important; }
.theme-grid .eoi-mock-flag,
.theme-grid .fc-mock-esc { color: #3a1d00 !important; }
.theme-grid .ag-trust {
  background: rgba(6,10,24,0.5) !important;
  border-block: 1px solid rgba(34,211,238,0.2);
}
.theme-grid .ag-trust .icon-box { background: rgba(34,211,238,0.06); border: 1px solid rgba(34,211,238,0.16); }

/* simulator internals */
.theme-grid .sim-card h2 { color: var(--ink-300); }
.theme-grid .sim-field label { color: var(--ink-200); }
.theme-grid .sim-field label .val { color: var(--neon-cyan); }
.theme-grid .sim-preset button { background: rgba(34,211,238,0.06); border: 1px solid rgba(34,211,238,0.3); color: var(--ink-200); }
.theme-grid .sim-preset button.active { background: var(--neon-cyan); color: #041018; border-color: var(--neon-cyan); }
.theme-grid .sim-run { background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue)); color: #041018; }
.theme-grid .sim-gauge .score, .theme-grid .sim-clock { color: var(--ink-100); }
.theme-grid .sim-counts .c .n { color: var(--ink-100); }
.theme-grid .sim-bed.empty { background: rgba(34,211,238,0.05); border-color: rgba(34,211,238,0.2); color: var(--ink-400); }
.theme-grid .sim-waiting { background: rgba(4,10,22,0.8); border: 1px solid rgba(34,211,238,0.2); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991px) {
  .grid-radar { display: none; }
  .theme-grid .ed-floaty { display: none; }
}
