/* ============================================================================
   CYZOG SECURITY & AI LABS — REFINED TACTICAL HARDWARE COCKPIT SYSTEM
   Aesthetic: High-Craft Dark Command Cockpit (Anduril / Linear / Palantir Craft)
   Shared across: cyzog.html (index.html), C127G.html, NeuralSentinel.html
   ============================================================================ */

:root,
[data-theme="dark"] {
  /* --- Rich Obsidian & Machined Cockpit Surfaces --- */
  --bg-obsidian:           #03060C;
  --bg-cockpit:            #060B16;
  --bg-panel:              rgba(10, 17, 34, 0.78);
  --bg-panel-solid:        #0A1122;
  --bg-panel-elevated:     rgba(15, 25, 48, 0.88);
  --bg-well:               #040811;

  /* --- Precision Specular Borders & Rim Lighting --- */
  --border-subtle:         rgba(148, 163, 184, 0.12);
  --border-panel:          rgba(148, 163, 184, 0.18);
  --border-strong:         rgba(148, 163, 184, 0.32);
  --rim-highlight:         inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
  --panel-shadow:          0 20px 45px -15px rgba(0, 0, 0, 0.75), inset 0 1px 0 0 rgba(255, 255, 255, 0.07);

  /* --- Typography Ink (WCAG 2.2 AA High-Contrast) --- */
  --ink-primary:           #F8FAFC;
  --ink-secondary:         #CBD5E1;
  --ink-muted:             #94A3B8;

  /* --- Disciplined Tactical Accents (Zero Purple/Indigo AI-Slop) --- */
  /* Primary Tactical Cyan (Cyzog Lab & Neural Sentinel Active Telemetry) */
  --cyan-core:             #06B6D4;
  --cyan-bright:           #22D3EE;
  --cyan-surface:          rgba(6, 182, 212, 0.10);
  --cyan-border:           rgba(6, 182, 212, 0.38);
  --cyan-glow:             rgba(6, 182, 212, 0.22);

  /* Sovereign Amber / Gold (C127G Vault & Hardware Keys) */
  --amber-core:            #F59E0B;
  --amber-bright:          #FBBF24;
  --amber-surface:         rgba(245, 158, 11, 0.10);
  --amber-border:          rgba(245, 158, 11, 0.40);
  --amber-glow:            rgba(245, 158, 11, 0.22);

  /* Enclave Emerald (Verified Air-Gap / Zero-Loss Status) */
  --emerald-core:          #10B981;
  --emerald-bright:        #34D399;
  --emerald-surface:       rgba(16, 185, 129, 0.10);
  --emerald-border:        rgba(16, 185, 129, 0.40);
  --emerald-glow:          rgba(16, 185, 129, 0.22);

  /* Threat Crimson (Entropy Spike / Active Intercept Only) */
  --crimson-core:          #EF4444;
  --crimson-bright:        #F87171;
  --crimson-surface:       rgba(239, 68, 68, 0.12);
  --crimson-border:        rgba(239, 68, 68, 0.45);
}

/* Optional High-Contrast Daylight Tactical Mode */
[data-theme="light"] {
  --bg-obsidian:           #F1F5F9;
  --bg-cockpit:            #E2E8F0;
  --bg-panel:              rgba(255, 255, 255, 0.94);
  --bg-panel-solid:        #FFFFFF;
  --bg-panel-elevated:     #F8FAFC;
  --bg-well:               #E2E8F0;

  --border-subtle:         rgba(15, 23, 42, 0.10);
  --border-panel:          rgba(15, 23, 42, 0.16);
  --border-strong:         rgba(15, 23, 42, 0.28);
  --rim-highlight:         inset 0 1px 0 0 rgba(255, 255, 255, 0.8);
  --panel-shadow:          0 12px 30px -10px rgba(15, 23, 42, 0.10);

  --ink-primary:           #0F172A;
  --ink-secondary:         #334155;
  --ink-muted:             #475569;

  --cyan-core:             #0891B2;
  --cyan-bright:           #0E7490;
  --cyan-surface:          rgba(8, 145, 178, 0.10);
  --cyan-border:           rgba(8, 145, 178, 0.35);
  --cyan-glow:             rgba(8, 145, 178, 0.10);

  --amber-core:            #D97706;
  --amber-bright:          #B45309;
  --amber-surface:         rgba(217, 119, 6, 0.10);
  --amber-border:          rgba(217, 119, 6, 0.38);
  --amber-glow:            rgba(217, 119, 6, 0.10);

  --emerald-core:          #059669;
  --emerald-bright:        #047857;
  --emerald-surface:       rgba(5, 150, 105, 0.10);
  --emerald-border:        rgba(5, 150, 105, 0.35);
  --emerald-glow:          rgba(5, 150, 105, 0.10);
}

/* ============================================================================
   BASE, TYPOGRAPHY & ATMOSPHERIC BACKGROUND ARCHITECTURE
   ============================================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-obsidian);
  color: var(--ink-primary);
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-obsidian);
  color: var(--ink-primary);
  overflow-x: hidden;
  /* Engineered multi-layer tactical atmosphere + subtle 48px coordinate grid */
  background-image:
    radial-gradient(circle at 18% 12%, var(--cyan-glow) 0%, transparent 38%),
    radial-gradient(circle at 82% 22%, var(--emerald-glow) 0%, transparent 36%),
    radial-gradient(circle at 50% 78%, rgba(245, 158, 11, 0.06) 0%, transparent 45%),
    linear-gradient(to right, rgba(148, 163, 184, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 48px 48px, 48px 48px;
  background-attachment: fixed;
}

.font-display,
.font-brand {
  font-family: 'Space Grotesk', system-ui, sans-serif;
}

.font-sans {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

.font-mono, code, pre, kbd, .tabular-nums {
  font-family: 'JetBrains Mono', 'IBM Plex Mono', monospace;
  font-variant-numeric: tabular-nums;
}

/* Shared Responsive Cockpit Container */
.cockpit-container {
  width: 100%;
  max-width: 80rem; /* 1280px */
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 640px) {
  .cockpit-container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}
@media (min-width: 1024px) {
  .cockpit-container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Non-blocking Fixed Ambient Background Layer */
.cockpit-bg-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.cockpit-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}

.cockpit-glow-orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(64px);
  pointer-events: none;
}

/* Keyboard Focus Ring (WCAG 2.2 AA) */
:focus-visible {
  outline: 2px solid var(--cyan-bright) !important;
  outline-offset: 2px !important;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 9999;
  background: var(--cyan-core);
  color: #03060C;
  font-family: monospace;
  font-size: 12px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}

/* ============================================================================
   MACHINED COCKPIT PANELS, EMBLEMS & BUTTONS
   ============================================================================ */

/* Top Tactical Telemetry Ribbon */
.tactical-ribbon {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 32px;
  padding: 0 12px;
  font-family: 'JetBrains Mono', 'IBM Plex Mono', monospace;
  font-size: 11px;
  z-index: 50;
  background: rgba(3, 6, 12, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-panel);
  display: flex;
  align-items: center;
}
[data-theme="light"] .tactical-ribbon {
  background: rgba(241, 245, 249, 0.96);
}

/* Glass-Machined Cockpit Navigation Bar */
.cockpit-nav {
  position: fixed;
  top: 32px;
  left: 0;
  width: 100%;
  z-index: 40;
  background: rgba(6, 11, 22, 0.90);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-panel);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}
[data-theme="light"] .cockpit-nav {
  background: rgba(255, 255, 255, 0.92);
}

/* Mobile Navigation Drawer */
.mobile-drawer {
  border-top: 1px solid var(--border-panel);
  background: rgba(4, 8, 17, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 1rem 0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
}
[data-theme="light"] .mobile-drawer {
  background: rgba(255, 255, 255, 0.98);
}

/* Centered Tactical Capsule Bar inside Navbar */
.nav-capsule {
  display: inline-flex;
  align-items: center;
  background: rgba(4, 8, 17, 0.85);
  border: 1px solid var(--border-panel);
  border-radius: 9999px;
  padding: 3px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
  flex-shrink: 1;
  min-width: 0;
}
[data-theme="light"] .nav-capsule {
  background: rgba(226, 232, 240, 0.85);
}

.nav-capsule-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@media (min-width: 1280px) {
  .nav-capsule-link {
    padding: 6px 13px;
    font-size: 12px;
  }
}
.nav-capsule-link:hover {
  color: var(--ink-primary);
  background: rgba(148, 163, 184, 0.12);
}
.nav-capsule-link[aria-current="page"],
.nav-capsule-link.active {
  color: var(--cyan-bright);
  background: var(--cyan-surface);
  border: 1px solid var(--cyan-border);
}
.nav-capsule-link.active-amber {
  color: var(--amber-bright);
  background: var(--amber-surface);
  border: 1px solid var(--amber-border);
}

/* Machined Cockpit Panel */
.cockpit-panel {
  background: linear-gradient(180deg, rgba(13, 22, 42, 0.82) 0%, rgba(6, 11, 23, 0.94) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-panel);
  border-radius: 16px;
  box-shadow: var(--panel-shadow);
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-theme="light"] .cockpit-panel {
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
}

.cockpit-panel-interactive:hover {
  border-color: var(--cyan-border);
  transform: translateY(-2px);
  box-shadow: 0 24px 48px -12px rgba(6, 182, 212, 0.16), inset 0 1px 0 0 rgba(255, 255, 255, 0.12);
}

.cockpit-panel-amber:hover {
  border-color: var(--amber-border);
  transform: translateY(-2px);
  box-shadow: 0 24px 48px -12px rgba(245, 158, 11, 0.16), inset 0 1px 0 0 rgba(255, 255, 255, 0.12);
}

/* Top Specular Accent Bar for Flagship Panels */
.panel-top-cyan::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan-core), var(--emerald-core), transparent);
}

.panel-top-amber::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--amber-core), var(--amber-bright), transparent);
}

/* Recessed Telemetry Console / Terminal Well */
.console-well {
  background-color: var(--bg-well);
  border: 1px solid var(--border-panel);
  border-radius: 12px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.65);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
[data-theme="light"] .console-well {
  box-shadow: inset 0 1px 4px rgba(15, 23, 42, 0.08);
}

/* Active Threat Burst State (Stage 02 Entropy Alert) */
.threat-burst-active {
  border-color: var(--crimson-border) !important;
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.18), inset 0 2px 8px rgba(0, 0, 0, 0.65) !important;
}

/* Orbital HUD Reticle Rings & 8K Product Emblem Mounts */
.orbital-ring {
  position: absolute;
  border-radius: 9999px;
  border-width: 1px;
  border-style: solid;
  pointer-events: none;
  animation: orbital-spin 32s linear infinite;
}
.orbital-ring.reverse {
  border-style: dashed;
  animation: orbital-spin-reverse 22s linear infinite;
}

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

.emblem-mount-cyan {
  border-radius: 2rem;
  overflow: hidden;
  box-shadow: 0 0 55px rgba(6, 182, 212, 0.28), 0 0 90px rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(6, 182, 212, 0.45);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.emblem-mount-cyan:hover {
  box-shadow: 0 0 70px rgba(6, 182, 212, 0.42), 0 0 110px rgba(16, 185, 129, 0.24);
  transform: scale(1.02);
}

.emblem-mount-amber {
  border-radius: 2rem;
  overflow: hidden;
  box-shadow: 0 0 55px rgba(245, 158, 11, 0.28), 0 0 90px rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.45);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.emblem-mount-amber:hover {
  box-shadow: 0 0 70px rgba(245, 158, 11, 0.44), 0 0 110px rgba(6, 182, 212, 0.22);
  transform: scale(1.02);
}

/* Crisp Headline Metallic/Tactical Text Treatments (No Purple Slop) */
.title-gradient-cyan {
  background: linear-gradient(135deg, #FFFFFF 0%, #67E8F9 55%, #34D399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="light"] .title-gradient-cyan {
  background: linear-gradient(135deg, #0F172A 0%, #0891B2 60%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.title-gradient-amber {
  background: linear-gradient(135deg, #FEF3C7 0%, #FBBF24 50%, #F59E0B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="light"] .title-gradient-amber {
  background: linear-gradient(135deg, #78350F 0%, #D97706 55%, #B45309 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Tactile Specular Cockpit Buttons */
.btn-cockpit-cyan {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  color: #03060C !important;
  background: linear-gradient(135deg, #22D3EE 0%, #10B981 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 25px -4px rgba(6, 182, 212, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-cockpit-cyan:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -4px rgba(16, 185, 129, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  filter: brightness(1.05);
}

.btn-cockpit-amber {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  color: #03060C !important;
  background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 8px 25px -4px rgba(245, 158, 11, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-cockpit-amber:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -4px rgba(245, 158, 11, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  filter: brightness(1.05);
}

/* Compact Navbar CTA Modifier */
.btn-nav-cta {
  min-height: 36px !important;
  padding: 6px 14px !important;
  font-size: 12px !important;
  border-radius: 10px !important;
  gap: 6px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.btn-cockpit-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-primary);
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-strong);
  box-shadow: var(--rim-highlight);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-theme="light"] .btn-cockpit-secondary {
  background: #FFFFFF;
}
.btn-cockpit-secondary:hover {
  border-color: var(--cyan-bright);
  background: rgba(15, 25, 48, 0.95);
  transform: translateY(-1px);
}
[data-theme="light"] .btn-cockpit-secondary:hover {
  background: #F1F5F9;
}

.btn-spec-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--ink-secondary);
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-panel);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
[data-theme="light"] .btn-spec-ghost {
  background: #FFFFFF;
}
.btn-spec-ghost:hover {
  color: var(--ink-primary);
  border-color: var(--cyan-border);
}

/* Tactical Status Badges & Pulsing Telemetry Dot */
.hud-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 9999px;
  font-family: 'JetBrains Mono', 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hud-badge-cyan {
  background: var(--cyan-surface);
  border: 1px solid var(--cyan-border);
  color: var(--cyan-bright);
}

.hud-badge-emerald {
  background: var(--emerald-surface);
  border: 1px solid var(--emerald-border);
  color: var(--emerald-bright);
}

.hud-badge-amber {
  background: var(--amber-surface);
  border: 1px solid var(--amber-border);
  color: var(--amber-bright);
}

.hud-badge-crimson {
  background: var(--crimson-surface);
  border: 1px solid var(--crimson-border);
  color: var(--crimson-bright);
}

.pulse-led {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background-color: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: tactical-pulse 2.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  flex-shrink: 0;
}

.pulse-led-cyan {
  color: var(--cyan-bright);
}
.pulse-led-amber {
  color: var(--amber-bright);
}
.pulse-led-emerald {
  color: var(--emerald-bright);
}
.pulse-led-danger {
  color: var(--crimson-bright);
}

@keyframes tactical-pulse {
  0%, 100% { opacity: 0.95; transform: scale(0.95); }
  50% { opacity: 0.45; transform: scale(1.15); }
}

kbd.hud-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  border-radius: 5px;
  font-family: 'JetBrains Mono', 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-strong);
  color: var(--cyan-bright);
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.5);
}
[data-theme="light"] kbd.hud-key {
  background: #F1F5F9;
  color: var(--cyan-core);
}

/* Segmented Cockpit Switcher */
.cockpit-tabs {
  display: flex;
  background: var(--bg-well);
  border: 1px solid var(--border-panel);
  border-radius: 10px;
  padding: 3px;
  gap: 4px;
}

.cockpit-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.cockpit-tab:hover:not([aria-selected="true"]) {
  color: var(--ink-primary);
  background: rgba(148, 163, 184, 0.08);
}
.cockpit-tab[aria-selected="true"],
.cockpit-tab.active-cyan {
  color: var(--cyan-bright);
  background: rgba(6, 182, 212, 0.14);
  border-color: var(--cyan-border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}
.cockpit-tab.active-amber {
  color: var(--amber-bright) !important;
  background: rgba(245, 158, 11, 0.14) !important;
  border-color: var(--amber-border) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

/* Range Scrubber */
input[type="range"].cockpit-scrubber {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  cursor: pointer;
}
input[type="range"].cockpit-scrubber::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--cyan-bright);
  border: 2px solid #03060C;
  box-shadow: 0 0 12px var(--cyan-core);
  cursor: ew-resize;
}

/* Modal & Toast */
.spec-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(3, 6, 12, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.spec-modal-backdrop[hidden] {
  display: none !important;
}

.spec-modal {
  width: 100%;
  max-width: 680px;
  padding: 1.5rem;
  background: #0A1122;
  border: 1px solid var(--cyan-border);
  border-radius: 16px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.85), 0 0 40px rgba(6, 182, 212, 0.15);
  color: var(--ink-primary);
}
[data-theme="light"] .spec-modal {
  background: #FFFFFF;
}

.spec-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 110;
  background: #0A1122;
  border: 1px solid var(--emerald-border);
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  color: var(--ink-primary);
  font-family: 'JetBrains Mono', 'IBM Plex Mono', monospace;
  font-size: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
[data-theme="light"] .spec-toast {
  background: #FFFFFF;
}
.spec-toast[hidden] {
  display: none !important;
}
.led-square {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--emerald-bright);
  box-shadow: 0 0 8px var(--emerald-core);
}

/* ============================================================================
   DAYLIGHT THEME ([data-theme="light"]) AUTOMATIC CONTRAST ADAPTATION
   Ensures Tailwind utility classes remain high-contrast in FIPS_PAPER mode
   ============================================================================ */
[data-theme="light"] .text-white {
  color: #0F172A !important;
}
[data-theme="light"] .text-slate-200,
[data-theme="light"] .text-slate-300 {
  color: #334155 !important;
}
[data-theme="light"] .text-slate-400 {
  color: #475569 !important;
}
[data-theme="light"] .text-cyan-300,
[data-theme="light"] .text-cyan-400 {
  color: #0E7490 !important;
}
[data-theme="light"] .text-amber-300,
[data-theme="light"] .text-amber-400 {
  color: #B45309 !important;
}
[data-theme="light"] .text-emerald-300,
[data-theme="light"] .text-emerald-400 {
  color: #047857 !important;
}
[data-theme="light"] .bg-slate-950,
[data-theme="light"] .bg-slate-950\/90,
[data-theme="light"] .bg-slate-950\/80,
[data-theme="light"] .bg-slate-900\/90,
[data-theme="light"] .bg-slate-900\/80,
[data-theme="light"] .bg-slate-900\/60,
[data-theme="light"] .bg-\[\#050A14\]\/75,
[data-theme="light"] .bg-\[\#050A14\]\/60,
[data-theme="light"] .bg-\[\#03060C\] {
  background-color: #F1F5F9 !important;
}
[data-theme="light"] .border-slate-800,
[data-theme="light"] .border-slate-800\/90,
[data-theme="light"] .border-slate-800\/80,
[data-theme="light"] .border-slate-700,
[data-theme="light"] .border-slate-700\/80 {
  border-color: rgba(15, 23, 42, 0.15) !important;
}

@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;
  }
}
