/* ───────────────────────────────────────────────────────────────────────────
   AM-01 Design System — styles.css
   Design Language: Protocol Cyan
   ─────────────────────────────────────────────────────────────────────────── */

:root {
  --bg:           #050D1A;
  --surface:      #0A1628;
  --surface-alt:  #0D1F38;
  --border:       #1E3A5F;
  --border-light: #1E3A5F55;
  --primary:      #00C2FF;
  --primary-glow: rgba(0, 194, 255, 0.2);
  --primary-dark: #0090BB;
  --accent:       #7C3AED;
  --accent-glow:  rgba(124, 58, 237, 0.2);
  --success:      #10B981;
  --warning:      #F59E0B;
  --danger:       #EF4444;
  --text:         #E2E8F0;
  --text-secondary: #94A3B8;
  --muted:        #64748B;
  --code:         #A5F3FC;
  --radius:       12px;
  --radius-sm:    8px;
  --shadow:       0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(0, 194, 255, 0.15);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--primary); color: var(--bg); }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ── Typography ───────────────────────────────────────────────────────────── */
h1, h2, h3, h4 { line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.875em;
  background: rgba(165, 243, 252, 0.1);
  color: var(--code);
  padding: 2px 6px;
  border-radius: 4px;
}

pre code {
  background: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

/* ── Layout ───────────────────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.section { padding: 96px 0; }
.section-alt { background: var(--surface); }
.section-dark { background: #030A17; }
.section-cta { padding: 80px 0; }

.section-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-title {
  color: var(--text);
  margin-bottom: 16px;
}

.section-sub {
  color: var(--text-secondary);
  max-width: 640px;
  font-size: 1.1rem;
  line-height: 1.7;
}

.section-title + .section-sub { margin-bottom: 48px; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--primary);
  color: #030A17;
  box-shadow: 0 0 20px var(--primary-glow);
}
.btn-primary:hover {
  background: #1acfff;
  box-shadow: 0 0 30px var(--primary-glow);
  color: #030A17;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--surface); color: var(--text); }

.btn-danger { background: var(--danger); color: white; }

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; justify-content: center; }

/* ── Navbar ───────────────────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.navbar.scrolled {
  background: rgba(5, 13, 26, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.navbar-inner {
  display: flex;
  align-items: center;
  gap: 32px;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
}

.navbar-logo:hover { text-decoration: none; color: var(--text); }

.navbar-links {
  display: flex;
  list-style: none;
  gap: 4px;
  margin: 0;
  flex: 1;
}

.navbar-links a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  text-decoration: none;
}

.navbar-links a:hover { color: var(--text); background: var(--surface); }

.navbar-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 64px;
  left: 0; right: 0;
  background: rgba(5, 13, 26, 0.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 99;
  padding: 16px 24px;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav a {
  padding: 10px 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--border-light);
}

@media (max-width: 768px) {
  .navbar-links { display: none; }
  .mobile-menu-btn { display: flex; }
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  padding: 160px 0 96px;
  position: relative;
  overflow: hidden;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-light) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 80%);
}

.hero-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(0, 194, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner { position: relative; text-align: center; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.hero-title { margin-bottom: 20px; }

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  max-width: 600px;
  margin: 0 auto 36px;
  color: var(--text-secondary);
  font-size: 1.15rem;
  line-height: 1.7;
}

.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 48px; }

.hero-code {
  max-width: 600px;
  margin: 0 auto 48px;
  text-align: left;
}

.code-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
}

.code-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  overflow-x: auto;
  white-space: pre;
}

.code-block-sm {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text);
  overflow-x: auto;
}

.code-keyword { color: #C792EA; }
.code-string  { color: #C3E88D; }
.code-comment { color: var(--muted); font-style: italic; }
.code-number   { color: #F78C6C; }
.code-bool     { color: #FF5370; }
.code-null     { color: var(--muted); }
.code-key      { color: #89DDFF; }
.code-error    { color: #EF4444; }
.code-success  { color: #10B981; }
.code-muted    { color: var(--muted); }
.code-divider  { border-top: 1px dashed var(--border); margin: 8px 0; }

/* ── Diagram ──────────────────────────────────────────────────────────────── */
.hero-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.diagram-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  min-width: 160px;
  text-align: center;
}

.diagram-card-am {
  border-color: var(--primary);
  box-shadow: 0 0 20px var(--primary-glow);
}

.diagram-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 10px;
}

.diagram-label-am { color: var(--primary); }

.diagram-chips, .diagram-types {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.diagram-arrow { color: var(--primary); }

.chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.chip-langchain { background: rgba(0, 194, 255, 0.15); color: #00C2FF; border: 1px solid rgba(0,194,255,0.3); }
.chip-crewai    { background: rgba(255, 193, 7, 0.15);  color: #FFC107; border: 1px solid rgba(255,193,7,0.3); }
.chip-autogen   { background: rgba(16, 185, 129, 0.15); color: #10B981; border: 1px solid rgba(16,185,129,0.3); }
.chip-custom    { background: rgba(148, 163, 184, 0.1); color: #94A3B8; border: 1px solid rgba(148,163,184,0.3); }
.chip-episodic  { background: rgba(59, 130, 246, 0.15);  color: #3B82F6; border: 1px solid rgba(59,130,246,0.3); }
.chip-semantic  { background: rgba(16, 185, 129, 0.15); color: #10B981; border: 1px solid rgba(16,185,129,0.3); }
.chip-procedural{ background: rgba(245, 158, 11, 0.15);  color: #F59E0B; border: 1px solid rgba(245,158,11,0.3); }
.chip-identity  { background: rgba(124, 58, 237, 0.15); color: #7C3AED; border: 1px solid rgba(124,58,237,0.3); }

/* ── Trust Bar ────────────────────────────────────────────────────────────── */
.trust-bar {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  padding-top: 32px;
  border-top: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--muted);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Problem ──────────────────────────────────────────────────────────────── */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.problem-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s, transform 0.2s;
}

.problem-card:hover { border-color: var(--primary); transform: translateY(-4px); }

.problem-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.1);
  color: #EF4444;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.problem-card h3 { margin-bottom: 8px; font-size: 1rem; }
.problem-card p { color: var(--text-secondary); font-size: 14px; }

/* ── Comparison ───────────────────────────────────────────────────────────── */
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 48px;
}

@media (max-width: 640px) { .comparison { grid-template-columns: 1fr; } }

.comparison-col { display: flex; flex-direction: column; gap: 12px; }

.comparison-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.comparison-label-before { color: #EF4444; }
.comparison-label-after   { color: #10B981; }

.comparison-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.8;
}

/* ── Memory Types ─────────────────────────────────────────────────────────── */
.memory-types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.memory-type-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  transition: border-color 0.2s, transform 0.2s;
}

.memory-type-card:hover { transform: translateY(-4px); }
.memory-episodic:hover   { border-color: #3B82F6; }
.memory-semantic:hover   { border-color: #10B981; }
.memory-procedural:hover { border-color: #F59E0B; }
.memory-identity:hover   { border-color: #7C3AED; }

.memory-type-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 12px;
}

.memory-episodic   .memory-type-badge { background: rgba(59,130,246,0.15); color: #3B82F6; }
.memory-semantic   .memory-type-badge { background: rgba(16,185,129,0.15); color: #10B981; }
.memory-procedural .memory-type-badge { background: rgba(245,158,11,0.15); color: #F59E0B; }
.memory-identity   .memory-type-badge { background: rgba(124,58,237,0.15); color: #7C3AED; }

.memory-type-card h3 { margin-bottom: 8px; font-size: 1rem; }
.memory-type-card p  { color: var(--text-secondary); font-size: 13px; margin-bottom: 16px; }
.memory-example     { margin-bottom: 12px; }
.memory-when {
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
}

/* ── Schema Viewer ────────────────────────────────────────────────────────── */
.schema-viewer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.schema-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}

.schema-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
}

.schema-viewer .code-block {
  border: none;
  border-radius: 0;
  margin: 0;
  max-height: 400px;
  overflow: auto;
}

/* ── Features ─────────────────────────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-card h3 { margin-bottom: 8px; font-size: 1rem; }
.feature-card p  { color: var(--text-secondary); font-size: 14px; }

/* ── Demo ─────────────────────────────────────────────────────────────────── */
.demo-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 900px;
  margin: 0 auto;
}

.demo-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.demo-tab {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  font-family: inherit;
}

.demo-tab:hover { color: var(--text); }
.demo-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.tab-content { display: none; padding: 24px; }
.tab-content.active { display: block; }

.demo-panel {}

.demo-request {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.demo-endpoint {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}

.method {
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.method-post { background: rgba(16, 185, 129, 0.15); color: #10B981; }
.method-get  { background: rgba(59, 130, 246, 0.15); color: #3B82F6; }
.method-put  { background: rgba(245, 158, 11, 0.15);  color: #F59E0B; }
.method-delete { background: rgba(239, 68, 68, 0.15); color: #EF4444; }

.demo-body {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--text);
  resize: vertical;
  outline: none;
}

.demo-body:focus { border-color: var(--primary); }

.demo-response {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-height: 80px;
  max-height: 300px;
  overflow: auto;
  padding: 16px;
}

.response-placeholder {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-family: 'JetBrains Mono', monospace;
}

.response-error {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #EF4444;
  font-size: 13px;
}

/* ── Adapters ─────────────────────────────────────────────────────────────── */
.adapters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.adapter-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s, transform 0.2s;
}

.adapter-card:hover { border-color: var(--primary); transform: translateY(-4px); }

.adapter-featured {
  border-color: var(--primary);
  box-shadow: 0 0 30px var(--primary-glow);
}

.adapter-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 100px;
  width: fit-content;
}

.adapter-badge-featured {
  background: rgba(0, 194, 255, 0.1);
  border-color: rgba(0, 194, 255, 0.3);
  color: var(--primary);
}

.adapter-langchain-icon { margin: 4px 0; }

.adapter-icon-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.adapter-card h3 { font-size: 1rem; }
.adapter-card p  { color: var(--text-secondary); font-size: 13px; flex: 1; }

.adapter-install {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--code);
}

.adapter-features { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── Pricing ──────────────────────────────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pricing-card-popular {
  border-color: var(--primary);
  box-shadow: 0 0 40px var(--primary-glow);
}

.pricing-card-growth {
  border-color: var(--accent);
  box-shadow: 0 0 40px var(--accent-glow);
}

.pricing-popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: var(--bg);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.pricing-tier {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.price-amount {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.price-period { color: var(--muted); font-size: 14px; }

.pricing-desc { color: var(--text-secondary); font-size: 14px; }

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
}

.pricing-features li i { color: var(--success); flex-shrink: 0; }
.pricing-features .feature-missing { color: var(--muted); }
.pricing-features .feature-missing i { color: var(--muted); }

.pricing-enterprise {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.pricing-enterprise h3 { margin-bottom: 4px; }
.pricing-enterprise p  { color: var(--text-secondary); font-size: 14px; }

/* ── CTA ──────────────────────────────────────────────────────────────────── */
.section-cta { position: relative; overflow: hidden; }

.cta-inner {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--primary);
  border-radius: 24px;
  padding: 64px;
  text-align: center;
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(0, 194, 255, 0.1), transparent 70%);
  pointer-events: none;
}

.cta-content { position: relative; }

.cta-content h2 { margin-bottom: 12px; }
.cta-content > p { color: var(--text-secondary); margin-bottom: 32px; }

.cta-form {
  display: flex;
  gap: 12px;
  max-width: 500px;
  margin: 0 auto 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.cta-input {
  flex: 1;
  min-width: 200px;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}

.cta-input:focus { border-color: var(--primary); }

.cta-alternative {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cta-alternative code { font-size: 13px; }

.signup-result {
  margin-top: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.api-key-result { text-align: left; }
.key-display {
  display: block;
  background: var(--bg);
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--primary);
  word-break: break-all;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  margin-bottom: 48px;
}

@media (max-width: 640px) { .footer-inner { grid-template-columns: 1fr; } }

.footer-brand p { color: var(--muted); font-size: 14px; margin-top: 12px; max-width: 280px; }

.footer-links { display: flex; gap: 48px; }

.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col h4 { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.footer-col a { font-size: 14px; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.footer-col a:hover { color: var(--text); text-decoration: none; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}

/* ── Dashboard ────────────────────────────────────────────────────────────── */
.dashboard-body { background: var(--bg); }

/* Header */
.dash-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60px;
  background: rgba(5, 13, 26, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 50;
  gap: 16px;
}

.dash-header-left, .dash-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
}

.dash-breadcrumb { color: var(--muted); font-size: 13px; }

.dash-api-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-online  { background: #10B981; box-shadow: 0 0 6px rgba(16,185,129,0.5); }
.status-offline { background: #F59E0B; box-shadow: 0 0 6px rgba(245,158,11,0.5); }

.dash-namespace-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  color: var(--muted);
  font-size: 13px;
}

.dash-namespace-selector select {
  background: transparent;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  outline: none;
}

/* Layout */
.dash-layout {
  display: flex;
  padding-top: 60px;
  min-height: 100vh;
}

/* Sidebar */
.dash-sidebar {
  width: 220px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  position: fixed;
  top: 60px;
  bottom: 0;
  overflow-y: auto;
}

.dash-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 12px; flex: 1; }

.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
  cursor: pointer;
}

.dash-nav-item:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.dash-nav-item.active { color: var(--primary); background: var(--primary-glow); }

.nav-badge {
  margin-left: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 100px;
}

.dash-sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-plan-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-glow);
  padding: 3px 10px;
  border-radius: 100px;
}

.upgrade-link { font-size: 12px; color: var(--muted); text-decoration: none; }
.upgrade-link:hover { color: var(--text); text-decoration: none; }

/* Main Content */
.dash-main {
  flex: 1;
  margin-left: 220px;
  padding: 32px;
  min-width: 0;
}

.dash-section { display: none; }
.dash-section.active { display: block; }

.dash-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.dash-section-title { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.dash-section-sub   { color: var(--muted); font-size: 14px; }

/* Stats Grid */
.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.dash-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: border-color 0.2s;
}

.dash-stat-card:hover { border-color: var(--primary); }

.dash-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-stat-value { font-size: 28px; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.dash-stat-label { font-size: 12px; color: var(--muted); font-weight: 500; }
.dash-stat-trend { font-size: 11px; color: var(--success); margin-top: 4px; }

/* Grid 2 / 3 */
.dash-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.dash-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 24px; }

@media (max-width: 900px) {
  .dash-grid-2, .dash-grid-3 { grid-template-columns: 1fr; }
}

/* Cards */
.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.dash-card:last-child { margin-bottom: 0; }

.dash-card-title { font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.dash-card-sub   { color: var(--muted); font-size: 13px; margin-bottom: 16px; }

.chart-container { position: relative; }

/* Activity Feed */
.activity-feed { display: flex; flex-direction: column; gap: 12px; }
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
}
.activity-text { flex: 1; color: var(--text-secondary); line-height: 1.5; }
.activity-time { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* Search */
.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--muted);
  pointer-events: none;
}

.search-input-wrap .dash-input { padding-left: 38px; }

.dash-search-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.dash-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* Memories Table */
.memories-table-wrap { overflow-x: auto; }
.memories-table { width: 100%; border-collapse: collapse; }

.memories-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.memories-table td {
  padding: 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.memory-row { cursor: pointer; transition: background 0.15s; }
.memory-row:hover { background: rgba(0, 194, 255, 0.04); }
.memory-row:last-child td { border-bottom: none; }

.memory-content-cell { max-width: 400px; }
.memory-content-preview { color: var(--text-secondary); line-height: 1.5; }

/* Pagination */
.dash-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 16px;
  gap: 12px;
}

.pagination-info { font-size: 13px; color: var(--muted); }
.pagination-btns { display: flex; gap: 8px; }

/* Metric Cards */
.metric-card { text-align: center; }
.metric-value { font-size: 32px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.metric-label { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.metric-sub   { font-size: 12px; color: var(--muted); }

/* Forms */
.dash-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.dash-input:focus { border-color: var(--primary); }
.dash-input::placeholder { color: var(--muted); }

.dash-select {
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  cursor: pointer;
  min-width: 140px;
}

.dash-select:focus { border-color: var(--primary); }

.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.form-hint   { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* Identity */
.identity-form { display: flex; flex-direction: column; }

.goals-list { display: flex; flex-direction: column; gap: 10px; }
.goal-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  padding: 10px 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* API Keys */
.api-key-display {
  display: inline-block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--primary);
}

/* Danger Zone */
.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-sm);
}

.danger-zone p { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* Checkboxes */
.checkbox-group { display: flex; flex-direction: column; gap: 8px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-secondary); cursor: pointer; }

/* Quick Search Results */
.quick-search-results { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.search-result-item {
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s;
}
.search-result-item:hover { border-color: var(--primary); }
.search-result-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.search-score { font-size: 12px; color: var(--success); font-family: 'JetBrains Mono', monospace; }
.search-result-content { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 6px; }
.search-result-meta { font-size: 11px; color: var(--muted); }

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 13, 26, 0.8);
  backdrop-filter: blur(4px);
}

.modal-panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 { font-size: 18px; }

.modal-body { padding: 24px; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow);
  animation: slideUp 0.3s ease;
}

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

.toast-success { background: #10B981; color: white; }
.toast-error   { background: #EF4444; color: white; }
.toast-info    { background: var(--surface); border: 1px solid var(--border); color: var(--text); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .hero { padding: 120px 0 64px; }
  .hero-diagram { flex-direction: column; }
  .diagram-arrow { transform: rotate(90deg); }
  .dash-sidebar { display: none; }
  .dash-main { margin-left: 0; padding: 24px 16px; }
  .dash-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; }
  .cta-inner { padding: 40px 24px; }
  .footer-links { flex-wrap: wrap; gap: 24px; }
}
