/* Alumungandr Unified Global Navigation & Footer System */
:root {
  --nav-bg: rgba(7, 8, 10, 0.94);
  --nav-border: 1px dashed rgba(255, 255, 255, 0.14);
  --nav-text: #f3f4f6;
  --nav-muted: #8b949e;
  --nav-accent: #38bdf8;
  --nav-coral: #de5849;
  --nav-emerald: #10b981;
  --nav-dropdown-bg: #0b0d14;
}

header.site-header {
  position: sticky !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 2500 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 0.85rem 2rem !important;
  border-bottom: var(--nav-border) !important;
  background: var(--nav-bg) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  height: auto !important;
}

header.site-header .brand {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  text-decoration: none !important;
  color: #fff !important;
  font-weight: 700 !important;
  letter-spacing: -0.5px !important;
  font-size: 1.1rem !important;
}

header.site-header .brand img {
  width: 28px !important;
  height: 28px !important;
  display: block !important;
}

header.site-header .brand-badge {
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 0.7rem !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  background: rgba(56, 189, 248, 0.15) !important;
  color: var(--nav-accent) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
}

nav.site-nav {
  display: flex !important;
  align-items: center !important;
  gap: 1.25rem !important;
  position: static !important;
  width: auto !important;
  height: auto !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}

nav.site-nav a.nav-item {
  color: var(--nav-muted) !important;
  text-decoration: none !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  transition: color 0.2s !important;
  white-space: nowrap !important;
  padding: 0.25rem 0.5rem !important;
  border: none !important;
  background: transparent !important;
}

nav.site-nav a.nav-item:hover,
nav.site-nav a.nav-item.active {
  color: #fff !important;
}

/* Dropdown Menu */
.nav-dropdown {
  position: relative !important;
}

.dropdown-trigger {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: var(--nav-text) !important;
  font-family: inherit !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  padding: 0.35rem 0.75rem !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  transition: all 0.2s !important;
}

.dropdown-trigger:hover,
.nav-dropdown:hover .dropdown-trigger,
.nav-dropdown:focus-within .dropdown-trigger {
  background: rgba(56, 189, 248, 0.15) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
  color: var(--nav-accent) !important;
}

.dropdown-panel {
  position: absolute !important;
  top: 100% !important;
  right: 0 !important;
  margin-top: 0.5rem !important;
  width: 740px !important;
  background: #0b0d14 !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 12px !important;
  padding: 1.5rem !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.95) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  display: none;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 1.5rem !important;
  z-index: 3000 !important;
  box-sizing: border-box !important;
  opacity: 1 !important;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
  display: grid !important;
}

.dropdown-col {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.5rem !important;
}

.dropdown-header {
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  color: var(--nav-accent) !important;
  letter-spacing: 0.05em !important;
  padding-bottom: 0.35rem !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  margin-bottom: 0.25rem !important;
  text-transform: uppercase !important;
}

.dropdown-col a {
  color: var(--nav-muted) !important;
  text-decoration: none !important;
  font-size: 0.8rem !important;
  padding: 0.25rem 0.4rem !important;
  border-radius: 4px !important;
  transition: all 0.15s !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
  white-space: nowrap !important;
  border: none !important;
  background: transparent !important;
}

.dropdown-col a:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

/* Site Footer */
footer.site-footer {
  position: relative !important;
  z-index: 10 !important;
  width: 100% !important;
  display: block !important;
  border-top: var(--nav-border) !important;
  background: rgba(7, 8, 10, 0.95) !important;
  padding: 3.5rem 2rem 2.5rem !important;
  color: var(--nav-muted) !important;
  font-size: 0.85rem !important;
  margin-top: auto !important;
  box-sizing: border-box !important;
}

.footer-container {
  max-width: 1280px !important;
  margin: 0 auto !important;
  display: grid !important;
  grid-template-columns: 1.4fr repeat(4, 1fr) !important;
  gap: 2rem !important;
  box-sizing: border-box !important;
}

.footer-col {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.6rem !important;
}

.footer-brand {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 1.05rem !important;
  margin-bottom: 0.25rem !important;
}

.footer-desc {
  font-size: 0.8rem !important;
  line-height: 1.5 !important;
  color: var(--nav-muted) !important;
  margin-bottom: 0.5rem !important;
}

.footer-copy {
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 0.72rem !important;
  color: #64748b !important;
}

.footer-heading {
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  color: #fff !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  margin-bottom: 0.4rem !important;
}

.footer-col a {
  color: var(--nav-muted) !important;
  text-decoration: none !important;
  font-size: 0.8rem !important;
  transition: color 0.15s !important;
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
}

.footer-col a:hover {
  color: #fff !important;
}

/* Responsive */
@media (max-width: 1024px) {
  .dropdown-panel {
    width: 580px !important;
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .footer-container {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 768px) {
  header.site-header {
    padding: 0.85rem 1rem !important;
    flex-wrap: wrap !important;
    gap: 0.75rem !important;
  }
  .dropdown-panel {
    position: fixed !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
    border-radius: 16px 16px 0 0 !important;
    grid-template-columns: 1fr !important;
    padding: 1.25rem !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .footer-container {
    grid-template-columns: 1fr !important;
  }
}

/* ==========================================================================
   UNIVERSAL TOUCH & MOBILE INTERACTION ENGINE (APPLIED GLOBALLY)
   ========================================================================== */
a, button, input, select, textarea, [role="button"], .clickable, 
.ticket-badge, .drawer-link, .nav-item, .dropdown-trigger, .matrix-card-flip-wrap {
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: rgba(56, 189, 248, 0.2) !important;
}

button, .dropdown-trigger, .btn-ticket-action, .drawer-link {
  min-height: 44px;
}

/* Universal Outside-Tap Backdrop Overlay for Menus */
.drawer-backdrop, .global-menu-backdrop {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.72) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  z-index: 990 !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease !important;
  cursor: pointer !important;
  touch-action: manipulation !important;
}

.drawer-backdrop.active, .global-menu-backdrop.active {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}

/* Touch Device Optimization: prevent sticky hover states */
@media (hover: none) {
  .btn-ticket-action:hover, .drawer-link:hover, .nav-item:hover {
    transform: none !important;
  }
}

/* ==========================================================================
   MOBILE SCREEN AUTO-DETECTION: CSS CONTAIN: PAINT & WILL-CHANGE
   (Strictly active on mobile screens: max-width: 767px)
   ========================================================================== */
@media (max-width: 767px) {
  /* Enforce paint containment and GPU compositor promotion:
     Only the touched card is repainted, preventing costly whole-screen reflow/rasterization */
  .matrix-card-flip-wrap,
  .matrix-flip-card,
  .card-face,
  .app-card,
  .app-card-3d,
  .qa-card-minimal,
  .tool-card,
  .tool-panel,
  .workbench-card,
  .canvas-container,
  .tool-box,
  .generator-card,
  .card,
  .stat-card,
  .pricing-card,
  .faq-card,
  .contact-card,
  .feature-card,
  .stage-item,
  .stage-body,
  .resizer-card,
  .palette-card,
  .contrast-card,
  .diff-box,
  .vault-card,
  .sub-card,
  .setting-card,
  .preview-card,
  .editor-pane,
  .matrix-item,
  .telemetry-metric,
  .ip-card,
  .call-panel,
  .capsule-card {
    contain: layout paint style !important;
    will-change: transform !important;
    transform: translateZ(0);
  }

  /* Disable heavy continuous floating keyframe thrashing & ambient shadow glows on mobile */
  .matrix-card-flip-wrap {
    animation: none !important;
  }
  .matrix-card-flip-wrap::after {
    display: none !important;
    animation: none !important;
  }
  .app-card-3d:hover {
    transform: none !important;
  }
  .card-face {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Prevent background canvases from blocking or competing with mobile touch threads */
  #bg-canvas,
  #spaceCanvas,
  #holoCanvas,
  #matrixCanvas,
  #crystalCanvas,
  #glacialCanvas,
  #latticeCanvas,
  #telemetryCanvas,
  #wireframeCanvas,
  #shockwaveCanvas,
  #hexCanvas,
  #sealCanvas {
    pointer-events: none !important;
    will-change: transform !important;
    contain: strict !important;
  }
}

/* ==========================================================================
   GLOBAL 3-STAGE THEME TOGGLE (Segmented Pill Slider)
   ========================================================================== */
.theme-toggle-wrap {
  display: inline-flex !important;
  align-items: center !important;
  position: relative !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 24px !important;
  padding: 3px !important;
  gap: 2px !important;
  box-sizing: border-box !important;
  user-select: none !important;
  margin: 0 0.5rem !important;
  flex-shrink: 0 !important;
}

.theme-toggle-btn {
  position: relative !important;
  z-index: 2 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 20px !important;
  padding: 5px 9px !important;
  font-family: 'JetBrains Mono', -apple-system, sans-serif !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  color: var(--nav-muted) !important;
  cursor: pointer !important;
  transition: color 0.2s ease, transform 0.15s ease !important;
  min-height: 32px !important;
  min-width: 34px !important;
  white-space: nowrap !important;
  outline: none !important;
  touch-action: manipulation !important;
}

.theme-toggle-btn:hover {
  color: #ffffff !important;
}

.theme-toggle-btn.active {
  color: #ffffff !important;
}

.theme-toggle-btn .theme-icon {
  font-size: 0.95rem !important;
  display: inline-block !important;
  line-height: 1 !important;
}

.theme-toggle-btn .theme-label {
  display: none !important;
}

.theme-slider-thumb {
  position: absolute !important;
  top: 3px !important;
  bottom: 3px !important;
  left: 0 !important;
  border-radius: 20px !important;
  background: rgba(255, 255, 255, 0.16) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), width 0.25s cubic-bezier(0.4, 0, 0.2, 1), background 0.25s ease !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

@media (max-width: 768px) {
  .theme-toggle-wrap {
    margin: 0 !important;
    padding: 2px !important;
  }
  .theme-toggle-btn {
    padding: 6px 9px !important;
    min-height: 40px !important;
    min-width: 36px !important;
  }
  .theme-toggle-btn .theme-label {
    display: none !important;
  }
}

/* ==========================================================================
   STAGE 2: PAPER MONOCHROME & NEGATIVE SHADOWS (Drafting / High Daylight)
   ========================================================================== */
html[data-theme="paper"],
html[data-theme="paper"] body {
  background: #f8f9fa !important;
  color: #0b0f19 !important;
}

html[data-theme="paper"] {
  --nav-bg: rgba(248, 249, 250, 0.96);
  --nav-border: 1px solid rgba(15, 23, 42, 0.14);
  --nav-text: #0b0f19;
  --nav-muted: #4b5563;
  --nav-accent: #0284c7;
  --nav-coral: #dc2626;
  --nav-emerald: #059669;
  --nav-dropdown-bg: rgba(255, 255, 255, 0.98);

  /* Global tokens matching Stage 2: Paper Monochrome & Negative */
  --bg-dark: #f8f9fa !important;
  --bg-surface: #ffffff !important;
  --bg-surface-elevated: #f1f5f9 !important;
  --bg-studio: #ffffff !important;
  --border-dashed: 1px dashed rgba(15, 23, 42, 0.18) !important;
  --border-solid: 1px solid rgba(15, 23, 42, 0.12) !important;
  --text-primary: #0b0f19 !important;
  --text-secondary: #374151 !important;
  --text-muted: #6b7280 !important;
  --accent-coral: #dc2626 !important;
  --accent-coral-bright: #ef4444 !important;
  --accent-coral-glow: rgba(220, 38, 38, 0.2) !important;

  /* Speed test & Tool tokens */
  --bg-card: #ffffff !important;
  --bg-card-border: rgba(15, 23, 42, 0.14) !important;
  --bg-card-hover: #f8fafc !important;
  --text-main: #0b0f19 !important;
  --text-bright: #000000 !important;
  --text-subtle: #4b5563 !important;
}

.drawer-menu .theme-toggle-wrap {
  margin: 0 !important;
}

html[data-theme="paper"] .header-nav-wrap {
  background: rgba(248, 249, 250, 0.94) !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05) !important;
}

html[data-theme="paper"] .header-tagline {
  background: rgba(255, 255, 255, 0.8) !important;
  color: #0b0f19 !important;
  border-color: #d1d5db !important;
}

html[data-theme="paper"] .btn-ticket-action {
  background: #ffffff !important;
  color: #0b0f19 !important;
  border-color: #d1d5db !important;
}

html[data-theme="paper"] .btn-ticket-action:hover {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
}

html[data-theme="paper"] .bg-grid {
  background-image: 
    linear-gradient(to right, rgba(0, 0, 0, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 1px, transparent 1px) !important;
}

html[data-theme="paper"] .theme-toggle-wrap {
  background: #e5e7eb !important;
  border-color: #d1d5db !important;
}

html[data-theme="paper"] .theme-toggle-btn {
  color: #4b5563 !important;
}

html[data-theme="paper"] .theme-toggle-btn:hover,
html[data-theme="paper"] .theme-toggle-btn.active {
  color: #0b0f19 !important;
}

html[data-theme="paper"] .theme-slider-thumb {
  background: #ffffff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

html[data-theme="paper"] header.site-header {
  background: rgba(248, 249, 250, 0.96) !important;
  border-bottom: 1px solid #e5e7eb !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05) !important;
}

html[data-theme="paper"] header.site-header .brand {
  color: #0b0f19 !important;
}

html[data-theme="paper"] header.site-header .brand img {
  filter: none !important;
}

html[data-theme="paper"] header.site-header .brand-badge {
  background: #e0f2fe !important;
  color: #0284c7 !important;
  border-color: #bae6fd !important;
}

html[data-theme="paper"] nav.site-nav a.nav-item {
  color: #4b5563 !important;
}

html[data-theme="paper"] nav.site-nav a.nav-item:hover,
html[data-theme="paper"] nav.site-nav a.nav-item.active {
  color: #0b0f19 !important;
}

html[data-theme="paper"] .dropdown-trigger {
  background: #f3f4f6 !important;
  border-color: #d1d5db !important;
  color: #111827 !important;
}

html[data-theme="paper"] .dropdown-trigger:hover,
html[data-theme="paper"] .nav-dropdown:hover .dropdown-trigger {
  background: #e0f2fe !important;
  border-color: #bae6fd !important;
  color: #0284c7 !important;
}

html[data-theme="paper"] .dropdown-panel {
  background: #ffffff !important;
  border: 1px solid #d1d5db !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.14) !important;
}

html[data-theme="paper"] .dropdown-header {
  color: #0284c7 !important;
  border-bottom-color: #e5e7eb !important;
}

html[data-theme="paper"] .dropdown-col a {
  color: #4b5563 !important;
}

html[data-theme="paper"] .dropdown-col a:hover {
  color: #0b0f19 !important;
  background: #f3f4f6 !important;
}

html[data-theme="paper"] footer.site-footer {
  background: #f3f4f6 !important;
  border-top: 1px solid #e5e7eb !important;
  color: #4b5563 !important;
}

html[data-theme="paper"] footer.site-footer .footer-brand,
html[data-theme="paper"] footer.site-footer .footer-heading {
  color: #0b0f19 !important;
}

html[data-theme="paper"] footer.site-footer a {
  color: #4b5563 !important;
}

html[data-theme="paper"] footer.site-footer a:hover {
  color: #0b0f19 !important;
}

/* Paper Theme Global Card & Component Inversion */
html[data-theme="paper"] .matrix-card-flip-wrap .card-face,
html[data-theme="paper"] .matrix-flip-card,
html[data-theme="paper"] .app-card,
html[data-theme="paper"] .app-card-3d,
html[data-theme="paper"] .app-card-inner,
html[data-theme="paper"] .qa-card-minimal,
html[data-theme="paper"] .tool-card,
html[data-theme="paper"] .tool-panel,
html[data-theme="paper"] .workbench-card,
html[data-theme="paper"] .tool-box,
html[data-theme="paper"] .generator-card,
html[data-theme="paper"] .card,
html[data-theme="paper"] .stat-card,
html[data-theme="paper"] .pricing-card,
html[data-theme="paper"] .faq-card,
html[data-theme="paper"] .contact-card,
html[data-theme="paper"] .feature-card,
html[data-theme="paper"] .stage-item,
html[data-theme="paper"] .stage-body,
html[data-theme="paper"] .resizer-card,
html[data-theme="paper"] .palette-card,
html[data-theme="paper"] .contrast-card,
html[data-theme="paper"] .diff-box,
html[data-theme="paper"] .vault-card,
html[data-theme="paper"] .sub-card,
html[data-theme="paper"] .setting-card,
html[data-theme="paper"] .preview-card,
html[data-theme="paper"] .editor-pane,
html[data-theme="paper"] .modal-box,
html[data-theme="paper"] .drawer-menu,
html[data-theme="paper"] .telemetry-metric,
html[data-theme="paper"] .ip-card,
html[data-theme="paper"] .call-panel,
html[data-theme="paper"] .capsule-card {
  background: #ffffff !important;
  border-color: #d1d5db !important;
  color: #0b0f19 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

html[data-theme="paper"] h1,
html[data-theme="paper"] h2,
html[data-theme="paper"] h3,
html[data-theme="paper"] h4,
html[data-theme="paper"] h5,
html[data-theme="paper"] h6,
html[data-theme="paper"] .hero-title,
html[data-theme="paper"] .card-title,
html[data-theme="paper"] .section-title {
  color: #0b0f19 !important;
  -webkit-text-fill-color: #0b0f19 !important;
  background: none !important;
}

html[data-theme="paper"] p,
html[data-theme="paper"] .hero-lead,
html[data-theme="paper"] .card-desc,
html[data-theme="paper"] .text-muted,
html[data-theme="paper"] .nav-sub {
  color: #4b5563 !important;
}

html[data-theme="paper"] input,
html[data-theme="paper"] textarea,
html[data-theme="paper"] select {
  background: #ffffff !important;
  color: #0b0f19 !important;
  border-color: #d1d5db !important;
}

html[data-theme="paper"] pre,
html[data-theme="paper"] code {
  background: #f3f4f6 !important;
  color: #0b0f19 !important;
  border-color: #e5e7eb !important;
}

html[data-theme="paper"] .matrix-hero {
  border-bottom-color: #e5e7eb !important;
}

html[data-theme="paper"] .banner-tag,
html[data-theme="paper"] .badge-primary {
  background: #e0f2fe !important;
  color: #0369a1 !important;
  border-color: #bae6fd !important;
}

html[data-theme="paper"] #bg-canvas,
html[data-theme="paper"] #spaceCanvas,
html[data-theme="paper"] #crystalCanvas,
html[data-theme="paper"] #latticeCanvas,
html[data-theme="paper"] #hexCanvas,
html[data-theme="paper"] #glacialCanvas {
  filter: invert(0.95) contrast(1.2) opacity(0.35);
}

html[data-theme="paper"] #heroWaveCanvas {
  filter: none !important;
  opacity: 1 !important;
}

/* Paper Theme Specific Card & Component Deep Styling */
html[data-theme="paper"] .matrix-title,
html[data-theme="paper"] .matrix-card-title,
html[data-theme="paper"] .app-card-title,
html[data-theme="paper"] .qa-title,
html[data-theme="paper"] .section-heading-huge,
html[data-theme="paper"] .hero-heading,
html[data-theme="paper"] .brand-name {
  color: #0b0f19 !important;
}

html[data-theme="paper"] .matrix-body,
html[data-theme="paper"] .matrix-card-desc,
html[data-theme="paper"] .app-card-desc,
html[data-theme="paper"] .qa-desc,
html[data-theme="paper"] .section-desc,
html[data-theme="paper"] .layman-explanation-text {
  color: #374151 !important;
}

html[data-theme="paper"] .matrix-citation {
  background: #f3f4f6 !important;
  color: #4b5563 !important;
  border: 1px solid #e5e7eb !important;
}

html[data-theme="paper"] .matrix-recommendation {
  background: #ecfdf5 !important;
  border: 1px solid #a7f3d0 !important;
  color: #065f46 !important;
}

html[data-theme="paper"] .layman-analogy-box {
  background: #f0fdf4 !important;
  border: 1px solid #bbf7d0 !important;
  color: #166534 !important;
}

html[data-theme="paper"] .layman-takeaway-box {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

html[data-theme="paper"] .flip-hint-strip {
  color: #6b7280 !important;
  border-top: 1px solid #e5e7eb !important;
}

html[data-theme="paper"] .ai-tab {
  background: #ffffff !important;
  border-color: #d1d5db !important;
  color: #4b5563 !important;
}

html[data-theme="paper"] .ai-tab.active {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
}

html[data-theme="paper"] .obs-status-bar {
  background: #ffffff !important;
  border: 1px solid #d1d5db !important;
  color: #111827 !important;
}

html[data-theme="paper"] .card-visual-banner {
  background: #f3f4f6 !important;
  border-radius: 8px !important;
}

html[data-theme="paper"] .card-visual-banner svg {
  filter: invert(0.92) hue-rotate(180deg) brightness(0.65) contrast(1.3);
}

html[data-theme="paper"] .qa-terminal-box,
html[data-theme="paper"] .qa-bubble,
html[data-theme="paper"] .qa-card-minimal {
  background: #ffffff !important;
  border-color: #d1d5db !important;
  color: #0b0f19 !important;
}

html[data-theme="paper"] .ticker-track {
  background: #e5e7eb !important;
  border-color: #d1d5db !important;
  color: #374151 !important;
}

html[data-theme="paper"] .ticker-item {
  color: #4b5563 !important;
}

/* ==========================================================================
   PAPER THEME: STUDIO, WORKBENCH & INVOICE SUITE (High Daylight Cohesion)
   ========================================================================== */
html[data-theme="paper"] .studio-container {
  background: #f8f9fa !important;
}

html[data-theme="paper"] .editor-pane {
  background: #f8f9fa !important;
  border-right: 1px solid #d1d5db !important;
}

html[data-theme="paper"] .preview-pane {
  background: #e2e8f0 !important;
  background-image: radial-gradient(circle, rgba(15, 23, 42, 0.09) 1px, transparent 1px) !important;
  background-size: 20px 20px !important;
}

html[data-theme="paper"] .invoice-sheet {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

html[data-theme="paper"] .form-section {
  background: #ffffff !important;
  border: 1px solid #d1d5db !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04) !important;
  color: #0b0f19 !important;
}

html[data-theme="paper"] .form-section.highlight-glow {
  border-color: #93c5fd !important;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.08) !important;
}

html[data-theme="paper"] .section-title {
  color: #0b0f19 !important;
  font-weight: 800 !important;
}

html[data-theme="paper"] .section-tag {
  color: #0284c7 !important;
}

html[data-theme="paper"] .field-label {
  color: #374151 !important;
  font-weight: 700 !important;
}

html[data-theme="paper"] .toggle-title {
  color: #0b0f19 !important;
}

html[data-theme="paper"] .toggle-sub {
  color: #6b7280 !important;
}

html[data-theme="paper"] .type-switcher {
  background: #f1f5f9 !important;
  border: 1px solid #d1d5db !important;
}

html[data-theme="paper"] .type-btn {
  color: #4b5563 !important;
}

html[data-theme="paper"] .type-btn.active {
  background: #0284c7 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3) !important;
}

html[data-theme="paper"] .styling-bar {
  background: #ffffff !important;
  border: 1px solid #d1d5db !important;
}

html[data-theme="paper"] .color-picker-wrap {
  color: #374151 !important;
}

html[data-theme="paper"] .currency-select {
  background: #ffffff !important;
  color: #0b0f19 !important;
  border: 1px solid #d1d5db !important;
}

html[data-theme="paper"] .btn-quick {
  background: #f8fafc !important;
  color: #374151 !important;
  border: 1px solid #d1d5db !important;
}

html[data-theme="paper"] .btn-quick:hover {
  background: #f1f5f9 !important;
  color: #0b0f19 !important;
}

html[data-theme="paper"] .btn-quick.highlight-autofill {
  background: #e0f2fe !important;
  border-color: #bae6fd !important;
  color: #0284c7 !important;
}

html[data-theme="paper"] .btn-quick.highlight-wa {
  background: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
  color: #065f46 !important;
}

html[data-theme="paper"] .client-vault-bar {
  background: #f0f9ff !important;
  border: 1px dashed #7dd3fc !important;
}

html[data-theme="paper"] .client-vault-select {
  background: #ffffff !important;
  color: #0b0f19 !important;
  border: 1px solid #cbd5e1 !important;
}

html[data-theme="paper"] .btn-vault-action {
  background: #e0f2fe !important;
  color: #0284c7 !important;
  border: 1px solid #bae6fd !important;
}

html[data-theme="paper"] .trade-tab-pill {
  background: #ffffff !important;
  border: 1px solid #d1d5db !important;
  color: #4b5563 !important;
}

html[data-theme="paper"] .trade-tab-pill.active {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
}

html[data-theme="paper"] .trade-item-chip {
  background: #ffffff !important;
  border: 1px solid #d1d5db !important;
  color: #374151 !important;
}

html[data-theme="paper"] .btn-add-item {
  background: #f0f9ff !important;
  border: 1px dashed #7dd3fc !important;
  color: #0284c7 !important;
}

html[data-theme="paper"] .btn-save-catalog {
  background: #ecfdf5 !important;
  border: 1px dashed #a7f3d0 !important;
  color: #065f46 !important;
}

html[data-theme="paper"] .btn-pill-term {
  background: #ffffff !important;
  border: 1px solid #d1d5db !important;
  color: #374151 !important;
}

html[data-theme="paper"] #depositLockDisplay {
  background: #f0fdf4 !important;
  color: #166534 !important;
  border: 1px solid #86efac !important;
}

html[data-theme="paper"] .line-items-header {
  color: #4b5563 !important;
}

html[data-theme="paper"] .line-item-total {
  color: #0b0f19 !important;
}

html[data-theme="paper"] .line-item-row div {
  color: #0b0f19 !important;
}

html[data-theme="paper"] .slider-ui {
  background-color: #d1d5db !important;
}

html[data-theme="paper"] input:checked + .slider-ui {
  background-color: #0284c7 !important;
}

html[data-theme="paper"] .hero-banner {
  background: #f1f5f9 !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

html[data-theme="paper"] .hero-text h1 {
  color: #0b0f19 !important;
}

html[data-theme="paper"] .hero-text p {
  color: #4b5563 !important;
}

html[data-theme="paper"] .badge-pill {
  background: #ffffff !important;
  border: 1px solid #d1d5db !important;
  color: #374151 !important;
}

html[data-theme="paper"] .badge-pill.highlight {
  background: #e0f2fe !important;
  border-color: #bae6fd !important;
  color: #0284c7 !important;
}

html[data-theme="paper"] .hero-tag {
  background: #e0f2fe !important;
  border-color: #bae6fd !important;
  color: #0284c7 !important;
}

html[data-theme="paper"] .overdue-simulator-box {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

html[data-theme="paper"] #lateFeeStatusBadge {
  background: #ecfdf5 !important;
  border: 1px solid #a7f3d0 !important;
  color: #065f46 !important;
}

html[data-theme="paper"] .mobile-tab-switch {
  background: #f8f9fa !important;
  border-bottom: 1px solid #d1d5db !important;
}

html[data-theme="paper"] .mobile-tab-btn {
  background: #ffffff !important;
  border: 1px solid #d1d5db !important;
  color: #4b5563 !important;
}

html[data-theme="paper"] .mobile-tab-btn.active {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
}

html[data-theme="paper"] .modal-card {
  background: #ffffff !important;
  border: 1px solid #d1d5db !important;
  color: #0b0f19 !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2) !important;
}

html[data-theme="paper"] .modal-header {
  border-bottom: 1px solid #e5e7eb !important;
}

html[data-theme="paper"] .modal-header h3 {
  color: #0b0f19 !important;
}

html[data-theme="paper"] .modal-close {
  color: #4b5563 !important;
}

html[data-theme="paper"] .canvas-viewport {
  background: #e5e7eb !important;
  border-color: #d1d5db !important;
}

html[data-theme="paper"] .vault-bar {
  background: #f1f5f9 !important;
  border-bottom: 1px solid #d1d5db !important;
}

html[data-theme="paper"] .doc-select {
  background: #ffffff !important;
  color: #0b0f19 !important;
  border-color: #d1d5db !important;
}

html[data-theme="paper"] .md-textarea {
  color: #0b0f19 !important;
}

html[data-theme="paper"] .preview-content {
  color: #0b0f19 !important;
}

html[data-theme="paper"] .draw-toolbar {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid #d1d5db !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

html[data-theme="paper"] .draw-tool-btn {
  color: #374151 !important;
}

html[data-theme="paper"] .draw-tool-btn.active {
  background: #e0f2fe !important;
  color: #0284c7 !important;
}

/* ==========================================================================
   STAGE 3: TELEMETRY AMBER / PHOSPHOR GOLD (Aerospace Cockpit HUD)
   ========================================================================== */
html[data-theme="amber"],
html[data-theme="amber"] body {
  background: #090806 !important;
  color: #fef3c7 !important;
}

html[data-theme="amber"] {
  --nav-bg: rgba(9, 8, 6, 0.96);
  --nav-border: 1px dashed rgba(245, 158, 11, 0.25);
  --nav-text: #fef3c7;
  --nav-muted: #b48c58;
  --nav-accent: #f59e0b;
  --nav-coral: #ea580c;
  --nav-emerald: #10b981;
  --nav-dropdown-bg: rgba(16, 14, 10, 0.98);

  /* Global tokens matching Stage 3: Telemetry Amber / Phosphor Gold */
  --bg-dark: #090806 !important;
  --bg-surface: #120f0a !important;
  --bg-surface-elevated: #1a150e !important;
  --bg-studio: #100d08 !important;
  --border-dashed: 1px dashed rgba(245, 158, 11, 0.25) !important;
  --border-solid: 1px solid rgba(245, 158, 11, 0.2) !important;
  --text-primary: #fef3c7 !important;
  --text-secondary: #fde68a !important;
  --text-muted: #b48c58 !important;
  --accent-coral: #f59e0b !important;
  --accent-coral-bright: #fbbf24 !important;
  --accent-coral-glow: rgba(245, 158, 11, 0.3) !important;

  /* Speed test & Tool tokens */
  --bg-card: rgba(18, 15, 10, 0.92) !important;
  --bg-card-border: rgba(245, 158, 11, 0.25) !important;
  --bg-card-hover: rgba(26, 21, 14, 0.98) !important;
  --text-main: #fef3c7 !important;
  --text-bright: #ffffff !important;
  --text-subtle: #d97706 !important;
}

html[data-theme="amber"] .header-nav-wrap {
  background: rgba(9, 8, 6, 0.94) !important;
  border-bottom: 1px dashed rgba(245, 158, 11, 0.25) !important;
}

html[data-theme="amber"] .header-tagline {
  background: rgba(20, 16, 10, 0.8) !important;
  color: #fef3c7 !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
}

html[data-theme="amber"] .ticket-badge {
  background: #f59e0b !important;
  color: #090806 !important;
}

html[data-theme="amber"] .btn-ticket-action {
  background: #14110b !important;
  color: #fef3c7 !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
}

html[data-theme="amber"] .btn-ticket-action:hover {
  background: rgba(245, 158, 11, 0.25) !important;
  color: #fbbf24 !important;
  border-color: #f59e0b !important;
}

html[data-theme="amber"] .bg-grid {
  background-image: 
    linear-gradient(to right, rgba(245, 158, 11, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(245, 158, 11, 0.05) 1px, transparent 1px) !important;
}

html[data-theme="amber"] .theme-toggle-wrap {
  background: rgba(245, 158, 11, 0.08) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
}

html[data-theme="amber"] .theme-toggle-btn {
  color: #b48c58 !important;
}

html[data-theme="amber"] .theme-toggle-btn:hover,
html[data-theme="amber"] .theme-toggle-btn.active {
  color: #f59e0b !important;
}

html[data-theme="amber"] .theme-slider-thumb {
  background: rgba(245, 158, 11, 0.2) !important;
  border: 1px solid rgba(245, 158, 11, 0.45) !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.25) !important;
}

html[data-theme="amber"] header.site-header {
  background: rgba(9, 8, 6, 0.96) !important;
  border-bottom: 1px dashed rgba(245, 158, 11, 0.25) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6) !important;
}

html[data-theme="amber"] header.site-header .brand {
  color: #fef3c7 !important;
}

html[data-theme="amber"] header.site-header .brand img {
  filter: sepia(1) saturate(3) hue-rotate(5deg) brightness(1.1) !important;
}

html[data-theme="amber"] header.site-header .brand-badge {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #f59e0b !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
}

html[data-theme="amber"] nav.site-nav a.nav-item {
  color: #b48c58 !important;
}

html[data-theme="amber"] nav.site-nav a.nav-item:hover,
html[data-theme="amber"] nav.site-nav a.nav-item.active {
  color: #fef3c7 !important;
}

html[data-theme="amber"] .dropdown-trigger {
  background: rgba(245, 158, 11, 0.08) !important;
  border-color: rgba(245, 158, 11, 0.25) !important;
  color: #fef3c7 !important;
}

html[data-theme="amber"] .dropdown-trigger:hover,
html[data-theme="amber"] .nav-dropdown:hover .dropdown-trigger {
  background: rgba(245, 158, 11, 0.18) !important;
  border-color: rgba(245, 158, 11, 0.45) !important;
  color: #fbbf24 !important;
}

html[data-theme="amber"] .dropdown-panel {
  background: #120f0a !important;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.9), 0 0 20px rgba(245, 158, 11, 0.08) !important;
}

html[data-theme="amber"] .dropdown-header {
  color: #f59e0b !important;
  border-bottom-color: rgba(245, 158, 11, 0.15) !important;
}

html[data-theme="amber"] .dropdown-col a {
  color: #b48c58 !important;
}

html[data-theme="amber"] .dropdown-col a:hover {
  color: #fef3c7 !important;
  background: rgba(245, 158, 11, 0.12) !important;
}

html[data-theme="amber"] footer.site-footer {
  background: rgba(9, 8, 6, 0.98) !important;
  border-top: 1px dashed rgba(245, 158, 11, 0.25) !important;
  color: #b48c58 !important;
}

html[data-theme="amber"] footer.site-footer .footer-brand,
html[data-theme="amber"] footer.site-footer .footer-heading {
  color: #fef3c7 !important;
}

html[data-theme="amber"] footer.site-footer a {
  color: #b48c58 !important;
}

html[data-theme="amber"] footer.site-footer a:hover {
  color: #f59e0b !important;
}

/* Amber Theme Global Card & Component Styling */
html[data-theme="amber"] .matrix-card-flip-wrap .card-face,
html[data-theme="amber"] .matrix-flip-card,
html[data-theme="amber"] .app-card,
html[data-theme="amber"] .app-card-3d,
html[data-theme="amber"] .app-card-inner,
html[data-theme="amber"] .qa-card-minimal,
html[data-theme="amber"] .tool-card,
html[data-theme="amber"] .tool-panel,
html[data-theme="amber"] .workbench-card,
html[data-theme="amber"] .tool-box,
html[data-theme="amber"] .generator-card,
html[data-theme="amber"] .card,
html[data-theme="amber"] .stat-card,
html[data-theme="amber"] .pricing-card,
html[data-theme="amber"] .faq-card,
html[data-theme="amber"] .contact-card,
html[data-theme="amber"] .feature-card,
html[data-theme="amber"] .stage-item,
html[data-theme="amber"] .stage-body,
html[data-theme="amber"] .resizer-card,
html[data-theme="amber"] .palette-card,
html[data-theme="amber"] .contrast-card,
html[data-theme="amber"] .diff-box,
html[data-theme="amber"] .vault-card,
html[data-theme="amber"] .sub-card,
html[data-theme="amber"] .setting-card,
html[data-theme="amber"] .preview-card,
html[data-theme="amber"] .editor-pane,
html[data-theme="amber"] .modal-box,
html[data-theme="amber"] .drawer-menu,
html[data-theme="amber"] .telemetry-metric,
html[data-theme="amber"] .ip-card,
html[data-theme="amber"] .call-panel,
html[data-theme="amber"] .capsule-card {
  background: #120f0a !important;
  border-color: rgba(245, 158, 11, 0.22) !important;
  color: #fef3c7 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(245, 158, 11, 0.05) !important;
}

html[data-theme="amber"] h1,
html[data-theme="amber"] h2,
html[data-theme="amber"] h3,
html[data-theme="amber"] h4,
html[data-theme="amber"] h5,
html[data-theme="amber"] h6,
html[data-theme="amber"] .hero-title,
html[data-theme="amber"] .card-title,
html[data-theme="amber"] .section-title,
html[data-theme="amber"] .matrix-title,
html[data-theme="amber"] .matrix-card-title,
html[data-theme="amber"] .app-card-title,
html[data-theme="amber"] .section-heading-huge {
  color: #fef3c7 !important;
  -webkit-text-fill-color: #fef3c7 !important;
  background: none !important;
}

html[data-theme="amber"] p,
html[data-theme="amber"] .hero-lead,
html[data-theme="amber"] .card-desc,
html[data-theme="amber"] .text-muted,
html[data-theme="amber"] .nav-sub,
html[data-theme="amber"] .matrix-body,
html[data-theme="amber"] .matrix-card-desc,
html[data-theme="amber"] .app-card-desc,
html[data-theme="amber"] .section-desc,
html[data-theme="amber"] .layman-explanation-text {
  color: #fde68a !important;
}

html[data-theme="amber"] .matrix-citation {
  background: #19140c !important;
  color: #b48c58 !important;
  border: 1px dashed rgba(245, 158, 11, 0.25) !important;
}

html[data-theme="amber"] .matrix-recommendation {
  background: rgba(16, 185, 129, 0.12) !important;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
  color: #34d399 !important;
}

html[data-theme="amber"] .layman-analogy-box {
  background: rgba(245, 158, 11, 0.1) !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  color: #fbbf24 !important;
}

html[data-theme="amber"] .layman-takeaway-box {
  background: #17130b !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  color: #fde68a !important;
}

html[data-theme="amber"] .flip-hint-strip {
  color: #b48c58 !important;
  border-top: 1px dashed rgba(245, 158, 11, 0.2) !important;
}

html[data-theme="amber"] .ai-tab {
  background: #14100a !important;
  border-color: rgba(245, 158, 11, 0.25) !important;
  color: #fef3c7 !important;
}

html[data-theme="amber"] .ai-tab.active {
  background: rgba(245, 158, 11, 0.25) !important;
  color: #fbbf24 !important;
  border-color: #f59e0b !important;
}

html[data-theme="amber"] .obs-status-bar {
  background: #120f0a !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  color: #fef3c7 !important;
}

html[data-theme="amber"] .card-visual-banner {
  background: #16120b !important;
  border-radius: 8px !important;
}

html[data-theme="amber"] .card-visual-banner svg {
  filter: sepia(1) saturate(3) hue-rotate(5deg);
}

html[data-theme="amber"] .qa-terminal-box,
html[data-theme="amber"] .qa-bubble,
html[data-theme="amber"] .qa-card-minimal {
  background: #120f0a !important;
  border-color: rgba(245, 158, 11, 0.25) !important;
  color: #fef3c7 !important;
}

html[data-theme="amber"] .ticker-track {
  background: #14100a !important;
  border-color: rgba(245, 158, 11, 0.2) !important;
  color: #b48c58 !important;
}

html[data-theme="amber"] .ticker-item {
  color: #b48c58 !important;
}

html[data-theme="amber"] input,
html[data-theme="amber"] textarea,
html[data-theme="amber"] select {
  background: #16130d !important;
  color: #fef3c7 !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
}

html[data-theme="amber"] pre,
html[data-theme="amber"] code {
  background: #14110b !important;
  color: #fbbf24 !important;
  border-color: rgba(245, 158, 11, 0.2) !important;
}

html[data-theme="amber"] .matrix-hero {
  border-bottom-color: rgba(245, 158, 11, 0.25) !important;
}

html[data-theme="amber"] .banner-tag,
html[data-theme="amber"] .badge-primary {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #fbbf24 !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
}

html[data-theme="amber"] #bg-canvas,
html[data-theme="amber"] #spaceCanvas,
html[data-theme="amber"] #crystalCanvas,
html[data-theme="amber"] #latticeCanvas,
html[data-theme="amber"] #hexCanvas,
html[data-theme="amber"] #glacialCanvas {
  filter: sepia(1) saturate(2.5) hue-rotate(-15deg) brightness(0.85);
}

/* ==========================================================================
   AMBER THEME: STUDIO, WORKBENCH & INVOICE SUITE (Aerospace Telemetry Cohesion)
   ========================================================================== */
html[data-theme="amber"] .studio-container {
  background: #090806 !important;
}

html[data-theme="amber"] .editor-pane {
  background: #090806 !important;
  border-right: 1px dashed rgba(245, 158, 11, 0.25) !important;
}

html[data-theme="amber"] .preview-pane {
  background: #070604 !important;
  background-image: radial-gradient(circle, rgba(245, 158, 11, 0.08) 1px, transparent 1px) !important;
  background-size: 20px 20px !important;
}

html[data-theme="amber"] .invoice-sheet {
  background: #ffffff !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 20px rgba(245, 158, 11, 0.1) !important;
}

html[data-theme="amber"] .form-section {
  background: #120f0a !important;
  border: 1px solid rgba(245, 158, 11, 0.25) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6) !important;
}

html[data-theme="amber"] .form-section.highlight-glow {
  border-color: rgba(245, 158, 11, 0.45) !important;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.08) !important;
}

html[data-theme="amber"] .section-title {
  color: #fef3c7 !important;
}

html[data-theme="amber"] .section-tag {
  color: #f59e0b !important;
}

html[data-theme="amber"] .field-label {
  color: #b48c58 !important;
}

html[data-theme="amber"] .toggle-title {
  color: #fef3c7 !important;
}

html[data-theme="amber"] .toggle-sub {
  color: #b48c58 !important;
}

html[data-theme="amber"] .type-switcher {
  background: #16120b !important;
  border: 1px solid rgba(245, 158, 11, 0.25) !important;
}

html[data-theme="amber"] .type-btn {
  color: #b48c58 !important;
}

html[data-theme="amber"] .type-btn.active {
  background: rgba(245, 158, 11, 0.25) !important;
  color: #fbbf24 !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3) !important;
}

html[data-theme="amber"] .styling-bar {
  background: #120f0a !important;
  border: 1px solid rgba(245, 158, 11, 0.25) !important;
}

html[data-theme="amber"] .color-picker-wrap {
  color: #b48c58 !important;
}

html[data-theme="amber"] .currency-select {
  background: #19140c !important;
  color: #fef3c7 !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
}

html[data-theme="amber"] .btn-quick {
  background: #16120b !important;
  color: #fef3c7 !important;
  border: 1px solid rgba(245, 158, 11, 0.25) !important;
}

html[data-theme="amber"] .btn-quick:hover {
  background: rgba(245, 158, 11, 0.2) !important;
  color: #fbbf24 !important;
}

html[data-theme="amber"] .btn-quick.highlight-autofill {
  background: rgba(245, 158, 11, 0.2) !important;
  border-color: #f59e0b !important;
  color: #fbbf24 !important;
}

html[data-theme="amber"] .btn-quick.highlight-wa {
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: #10b981 !important;
  color: #34d399 !important;
}

html[data-theme="amber"] .client-vault-bar {
  background: rgba(245, 158, 11, 0.08) !important;
  border: 1px dashed rgba(245, 158, 11, 0.35) !important;
}

html[data-theme="amber"] .client-vault-select {
  background: #19140c !important;
  color: #fef3c7 !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
}

html[data-theme="amber"] .btn-vault-action {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
}

html[data-theme="amber"] .trade-tab-pill {
  background: #16120b !important;
  border: 1px solid rgba(245, 158, 11, 0.2) !important;
  color: #b48c58 !important;
}

html[data-theme="amber"] .trade-tab-pill.active {
  background: rgba(245, 158, 11, 0.25) !important;
  color: #fbbf24 !important;
  border-color: #f59e0b !important;
}

html[data-theme="amber"] .trade-item-chip {
  background: #16120b !important;
  border: 1px solid rgba(245, 158, 11, 0.2) !important;
  color: #fef3c7 !important;
}

html[data-theme="amber"] .btn-add-item {
  background: rgba(245, 158, 11, 0.1) !important;
  border: 1px dashed rgba(245, 158, 11, 0.35) !important;
  color: #fbbf24 !important;
}

html[data-theme="amber"] .btn-save-catalog {
  background: rgba(16, 185, 129, 0.15) !important;
  border: 1px dashed rgba(16, 185, 129, 0.4) !important;
  color: #34d399 !important;
}

html[data-theme="amber"] .btn-pill-term {
  background: #16120b !important;
  border: 1px solid rgba(245, 158, 11, 0.2) !important;
  color: #b48c58 !important;
}

html[data-theme="amber"] #depositLockDisplay {
  background: #19140c !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
}

html[data-theme="amber"] .line-items-header {
  color: #b48c58 !important;
}

html[data-theme="amber"] .line-item-total {
  color: #fef3c7 !important;
}

html[data-theme="amber"] .line-item-row div {
  color: #fef3c7 !important;
}

html[data-theme="amber"] .slider-ui {
  background-color: rgba(245, 158, 11, 0.25) !important;
}

html[data-theme="amber"] input:checked + .slider-ui {
  background-color: #f59e0b !important;
}

html[data-theme="amber"] .hero-banner {
  background: #100d08 !important;
  border-bottom: 1px dashed rgba(245, 158, 11, 0.25) !important;
}

html[data-theme="amber"] .hero-text h1 {
  color: #fef3c7 !important;
}

html[data-theme="amber"] .hero-text p {
  color: #b48c58 !important;
}

html[data-theme="amber"] .badge-pill {
  background: #16120b !important;
  border-color: rgba(245, 158, 11, 0.25) !important;
  color: #fde68a !important;
}

html[data-theme="amber"] .badge-pill.highlight {
  background: rgba(245, 158, 11, 0.18) !important;
  border-color: #f59e0b !important;
  color: #fbbf24 !important;
}

html[data-theme="amber"] .hero-tag {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
  color: #fbbf24 !important;
}

html[data-theme="amber"] .overdue-simulator-box {
  background: #16120b !important;
  border: 1px solid rgba(245, 158, 11, 0.2) !important;
}

html[data-theme="amber"] #lateFeeStatusBadge {
  background: rgba(16, 185, 129, 0.15) !important;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
  color: #34d399 !important;
}

html[data-theme="amber"] .mobile-tab-switch {
  background: #090806 !important;
  border-bottom: 1px dashed rgba(245, 158, 11, 0.25) !important;
}

html[data-theme="amber"] .mobile-tab-btn {
  background: #14100a !important;
  border: 1px solid rgba(245, 158, 11, 0.25) !important;
  color: #b48c58 !important;
}

html[data-theme="amber"] .mobile-tab-btn.active {
  background: rgba(245, 158, 11, 0.25) !important;
  color: #fbbf24 !important;
  border-color: #f59e0b !important;
}

html[data-theme="amber"] .modal-card {
  background: #120f0a !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  color: #fef3c7 !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9) !important;
}

html[data-theme="amber"] .modal-header {
  border-bottom: 1px solid rgba(245, 158, 11, 0.2) !important;
}

html[data-theme="amber"] .modal-header h3 {
  color: #fef3c7 !important;
}

html[data-theme="amber"] .modal-close {
  color: #b48c58 !important;
}

html[data-theme="amber"] .canvas-viewport {
  background: #070604 !important;
  border-color: rgba(245, 158, 11, 0.25) !important;
}

html[data-theme="amber"] .vault-bar {
  background: #120f0a !important;
  border-bottom: 1px dashed rgba(245, 158, 11, 0.25) !important;
}

html[data-theme="amber"] .doc-select {
  background: #19140c !important;
  color: #fef3c7 !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
}

html[data-theme="amber"] .md-textarea {
  color: #fef3c7 !important;
}

html[data-theme="amber"] .preview-content {
  color: #fef3c7 !important;
}

html[data-theme="amber"] .draw-toolbar {
  background: rgba(18, 15, 10, 0.95) !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8) !important;
}

html[data-theme="amber"] .draw-tool-btn {
  color: #b48c58 !important;
}

html[data-theme="amber"] .draw-tool-btn.active {
  background: rgba(245, 158, 11, 0.25) !important;
  color: #fbbf24 !important;
}



/* ==========================================================================
   GLOBAL MOBILE OVERFLOW PREVENTION & RESPONSIVE SAFETY NET
   ========================================================================== */
html, body {
  max-width: 100vw !important;
  overflow-x: hidden !important;
}

@media (max-width: 768px) {
  header.site-header {
    padding: 0.65rem 0.85rem !important;
    gap: 0.5rem !important;
  }
  header.site-header .brand {
    font-size: 0.95rem !important;
    gap: 0.45rem !important;
  }
  header.site-header .brand-badge {
    display: none !important;
  }
  nav.site-nav {
    gap: 0.4rem !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
  }
  nav.site-nav a.nav-item {
    font-size: 0.78rem !important;
    padding: 0.2rem 0.35rem !important;
  }
  .dropdown-trigger {
    font-size: 0.78rem !important;
    padding: 0.28rem 0.55rem !important;
    min-height: 34px !important;
  }
  .theme-toggle-wrap {
    margin: 0 !important;
    padding: 2px !important;
  }
  .theme-toggle-btn {
    min-height: 28px !important;
    min-width: 28px !important;
    padding: 3px 6px !important;
    font-size: 0.8rem !important;
  }
}

@media (max-width: 640px) {
  .main-grid, .workspace, .studio-grid, .split-grid, .tool-grid, .ip-grid, .call-grid, .products-grid, .faq-grid, .sideload-grid, .trademark-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ==========================================================================
   COMPREHENSIVE PAPER (LIGHT) & AMBER THEME COVERAGE ACROSS ALL 31 PAGES
   Prevents dark-on-dark or white-on-white text across all cards, banners & tools
   ========================================================================== */
a.nav-donate-link {
  color: #00f0ff !important;
  font-weight: 700 !important;
}
html[data-theme="paper"] a.nav-donate-link {
  color: #0284c7 !important;
  font-weight: 700 !important;
}
html[data-theme="amber"] a.nav-donate-link {
  color: #fbbf24 !important;
  font-weight: 700 !important;
}

/* Keep Hero Wave Typography Crisp Black in All Themes */
html[data-theme="paper"] .hero-massive-title,
html[data-theme="amber"] .hero-massive-title,
html[data-theme="paper"] .hero-coords,
html[data-theme="amber"] .hero-coords,
html[data-theme="paper"] .hero-coords div,
html[data-theme="amber"] .hero-coords div {
  color: #000000 !important;
}

/* Paper Theme: Universal Container Surface Inversion */
html[data-theme="paper"] .matrix-card,
html[data-theme="paper"] .telemetry-item,
html[data-theme="paper"] .ai-search-box,
html[data-theme="paper"] .storefront-portal-card,
html[data-theme="paper"] .runbook-section,
html[data-theme="paper"] .feedback-console,
html[data-theme="paper"] .dev-modal-box,
html[data-theme="paper"] .checksum-drawer,
html[data-theme="paper"] .glyph-display-box,
html[data-theme="paper"] .ticker-wrap,
html[data-theme="paper"] .donate-hero,
html[data-theme="paper"] .tiers-section,
html[data-theme="paper"] .tier-card,
html[data-theme="paper"] .custom-checkout-bar,
html[data-theme="paper"] .amount-input-group,
html[data-theme="paper"] .compliance-card,
html[data-theme="paper"] .alloc-pill,
html[data-theme="paper"] .store-hero,
html[data-theme="paper"] .filter-bar-wrap,
html[data-theme="paper"] .product-card,
html[data-theme="paper"] .product-card.featured-card,
html[data-theme="paper"] .card-meta-spec,
html[data-theme="paper"] .sideload-section,
html[data-theme="paper"] .step-card,
html[data-theme="paper"] .charter-banner,
html[data-theme="paper"] .journey-hud,
html[data-theme="paper"] .founder-journey-card,
html[data-theme="paper"] .mission-chip,
html[data-theme="paper"] .crystal-chip,
html[data-theme="paper"] .card-drawer,
html[data-theme="paper"] .matrix-pill,
html[data-theme="paper"] .era-badge,
html[data-theme="paper"] .hud-bar,
html[data-theme="paper"] .category-helper-card,
html[data-theme="paper"] .dispatch-receipt,
html[data-theme="paper"] .spec-item,
html[data-theme="paper"] .channel-item,
html[data-theme="paper"] .gateway-telemetry-card,
html[data-theme="paper"] .telemetry-notice,
html[data-theme="paper"] .sim-explanation,
html[data-theme="paper"] .callout,
html[data-theme="paper"] .founder-affidavit,
html[data-theme="paper"] .status-pill,
html[data-theme="paper"] .lobby-card,
html[data-theme="paper"] .room-header,
html[data-theme="paper"] .connection-hud,
html[data-theme="paper"] .control-dock,
html[data-theme="paper"] .chat-drawer,
html[data-theme="paper"] .chat-input-bar,
html[data-theme="paper"] .editor-card,
html[data-theme="paper"] .panel-box,
html[data-theme="paper"] .room-code-display,
html[data-theme="paper"] .config-card,
html[data-theme="paper"] .results-card,
html[data-theme="paper"] .inspector-card,
html[data-theme="paper"] .app-toolbar,
html[data-theme="paper"] .pane-card,
html[data-theme="paper"] .pane-header,
html[data-theme="paper"] .diff-toolbar,
html[data-theme="paper"] .stats-bar,
html[data-theme="paper"] .diff-container,
html[data-theme="paper"] .hash-item,
html[data-theme="paper"] .hash-value,
html[data-theme="paper"] .drop-zone,
html[data-theme="paper"] .claim-item,
html[data-theme="paper"] .seal-banner,
html[data-theme="paper"] .card-preview-box,
html[data-theme="paper"] .mobile-drawer,
html[data-theme="paper"] .modal-preview-viewport,
html[data-theme="paper"] .overall-quality-banner,
html[data-theme="paper"] .isp-rating-section,
html[data-theme="paper"] .seo-info-block,
html[data-theme="paper"] .faq-item,
html[data-theme="paper"] .modal-content,
html[data-theme="paper"] .vs-banner,
html[data-theme="paper"] .sla-config-box,
html[data-theme="paper"] .probe-controller,
html[data-theme="paper"] .audit-card,
html[data-theme="paper"] .audit-table-wrap,
html[data-theme="paper"] .roi-feature-card,
html[data-theme="paper"] .roi-stat-box,
html[data-theme="paper"] .roi-action-panel,
html[data-theme="paper"] .legal-doc-preview,
html[data-theme="paper"] .calculator-section,
html[data-theme="paper"] .calc-input-row,
html[data-theme="paper"] .calc-results-card,
html[data-theme="paper"] .trust-strip,
html[data-theme="paper"] .final-cta-banner,
html[data-theme="paper"] .toolbar-strip,
html[data-theme="paper"] .table-card,
html[data-theme="paper"] .insight-card,
html[data-theme="paper"] .editorial-dots-bar,
html[data-theme="paper"] .guide-banner,
html[data-theme="paper"] .golden-spotlight-card,
html[data-theme="paper"] .timeline-board,
html[data-theme="paper"] .master-scrubber-area,
html[data-theme="paper"] .city-lane-card,
html[data-theme="paper"] .hours-editor-panel,
html[data-theme="paper"] .meeting-config-card,
html[data-theme="paper"] .export-suite-card,
html[data-theme="paper"] .meeting-invite-preview,
html[data-theme="paper"] .custom-city-dialog,
html[data-theme="paper"] .terminal-box,
html[data-theme="paper"] .terminal-topbar,
html[data-theme="paper"] .manifesto-box,
html[data-theme="paper"] .code-snippet-box,
html[data-theme="paper"] .export-section,
html[data-theme="paper"] .pill-item,
html[data-theme="paper"] .alert-free-tier,
html[data-theme="paper"] .hud-header,
html[data-theme="paper"] .dropzone,
html[data-theme="paper"] .selected-file-card,
html[data-theme="paper"] .result-box,
html[data-theme="paper"] .zk-explainer,
html[data-theme="paper"] .zk-card,
html[data-theme="paper"] .privacy-sandbox-banner,
html[data-theme="paper"] .insight-drawer-panel,
html[data-theme="paper"] .metric-card,
html[data-theme="paper"] .spend-distribution-container,
html[data-theme="paper"] .subscriptions-toolbar,
html[data-theme="paper"] .currency-quick-strip,
html[data-theme="paper"] .modal-container {
  background: #ffffff !important;
  border-color: #d1d5db !important;
  color: #0b0f19 !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06) !important;
}

html[data-theme="paper"] .pill-item strong {
  color: #0b0f19 !important;
}

html[data-theme="paper"] .tier-card.selected {
  background: #f0f9ff !important;
  border-color: #0284c7 !important;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.16) !important;
}

html[data-theme="paper"] .truth-statement {
  background: #fffbeb !important;
  border-left: 3px solid #d97706 !important;
  color: #0f172a !important;
}

/* Paper Theme: Universal Inner Heading & Value Contrast */
html[data-theme="paper"] .tier-amount,
html[data-theme="paper"] .tier-title,
html[data-theme="paper"] .amount-input,
html[data-theme="paper"] .compliance-card h3,
html[data-theme="paper"] .price-usd,
html[data-theme="paper"] .faq-question,
html[data-theme="paper"] .step-title,
html[data-theme="paper"] .hud-val,
html[data-theme="paper"] .stage-alt-mark,
html[data-theme="paper"] .founder-meta h3,
html[data-theme="paper"] .card-q-text,
html[data-theme="paper"] .receipt-value,
html[data-theme="paper"] .spec-val,
html[data-theme="paper"] .telemetry-title,
html[data-theme="paper"] .telemetry-val,
html[data-theme="paper"] .tm-name,
html[data-theme="paper"] .notary-title,
html[data-theme="paper"] .explorer-title,
html[data-theme="paper"] .article-title,
html[data-theme="paper"] .sig-name,
html[data-theme="paper"] .callout-title,
html[data-theme="paper"] .speed-val,
html[data-theme="paper"] .latency-num,
html[data-theme="paper"] .entity-name,
html[data-theme="paper"] .rating-prompt,
html[data-theme="paper"] .cap-header,
html[data-theme="paper"] .faq-q,
html[data-theme="paper"] .modal-title,
html[data-theme="paper"] .server-opt-name,
html[data-theme="paper"] .vs-text,
html[data-theme="paper"] .probe-title,
html[data-theme="paper"] .audit-stat-val,
html[data-theme="paper"] .roi-main-title,
html[data-theme="paper"] .roi-stat-num,
html[data-theme="paper"] .roi-action-title,
html[data-theme="paper"] .breakdown-val,
html[data-theme="paper"] .trust-badge-abbr,
html[data-theme="paper"] .feature-name,
html[data-theme="paper"] .golden-headline,
html[data-theme="paper"] .city-name-select,
html[data-theme="paper"] .dossier-title,
html[data-theme="paper"] .panel-title,
html[data-theme="paper"] .passport-info h3,
html[data-theme="paper"] .manifesto-quote strong,
html[data-theme="paper"] .scanner-title,
html[data-theme="paper"] .metric-value,
html[data-theme="paper"] .service-name,
html[data-theme="paper"] .service-price,
html[data-theme="paper"] .insight-drawer-title,
html[data-theme="paper"] .dropzone-title,
html[data-theme="paper"] .file-name-display,
html[data-theme="paper"] .feat-title,
html[data-theme="paper"] .editor-label,
html[data-theme="paper"] .cheatsheet-title,
html[data-theme="paper"] .card-name,
html[data-theme="paper"] .drop-title,
html[data-theme="paper"] .terminal-cmd,
html[data-theme="paper"] .decoded-code,
html[data-theme="paper"] .raw-textarea,
html[data-theme="paper"] .pane-textarea,
html[data-theme="paper"] .results-textarea,
html[data-theme="paper"] .clip-textarea {
  color: #0b0f19 !important;
}

html[data-theme="paper"] .btn-donate-multi,
html[data-theme="paper"] .btn-card-secondary,
html[data-theme="paper"] .btn-action-checksum,
html[data-theme="paper"] .filter-tab {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

html[data-theme="paper"] .filter-tab.active,
html[data-theme="paper"] .btn-donate-multi:hover {
  background: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
}

html[data-theme="paper"] .hero-badge {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}
html[data-theme="paper"] .hero-badge.coral { color: #b91c1c !important; border-color: #fca5a5 !important; background: #fef2f2 !important; }
html[data-theme="paper"] .hero-badge.cyan { color: #0369a1 !important; border-color: #7dd3fc !important; background: #f0f9ff !important; }
html[data-theme="paper"] .hero-badge.green { color: #047857 !important; border-color: #6ee7b7 !important; background: #ecfdf5 !important; }
html[data-theme="paper"] .hero-badge.gold { color: #b45309 !important; border-color: #fcd34d !important; background: #fffbeb !important; }
html[data-theme="paper"] .hero-motto,
html[data-theme="paper"] .tier-jmd {
  color: #b45309 !important;
}
html[data-theme="paper"] .alloc-pill strong {
  color: #0284c7 !important;
}
html[data-theme="paper"] .status-chip {
  background: #e0f2fe !important;
  border-color: #7dd3fc !important;
  color: #0369a1 !important;
}

/* Preserve White / High-Contrast Text on Primary Action Buttons in Paper Mode */
html[data-theme="paper"] .btn-buy-primary,
html[data-theme="paper"] .btn-action-primary,
html[data-theme="paper"] .go-btn,
html[data-theme="paper"] .go-btn .go-title,
html[data-theme="paper"] .btn-call-video,
html[data-theme="paper"] .btn-download-pdf,
html[data-theme="paper"] .btn-share-wa {
  color: #ffffff !important;
}
html[data-theme="paper"] .btn-buy-primary.patron-btn,
html[data-theme="paper"] .btn-donate-visa {
  color: #05070c !important;
}



/* ==========================================================================
   HERO WAVE SECTION & 3D HOLOGRAM DECK 3-THEME COLOR SYNCHRONIZATION
   ========================================================================== */
html[data-theme="paper"] .hero-wave-section {
  background: #f4f3ef !important;
  color: #0b0f19 !important;
}
html[data-theme="paper"] .hero-massive-title {
  color: #0b0f19 !important;
  text-shadow: 0 2px 16px rgba(244, 243, 239, 0.92), 0 0 2px rgba(255, 255, 255, 0.95) !important;
}
html[data-theme="paper"] .hero-coords,
html[data-theme="paper"] .hero-coords div {
  color: #0b0f19 !important;
  text-shadow: 0 1px 6px rgba(244, 243, 239, 0.95) !important;
}
html[data-theme="paper"] .hero-explore-btn {
  background: rgba(255, 255, 255, 0.92) !important;
  color: #0b0f19 !important;
  border: 1px solid #0b0f19 !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12) !important;
}
html[data-theme="paper"] .hero-explore-btn:hover {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-color: #dc2626 !important;
}

html[data-theme="amber"] .hero-wave-section {
  background: #f59e0b !important;
  color: #090806 !important;
}
html[data-theme="amber"] .hero-massive-title,
html[data-theme="amber"] .hero-coords,
html[data-theme="amber"] .hero-coords div {
  color: #090806 !important;
}
html[data-theme="amber"] .hero-explore-btn {
  background: rgba(9, 8, 6, 0.86) !important;
  color: #fbbf24 !important;
  border: 1px solid #090806 !important;
}
html[data-theme="amber"] .hero-explore-btn:hover {
  background: #090806 !important;
  color: #fef3c7 !important;
}

/* 3D Hologram Control Deck Theme Synchronization */
html[data-theme="paper"] .studio-holo-deck {
  background: rgba(255, 255, 255, 0.94) !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08) !important;
}
html[data-theme="paper"] .holo-deck-label {
  color: #dc2626 !important;
}
html[data-theme="paper"] .holo-mode-btn {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}
html[data-theme="paper"] .holo-mode-btn:hover,
html[data-theme="paper"] .holo-mode-btn.active {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35) !important;
}

html[data-theme="amber"] .studio-holo-deck {
  background: rgba(18, 15, 10, 0.92) !important;
  border: 1px solid rgba(245, 158, 11, 0.45) !important;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.14) !important;
}
html[data-theme="amber"] .holo-deck-label {
  color: #fbbf24 !important;
}
html[data-theme="amber"] .holo-mode-btn {
  background: rgba(245, 158, 11, 0.1) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  color: #fef3c7 !important;
}
html[data-theme="amber"] .holo-mode-btn:hover,
html[data-theme="amber"] .holo-mode-btn.active {
  background: #f59e0b !important;
  border-color: #f59e0b !important;
  color: #090806 !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.55) !important;
}


/* ==========================================================================
   ALUMUNGANDR AUDIT HARMONIZATION: BUTTON CONTRAST & THEME INTEGRITY
   ========================================================================== */

/* Universal High-Contrast Action & Tool Buttons in Paper Mode */
html[data-theme="paper"] .btn-secondary,
html[data-theme="paper"] .btn-action-secondary,
html[data-theme="paper"] .btn-action,
html[data-theme="paper"] .action-btn,
html[data-theme="paper"] .btn-tool,
html[data-theme="paper"] .tool-btn,
html[data-theme="paper"] .btn-copy,
html[data-theme="paper"] .btn-copy-link,
html[data-theme="paper"] .btn-swap,
html[data-theme="paper"] .btn-export,
html[data-theme="paper"] .btn-random,
html[data-theme="paper"] .btn-clear,
html[data-theme="paper"] .btn-sample,
html[data-theme="paper"] .btn-sync,
html[data-theme="paper"] .tab-btn:not(.active),
html[data-theme="paper"] .hub-tab-btn:not(.active) {
  background: #ffffff !important;
  color: #0b0f19 !important;
  border-color: #cbd5e1 !important;
}

html[data-theme="paper"] .btn-secondary:hover,
html[data-theme="paper"] .btn-action-secondary:hover,
html[data-theme="paper"] .action-btn:hover,
html[data-theme="paper"] .btn-copy:hover,
html[data-theme="paper"] .btn-export:hover,
html[data-theme="paper"] .btn-swap:hover,
html[data-theme="paper"] .btn-clear:hover {
  background: #f1f5f9 !important;
  color: #000000 !important;
  border-color: #94a3b8 !important;
}

/* Background Canvas Calming in Paper Theme */
html[data-theme="paper"] #soundwaveCanvas,
html[data-theme="paper"] #matrixCanvas,
html[data-theme="paper"] #dropLiveCanvas,
html[data-theme="paper"] #telemetryCanvas,
html[data-theme="paper"] #latticeCanvas,
html[data-theme="paper"] #hexCanvas,
html[data-theme="paper"] #glacialCanvas {
  opacity: 0.04 !important;
}

/* Write Preview Contrast */
html[data-theme="paper"] .preview-content,
html[data-theme="paper"] .preview-content p,
html[data-theme="paper"] .preview-content li,
html[data-theme="paper"] .preview-content table,
html[data-theme="paper"] .preview-content td,
html[data-theme="paper"] .preview-content th {
  color: #0b0f19 !important;
}
html[data-theme="paper"] .preview-content code {
  color: #0284c7 !important;
  background: #f1f5f9 !important;
}
html[data-theme="paper"] .preview-content pre {
  background: #f8fafc !important;
  color: #0b0f19 !important;
  border: 1px solid #e2e8f0 !important;
}

/* Responsive & Mobile Protection (Zero 390px clipping) */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }
  button, .btn, a.btn, input[type="button"], input[type="submit"] {
    min-height: 44px;
  }
}
