/* ==========================================================================
   METANITE MARKETING MASTERCLASS DESIGN SYSTEM - 10/10 EDITION
   ========================================================================== */

:root {
  --bg-space: #03060c;
  --bg-dark: #070c16;
  --bg-card: #0c1424;
  --bg-card-elevated: #121d33;
  --bg-card-hover: #182744;
  --bg-sidebar: #050811;
  
  --metanite-green: #00ff38;
  --metanite-green-glow: rgba(0, 255, 56, 0.45);
  --metanite-green-subtle: rgba(0, 255, 56, 0.08);
  --metanite-green-border: rgba(0, 255, 56, 0.25);
  
  --neon-cyan: #00f0ff;
  --neon-purple: #a855f7;
  --neon-pink: #ff007a;
  --neon-amber: #ffb800;
  --neon-blue: #3b82f6;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --border-color: #162238;
  --border-active: #00ff38;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  
  --shadow-neon: 0 0 30px rgba(0, 255, 56, 0.25);
  --shadow-card: 0 12px 35px rgba(0, 0, 0, 0.65);
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-space);
  color: var(--text-main);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(0, 255, 56, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(0, 240, 255, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.03) 0%, transparent 60%),
    linear-gradient(to bottom, #03060c, #070c16);
  background-attachment: fixed;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: #162238; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--metanite-green); }

/* App Wrapper */
#app {
  display: flex;
  min-height: 100vh;
}

/* ==========================================================================
   SIDEBAR NAVIGATION
   ========================================================================== */
sidebar {
  width: 320px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  padding: 24px 16px;
  overflow-y: auto;
  backdrop-filter: blur(16px);
}

.brand-section {
  padding: 6px 10px 18px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 18px;
}

.metanite-logo {
  width: 100%;
  max-width: 220px;
  height: auto;
  filter: drop-shadow(0 0 12px var(--metanite-green-glow));
  transition: transform 0.3s ease;
}
.metanite-logo:hover {
  transform: scale(1.02);
}

.academy-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--metanite-green-subtle);
  color: var(--metanite-green);
  border: 1px solid var(--metanite-green-border);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  border-radius: 20px;
  margin-top: 10px;
  text-transform: uppercase;
}
.academy-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--metanite-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--metanite-green);
  animation: pulse 2s infinite;
}

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

/* User Progress Widget in Sidebar */
.joinee-progress-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 16px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}
.progress-header span:last-child {
  color: var(--metanite-green);
  font-weight: 800;
}

.global-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-dark);
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0 4px;
}
.global-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--metanite-green));
  transition: width 0.4s ease;
  box-shadow: 0 0 10px var(--metanite-green-glow);
}

/* Quick Command Trigger */
.cmd-k-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  margin-bottom: 16px;
  transition: all 0.2s ease;
}
.cmd-k-badge:hover {
  border-color: var(--metanite-green);
  color: #fff;
}
.cmd-key {
  background: #162238;
  border: 1px solid #233454;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--neon-cyan);
}

/* Nav Links */
.nav-group-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--text-subtle);
  font-weight: 700;
  margin: 14px 8px 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.2s ease;
  margin-bottom: 3px;
  cursor: pointer;
  border: 1px solid transparent;
}

.nav-link-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  transform: translateX(3px);
}

.nav-link.active {
  background: linear-gradient(135deg, var(--metanite-green-subtle), rgba(0, 240, 255, 0.05));
  color: var(--metanite-green);
  border-color: var(--metanite-green-border);
  box-shadow: 0 0 15px rgba(0, 255, 56, 0.1);
  font-weight: 600;
}

.nav-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #141f33;
  color: var(--text-muted);
  font-weight: 700;
}
.nav-link.active .nav-badge {
  background: var(--metanite-green-subtle);
  color: var(--metanite-green);
}

/* Sound Toggle in Sidebar */
.sound-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  margin-top: auto;
  transition: all 0.2s ease;
}
.sound-toggle-btn:hover {
  border-color: var(--metanite-green);
  color: var(--metanite-green);
}

/* ==========================================================================
   MAIN CONTENT AREA
   ========================================================================== */
main {
  flex: 1;
  margin-left: 320px;
  padding: 36px 48px;
  max-width: 1400px;
}

.view-panel {
  display: none;
  animation: slideFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.view-panel.active {
  display: block;
}

@keyframes slideFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   HERO / BANNER STYLING
   ========================================================================== */
.hero-box {
  background: linear-gradient(135deg, rgba(12, 20, 36, 0.95), rgba(7, 12, 22, 0.95)), 
              radial-gradient(circle at 80% 20%, rgba(0, 255, 56, 0.14), transparent 50%);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--metanite-green);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.hero-box h1 {
  font-size: 34px;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 12px;
  color: #fff;
  letter-spacing: -0.5px;
}
.hero-box h1 span.green {
  color: var(--metanite-green);
  text-shadow: 0 0 20px var(--metanite-green-glow);
}

.hero-box p {
  color: var(--text-muted);
  font-size: 15.5px;
  max-width: 860px;
  line-height: 1.7;
}

.tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.tag-pill {
  background: var(--metanite-green-subtle);
  color: var(--metanite-green);
  border: 1px solid var(--metanite-green-border);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   CARDS, CONTAINERS & ACCORDIONS
   ========================================================================== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 24px;
  margin-bottom: 28px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 28px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  transition: all 0.25s ease;
  position: relative;
}
.content-card:hover {
  border-color: var(--border-active);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

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

.card-title-bar h2, .card-title-bar h3 {
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}
.card-title-bar h2 .icon, .card-title-bar h3 .icon {
  font-size: 22px;
}

.level-indicator {
  background: #141f33;
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 240, 255, 0.3);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

/* Accordion Deep Dives */
.accordion-item {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
}
.accordion-item:hover {
  border-color: rgba(0, 255, 56, 0.3);
}

.accordion-header {
  padding: 16px 20px;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.01);
}
.accordion-header .acc-icon {
  transition: transform 0.3s ease;
  color: var(--metanite-green);
  font-size: 12px;
}
.accordion-item.open .accordion-header .acc-icon {
  transform: rotate(180deg);
}

.accordion-body {
  display: none;
  padding: 20px 24px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.7;
}
.accordion-item.open .accordion-body {
  display: block;
  animation: slideFadeIn 0.25s ease;
}

/* Copy Snippet Box */
.code-snippet-box {
  background: #060a12;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 12px 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--neon-cyan);
  position: relative;
  overflow-x: auto;
}
.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #141f33;
  border: 1px solid #233454;
  color: var(--text-muted);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.copy-btn:hover {
  background: var(--metanite-green);
  color: #000;
  border-color: var(--metanite-green);
}

/* Callouts / Highlights */
.mentor-callout {
  background: rgba(0, 255, 56, 0.06);
  border-left: 4px solid var(--metanite-green);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 18px 22px;
  margin: 20px 0;
}
.mentor-callout .title {
  font-weight: 800;
  font-size: 14px;
  color: var(--metanite-green);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.mentor-callout p {
  color: var(--text-main);
  font-size: 14.5px;
}

/* ==========================================================================
   INTERACTIVE FUNNEL VISUALIZER (AARRR)
   ========================================================================== */
.funnel-visualizer-container {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 20px 0;
}

.funnel-stage {
  margin-bottom: 14px;
}
.funnel-stage-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.funnel-bar-bg {
  width: 100%;
  height: 28px;
  background: #0f182a;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 12px;
}
.funnel-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, var(--neon-cyan), var(--metanite-green));
  transition: width 0.5s ease;
  z-index: 1;
  opacity: 0.85;
}
.funnel-bar-text {
  position: relative;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* ==========================================================================
   INTERACTIVE FLASHCARDS DECK
   ========================================================================== */
.flashcard-wrapper {
  perspective: 1000px;
  margin-bottom: 24px;
}

.flashcard {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  min-height: 200px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: transform 0.4s ease, border-color 0.2s ease;
  position: relative;
}
.flashcard:hover {
  border-color: var(--metanite-green);
  box-shadow: 0 0 25px rgba(0, 255, 56, 0.15);
}
.flashcard .card-category {
  position: absolute;
  top: 16px;
  left: 20px;
  font-size: 11px;
  font-weight: 800;
  color: var(--neon-cyan);
  text-transform: uppercase;
}
.flashcard .card-hint {
  position: absolute;
  bottom: 16px;
  font-size: 11px;
  color: var(--text-subtle);
}
.flashcard-term {
  font-size: 24px;
  font-weight: 900;
  color: #fff;
}
.flashcard-definition {
  display: none;
  font-size: 16px;
  color: var(--metanite-green);
  line-height: 1.6;
}
.flashcard.flipped .flashcard-term { display: none; }
.flashcard.flipped .flashcard-definition { display: block; }

/* ==========================================================================
   COMMAND PALETTE MODAL (CTRL + K)
   ========================================================================== */
.cmd-palette-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 12, 0.85);
  backdrop-filter: blur(10px);
  z-index: 1000;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
}
.cmd-palette-backdrop.active {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.cmd-palette-modal {
  width: 100%;
  max-width: 600px;
  background: var(--bg-card);
  border: 1px solid var(--metanite-green);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 255, 56, 0.2);
  overflow: hidden;
}
.cmd-palette-search {
  width: 100%;
  background: var(--bg-dark);
  border: none;
  border-bottom: 1px solid var(--border-color);
  padding: 18px 24px;
  color: #fff;
  font-size: 16px;
  outline: none;
}
.cmd-palette-results {
  max-height: 350px;
  overflow-y: auto;
  padding: 12px;
}
.cmd-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.cmd-result-item:hover, .cmd-result-item.selected {
  background: var(--metanite-green-subtle);
  color: var(--metanite-green);
}

/* ==========================================================================
   METANITE DIAGNOSTIC CHECKLIST MODULE STYLING
   ========================================================================== */
.checklist-category {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  transition: border-color 0.2s ease;
}
.checklist-category.all-checked {
  border-color: var(--metanite-green);
  box-shadow: 0 0 20px var(--metanite-green-subtle);
}

.category-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.category-header-flex h3 {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pts-badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--metanite-green);
  background: var(--metanite-green-subtle);
  border: 1px solid var(--metanite-green-border);
  padding: 3px 10px;
  border-radius: 20px;
}

.check-item {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.check-item:hover {
  border-color: rgba(0, 255, 56, 0.3);
  background: rgba(14, 22, 38, 0.9);
}
.check-item.checked {
  background: rgba(0, 255, 56, 0.05);
  border-color: var(--metanite-green);
}

.audit-cb {
  width: 22px;
  height: 22px;
  accent-color: var(--metanite-green);
  margin-top: 2px;
  cursor: pointer;
}

.check-content {
  flex: 1;
}
.check-content .title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.check-content .desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.item-points {
  font-size: 12px;
  font-weight: 800;
  color: var(--metanite-green);
  background: var(--metanite-green-subtle);
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 8px;
}

/* Sticky Diagnostic Dashboard */
.audit-sticky-dashboard {
  position: sticky;
  top: 32px;
  background: linear-gradient(135deg, #090e1a, #0f182c);
  border: 1px solid var(--metanite-green);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: 0 15px 40px rgba(0, 255, 56, 0.12);
  text-align: center;
}

.audit-score-num {
  font-size: 72px;
  font-weight: 900;
  color: var(--metanite-green);
  text-shadow: 0 0 25px var(--metanite-green-glow);
  line-height: 1;
  margin: 14px 0 6px;
  font-family: var(--font-mono);
}

.audit-score-max {
  font-size: 13px;
  color: var(--text-subtle);
  font-weight: 600;
  letter-spacing: 1px;
}

.audit-status-badge {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin: 16px 0;
  text-transform: uppercase;
}
.audit-status-badge.world-class {
  background: rgba(0, 255, 56, 0.2);
  color: var(--metanite-green);
  border: 1px solid var(--metanite-green);
  box-shadow: 0 0 15px var(--metanite-green-glow);
}
.audit-status-badge.solid {
  background: rgba(0, 240, 255, 0.2);
  color: var(--neon-cyan);
  border: 1px solid var(--neon-cyan);
}
.audit-status-badge.vulnerable {
  background: rgba(255, 184, 0, 0.2);
  color: var(--neon-amber);
  border: 1px solid var(--neon-amber);
}
.audit-status-badge.critical {
  background: rgba(255, 0, 122, 0.2);
  color: var(--neon-pink);
  border: 1px solid var(--neon-pink);
}

/* ==========================================================================
   INTERACTIVE SIMULATORS & CALCULATOR CONTROLS
   ========================================================================== */
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: #fff;
  font-size: 14.5px;
  font-family: var(--font-sans);
  transition: all 0.2s ease;
}
.form-control:focus {
  outline: none;
  border-color: var(--metanite-green);
  box-shadow: 0 0 15px var(--metanite-green-subtle);
}

.metric-output-card {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color 0.2s ease;
}
.metric-output-card:hover {
  border-color: rgba(0, 255, 56, 0.3);
}
.metric-output-card .label {
  font-size: 13px;
  color: var(--text-muted);
}
.metric-output-card .val {
  font-size: 24px;
  font-weight: 900;
  font-family: var(--font-mono);
  color: #fff;
}
.metric-output-card .val.green { color: var(--metanite-green); text-shadow: 0 0 10px var(--metanite-green-glow); }
.metric-output-card .val.cyan { color: var(--neon-cyan); }
.metric-output-card .val.amber { color: var(--neon-amber); }

/* Buttons */
.btn-primary {
  background: var(--metanite-green);
  color: #000;
  font-weight: 800;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(0, 255, 56, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 255, 56, 0.5);
}

.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-secondary:hover {
  border-color: #fff;
  color: #fff;
}

/* ==========================================================================
   IMAGE DIAGRAM CONTAINERS
   ========================================================================== */
.diagram-frame {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  margin: 24px 0;
  box-shadow: var(--shadow-card);
}
.diagram-frame img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.diagram-frame:hover img {
  transform: scale(1.01);
}
.diagram-caption {
  background: var(--bg-card);
  padding: 12px 18px;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.diagram-caption span.figure-id {
  font-weight: 800;
  color: var(--metanite-green);
}

/* ==========================================================================
   TABLES & TEARDOWN MATRICES
   ========================================================================== */
.teardown-table-wrapper {
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.teardown-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}
.teardown-table th {
  background: var(--bg-dark);
  padding: 14px 18px;
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  font-size: 11.5px;
  letter-spacing: 0.8px;
}
.teardown-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  background: var(--bg-card);
}
.teardown-table tr:last-child td {
  border-bottom: none;
}
.teardown-table tr:hover td {
  background: var(--bg-card-hover);
}

/* ==========================================================================
   METANITE QUIZ & CERTIFICATION ENGINE
   ========================================================================== */
.quiz-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.quiz-question-box {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}
.quiz-question-box:last-child {
  border-bottom: none;
}

.quiz-q-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
}

.quiz-option {
  display: block;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}
.quiz-option:hover {
  border-color: rgba(0, 255, 56, 0.4);
}
.quiz-option input {
  margin-right: 12px;
  accent-color: var(--metanite-green);
}

.certificate-card {
  display: none;
  background: linear-gradient(135deg, #090e1a, #111a2f);
  border: 2px solid var(--metanite-green);
  border-radius: var(--radius-xl);
  padding: 40px;
  text-align: center;
  margin-top: 32px;
  box-shadow: 0 0 40px var(--metanite-green-glow);
}
.certificate-card.show {
  display: block;
  animation: slideFadeIn 0.5s ease;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1024px) {
  sidebar { width: 260px; }
  main { margin-left: 260px; padding: 24px 28px; }
}

@media (max-width: 820px) {
  #app { flex-direction: column; }
  sidebar { width: 100%; position: relative; height: auto; border-right: none; border-bottom: 1px solid var(--border-color); }
  main { margin-left: 0; padding: 20px 16px; }
  .hero-box { padding: 24px; }
  .hero-box h1 { font-size: 26px; }
  .audit-score-num { font-size: 52px; }
}
