/* ==========================================================================
   Dómnir: Dark Engineering Observatory Stylesheet
   Theme: Runes & Ragnarok with Stained Glass & Bayer Matrix Dithering
   Zero external runtime dependencies. Zero em dashes. Zero emojis.
   ========================================================================== */

:root {
  --bg-core: #05070d;
  --bg-card: rgba(13, 19, 33, 0.72);
  --bg-surface: rgba(18, 25, 44, 0.65);
  --bg-subtle: rgba(24, 33, 56, 0.5);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-specular: rgba(255, 255, 255, 0.18);
  --border-focus: #06b6d4;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  --accent-cyan: #06b6d4;
  --accent-blue: #38bdf8;
  --accent-emerald: #10b981;
  --accent-amber: #fa7314;
  --accent-ember: #ea580c;
  --accent-rose: #f43f5e;

  --glass-bg: linear-gradient(135deg, rgba(13, 19, 33, 0.75) 0%, rgba(8, 12, 22, 0.85) 100%);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-specular: rgba(255, 255, 255, 0.18);
  --glass-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.7), 0 0 24px -6px rgba(250, 115, 20, 0.08);
  --caustic-glow-amber: radial-gradient(circle at 50% 0%, rgba(250, 115, 20, 0.12) 0%, transparent 70%);
  --caustic-glow-cyan: radial-gradient(circle at 50% 0%, rgba(6, 182, 212, 0.12) 0%, transparent 70%);

  --font-mono: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;

  --shadow-card: 0 8px 28px rgba(0, 0, 0, 0.55);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-core);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(250, 115, 20, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 85% 60%, rgba(6, 182, 212, 0.04) 0%, transparent 45%),
    radial-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 16px 16px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Bayer Matrix Dither Overlay Texture */
.dither-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 0% 0%, rgba(250, 115, 20, 0.04) 1px, transparent 1px);
  background-size: 8px 8px, 16px 16px;
  background-position: 0 0, 4px 4px;
}

/* ==========================================================================
   Header & System Status Bar
   ========================================================================== */

.app-header {
  background: var(--glass-bg);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  padding: 0.85rem 1.75rem;
  position: relative;
  z-index: 10;
}

.header-container {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo-img {
  display: block;
  filter: drop-shadow(0 0 12px rgba(6, 182, 212, 0.35));
  transition: transform 0.3s ease, filter 0.3s ease;
}

.brand-logo-img:hover {
  transform: rotate(45deg) scale(1.05);
  filter: drop-shadow(0 0 18px rgba(250, 115, 20, 0.5));
}

.brand {
  display: flex;
  flex-direction: column;
}

.brand-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.brand-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent-amber);
  background: rgba(250, 115, 20, 0.12);
  border: 1px solid rgba(250, 115, 20, 0.3);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.brand-tag-secondary {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  text-transform: uppercase;
}

.brand-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ffffff;
  background: linear-gradient(135deg, #ffffff 40%, rgba(255, 255, 255, 0.75) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.brand-tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.system-status-bar {
  display: flex;
  align-items: center;
  background: rgba(8, 12, 22, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px 10px;
  gap: 14px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot-ok {
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.7);
}

.dot-err {
  background-color: var(--accent-rose);
  box-shadow: 0 0 8px rgba(244, 63, 94, 0.7);
}

.dot-warn {
  background-color: var(--accent-amber);
  box-shadow: 0 0 8px rgba(250, 115, 20, 0.7);
}

.dot-unknown {
  background-color: var(--text-subtle);
}

.status-label {
  color: var(--text-muted);
  font-weight: 600;
}

.status-val {
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 11px;
}

/* ==========================================================================
   Navigation Tabs
   ========================================================================== */

.nav-tabs {
  background: rgba(8, 12, 22, 0.85);
  border-bottom: 1px solid var(--border-color);
  padding: 0 1.75rem;
  position: relative;
  z-index: 9;
}

.nav-container {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  gap: 4px;
  overflow-x: auto;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.nav-tab.active {
  color: #ffffff;
  border-bottom-color: var(--accent-amber);
  background: linear-gradient(180deg, transparent 0%, rgba(250, 115, 20, 0.08) 100%);
}

.tab-icon {
  fill: currentColor;
  opacity: 0.8;
}

.nav-tab.active .tab-icon {
  opacity: 1;
  color: var(--accent-amber);
}

/* ==========================================================================
   Main Content & Stepper Progress
   ========================================================================== */

.main-content {
  flex: 1;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.75rem 3rem 1.75rem;
  position: relative;
  z-index: 1;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.stepper-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-top: 1px solid var(--glass-border-specular);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
  gap: 16px;
  flex-wrap: wrap;
}

.stepper-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  overflow-x: auto;
}

.step-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 6px 12px;
  cursor: pointer;
  color: var(--text-muted);
  text-align: left;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.step-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.step-btn.active {
  background: rgba(250, 115, 20, 0.12);
  border-color: rgba(250, 115, 20, 0.35);
  color: #ffffff;
}

.step-btn.completed {
  color: var(--accent-emerald);
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.step-btn.active .step-number {
  background: var(--accent-amber);
  border-color: var(--accent-amber);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(250, 115, 20, 0.6);
}

.step-btn.completed .step-number {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
}

.step-info {
  display: flex;
  flex-direction: column;
}

.step-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.step-desc {
  font-size: 10px;
  color: var(--text-subtle);
  font-family: var(--font-mono);
}

.step-line {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  min-width: 20px;
}

.step-line.completed {
  background: var(--accent-emerald);
}

/* ==========================================================================
   Card System (Stained Glass Windows)
   ========================================================================== */

.card {
  background: var(--glass-bg);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--glass-border);
  border-top: 1px solid var(--glass-border-specular);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--caustic-glow-amber);
  opacity: 0.4;
  pointer-events: none;
}

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
}

.card-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: rgba(250, 115, 20, 0.08);
  border: 1px solid rgba(250, 115, 20, 0.25);
  color: var(--accent-amber);
  margin-right: 14px;
  flex-shrink: 0;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.card-body {
  padding: 24px;
  position: relative;
  z-index: 1;
}

.badge-step {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-amber);
  background: rgba(250, 115, 20, 0.1);
  border: 1px solid rgba(250, 115, 20, 0.25);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}

/* ==========================================================================
   Buttons & Controls
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
}

.btn-primary {
  background: linear-gradient(135deg, #fa7314 0%, #ea580c 100%);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #fb923c 0%, #fa7314 100%);
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.16);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-cyan);
  color: #ffffff;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-success:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
  transform: translateY(-1px);
}

.btn-tour {
  background: rgba(6, 182, 212, 0.1);
  color: var(--accent-cyan);
  border-color: rgba(6, 182, 212, 0.25);
}

.btn-tour:hover {
  background: rgba(6, 182, 212, 0.18);
  border-color: var(--accent-cyan);
}

.btn-icon {
  flex-shrink: 0;
}

/* ==========================================================================
   Symmetric Dual Observatory Grid Architecture
   ========================================================================== */

.workspace-grid {
  display: block;
}

.workspace-grid.expanded-mode,
.master-observatory-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: stretch;
}

.column-synthesis,
.column-adjudication {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.workspace-grid.expanded-mode .stepper-panel {
  display: block !important;
  margin-bottom: 0;
}

.workspace-grid.expanded-mode .card-stepper {
  margin-bottom: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.workspace-grid.expanded-mode .card-body {
  flex: 1;
}

/* Single Step Mode */
.workspace-grid:not(.expanded-mode) .column-synthesis,
.workspace-grid:not(.expanded-mode) .column-adjudication {
  display: contents;
}

.workspace-grid:not(.expanded-mode) .stepper-panel {
  display: none;
}

.workspace-grid:not(.expanded-mode) .stepper-panel.active {
  display: block;
}

/* ==========================================================================
   Crazyflie 2 MuJoCo Plant 3D Visual Hero Accent
   ========================================================================== */

.plant-hero-card {
  background: linear-gradient(135deg, rgba(13, 19, 33, 0.85) 0%, rgba(6, 10, 18, 0.95) 100%);
  border: 1px solid var(--glass-border);
  border-top: 1px solid rgba(250, 115, 20, 0.3);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
}

.plant-hero-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
}

.plant-hero-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.plant-hero-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.plant-status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.pulse-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
  animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.plant-visual-stage {
  position: relative;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, rgba(250, 115, 20, 0.07) 0%, transparent 65%);
}

.runic-halo-ring {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 1px dashed rgba(250, 115, 20, 0.25);
  box-shadow: 0 0 30px rgba(250, 115, 20, 0.08), inset 0 0 20px rgba(6, 182, 212, 0.05);
  pointer-events: none;
  animation: rotateRing 40s linear infinite;
}

@keyframes rotateRing {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.crazyflie-hero-img {
  position: relative;
  z-index: 2;
  max-width: 280px;
  height: auto;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 16px rgba(250, 115, 20, 0.25));
  transition: transform 0.4s ease;
}

.crazyflie-hero-img:hover {
  transform: translateY(-4px) scale(1.03);
}

.telemetry-hud-overlay {
  position: absolute;
  inset: 12px;
  pointer-events: none;
  z-index: 3;
}

.hud-tag {
  position: absolute;
  display: flex;
  flex-direction: column;
  background: rgba(8, 12, 22, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-family: var(--font-mono);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.tag-top-left { top: 6px; left: 6px; }
.tag-top-right { top: 6px; right: 6px; align-items: flex-end; }
.tag-bottom-left { bottom: 6px; left: 6px; }
.tag-bottom-right { bottom: 6px; right: 6px; align-items: flex-end; }

.hud-label {
  font-size: 8px;
  color: var(--text-subtle);
  letter-spacing: 0.08em;
  font-weight: 700;
}

.hud-val {
  font-size: 11px;
  color: var(--accent-cyan);
  font-weight: 700;
}

/* ==========================================================================
   Step 1: Presets & Form Controls
   ========================================================================== */

.presets-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.preset-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.preset-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.preset-chip.active {
  background: rgba(250, 115, 20, 0.15);
  border-color: var(--accent-amber);
  color: #ffffff;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.unit-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 1px 4px;
  border-radius: 2px;
}

.form-control {
  background: rgba(8, 12, 22, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 8px 12px;
  outline: none;
  transition: all 0.2s ease;
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

.form-hint {
  font-size: 11px;
  color: var(--text-subtle);
  margin-top: 4px;
}

.stat-badge {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.2);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-md);
}

.form-advanced-toggle {
  grid-column: 1 / -1;
  margin-top: 6px;
}

.advanced-fields-box {
  grid-column: 1 / -1;
  background: rgba(8, 12, 22, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 8px;
}

.advanced-fields-box.collapsed {
  display: none;
}

.form-actions-split {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.form-feedback {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-family: var(--font-mono);
}

.form-feedback.success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
}

.form-feedback.error {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: var(--accent-rose);
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   Step 2: Model Selection & Reasoning Effort
   ========================================================================== */

.model-selection-wrapper {
  margin-bottom: 20px;
}

.model-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.model-card {
  background: rgba(8, 12, 22, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.model-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.2);
}

.model-card.active {
  background: rgba(250, 115, 20, 0.1);
  border-color: var(--accent-amber);
  box-shadow: 0 0 16px rgba(250, 115, 20, 0.15);
}

.model-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.model-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.model-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 1px 5px;
  border-radius: var(--radius-sm);
}

.model-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 8px;
}

.model-specs {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.model-spec-item {
  font-size: 10px;
  color: var(--text-subtle);
  font-family: var(--font-mono);
}

.reasoning-effort-wrapper {
  background: rgba(8, 12, 22, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 20px;
}

.reasoning-effort-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.reasoning-hint {
  font-size: 11px;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.reasoning-pill-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.reasoning-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reasoning-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.reasoning-pill.active {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--accent-cyan);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.generation-cta-box {
  margin-bottom: 20px;
}

.cta-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.cta-hint {
  font-size: 11px;
  color: var(--text-subtle);
}

.cta-hint code {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

/* ==========================================================================
   Canvas-Styled Code Box with Line Numbers & Copy
   ========================================================================== */

.code-preview-card {
  background: #04060a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6);
}

.code-header {
  background: rgba(13, 19, 33, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.code-header-left,
.code-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.code-lang {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--accent-emerald);
}

.badge-outline {
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
}

.font-mono {
  font-family: var(--font-mono);
}

.contract-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-amber);
  background: rgba(250, 115, 20, 0.1);
  border: 1px solid rgba(250, 115, 20, 0.25);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.code-body-canvas {
  display: flex;
  min-height: 220px;
  max-height: 380px;
  background: #04060a;
  position: relative;
}

.code-line-numbers {
  width: 44px;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.02);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  text-align: right;
  user-select: none;
  overflow: hidden;
  white-space: pre;
}

.controller-editor {
  flex: 1;
  background: transparent;
  border: none;
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  padding: 12px 14px;
  resize: vertical;
  outline: none;
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
}

/* ==========================================================================
   Step 3: Containment Assurance & Execution Parameters
   ========================================================================== */

.containment-assurance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.assurance-card {
  background: rgba(8, 12, 22, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.assurance-icon {
  flex-shrink: 0;
  padding-top: 2px;
}

.text-emerald { color: var(--accent-emerald); }
.text-cyan { color: var(--accent-cyan); }
.text-amber { color: var(--accent-amber); }
.text-blue { color: var(--accent-blue); }

.assurance-content {
  display: flex;
  flex-direction: column;
}

.assurance-title {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
}

.assurance-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
}

.assurance-desc code {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.execution-params-box {
  background: rgba(8, 12, 22, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 24px;
}

.section-heading {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}

.toggle-control {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: 0.2s;
  border-radius: 22px;
  border: 1px solid var(--border-color);
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: #ffffff;
  transition: 0.2s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-cyan);
}

input:checked + .slider:before {
  transform: translateX(18px);
}

.toggle-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

.launch-cta-box {
  margin-bottom: 20px;
}

/* ==========================================================================
   Step 4: Flight Telemetry & Altitude SVG Chart
   ========================================================================== */

.tracker-card {
  background: rgba(8, 12, 22, 0.75);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 20px;
}

.tracker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.tracker-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.tracker-val {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-amber);
}

.state-nodes {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
}

.state-node {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-subtle);
  white-space: nowrap;
}

.state-node.active {
  background: rgba(250, 115, 20, 0.15);
  border-color: var(--accent-amber);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(250, 115, 20, 0.3);
}

.state-node.completed {
  background: rgba(16, 185, 129, 0.12);
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
}

.alert-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.alert-danger {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #ffffff;
}

.alert-icon {
  color: var(--accent-rose);
  flex-shrink: 0;
}

.alert-title {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 2px;
}

.alert-message {
  font-size: 12px;
  color: #fecdd3;
  font-family: var(--font-mono);
}

.telemetry-chart-card {
  background: #030509;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 20px;
}

.chart-header {
  background: rgba(13, 19, 33, 0.85);
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.chart-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.chart-subtitle {
  font-size: 11px;
  color: var(--text-muted);
}

.chart-meta {
  display: flex;
  gap: 6px;
}

.chart-wrapper {
  position: relative;
  width: 100%;
  height: 280px;
  background: #030509;
}

.altitude-svg-chart {
  width: 100%;
  height: 100%;
  display: block;
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(8, 12, 22, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid var(--accent-cyan);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  z-index: 10;
}

.telemetry-metrics-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  background: rgba(13, 19, 33, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 16px;
  gap: 12px;
}

.metric-col {
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 10px;
  color: var(--text-subtle);
  font-weight: 600;
  text-transform: uppercase;
}

.metric-num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

/* ==========================================================================
   Adjudication & Deterministic Replay
   ========================================================================== */

.adjudication-card {
  background: rgba(8, 12, 22, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
}

.adjudication-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.adjudication-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.adjudication-subtitle {
  font-size: 11px;
  color: var(--text-muted);
}

.replay-status-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.replay-label {
  font-size: 11px;
  color: var(--text-muted);
}

.replay-val {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-emerald);
}

.verdicts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.verdict-box {
  background: rgba(13, 19, 33, 0.65);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.verdict-tag {
  font-size: 10px;
  color: var(--text-subtle);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.verdict-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  width: fit-content;
  margin-bottom: 6px;
}

.verdict-pass {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--accent-emerald);
}

.verdict-fail {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: var(--accent-rose);
}

.verdict-unknown {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
}

.verdict-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
}

.mandatory-disclosure-box {
  background: rgba(250, 115, 20, 0.08);
  border: 1px solid rgba(250, 115, 20, 0.25);
  border-radius: var(--radius-md);
  padding: 14px;
}

.disclosure-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.disclosure-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-amber);
  color: #000000;
  font-weight: 800;
  font-size: 11px;
}

.disclosure-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-amber);
  letter-spacing: 0.06em;
}

.disclosure-text {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.45;
}

.court-export-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(8, 12, 22, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.export-left {
  display: flex;
  flex-direction: column;
}

.export-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.export-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.export-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Tab 2: Court Record Verifier
   ========================================================================== */

.verifier-container {
  max-width: 1000px;
  margin: 0 auto;
}

.drop-zone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(8, 12, 22, 0.4);
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.06);
}

.drop-zone-icon {
  color: var(--accent-cyan);
  margin-bottom: 12px;
}

.drop-zone-text {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.drop-zone-text code {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.file-input-hidden {
  display: none;
}

.verifier-or-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.verifier-or-divider::before,
.verifier-or-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.verifier-or-divider span {
  padding: 0 12px;
}

.verifier-textarea {
  width: 100%;
  height: 140px;
  background: #04060a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 12px;
  outline: none;
  resize: vertical;
}

.verifier-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
}

.verify-results-card {
  margin-top: 24px;
  background: rgba(8, 12, 22, 0.85);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
}

.verify-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.verify-overall-badge {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--accent-emerald);
}

.verify-overall-badge.failed {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: var(--accent-rose);
}

.verify-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.verify-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.verify-table-wrapper {
  overflow-x: auto;
}

.verify-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.verify-table th,
.verify-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.verify-table th {
  color: var(--text-subtle);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.verify-errors-box {
  margin-top: 16px;
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.3);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.errors-heading {
  font-size: 12px;
  color: var(--accent-rose);
  margin-bottom: 6px;
}

.errors-list {
  padding-left: 20px;
  font-size: 11px;
  color: #fecdd3;
  font-family: var(--font-mono);
}

/* ==========================================================================
   Tab 3: Containment Audit
   ========================================================================== */

.containment-container {
  max-width: 1400px;
  margin: 0 auto;
}

.containment-header-card {
  padding: 24px;
  margin-bottom: 24px;
}

.containment-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.containment-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-amber);
  background: rgba(250, 115, 20, 0.12);
  border: 1px solid rgba(250, 115, 20, 0.3);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
}

.containment-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.status-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.badge-warning {
  background: rgba(250, 115, 20, 0.15);
  border: 1px solid rgba(250, 115, 20, 0.35);
  color: var(--accent-amber);
}

.badge-default {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
}

.containment-meta-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.meta-item {
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-size: 10px;
  color: var(--text-subtle);
  font-weight: 600;
  text-transform: uppercase;
}

.meta-val {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #ffffff;
  margin-top: 2px;
}

.meta-highlight {
  color: var(--accent-emerald);
}

.containment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.fixture-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

.fixture-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.fixture-id-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.fixture-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.fixture-summary {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 14px;
}

.fixture-details-box {
  background: rgba(8, 12, 22, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
}

.fixture-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
}

.row-label {
  color: var(--text-subtle);
}

.row-val {
  color: #ffffff;
}

.containment-bottom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.audit-log-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.log-row {
  display: flex;
  flex-direction: column;
  font-size: 11px;
}

.log-label {
  color: var(--text-subtle);
  font-size: 10px;
}

.log-val {
  color: #ffffff;
  word-break: break-all;
}

.limitations-list {
  padding-left: 20px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ==========================================================================
   Tab 4: Trust Architecture & Ragnarok Knowledge Oracle
   ========================================================================== */

.architecture-container {
  max-width: 1300px;
  margin: 0 auto;
}

/* Ragnarok Knowledge Oracle UI */
.oracle-search-box {
  background: rgba(8, 12, 22, 0.75);
  border: 1px solid rgba(250, 115, 20, 0.25);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.oracle-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #04060a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 14px;
}

.oracle-input-row:focus-within {
  border-color: var(--accent-amber);
  box-shadow: 0 0 0 2px rgba(250, 115, 20, 0.2);
}

.oracle-search-icon {
  color: var(--accent-amber);
  flex-shrink: 0;
}

.oracle-search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
}

.oracle-topic-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.topic-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.topic-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.topic-pill.active {
  background: rgba(250, 115, 20, 0.15);
  border-color: var(--accent-amber);
  color: #ffffff;
}

.oracle-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 18px;
  margin-bottom: 32px;
}

.oracle-card {
  background: rgba(8, 12, 22, 0.7);
  border: 1px solid var(--border-color);
  border-top: 1px solid rgba(250, 115, 20, 0.25);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
}

.oracle-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.oracle-card-topic {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--accent-amber);
  background: rgba(250, 115, 20, 0.1);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.oracle-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.oracle-card-body {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 12px;
}

.oracle-snippet-box {
  background: #04060a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 10px;
  position: relative;
  margin-top: auto;
}

.oracle-snippet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.oracle-snippet-lang {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-subtle);
}

.oracle-snippet-code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.4;
}

/* Principles Grid */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.principle-card {
  background: rgba(8, 12, 22, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
}

.principle-num {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-amber);
  margin-bottom: 6px;
}

.principle-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.principle-text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.model-catalog-section {
  margin-top: 24px;
}

.catalog-table-wrapper {
  overflow-x: auto;
  margin-top: 12px;
}

.catalog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.catalog-table th,
.catalog-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.catalog-table th {
  color: var(--text-subtle);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(8, 12, 22, 0.5);
}

.catalog-table td code {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.app-footer {
  background: rgba(8, 12, 22, 0.9);
  border-top: 1px solid var(--border-color);
  padding: 1rem 1.75rem;
  font-size: 11px;
  color: var(--text-subtle);
  position: relative;
  z-index: 10;
}

.footer-container {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-left,
.footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Guided Tour Modal & Toasts
   ========================================================================== */

.tour-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.tour-backdrop.hidden {
  display: none;
}

.tour-card {
  background: var(--glass-bg);
  backdrop-filter: blur(28px);
  border: 1px solid var(--glass-border);
  border-top: 1px solid var(--glass-border-specular);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  position: relative;
}

.tour-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.tour-step-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-amber);
  background: rgba(250, 115, 20, 0.12);
  border: 1px solid rgba(250, 115, 20, 0.3);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
}

.tour-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
}

.tour-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.tour-content {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.tour-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tour-nav-buttons {
  display: flex;
  gap: 8px;
}

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2000;
  pointer-events: none;
}

.toast {
  background: rgba(8, 12, 22, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  color: #ffffff;
  font-size: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
  animation: slideIn 0.25s ease;
  max-width: 360px;
}

.toast.toast-success {
  border-color: rgba(16, 185, 129, 0.4);
}

.toast.toast-error {
  border-color: rgba(244, 63, 94, 0.4);
}

.toast.toast-info {
  border-color: rgba(6, 182, 212, 0.4);
}

@keyframes slideIn {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

@media (max-width: 1024px) {
  .workspace-grid.expanded-mode,
  .master-observatory-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  
  .system-status-bar {
    width: 100%;
    justify-content: space-between;
  }
}
