

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&family=Space+Grotesk:wght@400;500;700&display=swap');


:root {
  --bg-base:         #020408;
  --bg-surface:      #0a0f1a;
  --bg-elevated:     #0f1629;
  --bg-glass:        rgba(15, 22, 41, 0.55);
  --bg-glass-hover:  rgba(20, 30, 55, 0.75);

  --cyan:            #00f5ff;
  --cyan-dim:        rgba(0, 245, 255, 0.15);
  --cyan-glow:       rgba(0, 245, 255, 0.35);

  --violet:          #a855f7;
  --violet-dim:      rgba(168, 85, 247, 0.15);
  --violet-glow:     rgba(168, 85, 247, 0.35);

  --amber:           #f59e0b;
  --green:           #10b981;
  --rose:            #f43f5e;

  --text-primary:    #f1f5f9;
  --text-secondary:  #94a3b8;
  --text-muted:      #94a3b8;

  --border:          rgba(99, 130, 200, 0.12);
  --border-glow:     rgba(0, 245, 255, 0.25);

  --radius-sm:       8px;
  --radius-md:       16px;
  --radius-lg:       24px;
  --radius-xl:       32px;

  --font-sans:       'Inter', 'Space Grotesk', sans-serif;
  --font-mono:       'JetBrains Mono', monospace;
  --font-display:    'Space Grotesk', 'Inter', sans-serif;

  --transition:      0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-glass:    0 8px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06);
  --shadow-glow-c:   0 0 40px rgba(0,245,255,0.15);
  --shadow-glow-v:   0 0 40px rgba(168,85,247,0.15);
}


*, *::before, *::after {
  box-sizing: border-box !important;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
  line-height: 1.6;
}

#app, .section, .hero-section, main {
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}


::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--violet); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan); }


#particle-canvas {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
  opacity: 0.6;
}


.gradient-text {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--violet) 60%, #f59e0b 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-panel {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: var(--shadow-glass);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.glass-panel:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glass), var(--shadow-glow-c);
}


#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 72px;
  padding: 0 2rem;
  background: rgba(3, 7, 18, 0.88);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  display: flex;
  align-items: center;
  transition: background var(--transition), border-color var(--transition);
}


.nav-inner {
  width: 100%;
  max-width: 1720px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1rem, 2vw, 2.2rem);
}


.nav-left {
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
}
.nav-logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  flex-shrink: 0;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.nav-logo:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}
.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  filter: drop-shadow(0 0 12px rgba(0, 245, 255, 0.4));
  animation: logo-spin 14s linear infinite;
}
@keyframes logo-spin { to { transform: rotate(360deg); } }
.nav-brand-text {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
}
.logo-text {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1;
  background: linear-gradient(135deg, #00f5ff 0%, #38bdf8 40%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 8px rgba(0, 245, 255, 0.25));
}
.logo-tag {
  font-family: var(--font-mono);
  font-size: 0.60rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.16em;
  line-height: 1;
  border: 1px solid rgba(0, 245, 255, 0.35);
  background: rgba(0, 245, 255, 0.08);
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 0 10px rgba(0, 245, 255, 0.15);
}


.nav-center {
  flex: 1 1 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.nav-links {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  list-style: none;
  margin: 0;
  padding: 0.32rem 0.55rem;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 20px rgba(0, 0, 0, 0.38);
  border-radius: 9999px;
  flex-shrink: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links li {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-shrink: 0;
}
.nav-link {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.38rem;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  font-family: var(--font-sans);
  line-height: 1;
  padding: 0.46rem 0.76rem;
  border-radius: 9999px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  white-space: nowrap;
}
.nav-link:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}
.nav-link.active {
  color: #00f5ff;
  border-color: rgba(0, 245, 255, 0.35);
  background: rgba(0, 245, 255, 0.12);
  box-shadow: 0 0 16px rgba(0, 245, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  font-weight: 600;
}


.nav-right {
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
}
.nav-status {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-shrink: 0;
}
.nav-status .nav-btn,
.nav-status .btn-secondary,
.nav-status .btn-primary {
  height: 36px;
  padding: 0 0.85rem !important;
  font-size: 0.76rem !important;
  font-weight: 600;
  line-height: 1;
  border-radius: 9px;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}
.nav-status .btn-secondary {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: #e2e8f0;
}
.nav-status .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  transform: translateY(-1px);
}
#key-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 0.75rem;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
#key-status.demo {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
#key-status.active {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}
#pwa-install-btn {
  background: rgba(0, 245, 255, 0.08) !important;
  border: 1px solid rgba(0, 245, 255, 0.38) !important;
  color: var(--cyan) !important;
}
#pwa-install-btn:hover {
  background: rgba(0, 245, 255, 0.18) !important;
  border-color: rgba(0, 245, 255, 0.65) !important;
  box-shadow: 0 0 14px rgba(0, 245, 255, 0.25);
  transform: translateY(-1px);
}
#nav-auth-btn {
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.9) 0%, rgba(168, 85, 247, 0.9) 100%) !important;
  color: #030712 !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 14px rgba(0, 245, 255, 0.35);
}
#nav-auth-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 22px rgba(0, 245, 255, 0.55);
  filter: brightness(1.1);
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 4px var(--green); }
  50%       { box-shadow: 0 0 16px var(--green); }
}
.status-text { font-family: var(--font-mono); font-size: 0.7rem; color: var(--green); letter-spacing: 0.15em; }


.section {
  position: relative; z-index: 1;
  padding: 100px 2rem 80px;
  max-width: 1400px; margin: 0 auto;
}
.section-header { text-align: center; margin-bottom: 3rem; width: 100%; max-width: 100%; box-sizing: border-box; }
.section-tag {
  display: inline-block;
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--cyan); letter-spacing: 0.08em;
  border: 1px solid var(--cyan-dim); padding: 4px 12px;
  border-radius: 20px; background: var(--cyan-dim);
  margin-bottom: 1rem;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
  box-sizing: border-box;
  line-height: 1.4;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700; line-height: 1.15;
  background: linear-gradient(135deg, var(--text-primary) 40%, var(--cyan) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 1rem;
  max-width: 100%;
  word-break: normal;
  overflow-wrap: break-word;
  box-sizing: border-box;
}
.section-desc {
  color: var(--text-secondary); font-size: 1.05rem;
  max-width: 600px; margin: 0 auto;
  box-sizing: border-box;
}


.hero-section {
  min-height: 100vh; padding-top: 120px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 3rem; max-width: 1400px; margin: 0 auto;
}
.hero-content { flex: 1; max-width: 580px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; color: var(--cyan);
  border: 1px solid var(--cyan-dim); padding: 6px 14px;
  border-radius: 20px; background: var(--cyan-dim);
  margin-bottom: 1.5rem;
  animation: fade-in-up 0.6s ease forwards;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); animation: pulse-dot 2s infinite; }
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 800; line-height: 1.05;
  margin-bottom: 1.5rem;
  animation: fade-in-up 0.7s 0.1s ease both;
}
.hero-subtitle-accent {
  background: linear-gradient(90deg, var(--violet) 0%, var(--cyan) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  color: var(--text-secondary); font-size: 1.1rem; line-height: 1.8;
  margin-bottom: 2.5rem;
  animation: fade-in-up 0.8s 0.2s ease both;
}
.hero-cta-row {
  display: flex; flex-direction: column; gap: 1.5rem;
  animation: fade-in-up 0.9s 0.3s ease both;
}
.hero-stat-row { display: flex; gap: 1.5rem; }
.hero-stat { display: flex; flex-direction: column; }
.stat-num {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 700;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { font-size: 0.72rem; color: #94a3b8; font-weight: 500; letter-spacing: 0.08em; }

.hero-visual {
  flex: 1; max-width: 520px;
  position: relative; display: flex; align-items: center; justify-content: center;
  animation: fade-in-up 1s 0.2s ease both;
}
#hero-neural-preview { position: relative; z-index: 2; }
.hero-rings { position: absolute; inset: -20px; pointer-events: none; }
.ring {
  position: absolute; border-radius: 50%;
  border: 1px solid; animation: ring-spin linear infinite;
  top: 50%; left: 50%; transform-origin: center;
}
.ring-1 {
  width:  380px; height: 380px; margin: -190px 0 0 -190px;
  border-color: rgba(0,245,255,0.15);
  animation-duration: 20s;
}
.ring-2 {
  width: 460px; height: 460px; margin: -230px 0 0 -230px;
  border-color: rgba(168,85,247,0.1);
  animation-duration: 30s; animation-direction: reverse;
}
.ring-3 {
  width: 550px; height: 550px; margin: -275px 0 0 -275px;
  border-color: rgba(245,158,11,0.08);
  animation-duration: 45s;
}
@keyframes ring-spin { to { transform: rotate(360deg); } }


.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0.75rem 1.75rem; border-radius: 50px;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--violet) 100%);
  color: var(--bg-base); font-weight: 700; font-size: 0.95rem;
  border: none; cursor: pointer; transition: all var(--transition);
  box-shadow: 0 4px 24px rgba(0,245,255,0.3);
  position: relative; overflow: hidden;
}
.btn-primary::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0; transition: opacity var(--transition);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,245,255,0.45); }
.btn-primary:hover::before { opacity: 1; }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0.65rem 1.25rem; border-radius: var(--radius-sm);
  background: var(--cyan-dim); color: var(--cyan);
  font-weight: 600; font-size: 0.875rem;
  border: 1px solid var(--border-glow); cursor: pointer;
  transition: all var(--transition);
}
.btn-secondary:hover { background: rgba(0,245,255,0.25); transform: translateY(-1px); }
.full-width { width: 100%; justify-content: center; }


.slider {
  width: 100%; height: 4px;
  -webkit-appearance: none; appearance: none;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  border-radius: 2px; cursor: pointer; outline: none;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  border: 2px solid var(--bg-base);
  cursor: pointer;
}
.select-input, .text-input {
  width: 100%; background: rgba(0,0,0,0.3);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-primary); font-family: var(--font-sans);
  font-size: 0.875rem; padding: 0.5rem 0.75rem;
  outline: none; transition: border-color var(--transition);
}
.select-input:focus, .text-input:focus { border-color: var(--cyan); }
.select-input option { background: var(--bg-elevated); }


.panel { padding: 1.25rem; }
.panel-title {
  font-size: 0.75rem; font-weight: 600;
  color: var(--text-secondary); letter-spacing: 0.12em;
  text-transform: uppercase; margin-bottom: 1rem;
}
.control-row {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 1rem; font-size: 0.8rem; color: var(--text-secondary);
}
.control-row label { min-width: 90px; flex-shrink: 0; }
.control-row span { font-family: var(--font-mono); color: var(--cyan); min-width: 24px; text-align: right; }
.stat-item {
  display: flex; justify-content: space-between;
  align-items: center; padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem; color: var(--text-secondary);
}
.stat-val { font-family: var(--font-mono); color: var(--cyan); }


.neural-container {
  display: grid; grid-template-columns: 240px 1fr; gap: 1.5rem;
}
.neural-sidebar { display: flex; flex-direction: column; gap: 1rem; }
.neural-canvas-wrap {
  position: relative; border-radius: var(--radius-md);
  overflow: hidden; border: 1px solid var(--border);
  background: rgba(0,0,0,0.5);
  min-height: 480px;
}
#neural-canvas { width: 100%; height: 100%; display: block; }
.canvas-overlay-label {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 0.65rem;
  color: var(--cyan); opacity: 0.6; letter-spacing: 0.15em;
  pointer-events: none;
}


.agents-container { display: flex; flex-direction: column; gap: 1.5rem; }
.agent-input-row { display: flex; gap: 1rem; }
.agent-input {
  flex: 1; background: var(--bg-glass);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-primary); font-family: var(--font-sans);
  font-size: 0.95rem; padding: 0.75rem 1rem;
  outline: none; transition: border-color var(--transition);
  backdrop-filter: blur(12px);
}
.agent-input:focus { border-color: var(--cyan); }

.agents-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem;
}
.agent-card { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; min-height: 220px; }
.agent-header { display: flex; align-items: center; gap: 0.75rem; }
.agent-icon { font-size: 1.5rem; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 10px; }
.planner-icon  { background: rgba(0,245,255,0.12); }
.critic-icon   { background: rgba(245,158,11,0.12); }
.executor-icon { background: rgba(168,85,247,0.12); }
.verifier-icon { background: rgba(16,185,129,0.12); }
.agent-info { flex: 1; }
.agent-name { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.15em; color: var(--cyan); display: block; }
.agent-role { font-size: 0.8rem; color: var(--text-secondary); display: block; }
.agent-badge {
  font-family: var(--font-mono); font-size: 0.65rem; padding: 3px 8px;
  border-radius: 4px; border: 1px solid;
  transition: all var(--transition);
}
.agent-badge.IDLE      { color: var(--text-muted); border-color: var(--border); }
.agent-badge.THINKING  { color: var(--amber); border-color: var(--amber); background: rgba(245,158,11,0.1); animation: pulse-badge 1s ease infinite; }
.agent-badge.DONE      { color: var(--green); border-color: var(--green); background: rgba(16,185,129,0.1); }
@keyframes pulse-badge { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

.agent-output {
  flex: 1; font-size: 0.82rem; line-height: 1.7;
  color: var(--text-secondary); font-family: var(--font-mono);
  overflow-y: auto; max-height: 140px;
}
.idle-text { color: var(--text-muted); font-style: italic; }
.agent-footer { border-top: 1px solid var(--border); padding-top: 0.5rem; }
.token-count { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-muted); }

.consensus-panel { padding: 1.5rem; }
.consensus-output { font-size: 0.95rem; line-height: 1.8; color: var(--text-primary); }


.graph-container {
  display: grid; grid-template-columns: 220px 1fr; gap: 1.5rem;
  height: 520px;
}
.graph-sidebar { display: flex; flex-direction: column; gap: 1rem; overflow-y: auto; }
.graph-legend { margin-top: 0.75rem; display: flex; flex-direction: column; gap: 0.4rem; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--text-secondary); }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.graph-canvas-wrap {
  position: relative; border-radius: var(--radius-md);
  overflow: hidden; border: 1px solid var(--border);
  background: rgba(0,0,0,0.5);
}
#knowledge-graph { width: 100%; height: 100%; }
.graph-zoom-controls {
  position: absolute; bottom: 12px; right: 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.zoom-btn {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--bg-glass); border: 1px solid var(--border);
  color: var(--text-secondary); font-size: 1rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); backdrop-filter: blur(8px);
}
.zoom-btn:hover { border-color: var(--cyan); color: var(--cyan); }

#node-info-content { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.6; }
.node-info-title { font-weight: 600; color: var(--text-primary); margin-bottom: 0.4rem; }
.node-info-category { font-family: var(--font-mono); font-size: 0.65rem; color: var(--cyan); margin-bottom: 0.5rem; }


.chat-container {
  display: grid; grid-template-columns: 1fr 360px; gap: 1.5rem;
  height: 600px;
}
.chat-main { display: flex; flex-direction: column; overflow: hidden; }
.chat-messages {
  flex: 1; overflow-y: auto; padding: 1.25rem; display: flex;
  flex-direction: column; gap: 1.25rem;
}
.chat-msg { display: flex; gap: 0.75rem; }
.assistant-msg { align-items: flex-start; }
.user-msg      { align-items: flex-start; flex-direction: row-reverse; }
.msg-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; flex-shrink: 0;
}
.assistant-msg .msg-avatar { background: linear-gradient(135deg, var(--cyan), var(--violet)); color: var(--bg-base); }
.user-msg      .msg-avatar { background: var(--violet-dim); color: var(--violet); border: 1px solid var(--violet); }
.msg-content { max-width: 75%; }
.msg-name { font-size: 0.7rem; font-weight: 600; color: var(--cyan); letter-spacing: 0.1em; margin-bottom: 0.25rem; }
.user-msg .msg-name { color: var(--violet); text-align: right; }
.msg-text {
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.75rem 1rem;
  font-size: 0.9rem; line-height: 1.7;
}
.user-msg .msg-text { background: var(--violet-dim); border-color: var(--violet); }
.msg-time { font-size: 0.65rem; color: var(--text-muted); margin-top: 0.25rem; }
.user-msg .msg-time { text-align: right; }
.chat-input-row {
  display: flex; gap: 0.75rem; padding: 1rem; 
  border-top: 1px solid var(--border);
}
.chat-input-field {
  flex: 1; background: rgba(0,0,0,0.3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-family: var(--font-sans); font-size: 0.9rem; padding: 0.65rem 1rem;
  outline: none; transition: border-color var(--transition);
}
.chat-input-field:focus { border-color: var(--cyan); }
.chat-send-btn { padding: 0.65rem 1rem; border-radius: var(--radius-sm); }

.thought-chain-panel { display: flex; flex-direction: column; overflow: hidden; }
.thought-chain-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--border);
}
.thought-badge {
  font-family: var(--font-mono); font-size: 0.65rem; padding: 3px 8px;
  border-radius: 4px; border: 1px solid var(--border);
  color: var(--text-muted); transition: all var(--transition);
}
.thought-badge.THINKING {
  color: var(--cyan); border-color: var(--cyan);
  background: var(--cyan-dim);
  animation: pulse-badge 1s ease infinite;
}
.thought-chain-steps { flex: 1; padding: 1rem 1.25rem; overflow-y: auto; display: flex; flex-direction: column; gap: 0.75rem; }
.thought-step { display: flex; gap: 0.75rem; align-items: flex-start; }
.step-num {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  border: 1px solid var(--border); color: var(--text-muted);
  font-family: var(--font-mono); font-size: 0.65rem;
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.thought-step.active .step-num { border-color: var(--cyan); color: var(--cyan); background: var(--cyan-dim); }
.step-text { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.6; }
.thought-step.active .step-text { color: var(--text-primary); }


.metrics-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
  margin-bottom: 2rem;
}
.metric-card {
  padding: 1.5rem; display: flex; flex-direction: column; align-items: center;
  gap: 0.5rem; text-align: center;
}
.metric-icon { font-size: 1.75rem; }
.metric-value {
  font-family: var(--font-display); font-size: 2rem; font-weight: 700;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; line-height: 1;
}
.metric-label { font-size: 0.75rem; color: var(--text-secondary); letter-spacing: 0.08em; }
.sparkline { display: block; }

.gauge-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
}
.gauge-card { padding: 1.5rem; text-align: center; }
.gauge-wrap { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.gauge-value {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 700;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gauge-label { font-size: 0.75rem; color: var(--text-secondary); }


.footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  background: rgba(2,4,8,0.9);
  padding: 3rem 2rem;
}
.footer-inner {
  max-width: 1400px; margin: 0 auto; text-align: center;
  display: flex; flex-direction: column; gap: 0.75rem; align-items: center;
}
.footer-tagline { color: var(--text-muted); font-size: 0.9rem; }
.footer-links { color: var(--text-muted); font-size: 0.8rem; }


@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.typing-cursor {
  display: inline-block; width: 2px; height: 1em;
  background: var(--cyan); border-radius: 1px;
  animation: blink 0.8s step-end infinite; vertical-align: text-bottom;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }


.cc-omni-bar {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1rem; margin-bottom: 1rem;
  border-color: var(--border-glow);
}
.cc-omni-tag {
  font-family: var(--font-mono); font-size: 0.65rem;
  color: var(--cyan); background: var(--cyan-dim);
  border: 1px solid var(--border-glow);
  padding: 4px 10px; border-radius: 6px; letter-spacing: 0.12em;
  white-space: nowrap;
}
.cc-omni-input {
  flex: 1; background: rgba(0,0,0,0.4);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-primary); font-family: var(--font-sans);
  font-size: 0.95rem; padding: 0.65rem 1rem; outline: none;
}
.cc-omni-input:focus { border-color: var(--cyan); }

.cc-pipeline-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1.25rem; margin-bottom: 1.25rem;
  overflow-x: auto; gap: 0.5rem;
}
.cc-stage {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--text-muted); padding: 5px 10px;
  border-radius: 6px; border: 1px solid transparent;
  white-space: nowrap; transition: all var(--transition);
}
.cc-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-muted);
}
.cc-stage.active {
  color: var(--amber); border-color: var(--amber);
  background: rgba(245,158,11,0.1);
}
.cc-stage.active .cc-dot {
  background: var(--amber); box-shadow: 0 0 8px var(--amber);
}
.cc-stage.done {
  color: var(--green); border-color: rgba(16,185,129,0.35);
  background: rgba(16,185,129,0.08);
}
.cc-stage.done .cc-dot {
  background: var(--green); box-shadow: 0 0 8px var(--green);
}
.cc-arrow { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.8rem; }

.cc-bento-grid {
  display: grid; grid-template-columns: 1.15fr 1.15fr 0.9fr; gap: 1rem;
}
.cc-pane {
  padding: 1.15rem; display: flex; flex-direction: column;
  gap: 0.75rem; min-height: 310px; max-height: 360px;
}
.cc-pane-header {
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--border); padding-bottom: 0.5rem;
}
.cc-pane-header .panel-title { margin-bottom: 0; font-size: 0.7rem; }

.cc-p1-split {
  display: grid; grid-template-columns: 220px 1fr; gap: 0.75rem;
  flex: 1; overflow: hidden;
}
.cc-attn-box {
  display: flex; flex-direction: column; align-items: center;
  justify-content: space-between; background: rgba(0,0,0,0.35);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.5rem;
}
.cc-sub-label {
  font-family: var(--font-mono); font-size: 0.65rem;
  color: var(--cyan); margin-bottom: 0.35rem; text-transform: uppercase;
}
.cc-tensor-stats {
  font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-secondary);
}
.cc-rag-box {
  display: flex; flex-direction: column; overflow: hidden;
}
.cc-rag-list {
  flex: 1; overflow-y: auto; font-size: 0.78rem;
  color: var(--text-secondary); line-height: 1.55;
  display: flex; flex-direction: column; gap: 0.45rem;
}
.rag-pill {
  padding: 0.4rem 0.6rem; border-radius: 6px;
  background: rgba(0,245,255,0.06); border: 1px solid rgba(0,245,255,0.18);
  font-size: 0.75rem;
}
.rag-pill strong { color: var(--cyan); }

.cc-debate-stream {
  flex: 1; overflow-y: auto; font-family: var(--font-mono);
  font-size: 0.76rem; line-height: 1.6; color: var(--text-secondary);
  display: flex; flex-direction: column; gap: 0.6rem;
}
.debate-entry {
  padding: 0.5rem 0.65rem; border-radius: 6px;
  background: rgba(255,255,255,0.03); border-left: 3px solid var(--cyan);
}
.debate-entry.critic { border-left-color: var(--amber); }
.debate-entry.executor { border-left-color: var(--violet); }
.debate-entry.verifier { border-left-color: var(--green); }
.debate-entry.consensus {
  border-left-color: var(--cyan);
  background: rgba(0,245,255,0.08); color: var(--text-primary);
}
.debate-role {
  font-size: 0.65rem; font-weight: 700; color: var(--cyan);
  letter-spacing: 0.1em; margin-bottom: 0.2rem;
}

.cc-telemetry-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem;
}
.cc-mini-stat {
  background: rgba(0,0,0,0.35); border: 1px solid var(--border);
  border-radius: 6px; padding: 0.4rem; text-align: center;
}
.cc-mini-stat span {
  display: block; font-family: var(--font-display);
  font-size: 0.95rem; font-weight: 700; color: var(--cyan);
}
.cc-mini-stat small {
  font-size: 0.6rem; color: var(--text-muted);
}
.cc-broker-log {
  flex: 1; overflow-y: auto; background: rgba(0,0,0,0.45);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem; font-family: var(--font-mono);
  font-size: 0.68rem; color: #94a3b8; display: flex;
  flex-direction: column; gap: 0.25rem;
}
.broker-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.broker-line .t-topic { color: var(--violet); }
.broker-line .t-time { color: var(--text-muted); }


.assistant-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
}
.assistant-col {
  display: flex; flex-direction: column; gap: 0.75rem;
  min-height: 420px; max-height: 480px;
}
.task-planner-bar, .task-add-row {
  display: flex; gap: 0.45rem; align-items: center;
}
.task-list-box {
  flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 0.4rem;
}
.task-item {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem; padding: 0.45rem 0.65rem; border-radius: 6px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  font-size: 0.78rem;
}
.task-item.done { opacity: 0.55; text-decoration: line-through; }
.task-meta { font-family: var(--font-mono); font-size: 0.65rem; color: var(--cyan); }
.briefing-output {
  max-height: 150px; overflow-y: auto; padding: 0.6rem;
  border-radius: 6px; background: rgba(0,245,255,0.06);
  border: 1px solid rgba(0,245,255,0.2); font-size: 0.75rem; line-height: 1.55;
}
.studio-preview {
  flex: 1; overflow-y: auto; background: rgba(0,0,0,0.4);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.75rem; font-size: 0.78rem; line-height: 1.6;
  display: flex; flex-direction: column; gap: 0.6rem; align-items: center; justify-content: center;
}
.studio-preview img {
  max-width: 100%; max-height: 220px; border-radius: 8px;
  border: 1px solid var(--border-glow);
}
.voice-controls-box {
  background: rgba(168,85,247,0.08); border: 1px solid rgba(168,85,247,0.25);
  border-radius: var(--radius-sm); padding: 0.75rem; text-align: center;
}
.voice-status {
  font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-secondary);
  margin-top: 0.45rem;
}
.translator-box {
  flex: 1; display: flex; flex-direction: column;
}
.trans-result {
  flex: 1; overflow-y: auto; background: rgba(0,0,0,0.35);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 0.5rem 0.65rem; font-size: 0.78rem; color: var(--text-primary);
  min-height: 70px;
}


.btn-kill-mini {
  background: rgba(244, 63, 94, 0.16);
  color: var(--rose);
  border: 1px solid var(--rose);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.08em;
}
.btn-kill-mini:hover, .btn-kill-mini.locked {
  background: var(--rose);
  color: #fff;
  box-shadow: 0 0 18px rgba(244, 63, 94, 0.55);
}

.security-dashboard-grid {
  display: grid;
  grid-template-columns: 1.15fr 1.1fr 0.95fr;
  gap: 1rem;
}
.sec-master-card, .sec-breakers-card, .sec-audit-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.sec-master-card.locked {
  border-color: var(--rose);
  box-shadow: 0 0 36px rgba(244, 63, 94, 0.25);
}
.sec-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.kill-switch-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.25rem;
}
.btn-kill-master {
  width: 100%;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--rose);
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.25), rgba(159, 18, 57, 0.45));
  color: #fecdd3;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 0 24px rgba(244, 63, 94, 0.25);
}
.btn-kill-master:hover {
  background: var(--rose);
  color: #fff;
  box-shadow: 0 0 36px rgba(244, 63, 94, 0.65);
  transform: translateY(-1px);
}
.btn-restore-master {
  width: 100%;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--green);
  background: rgba(16, 185, 129, 0.2);
  color: #a7f3d0;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-restore-master:hover {
  background: var(--green);
  color: #020408;
}
.sec-quick-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}
.breaker-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.breaker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.7rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}
.breaker-row strong {
  display: block;
  font-size: 0.78rem;
  color: var(--text-primary);
}
.breaker-row small {
  display: block;
  font-size: 0.68rem;
  color: var(--text-secondary);
}
.breaker-btn {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid;
  min-width: 78px;
}
.breaker-btn.on {
  background: rgba(16, 185, 129, 0.14);
  color: var(--green);
  border-color: var(--green);
}
.breaker-btn.off {
  background: rgba(244, 63, 94, 0.14);
  color: var(--rose);
  border-color: var(--rose);
}


.aura-layout {
  display: grid;
  grid-template-columns: 1.45fr 0.85fr;
  gap: 1.25rem;
}
.aura-main-card, .aura-journal-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 520px;
  max-height: 600px;
}
.aura-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.aura-identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.aura-orb {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #00f5ff, #a855f7 65%, #10b981 100%);
  box-shadow: 0 0 22px rgba(0, 245, 255, 0.55);
  animation: aura-pulse 3s ease-in-out infinite;
  flex-shrink: 0;
}
.aura-orb.speaking {
  animation: aura-speak 0.65s ease-in-out infinite alternate;
  box-shadow: 0 0 36px rgba(168, 85, 247, 0.85), 0 0 18px rgba(0, 245, 255, 0.9);
}
@keyframes aura-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
@keyframes aura-speak {
  from { transform: scale(0.95); }
  to { transform: scale(1.18); }
}
.aura-voice-controls {
  display: flex;
  gap: 0.45rem;
}
.aura-style-strip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(0, 245, 255, 0.05);
  border: 1px solid rgba(0, 245, 255, 0.18);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
}
.aura-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-right: 0.25rem;
}
.aura-chips {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}
.aura-chip {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.32);
  color: var(--text-primary);
  font-size: 0.74rem;
  padding: 0.4rem 0.75rem;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}
.aura-chip:hover {
  border-color: var(--cyan);
  background: var(--cyan-dim);
}
.aura-philosophy-banner {
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.08), rgba(168, 85, 247, 0.1));
  border: 1px solid rgba(0, 245, 255, 0.22);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
  font-size: 0.76rem;
  line-height: 1.55;
  color: var(--text-secondary);
}
.aura-philosophy-banner strong { color: var(--cyan); }
.aura-journal-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.journal-item {
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--violet);
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
  font-size: 0.76rem;
  line-height: 1.5;
}
.journal-meta {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  color: var(--cyan);
  margin-bottom: 0.2rem;
}


.mobile-bottom-dock {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1500;
  background: rgba(2, 4, 8, 0.94);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-glow);
  padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
  justify-content: space-around;
  align-items: center;
}
.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.65rem;
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
}
.dock-item span { font-size: 1.15rem; }
.dock-item.active, .dock-item:hover { color: var(--cyan); background: var(--cyan-dim); }
.dock-item.dock-stop { color: var(--rose); }


.nav-status { gap: 0.55rem; }
.key-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 0 0.6rem;
  border-radius: 6px;
  border: 1px solid;
  white-space: nowrap;
  flex-shrink: 0;
}
.key-status.live { color: var(--green); border-color: var(--green); background: rgba(16,185,129,.1); }
.key-status.demo { color: var(--amber); border-color: var(--amber); background: rgba(245,158,11,.1); }
.modal { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; background: rgba(2,4,8,.7); backdrop-filter: blur(6px); }
.modal.open { display: flex; animation: fade-in-up .3s ease; }
.modal-box { width: min(440px, 92vw); padding: 1.75rem; display: flex; flex-direction: column; gap: 1rem; }
.modal-desc { font-size: .85rem; color: var(--text-secondary); }
.modal-desc a { color: var(--cyan); }
.modal-actions { display: flex; gap: .5rem; justify-content: flex-end; }
.msg-text.error { border-color: var(--rose); color: var(--rose); }


@media (max-width: 1440px) {
  .logo-tag { display: none; }
  .nav-inner { gap: 1rem; }
  .nav-link { padding: 0.42rem 0.62rem; font-size: 0.75rem; }
  .nav-status { gap: 0.45rem; }
  .nav-status .nav-btn,
  .nav-status .btn-secondary,
  .nav-status .btn-primary {
    height: 34px;
    padding: 0 0.7rem !important;
    font-size: 0.73rem !important;
  }
}
@media (max-width: 1200px) {
  #key-status { display: none; }
  .nav-link { padding: 0.38rem 0.52rem; font-size: 0.73rem; }
}
@media (max-width: 1024px) {
  #pwa-install-btn { display: none; }
  .hero-section { flex-direction: column; text-align: center; }
  .hero-visual { max-width: 380px; }
  .aura-layout { grid-template-columns: 1fr; }
  .cc-bento-grid { grid-template-columns: 1fr; }
  .cc-p1-split { grid-template-columns: 1fr; }
  .assistant-grid { grid-template-columns: 1fr; }
  .security-dashboard-grid { grid-template-columns: 1fr; }
  .neural-container { grid-template-columns: 1fr; }
  .agents-grid { grid-template-columns: 1fr; }
  .chat-container { grid-template-columns: 1fr; height: auto; }
  .graph-container { grid-template-columns: 1fr; height: auto; }
  .graph-canvas-wrap { height: 400px; }
}

html, body {
  overflow-x: hidden !important;
  max-width: 100vw;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 960px) {
  .nav-center { display: none !important; }
  .mobile-only-btn { display: inline-flex !important; }
  .nav-status #key-btn { display: none !important; }
  .nav-status #pwa-install-btn { display: none !important; }
  .nav-status #key-status { display: none !important; }
}

@media (max-width: 768px) {
  body {
    padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }
  
  #nav {
    padding: 0 0.5rem !important;
    height: 52px !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  .nav-inner {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .nav-left {
    flex-shrink: 0;
  }
  .nav-brand-text .logo-text {
    font-size: 1.05rem;
  }
  .nav-status {
    gap: 0.35rem !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    max-width: calc(100vw - 110px) !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }
  .nav-status::-webkit-scrollbar {
    display: none !important;
  }
  .nav-status .nav-btn,
  .nav-status .btn-secondary,
  .nav-status .btn-primary {
    height: 32px !important;
    padding: 0 0.45rem !important;
    font-size: 0.72rem !important;
    flex-shrink: 0 !important;
  }
  #pwa-install-btn,
  #key-btn,
  #key-status {
    display: none !important;
  }
  #mobile-menu-btn {
    display: inline-flex !important;
    flex-shrink: 0 !important;
    width: 34px !important;
    height: 32px !important;
    padding: 0 !important;
    justify-content: center !important;
    align-items: center !important;
  }
  #current-lang-code {
    font-size: 0.72rem !important;
  }
  #nav-auth-btn {
    padding: 0 0.5rem !important;
    min-width: 32px !important;
    justify-content: center !important;
  }
  #nav-auth-btn span {
    display: none !important;
  }

  .section {
    padding: 58px 0.75rem 40px !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }
  .section-tag {
    letter-spacing: 0.05em !important;
    font-size: 0.65rem !important;
    white-space: normal !important;
    max-width: 100% !important;
    text-align: center !important;
    line-height: 1.35 !important;
    padding: 3px 8px !important;
    box-sizing: border-box !important;
  }
  .section-title {
    font-size: clamp(1.35rem, 6vw, 1.85rem) !important;
    line-height: 1.2 !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .section-desc {
    font-size: 0.88rem !important;
    line-height: 1.5 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .hero-section {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    padding-top: 70px !important;
    box-sizing: border-box !important;
  }
  .hero-content {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .hero-title {
    font-size: clamp(1.2rem, 5.2vw, 1.65rem) !important;
    line-height: 1.25 !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    hyphens: auto;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .hero-title br {
    display: none;
  }
  .hero-title span {
    display: inline !important;
  }
  .hero-desc {
    font-size: 0.9rem !important;
    line-height: 1.55 !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .hero-badge {
    display: inline-flex !important;
    flex-wrap: wrap !important;
    max-width: 100% !important;
    white-space: normal !important;
    text-align: left !important;
    line-height: 1.35 !important;
    font-size: 0.7rem !important;
    padding: 4px 10px !important;
    box-sizing: border-box !important;
  }
  .hero-visual {
    max-width: 100% !important;
    width: 100% !important;
    overflow: hidden !important;
  }
  .hero-rings {
    display: none !important;
  }
  .hero-cta-row {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .hero-cta-row > div {
    flex-direction: column !important;
    width: 100% !important;
    gap: 0.6rem !important;
  }
  .hero-cta-row button,
  .hero-cta-row a {
    width: 100% !important;
    max-width: 100% !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    text-align: center !important;
    padding: 0.75rem 1.25rem !important;
  }
  .hero-stat-row {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.85rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .stat-num {
    font-size: 1.35rem !important;
  }
  .stat-label {
    font-size: 0.68rem !important;
  }
  .assistant-grid, .security-dashboard-grid {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .assistant-col,
  .assistant-grid > *,
  [style*="grid-column: span"] {
    grid-column: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .gauge-row { grid-template-columns: 1fr; }
  .nav-center { display: none !important; }
  .nav-links { display: none !important; }
  .logo-tag { display: none !important; }
  
  
  input, select, textarea {
    font-size: 16px !important;
  }

  
  #companion {
    padding-top: 56px !important;
    padding-bottom: 74px !important;
  }
  #companion .section-header {
    margin-bottom: 0.4rem !important;
    text-align: left;
    padding: 0 0.2rem;
  }
  #companion .section-tag {
    font-size: 0.65rem !important;
    padding: 0.15rem 0.5rem !important;
    margin-bottom: 0.2rem !important;
    display: inline-flex;
  }
  #companion .section-title {
    font-size: 1.15rem !important;
    line-height: 1.25 !important;
    margin-bottom: 0.2rem !important;
  }
  #companion .section-desc {
    display: none !important; 
  }
  .aura-philosophy-banner {
    display: none !important; 
  }

  .aura-layout {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
  }
  .aura-main-card {
    min-height: calc(100dvh - 175px) !important;
    max-height: calc(100dvh - 175px) !important;
    padding: 0.75rem !important;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
  }
  .aura-top-bar {
    padding-bottom: 0.4rem !important;
    gap: 0.35rem !important;
  }
  .aura-orb {
    width: 34px !important;
    height: 34px !important;
  }
  .aura-identity div strong {
    font-size: 0.8rem !important;
  }
  .aura-identity div small {
    font-size: 0.65rem !important;
  }
  .aura-voice-controls {
    width: 100% !important;
    display: flex !important;
    gap: 0.35rem !important;
    justify-content: space-between !important;
    margin-top: 0.2rem;
  }
  .aura-voice-controls button {
    flex: 1 !important;
    height: 36px !important;
    font-size: 0.73rem !important;
    padding: 0 0.35rem !important;
    justify-content: center !important;
    border-radius: 6px !important;
  }
  .aura-style-strip {
    padding: 0.35rem 0.5rem !important;
    font-size: 0.72rem !important;
    gap: 0.35rem !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .aura-style-strip input,
  .aura-style-strip select {
    font-size: 16px !important;
    height: 34px !important;
    border-radius: 6px !important;
  }
  .aura-messages {
    flex: 1 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-right: 0.15rem;
    gap: 0.6rem !important;
  }
  .aura-msg {
    max-width: 90% !important;
    font-size: 0.83rem !important;
    padding: 0.6rem 0.75rem !important;
    border-radius: 10px;
    line-height: 1.5 !important;
  }
  .aura-chips {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.4rem !important;
    padding: 0.25rem 0 !important;
  }
  .aura-chips::-webkit-scrollbar {
    display: none;
  }
  .aura-chip {
    flex-shrink: 0 !important;
    font-size: 0.72rem !important;
    padding: 0.35rem 0.65rem !important;
    border-radius: 16px !important;
  }
  .aura-input-row {
    display: flex;
    gap: 0.45rem;
    align-items: center;
  }
  .aura-input-row input {
    font-size: 16px !important;
    height: 44px !important;
    border-radius: 8px;
    padding: 0 0.75rem !important;
  }
  .aura-input-row button {
    height: 44px !important;
    min-width: 58px;
    padding: 0 0.85rem !important;
    font-size: 0.82rem !important;
    font-weight: 700;
    border-radius: 8px;
  }
  .aura-journal-card {
    min-height: auto !important;
    max-height: 220px !important;
    padding: 0.75rem !important;
  }

  
  #command-center {
    padding-top: 56px !important;
    padding-bottom: 74px !important;
  }
  #command-center .section-header {
    margin-bottom: 0.45rem !important;
    text-align: left;
  }
  #command-center .section-desc {
    display: none !important;
  }
  .cc-omni-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .cc-omni-bar input {
    font-size: 16px !important;
    height: 44px !important;
  }

  
  #earth {
    padding-top: 54px !important;
    padding-bottom: 74px !important;
  }
  #earth .section-desc {
    display: none !important;
  }
  .earth-desktop-window {
    height: calc(100dvh - 145px) !important;
    border-radius: 8px !important;
  }
  #earth-map {
    height: 100% !important;
  }

  
  .mobile-bottom-dock {
    display: flex !important;
    height: calc(56px + env(safe-area-inset-bottom, 0px)) !important;
    padding: 0.3rem 0.4rem calc(0.3rem + env(safe-area-inset-bottom, 0px)) !important;
    background: rgba(3, 7, 18, 0.96) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border-top: 1px solid rgba(0, 245, 255, 0.25) !important;
    box-shadow: 0 -8px 24px rgba(0,0,0,0.6) !important;
  }
  .dock-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0;
    gap: 1px;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 6px;
    transition: all 0.15s ease;
  }
  .dock-item svg {
    width: 19px;
    height: 19px;
  }
  .dock-item small {
    font-size: 0.63rem;
    font-weight: 600;
  }
  .dock-item.active {
    color: var(--cyan) !important;
    background: rgba(0, 245, 255, 0.12) !important;
  }

  .task-planner-bar, .task-add-row { flex-wrap: wrap; }
  .hero-stat-row { flex-wrap: wrap; justify-content: center; }
  .exec-dashboard-wrap { padding: 0 0.75rem 2rem; }
  .exec-hub-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 1.7rem; line-height: 1.15; }
  .hero-desc { font-size: 0.9rem; line-height: 1.5; }
  .msg-content { max-width: 92%; }
  .hero-cta-row > div { flex-direction: column; width: 100%; }
  .hero-cta-row button { width: 100%; justify-content: center; }
}

@media (max-width: 420px) {
  #nav {
    padding: 0 0.35rem !important;
  }
  .nav-brand-text .logo-tag {
    display: none !important;
  }
  .logo-text {
    font-size: 0.98rem !important;
  }
  .nav-status {
    gap: 0.25rem !important;
  }
  #lang-toggle-btn {
    padding: 0 0.35rem !important;
  }
  #nav-auth-btn {
    padding: 0 0.45rem !important;
    min-width: 32px !important;
    justify-content: center !important;
  }
  #nav-auth-btn span {
    display: none !important;
  }
}



.mobile-only-btn {
  display: none;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(0, 245, 255, 0.35);
  color: var(--cyan);
  font-size: 1.25rem;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  line-height: 1;
}
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.mobile-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 86%;
  max-width: 360px;
  z-index: 2001;
  background: rgba(4, 8, 20, 0.97);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-left: 1px solid rgba(0, 245, 255, 0.25);
  box-shadow: -8px 0 36px rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  padding: 1.25rem;
}
.mobile-drawer.open {
  transform: translateX(0);
}
.mobile-drawer .nav-link {
  display: flex;
  align-items: center;
  padding: 0.65rem 0.85rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  border-radius: 8px;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.2s ease;
}
.mobile-drawer .nav-link:hover, .mobile-drawer .nav-link.active {
  color: var(--cyan);
  background: rgba(0, 245, 255, 0.1);
  border-color: rgba(0, 245, 255, 0.3);
}


.faq-item {
  transition: border-color 0.2s ease, background 0.2s ease;
}
.faq-item.active {
  border-color: rgba(0, 245, 255, 0.4) !important;
  background: rgba(15, 23, 42, 0.85) !important;
}
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.32s cubic-bezier(0.16, 1, 0.3, 1), padding 0.32s ease;
  padding: 0 1.2rem;
}
.faq-item.active .faq-content {
  max-height: 480px;
  padding: 0 1.2rem 1.2rem;
}
.faq-icon {
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.faq-item.active .faq-icon {
  transform: rotate(180deg);
}


.article-filter-chip {
  padding: 0.45rem 1rem !important;
  font-size: 0.78rem !important;
  border-radius: 9999px !important;
  white-space: nowrap;
}
.article-filter-chip.active {
  background: rgba(0, 245, 255, 0.15) !important;
  border-color: var(--cyan) !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(0, 245, 255, 0.25);
}


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

section[data-route]:not(.route-active) {
  display: none !important;
}

section[data-route].route-active {
  display: block;
  animation: routeFadeIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

section.hero-section[data-route].route-active {
  display: flex;
}

.exec-dashboard-wrap {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.exec-telemetry-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
  margin-bottom: 2.25rem;
}

.exec-kpi-card {
  padding: 1.15rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  border-radius: var(--radius-md);
  background: rgba(15, 22, 41, 0.58);
  border: 1px solid var(--border);
}

.exec-kpi-card strong {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  color: var(--cyan);
}

.exec-kpi-card span {
  font-size: 0.76rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.exec-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.35rem;
}

.exec-module-card {
  padding: 1.65rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.1rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(99, 130, 200, 0.16);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.exec-module-card:hover {
  transform: translateY(-4px);
  border-color: var(--cyan);
  box-shadow: 0 12px 36px rgba(0, 245, 255, 0.14);
}

.exec-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.exec-card-icon {
  font-size: 1.65rem;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 245, 255, 0.09);
  border: 1px solid rgba(0, 245, 255, 0.24);
}

.exec-card-route {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--cyan);
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(0, 245, 255, 0.08);
  border: 1px solid rgba(0, 245, 255, 0.22);
}

.exec-card-title {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.exec-card-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.exec-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cyan);
  font-family: var(--font-mono);
}

@media (max-width: 768px) {
  .exec-dashboard-wrap { padding: 0 1rem 2.5rem; }
  .exec-hub-grid { grid-template-columns: 1fr; }
}


@media print {
  #nav, .hero-visual, .nav-btn, .mobile-bottom-dock, button, #particle-canvas, .hero-rings, .aura-voice-controls {
    display: none !important;
  }
  body {
    background: #ffffff !important;
    color: #111827 !important;
  }
  .section {
    padding: 20px 0 !important;
    max-width: 100% !important;
    display: block !important;
  }
  .glass-panel, .panel {
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    box-shadow: none !important;
    color: #111827 !important;
  }
  .gradient-text, .stat-num, .logo-text {
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
  }
  pre, code {
    background: #f3f4f6 !important;
    color: #111827 !important;
    border: 1px solid #e5e7eb !important;
  }
}


.agent-subtabs-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.5rem;
  flex-wrap: wrap;
}
.agent-subtab-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  padding: 0.5rem 1.15rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.82rem;
  font-family: var(--font-sans);
  font-weight: 600;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.agent-subtab-btn:hover {
  border-color: rgba(0, 245, 255, 0.4);
  color: var(--text-primary);
}
.agent-subtab-btn.active {
  background: rgba(0, 245, 255, 0.12);
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 16px rgba(0, 245, 255, 0.2);
}

.agent-dashboard-grid {
  display: grid;
  grid-template-columns: 280px 1fr 310px;
  gap: 1.25rem;
  min-height: 620px;
}
@media (max-width: 1100px) {
  .agent-dashboard-grid {
    grid-template-columns: 260px 1fr;
  }
  .agent-inspector-col {
    grid-column: 1 / -1;
  }
}
@media (max-width: 768px) {
  .agent-dashboard-grid {
    grid-template-columns: 1fr;
  }
}


.agent-rail-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.agent-rail-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px;
}
.agent-rail-item {
  background: rgba(8, 14, 28, 0.7);
  border: 1px solid rgba(99, 130, 200, 0.2);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.agent-rail-item:hover {
  border-color: rgba(0, 245, 255, 0.4);
  background: rgba(0, 245, 255, 0.04);
  transform: translateY(-1px);
}
.agent-rail-item.selected {
  border-color: var(--cyan);
  background: rgba(0, 245, 255, 0.08);
  box-shadow: 0 0 16px rgba(0, 245, 255, 0.15);
}
.agent-rail-item.is-blocked {
  border-color: rgba(244, 63, 94, 0.35);
  opacity: 0.75;
}

.status-pill {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}
.status-pill.active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.status-pill.blocked {
  background: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.35);
}


.agent-chat-col {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
}
.agent-chat-header {
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(6, 11, 24, 0.8);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.agent-chat-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.dash-chat-messages {
  flex: 1;
  min-height: 400px;
  max-height: 460px;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: rgba(2, 5, 15, 0.65);
}
.dash-chat-bubble {
  max-width: 86%;
  padding: 0.65rem 0.95rem;
  border-radius: 10px;
  font-size: 0.84rem;
  line-height: 1.45;
  animation: fadeIn 0.18s ease;
}
.dash-chat-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.18), rgba(99, 102, 241, 0.22));
  border: 1px solid rgba(0, 245, 255, 0.35);
  color: var(--text-primary);
}
.dash-chat-bubble.agent {
  align-self: flex-start;
  background: rgba(14, 22, 42, 0.85);
  border: 1px solid rgba(99, 130, 200, 0.25);
  color: var(--text-primary);
}
.bubble-header {
  font-size: 0.68rem;
  color: var(--cyan);
  font-family: var(--font-mono);
  margin-bottom: 0.25rem;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}
.bubble-time {
  color: var(--text-secondary);
  font-size: 0.62rem;
}
.dash-chat-sys-log {
  align-self: center;
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.04);
  padding: 3px 9px;
  border-radius: 6px;
}


.agent-chat-input-bar {
  padding: 0.75rem 1rem;
  background: rgba(6, 11, 24, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-voice-mic {
  background: rgba(0, 245, 255, 0.1);
  border: 1px solid rgba(0, 245, 255, 0.3);
  color: var(--cyan);
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-voice-mic:hover {
  background: rgba(0, 245, 255, 0.2);
}
.btn-voice-mic.listening {
  background: rgba(244, 63, 94, 0.25);
  border-color: #f43f5e;
  color: #f43f5e;
  animation: pulseMic 1.2s infinite;
}
@keyframes pulseMic {
  0% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(244, 63, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); }
}

.btn-block {
  background: rgba(244, 63, 94, 0.12) !important;
  border-color: rgba(244, 63, 94, 0.4) !important;
  color: #f43f5e !important;
}
.btn-block:hover {
  background: rgba(244, 63, 94, 0.22) !important;
}
.btn-unblock {
  background: rgba(16, 185, 129, 0.12) !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
  color: var(--emerald) !important;
}
.btn-unblock:hover {
  background: rgba(16, 185, 129, 0.22) !important;
}
.btn-edit {
  background: rgba(0, 245, 255, 0.08) !important;
  border-color: rgba(0, 245, 255, 0.3) !important;
  color: var(--cyan) !important;
}
.btn-edit:hover {
  background: rgba(0, 245, 255, 0.18) !important;
}


.agent-inspector-col {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.vector-match-card {
  background: rgba(4, 9, 22, 0.6);
  border: 1px solid rgba(0, 245, 255, 0.18);
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  margin-bottom: 0.45rem;
}
.vector-match-card.new-vector {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.05);
}
.topic-pill {
  display: inline-block;
  background: rgba(168, 85, 247, 0.14);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  margin-right: 4px;
  margin-bottom: 4px;
}

/* Micro Actions for Vector Cards */
.btn-micro-edit, .btn-micro-del {
  font-size: 0.64rem;
  font-family: inherit;
  font-weight: 600;
  padding: 0.18rem 0.45rem;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(15, 23, 42, 0.85);
  color: var(--text-secondary);
  transition: all 0.15s ease;
}
.btn-micro-edit:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.5);
}
.btn-micro-del:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.5);
}

/* Human-in-the-Loop Action Bar for Chat & Assistant Responses */
.hitl-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.hitl-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.62rem;
  font-size: 0.72rem;
  font-family: inherit;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.8);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}
.hitl-btn:hover {
  background: rgba(56, 189, 248, 0.16);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.45);
}
.hitl-btn.active-adopted {
  background: rgba(16, 185, 129, 0.22) !important;
  color: #34d399 !important;
  border-color: rgba(16, 185, 129, 0.55) !important;
}
.hitl-evidence-drawer {
  margin-top: 0.5rem;
  padding: 0.6rem 0.8rem;
  background: rgba(2, 6, 23, 0.9);
  border: 1px solid rgba(0, 245, 255, 0.25);
  border-radius: 6px;
  font-size: 0.74rem;
  color: var(--text-secondary);
  line-height: 1.45;
}


.supervisor-dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  min-height: 560px;
}
@media (max-width: 980px) {
  .supervisor-dual-grid {
    grid-template-columns: 1fr;
  }
}
.lead-logo-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.2), rgba(168, 85, 247, 0.25));
  border: 1px solid rgba(0, 245, 255, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
}
.sup-turn-feedback {
  animation: fadeIn 0.25s ease;
}


.nav-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4rem !important;
}
.nav-link svg, .btn-secondary svg, .btn-primary svg, .mobile-dock-btn svg {
  flex-shrink: 0;
  vertical-align: middle;
}
.nav-link svg {
  color: var(--cyan);
  opacity: 0.85;
  transition: transform 0.2s, opacity 0.2s, color 0.2s;
}
.nav-link:hover svg, .nav-link.active svg {
  opacity: 1;
  transform: translateY(-1px);
  color: #fff;
  filter: drop-shadow(0 0 6px rgba(0, 245, 255, 0.5));
}
.mobile-dock-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.65rem;
  font-family: var(--font-sans);
  font-weight: 500;
  transition: all 0.2s;
}
.mobile-dock-btn.active, .mobile-dock-btn:hover {
  color: var(--cyan);
}
.mobile-dock-btn svg {
  width: 20px;
  height: 20px;
}


.earth-desktop-window {
  position: relative;
  width: 100%;
}
.earth-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 260px;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 245, 255, 0.3);
  border-radius: 8px;
  padding: 0.4rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 2100;
  animation: fadeIn 0.15s ease;
}
.earth-dropdown-menu.open {
  display: flex;
}
.earth-dd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.65rem;
  font-size: 0.75rem;
  color: var(--text-primary);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.earth-dd-item:hover {
  background: rgba(0, 245, 255, 0.12);
  color: #fff;
  transform: translateX(2px);
}
.earth-dd-item kbd {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 1px 5px;
  color: #94a3b8;
  margin-left: 0.75rem;
}
.earth-dd-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 0;
}
.earth-dd-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  padding: 4px 8px 2px;
}
.earth-search-results-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 245, 255, 0.3);
  border-radius: 8px;
  max-height: 280px;
  overflow-y: auto;
  z-index: 2200;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}
.earth-search-item:hover {
  background: rgba(0, 245, 255, 0.1);
}
@media (max-width: 768px) {
  #earth-sidebar-drawer {
    display: none !important;
  }
  .earth-presets-strip {
    display: none !important;
  }
  .earth-menu-bar {
    flex-direction: column;
    align-items: stretch;
  }
}


.lang-selector-container {
  position: relative;
  display: inline-block;
}

#lang-dropdown-menu {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 245, 255, 0.4) transparent;
}

#lang-dropdown-menu::-webkit-scrollbar {
  width: 5px;
}

#lang-dropdown-menu::-webkit-scrollbar-thumb {
  background: rgba(0, 245, 255, 0.35);
  border-radius: 4px;
}

.lang-dropdown-item:hover {
  background: rgba(0, 245, 255, 0.12) !important;
  color: var(--cyan) !important;
  transform: translateX(2px);
}

[dir="rtl"] {
  text-align: right;
  direction: rtl;
}

[dir="rtl"] .nav-links {
  flex-direction: row-reverse;
}

[dir="rtl"] .hero-actions {
  flex-direction: row-reverse;
}

[dir="rtl"] .hero-title,
[dir="rtl"] .section-title,
[dir="rtl"] .section-desc {
  text-align: right;
}


.c2-enterprise-layout {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-top: 1.25rem;
}

.c2-enterprise-sidebar {
  width: 310px;
  min-width: 310px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
  border-radius: 12px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  border: 1px solid rgba(0, 245, 255, 0.25);
  background: rgba(4, 8, 20, 0.94);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(24px);
  z-index: 100;
}

.c2-enterprise-sidebar::-webkit-scrollbar {
  width: 4px;
}

.c2-enterprise-sidebar::-webkit-scrollbar-thumb {
  background: rgba(0, 245, 255, 0.25);
  border-radius: 4px;
}

.c2-enterprise-main {
  flex: 1;
  min-width: 0;
}

@media (max-width: 1024px) {
  .c2-enterprise-layout {
    flex-direction: column !important;
  }
  .c2-enterprise-sidebar {
    width: 100% !important;
    min-width: 100% !important;
    position: static !important;
    max-height: none !important;
  }
  .c2-tabs {
    flex-direction: row !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
  }
  .c2-tab-btn {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
}



/* ── SENSORIAL MOBILE PERFECTION & CONTRAST ENHANCEMENTS ── */
@media (max-width: 768px) {
  .section-title {
    color: #f8fafc !important;
    -webkit-text-fill-color: #f8fafc !important;
    background: none !important;
  }
  .section-tag {
    color: var(--cyan) !important;
  }
  .cc-pipeline-bar {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    padding: 0.6rem 0.75rem !important;
  }
  .cc-pipeline-bar::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  .earth-menu-dropdowns {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    flex-wrap: nowrap !important;
    max-width: calc(100vw - 125px) !important;
  }
  .earth-menu-dropdowns::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  .earth-quick-toolbar {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    flex-wrap: nowrap !important;
  }
  .earth-quick-toolbar::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
}
