/* ============================================================================
   ORaCle FIzik SPM — Dark Telemetry / Cyberpunk Fizik Stylesheet
   ============================================================================ */

:root {
  --bg-void: #050811;
  --bg-panel: rgba(11, 18, 34, 0.88);
  --bg-panel-solid: #0b1222;
  --bg-elevated: rgba(17, 27, 49, 0.9);
  --border-cyan: rgba(0, 240, 255, 0.22);
  --border-subtle: rgba(148, 163, 184, 0.14);
  --cyan: #00f0ff;
  --violet: #a855f7;
  --amber: #f59e0b;
  --crimson: #ff3366;
  --emerald: #10b981;
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 150px;
}

html,
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-void);
  color: #e2e8f0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* WCAG 2.2 Visible Focus Indicator */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Hide scrollbars cleanly on touch swipe strips */
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Subtle telemetry entrance transition */
@keyframes panelFadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel-enter {
  animation: panelFadeUp 0.26s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .panel-enter,
  .animate-pulse {
    animation: none !important;
  }
  * {
    transition-duration: 0.01ms !important;
  }
}

.font-orbitron {
  font-family: 'Orbitron', sans-serif;
}

.font-space {
  font-family: 'Space Grotesk', sans-serif;
}

.font-mono-code {
  font-family: 'JetBrains Mono', monospace;
}

/* Blueprint physics telemetry grid */
.cyber-grid-bg {
  background-color: var(--bg-void);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 240, 255, 0.11), transparent 70%),
    radial-gradient(ellipse 60% 40% at 95% 20%, rgba(168, 85, 247, 0.08), transparent 65%),
    linear-gradient(to right, rgba(0, 240, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 240, 255, 0.035) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 38px 38px, 38px 38px;
}

/* Telemetry Glass Panel */
.telemetry-card {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--border-cyan);
  border-radius: 0.75rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.telemetry-card:hover {
  border-color: rgba(0, 240, 255, 0.42);
  box-shadow: 0 14px 36px -12px rgba(0, 240, 255, 0.16);
}

.hero-banner-frame {
  border-color: rgba(0, 240, 255, 0.38);
  box-shadow: 0 0 32px -8px rgba(0, 240, 255, 0.25), 0 14px 36px -12px rgba(0, 0, 0, 0.85);
}

.telemetry-card-violet {
  border-color: rgba(168, 85, 247, 0.34);
}
.telemetry-card-violet:hover {
  border-color: rgba(168, 85, 247, 0.65);
  box-shadow: 0 14px 36px -12px rgba(168, 85, 247, 0.2);
}

.telemetry-card-crimson {
  border-color: rgba(255, 51, 102, 0.36);
}
.telemetry-card-crimson:hover {
  border-color: rgba(255, 51, 102, 0.7);
  box-shadow: 0 14px 36px -12px rgba(255, 51, 102, 0.2);
}

/* Subtle corner reticle accent */
.hud-corners::before,
.hud-corners::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  pointer-events: none;
}
.hud-corners::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid var(--cyan);
  border-left: 2px solid var(--cyan);
  border-top-left-radius: 4px;
}
.hud-corners::after {
  bottom: -1px;
  right: -1px;
  border-bottom: 2px solid var(--cyan);
  border-right: 2px solid var(--cyan);
  border-bottom-right-radius: 4px;
}

/* Source Badges */
.badge-elite {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.24), rgba(234, 179, 8, 0.1));
  border: 1px solid rgba(251, 191, 36, 0.55);
  color: #fde68a;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.18);
}

.badge-tier2 {
  background: rgba(168, 85, 247, 0.16);
  border: 1px solid rgba(192, 132, 252, 0.42);
  color: #e9d5ff;
}

.badge-tier3 {
  background: rgba(51, 65, 85, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #cbd5e1;
}

/* Heatmap Cell Tokens */
.heat-bc {
  background: linear-gradient(135deg, rgba(255, 51, 102, 0.32), rgba(168, 85, 247, 0.28));
  border: 1px solid rgba(255, 51, 102, 0.55);
  color: #ffe4e6;
}

.heat-a {
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.32);
  color: #cffafe;
}

.heat-empty {
  background: rgba(15, 23, 42, 0.52);
  border: 1px solid rgba(71, 85, 105, 0.45);
  color: #94a3b8;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #070b17;
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.25);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 240, 255, 0.5);
}

[x-cloak] {
  display: none !important;
}

/* ============================================================================
   TAB 7: SVG DIAGRAM BOX & DUAL PRINT ENGINE (Summary 1-Page vs Official Exam)
   ============================================================================ */
.exam-diagram-box {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 0.65rem;
  padding: 0.65rem;
  overflow: hidden;
}

.exam-diagram-box svg {
  width: 100%;
  max-width: 580px;
  height: auto;
  display: block;
  margin: 0 auto;
}

#print-report-sheet,
#print-exam-sheet {
  display: none;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 10mm;
  }

  html,
  body {
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 9.5px !important;
    line-height: 1.25 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .no-print {
    display: none !important;
  }

  body:not(.print-exam) #print-report-sheet {
    display: block !important;
    background: #ffffff !important;
    color: #0f172a !important;
    width: 100%;
  }

  body:not(.print-exam) #print-exam-sheet {
    display: none !important;
  }

  body.print-exam #print-report-sheet {
    display: none !important;
  }

  body.print-exam #print-exam-sheet {
    display: block !important;
    background: #ffffff !important;
    color: #0f172a !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 10pt !important;
    line-height: 1.38 !important;
    width: 100%;
  }

  #print-report-sheet table,
  #print-exam-sheet table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 6px;
  }

  #print-report-sheet th,
  #print-report-sheet td {
    border: 1px solid #cbd5e1;
    padding: 3px 5px;
    text-align: left;
    vertical-align: top;
  }

  #print-exam-sheet th,
  #print-exam-sheet td {
    border: 1px solid #475569;
    padding: 4px 6px;
    text-align: left;
    vertical-align: top;
    font-size: 9pt;
  }

  #print-report-sheet th,
  #print-exam-sheet th {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    font-weight: 700;
  }

  #print-exam-sheet .exam-q-block {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 10px;
  }

  #print-exam-sheet .exam-page-break {
    break-before: page;
    page-break-before: always;
  }

  #print-exam-sheet .print-diagram-wrap svg {
    max-width: 150mm !important;
    width: 100% !important;
    height: auto !important;
    display: block;
    margin: 4px auto;
  }
}
