/* ==========================================================================
   ALGEX PROTOCOL AI — Dedicated Stylesheet (Dark/Light Responsive)
   ========================================================================== */

.protocol-ai-page {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  padding-bottom: 3rem;
}

/* ==========================================================================
   1. Hero Section with 3D Neural Canvas Background
   ========================================================================== */
.ai-hero-section {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 3.5rem 2rem 2.5rem;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(11, 15, 25, 0.95) 100%);
  border: 1px solid var(--border-glass-hover);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 35px var(--quantum-glow);
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

[data-theme="light"] .ai-hero-section {
  background: linear-gradient(135deg, #FFFFFF 0%, #EFF6FF 100%);
  border-color: #CBD5E1;
  box-shadow: 0 20px 50px rgba(37, 99, 235, 0.08), 0 0 25px rgba(59, 130, 246, 0.1);
}

.neural-bg-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.35;
  z-index: 1;
}

[data-theme="light"] .neural-bg-canvas {
  opacity: 0.95;
}

.ai-hero-content {
  position: relative;
  z-index: 2;
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ai-hero-title {
  font-size: 2.35rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-top: 1rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.gradient-cyan {
  background: linear-gradient(135deg, #38BDF8, #0284C7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sovereign-live-pill {
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--instant-green);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

[data-theme="light"] .sovereign-live-pill {
  background: #ECFDF5;
  color: #047857;
  border-color: #A7F3D0;
}

.ai-hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 740px;
}

.ai-hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  width: 100%;
}

.hero-metric-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1rem;
  backdrop-filter: blur(12px);
  transition: var(--transition-fast);
}

[data-theme="light"] .hero-metric-card {
  background: rgba(255, 255, 255, 0.8);
  border-color: #CBD5E1;
}

.hero-metric-card:hover {
  transform: translateY(-3px);
  border-color: var(--quantum-blue);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.metric-val {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
}

.metric-lbl {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.text-cyan { color: #38BDF8; }
.text-gold { color: var(--parity-gold); }
.text-green { color: var(--instant-green); }
.text-blue { color: var(--quantum-blue-light); }

/* ==========================================================================
   2. Prominent Sovereign Security & Air-Gap Caution Banner
   ========================================================================== */
.caution-wrapper {
  width: 100%;
}

.sovereign-caution-banner {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1.5px solid #F59E0B;
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.15);
  position: relative;
  overflow: hidden;
}

[data-theme="light"] .sovereign-caution-banner {
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  border-color: #D97706;
  box-shadow: 0 10px 30px rgba(217, 119, 6, 0.12);
}

.caution-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid #F59E0B;
  color: #F59E0B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  animation: pulseShield 2s infinite alternate;
}

@keyframes pulseShield {
  0% { transform: scale(1); box-shadow: 0 0 5px rgba(245, 158, 11, 0.3); }
  100% { transform: scale(1.06); box-shadow: 0 0 20px rgba(245, 158, 11, 0.6); }
}

.caution-content {
  flex: 1;
}

.caution-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #FBBF24;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

[data-theme="light"] .caution-title {
  color: #B45309;
}

.caution-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

[data-theme="light"] .caution-text {
  color: #451A03;
}

.caution-text strong {
  color: #FDE68A;
  font-weight: 800;
}

[data-theme="light"] .caution-text strong {
  color: #78350F;
}

.caution-badges {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.c-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #FDE68A;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

[data-theme="light"] .c-badge {
  background: #FFFFFF;
  color: #92400E;
  border-color: #FCD34D;
}

/* ==========================================================================
   3. Section Header Blocks & 3 Pillars Grid
   ========================================================================== */
.section-header-block {
  text-align: center;
  margin-bottom: 2rem;
}

.sub-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.25rem 0.8rem;
  border-radius: var(--radius-full);
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid var(--quantum-blue);
  color: var(--quantum-blue-light);
  margin-bottom: 0.6rem;
}

[data-theme="light"] .sub-pill {
  background: #EFF6FF;
  color: #1D4ED8;
  border-color: #93C5FD;
}

.section-h2 {
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.section-p {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
}

.ai-pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.pillar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition-bounce);
}

[data-theme="light"] .pillar-card {
  background: #FFFFFF;
  border-color: #CBD5E1;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.04);
}

.pillar-card:hover {
  transform: translateY(-6px);
  border-color: var(--quantum-blue);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 25px var(--quantum-glow);
}

.pillar-card.p1 { border-top: 4px solid #38BDF8; }
.pillar-card.p2 { border-top: 4px solid #EF4444; }
.pillar-card.p3 { border-top: 4px solid #10B981; }

.pillar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.pillar-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.icon-cyan { background: rgba(56, 189, 248, 0.15); color: #38BDF8; border: 1px solid rgba(56, 189, 248, 0.3); }
.icon-red { background: rgba(239, 68, 68, 0.15); color: #F87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.icon-green { background: rgba(16, 185, 129, 0.15); color: #34D399; border: 1px solid rgba(16, 185, 129, 0.3); }

.pillar-num {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .pillar-num {
  color: rgba(0, 0, 0, 0.1);
}

.pillar-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.pillar-sub {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--quantum-blue-light);
  margin-bottom: 0.85rem;
  display: block;
}

[data-theme="light"] .pillar-sub {
  color: #2563EB;
}

.pillar-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.25rem;
  flex: 1;
}

.pillar-features {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-top: 1px solid var(--border-glass);
  padding-top: 1rem;
}

.p-feat-item {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.p-feat-item i {
  color: var(--quantum-blue-light);
  font-size: 0.8rem;
  flex-shrink: 0;
}

.ai-formula-badge {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--quantum-blue-light);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  direction: ltr;
  display: inline-block;
  unicode-bidi: isolate;
}

[data-theme="light"] .ai-formula-badge {
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: #1D4ED8;
}

.ai-inline-math {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 800;
  color: #F87171;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  direction: ltr;
  display: inline-block;
  unicode-bidi: isolate;
  margin: 0 0.2rem;
}

[data-theme="light"] .ai-inline-math {
  background: #FEF2F2;
  border-color: #FECACA;
  color: #DC2626;
}

/* ==========================================================================
   4. Interactive Neural Simulation Terminal (Adaptive Dark/Light & Responsive)
   ========================================================================== */
.console-card {
  background: #070B14;
  border: 1px solid var(--border-glass-hover);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  transition: var(--transition-fast);
}

[data-theme="light"] .console-card {
  background: #FFFFFF;
  border-color: #CBD5E1;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.console-header {
  background: #0D1322;
  border-bottom: 1px solid #1E293B;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: nowrap;
}

[data-theme="light"] .console-header {
  background: #F8FAFC;
  border-bottom-color: #E2E8F0;
}

.console-left-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.console-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.console-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot.red { background: #EF4444; }
.dot.yellow { background: #F59E0B; }
.dot.green { background: #10B981; }

.console-title-text {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: #94A3B8;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="light"] .console-title-text {
  color: #334155;
}

.console-status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34D399;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  flex-shrink: 0;
  width: auto !important;
  height: auto !important;
}

[data-theme="light"] .console-status-badge {
  background: #ECFDF5;
  border-color: #A7F3D0;
  color: #059669;
}

.pulse-green-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
  animation: pulseGreen 2s infinite;
  flex-shrink: 0;
}

.console-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Desktop Scenario Selector Grid */
.scenario-selector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.scenario-btn {
  background: #111827;
  border: 1px solid #374151;
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: #9CA3AF;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: var(--transition-fast);
  text-align: right;
  line-height: 1.4;
}

[data-theme="light"] .scenario-btn {
  background: #F8FAFC;
  border-color: #CBD5E1;
  color: #475569;
}

.scenario-btn:hover {
  background: #1F2937;
  color: #F9FAFB;
  border-color: #60A5FA;
}

[data-theme="light"] .scenario-btn:hover {
  background: #E2E8F0;
  color: #0F172A;
  border-color: #3B82F6;
}

.scenario-btn.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: #3B82F6;
  color: #60A5FA;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.25);
}

[data-theme="light"] .scenario-btn.active {
  background: #EFF6FF;
  border-color: #2563EB;
  color: #1D4ED8;
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.15);
}

/* Mobile Scenario Custom Modal Toggle (Desktop Hidden) */
.scenario-mobile-modal-toggle {
  display: none;
  width: 100%;
}

.scenario-mobile-trigger-btn {
  width: 100%;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1.5px solid var(--quantum-blue);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  color: #F8FAFC;
  font-size: 0.85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  text-align: right;
}

[data-theme="light"] .scenario-mobile-trigger-btn {
  background: linear-gradient(135deg, #EFF6FF 0%, #FFFFFF 100%);
  border-color: #2563EB;
  color: #1E3A8A;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.08);
}

.trigger-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  flex: 1;
}

.trigger-left span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trigger-arrow {
  font-size: 0.8rem;
  color: var(--quantum-blue-light);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

/* Mobile Custom Scenario Modal Sheet */
.scenario-custom-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.scenario-custom-modal.open {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.scenario-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}

.scenario-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 500px;
  background: #0F172A;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  border: 1px solid var(--border-glass-hover);
  border-bottom: none;
  padding: 1.25rem 1.25rem 2rem 1.25rem;
  z-index: 10;
  animation: slideUpModal 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

[data-theme="light"] .scenario-modal-dialog {
  background: #FFFFFF;
  border-color: #CBD5E1;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
}

@keyframes slideUpModal {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.scenario-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 0.85rem;
  margin-bottom: 1rem;
}

[data-theme="light"] .scenario-modal-head {
  border-bottom-color: #E2E8F0;
}

.modal-head-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.scenario-modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
}

.scenario-modal-close-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.scenario-modal-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.scenario-modal-option {
  background: rgba(30, 41, 59, 0.6);
  border: 1.5px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
  text-align: right;
  transition: var(--transition-fast);
  color: var(--text-secondary);
}

[data-theme="light"] .scenario-modal-option {
  background: #F8FAFC;
  border-color: #E2E8F0;
}

.scenario-modal-option:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: var(--quantum-blue);
  color: var(--text-primary);
}

[data-theme="light"] .scenario-modal-option:hover {
  background: #EFF6FF;
  border-color: #3B82F6;
}

.scenario-modal-option.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--quantum-blue);
  color: #60A5FA;
}

[data-theme="light"] .scenario-modal-option.active {
  background: #EFF6FF;
  border-color: #2563EB;
  color: #1D4ED8;
}

.opt-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.opt-body {
  flex: 1;
  min-width: 0;
}

.opt-title {
  font-size: 0.85rem;
  font-weight: 800;
  margin-bottom: 0.2rem;
  white-space: normal;
  line-height: 1.35;
}

.opt-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.opt-check {
  font-size: 1.1rem;
  color: var(--quantum-blue-light);
  opacity: 0;
  flex-shrink: 0;
}

.scenario-modal-option.active .opt-check {
  opacity: 1;
}

/* Terminal Screen Output */
.terminal-screen {
  background: #030712;
  border: 1px solid #1F2937;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.7;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  direction: ltr;
  text-align: left;
}

[data-theme="light"] .terminal-screen {
  background: #0B132B;
  border-color: #1E293B;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
}

.terminal-log-line {
  animation: fadeInMsg 0.2s ease-out;
}

.log-system { color: #9CA3AF; }
.log-success { color: #34D399; }
.log-highlight { color: #60A5FA; }
.log-gold { color: #FBBF24; }
.log-danger { color: #F87171; font-weight: 700; }

.console-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #1F2937;
  padding-top: 1rem;
}

[data-theme="light"] .console-footer-bar {
  border-top-color: #E2E8F0;
}

.btn-execute-sim {
  background: linear-gradient(135deg, var(--quantum-blue), #2563EB);
  border: none;
  border-radius: var(--radius-md);
  padding: 0.65rem 1.25rem;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-bounce);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-execute-sim:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 25px rgba(59, 130, 246, 0.6);
}

.sim-speed-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--instant-green);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

[data-theme="light"] .sim-speed-badge {
  color: #059669;
}

/* ==========================================================================
   5. Security & Privacy Matrix Table (Horizontally Scrollable Container)
   ========================================================================== */
.matrix-table-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  margin: 1.5rem 0;
}

[data-theme="light"] .matrix-table-wrap {
  background: #FFFFFF;
  border-color: #CBD5E1;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.sovereign-matrix-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.sovereign-matrix-table th {
  background: rgba(15, 23, 42, 0.95);
  color: var(--quantum-blue-light);
  padding: 1.1rem 1.25rem;
  text-align: right;
  font-weight: 800;
  border-bottom: 1px solid var(--border-glass);
  white-space: nowrap;
}

[data-theme="light"] .sovereign-matrix-table th {
  background: #F8FAFC;
  color: #1E3A8A;
  border-bottom-color: #E2E8F0;
}

.sovereign-matrix-table td {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border-glass);
  color: var(--text-secondary);
  line-height: 1.6;
}

[data-theme="light"] .sovereign-matrix-table td {
  border-bottom-color: #F1F5F9;
}

.sovereign-matrix-table tr:last-child td {
  border-bottom: none;
}

.text-danger { color: #EF4444; }
.text-success { color: var(--instant-green); }

/* ==========================================================================
   6. Mobile & Viewport Responsiveness
   ========================================================================== */
@media (max-width: 1024px) {
  .ai-pillars-grid {
    grid-template-columns: 1fr;
  }

  .ai-hero-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .scenario-selector-grid {
    display: none;
  }

  .scenario-mobile-modal-toggle {
    display: flex;
  }

  .console-header {
    padding: 0.75rem 0.85rem;
    gap: 0.5rem;
  }

  .console-title-text {
    font-size: 0.72rem;
  }

  .console-status-badge {
    font-size: 0.68rem;
    padding: 0.18rem 0.5rem;
  }

  .console-body {
    padding: 1rem;
    gap: 1rem;
  }

  .terminal-screen {
    padding: 1rem;
    font-size: 0.78rem;
  }
}

@media (max-width: 640px) {
  .ai-hero-title {
    font-size: 1.75rem;
  }

  .ai-hero-metrics {
    grid-template-columns: 1fr;
  }

  .sovereign-caution-banner {
    flex-direction: column;
  }

  .console-footer-bar {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
  }

  .btn-execute-sim {
    justify-content: center;
    width: 100%;
  }

  .sim-speed-badge {
    justify-content: center;
  }
}
